From 490083a9596128c578bedd64aee9f006c7b1e8c7 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Sun, 26 Sep 2021 11:53:03 +0200 Subject: [PATCH 01/12] first go --- package.json | 4 +- pitsby.config.js | 15 + pitsby/data/components-vanilla.json | 1 + pitsby/data/metrics-ids.js | 5 + pitsby/data/projects.json | 1 + pitsby/images/arrow-back.svg | 13 + pitsby/images/chevron.svg | 9 + pitsby/images/favicon-pitsby.png | Bin 0 -> 732 bytes pitsby/images/loader.svg | 1 + pitsby/images/logo.svg | 1 + pitsby/images/magnifying-glass.svg | 1 + pitsby/images/menu.svg | 13 + pitsby/images/open.svg | 10 + pitsby/index.html | 1 + pitsby/main.css | 1414 +++++++++++ pitsby/main.js | 3413 +++++++++++++++++++++++++++ src/my-map.doc.js | 50 + tsconfig.json | 2 +- 18 files changed, 4952 insertions(+), 2 deletions(-) create mode 100644 pitsby.config.js create mode 100644 pitsby/data/components-vanilla.json create mode 100644 pitsby/data/metrics-ids.js create mode 100644 pitsby/data/projects.json create mode 100644 pitsby/images/arrow-back.svg create mode 100644 pitsby/images/chevron.svg create mode 100644 pitsby/images/favicon-pitsby.png create mode 100644 pitsby/images/loader.svg create mode 100644 pitsby/images/logo.svg create mode 100644 pitsby/images/magnifying-glass.svg create mode 100644 pitsby/images/menu.svg create mode 100644 pitsby/images/open.svg create mode 100644 pitsby/index.html create mode 100644 pitsby/main.css create mode 100644 pitsby/main.js create mode 100644 src/my-map.doc.js diff --git a/package.json b/package.json index 0bf2ac8..3729d30 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,9 @@ "scripts": { "dev": "vite", "build": "tsc && vite build && sed 's/src=\".*\"/src=\"map.es.js\"/' index.html > dist/index.html", - "prepublishOnly": "rm -rf dist types && npm run build" + "prepublishOnly": "rm -rf dist types && npm run build", + "pitsbyDev": "pitsby build --watch", + "pitsbyPublish": "pitsby build && vite ./pitsby" }, "dependencies": { "@turf/union": "^6.5.0", diff --git a/pitsby.config.js b/pitsby.config.js new file mode 100644 index 0000000..06f42a0 --- /dev/null +++ b/pitsby.config.js @@ -0,0 +1,15 @@ +module.exports = { + projects: [ + { + engine: 'vanilla', + collectDocsFrom: './src/' + } + ], + styles: [ + './dist/style.css' + ], + scripts: [ + './dist/map.es.js', + './dist/map.umd.js', + ], +}; diff --git a/pitsby/data/components-vanilla.json b/pitsby/data/components-vanilla.json new file mode 100644 index 0000000..2ec5ecf --- /dev/null +++ b/pitsby/data/components-vanilla.json @@ -0,0 +1 @@ +[{"name":"My Map","description":"A map.","properties":[{"name":"latitude","type":"Number"},{"name":"longitude","type":"Number"},{"name":"zoom","type":"Number"},{"name":"drawMode","type":"Boolean"},{"name":"areaUnits","type":"String","values":"m2, ha"}],"examples":[{"title":"Basemap: Ordnance Survey vector tiles","template":""},{"title":"Basemap: Ordnance Survey raster tiles","template":""},{"title":"Interaction: Draw mode","controller":"function(element) {\n const map = element.querySelector(\"my-map\");\n map.addEventListener(\"areaChange\", ({ detail: area }) => {\n console.debug({ area });\n });\n map.addEventListener(\"geojsonChange\", ({ detail: geojson }) => {\n console.debug({ geojson });\n });\n }","template":""}],"id":"my-map"}] \ No newline at end of file diff --git a/pitsby/data/metrics-ids.js b/pitsby/data/metrics-ids.js new file mode 100644 index 0000000..433b980 --- /dev/null +++ b/pitsby/data/metrics-ids.js @@ -0,0 +1,5 @@ +module.exports = { + get(){ + return {}; + } +}; \ No newline at end of file diff --git a/pitsby/data/projects.json b/pitsby/data/projects.json new file mode 100644 index 0000000..b0ef447 --- /dev/null +++ b/pitsby/data/projects.json @@ -0,0 +1 @@ +[{"engine":"vanilla"}] \ No newline at end of file diff --git a/pitsby/images/arrow-back.svg b/pitsby/images/arrow-back.svg new file mode 100644 index 0000000..d577baf --- /dev/null +++ b/pitsby/images/arrow-back.svg @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/pitsby/images/chevron.svg b/pitsby/images/chevron.svg new file mode 100644 index 0000000..98cd1f1 --- /dev/null +++ b/pitsby/images/chevron.svg @@ -0,0 +1,9 @@ + + + + + + diff --git a/pitsby/images/favicon-pitsby.png b/pitsby/images/favicon-pitsby.png new file mode 100644 index 0000000000000000000000000000000000000000..d85636b94721e0facbcab3fa1d0f4b45778b0444 GIT binary patch literal 732 zcmV<20wev2P)i4~ zw*`@y&jNR^0<)QkDXb(M0r)aii$Q%liQ}_C`TDrF7?UUviN4-AlN4NEaqa|gArE|9 z2Zn#G)8%%yQ04&wFHyA;<)O_j;N99DFnfT>9I-F0po`Kv?AuQ?;)2`S3@b%$LA5z5 zeOQOfdmIN`(8nTdNi=Y8JFqv#LW=_)G3K#Ugzj#3F-Q!4MT46pg6370v3y(9Uzmh4 z4!iuRaRf;0>|8Pe6ZZBK@c#2S<`tnR670Fl=flU$NWhgV^{i*phu+V{ma@eJ!USg{ zp|=|;+mA&+qIQ!+5Gh51tSi=l1l$xUM~H1(sND?5|6J^CxdgS@i~vZ5J199oq$S63S60mMEgJp&=sqpgIh>Eqy10pfv{tF zZs&ftU>oy$h}Oe9PUS!^r$mI+{lGX*@rsw|@76lht2Ez?)1LF600RIGDH}G618E8X O0000 \ No newline at end of file diff --git a/pitsby/images/logo.svg b/pitsby/images/logo.svg new file mode 100644 index 0000000..6fcb493 --- /dev/null +++ b/pitsby/images/logo.svg @@ -0,0 +1 @@ +logo \ No newline at end of file diff --git a/pitsby/images/magnifying-glass.svg b/pitsby/images/magnifying-glass.svg new file mode 100644 index 0000000..aa98d1c --- /dev/null +++ b/pitsby/images/magnifying-glass.svg @@ -0,0 +1 @@ +magnifying-glass \ No newline at end of file diff --git a/pitsby/images/menu.svg b/pitsby/images/menu.svg new file mode 100644 index 0000000..9fd2cf6 --- /dev/null +++ b/pitsby/images/menu.svg @@ -0,0 +1,13 @@ + + + + + + + + + + diff --git a/pitsby/images/open.svg b/pitsby/images/open.svg new file mode 100644 index 0000000..1b486fb --- /dev/null +++ b/pitsby/images/open.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/pitsby/index.html b/pitsby/index.html new file mode 100644 index 0000000..8b32a0a --- /dev/null +++ b/pitsby/index.html @@ -0,0 +1 @@ +Pitsby \ No newline at end of file diff --git a/pitsby/main.css b/pitsby/main.css new file mode 100644 index 0000000..31ef2f9 --- /dev/null +++ b/pitsby/main.css @@ -0,0 +1,1414 @@ +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +@import url(https://rsms.me/inter/inter.css); +@import url(https://fonts.googleapis.com/css?family=PT+Mono); +html, +body { + margin: 0; + color: #333; + font-family: 'Inter', Helvetica, Arial, sans-serif; + font-weight: 300; +} + +.p-alert { + position: relative; + padding-top: 6px; + padding-right: 18px; + padding-bottom: 6px; + padding-left: 18px; + background-color: #fcfcfc; + border-width: 1px; + border-style: solid; + border-color: #f5f5f5; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.p-alert .p-alert-retry-btn-container { + position: absolute; + top: 50%; + right: 2px; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); +} +.p-alert.p-alert-danger { + padding-right: 72px; + background-color: #fff6f6; + border-color: #fbcccc; +} +.p-alert.p-alert-danger .p-alert-message { + color: #ac0f0f; +} +.p-alert-message { + font-size: 0.875rem; +} + +.p-back-trigger .p-trigger { + margin: 20px 30px 30px; + background-image: url("/images/arrow-back.svg"); +} + +.p-btn { + position: relative; + padding: 0 15px; + color: #737c84; + background-color: transparent; + font-size: 1rem; + text-align: center; + line-height: 35px; + border-width: 1px; + border-style: solid; + border-color: #c6c6c6; + cursor: pointer; + -webkit-appearance: none; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -moz-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -o-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -webkit-border-radius: 22px; + -moz-border-radius: 22px; + border-radius: 22px; +} +.p-btn:hover, +.p-btn:focus, +.p-btn:active { + outline: 0; +} +.p-btn:hover, +.p-btn:active { + background-color: #c6c6c6; + color: #fff; +} +.p-btn.p-btn-small { + padding: 0 10px; + line-height: 25px; + font-size: 0.75rem; +} +.p-btn.p-btn-primary { + color: #69f; + border-color: #69f; +} +.p-btn.p-btn-primary:hover, +.p-btn.p-btn-primary:active { + background-color: #69f; + color: #fff; +} +.p-btn.p-btn-danger { + color: #ac0f0f; + border-color: #ac0f0f; +} +.p-btn.p-btn-danger:hover, +.p-btn.p-btn-danger:active { + background-color: #ac0f0f; + color: #fff; +} + +.p-code-editor.ace_editor { + font: 12px 'PT Mono', monospace; + font-weight: 300; +} +.p-code-editor.ace-tm { + background-color: transparent; + color: rgba(51,51,51,0.7); +} +.p-code-editor.ace-tm .ace_gutter { + background: transparent; + color: #c6c6c6; + border-right: 1px solid #f5f5f5; +} +.p-code-editor.ace-tm .ace_gutter-active-line, +.p-code-editor.ace-tm .ace_fold-widget, +.p-code-editor.ace-tm .ace_print-margin, +.p-code-editor.ace-tm .ace_active-line { + display: none; +} +.p-code-editor.ace-tm .ace_storage, +.p-code-editor.ace-tm .ace_keyword { + color: #de8e7c; +} +.p-code-editor.ace-tm .ace_entity.ace_name.ace_function { + color: #2e72ff; +} +.p-code-editor.ace-tm .ace_string { + color: #00ae6d; +} +.p-code-editor.ace-tm .ace_constant.ace_numeric { + color: #ff9632; +} +.p-code-editor.ace-tm .ace_variable { + color: rgba(51,51,51,0.7); +} +.p-code-editor.ace-tm .ace_identifier ~ .ace_identifier { + color: #2e72ff; +} +.p-code-editor.ace-tm .ace_attribute-name { + color: #2e72ff; +} +.p-code-editor.ace-tm .ace_meta.ace_tag { + color: #de8e7c; +} +.p-code-editor.ace-tm .ace_meta.ace_tag.ace_end-tag-open, +.p-code-editor.ace-tm .ace_meta.ace_tag.ace_tag-open, +.p-code-editor.ace-tm .ace_meta.ace_tag.ace_tag-close { + color: rgba(51,51,51,0.7); +} +.p-code-editor.ace-tm .ace_marker-layer .ace_selection { + background: #e9f1fb; +} +.p-code-editor.ace-tm .ace_marker-layer .ace_bracket { + position: relative; + bottom: -2px; + margin: 0; + border: 0; + border-bottom: 1px solid #69f; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.p-code-editor .ace_gutter-cell.ace_info, +.p-code-editor .ace_gutter-cell.ace_warning, +.p-code-editor .ace_gutter-cell.ace_error { + background-image: none; +} +.p-code-editor .ace_gutter-cell.ace_error { + background-color: #fff6f6; + color: #fc3338; + border-left: 2px solid #fc3338; +} +.p-code-editor .ace_gutter-cell.ace_warning { + background-color: #fffbf5; + color: #c1aa00; + border-left: 2px solid #c1aa00; +} +.p-code-editor .ace_tooltip { + padding: 10px; + background: rgba(255,255,255,0.8); + color: #737c84; + font-family: 'Inter', Helvetica, Arial, sans-serif; + border: 0; + -webkit-box-shadow: 0 0 30px 0 #c6c6c6; + -moz-box-shadow: 0 0 30px 0 #c6c6c6; + box-shadow: 0 0 30px 0 #c6c6c6; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.p-components-menu { + padding-top: 30px; +} +.p-components-menu .p-alert { + margin: 0 30px; +} +.p-components-menu .p-search-input { + margin: 0 30px 50px; +} +.p-components-menu-no-results { + margin: 0 30px; + padding: 5px; + color: #737c84; + font-size: 0.75rem; + text-align: center; + text-transform: uppercase; + border: 1px solid #c6c6c6; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.p-components-menu-item-container .p-components-menu-item-container { + margin-left: 30px; +} +.p-components-menu-item-container .p-components-menu-item-container .p-components-menu-item { + font-weight: 400; +} +.p-components-menu-item-container.p-components-menu-item-has-children > .p-components-menu-item:hover, +.p-components-menu-item-container.p-components-menu-item-has-children > .p-components-menu-item:focus, +.p-components-menu-item-container.p-components-menu-item-has-children > .p-components-menu-item:active { + background-color: transparent; +} +.p-components-menu-item-container.p-components-menu-item-has-children > .p-components-menu-item:after { + content: ''; + position: absolute; + top: 50%; + right: 30px; + width: 10px; + height: 10px; + background-repeat: no-repeat; + background-position: center; + transform-origin: 75% 50%; + background-image: url("/images/chevron.svg"); + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); +} +.p-components-menu-item-container.p-components-menu-item-has-children > ng-transclude > p-components-menu-item { + display: none; +} +.p-components-menu-item-container.p-components-menu-item-has-children.p-components-menu-item-children-visible > .p-components-menu-item:after { + -webkit-transform: translateY(-50%) rotate(-90deg); + -moz-transform: translateY(-50%) rotate(-90deg); + -ms-transform: translateY(-50%) rotate(-90deg); + -o-transform: translateY(-50%) rotate(-90deg); + transform: translateY(-50%) rotate(-90deg); +} +.p-components-menu-item-container.p-components-menu-item-has-children.p-components-menu-item-children-visible > ng-transclude > p-components-menu-item { + display: block; +} +.p-components-menu-item { + position: relative; + padding: 12px 30px; + font-weight: 600; + cursor: pointer; + border-left-color: #69f; + border-left-style: solid; + border-left-width: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -moz-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -o-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -webkit-tap-highlight-color: rgba(0,0,0,0); + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; +} +.p-components-menu-item:hover, +.p-components-menu-item:focus, +.p-components-menu-item:active { + background-color: #fcfcfc; +} +.p-components-menu-item.p-components-menu-item-active { + background-color: #fcfcfc; + padding-left: 27px; + font-weight: 600; + border-left-width: 3px; + cursor: default; + pointer-events: none; +} + +.p-credits { + color: #737c84; + font-size: 0.75rem; + text-align: center; +} +.p-credits .p-link { + border-bottom: 1px solid #69f; +} + +.p-engine-menu-container { + padding: 0 30px; + border-bottom: 1px solid rgba(198,198,198,0.5); + zoom: 1; +} +.p-engine-menu-container:after { + content: " "; + display: table; + clear: both; +} +.p-engine-menu { + position: relative; + bottom: -1px; + margin: 0; + padding: 0; + list-style-type: none; + zoom: 1; +} +.p-engine-menu:after { + content: " "; + display: table; + clear: both; +} +.p-engine-menu-item { + float: left; +} +.p-engine-menu-link { + display: block; + padding: 20px 0; + color: #c6c6c6; + text-align: center; + font-size: 0.75rem; + font-weight: 600; + text-decoration: none; + text-transform: uppercase; + border-bottom-width: 3px; + border-bottom-style: solid; + border-bottom-color: #c6c6c6; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.p-engine-menu-link:focus { + outline: 0; + background-color: rgba(255,255,255,0.25); + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.p-engine-menu-link.p-engine-menu-link-active { + color: #69f; + border-bottom-color: #69f; +} + +.p-external-component p-heading + p { + margin-top: 30px; +} +.p-external-component .p-external-component-heading-container { + zoom: 1; +} +.p-external-component .p-external-component-heading-container:after { + content: " "; + display: table; + clear: both; +} +.p-external-component .p-external-component-heading-container .p-tag { + position: relative; + top: 8px; +} +.p-external-component .p-heading h2 { + float: left; + margin-bottom: 10px; +} +.p-external-component .p-heading h3 { + margin-bottom: 50px; +} +.p-external-component .p-tag { + display: block; + float: left; + margin-left: 10px; +} +.p-external-component .p-external-component-attributes-list, +.p-external-component .p-external-component-methods-list, +.p-external-component .p-external-component-examples-list { + margin-top: 75px; +} + +.p-external-component-example .p-paragraph { + margin-top: 5px; + font-size: 0.875rem; +} +.p-external-component-example .p-tabs { + margin-top: 20px; +} +.p-external-component-example .p-external-component-example-edit-link { + display: flex; + margin-top: 5px; + justify-content: flex-end; +} + +.p-external-component-example-edit-link button { + padding-right: 20px; + color: #69f; + font-size: 0.75rem; + font-weight: 600; + text-decoration: none; + background-color: transparent; + background-position: right center; + background-repeat: no-repeat; + background-image: url("/images/open.svg"); + border: 0; + cursor: pointer; + -webkit-appearance: none; +} +.p-external-component-example-edit-link button:hover, +.p-external-component-example-edit-link button:active, +.p-external-component-example-edit-link button:focus { + text-decoration: underline; +} + +.p-external-component-examples-list p-list-item { + margin-top: 35px; +} +.p-external-component-examples-list p-list-item + p-list-item { + border-top: 0; + margin-top: 75px; +} + +.p-external-component-code { + color: rgba(51,51,51,0.7); + line-height: 1.5; +} +.p-external-component-code .token.keyword { + color: #de8e7c; +} +.p-external-component-code .token.string, +.p-external-component-code .token.attr-value { + color: #00ae6d; +} +.p-external-component-code .token.function, +.p-external-component-code .token.attr-name { + color: #2e72ff; +} +.p-external-component-code .token.class-name { + color: #a91fde; +} +.p-external-component-code .token.tag { + color: #de8e7c; +} +.p-external-component-code .token.number { + color: #ff9632; +} +.p-external-component-code .token.operator { + color: #de8e7c; +} +.p-external-component-code .token.punctuation { + color: rgba(51,51,51,0.7); +} + +/** + * prism.js default theme for JavaScript, CSS and HTML + * Based on dabblet (http://dabblet.com) + * @author Lea Verou + */ +code[class*="language-"], +pre[class*="language-"] { + color: #000; + background: none; + text-shadow: 0 1px #fff; + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + font-size: 1em; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} +pre[class*="language-"]::-moz-selection, +pre[class*="language-"] ::-moz-selection, +code[class*="language-"]::-moz-selection, +code[class*="language-"] ::-moz-selection { + text-shadow: none; + background: #b3d4fc; +} +pre[class*="language-"]::selection, +pre[class*="language-"] ::selection, +code[class*="language-"]::selection, +code[class*="language-"] ::selection { + text-shadow: none; + background: #b3d4fc; +} +@media print { + code[class*="language-"], + pre[class*="language-"] { + text-shadow: none; + } +} +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0.5em 0; + overflow: auto; +} +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #f5f2f0; +} +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: 0.1em; + border-radius: 0.3em; + white-space: normal; +} +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #708090; +} +.token.punctuation { + color: #999; +} +.token.namespace { + opacity: 0.7; +} +.token.property, +.token.tag, +.token.boolean, +.token.number, +.token.constant, +.token.symbol, +.token.deleted { + color: #905; +} +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #690; +} +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string { + color: #9a6e3a; +/* This background color was intended by the author of this theme. */ + background: rgba(255,255,255,0.5); +} +.token.atrule, +.token.attr-value, +.token.keyword { + color: #07a; +} +.token.function, +.token.class-name { + color: #dd4a68; +} +.token.regex, +.token.important, +.token.variable { + color: #e90; +} +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} +.token.entity { + cursor: help; +} + +.p-external-component-methods-list .p-heading h4 { + float: left; + position: relative; + left: -10px; + margin-bottom: 10px; + padding: 5px 10px; + background-color: #f5f5f5; + font-family: 'PT Mono', monospace; + font-size: 0.875rem; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.p-external-component-methods-list p-heading + p-tag .p-tag { + position: relative; + top: 2px; +} +.p-external-component-methods-list p-external-component-props-list-item:not(:first-child) { + border-top: 0; +} +.p-external-component-methods-list p-external-component-props-list-item:not(:first-child) .p-external-component-methods-list-method-row { + margin-top: 20px; +} +.p-external-component-methods-list-param-row { + margin-top: 0; + padding: 10px 0; +} +.p-external-component-methods-list-param-row + .p-external-component-methods-list-param-row { + border-top: 1px solid #f5f5f5; +} + +.p-external-component-props-list .p-row-item-label { + font-size: 0.625rem; + font-weight: 600; + text-transform: uppercase; +} +.p-external-component-props-list .p-row-item-value { + font-family: 'PT Mono', monospace; + font-size: 0.75rem; + white-space: normal; + overflow: visible; +} +.p-external-component-props-list .p-row-item .p-required-symbol { + position: relative; + left: 3px; +} +.p-external-component-props-list .p-row-item span:not(.p-tag) { + float: left; + font-family: 'PT Mono', monospace; + font-size: 0.75rem; +} +.p-external-component-props-list .p-required-caption { + margin-top: 20px; +} + +p-external-component-props-list-item { + display: block; + padding: 10px 0; +} +p-external-component-props-list-item:not(:first-child) { + border-top: 1px solid #f5f5f5; +} + +.p-external-components-playground.p-external-components-playground-padding p-external-component-preview { + padding: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.p-external-components-playground .p-tabs-bar-item { + padding: 15px 0; + min-width: 100px; + text-align: center; +} +.p-external-components-playground .p-tabs-content { + padding: 0; + height: calc(100vh - 48px); +} +.p-external-components-playground .p-external-component-preview { + height: 100%; +} +.p-external-components-playground .p-external-component-preview ng-transclude { + display: inherit; + height: auto; +} +.p-external-components-playground p-tab, +.p-external-components-playground .p-tab, +.p-external-components-playground p-code-editor, +.p-external-components-playground .p-code-editor { + height: calc(100vh - 48px); +} +.p-external-components-playground p-external-component-preview { + display: block; + height: 100%; +} +.p-external-components-playground ng-transclude { + display: block; + height: calc(100vh - 48px); +} +.p-external-components-playground-editor { + height: calc(100vh - 48px); +} +@media screen and (max-width: 767px) { + .p-external-components-playground { + height: calc(100vh - 60px); + } + .p-external-components-playground .p-tabs-bar-items-container { + display: flex; + justify-content: center; + width: 100%; + } + .p-external-components-playground .p-tabs-bar-item { + min-width: 0; + width: 25%; + } + .p-external-components-playground .p-tabs-content { + padding: 0; + height: calc(100vh - 108px); + } + .p-external-components-playground p-tab, + .p-external-components-playground .p-tab, + .p-external-components-playground p-code-editor, + .p-external-components-playground .p-code-editor { + height: calc(100vh - 108px); + } + .p-external-components-playground ng-transclude { + display: block; + height: calc(100vh - 108px); + } + .p-external-components-playground .p-external-component-preview ng-transclude { + display: inherit; + height: auto; + } + .p-external-components-playground-editor { + height: calc(100vh - 108px); + } +} + +.p-heading h1, +.p-heading h2, +.p-heading h3, +.p-heading h4, +.p-heading h5, +.p-heading h6 { + position: relative; + margin: 0; + font-weight: 600; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.p-heading h3 { + font-size: 1.125rem; + text-transform: uppercase; +} +.p-heading h4, +.p-heading h5, +.p-heading h6 { + font-weight: normal; +} + +.p-input-wrapper ::-webkit-input-placeholder { + color: #c6c6c6; + font-size: 0.75rem; +} +.p-input-wrapper ::-moz-placeholder { + color: #c6c6c6; + font-size: 0.75rem; +} +.p-input-wrapper :-ms-input-placeholder { + color: #c6c6c6; + font-size: 0.75rem; +} +.p-input-wrapper :-moz-placeholder { + color: #c6c6c6; + font-size: 0.75rem; +} +.p-input { + padding: 0 20px; + font-size: 1rem; + line-height: 40px; + border-width: 1px; + border-style: solid; + border-color: transparent; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.p-input:focus { + outline: 0; + border-color: #69f; +} + +.p-link { + color: #69f; + text-decoration: none; +} +.p-link:hover, +.p-link:focus, +.p-link:active { + color: #2e72ff; +} + +p-list-item { + display: block; + padding: 15px 0; +} + +.p-loader { + margin: 0 auto; + height: 50px; + width: 50px; + background-position: center center; + background-repeat: no-repeat; + opacity: 0.75; + background-image: url("/images/loader.svg"); +} + +.p-logo { + width: 130px; + height: 40px; + background-position: center; + background-repeat: no-repeat; + background-size: contain; + background-image: url("/images/logo.svg"); +} + +.p-main { + background-color: #fff; + min-height: 100vh; +} +.p-main-content { + margin: 0 auto; + max-width: 1440px; +} + +.p-menu-trigger .p-trigger { + background-image: url("/images/menu.svg"); +} + +.p-paragraph p { + margin: 0; + line-height: 1.35; +} +p-paragraph { + display: block; +} +p-paragraph + p-paragraph { + margin-top: 20px; +} + +.p-pre { + margin: 0; + font-family: 'PT Mono', monospace; + font-size: 0.75rem; +} + +.p-required-caption-text { + position: relative; + top: -3px; + font-size: 0.625rem; + text-transform: uppercase; +} + +.p-required-symbol { + color: #fc3338; + font-size: 0.875rem; +} + +.p-row-item { + float: left; + padding: 0 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.p-row-item input, +.p-row-item textarea { + width: 100%; +} +.p-row-item-label, +.p-row-item-value { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.p-row-item-label { + margin-bottom: 5px; + color: #b4b4b4; + font-size: 0.75rem; +} +.p-row-item-size-1 { + width: 8.333333333333332%; +} +.p-row-item-size-2 { + width: 16.666666666666664%; +} +.p-row-item-size-3 { + width: 25%; +} +.p-row-item-size-4 { + width: 33.33333333333333%; +} +.p-row-item-size-5 { + width: 41.66666666666667%; +} +.p-row-item-size-6 { + width: 50%; +} +.p-row-item-size-7 { + width: 58.333333333333336%; +} +.p-row-item-size-8 { + width: 66.66666666666666%; +} +.p-row-item-size-9 { + width: 75%; +} +.p-row-item-size-10 { + width: 83.33333333333334%; +} +.p-row-item-size-11 { + width: 91.66666666666666%; +} +.p-row-item-size-12 { + width: 100%; +} +@media screen and (max-width: 767px) { + .p-row-item { + float: left; + width: 100%; + } + .p-row-item { + margin-top: 12px; + } + .p-row-item { + width: 100%; + } +} +p-row { + display: block; + margin: 0 -10px; + zoom: 1; +} +p-row:after { + content: " "; + display: table; + clear: both; +} +p-row + p-row { + margin-top: 15px; +} +.p-row-vertical-offset-1 { + margin-top: 10px; +} +.p-row-vertical-offset-2 { + margin-top: 20px; +} +.p-row-vertical-offset-3 { + margin-top: 30px; +} +.p-row-vertical-offset-4 { + margin-top: 40px; +} +.p-row-vertical-offset-5 { + margin-top: 50px; +} + +.p-row-item { + float: left; + padding: 0 10px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.p-row-item input, +.p-row-item textarea { + width: 100%; +} +.p-row-item-label, +.p-row-item-value { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} +.p-row-item-label { + margin-bottom: 5px; + color: #b4b4b4; + font-size: 0.75rem; +} +.p-row-item-size-1 { + width: 8.333333333333332%; +} +.p-row-item-size-2 { + width: 16.666666666666664%; +} +.p-row-item-size-3 { + width: 25%; +} +.p-row-item-size-4 { + width: 33.33333333333333%; +} +.p-row-item-size-5 { + width: 41.66666666666667%; +} +.p-row-item-size-6 { + width: 50%; +} +.p-row-item-size-7 { + width: 58.333333333333336%; +} +.p-row-item-size-8 { + width: 66.66666666666666%; +} +.p-row-item-size-9 { + width: 75%; +} +.p-row-item-size-10 { + width: 83.33333333333334%; +} +.p-row-item-size-11 { + width: 91.66666666666666%; +} +.p-row-item-size-12 { + width: 100%; +} +@media screen and (max-width: 767px) { + .p-row-item { + float: left; + width: 100%; + } + .p-row-item { + margin-top: 12px; + } + .p-row-item { + width: 100%; + } +} + +.p-sidebar { + padding-top: 50px; + max-width: 400px; + background-color: #f5f5f5; + overflow-x: hidden; + overflow-y: scroll; +} +.p-sidebar .p-logo { + margin: 0 30px 30px; +} +.p-sidebar .p-external-components-list { + margin-top: 50px; +} + +.p-search-input { + position: relative; + display: block; +} +.p-search-input ::-webkit-input-placeholder { + text-transform: uppercase; + font-weight: 600; +} +.p-search-input ::-moz-placeholder { + text-transform: uppercase; + font-weight: 600; +} +.p-search-input :-ms-input-placeholder { + text-transform: uppercase; + font-weight: 600; +} +.p-search-input :-moz-placeholder { + text-transform: uppercase; + font-weight: 600; +} +.p-search-input .p-search-input-icon { + position: absolute; + top: 10px; + right: 20px; + width: 20px; + height: 20px; + background-repeat: no-repeat; + background-size: 75%; + background-position: center; + background-image: url("/images/magnifying-glass.svg"); +} +.p-search-input input { + width: 100%; + padding-right: 60px; +} + +.p-tabs-bar { + border-bottom: 3px solid #f5f5f5; + zoom: 1; +} +.p-tabs-bar:after { + content: " "; + display: table; + clear: both; +} +.p-tabs-bar-items-container { + position: relative; + float: left; +} +.p-tabs-bar-items-container.p-tabs-bar-items-centered { + left: 50%; + -webkit-transform: translateX(-50%); + -moz-transform: translateX(-50%); + -ms-transform: translateX(-50%); + -o-transform: translateX(-50%); + transform: translateX(-50%); +} +.p-tabs-bar-item { + position: relative; + bottom: -3px; + float: left; + padding: 10px; + color: #c6c6c6; + font-size: 0.625rem; + font-weight: 600; + text-transform: uppercase; + cursor: pointer; + border-bottom-width: 3px; + border-bottom-style: solid; + border-bottom-color: #c6c6c6; + -webkit-tap-highlight-color: rgba(0,0,0,0); + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; +} +.p-tabs-bar-item.p-tabs-bar-item-active { + color: #69f; + border-bottom-color: #69f; +} +.p-tabs-content { + padding: 30px; + background-color: rgba(245,245,245,0.25); + overflow-x: auto; + overflow-y: visible; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +p-tab { + display: none; +} +p-tab.p-tab-active { + display: block; +} + +.p-tag { + display: inline-block; + padding: 1px 4px; + font-size: 0.5rem; + text-transform: uppercase; + border-width: 1px; + border-style: solid; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + color: #c6c6c6; + border-color: rgba(198,198,198,0.7); +} +.p-tag.p-tag-info { + color: #69f; + border-color: rgba(102,153,255,0.7); +} +.p-tag.p-tag-success { + color: #00ae6d; + border-color: rgba(0,174,109,0.7); +} +.p-tag.p-tag-danger { + color: #fc3338; + border-color: rgba(252,51,56,0.7); +} + +.p-topbar { + height: 60px; + background-color: #f5f5f5; +} +.p-topbar .p-logo { + position: absolute; + width: 81px; + height: 25px; + max-height: 25px; + left: 50%; + top: 50%; + -webkit-transform: translate(-50%,-50%); + -moz-transform: translate(-50%,-50%); + -ms-transform: translate(-50%,-50%); + -o-transform: translate(-50%,-50%); + transform: translate(-50%,-50%); +} + +.p-trigger { + width: 20px; + height: 20px; + background-position: center; + background-size: 100%; + background-repeat: no-repeat; + cursor: pointer; +} + +.p-sidebar { + padding-top: 50px; + max-width: 400px; + background-color: #f5f5f5; + overflow-x: hidden; + overflow-y: scroll; +} +.p-sidebar .p-logo { + margin: 0 30px 30px; +} +.p-sidebar .p-external-components-list { + margin-top: 50px; +} +.p-viewport { + position: relative; +} +.p-viewport .p-topbar { + position: fixed; + top: -100%; + left: 0; + padding: 20px 30px; + width: 100%; + z-index: 10; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: top 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -moz-transition: top 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -o-transition: top 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + transition: top 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); +} +.p-viewport .p-topbar .p-logo { + z-index: 20; +} +.p-viewport .p-sidebar { + position: fixed; + top: 0; + left: 0; + width: 90%; + height: 100vh; + padding-top: 50px; + z-index: 10; + -webkit-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -moz-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -o-transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + transition: all 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); +} +.p-viewport .p-sidebar .p-back-trigger { + display: none; +} +.p-viewport .p-sidebar-content { + position: relative; + padding-bottom: 50px; + min-height: calc(100vh - 50px); +} +.p-viewport .p-sidebar-content .p-credits { + position: absolute; + left: 50%; + bottom: 10px; + -webkit-transform: translateX(-50%); + -moz-transform: translateX(-50%); + -ms-transform: translateX(-50%); + -o-transform: translateX(-50%); + transform: translateX(-50%); +} +.p-viewport .p-sidebar, +.p-viewport .p-sidebar-content { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.p-viewport .p-main { + margin-left: 400px; + width: calc(100% - 400px); + -webkit-transition: margin-left 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -moz-transition: margin-left 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + -o-transition: margin-left 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); + transition: margin-left 300ms cubic-bezier(0.08, 0.69, 0.485, 0.99); +} +.p-viewport .p-external-component { + padding: 60px 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +@media screen and (max-width: 767px) { + .p-viewport .p-topbar { + top: 0; + } + .p-viewport .p-sidebar { + position: fixed; + top: 0; + left: 0; + padding-top: 0; + -webkit-box-shadow: 3px 0 32px 0 rgba(51,51,51,0); + -moz-box-shadow: 3px 0 32px 0 rgba(51,51,51,0); + box-shadow: 3px 0 32px 0 rgba(51,51,51,0); + -webkit-transform: translate3d(-100%,0,0); + -moz-transform: translate3d(-100%,0,0); + -ms-transform: translate3d(-100%,0,0); + -o-transform: translate3d(-100%,0,0); + transform: translate3d(-100%,0,0); + } + .p-viewport .p-sidebar.p-sidebar-visible { + -webkit-transform: translate3d(0,0,0); + -moz-transform: translate3d(0,0,0); + -ms-transform: translate3d(0,0,0); + -o-transform: translate3d(0,0,0); + transform: translate3d(0,0,0); + -webkit-box-shadow: 3px 0 32px 0 rgba(51,51,51,0.25); + -moz-box-shadow: 3px 0 32px 0 rgba(51,51,51,0.25); + box-shadow: 3px 0 32px 0 rgba(51,51,51,0.25); + } + .p-viewport .p-sidebar .p-back-trigger { + display: block; + } + .p-viewport .p-sidebar .p-logo { + display: none; + } + .p-viewport .p-main { + margin-left: 0; + padding-top: 60px; + width: 100%; + } +} + +.p-welcome { + padding: 60px 30px; +} +.p-welcome p { + margin-top: 30px; +} +.p-welcome-engine { + font-weight: bold; + text-transform: capitalize; +} + + +/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvd2ViYXBwL3N0eWxlcy9fbmF0aXZlLnN0eWwgKDIpIiwid2VicGFjazovLy8uL3NyYy93ZWJhcHAvc3R5bGVzL2FsZXJ0LnN0eWwgKDIpIiwid2VicGFjazovLy8uL3NyYy93ZWJhcHAvc3R5bGVzL2JhY2stdHJpZ2dlci5zdHlsICgyKSIsIndlYnBhY2s6Ly8vLi9zcmMvd2ViYXBwL3N0eWxlcy9idG4uc3R5bCAoMikiLCJ3ZWJwYWNrOi8vLy4vc3JjL3dlYmFwcC9zdHlsZXMvY29kZS1lZGl0b3Iuc3R5bCA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ViYXIgLnAtbG9nbyB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxuICAucC12aWV3cG9ydCAucC1tYWluIHtcbiAgICBtYXJnaW4tbGVmdDogMDtcbiAgICBwYWRkaW5nLXRvcDogNjBweDtcbiAgICB3aWR0aDogMTAwJTtcbiAgfVxufVxuIiwiLnAtd2VsY29tZSB7XG4gIHBhZGRpbmc6IDYwcHggMzBweDtcbn1cbi5wLXdlbGNvbWUgcCB7XG4gIG1hcmdpbi10b3A6IDMwcHg7XG59XG4ucC13ZWxjb21lLWVuZ2luZSB7XG4gIGZvbnQtd2VpZ2h0OiBib2xkO1xuICB0ZXh0LXRyYW5zZm9ybTogY2FwaXRhbGl6ZTtcbn1cbiJdLCJzb3VyY2VSb290IjoiIn0=*/ \ No newline at end of file diff --git a/pitsby/main.js b/pitsby/main.js new file mode 100644 index 0000000..c0b264a --- /dev/null +++ b/pitsby/main.js @@ -0,0 +1,3413 @@ +/******/ (function(modules) { // webpackBootstrap +/******/ function hotDisposeChunk(chunkId) { +/******/ delete installedChunks[chunkId]; +/******/ } +/******/ var parentHotUpdateCallback = window["webpackHotUpdate"]; +/******/ window["webpackHotUpdate"] = // eslint-disable-next-line no-unused-vars +/******/ function webpackHotUpdateCallback(chunkId, moreModules) { +/******/ hotAddUpdateChunk(chunkId, moreModules); +/******/ if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); +/******/ } ; +/******/ +/******/ // eslint-disable-next-line no-unused-vars +/******/ function hotDownloadUpdateChunk(chunkId) { +/******/ var script = document.createElement("script"); +/******/ script.charset = "utf-8"; +/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js"; +/******/ if (null) script.crossOrigin = null; +/******/ document.head.appendChild(script); +/******/ } +/******/ +/******/ // eslint-disable-next-line no-unused-vars +/******/ function hotDownloadManifest(requestTimeout) { +/******/ requestTimeout = requestTimeout || 10000; +/******/ return new Promise(function(resolve, reject) { +/******/ if (typeof XMLHttpRequest === "undefined") { +/******/ return reject(new Error("No browser support")); +/******/ } +/******/ try { +/******/ var request = new XMLHttpRequest(); +/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json"; +/******/ request.open("GET", requestPath, true); +/******/ request.timeout = requestTimeout; +/******/ request.send(null); +/******/ } catch (err) { +/******/ return reject(err); +/******/ } +/******/ request.onreadystatechange = function() { +/******/ if (request.readyState !== 4) return; +/******/ if (request.status === 0) { +/******/ // timeout +/******/ reject( +/******/ new Error("Manifest request to " + requestPath + " timed out.") +/******/ ); +/******/ } else if (request.status === 404) { +/******/ // no update available +/******/ resolve(); +/******/ } else if (request.status !== 200 && request.status !== 304) { +/******/ // other failure +/******/ reject(new Error("Manifest request to " + requestPath + " failed.")); +/******/ } else { +/******/ // success +/******/ try { +/******/ var update = JSON.parse(request.responseText); +/******/ } catch (e) { +/******/ reject(e); +/******/ return; +/******/ } +/******/ resolve(update); +/******/ } +/******/ }; +/******/ }); +/******/ } +/******/ +/******/ var hotApplyOnUpdate = true; +/******/ // eslint-disable-next-line no-unused-vars +/******/ var hotCurrentHash = "5b62537494793935adfc"; +/******/ var hotRequestTimeout = 10000; +/******/ var hotCurrentModuleData = {}; +/******/ var hotCurrentChildModule; +/******/ // eslint-disable-next-line no-unused-vars +/******/ var hotCurrentParents = []; +/******/ // eslint-disable-next-line no-unused-vars +/******/ var hotCurrentParentsTemp = []; +/******/ +/******/ // eslint-disable-next-line no-unused-vars +/******/ function hotCreateRequire(moduleId) { +/******/ var me = installedModules[moduleId]; +/******/ if (!me) return __webpack_require__; +/******/ var fn = function(request) { +/******/ if (me.hot.active) { +/******/ if (installedModules[request]) { +/******/ if (installedModules[request].parents.indexOf(moduleId) === -1) { +/******/ installedModules[request].parents.push(moduleId); +/******/ } +/******/ } else { +/******/ hotCurrentParents = [moduleId]; +/******/ hotCurrentChildModule = request; +/******/ } +/******/ if (me.children.indexOf(request) === -1) { +/******/ me.children.push(request); +/******/ } +/******/ } else { +/******/ console.warn( +/******/ "[HMR] unexpected require(" + +/******/ request + +/******/ ") from disposed module " + +/******/ moduleId +/******/ ); +/******/ hotCurrentParents = []; +/******/ } +/******/ return __webpack_require__(request); +/******/ }; +/******/ var ObjectFactory = function ObjectFactory(name) { +/******/ return { +/******/ configurable: true, +/******/ enumerable: true, +/******/ get: function() { +/******/ return __webpack_require__[name]; +/******/ }, +/******/ set: function(value) { +/******/ __webpack_require__[name] = value; +/******/ } +/******/ }; +/******/ }; +/******/ for (var name in __webpack_require__) { +/******/ if ( +/******/ Object.prototype.hasOwnProperty.call(__webpack_require__, name) && +/******/ name !== "e" && +/******/ name !== "t" +/******/ ) { +/******/ Object.defineProperty(fn, name, ObjectFactory(name)); +/******/ } +/******/ } +/******/ fn.e = function(chunkId) { +/******/ if (hotStatus === "ready") hotSetStatus("prepare"); +/******/ hotChunksLoading++; +/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) { +/******/ finishChunkLoading(); +/******/ throw err; +/******/ }); +/******/ +/******/ function finishChunkLoading() { +/******/ hotChunksLoading--; +/******/ if (hotStatus === "prepare") { +/******/ if (!hotWaitingFilesMap[chunkId]) { +/******/ hotEnsureUpdateChunk(chunkId); +/******/ } +/******/ if (hotChunksLoading === 0 && hotWaitingFiles === 0) { +/******/ hotUpdateDownloaded(); +/******/ } +/******/ } +/******/ } +/******/ }; +/******/ fn.t = function(value, mode) { +/******/ if (mode & 1) value = fn(value); +/******/ return __webpack_require__.t(value, mode & ~1); +/******/ }; +/******/ return fn; +/******/ } +/******/ +/******/ // eslint-disable-next-line no-unused-vars +/******/ function hotCreateModule(moduleId) { +/******/ var hot = { +/******/ // private stuff +/******/ _acceptedDependencies: {}, +/******/ _declinedDependencies: {}, +/******/ _selfAccepted: false, +/******/ _selfDeclined: false, +/******/ _selfInvalidated: false, +/******/ _disposeHandlers: [], +/******/ _main: hotCurrentChildModule !== moduleId, +/******/ +/******/ // Module API +/******/ active: true, +/******/ accept: function(dep, callback) { +/******/ if (dep === undefined) hot._selfAccepted = true; +/******/ else if (typeof dep === "function") hot._selfAccepted = dep; +/******/ else if (typeof dep === "object") +/******/ for (var i = 0; i < dep.length; i++) +/******/ hot._acceptedDependencies[dep[i]] = callback || function() {}; +/******/ else hot._acceptedDependencies[dep] = callback || function() {}; +/******/ }, +/******/ decline: function(dep) { +/******/ if (dep === undefined) hot._selfDeclined = true; +/******/ else if (typeof dep === "object") +/******/ for (var i = 0; i < dep.length; i++) +/******/ hot._declinedDependencies[dep[i]] = true; +/******/ else hot._declinedDependencies[dep] = true; +/******/ }, +/******/ dispose: function(callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ addDisposeHandler: function(callback) { +/******/ hot._disposeHandlers.push(callback); +/******/ }, +/******/ removeDisposeHandler: function(callback) { +/******/ var idx = hot._disposeHandlers.indexOf(callback); +/******/ if (idx >= 0) hot._disposeHandlers.splice(idx, 1); +/******/ }, +/******/ invalidate: function() { +/******/ this._selfInvalidated = true; +/******/ switch (hotStatus) { +/******/ case "idle": +/******/ hotUpdate = {}; +/******/ hotUpdate[moduleId] = modules[moduleId]; +/******/ hotSetStatus("ready"); +/******/ break; +/******/ case "ready": +/******/ hotApplyInvalidatedModule(moduleId); +/******/ break; +/******/ case "prepare": +/******/ case "check": +/******/ case "dispose": +/******/ case "apply": +/******/ (hotQueuedInvalidatedModules = +/******/ hotQueuedInvalidatedModules || []).push(moduleId); +/******/ break; +/******/ default: +/******/ // ignore requests in error states +/******/ break; +/******/ } +/******/ }, +/******/ +/******/ // Management API +/******/ check: hotCheck, +/******/ apply: hotApply, +/******/ status: function(l) { +/******/ if (!l) return hotStatus; +/******/ hotStatusHandlers.push(l); +/******/ }, +/******/ addStatusHandler: function(l) { +/******/ hotStatusHandlers.push(l); +/******/ }, +/******/ removeStatusHandler: function(l) { +/******/ var idx = hotStatusHandlers.indexOf(l); +/******/ if (idx >= 0) hotStatusHandlers.splice(idx, 1); +/******/ }, +/******/ +/******/ //inherit from previous dispose call +/******/ data: hotCurrentModuleData[moduleId] +/******/ }; +/******/ hotCurrentChildModule = undefined; +/******/ return hot; +/******/ } +/******/ +/******/ var hotStatusHandlers = []; +/******/ var hotStatus = "idle"; +/******/ +/******/ function hotSetStatus(newStatus) { +/******/ hotStatus = newStatus; +/******/ for (var i = 0; i < hotStatusHandlers.length; i++) +/******/ hotStatusHandlers[i].call(null, newStatus); +/******/ } +/******/ +/******/ // while downloading +/******/ var hotWaitingFiles = 0; +/******/ var hotChunksLoading = 0; +/******/ var hotWaitingFilesMap = {}; +/******/ var hotRequestedFilesMap = {}; +/******/ var hotAvailableFilesMap = {}; +/******/ var hotDeferred; +/******/ +/******/ // The update info +/******/ var hotUpdate, hotUpdateNewHash, hotQueuedInvalidatedModules; +/******/ +/******/ function toModuleId(id) { +/******/ var isNumber = +id + "" === id; +/******/ return isNumber ? +id : id; +/******/ } +/******/ +/******/ function hotCheck(apply) { +/******/ if (hotStatus !== "idle") { +/******/ throw new Error("check() is only allowed in idle status"); +/******/ } +/******/ hotApplyOnUpdate = apply; +/******/ hotSetStatus("check"); +/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) { +/******/ if (!update) { +/******/ hotSetStatus(hotApplyInvalidatedModules() ? "ready" : "idle"); +/******/ return null; +/******/ } +/******/ hotRequestedFilesMap = {}; +/******/ hotWaitingFilesMap = {}; +/******/ hotAvailableFilesMap = update.c; +/******/ hotUpdateNewHash = update.h; +/******/ +/******/ hotSetStatus("prepare"); +/******/ var promise = new Promise(function(resolve, reject) { +/******/ hotDeferred = { +/******/ resolve: resolve, +/******/ reject: reject +/******/ }; +/******/ }); +/******/ hotUpdate = {}; +/******/ var chunkId = "main"; +/******/ // eslint-disable-next-line no-lone-blocks +/******/ { +/******/ hotEnsureUpdateChunk(chunkId); +/******/ } +/******/ if ( +/******/ hotStatus === "prepare" && +/******/ hotChunksLoading === 0 && +/******/ hotWaitingFiles === 0 +/******/ ) { +/******/ hotUpdateDownloaded(); +/******/ } +/******/ return promise; +/******/ }); +/******/ } +/******/ +/******/ // eslint-disable-next-line no-unused-vars +/******/ function hotAddUpdateChunk(chunkId, moreModules) { +/******/ if (!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) +/******/ return; +/******/ hotRequestedFilesMap[chunkId] = false; +/******/ for (var moduleId in moreModules) { +/******/ if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { +/******/ hotUpdate[moduleId] = moreModules[moduleId]; +/******/ } +/******/ } +/******/ if (--hotWaitingFiles === 0 && hotChunksLoading === 0) { +/******/ hotUpdateDownloaded(); +/******/ } +/******/ } +/******/ +/******/ function hotEnsureUpdateChunk(chunkId) { +/******/ if (!hotAvailableFilesMap[chunkId]) { +/******/ hotWaitingFilesMap[chunkId] = true; +/******/ } else { +/******/ hotRequestedFilesMap[chunkId] = true; +/******/ hotWaitingFiles++; +/******/ hotDownloadUpdateChunk(chunkId); +/******/ } +/******/ } +/******/ +/******/ function hotUpdateDownloaded() { +/******/ hotSetStatus("ready"); +/******/ var deferred = hotDeferred; +/******/ hotDeferred = null; +/******/ if (!deferred) return; +/******/ if (hotApplyOnUpdate) { +/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to +/******/ // avoid triggering uncaught exception warning in Chrome. +/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666 +/******/ Promise.resolve() +/******/ .then(function() { +/******/ return hotApply(hotApplyOnUpdate); +/******/ }) +/******/ .then( +/******/ function(result) { +/******/ deferred.resolve(result); +/******/ }, +/******/ function(err) { +/******/ deferred.reject(err); +/******/ } +/******/ ); +/******/ } else { +/******/ var outdatedModules = []; +/******/ for (var id in hotUpdate) { +/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) { +/******/ outdatedModules.push(toModuleId(id)); +/******/ } +/******/ } +/******/ deferred.resolve(outdatedModules); +/******/ } +/******/ } +/******/ +/******/ function hotApply(options) { +/******/ if (hotStatus !== "ready") +/******/ throw new Error("apply() is only allowed in ready status"); +/******/ options = options || {}; +/******/ return hotApplyInternal(options); +/******/ } +/******/ +/******/ function hotApplyInternal(options) { +/******/ hotApplyInvalidatedModules(); +/******/ +/******/ var cb; +/******/ var i; +/******/ var j; +/******/ var module; +/******/ var moduleId; +/******/ +/******/ function getAffectedStuff(updateModuleId) { +/******/ var outdatedModules = [updateModuleId]; +/******/ var outdatedDependencies = {}; +/******/ +/******/ var queue = outdatedModules.map(function(id) { +/******/ return { +/******/ chain: [id], +/******/ id: id +/******/ }; +/******/ }); +/******/ while (queue.length > 0) { +/******/ var queueItem = queue.pop(); +/******/ var moduleId = queueItem.id; +/******/ var chain = queueItem.chain; +/******/ module = installedModules[moduleId]; +/******/ if ( +/******/ !module || +/******/ (module.hot._selfAccepted && !module.hot._selfInvalidated) +/******/ ) +/******/ continue; +/******/ if (module.hot._selfDeclined) { +/******/ return { +/******/ type: "self-declined", +/******/ chain: chain, +/******/ moduleId: moduleId +/******/ }; +/******/ } +/******/ if (module.hot._main) { +/******/ return { +/******/ type: "unaccepted", +/******/ chain: chain, +/******/ moduleId: moduleId +/******/ }; +/******/ } +/******/ for (var i = 0; i < module.parents.length; i++) { +/******/ var parentId = module.parents[i]; +/******/ var parent = installedModules[parentId]; +/******/ if (!parent) continue; +/******/ if (parent.hot._declinedDependencies[moduleId]) { +/******/ return { +/******/ type: "declined", +/******/ chain: chain.concat([parentId]), +/******/ moduleId: moduleId, +/******/ parentId: parentId +/******/ }; +/******/ } +/******/ if (outdatedModules.indexOf(parentId) !== -1) continue; +/******/ if (parent.hot._acceptedDependencies[moduleId]) { +/******/ if (!outdatedDependencies[parentId]) +/******/ outdatedDependencies[parentId] = []; +/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); +/******/ continue; +/******/ } +/******/ delete outdatedDependencies[parentId]; +/******/ outdatedModules.push(parentId); +/******/ queue.push({ +/******/ chain: chain.concat([parentId]), +/******/ id: parentId +/******/ }); +/******/ } +/******/ } +/******/ +/******/ return { +/******/ type: "accepted", +/******/ moduleId: updateModuleId, +/******/ outdatedModules: outdatedModules, +/******/ outdatedDependencies: outdatedDependencies +/******/ }; +/******/ } +/******/ +/******/ function addAllToSet(a, b) { +/******/ for (var i = 0; i < b.length; i++) { +/******/ var item = b[i]; +/******/ if (a.indexOf(item) === -1) a.push(item); +/******/ } +/******/ } +/******/ +/******/ // at begin all updates modules are outdated +/******/ // the "outdated" status can propagate to parents if they don't accept the children +/******/ var outdatedDependencies = {}; +/******/ var outdatedModules = []; +/******/ var appliedUpdate = {}; +/******/ +/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() { +/******/ console.warn( +/******/ "[HMR] unexpected require(" + result.moduleId + ") to disposed module" +/******/ ); +/******/ }; +/******/ +/******/ for (var id in hotUpdate) { +/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) { +/******/ moduleId = toModuleId(id); +/******/ /** @type {TODO} */ +/******/ var result; +/******/ if (hotUpdate[id]) { +/******/ result = getAffectedStuff(moduleId); +/******/ } else { +/******/ result = { +/******/ type: "disposed", +/******/ moduleId: id +/******/ }; +/******/ } +/******/ /** @type {Error|false} */ +/******/ var abortError = false; +/******/ var doApply = false; +/******/ var doDispose = false; +/******/ var chainInfo = ""; +/******/ if (result.chain) { +/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); +/******/ } +/******/ switch (result.type) { +/******/ case "self-declined": +/******/ if (options.onDeclined) options.onDeclined(result); +/******/ if (!options.ignoreDeclined) +/******/ abortError = new Error( +/******/ "Aborted because of self decline: " + +/******/ result.moduleId + +/******/ chainInfo +/******/ ); +/******/ break; +/******/ case "declined": +/******/ if (options.onDeclined) options.onDeclined(result); +/******/ if (!options.ignoreDeclined) +/******/ abortError = new Error( +/******/ "Aborted because of declined dependency: " + +/******/ result.moduleId + +/******/ " in " + +/******/ result.parentId + +/******/ chainInfo +/******/ ); +/******/ break; +/******/ case "unaccepted": +/******/ if (options.onUnaccepted) options.onUnaccepted(result); +/******/ if (!options.ignoreUnaccepted) +/******/ abortError = new Error( +/******/ "Aborted because " + moduleId + " is not accepted" + chainInfo +/******/ ); +/******/ break; +/******/ case "accepted": +/******/ if (options.onAccepted) options.onAccepted(result); +/******/ doApply = true; +/******/ break; +/******/ case "disposed": +/******/ if (options.onDisposed) options.onDisposed(result); +/******/ doDispose = true; +/******/ break; +/******/ default: +/******/ throw new Error("Unexception type " + result.type); +/******/ } +/******/ if (abortError) { +/******/ hotSetStatus("abort"); +/******/ return Promise.reject(abortError); +/******/ } +/******/ if (doApply) { +/******/ appliedUpdate[moduleId] = hotUpdate[moduleId]; +/******/ addAllToSet(outdatedModules, result.outdatedModules); +/******/ for (moduleId in result.outdatedDependencies) { +/******/ if ( +/******/ Object.prototype.hasOwnProperty.call( +/******/ result.outdatedDependencies, +/******/ moduleId +/******/ ) +/******/ ) { +/******/ if (!outdatedDependencies[moduleId]) +/******/ outdatedDependencies[moduleId] = []; +/******/ addAllToSet( +/******/ outdatedDependencies[moduleId], +/******/ result.outdatedDependencies[moduleId] +/******/ ); +/******/ } +/******/ } +/******/ } +/******/ if (doDispose) { +/******/ addAllToSet(outdatedModules, [result.moduleId]); +/******/ appliedUpdate[moduleId] = warnUnexpectedRequire; +/******/ } +/******/ } +/******/ } +/******/ +/******/ // Store self accepted outdated modules to require them later by the module system +/******/ var outdatedSelfAcceptedModules = []; +/******/ for (i = 0; i < outdatedModules.length; i++) { +/******/ moduleId = outdatedModules[i]; +/******/ if ( +/******/ installedModules[moduleId] && +/******/ installedModules[moduleId].hot._selfAccepted && +/******/ // removed self-accepted modules should not be required +/******/ appliedUpdate[moduleId] !== warnUnexpectedRequire && +/******/ // when called invalidate self-accepting is not possible +/******/ !installedModules[moduleId].hot._selfInvalidated +/******/ ) { +/******/ outdatedSelfAcceptedModules.push({ +/******/ module: moduleId, +/******/ parents: installedModules[moduleId].parents.slice(), +/******/ errorHandler: installedModules[moduleId].hot._selfAccepted +/******/ }); +/******/ } +/******/ } +/******/ +/******/ // Now in "dispose" phase +/******/ hotSetStatus("dispose"); +/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) { +/******/ if (hotAvailableFilesMap[chunkId] === false) { +/******/ hotDisposeChunk(chunkId); +/******/ } +/******/ }); +/******/ +/******/ var idx; +/******/ var queue = outdatedModules.slice(); +/******/ while (queue.length > 0) { +/******/ moduleId = queue.pop(); +/******/ module = installedModules[moduleId]; +/******/ if (!module) continue; +/******/ +/******/ var data = {}; +/******/ +/******/ // Call dispose handlers +/******/ var disposeHandlers = module.hot._disposeHandlers; +/******/ for (j = 0; j < disposeHandlers.length; j++) { +/******/ cb = disposeHandlers[j]; +/******/ cb(data); +/******/ } +/******/ hotCurrentModuleData[moduleId] = data; +/******/ +/******/ // disable module (this disables requires from this module) +/******/ module.hot.active = false; +/******/ +/******/ // remove module from cache +/******/ delete installedModules[moduleId]; +/******/ +/******/ // when disposing there is no need to call dispose handler +/******/ delete outdatedDependencies[moduleId]; +/******/ +/******/ // remove "parents" references from all children +/******/ for (j = 0; j < module.children.length; j++) { +/******/ var child = installedModules[module.children[j]]; +/******/ if (!child) continue; +/******/ idx = child.parents.indexOf(moduleId); +/******/ if (idx >= 0) { +/******/ child.parents.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ +/******/ // remove outdated dependency from module children +/******/ var dependency; +/******/ var moduleOutdatedDependencies; +/******/ for (moduleId in outdatedDependencies) { +/******/ if ( +/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId) +/******/ ) { +/******/ module = installedModules[moduleId]; +/******/ if (module) { +/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; +/******/ for (j = 0; j < moduleOutdatedDependencies.length; j++) { +/******/ dependency = moduleOutdatedDependencies[j]; +/******/ idx = module.children.indexOf(dependency); +/******/ if (idx >= 0) module.children.splice(idx, 1); +/******/ } +/******/ } +/******/ } +/******/ } +/******/ +/******/ // Now in "apply" phase +/******/ hotSetStatus("apply"); +/******/ +/******/ if (hotUpdateNewHash !== undefined) { +/******/ hotCurrentHash = hotUpdateNewHash; +/******/ hotUpdateNewHash = undefined; +/******/ } +/******/ hotUpdate = undefined; +/******/ +/******/ // insert new code +/******/ for (moduleId in appliedUpdate) { +/******/ if (Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { +/******/ modules[moduleId] = appliedUpdate[moduleId]; +/******/ } +/******/ } +/******/ +/******/ // call accept handlers +/******/ var error = null; +/******/ for (moduleId in outdatedDependencies) { +/******/ if ( +/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId) +/******/ ) { +/******/ module = installedModules[moduleId]; +/******/ if (module) { +/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; +/******/ var callbacks = []; +/******/ for (i = 0; i < moduleOutdatedDependencies.length; i++) { +/******/ dependency = moduleOutdatedDependencies[i]; +/******/ cb = module.hot._acceptedDependencies[dependency]; +/******/ if (cb) { +/******/ if (callbacks.indexOf(cb) !== -1) continue; +/******/ callbacks.push(cb); +/******/ } +/******/ } +/******/ for (i = 0; i < callbacks.length; i++) { +/******/ cb = callbacks[i]; +/******/ try { +/******/ cb(moduleOutdatedDependencies); +/******/ } catch (err) { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "accept-errored", +/******/ moduleId: moduleId, +/******/ dependencyId: moduleOutdatedDependencies[i], +/******/ error: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ if (!error) error = err; +/******/ } +/******/ } +/******/ } +/******/ } +/******/ } +/******/ } +/******/ +/******/ // Load self accepted modules +/******/ for (i = 0; i < outdatedSelfAcceptedModules.length; i++) { +/******/ var item = outdatedSelfAcceptedModules[i]; +/******/ moduleId = item.module; +/******/ hotCurrentParents = item.parents; +/******/ hotCurrentChildModule = moduleId; +/******/ try { +/******/ __webpack_require__(moduleId); +/******/ } catch (err) { +/******/ if (typeof item.errorHandler === "function") { +/******/ try { +/******/ item.errorHandler(err); +/******/ } catch (err2) { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "self-accept-error-handler-errored", +/******/ moduleId: moduleId, +/******/ error: err2, +/******/ originalError: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ if (!error) error = err2; +/******/ } +/******/ if (!error) error = err; +/******/ } +/******/ } else { +/******/ if (options.onErrored) { +/******/ options.onErrored({ +/******/ type: "self-accept-errored", +/******/ moduleId: moduleId, +/******/ error: err +/******/ }); +/******/ } +/******/ if (!options.ignoreErrored) { +/******/ if (!error) error = err; +/******/ } +/******/ } +/******/ } +/******/ } +/******/ +/******/ // handle errors in accept handlers and self accepted module load +/******/ if (error) { +/******/ hotSetStatus("fail"); +/******/ return Promise.reject(error); +/******/ } +/******/ +/******/ if (hotQueuedInvalidatedModules) { +/******/ return hotApplyInternal(options).then(function(list) { +/******/ outdatedModules.forEach(function(moduleId) { +/******/ if (list.indexOf(moduleId) < 0) list.push(moduleId); +/******/ }); +/******/ return list; +/******/ }); +/******/ } +/******/ +/******/ hotSetStatus("idle"); +/******/ return new Promise(function(resolve) { +/******/ resolve(outdatedModules); +/******/ }); +/******/ } +/******/ +/******/ function hotApplyInvalidatedModules() { +/******/ if (hotQueuedInvalidatedModules) { +/******/ if (!hotUpdate) hotUpdate = {}; +/******/ hotQueuedInvalidatedModules.forEach(hotApplyInvalidatedModule); +/******/ hotQueuedInvalidatedModules = undefined; +/******/ return true; +/******/ } +/******/ } +/******/ +/******/ function hotApplyInvalidatedModule(moduleId) { +/******/ if (!Object.prototype.hasOwnProperty.call(hotUpdate, moduleId)) +/******/ hotUpdate[moduleId] = modules[moduleId]; +/******/ } +/******/ +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {}, +/******/ hot: hotCreateModule(moduleId), +/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp), +/******/ children: [] +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ // __webpack_hash__ +/******/ __webpack_require__.h = function() { return hotCurrentHash; }; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return hotCreateRequire(0)(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive": +/*!*************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/@babel+standalone@7.15.7/node_modules/@babel/standalone sync ***! + \*************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = \"../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\";//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9AYmFiZWwrc3RhbmRhbG9uZUA3LjE1Ljcvbm9kZV9tb2R1bGVzL0BiYWJlbC9zdGFuZGFsb25lIHN5bmM/ODljMiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXVDLFdBQVc7QUFDbEQ7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL0BiYWJlbCtzdGFuZGFsb25lQDcuMTUuNy9ub2RlX21vZHVsZXMvQGJhYmVsL3N0YW5kYWxvbmUgc3luYyByZWN1cnNpdmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiB3ZWJwYWNrRW1wdHlDb250ZXh0KHJlcSkge1xuXHR2YXIgZSA9IG5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIgKyByZXEgKyBcIidcIik7XG5cdGUuY29kZSA9ICdNT0RVTEVfTk9UX0ZPVU5EJztcblx0dGhyb3cgZTtcbn1cbndlYnBhY2tFbXB0eUNvbnRleHQua2V5cyA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gW107IH07XG53ZWJwYWNrRW1wdHlDb250ZXh0LnJlc29sdmUgPSB3ZWJwYWNrRW1wdHlDb250ZXh0O1xubW9kdWxlLmV4cG9ydHMgPSB3ZWJwYWNrRW1wdHlDb250ZXh0O1xud2VicGFja0VtcHR5Q29udGV4dC5pZCA9IFwiLi4vLi4vLi4vLi4vQGJhYmVsK3N0YW5kYWxvbmVANy4xNS43L25vZGVfbW9kdWxlcy9AYmFiZWwvc3RhbmRhbG9uZSBzeW5jIHJlY3Vyc2l2ZVwiOyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\n"); + +/***/ }), + +/***/ "../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone/babel.js": +/*!*****************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/@babel+standalone@7.15.7/node_modules/@babel/standalone/babel.js ***! + \*****************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {\n\t true ? factory(exports) :\n\tundefined;\n}(this, (function (exports) { 'use strict';\n\n\tvar babel = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tget version () { return version$3; },\n\t\tget types () { return t$f; },\n\t\tget DEFAULT_EXTENSIONS () { return DEFAULT_EXTENSIONS; },\n\t\tget OptionManager () { return OptionManager; },\n\t\tget Plugin () { return Plugin; },\n\t\tget File () { return File; },\n\t\tget buildExternalHelpers () { return babelBuildExternalHelpers; },\n\t\tget resolvePlugin () { return resolvePlugin; },\n\t\tget resolvePreset () { return resolvePreset; },\n\t\tget getEnv () { return getEnv; },\n\t\tget tokTypes () { return tokTypes; },\n\t\tget traverse () { return traverse; },\n\t\tget template () { return template$2; },\n\t\tget createConfigItem () { return createConfigItem; },\n\t\tget createConfigItemSync () { return createConfigItemSync; },\n\t\tget createConfigItemAsync () { return createConfigItemAsync; },\n\t\tget loadPartialConfig () { return loadPartialConfig; },\n\t\tget loadPartialConfigSync () { return loadPartialConfigSync; },\n\t\tget loadPartialConfigAsync () { return loadPartialConfigAsync; },\n\t\tget loadOptions () { return loadOptions; },\n\t\tget loadOptionsSync () { return loadOptionsSync; },\n\t\tget loadOptionsAsync () { return loadOptionsAsync; },\n\t\tget transform () { return transform$2; },\n\t\tget transformSync () { return transformSync; },\n\t\tget transformAsync () { return transformAsync; },\n\t\tget transformFile () { return transformFile; },\n\t\tget transformFileSync () { return transformFileSync; },\n\t\tget transformFileAsync () { return transformFileAsync; },\n\t\tget transformFromAst () { return transformFromAst$1; },\n\t\tget transformFromAstSync () { return transformFromAstSync; },\n\t\tget transformFromAstAsync () { return transformFromAstAsync; },\n\t\tget parse () { return parse$2; },\n\t\tget parseSync () { return parseSync; },\n\t\tget parseAsync () { return parseAsync; }\n\t});\n\n\tvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\tfunction getAugmentedNamespace(n) {\n\t\tif (n.__esModule) return n;\n\t\tvar a = Object.defineProperty({}, '__esModule', {value: true});\n\t\tObject.keys(n).forEach(function (k) {\n\t\t\tvar d = Object.getOwnPropertyDescriptor(n, k);\n\t\t\tObject.defineProperty(a, k, d.get ? d : {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: function () {\n\t\t\t\t\treturn n[k];\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn a;\n\t}\n\n\tfunction createCommonjsModule(fn, basedir, module) {\n\t\treturn module = {\n\t\t\tpath: basedir,\n\t\t\texports: {},\n\t\t\trequire: function (path, base) {\n\t\t\t\treturn commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n\t\t\t}\n\t\t}, fn(module, module.exports), module.exports;\n\t}\n\n\tfunction commonjsRegister (path, loader) {\n\t\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n\t}\n\n\tconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\n\tconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\n\tconst DEFAULT_PARENT_MODULE = {\n\t\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n\t};\n\tconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\n\tfunction normalize$2 (path) {\n\t\tpath = path.replace(/\\\\/g, '/');\n\t\tconst parts = path.split('/');\n\t\tconst slashed = parts[0] === '';\n\t\tfor (let i = 1; i < parts.length; i++) {\n\t\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\t\tparts.splice(i--, 1);\n\t\t\t}\n\t\t}\n\t\tfor (let i = 1; i < parts.length; i++) {\n\t\t\tif (parts[i] !== '..') continue;\n\t\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\t\tparts.splice(--i, 2);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tpath = parts.join('/');\n\t\tif (slashed && path[0] !== '/')\n\t\t path = '/' + path;\n\t\telse if (path.length === 0)\n\t\t path = '.';\n\t\treturn path;\n\t}\n\n\tfunction join$1 () {\n\t\tif (arguments.length === 0)\n\t\t return '.';\n\t\tlet joined;\n\t\tfor (let i = 0; i < arguments.length; ++i) {\n\t\t let arg = arguments[i];\n\t\t if (arg.length > 0) {\n\t\t\tif (joined === undefined)\n\t\t\t joined = arg;\n\t\t\telse\n\t\t\t joined += '/' + arg;\n\t\t }\n\t\t}\n\t\tif (joined === undefined)\n\t\t return '.';\n\n\t\treturn joined;\n\t}\n\n\tfunction isPossibleNodeModulesPath (modulePath) {\n\t\tlet c0 = modulePath[0];\n\t\tif (c0 === '/' || c0 === '\\\\') return false;\n\t\tlet c1 = modulePath[1], c2 = modulePath[2];\n\t\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||\n\t\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;\n\t\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\'))\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tfunction dirname$1 (path) {\n\t if (path.length === 0)\n\t return '.';\n\n\t let i = path.length - 1;\n\t while (i > 0) {\n\t const c = path.charCodeAt(i);\n\t if ((c === 47 || c === 92) && i !== path.length - 1)\n\t break;\n\t i--;\n\t }\n\n\t if (i > 0)\n\t return path.substr(0, i);\n\n\t if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n\t return path.charAt(0);\n\n\t return '.';\n\t}\n\n\tfunction commonjsResolveImpl (path, originalModuleDir, testCache) {\n\t\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\t\tpath = normalize$2(path);\n\t\tlet relPath;\n\t\tif (path[0] === '/') {\n\t\t\toriginalModuleDir = '/';\n\t\t}\n\t\twhile (true) {\n\t\t\tif (!shouldTryNodeModules) {\n\t\t\t\trelPath = originalModuleDir ? normalize$2(originalModuleDir + '/' + path) : path;\n\t\t\t} else if (originalModuleDir) {\n\t\t\t\trelPath = normalize$2(originalModuleDir + '/node_modules/' + path);\n\t\t\t} else {\n\t\t\t\trelPath = normalize$2(join$1('node_modules', path));\n\t\t\t}\n\n\t\t\tif (relPath.endsWith('/..')) {\n\t\t\t\tbreak; // Travelled too far up, avoid infinite loop\n\t\t\t}\n\n\t\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\t\tif (DYNAMIC_REQUIRE_CACHE[resolvedPath]) {\n\t\t\t\t\treturn resolvedPath;\n\t\t\t\t}\t\t\tif (DYNAMIC_REQUIRE_LOADERS[resolvedPath]) {\n\t\t\t\t\treturn resolvedPath;\n\t\t\t\t}\t\t}\n\t\t\tif (!shouldTryNodeModules) break;\n\t\t\tconst nextDir = normalize$2(originalModuleDir + '/..');\n\t\t\tif (nextDir === originalModuleDir) break;\n\t\t\toriginalModuleDir = nextDir;\n\t\t}\n\t\treturn null;\n\t}\n\n\tfunction commonjsResolve (path, originalModuleDir) {\n\t\tconst resolvedPath = commonjsResolveImpl(path, originalModuleDir);\n\t\tif (resolvedPath !== null) {\n\t\t\treturn resolvedPath;\n\t\t}\n\t\treturn /*require.resolve*/(__webpack_require__(\"../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\").resolve(path));\n\t}\n\n\tfunction commonjsRequire (path, originalModuleDir) {\n\t\tconst resolvedPath = commonjsResolveImpl(path, originalModuleDir);\n\t\tif (resolvedPath !== null) {\n\t let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t if (cachedModule) return cachedModule.exports;\n\t const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t if (loader) {\n\t DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t id: resolvedPath,\n\t filename: resolvedPath,\n\t path: dirname$1(resolvedPath),\n\t exports: {},\n\t parent: DEFAULT_PARENT_MODULE,\n\t loaded: false,\n\t children: [],\n\t paths: [],\n\t require: function (path, base) {\n\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t }\n\t };\n\t try {\n\t loader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t } catch (error) {\n\t delete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t throw error;\n\t }\n\t cachedModule.loaded = true;\n\t return cachedModule.exports;\n\t }\t}\n\t\treturn __webpack_require__(\"../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\")(path);\n\t}\n\n\tcommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n\tcommonjsRequire.resolve = commonjsResolve;\n\n\tvar regenerate = createCommonjsModule(function (module, exports) {\n\n\t (function (root) {\n\t var freeExports = exports;\n\t var freeModule = module && module.exports == freeExports && module;\n\t var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;\n\n\t if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t root = freeGlobal;\n\t }\n\n\t var ERRORS = {\n\t 'rangeOrder': \"A range\\u2019s `stop` value must be greater than or equal \" + 'to the `start` value.',\n\t 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.'\n\t };\n\t var HIGH_SURROGATE_MIN = 0xD800;\n\t var HIGH_SURROGATE_MAX = 0xDBFF;\n\t var LOW_SURROGATE_MIN = 0xDC00;\n\t var LOW_SURROGATE_MAX = 0xDFFF;\n\t var regexNull = /\\\\x00([^0123456789]|$)/g;\n\t var object = {};\n\t var hasOwnProperty = object.hasOwnProperty;\n\n\t var extend = function extend(destination, source) {\n\t var key;\n\n\t for (key in source) {\n\t if (hasOwnProperty.call(source, key)) {\n\t destination[key] = source[key];\n\t }\n\t }\n\n\t return destination;\n\t };\n\n\t var forEach = function forEach(array, callback) {\n\t var index = -1;\n\t var length = array.length;\n\n\t while (++index < length) {\n\t callback(array[index], index);\n\t }\n\t };\n\n\t var toString = object.toString;\n\n\t var isArray = function isArray(value) {\n\t return toString.call(value) == '[object Array]';\n\t };\n\n\t var isNumber = function isNumber(value) {\n\t return typeof value == 'number' || toString.call(value) == '[object Number]';\n\t };\n\n\t var zeroes = '0000';\n\n\t var pad = function pad(number, totalCharacters) {\n\t var string = String(number);\n\t return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string;\n\t };\n\n\t var hex = function hex(number) {\n\t return Number(number).toString(16).toUpperCase();\n\t };\n\n\t var slice = [].slice;\n\n\t var dataFromCodePoints = function dataFromCodePoints(codePoints) {\n\t var index = -1;\n\t var length = codePoints.length;\n\t var max = length - 1;\n\t var result = [];\n\t var isStart = true;\n\t var tmp;\n\t var previous = 0;\n\n\t while (++index < length) {\n\t tmp = codePoints[index];\n\n\t if (isStart) {\n\t result.push(tmp);\n\t previous = tmp;\n\t isStart = false;\n\t } else {\n\t if (tmp == previous + 1) {\n\t if (index != max) {\n\t previous = tmp;\n\t continue;\n\t } else {\n\t isStart = true;\n\t result.push(tmp + 1);\n\t }\n\t } else {\n\t result.push(previous + 1, tmp);\n\t previous = tmp;\n\t }\n\t }\n\t }\n\n\t if (!isStart) {\n\t result.push(tmp + 1);\n\t }\n\n\t return result;\n\t };\n\n\t var dataRemove = function dataRemove(data, codePoint) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (codePoint >= start && codePoint < end) {\n\t if (codePoint == start) {\n\t if (end == start + 1) {\n\t data.splice(index, 2);\n\t return data;\n\t } else {\n\t data[index] = codePoint + 1;\n\t return data;\n\t }\n\t } else if (codePoint == end - 1) {\n\t data[index + 1] = codePoint;\n\t return data;\n\t } else {\n\t data.splice(index, 2, start, codePoint, codePoint + 1, end);\n\t return data;\n\t }\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataRemoveRange = function dataRemoveRange(data, rangeStart, rangeEnd) {\n\t if (rangeEnd < rangeStart) {\n\t throw Error(ERRORS.rangeOrder);\n\t }\n\n\t var index = 0;\n\t var start;\n\t var end;\n\n\t while (index < data.length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start > rangeEnd) {\n\t return data;\n\t }\n\n\t if (rangeStart <= start && rangeEnd >= end) {\n\t data.splice(index, 2);\n\t continue;\n\t }\n\n\t if (rangeStart >= start && rangeEnd < end) {\n\t if (rangeStart == start) {\n\t data[index] = rangeEnd + 1;\n\t data[index + 1] = end + 1;\n\t return data;\n\t }\n\n\t data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);\n\t return data;\n\t }\n\n\t if (rangeStart >= start && rangeStart <= end) {\n\t data[index + 1] = rangeStart;\n\t } else if (rangeEnd >= start && rangeEnd <= end) {\n\t data[index] = rangeEnd + 1;\n\t return data;\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataAdd = function dataAdd(data, codePoint) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var lastIndex = null;\n\t var length = data.length;\n\n\t if (codePoint < 0x0 || codePoint > 0x10FFFF) {\n\t throw RangeError(ERRORS.codePointRange);\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (codePoint >= start && codePoint < end) {\n\t return data;\n\t }\n\n\t if (codePoint == start - 1) {\n\t data[index] = codePoint;\n\t return data;\n\t }\n\n\t if (start > codePoint) {\n\t data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1);\n\t return data;\n\t }\n\n\t if (codePoint == end) {\n\t if (codePoint + 1 == data[index + 2]) {\n\t data.splice(index, 4, start, data[index + 3]);\n\t return data;\n\t }\n\n\t data[index + 1] = codePoint + 1;\n\t return data;\n\t }\n\n\t lastIndex = index;\n\t index += 2;\n\t }\n\n\t data.push(codePoint, codePoint + 1);\n\t return data;\n\t };\n\n\t var dataAddData = function dataAddData(dataA, dataB) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var data = dataA.slice();\n\t var length = dataB.length;\n\n\t while (index < length) {\n\t start = dataB[index];\n\t end = dataB[index + 1] - 1;\n\n\t if (start == end) {\n\t data = dataAdd(data, start);\n\t } else {\n\t data = dataAddRange(data, start, end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataRemoveData = function dataRemoveData(dataA, dataB) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var data = dataA.slice();\n\t var length = dataB.length;\n\n\t while (index < length) {\n\t start = dataB[index];\n\t end = dataB[index + 1] - 1;\n\n\t if (start == end) {\n\t data = dataRemove(data, start);\n\t } else {\n\t data = dataRemoveRange(data, start, end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataAddRange = function dataAddRange(data, rangeStart, rangeEnd) {\n\t if (rangeEnd < rangeStart) {\n\t throw Error(ERRORS.rangeOrder);\n\t }\n\n\t if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) {\n\t throw RangeError(ERRORS.codePointRange);\n\t }\n\n\t var index = 0;\n\t var start;\n\t var end;\n\t var added = false;\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (added) {\n\t if (start == rangeEnd + 1) {\n\t data.splice(index - 1, 2);\n\t return data;\n\t }\n\n\t if (start > rangeEnd) {\n\t return data;\n\t }\n\n\t if (start >= rangeStart && start <= rangeEnd) {\n\t if (end > rangeStart && end - 1 <= rangeEnd) {\n\t data.splice(index, 2);\n\t index -= 2;\n\t } else {\n\t data.splice(index - 1, 2);\n\t index -= 2;\n\t }\n\t }\n\t } else if (start == rangeEnd + 1 || start == rangeEnd) {\n\t data[index] = rangeStart;\n\t return data;\n\t } else if (start > rangeEnd) {\n\t data.splice(index, 0, rangeStart, rangeEnd + 1);\n\t return data;\n\t } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {\n\t return data;\n\t } else if (rangeStart >= start && rangeStart < end || end == rangeStart) {\n\t data[index + 1] = rangeEnd + 1;\n\t added = true;\n\t } else if (rangeStart <= start && rangeEnd + 1 >= end) {\n\t data[index] = rangeStart;\n\t data[index + 1] = rangeEnd + 1;\n\t added = true;\n\t }\n\n\t index += 2;\n\t }\n\n\t if (!added) {\n\t data.push(rangeStart, rangeEnd + 1);\n\t }\n\n\t return data;\n\t };\n\n\t var dataContains = function dataContains(data, codePoint) {\n\t var index = 0;\n\t var length = data.length;\n\t var start = data[index];\n\t var end = data[length - 1];\n\n\t if (length >= 2) {\n\t if (codePoint < start || codePoint > end) {\n\t return false;\n\t }\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (codePoint >= start && codePoint < end) {\n\t return true;\n\t }\n\n\t index += 2;\n\t }\n\n\t return false;\n\t };\n\n\t var dataIntersection = function dataIntersection(data, codePoints) {\n\t var index = 0;\n\t var length = codePoints.length;\n\t var codePoint;\n\t var result = [];\n\n\t while (index < length) {\n\t codePoint = codePoints[index];\n\n\t if (dataContains(data, codePoint)) {\n\t result.push(codePoint);\n\t }\n\n\t ++index;\n\t }\n\n\t return dataFromCodePoints(result);\n\t };\n\n\t var dataIsEmpty = function dataIsEmpty(data) {\n\t return !data.length;\n\t };\n\n\t var dataIsSingleton = function dataIsSingleton(data) {\n\t return data.length == 2 && data[0] + 1 == data[1];\n\t };\n\n\t var dataToArray = function dataToArray(data) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var result = [];\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t while (start < end) {\n\t result.push(start);\n\t ++start;\n\t }\n\n\t index += 2;\n\t }\n\n\t return result;\n\t };\n\n\t var floor = Math.floor;\n\n\t var highSurrogate = function highSurrogate(codePoint) {\n\t return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10);\n\t };\n\n\t var lowSurrogate = function lowSurrogate(codePoint) {\n\t return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10);\n\t };\n\n\t var stringFromCharCode = String.fromCharCode;\n\n\t var codePointToString = function codePointToString(codePoint) {\n\t var string;\n\n\t if (codePoint == 0x09) {\n\t string = '\\\\t';\n\t } else if (codePoint == 0x0A) {\n\t string = '\\\\n';\n\t } else if (codePoint == 0x0C) {\n\t string = '\\\\f';\n\t } else if (codePoint == 0x0D) {\n\t string = '\\\\r';\n\t } else if (codePoint == 0x2D) {\n\t string = '\\\\x2D';\n\t } else if (codePoint == 0x5C) {\n\t string = '\\\\\\\\';\n\t } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2E || codePoint == 0x2F || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) {\n\t string = '\\\\' + stringFromCharCode(codePoint);\n\t } else if (codePoint >= 0x20 && codePoint <= 0x7E) {\n\t string = stringFromCharCode(codePoint);\n\t } else if (codePoint <= 0xFF) {\n\t string = '\\\\x' + pad(hex(codePoint), 2);\n\t } else {\n\t string = \"\\\\u\" + pad(hex(codePoint), 4);\n\t }\n\n\t return string;\n\t };\n\n\t var codePointToStringUnicode = function codePointToStringUnicode(codePoint) {\n\t if (codePoint <= 0xFFFF) {\n\t return codePointToString(codePoint);\n\t }\n\n\t return \"\\\\u{\" + codePoint.toString(16).toUpperCase() + '}';\n\t };\n\n\t var symbolToCodePoint = function symbolToCodePoint(symbol) {\n\t var length = symbol.length;\n\t var first = symbol.charCodeAt(0);\n\t var second;\n\n\t if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1) {\n\t second = symbol.charCodeAt(1);\n\t return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000;\n\t }\n\n\t return first;\n\t };\n\n\t var createBMPCharacterClasses = function createBMPCharacterClasses(data) {\n\t var result = '';\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t if (dataIsSingleton(data)) {\n\t return codePointToString(data[0]);\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start == end) {\n\t result += codePointToString(start);\n\t } else if (start + 1 == end) {\n\t result += codePointToString(start) + codePointToString(end);\n\t } else {\n\t result += codePointToString(start) + '-' + codePointToString(end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return '[' + result + ']';\n\t };\n\n\t var createUnicodeCharacterClasses = function createUnicodeCharacterClasses(data) {\n\t var result = '';\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t if (dataIsSingleton(data)) {\n\t return codePointToStringUnicode(data[0]);\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start == end) {\n\t result += codePointToStringUnicode(start);\n\t } else if (start + 1 == end) {\n\t result += codePointToStringUnicode(start) + codePointToStringUnicode(end);\n\t } else {\n\t result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return '[' + result + ']';\n\t };\n\n\t var splitAtBMP = function splitAtBMP(data) {\n\t var loneHighSurrogates = [];\n\t var loneLowSurrogates = [];\n\t var bmp = [];\n\t var astral = [];\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start < HIGH_SURROGATE_MIN) {\n\t if (end < HIGH_SURROGATE_MIN) {\n\t bmp.push(start, end + 1);\n\t }\n\n\t if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t bmp.push(start, HIGH_SURROGATE_MIN);\n\t loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);\n\t }\n\n\t if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t bmp.push(start, HIGH_SURROGATE_MIN);\n\t loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t }\n\n\t if (end > LOW_SURROGATE_MAX) {\n\t bmp.push(start, HIGH_SURROGATE_MIN);\n\t loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\n\t if (end <= 0xFFFF) {\n\t bmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t } else {\n\t bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t }\n\t } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {\n\t if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t loneHighSurrogates.push(start, end + 1);\n\t }\n\n\t if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t }\n\n\t if (end > LOW_SURROGATE_MAX) {\n\t loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\n\t if (end <= 0xFFFF) {\n\t bmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t } else {\n\t bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t }\n\t } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {\n\t if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t loneLowSurrogates.push(start, end + 1);\n\t }\n\n\t if (end > LOW_SURROGATE_MAX) {\n\t loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);\n\n\t if (end <= 0xFFFF) {\n\t bmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t } else {\n\t bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t }\n\t } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {\n\t if (end <= 0xFFFF) {\n\t bmp.push(start, end + 1);\n\t } else {\n\t bmp.push(start, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t } else {\n\t astral.push(start, end + 1);\n\t }\n\n\t index += 2;\n\t }\n\n\t return {\n\t 'loneHighSurrogates': loneHighSurrogates,\n\t 'loneLowSurrogates': loneLowSurrogates,\n\t 'bmp': bmp,\n\t 'astral': astral\n\t };\n\t };\n\n\t var optimizeSurrogateMappings = function optimizeSurrogateMappings(surrogateMappings) {\n\t var result = [];\n\t var tmpLow = [];\n\t var addLow = false;\n\t var mapping;\n\t var nextMapping;\n\t var highSurrogates;\n\t var lowSurrogates;\n\t var nextHighSurrogates;\n\t var nextLowSurrogates;\n\t var index = -1;\n\t var length = surrogateMappings.length;\n\n\t while (++index < length) {\n\t mapping = surrogateMappings[index];\n\t nextMapping = surrogateMappings[index + 1];\n\n\t if (!nextMapping) {\n\t result.push(mapping);\n\t continue;\n\t }\n\n\t highSurrogates = mapping[0];\n\t lowSurrogates = mapping[1];\n\t nextHighSurrogates = nextMapping[0];\n\t nextLowSurrogates = nextMapping[1];\n\t tmpLow = lowSurrogates;\n\n\t while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) {\n\t if (dataIsSingleton(nextLowSurrogates)) {\n\t tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);\n\t } else {\n\t tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1);\n\t }\n\n\t ++index;\n\t mapping = surrogateMappings[index];\n\t highSurrogates = mapping[0];\n\t lowSurrogates = mapping[1];\n\t nextMapping = surrogateMappings[index + 1];\n\t nextHighSurrogates = nextMapping && nextMapping[0];\n\t nextLowSurrogates = nextMapping && nextMapping[1];\n\t addLow = true;\n\t }\n\n\t result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]);\n\t addLow = false;\n\t }\n\n\t return optimizeByLowSurrogates(result);\n\t };\n\n\t var optimizeByLowSurrogates = function optimizeByLowSurrogates(surrogateMappings) {\n\t if (surrogateMappings.length == 1) {\n\t return surrogateMappings;\n\t }\n\n\t var index = -1;\n\t var innerIndex = -1;\n\n\t while (++index < surrogateMappings.length) {\n\t var mapping = surrogateMappings[index];\n\t var lowSurrogates = mapping[1];\n\t var lowSurrogateStart = lowSurrogates[0];\n\t var lowSurrogateEnd = lowSurrogates[1];\n\t innerIndex = index;\n\n\t while (++innerIndex < surrogateMappings.length) {\n\t var otherMapping = surrogateMappings[innerIndex];\n\t var otherLowSurrogates = otherMapping[1];\n\t var otherLowSurrogateStart = otherLowSurrogates[0];\n\t var otherLowSurrogateEnd = otherLowSurrogates[1];\n\n\t if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd && otherLowSurrogates.length === 2) {\n\t if (dataIsSingleton(otherMapping[0])) {\n\t mapping[0] = dataAdd(mapping[0], otherMapping[0][0]);\n\t } else {\n\t mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1);\n\t }\n\n\t surrogateMappings.splice(innerIndex, 1);\n\t --innerIndex;\n\t }\n\t }\n\t }\n\n\t return surrogateMappings;\n\t };\n\n\t var surrogateSet = function surrogateSet(data) {\n\t if (!data.length) {\n\t return [];\n\t }\n\n\t var index = 0;\n\t var start;\n\t var end;\n\t var startHigh;\n\t var startLow;\n\t var endHigh;\n\t var endLow;\n\t var surrogateMappings = [];\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\t startHigh = highSurrogate(start);\n\t startLow = lowSurrogate(start);\n\t endHigh = highSurrogate(end);\n\t endLow = lowSurrogate(end);\n\t var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;\n\t var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;\n\t var complete = false;\n\n\t if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) {\n\t surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]);\n\t complete = true;\n\t } else {\n\t surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]);\n\t }\n\n\t if (!complete && startHigh + 1 < endHigh) {\n\t if (endsWithHighestLowSurrogate) {\n\t surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);\n\t complete = true;\n\t } else {\n\t surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]);\n\t }\n\t }\n\n\t if (!complete) {\n\t surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);\n\t }\n\n\t index += 2;\n\t }\n\n\t return optimizeSurrogateMappings(surrogateMappings);\n\t };\n\n\t var createSurrogateCharacterClasses = function createSurrogateCharacterClasses(surrogateMappings) {\n\t var result = [];\n\t forEach(surrogateMappings, function (surrogateMapping) {\n\t var highSurrogates = surrogateMapping[0];\n\t var lowSurrogates = surrogateMapping[1];\n\t result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates));\n\t });\n\t return result.join('|');\n\t };\n\n\t var createCharacterClassesFromData = function createCharacterClassesFromData(data, bmpOnly, hasUnicodeFlag) {\n\t if (hasUnicodeFlag) {\n\t return createUnicodeCharacterClasses(data);\n\t }\n\n\t var result = [];\n\t var parts = splitAtBMP(data);\n\t var loneHighSurrogates = parts.loneHighSurrogates;\n\t var loneLowSurrogates = parts.loneLowSurrogates;\n\t var bmp = parts.bmp;\n\t var astral = parts.astral;\n\t var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);\n\t var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);\n\t var surrogateMappings = surrogateSet(astral);\n\n\t if (bmpOnly) {\n\t bmp = dataAddData(bmp, loneHighSurrogates);\n\t hasLoneHighSurrogates = false;\n\t bmp = dataAddData(bmp, loneLowSurrogates);\n\t hasLoneLowSurrogates = false;\n\t }\n\n\t if (!dataIsEmpty(bmp)) {\n\t result.push(createBMPCharacterClasses(bmp));\n\t }\n\n\t if (surrogateMappings.length) {\n\t result.push(createSurrogateCharacterClasses(surrogateMappings));\n\t }\n\n\t if (hasLoneHighSurrogates) {\n\t result.push(createBMPCharacterClasses(loneHighSurrogates) + \"(?![\\\\uDC00-\\\\uDFFF])\");\n\t }\n\n\t if (hasLoneLowSurrogates) {\n\t result.push(\"(?:[^\\\\uD800-\\\\uDBFF]|^)\" + createBMPCharacterClasses(loneLowSurrogates));\n\t }\n\n\t return result.join('|');\n\t };\n\n\t var regenerate = function regenerate(value) {\n\t if (arguments.length > 1) {\n\t value = slice.call(arguments);\n\t }\n\n\t if (this instanceof regenerate) {\n\t this.data = [];\n\t return value ? this.add(value) : this;\n\t }\n\n\t return new regenerate().add(value);\n\t };\n\n\t regenerate.version = '1.4.2';\n\t var proto = regenerate.prototype;\n\t extend(proto, {\n\t 'add': function add(value) {\n\t var $this = this;\n\n\t if (value == null) {\n\t return $this;\n\t }\n\n\t if (value instanceof regenerate) {\n\t $this.data = dataAddData($this.data, value.data);\n\t return $this;\n\t }\n\n\t if (arguments.length > 1) {\n\t value = slice.call(arguments);\n\t }\n\n\t if (isArray(value)) {\n\t forEach(value, function (item) {\n\t $this.add(item);\n\t });\n\t return $this;\n\t }\n\n\t $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value));\n\t return $this;\n\t },\n\t 'remove': function remove(value) {\n\t var $this = this;\n\n\t if (value == null) {\n\t return $this;\n\t }\n\n\t if (value instanceof regenerate) {\n\t $this.data = dataRemoveData($this.data, value.data);\n\t return $this;\n\t }\n\n\t if (arguments.length > 1) {\n\t value = slice.call(arguments);\n\t }\n\n\t if (isArray(value)) {\n\t forEach(value, function (item) {\n\t $this.remove(item);\n\t });\n\t return $this;\n\t }\n\n\t $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value));\n\t return $this;\n\t },\n\t 'addRange': function addRange(start, end) {\n\t var $this = this;\n\t $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end));\n\t return $this;\n\t },\n\t 'removeRange': function removeRange(start, end) {\n\t var $this = this;\n\t var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);\n\t var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);\n\t $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint);\n\t return $this;\n\t },\n\t 'intersection': function intersection(argument) {\n\t var $this = this;\n\t var array = argument instanceof regenerate ? dataToArray(argument.data) : argument;\n\t $this.data = dataIntersection($this.data, array);\n\t return $this;\n\t },\n\t 'contains': function contains(codePoint) {\n\t return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint));\n\t },\n\t 'clone': function clone() {\n\t var set = new regenerate();\n\t set.data = this.data.slice(0);\n\t return set;\n\t },\n\t 'toString': function toString(options) {\n\t var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false);\n\n\t if (!result) {\n\t return '[]';\n\t }\n\n\t return result.replace(regexNull, '\\\\0$1');\n\t },\n\t 'toRegExp': function toRegExp(flags) {\n\t var pattern = this.toString(flags && flags.indexOf('u') != -1 ? {\n\t 'hasUnicodeFlag': true\n\t } : null);\n\t return RegExp(pattern, flags || '');\n\t },\n\t 'valueOf': function valueOf() {\n\t return dataToArray(this.data);\n\t }\n\t });\n\t proto.toArray = proto.valueOf;\n\n\t if (freeExports && !freeExports.nodeType) {\n\t if (freeModule) {\n\t freeModule.exports = regenerate;\n\t } else {\n\t freeExports.regenerate = regenerate;\n\t }\n\t } else {\n\t root.regenerate = regenerate;\n\t }\n\t })(commonjsGlobal);\n\t}, \"/$$rollup_base$$/node_modules/regenerate\");\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Alphabetic.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x345, 0x37F, 0x386, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x9B2, 0x9CE, 0x9D7, 0x9FC, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xD4E, 0xDBD, 0xDD6, 0xE4D, 0xE84, 0xEA5, 0xEC6, 0xECD, 0xF00, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8C5, 0xA8FB, 0xA9CF, 0xAAC0, 0xAAC2, 0xFB3E, 0x10808, 0x1083C, 0x10F27, 0x110C2, 0x11176, 0x111DA, 0x111DC, 0x11237, 0x1123E, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11640, 0x11644, 0x116B8, 0x11909, 0x119E1, 0x11A9D, 0x11C40, 0x11D3A, 0x11D43, 0x11D98, 0x11FB0, 0x16FE3, 0x1BC9E, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E947, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5B0, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x657).addRange(0x659, 0x65F).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6E1, 0x6E8).addRange(0x6ED, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x710, 0x73F).addRange(0x74D, 0x7B1).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x817).addRange(0x81A, 0x82C).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x8D4, 0x8DF).addRange(0x8E3, 0x8E9).addRange(0x8F0, 0x93B).addRange(0x93D, 0x94C).addRange(0x94E, 0x950).addRange(0x955, 0x963).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8);\n\tset.addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BD, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9F0, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4C).addRange(0xA59, 0xA5C).addRange(0xA70, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE3).addRange(0xAF9, 0xAFC).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3D, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB56, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A);\n\tset.addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC00, 0xC03).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3D, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4C).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCC).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3D, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82);\n\tset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB9).addRange(0xEBB, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF81).addRange(0xF88, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1036).addRange(0x103B, 0x103F).addRange(0x1050, 0x108F).addRange(0x109A, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1713).addRange(0x171F, 0x1733).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17B3).addRange(0x17B6, 0x17C8).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E);\n\tset.addRange(0x1920, 0x192B).addRange(0x1930, 0x1938).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A61, 0x1A74).addRange(0x1ABF, 0x1AC0).addRange(0x1ACC, 0x1ACE).addRange(0x1B00, 0x1B33).addRange(0x1B35, 0x1B43).addRange(0x1B45, 0x1B4C).addRange(0x1B80, 0x1BA9).addRange(0x1BAC, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1BE7, 0x1BF1).addRange(0x1C00, 0x1C36).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1DE7, 0x1DF4).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149);\n\tset.addRange(0x2160, 0x2188).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA674, 0xA67B).addRange(0xA67F, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA805).addRange(0xA807, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FF).addRange(0xA90A, 0xA92A).addRange(0xA930, 0xA952);\n\tset.addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9B2).addRange(0xA9B4, 0xA9BF).addRange(0xA9E0, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAABE).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D);\n\tset.addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7);\n\tset.addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11045).addRange(0x11071, 0x11075).addRange(0x11082, 0x110B8).addRange(0x110D0, 0x110E8).addRange(0x11100, 0x11132).addRange(0x11144, 0x11147).addRange(0x11150, 0x11172).addRange(0x11180, 0x111BF).addRange(0x111C1, 0x111C4).addRange(0x111CE, 0x111CF).addRange(0x11200, 0x11211).addRange(0x11213, 0x11234).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112E8).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133D, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134C).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11441).addRange(0x11443, 0x11445).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114C1).addRange(0x114C4, 0x114C5);\n\tset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115BE).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x1163E).addRange(0x11680, 0x116B5).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172A).addRange(0x11740, 0x11746).addRange(0x11800, 0x11838).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193C).addRange(0x1193F, 0x11942).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119DF).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A32).addRange(0x11A35, 0x11A3E).addRange(0x11A50, 0x11A97).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C3E).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D41).addRange(0x11D46, 0x11D47).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D96).addRange(0x11EE0, 0x11EF6).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E);\n\tset.addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8);\n\tset.addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Any.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x0, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ASCII_Hex_Digit.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ASCII.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x0, 0x7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Assigned.js\", function (module, exports) {\n\t const set = regenerate(0x38C, 0x85E, 0x9B2, 0x9D7, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1940, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA7D3, 0xFB3E, 0xFDCF, 0xFEFF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x110CD, 0x11288, 0x11350, 0x11357, 0x11909, 0x11D3A, 0x11FB0, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E2FF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0, 0xE0001);\n\tset.addRange(0x0, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x600, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x82D).addRange(0x830, 0x83E).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0);\n\tset.addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9);\n\tset.addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE3A).addRange(0xE3F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5);\n\tset.addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1736).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A1B).addRange(0x1A1E, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E).addRange(0x1B80, 0x1BF3).addRange(0x1BFC, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CD0, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D);\n\tset.addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x2000, 0x2064).addRange(0x2066, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x20D0, 0x20F0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3000, 0x303F).addRange(0x3041, 0x3096).addRange(0x3099, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31F0, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1);\n\tset.addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA82C).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9).addRange(0xA8E0, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAAC2).addRange(0xAADB, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xD800, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFE19).addRange(0xFE20, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE);\n\tset.addRange(0xFFF9, 0xFFFD).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FD).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E0, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B);\n\tset.addRange(0x1091F, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F27).addRange(0x10F30, 0x10F59).addRange(0x10F70, 0x10F89).addRange(0x10FB0, 0x10FCB).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075).addRange(0x1107F, 0x110C2).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147).addRange(0x11150, 0x11176).addRange(0x11180, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1123E).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112EA);\n\tset.addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746).addRange(0x11800, 0x1183B).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4).addRange(0x11A00, 0x11A47).addRange(0x11A50, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\n\tset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF8).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x1342E).addRange(0x13430, 0x13438).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5).addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C);\n\tset.addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D1EA).addRange(0x1D200, 0x1D245).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\n\tset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C);\n\tset.addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Bidi_Control.js\", function (module, exports) {\n\t const set = regenerate(0x61C);\n\tset.addRange(0x200E, 0x200F).addRange(0x202A, 0x202E).addRange(0x2066, 0x2069);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Bidi_Mirrored.js\", function (module, exports) {\n\t const set = regenerate(0x3C, 0x3E, 0x5B, 0x5D, 0x7B, 0x7D, 0xAB, 0xBB, 0x2140, 0x2211, 0x2224, 0x2226, 0x2239, 0x2262, 0x2298, 0x27C0, 0x29B8, 0x29C9, 0x29E1, 0x2A24, 0x2A26, 0x2A29, 0x2ADC, 0x2ADE, 0x2AF3, 0x2AFD, 0x2BFE, 0xFF1C, 0xFF1E, 0xFF3B, 0xFF3D, 0xFF5B, 0xFF5D, 0x1D6DB, 0x1D715, 0x1D74F, 0x1D789, 0x1D7C3);\n\tset.addRange(0x28, 0x29).addRange(0xF3A, 0xF3D).addRange(0x169B, 0x169C).addRange(0x2039, 0x203A).addRange(0x2045, 0x2046).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2201, 0x2204).addRange(0x2208, 0x220D).addRange(0x2215, 0x2216).addRange(0x221A, 0x221D).addRange(0x221F, 0x2222).addRange(0x222B, 0x2233).addRange(0x223B, 0x224C).addRange(0x2252, 0x2255).addRange(0x225F, 0x2260).addRange(0x2264, 0x226B).addRange(0x226E, 0x228C).addRange(0x228F, 0x2292).addRange(0x22A2, 0x22A3).addRange(0x22A6, 0x22B8).addRange(0x22BE, 0x22BF).addRange(0x22C9, 0x22CD).addRange(0x22D0, 0x22D1).addRange(0x22D6, 0x22ED).addRange(0x22F0, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C3, 0x27C6).addRange(0x27C8, 0x27C9).addRange(0x27CB, 0x27CD).addRange(0x27D3, 0x27D6).addRange(0x27DC, 0x27DE).addRange(0x27E2, 0x27EF).addRange(0x2983, 0x2998).addRange(0x299B, 0x29A0).addRange(0x29A2, 0x29AF).addRange(0x29C0, 0x29C5).addRange(0x29CE, 0x29D2).addRange(0x29D4, 0x29D5).addRange(0x29D8, 0x29DC).addRange(0x29E3, 0x29E5).addRange(0x29E8, 0x29E9).addRange(0x29F4, 0x29F9).addRange(0x29FC, 0x29FD).addRange(0x2A0A, 0x2A1C).addRange(0x2A1E, 0x2A21).addRange(0x2A2B, 0x2A2E).addRange(0x2A34, 0x2A35);\n\tset.addRange(0x2A3C, 0x2A3E).addRange(0x2A57, 0x2A58).addRange(0x2A64, 0x2A65).addRange(0x2A6A, 0x2A6D).addRange(0x2A6F, 0x2A70).addRange(0x2A73, 0x2A74).addRange(0x2A79, 0x2AA3).addRange(0x2AA6, 0x2AAD).addRange(0x2AAF, 0x2AD6).addRange(0x2AE2, 0x2AE6).addRange(0x2AEC, 0x2AEE).addRange(0x2AF7, 0x2AFB).addRange(0x2E02, 0x2E05).addRange(0x2E09, 0x2E0A).addRange(0x2E0C, 0x2E0D).addRange(0x2E1C, 0x2E1D).addRange(0x2E20, 0x2E29).addRange(0x2E55, 0x2E5C).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xFE59, 0xFE5E).addRange(0xFE64, 0xFE65).addRange(0xFF08, 0xFF09).addRange(0xFF5F, 0xFF60).addRange(0xFF62, 0xFF63);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Case_Ignorable.js\", function (module, exports) {\n\t const set = regenerate(0x27, 0x2E, 0x3A, 0x5E, 0x60, 0xA8, 0xAD, 0xAF, 0xB4, 0x37A, 0x387, 0x559, 0x55F, 0x5BF, 0x5C7, 0x5F4, 0x61C, 0x640, 0x670, 0x70F, 0x711, 0x7FA, 0x7FD, 0x888, 0x93A, 0x93C, 0x94D, 0x971, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xEC6, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x10FC, 0x17C6, 0x17D7, 0x17DD, 0x1843, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1AA7, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x1D78, 0x1FBD, 0x2024, 0x2027, 0x2071, 0x207F, 0x2D6F, 0x2D7F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9CF, 0xAA43, 0xAA4C, 0xAA70, 0xAA7C, 0xAAB0, 0xAAC1, 0xAADD, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0xFE13, 0xFE52, 0xFE55, 0xFEFF, 0xFF07, 0xFF0E, 0xFF1A, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110BD, 0x110C2, 0x110CD, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x16F4F, 0x1DA75, 0x1DA84, 0x1E2AE, 0xE0001);\n\tset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x36F).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x600, 0x605).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DD).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x816, 0x82D).addRange(0x859, 0x85B).addRange(0x890, 0x891).addRange(0x898, 0x89F).addRange(0x8C9, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\n\tset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE46, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180F).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\n\tset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x200B, 0x200F).addRange(0x2018, 0x2019).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20F0).addRange(0x2C7C, 0x2C7D).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3031, 0x3035).addRange(0x3099, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69C, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xA9E5, 0xA9E6).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xAAF3, 0xAAF4).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B);\n\tset.addRange(0xFBB2, 0xFBC2).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0xFFF9, 0xFFFB).addRange(0x10376, 0x1037A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B);\n\tset.addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x13430, 0x13438).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1BC9D, 0x1BC9E).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D173, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\n\tset.addRange(0x1E130, 0x1E13D).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94B).addRange(0x1F3FB, 0x1F3FF).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Cased.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0x10780, 0x1D4A2, 0x1D4BB, 0x1D546);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149);\n\tset.addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69D).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514);\n\tset.addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E900, 0x1E943).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Casefolded.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x345, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x587, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0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2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D1).addRange(0x3D5, 0x3D6).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4);\n\tset.addRange(0x1FB7, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC7, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Casemapped.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x1BF, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1D79, 0x1D7D, 0x1D8E, 0x1E9E, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x2132, 0x214E, 0x2D27, 0x2D2D, 0xAB53);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x137).addRange(0x139, 0x18C).addRange(0x18E, 0x19A).addRange(0x19C, 0x1A9).addRange(0x1AC, 0x1B9).addRange(0x1BC, 0x1BD).addRange(0x1C4, 0x220).addRange(0x222, 0x233).addRange(0x23A, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3D1).addRange(0x3D5, 0x3F5).addRange(0x3F7, 0x3FB).addRange(0x3FD, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x561, 0x587).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E00, 0x1E9B).addRange(0x1EA0, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC);\n\tset.addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2C70).addRange(0x2C72, 0x2C73).addRange(0x2C75, 0x2C76).addRange(0x2C7E, 0x2CE3).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA72F).addRange(0xA732, 0xA76F).addRange(0xA779, 0xA787).addRange(0xA78B, 0xA78D).addRange(0xA790, 0xA794).addRange(0xA796, 0xA7AE).addRange(0xA7B0, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D6, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1E900, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Lowercased.js\", function (module, exports) {\n\t const set = regenerate(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 0x1E28, 0x1E2A, 0x1E2C, 0x1E2E, 0x1E30, 0x1E32, 0x1E34, 0x1E36, 0x1E38, 0x1E3A, 0x1E3C, 0x1E3E, 0x1E40, 0x1E42, 0x1E44, 0x1E46, 0x1E48, 0x1E4A, 0x1E4C, 0x1E4E, 0x1E50, 0x1E52, 0x1E54, 0x1E56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, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF).addRange(0x1FB8, 0x1FBC).addRange(0x1FC8, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFC).addRange(0x212A, 0x212B);\n\tset.addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_NFKC_Casefolded.js\", function (module, exports) {\n\t const set = regenerate(0xA0, 0xA8, 0xAA, 0xAD, 0xAF, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x136, 0x139, 0x13B, 0x13D, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x34F, 0x370, 0x372, 0x374, 0x376, 0x37A, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0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0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0x2D6F, 0x2E9F, 0x2EF3, 0x3000, 0x3036, 0x309F, 0x30FF, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA770, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xAB69, 0xFA10, 0xFA12, 0xFA20, 0xFA22, 0xFB1D, 0xFB3E, 0xFE74, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F190);\n\tset.addRange(0x41, 0x5A).addRange(0xB2, 0xB5).addRange(0xB8, 0xBA).addRange(0xBC, 0xBE).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x132, 0x134).addRange(0x13F, 0x141).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1CD).addRange(0x1F1, 0x1F4).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x2B0, 0x2B8).addRange(0x2D8, 0x2DD).addRange(0x2E0, 0x2E4).addRange(0x340, 0x341).addRange(0x343, 0x345).addRange(0x37E, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D6).addRange(0x3F0, 0x3F2).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x675, 0x678).addRange(0x958, 0x95F).addRange(0x9DC, 0x9DD).addRange(0xA59, 0xA5B).addRange(0xB5C, 0xB5D).addRange(0xEDC, 0xEDD);\n\tset.addRange(0xF75, 0xF79).addRange(0x10A0, 0x10C5).addRange(0x115F, 0x1160).addRange(0x13F8, 0x13FD).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D2C, 0x1D2E).addRange(0x1D30, 0x1D3A).addRange(0x1D3C, 0x1D4D).addRange(0x1D4F, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4).addRange(0x1FB7, 0x1FC4).addRange(0x1FC7, 0x1FCF).addRange(0x1FD8, 0x1FDB).addRange(0x1FDD, 0x1FDF).addRange(0x1FE8, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFE).addRange(0x2000, 0x200F).addRange(0x2024, 0x2026).addRange(0x202A, 0x202F).addRange(0x2033, 0x2034).addRange(0x2036, 0x2037).addRange(0x2047, 0x2049).addRange(0x205F, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x2100, 0x2103).addRange(0x2105, 0x2107).addRange(0x2109, 0x2113).addRange(0x2115, 0x2116).addRange(0x2119, 0x211D).addRange(0x2120, 0x2122).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213B, 0x2140).addRange(0x2145, 0x2149).addRange(0x2150, 0x217F).addRange(0x222C, 0x222D);\n\tset.addRange(0x222F, 0x2230).addRange(0x2329, 0x232A).addRange(0x2460, 0x24EA).addRange(0x2A74, 0x2A76).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7C, 0x2C80).addRange(0x2F00, 0x2FD5).addRange(0x3038, 0x303A).addRange(0x309B, 0x309C).addRange(0x3131, 0x318E).addRange(0x3192, 0x319F).addRange(0x3200, 0x321E).addRange(0x3220, 0x3247).addRange(0x3250, 0x327E).addRange(0x3280, 0x33FF).addRange(0xA69C, 0xA69D).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xA7F2, 0xA7F5).addRange(0xA7F8, 0xA7F9).addRange(0xAB5C, 0xAB5F).addRange(0xAB70, 0xABBF).addRange(0xF900, 0xFA0D).addRange(0xFA15, 0xFA1E).addRange(0xFA25, 0xFA26).addRange(0xFA2A, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFC).addRange(0xFE00, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE72).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7);\n\tset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF0, 0xFFF8).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10781, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D15E, 0x1D164).addRange(0x1D173, 0x1D17A).addRange(0x1D1BB, 0x1D1C0).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E900, 0x1E921).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72);\n\tset.addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F100, 0x1F10A).addRange(0x1F110, 0x1F12E).addRange(0x1F130, 0x1F14F).addRange(0x1F16A, 0x1F16C).addRange(0x1F200, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1FBF0, 0x1FBF9).addRange(0x2F800, 0x2FA1D).addRange(0xE0000, 0xE0FFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Titlecased.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1C4, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491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xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C6, 0x1C7).addRange(0x1C9, 0x1CA).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F1).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4);\n\tset.addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Uppercased.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4B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 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C5, 0x1C6).addRange(0x1C8, 0x1C9).addRange(0x1CB, 0x1CC).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x1F2, 0x1F3).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7);\n\tset.addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Dash.js\", function (module, exports) {\n\t const set = regenerate(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2053, 0x207B, 0x208B, 0x2212, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\n\tset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Default_Ignorable_Code_Point.js\", function (module, exports) {\n\t const set = regenerate(0xAD, 0x34F, 0x61C, 0x3164, 0xFEFF, 0xFFA0);\n\tset.addRange(0x115F, 0x1160).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0xFE00, 0xFE0F).addRange(0xFFF0, 0xFFF8).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0000, 0xE0FFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Deprecated.js\", function (module, exports) {\n\t const set = regenerate(0x149, 0x673, 0xF77, 0xF79, 0xE0001);\n\tset.addRange(0x17A3, 0x17A4).addRange(0x206A, 0x206F).addRange(0x2329, 0x232A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Diacritic.js\", function (module, exports) {\n\t const set = regenerate(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0x37A, 0x559, 0x5BF, 0x5C4, 0x93C, 0x94D, 0x971, 0x9BC, 0x9CD, 0xA3C, 0xA4D, 0xABC, 0xACD, 0xB3C, 0xB4D, 0xB55, 0xBCD, 0xC3C, 0xC4D, 0xCBC, 0xCCD, 0xD4D, 0xDCA, 0xE4E, 0xEBA, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1037, 0x108F, 0x17DD, 0x1A7F, 0x1B34, 0x1B44, 0x1CED, 0x1CF4, 0x1FBD, 0x2E2F, 0x30FC, 0xA66F, 0xA67F, 0xA8C4, 0xA953, 0xA9B3, 0xA9C0, 0xA9E5, 0xAAF6, 0xFB1E, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x102E0, 0x11046, 0x11070, 0x11173, 0x111C0, 0x1133C, 0x1134D, 0x11442, 0x11446, 0x1163F, 0x1172B, 0x11943, 0x119E0, 0x11A34, 0x11A47, 0x11A99, 0x11C3F, 0x11D42, 0x11D97, 0x1E2AE);\n\tset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x34E).addRange(0x350, 0x357).addRange(0x35D, 0x362).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x487).addRange(0x591, 0x5A1).addRange(0x5A3, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x64B, 0x652).addRange(0x657, 0x658).addRange(0x6DF, 0x6E0).addRange(0x6E5, 0x6E6).addRange(0x6EA, 0x6EC).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x818, 0x819).addRange(0x898, 0x89F).addRange(0x8C9, 0x8D2).addRange(0x8E3, 0x8FE).addRange(0x951, 0x954).addRange(0xAFD, 0xAFF).addRange(0xD3B, 0xD3C).addRange(0xE47, 0xE4C).addRange(0xEC8, 0xECC).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF82, 0xF84).addRange(0xF86, 0xF87).addRange(0x1039, 0x103A).addRange(0x1063, 0x1064).addRange(0x1069, 0x106D).addRange(0x1087, 0x108D).addRange(0x109A, 0x109B).addRange(0x135D, 0x135F).addRange(0x1714, 0x1715).addRange(0x17C9, 0x17D3).addRange(0x1939, 0x193B).addRange(0x1A75, 0x1A7C).addRange(0x1AB0, 0x1ABE).addRange(0x1AC1, 0x1ACB).addRange(0x1B6B, 0x1B73).addRange(0x1BAA, 0x1BAB).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1DC4, 0x1DCF);\n\tset.addRange(0x1DF5, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x2CEF, 0x2CF1).addRange(0x302A, 0x302F).addRange(0x3099, 0x309C).addRange(0xA67C, 0xA67D).addRange(0xA69C, 0xA69D).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F8, 0xA7F9).addRange(0xA8E0, 0xA8F1).addRange(0xA92B, 0xA92E).addRange(0xAA7B, 0xAA7D).addRange(0xAABF, 0xAAC2).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B).addRange(0xABEC, 0xABED).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10AE5, 0x10AE6).addRange(0x10D22, 0x10D27).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x110B9, 0x110BA).addRange(0x11133, 0x11134).addRange(0x111CA, 0x111CC).addRange(0x11235, 0x11236).addRange(0x112E9, 0x112EA).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x114C2, 0x114C3).addRange(0x115BF, 0x115C0).addRange(0x116B6, 0x116B7).addRange(0x11839, 0x1183A).addRange(0x1193D, 0x1193E).addRange(0x11D44, 0x11D45).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F9F).addRange(0x16FF0, 0x16FF1).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE);\n\tset.addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E946).addRange(0x1E948, 0x1E94A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Component.js\", function (module, exports) {\n\t const set = regenerate(0x23, 0x2A, 0x200D, 0x20E3, 0xFE0F);\n\tset.addRange(0x30, 0x39).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F3FB, 0x1F3FF).addRange(0x1F9B0, 0x1F9B3).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Modifier_Base.js\", function (module, exports) {\n\t const set = regenerate(0x261D, 0x26F9, 0x1F385, 0x1F3C7, 0x1F47C, 0x1F48F, 0x1F491, 0x1F4AA, 0x1F57A, 0x1F590, 0x1F6A3, 0x1F6C0, 0x1F6CC, 0x1F90C, 0x1F90F, 0x1F926, 0x1F977, 0x1F9BB);\n\tset.addRange(0x270A, 0x270D).addRange(0x1F3C2, 0x1F3C4).addRange(0x1F3CA, 0x1F3CC).addRange(0x1F442, 0x1F443).addRange(0x1F446, 0x1F450).addRange(0x1F466, 0x1F478).addRange(0x1F481, 0x1F483).addRange(0x1F485, 0x1F487).addRange(0x1F574, 0x1F575).addRange(0x1F595, 0x1F596).addRange(0x1F645, 0x1F647).addRange(0x1F64B, 0x1F64F).addRange(0x1F6B4, 0x1F6B6).addRange(0x1F918, 0x1F91F).addRange(0x1F930, 0x1F939).addRange(0x1F93C, 0x1F93E).addRange(0x1F9B5, 0x1F9B6).addRange(0x1F9B8, 0x1F9B9).addRange(0x1F9CD, 0x1F9CF).addRange(0x1F9D1, 0x1F9DD).addRange(0x1FAC3, 0x1FAC5).addRange(0x1FAF0, 0x1FAF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Modifier.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1F3FB, 0x1F3FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Presentation.js\", function (module, exports) {\n\t const set = regenerate(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\n\tset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DD, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji.js\", function (module, exports) {\n\t const set = regenerate(0x23, 0x2A, 0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x260E, 0x2611, 0x2618, 0x261D, 0x2620, 0x2626, 0x262A, 0x2640, 0x2642, 0x2663, 0x2668, 0x267B, 0x2699, 0x26A7, 0x26C8, 0x26D1, 0x26FD, 0x2702, 0x2705, 0x270F, 0x2712, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F21A, 0x1F22F, 0x1F587, 0x1F590, 0x1F5A8, 0x1F5BC, 0x1F5E1, 0x1F5E3, 0x1F5E8, 0x1F5EF, 0x1F5F3, 0x1F6E9, 0x1F6F0, 0x1F7F0);\n\tset.addRange(0x30, 0x39).addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2604).addRange(0x2614, 0x2615).addRange(0x2622, 0x2623).addRange(0x262E, 0x262F).addRange(0x2638, 0x263A).addRange(0x2648, 0x2653).addRange(0x265F, 0x2660).addRange(0x2665, 0x2666).addRange(0x267E, 0x267F).addRange(0x2692, 0x2697).addRange(0x269B, 0x269C).addRange(0x26A0, 0x26A1).addRange(0x26AA, 0x26AB).addRange(0x26B0, 0x26B1).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26CE, 0x26CF).addRange(0x26D3, 0x26D4).addRange(0x26E9, 0x26EA).addRange(0x26F0, 0x26F5).addRange(0x26F7, 0x26FA).addRange(0x2708, 0x270D).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2764).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F170, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F232, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F321).addRange(0x1F324, 0x1F393).addRange(0x1F396, 0x1F397).addRange(0x1F399, 0x1F39B).addRange(0x1F39E, 0x1F3F0).addRange(0x1F3F3, 0x1F3F5).addRange(0x1F3F7, 0x1F4FD);\n\tset.addRange(0x1F4FF, 0x1F53D).addRange(0x1F549, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F56F, 0x1F570).addRange(0x1F573, 0x1F57A).addRange(0x1F58A, 0x1F58D).addRange(0x1F595, 0x1F596).addRange(0x1F5A4, 0x1F5A5).addRange(0x1F5B1, 0x1F5B2).addRange(0x1F5C2, 0x1F5C4).addRange(0x1F5D1, 0x1F5D3).addRange(0x1F5DC, 0x1F5DE).addRange(0x1F5FA, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6CB, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DD, 0x1F6E5).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F3, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Extended_Pictographic.js\", function (module, exports) {\n\t const set = regenerate(0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x2388, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F12F, 0x1F18E, 0x1F21A, 0x1F22F);\n\tset.addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2605).addRange(0x2607, 0x2612).addRange(0x2614, 0x2685).addRange(0x2690, 0x2705).addRange(0x2708, 0x2712).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2767).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F000, 0x1F0FF).addRange(0x1F10D, 0x1F10F).addRange(0x1F16C, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1AD, 0x1F1E5).addRange(0x1F201, 0x1F20F).addRange(0x1F232, 0x1F23A).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F3FA).addRange(0x1F400, 0x1F53D).addRange(0x1F546, 0x1F64F).addRange(0x1F680, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D5, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8FF).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1FAFF).addRange(0x1FC00, 0x1FFFD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Extender.js\", function (module, exports) {\n\t const set = regenerate(0xB7, 0x640, 0x7FA, 0xB55, 0xE46, 0xEC6, 0x180A, 0x1843, 0x1AA7, 0x1C36, 0x1C7B, 0x3005, 0xA015, 0xA60C, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xFF70, 0x1135D, 0x11A98, 0x16FE3);\n\tset.addRange(0x2D0, 0x2D1).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xAAF3, 0xAAF4).addRange(0x10781, 0x10782).addRange(0x115C6, 0x115C8).addRange(0x16B42, 0x16B43).addRange(0x16FE0, 0x16FE1).addRange(0x1E13C, 0x1E13D).addRange(0x1E944, 0x1E946);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Grapheme_Base.js\", function (module, exports) {\n\t const set = regenerate(0x38C, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6DE, 0x6E9, 0x710, 0x7B1, 0x81A, 0x824, 0x828, 0x85E, 0x93B, 0x9B2, 0x9BD, 0x9CE, 0xA03, 0xA5E, 0xA76, 0xA83, 0xAC9, 0xAD0, 0xAF9, 0xB3D, 0xB40, 0xB83, 0xB9C, 0xBBF, 0xBD0, 0xC3D, 0xC5D, 0xD3D, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF36, 0xF38, 0xF7F, 0xF85, 0x1031, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1715, 0x17B6, 0x18AA, 0x1940, 0x1A57, 0x1A61, 0x1B3B, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CD3, 0x1CE1, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA673, 0xA7D3, 0xAA4D, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFDCF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x10EAD, 0x11000, 0x11075, 0x1112C, 0x11235, 0x11288, 0x1133D, 0x1133F, 0x11350, 0x11445, 0x1145D, 0x114B9, 0x114BE, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1183B, 0x11909, 0x1193D, 0x11A00, 0x11A50, 0x11A97, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D46, 0x11D96, 0x11D98, 0x11FB0, 0x16AF5, 0x1BC9C, 0x1BC9F, 0x1D166, 0x1D245, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E2FF, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0);\n\tset.addRange(0x20, 0x7E).addRange(0xA0, 0xAC).addRange(0xAE, 0x2FF).addRange(0x370, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x482).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x606, 0x60F).addRange(0x61D, 0x64A).addRange(0x660, 0x66F).addRange(0x671, 0x6D5).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x70D).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7C0, 0x7EA).addRange(0x7F4, 0x7FA).addRange(0x7FE, 0x815).addRange(0x830, 0x83E).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x903, 0x939).addRange(0x93D, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x950).addRange(0x958, 0x961).addRange(0x964, 0x980).addRange(0x982, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BF, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9E6, 0x9FD).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28);\n\tset.addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA40).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA6F).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC0).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE1).addRange(0xAE6, 0xAF1).addRange(0xB02, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB66, 0xB77).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xBE6, 0xBFA).addRange(0xC01, 0xC03).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC41, 0xC44).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC66, 0xC6F);\n\tset.addRange(0xC77, 0xC80).addRange(0xC82, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCBE).addRange(0xCC0, 0xCC1).addRange(0xCC3, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD02, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3F, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD4E, 0xD4F).addRange(0xD54, 0xD56).addRange(0xD58, 0xD61).addRange(0xD66, 0xD7F).addRange(0xD82, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDD0, 0xDD1).addRange(0xDD8, 0xDDE).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE3F, 0xE46).addRange(0xE4F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF17).addRange(0xF1A, 0xF34).addRange(0xF3A, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C);\n\tset.addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x102C).addRange(0x103B, 0x103C).addRange(0x103F, 0x1057).addRange(0x105A, 0x105D).addRange(0x1061, 0x1070).addRange(0x1075, 0x1081).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x108E, 0x109C).addRange(0x109E, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1360, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1734, 0x1736).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x17D4, 0x17DC).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x180A).addRange(0x1810, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5);\n\tset.addRange(0x1900, 0x191E).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A16).addRange(0x1A19, 0x1A1A).addRange(0x1A1E, 0x1A55).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1B04, 0x1B33).addRange(0x1B3D, 0x1B41).addRange(0x1B43, 0x1B4C).addRange(0x1B50, 0x1B6A).addRange(0x1B74, 0x1B7E).addRange(0x1B82, 0x1BA1).addRange(0x1BA6, 0x1BA7).addRange(0x1BAE, 0x1BE5).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1BFC, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE);\n\tset.addRange(0x2000, 0x200A).addRange(0x2010, 0x2027).addRange(0x202F, 0x205F).addRange(0x2070, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2E00, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3000, 0x3029).addRange(0x3030, 0x303F).addRange(0x3041, 0x3096).addRange(0x309B, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31F0, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67E, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA6F2, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805);\n\tset.addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA824).addRange(0xA827, 0xA82B).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C3).addRange(0xA8CE, 0xA8D9).addRange(0xA8F2, 0xA8FE).addRange(0xA900, 0xA925).addRange(0xA92E, 0xA946).addRange(0xA952, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA983, 0xA9B2).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9E4).addRange(0xA9E6, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA7B).addRange(0xAA7D, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAAEB).addRange(0xAAEE, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEC).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41);\n\tset.addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E1, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595);\n\tset.addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B).addRange(0x1091F, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A00).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A40, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE4).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D23).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F27).addRange(0x10F30, 0x10F45).addRange(0x10F51, 0x10F59).addRange(0x10F70, 0x10F81).addRange(0x10F86, 0x10F89).addRange(0x10FB0, 0x10FCB);\n\tset.addRange(0x10FE0, 0x10FF6).addRange(0x11002, 0x11037).addRange(0x11047, 0x1104D).addRange(0x11052, 0x1106F).addRange(0x11071, 0x11072).addRange(0x11082, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11103, 0x11126).addRange(0x11136, 0x11147).addRange(0x11150, 0x11172).addRange(0x11174, 0x11176).addRange(0x11182, 0x111B5).addRange(0x111BF, 0x111C8).addRange(0x111CD, 0x111CE).addRange(0x111D0, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122E).addRange(0x11232, 0x11233).addRange(0x11238, 0x1123D).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112DE).addRange(0x112E0, 0x112E2).addRange(0x112F0, 0x112F9).addRange(0x11302, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11437).addRange(0x11440, 0x11441).addRange(0x11447, 0x1145B).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114B1, 0x114B2).addRange(0x114BB, 0x114BC).addRange(0x114C4, 0x114C7).addRange(0x114D0, 0x114D9);\n\tset.addRange(0x11580, 0x115AE).addRange(0x115B0, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x115C1, 0x115DB).addRange(0x11600, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x11641, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116AA).addRange(0x116AE, 0x116AF).addRange(0x116B8, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x11720, 0x11721).addRange(0x11730, 0x11746).addRange(0x11800, 0x1182E).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x11931, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193F, 0x11942).addRange(0x11944, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x119E1, 0x119E4).addRange(0x11A0B, 0x11A32).addRange(0x11A39, 0x11A3A).addRange(0x11A3F, 0x11A46).addRange(0x11A57, 0x11A58).addRange(0x11A5C, 0x11A89).addRange(0x11A9A, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2F).addRange(0x11C40, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D93, 0x11D94);\n\tset.addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF2).addRange(0x11EF5, 0x11EF8).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B37, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F50, 0x16F87).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16D).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA);\n\tset.addRange(0x1D200, 0x1D241).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA8B).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8CF).addRange(0x1E900, 0x1E943).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F);\n\tset.addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF);\n\tset.addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Grapheme_Extend.js\", function (module, exports) {\n\t const set = regenerate(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9BE, 0x9CD, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB4D, 0xB82, 0xBBE, 0xBC0, 0xBCD, 0xBD7, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC2, 0xCC6, 0xD3E, 0xD4D, 0xD57, 0xD81, 0xDCA, 0xDCF, 0xDD6, 0xDDF, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x200C, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x112DF, 0x1133E, 0x11340, 0x11357, 0x11446, 0x1145E, 0x114B0, 0x114BA, 0x114BD, 0x115AF, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x11930, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x16F4F, 0x16FE4, 0x1D165, 0x1DA75, 0x1DA84, 0x1E2AE);\n\tset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB3E, 0xB3F).addRange(0xB41, 0xB44).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C);\n\tset.addRange(0xD41, 0xD44).addRange(0xD62, 0xD63).addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B34, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2);\n\tset.addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE);\n\tset.addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D);\n\tset.addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16E, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Hex_Digit.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF26).addRange(0xFF41, 0xFF46);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ID_Continue.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x1123E, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\n\tset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\n\tset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\n\tset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\n\tset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0);\n\tset.addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7).addRange(0xA8FD, 0xA92D);\n\tset.addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7);\n\tset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7);\n\tset.addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310);\n\tset.addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09);\n\tset.addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9D, 0x1BC9E);\n\tset.addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9);\n\tset.addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ID_Start.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x16FE3, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\n\tset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\n\tset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8);\n\tset.addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96);\n\tset.addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309B, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42);\n\tset.addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C);\n\tset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0);\n\tset.addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9);\n\tset.addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738);\n\tset.addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Ideographic.js\", function (module, exports) {\n\t const set = regenerate(0x16FE4);\n\tset.addRange(0x3006, 0x3007).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B170, 0x1B2FB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/IDS_Binary_Operator.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2FF0, 0x2FF1).addRange(0x2FF4, 0x2FFB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/IDS_Trinary_Operator.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2FF2, 0x2FF3);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Join_Control.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x200C, 0x200D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Logical_Order_Exception.js\", function (module, exports) {\n\t const set = regenerate(0x19BA, 0xAAB9);\n\tset.addRange(0xE40, 0xE44).addRange(0xEC0, 0xEC4).addRange(0x19B5, 0x19B7).addRange(0xAAB5, 0xAAB6).addRange(0xAABB, 0xAABC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Lowercase.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6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x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0x10780, 0x1D4BB, 0x1D7CB);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x37A, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1DBF).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\n\tset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2090, 0x209C).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7D).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA69B, 0xA69D).addRange(0xA72F, 0xA731).addRange(0xA76F, 0xA778).addRange(0xA793, 0xA795).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3).addRange(0x1D5EE, 0x1D607);\n\tset.addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Math.js\", function (module, exports) {\n\t const set = regenerate(0x2B, 0x5E, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3D5, 0x2016, 0x2040, 0x2044, 0x2052, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x214B, 0x21DD, 0x237C, 0x23B7, 0x23D0, 0x25E2, 0x25E4, 0x2640, 0x2642, 0xFB29, 0xFE68, 0xFF0B, 0xFF3C, 0xFF3E, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x3C, 0x3E).addRange(0x3D0, 0x3D2).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F6).addRange(0x606, 0x608).addRange(0x2032, 0x2034).addRange(0x2061, 0x2064).addRange(0x207A, 0x207E).addRange(0x208A, 0x208E).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20E6).addRange(0x20EB, 0x20EF).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x2128, 0x2129).addRange(0x212C, 0x212D).addRange(0x212F, 0x2131).addRange(0x2133, 0x2138).addRange(0x213C, 0x2149).addRange(0x2190, 0x21A7).addRange(0x21A9, 0x21AE).addRange(0x21B0, 0x21B1).addRange(0x21B6, 0x21B7).addRange(0x21BC, 0x21DB).addRange(0x21E4, 0x21E5).addRange(0x21F4, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B5).addRange(0x23DC, 0x23E2).addRange(0x25A0, 0x25A1).addRange(0x25AE, 0x25B7).addRange(0x25BC, 0x25C1).addRange(0x25C6, 0x25C7).addRange(0x25CA, 0x25CB).addRange(0x25CF, 0x25D3).addRange(0x25E7, 0x25EC).addRange(0x25F8, 0x25FF).addRange(0x2605, 0x2606).addRange(0x2660, 0x2663).addRange(0x266D, 0x266F).addRange(0x27C0, 0x27FF).addRange(0x2900, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE61, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\n\tset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Noncharacter_Code_Point.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xFDD0, 0xFDEF).addRange(0xFFFE, 0xFFFF).addRange(0x1FFFE, 0x1FFFF).addRange(0x2FFFE, 0x2FFFF).addRange(0x3FFFE, 0x3FFFF).addRange(0x4FFFE, 0x4FFFF).addRange(0x5FFFE, 0x5FFFF).addRange(0x6FFFE, 0x6FFFF).addRange(0x7FFFE, 0x7FFFF).addRange(0x8FFFE, 0x8FFFF).addRange(0x9FFFE, 0x9FFFF).addRange(0xAFFFE, 0xAFFFF).addRange(0xBFFFE, 0xBFFFF).addRange(0xCFFFE, 0xCFFFF).addRange(0xDFFFE, 0xDFFFF).addRange(0xEFFFE, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Pattern_Syntax.js\", function (module, exports) {\n\t const set = regenerate(0x60, 0xA9, 0xAE, 0xB6, 0xBB, 0xBF, 0xD7, 0xF7, 0x3030);\n\tset.addRange(0x21, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x7E).addRange(0xA1, 0xA7).addRange(0xAB, 0xAC).addRange(0xB0, 0xB1).addRange(0x2010, 0x2027).addRange(0x2030, 0x203E).addRange(0x2041, 0x2053).addRange(0x2055, 0x205E).addRange(0x2190, 0x245F).addRange(0x2500, 0x2775).addRange(0x2794, 0x2BFF).addRange(0x2E00, 0x2E7F).addRange(0x3001, 0x3003).addRange(0x3008, 0x3020).addRange(0xFD3E, 0xFD3F).addRange(0xFE45, 0xFE46);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Pattern_White_Space.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0x85);\n\tset.addRange(0x9, 0xD).addRange(0x200E, 0x200F).addRange(0x2028, 0x2029);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Quotation_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x22, 0x27, 0xAB, 0xBB, 0x2E42, 0xFF02, 0xFF07);\n\tset.addRange(0x2018, 0x201F).addRange(0x2039, 0x203A).addRange(0x300C, 0x300F).addRange(0x301D, 0x301F).addRange(0xFE41, 0xFE44).addRange(0xFF62, 0xFF63);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Radical.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Regional_Indicator.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1F1E6, 0x1F1FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Sentence_Terminal.js\", function (module, exports) {\n\t const set = regenerate(0x21, 0x2E, 0x3F, 0x589, 0x6D4, 0x7F9, 0x837, 0x839, 0x1362, 0x166E, 0x1803, 0x1809, 0x2E2E, 0x2E3C, 0x3002, 0xA4FF, 0xA6F3, 0xA6F7, 0xA92F, 0xABEB, 0xFE52, 0xFF01, 0xFF0E, 0xFF1F, 0xFF61, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x16AF5, 0x16B44, 0x16E98, 0x1BC9F, 0x1DA88);\n\tset.addRange(0x61D, 0x61F).addRange(0x700, 0x702).addRange(0x83D, 0x83E).addRange(0x964, 0x965).addRange(0x104A, 0x104B).addRange(0x1367, 0x1368).addRange(0x1735, 0x1736).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5E, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3C).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E53, 0x2E54).addRange(0xA60E, 0xA60F).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C8, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE56, 0xFE57).addRange(0x10A56, 0x10A57).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x11048).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x11239).addRange(0x1123B, 0x1123C).addRange(0x1144B, 0x1144C).addRange(0x115C2, 0x115C3).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11C41, 0x11C42).addRange(0x11EF7, 0x11EF8).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B38);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Soft_Dotted.js\", function (module, exports) {\n\t const set = regenerate(0x12F, 0x249, 0x268, 0x29D, 0x2B2, 0x3F3, 0x456, 0x458, 0x1D62, 0x1D96, 0x1DA4, 0x1DA8, 0x1E2D, 0x1ECB, 0x2071, 0x2C7C, 0x1DF1A);\n\tset.addRange(0x69, 0x6A).addRange(0x2148, 0x2149).addRange(0x1D422, 0x1D423).addRange(0x1D456, 0x1D457).addRange(0x1D48A, 0x1D48B).addRange(0x1D4BE, 0x1D4BF).addRange(0x1D4F2, 0x1D4F3).addRange(0x1D526, 0x1D527).addRange(0x1D55A, 0x1D55B).addRange(0x1D58E, 0x1D58F).addRange(0x1D5C2, 0x1D5C3).addRange(0x1D5F6, 0x1D5F7).addRange(0x1D62A, 0x1D62B).addRange(0x1D65E, 0x1D65F).addRange(0x1D692, 0x1D693);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Terminal_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x21, 0x2C, 0x2E, 0x3F, 0x37E, 0x387, 0x589, 0x5C3, 0x60C, 0x61B, 0x6D4, 0x70C, 0x85E, 0xF08, 0x166E, 0x17DA, 0x2E2E, 0x2E3C, 0x2E41, 0x2E4C, 0xA92F, 0xAADF, 0xABEB, 0xFF01, 0xFF0C, 0xFF0E, 0xFF1F, 0xFF61, 0xFF64, 0x1039F, 0x103D0, 0x10857, 0x1091F, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x11C71, 0x16AF5, 0x16B44, 0x1BC9F);\n\tset.addRange(0x3A, 0x3B).addRange(0x61D, 0x61F).addRange(0x700, 0x70A).addRange(0x7F8, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF0D, 0xF12).addRange(0x104A, 0x104B).addRange(0x1361, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x1802, 0x1805).addRange(0x1808, 0x1809).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5D, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E4E, 0x2E4F).addRange(0x2E53, 0x2E54).addRange(0x3001, 0x3002).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F3, 0xA6F7).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C7, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFF1A, 0xFF1B).addRange(0x10A56, 0x10A57).addRange(0x10AF0, 0x10AF5).addRange(0x10B3A, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x1123C).addRange(0x1144B, 0x1144D);\n\tset.addRange(0x1145A, 0x1145B).addRange(0x115C2, 0x115C5).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11AA1, 0x11AA2).addRange(0x11C41, 0x11C43).addRange(0x11EF7, 0x11EF8).addRange(0x12470, 0x12474).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B39).addRange(0x16E97, 0x16E98).addRange(0x1DA87, 0x1DA8A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Unified_Ideograph.js\", function (module, exports) {\n\t const set = regenerate(0xFA11, 0xFA1F, 0xFA21);\n\tset.addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xFA0E, 0xFA0F).addRange(0xFA13, 0xFA14).addRange(0xFA23, 0xFA24).addRange(0xFA27, 0xFA29).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Uppercase.js\", function (module, exports) {\n\t const set = regenerate(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4,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8, 0x1EDA, 0x1EDC, 0x1EDE, 0x1EE0, 0x1EE2, 0x1EE4, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2145, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2160, 0x216F);\n\tset.addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Variation_Selector.js\", function (module, exports) {\n\t const set = regenerate(0x180F);\n\tset.addRange(0x180B, 0x180D).addRange(0xFE00, 0xFE0F).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/White_Space.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0x85, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\n\tset.addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/XID_Continue.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x1123E, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\n\tset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\n\tset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\n\tset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\n\tset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0);\n\tset.addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309A).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7);\n\tset.addRange(0xA8FD, 0xA92D).addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE7F, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE);\n\tset.addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939);\n\tset.addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C);\n\tset.addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\n\tset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99);\n\tset.addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE);\n\tset.addRange(0x1E2C0, 0x1E2F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/XID_Start.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE32, 0xE84, 0xEA5, 0xEB2, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x16FE3, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\n\tset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\n\tset.addRange(0xE01, 0xE30).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E);\n\tset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE);\n\tset.addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76);\n\tset.addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE7F, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0);\n\tset.addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2);\n\tset.addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32);\n\tset.addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3);\n\tset.addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D);\n\tset.addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Cased_Letter.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0xA7FA, 0x1D4A2, 0x1D4BB, 0x1D546);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2AF).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184);\n\tset.addRange(0x2C00, 0x2C7B).addRange(0x2C7E, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA76F).addRange(0xA771, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550);\n\tset.addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E900, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Close_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x29, 0x5D, 0x7D, 0xF3B, 0xF3D, 0x169C, 0x2046, 0x207E, 0x208E, 0x2309, 0x230B, 0x232A, 0x2769, 0x276B, 0x276D, 0x276F, 0x2771, 0x2773, 0x2775, 0x27C6, 0x27E7, 0x27E9, 0x27EB, 0x27ED, 0x27EF, 0x2984, 0x2986, 0x2988, 0x298A, 0x298C, 0x298E, 0x2990, 0x2992, 0x2994, 0x2996, 0x2998, 0x29D9, 0x29DB, 0x29FD, 0x2E23, 0x2E25, 0x2E27, 0x2E29, 0x2E56, 0x2E58, 0x2E5A, 0x2E5C, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015, 0x3017, 0x3019, 0x301B, 0xFD3E, 0xFE18, 0xFE36, 0xFE38, 0xFE3A, 0xFE3C, 0xFE3E, 0xFE40, 0xFE42, 0xFE44, 0xFE48, 0xFE5A, 0xFE5C, 0xFE5E, 0xFF09, 0xFF3D, 0xFF5D, 0xFF60, 0xFF63);\n\tset.addRange(0x301E, 0x301F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Connector_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0x2054, 0xFF3F);\n\tset.addRange(0x203F, 0x2040).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Control.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Currency_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x24, 0x58F, 0x60B, 0x9FB, 0xAF1, 0xBF9, 0xE3F, 0x17DB, 0xA838, 0xFDFC, 0xFE69, 0xFF04, 0x1E2FF, 0x1ECB0);\n\tset.addRange(0xA2, 0xA5).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x20A0, 0x20C0).addRange(0xFFE0, 0xFFE1).addRange(0xFFE5, 0xFFE6).addRange(0x11FDD, 0x11FE0);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Dash_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\n\tset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Decimal_Number.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x30, 0x39).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xBE6, 0xBEF).addRange(0xC66, 0xC6F).addRange(0xCE6, 0xCEF).addRange(0xD66, 0xD6F).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF29).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x17E0, 0x17E9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19D9).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0xA620, 0xA629).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x104A0, 0x104A9).addRange(0x10D30, 0x10D39).addRange(0x11066, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x11739).addRange(0x118E0, 0x118E9).addRange(0x11950, 0x11959);\n\tset.addRange(0x11C50, 0x11C59).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E950, 0x1E959).addRange(0x1FBF0, 0x1FBF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Enclosing_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x1ABE);\n\tset.addRange(0x488, 0x489).addRange(0x20DD, 0x20E0).addRange(0x20E2, 0x20E4).addRange(0xA670, 0xA672);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Final_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0xBB, 0x2019, 0x201D, 0x203A, 0x2E03, 0x2E05, 0x2E0A, 0x2E0D, 0x2E1D, 0x2E21);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Format.js\", function (module, exports) {\n\t const set = regenerate(0xAD, 0x61C, 0x6DD, 0x70F, 0x8E2, 0x180E, 0xFEFF, 0x110BD, 0x110CD, 0xE0001);\n\tset.addRange(0x600, 0x605).addRange(0x890, 0x891).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0xFFF9, 0xFFFB).addRange(0x13430, 0x13438).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Initial_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0xAB, 0x2018, 0x201F, 0x2039, 0x2E02, 0x2E04, 0x2E09, 0x2E0C, 0x2E1C, 0x2E20);\n\tset.addRange(0x201B, 0x201C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Letter_Number.js\", function (module, exports) {\n\t const set = regenerate(0x3007, 0x10341, 0x1034A);\n\tset.addRange(0x16EE, 0x16F0).addRange(0x2160, 0x2182).addRange(0x2185, 0x2188).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0xA6E6, 0xA6EF).addRange(0x10140, 0x10174).addRange(0x103D1, 0x103D5).addRange(0x12400, 0x1246E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Letter.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x16FE3, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\n\tset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\n\tset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884);\n\tset.addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25);\n\tset.addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3006).addRange(0x3031, 0x3035).addRange(0x303B, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6E5).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28);\n\tset.addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C);\n\tset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0);\n\tset.addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3);\n\tset.addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D);\n\tset.addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Line_Separator.js\", function (module, exports) {\n\t const set = regenerate(0x2028);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Lowercase_Letter.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1E01, 0x1E03, 0x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87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0xA7FA, 0x1D4BB, 0x1D7CB);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2AF).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\n\tset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7B).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA72F, 0xA731).addRange(0xA771, 0xA778).addRange(0xA793, 0xA795).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3).addRange(0x1D5EE, 0x1D607).addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E);\n\tset.addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Mark.js\", function (module, exports) {\n\t const set = regenerate(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x9BC, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xB3C, 0xB82, 0xBD7, 0xC3C, 0xCBC, 0xD57, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x108F, 0x17DD, 0x180F, 0x18A9, 0x1A7F, 0x1CED, 0x1CF4, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9E5, 0xAA43, 0xAAB0, 0xAAC1, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11070, 0x110C2, 0x11173, 0x1123E, 0x11357, 0x1145E, 0x11940, 0x119E4, 0x11A47, 0x11D3A, 0x11D47, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E2AE);\n\tset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x903).addRange(0x93A, 0x93C).addRange(0x93E, 0x94F).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x981, 0x983).addRange(0x9BE, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CD).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA03).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA83).addRange(0xABE, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB3E, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD);\n\tset.addRange(0xC00, 0xC04).addRange(0xC3E, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xC81, 0xC83).addRange(0xCBE, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD03).addRange(0xD3B, 0xD3C).addRange(0xD3E, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4D).addRange(0xD62, 0xD63).addRange(0xD81, 0xD83).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF71, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102B, 0x103E).addRange(0x1056, 0x1059).addRange(0x105E, 0x1060).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1071, 0x1074).addRange(0x1082, 0x108D).addRange(0x109A, 0x109D).addRange(0x135D, 0x135F).addRange(0x1712, 0x1715).addRange(0x1732, 0x1734).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1A17, 0x1A1B);\n\tset.addRange(0x1A55, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B04).addRange(0x1B34, 0x1B44).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B82).addRange(0x1BA1, 0x1BAD).addRange(0x1BE6, 0x1BF3).addRange(0x1C24, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA823, 0xA827).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA953).addRange(0xA980, 0xA983).addRange(0xA9B3, 0xA9C0).addRange(0xAA29, 0xAA36).addRange(0xAA4C, 0xAA4D).addRange(0xAA7B, 0xAA7D).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEB, 0xAAEF).addRange(0xAAF5, 0xAAF6).addRange(0xABE3, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC);\n\tset.addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11000, 0x11002).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11082).addRange(0x110B0, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x11134).addRange(0x11145, 0x11146).addRange(0x11180, 0x11182).addRange(0x111B3, 0x111C0).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111CF).addRange(0x1122C, 0x11237).addRange(0x112DF, 0x112EA).addRange(0x11300, 0x11303).addRange(0x1133B, 0x1133C).addRange(0x1133E, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11435, 0x11446).addRange(0x114B0, 0x114C3).addRange(0x115AF, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11630, 0x11640).addRange(0x116AB, 0x116B7).addRange(0x1171D, 0x1172B).addRange(0x1182C, 0x1183A).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193E).addRange(0x11942, 0x11943).addRange(0x119D1, 0x119D7).addRange(0x119DA, 0x119E0).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A39).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A5B).addRange(0x11A8A, 0x11A99).addRange(0x11C2F, 0x11C36).addRange(0x11C38, 0x11C3F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45);\n\tset.addRange(0x11D8A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D97).addRange(0x11EF3, 0x11EF6).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F51, 0x16F87).addRange(0x16F8F, 0x16F92).addRange(0x16FF0, 0x16FF1).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Math_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x2B, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3F6, 0x2044, 0x2052, 0x2118, 0x214B, 0x21A0, 0x21A3, 0x21A6, 0x21AE, 0x21D2, 0x21D4, 0x237C, 0x25B7, 0x25C1, 0x266F, 0xFB29, 0xFE62, 0xFF0B, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3);\n\tset.addRange(0x3C, 0x3E).addRange(0x606, 0x608).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x2140, 0x2144).addRange(0x2190, 0x2194).addRange(0x219A, 0x219B).addRange(0x21CE, 0x21CF).addRange(0x21F4, 0x22FF).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B3).addRange(0x23DC, 0x23E1).addRange(0x25F8, 0x25FF).addRange(0x27C0, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x27FF).addRange(0x2900, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Modifier_Letter.js\", function (module, exports) {\n\t const set = regenerate(0x2EC, 0x2EE, 0x374, 0x37A, 0x559, 0x640, 0x7FA, 0x81A, 0x824, 0x828, 0x8C9, 0x971, 0xE46, 0xEC6, 0x10FC, 0x17D7, 0x1843, 0x1AA7, 0x1D78, 0x2071, 0x207F, 0x2D6F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA788, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xAB69, 0xFF70, 0x16FE3, 0x1E94B);\n\tset.addRange(0x2B0, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x6E5, 0x6E6).addRange(0x7F4, 0x7F5).addRange(0x1C78, 0x1C7D).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x2090, 0x209C).addRange(0x2C7C, 0x2C7D).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA69C, 0xA69D).addRange(0xA717, 0xA71F).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xAAF3, 0xAAF4).addRange(0xAB5C, 0xAB5F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x16B40, 0x16B43).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1E137, 0x1E13D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Modifier_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0xB8, 0x2ED, 0x375, 0x888, 0x1FBD, 0xAB5B, 0xFF3E, 0xFF40, 0xFFE3);\n\tset.addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x309B, 0x309C).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0x1F3FB, 0x1F3FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Nonspacing_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x20E1, 0x2D7F, 0xA66F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E2AE);\n\tset.addRange(0x300, 0x36F).addRange(0x483, 0x487).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\n\tset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\n\tset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231);\n\tset.addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169);\n\tset.addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Number.js\", function (module, exports) {\n\t const set = regenerate(0xB9, 0x2070, 0x2CFD, 0x3007, 0x10341, 0x1034A);\n\tset.addRange(0x30, 0x39).addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0x9F4, 0x9F9).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xB72, 0xB77).addRange(0xBE6, 0xBF2).addRange(0xC66, 0xC6F).addRange(0xC78, 0xC7E).addRange(0xCE6, 0xCEF).addRange(0xD58, 0xD5E).addRange(0xD66, 0xD78).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF33).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x1369, 0x137C).addRange(0x16EE, 0x16F0).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19DA).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x2182).addRange(0x2185, 0x2189).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F);\n\tset.addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA620, 0xA629).addRange(0xA6E6, 0xA6EF).addRange(0xA830, 0xA835).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x10107, 0x10133).addRange(0x10140, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x103D1, 0x103D5).addRange(0x104A0, 0x104A9).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x111E1, 0x111F4).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x1173B);\n\tset.addRange(0x118E0, 0x118F2).addRange(0x11950, 0x11959).addRange(0x11C50, 0x11C6C).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x11FC0, 0x11FD4).addRange(0x12400, 0x1246E).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E8C7, 0x1E8CF).addRange(0x1E950, 0x1E959).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C).addRange(0x1FBF0, 0x1FBF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Open_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x28, 0x5B, 0x7B, 0xF3A, 0xF3C, 0x169B, 0x201A, 0x201E, 0x2045, 0x207D, 0x208D, 0x2308, 0x230A, 0x2329, 0x2768, 0x276A, 0x276C, 0x276E, 0x2770, 0x2772, 0x2774, 0x27C5, 0x27E6, 0x27E8, 0x27EA, 0x27EC, 0x27EE, 0x2983, 0x2985, 0x2987, 0x2989, 0x298B, 0x298D, 0x298F, 0x2991, 0x2993, 0x2995, 0x2997, 0x29D8, 0x29DA, 0x29FC, 0x2E22, 0x2E24, 0x2E26, 0x2E28, 0x2E42, 0x2E55, 0x2E57, 0x2E59, 0x2E5B, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3016, 0x3018, 0x301A, 0x301D, 0xFD3F, 0xFE17, 0xFE35, 0xFE37, 0xFE39, 0xFE3B, 0xFE3D, 0xFE3F, 0xFE41, 0xFE43, 0xFE47, 0xFE59, 0xFE5B, 0xFE5D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F, 0xFF62);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Letter.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xBA, 0x1BB, 0x294, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xF00, 0x103F, 0x1061, 0x108E, 0x1258, 0x12C0, 0x17DC, 0x18AA, 0x1CFA, 0x3006, 0x303C, 0x309F, 0x30FF, 0xA66E, 0xA78F, 0xA7F7, 0xA8FB, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xAAF2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x1DF0A, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x1C0, 0x1C3).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C8).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x972, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39);\n\tset.addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE45).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066);\n\tset.addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x1100, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1842).addRange(0x1844, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C77).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6);\n\tset.addRange(0x2135, 0x2138).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3041, 0x3096).addRange(0x30A1, 0x30FA).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA014).addRange(0xA016, 0xA48C).addRange(0xA4D0, 0xA4F7).addRange(0xA500, 0xA60B).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA6A0, 0xA6E5).addRange(0xA7FB, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E7, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA6F).addRange(0xAA71, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADC).addRange(0xAAE0, 0xAAEA).addRange(0xAB01, 0xAB06);\n\tset.addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xABC0, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10450, 0x1049D).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\n\tset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330);\n\tset.addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16F00, 0x16F4A).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B000, 0x1B122);\n\tset.addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1E100, 0x1E12C).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Number.js\", function (module, exports) {\n\t const set = regenerate(0xB9, 0x19DA, 0x2070, 0x2189, 0x2CFD);\n\tset.addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x9F4, 0x9F9).addRange(0xB72, 0xB77).addRange(0xBF0, 0xBF2).addRange(0xC78, 0xC7E).addRange(0xD58, 0xD5E).addRange(0xD70, 0xD78).addRange(0xF2A, 0xF33).addRange(0x1369, 0x137C).addRange(0x17F0, 0x17F9).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x215F).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F).addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA830, 0xA835).addRange(0x10107, 0x10133).addRange(0x10175, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x11065).addRange(0x111E1, 0x111F4);\n\tset.addRange(0x1173A, 0x1173B).addRange(0x118EA, 0x118F2).addRange(0x11C5A, 0x11C6C).addRange(0x11FC0, 0x11FD4).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1E8C7, 0x1E8CF).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x2A, 0x2C, 0x5C, 0xA1, 0xA7, 0xBF, 0x37E, 0x387, 0x589, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x166E, 0x1CD3, 0x2053, 0x2D70, 0x2E0B, 0x2E1B, 0x2E41, 0x303D, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE19, 0xFE30, 0xFE68, 0xFF0A, 0xFF0C, 0xFF3C, 0xFF61, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\n\tset.addRange(0x21, 0x23).addRange(0x25, 0x27).addRange(0x2E, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x1805).addRange(0x1807, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2016, 0x2017).addRange(0x2020, 0x2027).addRange(0x2030, 0x2038).addRange(0x203B, 0x203E).addRange(0x2041, 0x2043).addRange(0x2047, 0x2051).addRange(0x2055, 0x205E).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E01).addRange(0x2E06, 0x2E08).addRange(0x2E0E, 0x2E16).addRange(0x2E18, 0x2E19);\n\tset.addRange(0x2E1E, 0x2E1F).addRange(0x2E2A, 0x2E2E).addRange(0x2E30, 0x2E39).addRange(0x2E3C, 0x2E3F).addRange(0x2E43, 0x2E4F).addRange(0x2E52, 0x2E54).addRange(0x3001, 0x3003).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFE10, 0xFE16).addRange(0xFE45, 0xFE46).addRange(0xFE49, 0xFE4C).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFE5F, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF07).addRange(0xFF0E, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF64, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D).addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643);\n\tset.addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0xA6, 0xA9, 0xAE, 0xB0, 0x482, 0x6DE, 0x6E9, 0x7F6, 0x9FA, 0xB70, 0xBFA, 0xC7F, 0xD4F, 0xD79, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x1940, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214A, 0x214F, 0x21D3, 0x3004, 0x3020, 0x3250, 0xA839, 0xFDCF, 0xFFE4, 0xFFE8, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1E14F, 0x1ECAC, 0x1ED2E, 0x1F7F0);\n\tset.addRange(0x58D, 0x58E).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0xBF3, 0xBF8).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2117).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x214C, 0x214D).addRange(0x218A, 0x218B).addRange(0x2195, 0x2199).addRange(0x219C, 0x219F).addRange(0x21A1, 0x21A2).addRange(0x21A4, 0x21A5).addRange(0x21A7, 0x21AD).addRange(0x21AF, 0x21CD).addRange(0x21D0, 0x21D1).addRange(0x21D5, 0x21F3).addRange(0x2300, 0x2307).addRange(0x230C, 0x231F).addRange(0x2322, 0x2328).addRange(0x232B, 0x237B).addRange(0x237D, 0x239A).addRange(0x23B4, 0x23DB).addRange(0x23E2, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9).addRange(0x2500, 0x25B6).addRange(0x25B8, 0x25C0).addRange(0x25C2, 0x25F7).addRange(0x2600, 0x266E).addRange(0x2670, 0x2767).addRange(0x2794, 0x27BF).addRange(0x2800, 0x28FF).addRange(0x2B00, 0x2B2F).addRange(0x2B45, 0x2B46).addRange(0x2B4D, 0x2B73);\n\tset.addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA837).addRange(0xAA77, 0xAA79).addRange(0xFD40, 0xFD4F).addRange(0xFDFD, 0xFDFF).addRange(0xFFED, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FDC).addRange(0x11FE1, 0x11FF1).addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83);\n\tset.addRange(0x1DA85, 0x1DA86).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F3FA).addRange(0x1F400, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other.js\", function (module, exports) {\n\t const set = regenerate(0xAD, 0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x61C, 0x6DD, 0x83F, 0x85F, 0x8E2, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x180E, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x110BD, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x1246F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FB93);\n\tset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F).addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x605).addRange(0x70E, 0x70F).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x88F, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D);\n\tset.addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7).addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF3, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xECE, 0xECF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF);\n\tset.addRange(0x169D, 0x169F).addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E).addRange(0x1737, 0x173F).addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F);\n\tset.addRange(0x244B, 0x245F).addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E).addRange(0x2D71, 0x2D7E).addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x2FFC, 0x2FFF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EF).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xF8FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF);\n\tset.addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F).addRange(0xFEFD, 0xFF00).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1).addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF).addRange(0xFFEF, 0xFFFB).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E);\n\tset.addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F).addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38).addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77).addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFF).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x1123F, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F);\n\tset.addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F).addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C).addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF).addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x1342F, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E).addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF);\n\tset.addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF).addRange(0x1B123, 0x1B14F).addRange(0x1B153, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA0, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D173, 0x1D17A).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00).addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26);\n\tset.addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF).addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DC).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D9, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA75, 0x1FA77).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA87, 0x1FA8F).addRange(0x1FAAD, 0x1FAAF).addRange(0x1FABB, 0x1FABF).addRange(0x1FAC6, 0x1FACF).addRange(0x1FADA, 0x1FADF).addRange(0x1FAE8, 0x1FAEF).addRange(0x1FAF7, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B739, 0x2B73F).addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0xE00FF).addRange(0xE01F0, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Paragraph_Separator.js\", function (module, exports) {\n\t const set = regenerate(0x2029);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Private_Use.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xE000, 0xF8FF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0x7B, 0x7D, 0xA1, 0xA7, 0xAB, 0xBB, 0xBF, 0x37E, 0x387, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x1400, 0x166E, 0x1CD3, 0x2D70, 0x3030, 0x303D, 0x30A0, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE63, 0xFE68, 0xFF3F, 0xFF5B, 0xFF5D, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x10EAD, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\n\tset.addRange(0x21, 0x23).addRange(0x25, 0x2A).addRange(0x2C, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0x5B, 0x5D).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x589, 0x58A).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xF3A, 0xF3D).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x169B, 0x169C).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2010, 0x2027).addRange(0x2030, 0x2043).addRange(0x2045, 0x2051).addRange(0x2053, 0x205E).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2308, 0x230B).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C5, 0x27C6);\n\tset.addRange(0x27E6, 0x27EF).addRange(0x2983, 0x2998).addRange(0x29D8, 0x29DB).addRange(0x29FC, 0x29FD).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E2E).addRange(0x2E30, 0x2E4F).addRange(0x2E52, 0x2E5D).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3014, 0x301F).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF0A).addRange(0xFF0C, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF3B, 0xFF3D).addRange(0xFF5F, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D);\n\tset.addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643).addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Separator.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\n\tset.addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Space_Separator.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\n\tset.addRange(0x2000, 0x200A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Spacing_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x903, 0x93B, 0x9D7, 0xA03, 0xA83, 0xAC9, 0xB3E, 0xB40, 0xB57, 0xBD7, 0xCBE, 0xD57, 0xF7F, 0x1031, 0x1038, 0x108F, 0x1715, 0x1734, 0x17B6, 0x1A55, 0x1A57, 0x1A61, 0x1B04, 0x1B35, 0x1B3B, 0x1B82, 0x1BA1, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CE1, 0x1CF7, 0xA827, 0xA983, 0xAA4D, 0xAA7B, 0xAA7D, 0xAAEB, 0xAAF5, 0xABEC, 0x11000, 0x11002, 0x11082, 0x1112C, 0x11182, 0x111CE, 0x11235, 0x11357, 0x11445, 0x114B9, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1193D, 0x11940, 0x11942, 0x119E4, 0x11A39, 0x11A97, 0x11C2F, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D96);\n\tset.addRange(0x93E, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x94F).addRange(0x982, 0x983).addRange(0x9BE, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0xA3E, 0xA40).addRange(0xABE, 0xAC0).addRange(0xACB, 0xACC).addRange(0xB02, 0xB03).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xBBE, 0xBBF).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC01, 0xC03).addRange(0xC41, 0xC44).addRange(0xC82, 0xC83).addRange(0xCC0, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCD5, 0xCD6).addRange(0xD02, 0xD03).addRange(0xD3E, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD82, 0xD83).addRange(0xDCF, 0xDD1).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xF3E, 0xF3F).addRange(0x102B, 0x102C).addRange(0x103B, 0x103C).addRange(0x1056, 0x1057).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x109A, 0x109C).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1A19, 0x1A1A).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1B3D, 0x1B41);\n\tset.addRange(0x1B43, 0x1B44).addRange(0x1BA6, 0x1BA7).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1C24, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x302E, 0x302F).addRange(0xA823, 0xA824).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C3).addRange(0xA952, 0xA953).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9C0).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAAEE, 0xAAEF).addRange(0xABE3, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEA).addRange(0x110B0, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x11145, 0x11146).addRange(0x111B3, 0x111B5).addRange(0x111BF, 0x111C0).addRange(0x1122C, 0x1122E).addRange(0x11232, 0x11233).addRange(0x112E0, 0x112E2).addRange(0x11302, 0x11303).addRange(0x1133E, 0x1133F).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11435, 0x11437).addRange(0x11440, 0x11441).addRange(0x114B0, 0x114B2).addRange(0x114BB, 0x114BE).addRange(0x115AF, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x11630, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x116AE, 0x116AF).addRange(0x11720, 0x11721).addRange(0x1182C, 0x1182E).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x119D1, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x11A57, 0x11A58).addRange(0x11D8A, 0x11D8E);\n\tset.addRange(0x11D93, 0x11D94).addRange(0x11EF5, 0x11EF6).addRange(0x16F51, 0x16F87).addRange(0x16FF0, 0x16FF1).addRange(0x1D165, 0x1D166).addRange(0x1D16D, 0x1D172);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Surrogate.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xD800, 0xDFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x24, 0x2B, 0x5E, 0x60, 0x7C, 0x7E, 0xAC, 0xB4, 0xB8, 0xD7, 0xF7, 0x2ED, 0x375, 0x3F6, 0x482, 0x60B, 0x6DE, 0x6E9, 0x7F6, 0x888, 0xAF1, 0xB70, 0xC7F, 0xD4F, 0xD79, 0xE3F, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x17DB, 0x1940, 0x1FBD, 0x2044, 0x2052, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214F, 0x3004, 0x3020, 0x3250, 0xAB5B, 0xFB29, 0xFDCF, 0xFE62, 0xFE69, 0xFF04, 0xFF0B, 0xFF3E, 0xFF40, 0xFF5C, 0xFF5E, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3, 0x1E14F, 0x1E2FF, 0x1ECAC, 0x1ECB0, 0x1ED2E, 0x1F7F0);\n\tset.addRange(0x3C, 0x3E).addRange(0xA2, 0xA6).addRange(0xA8, 0xA9).addRange(0xAE, 0xB1).addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x58D, 0x58F).addRange(0x606, 0x608).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x9FA, 0x9FB).addRange(0xBF3, 0xBFA).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2118).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x2140, 0x2144).addRange(0x214A, 0x214D).addRange(0x218A, 0x218B).addRange(0x2190, 0x2307).addRange(0x230C, 0x2328).addRange(0x232B, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9);\n\tset.addRange(0x2500, 0x2767).addRange(0x2794, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x309B, 0x309C).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA839).addRange(0xAA77, 0xAA79).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0xFD40, 0xFD4F).addRange(0xFDFC, 0xFDFF).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FF1);\n\tset.addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA86).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7);\n\tset.addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Titlecase_Letter.js\", function (module, exports) {\n\t const set = regenerate(0x1C5, 0x1C8, 0x1CB, 0x1F2, 0x1FBC, 0x1FCC, 0x1FFC);\n\tset.addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Unassigned.js\", function (module, exports) {\n\t const set = regenerate(0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x70E, 0x83F, 0x85F, 0x88F, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x2065, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFF00, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x1246F, 0x1342F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FB93);\n\tset.addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x5FF).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x892, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D).addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7);\n\tset.addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF3, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xECE, 0xECF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF).addRange(0x169D, 0x169F).addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E);\n\tset.addRange(0x1737, 0x173F).addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F).addRange(0x244B, 0x245F).addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E);\n\tset.addRange(0x2D71, 0x2D7E).addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x2FFC, 0x2FFF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EF).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xD7FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF).addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F).addRange(0xFEFD, 0xFEFE).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1);\n\tset.addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF).addRange(0xFFEF, 0xFFF8).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E).addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F).addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38);\n\tset.addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77).addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFF).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CC).addRange(0x110CE, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x1123F, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F).addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F).addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C);\n\tset.addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF).addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x13439, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E).addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF).addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF).addRange(0x1B123, 0x1B14F);\n\tset.addRange(0x1B153, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA4, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00).addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26).addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF);\n\tset.addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DC).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D9, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA75, 0x1FA77).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA87, 0x1FA8F).addRange(0x1FAAD, 0x1FAAF).addRange(0x1FABB, 0x1FABF).addRange(0x1FAC6, 0x1FACF).addRange(0x1FADA, 0x1FADF).addRange(0x1FAE8, 0x1FAEF).addRange(0x1FAF7, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B739, 0x2B73F).addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0xE0000).addRange(0xE0002, 0xE001F).addRange(0xE0080, 0xE00FF).addRange(0xE01F0, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Uppercase_Letter.js\", function (module, exports) {\n\t const set = regenerate(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 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x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2C00, 0x2C2F);\n\tset.addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/index.js\", function (module, exports) {\n\t module.exports = new Map([\n\t\t['General_Category', [\n\t\t\t'Cased_Letter',\n\t\t\t'Close_Punctuation',\n\t\t\t'Connector_Punctuation',\n\t\t\t'Control',\n\t\t\t'Currency_Symbol',\n\t\t\t'Dash_Punctuation',\n\t\t\t'Decimal_Number',\n\t\t\t'Enclosing_Mark',\n\t\t\t'Final_Punctuation',\n\t\t\t'Format',\n\t\t\t'Initial_Punctuation',\n\t\t\t'Letter',\n\t\t\t'Letter_Number',\n\t\t\t'Line_Separator',\n\t\t\t'Lowercase_Letter',\n\t\t\t'Mark',\n\t\t\t'Math_Symbol',\n\t\t\t'Modifier_Letter',\n\t\t\t'Modifier_Symbol',\n\t\t\t'Nonspacing_Mark',\n\t\t\t'Number',\n\t\t\t'Open_Punctuation',\n\t\t\t'Other',\n\t\t\t'Other_Letter',\n\t\t\t'Other_Number',\n\t\t\t'Other_Punctuation',\n\t\t\t'Other_Symbol',\n\t\t\t'Paragraph_Separator',\n\t\t\t'Private_Use',\n\t\t\t'Punctuation',\n\t\t\t'Separator',\n\t\t\t'Space_Separator',\n\t\t\t'Spacing_Mark',\n\t\t\t'Surrogate',\n\t\t\t'Symbol',\n\t\t\t'Titlecase_Letter',\n\t\t\t'Unassigned',\n\t\t\t'Uppercase_Letter'\n\t\t]],\n\t\t['Script', [\n\t\t\t'Adlam',\n\t\t\t'Ahom',\n\t\t\t'Anatolian_Hieroglyphs',\n\t\t\t'Arabic',\n\t\t\t'Armenian',\n\t\t\t'Avestan',\n\t\t\t'Balinese',\n\t\t\t'Bamum',\n\t\t\t'Bassa_Vah',\n\t\t\t'Batak',\n\t\t\t'Bengali',\n\t\t\t'Bhaiksuki',\n\t\t\t'Bopomofo',\n\t\t\t'Brahmi',\n\t\t\t'Braille',\n\t\t\t'Buginese',\n\t\t\t'Buhid',\n\t\t\t'Canadian_Aboriginal',\n\t\t\t'Carian',\n\t\t\t'Caucasian_Albanian',\n\t\t\t'Chakma',\n\t\t\t'Cham',\n\t\t\t'Cherokee',\n\t\t\t'Chorasmian',\n\t\t\t'Common',\n\t\t\t'Coptic',\n\t\t\t'Cuneiform',\n\t\t\t'Cypriot',\n\t\t\t'Cypro_Minoan',\n\t\t\t'Cyrillic',\n\t\t\t'Deseret',\n\t\t\t'Devanagari',\n\t\t\t'Dives_Akuru',\n\t\t\t'Dogra',\n\t\t\t'Duployan',\n\t\t\t'Egyptian_Hieroglyphs',\n\t\t\t'Elbasan',\n\t\t\t'Elymaic',\n\t\t\t'Ethiopic',\n\t\t\t'Georgian',\n\t\t\t'Glagolitic',\n\t\t\t'Gothic',\n\t\t\t'Grantha',\n\t\t\t'Greek',\n\t\t\t'Gujarati',\n\t\t\t'Gunjala_Gondi',\n\t\t\t'Gurmukhi',\n\t\t\t'Han',\n\t\t\t'Hangul',\n\t\t\t'Hanifi_Rohingya',\n\t\t\t'Hanunoo',\n\t\t\t'Hatran',\n\t\t\t'Hebrew',\n\t\t\t'Hiragana',\n\t\t\t'Imperial_Aramaic',\n\t\t\t'Inherited',\n\t\t\t'Inscriptional_Pahlavi',\n\t\t\t'Inscriptional_Parthian',\n\t\t\t'Javanese',\n\t\t\t'Kaithi',\n\t\t\t'Kannada',\n\t\t\t'Katakana',\n\t\t\t'Kayah_Li',\n\t\t\t'Kharoshthi',\n\t\t\t'Khitan_Small_Script',\n\t\t\t'Khmer',\n\t\t\t'Khojki',\n\t\t\t'Khudawadi',\n\t\t\t'Lao',\n\t\t\t'Latin',\n\t\t\t'Lepcha',\n\t\t\t'Limbu',\n\t\t\t'Linear_A',\n\t\t\t'Linear_B',\n\t\t\t'Lisu',\n\t\t\t'Lycian',\n\t\t\t'Lydian',\n\t\t\t'Mahajani',\n\t\t\t'Makasar',\n\t\t\t'Malayalam',\n\t\t\t'Mandaic',\n\t\t\t'Manichaean',\n\t\t\t'Marchen',\n\t\t\t'Masaram_Gondi',\n\t\t\t'Medefaidrin',\n\t\t\t'Meetei_Mayek',\n\t\t\t'Mende_Kikakui',\n\t\t\t'Meroitic_Cursive',\n\t\t\t'Meroitic_Hieroglyphs',\n\t\t\t'Miao',\n\t\t\t'Modi',\n\t\t\t'Mongolian',\n\t\t\t'Mro',\n\t\t\t'Multani',\n\t\t\t'Myanmar',\n\t\t\t'Nabataean',\n\t\t\t'Nandinagari',\n\t\t\t'New_Tai_Lue',\n\t\t\t'Newa',\n\t\t\t'Nko',\n\t\t\t'Nushu',\n\t\t\t'Nyiakeng_Puachue_Hmong',\n\t\t\t'Ogham',\n\t\t\t'Ol_Chiki',\n\t\t\t'Old_Hungarian',\n\t\t\t'Old_Italic',\n\t\t\t'Old_North_Arabian',\n\t\t\t'Old_Permic',\n\t\t\t'Old_Persian',\n\t\t\t'Old_Sogdian',\n\t\t\t'Old_South_Arabian',\n\t\t\t'Old_Turkic',\n\t\t\t'Old_Uyghur',\n\t\t\t'Oriya',\n\t\t\t'Osage',\n\t\t\t'Osmanya',\n\t\t\t'Pahawh_Hmong',\n\t\t\t'Palmyrene',\n\t\t\t'Pau_Cin_Hau',\n\t\t\t'Phags_Pa',\n\t\t\t'Phoenician',\n\t\t\t'Psalter_Pahlavi',\n\t\t\t'Rejang',\n\t\t\t'Runic',\n\t\t\t'Samaritan',\n\t\t\t'Saurashtra',\n\t\t\t'Sharada',\n\t\t\t'Shavian',\n\t\t\t'Siddham',\n\t\t\t'SignWriting',\n\t\t\t'Sinhala',\n\t\t\t'Sogdian',\n\t\t\t'Sora_Sompeng',\n\t\t\t'Soyombo',\n\t\t\t'Sundanese',\n\t\t\t'Syloti_Nagri',\n\t\t\t'Syriac',\n\t\t\t'Tagalog',\n\t\t\t'Tagbanwa',\n\t\t\t'Tai_Le',\n\t\t\t'Tai_Tham',\n\t\t\t'Tai_Viet',\n\t\t\t'Takri',\n\t\t\t'Tamil',\n\t\t\t'Tangsa',\n\t\t\t'Tangut',\n\t\t\t'Telugu',\n\t\t\t'Thaana',\n\t\t\t'Thai',\n\t\t\t'Tibetan',\n\t\t\t'Tifinagh',\n\t\t\t'Tirhuta',\n\t\t\t'Toto',\n\t\t\t'Ugaritic',\n\t\t\t'Vai',\n\t\t\t'Vithkuqi',\n\t\t\t'Wancho',\n\t\t\t'Warang_Citi',\n\t\t\t'Yezidi',\n\t\t\t'Yi',\n\t\t\t'Zanabazar_Square'\n\t\t]],\n\t\t['Script_Extensions', [\n\t\t\t'Adlam',\n\t\t\t'Ahom',\n\t\t\t'Anatolian_Hieroglyphs',\n\t\t\t'Arabic',\n\t\t\t'Armenian',\n\t\t\t'Avestan',\n\t\t\t'Balinese',\n\t\t\t'Bamum',\n\t\t\t'Bassa_Vah',\n\t\t\t'Batak',\n\t\t\t'Bengali',\n\t\t\t'Bhaiksuki',\n\t\t\t'Bopomofo',\n\t\t\t'Brahmi',\n\t\t\t'Braille',\n\t\t\t'Buginese',\n\t\t\t'Buhid',\n\t\t\t'Canadian_Aboriginal',\n\t\t\t'Carian',\n\t\t\t'Caucasian_Albanian',\n\t\t\t'Chakma',\n\t\t\t'Cham',\n\t\t\t'Cherokee',\n\t\t\t'Chorasmian',\n\t\t\t'Common',\n\t\t\t'Coptic',\n\t\t\t'Cuneiform',\n\t\t\t'Cypriot',\n\t\t\t'Cypro_Minoan',\n\t\t\t'Cyrillic',\n\t\t\t'Deseret',\n\t\t\t'Devanagari',\n\t\t\t'Dives_Akuru',\n\t\t\t'Dogra',\n\t\t\t'Duployan',\n\t\t\t'Egyptian_Hieroglyphs',\n\t\t\t'Elbasan',\n\t\t\t'Elymaic',\n\t\t\t'Ethiopic',\n\t\t\t'Georgian',\n\t\t\t'Glagolitic',\n\t\t\t'Gothic',\n\t\t\t'Grantha',\n\t\t\t'Greek',\n\t\t\t'Gujarati',\n\t\t\t'Gunjala_Gondi',\n\t\t\t'Gurmukhi',\n\t\t\t'Han',\n\t\t\t'Hangul',\n\t\t\t'Hanifi_Rohingya',\n\t\t\t'Hanunoo',\n\t\t\t'Hatran',\n\t\t\t'Hebrew',\n\t\t\t'Hiragana',\n\t\t\t'Imperial_Aramaic',\n\t\t\t'Inherited',\n\t\t\t'Inscriptional_Pahlavi',\n\t\t\t'Inscriptional_Parthian',\n\t\t\t'Javanese',\n\t\t\t'Kaithi',\n\t\t\t'Kannada',\n\t\t\t'Katakana',\n\t\t\t'Kayah_Li',\n\t\t\t'Kharoshthi',\n\t\t\t'Khitan_Small_Script',\n\t\t\t'Khmer',\n\t\t\t'Khojki',\n\t\t\t'Khudawadi',\n\t\t\t'Lao',\n\t\t\t'Latin',\n\t\t\t'Lepcha',\n\t\t\t'Limbu',\n\t\t\t'Linear_A',\n\t\t\t'Linear_B',\n\t\t\t'Lisu',\n\t\t\t'Lycian',\n\t\t\t'Lydian',\n\t\t\t'Mahajani',\n\t\t\t'Makasar',\n\t\t\t'Malayalam',\n\t\t\t'Mandaic',\n\t\t\t'Manichaean',\n\t\t\t'Marchen',\n\t\t\t'Masaram_Gondi',\n\t\t\t'Medefaidrin',\n\t\t\t'Meetei_Mayek',\n\t\t\t'Mende_Kikakui',\n\t\t\t'Meroitic_Cursive',\n\t\t\t'Meroitic_Hieroglyphs',\n\t\t\t'Miao',\n\t\t\t'Modi',\n\t\t\t'Mongolian',\n\t\t\t'Mro',\n\t\t\t'Multani',\n\t\t\t'Myanmar',\n\t\t\t'Nabataean',\n\t\t\t'Nandinagari',\n\t\t\t'New_Tai_Lue',\n\t\t\t'Newa',\n\t\t\t'Nko',\n\t\t\t'Nushu',\n\t\t\t'Nyiakeng_Puachue_Hmong',\n\t\t\t'Ogham',\n\t\t\t'Ol_Chiki',\n\t\t\t'Old_Hungarian',\n\t\t\t'Old_Italic',\n\t\t\t'Old_North_Arabian',\n\t\t\t'Old_Permic',\n\t\t\t'Old_Persian',\n\t\t\t'Old_Sogdian',\n\t\t\t'Old_South_Arabian',\n\t\t\t'Old_Turkic',\n\t\t\t'Old_Uyghur',\n\t\t\t'Oriya',\n\t\t\t'Osage',\n\t\t\t'Osmanya',\n\t\t\t'Pahawh_Hmong',\n\t\t\t'Palmyrene',\n\t\t\t'Pau_Cin_Hau',\n\t\t\t'Phags_Pa',\n\t\t\t'Phoenician',\n\t\t\t'Psalter_Pahlavi',\n\t\t\t'Rejang',\n\t\t\t'Runic',\n\t\t\t'Samaritan',\n\t\t\t'Saurashtra',\n\t\t\t'Sharada',\n\t\t\t'Shavian',\n\t\t\t'Siddham',\n\t\t\t'SignWriting',\n\t\t\t'Sinhala',\n\t\t\t'Sogdian',\n\t\t\t'Sora_Sompeng',\n\t\t\t'Soyombo',\n\t\t\t'Sundanese',\n\t\t\t'Syloti_Nagri',\n\t\t\t'Syriac',\n\t\t\t'Tagalog',\n\t\t\t'Tagbanwa',\n\t\t\t'Tai_Le',\n\t\t\t'Tai_Tham',\n\t\t\t'Tai_Viet',\n\t\t\t'Takri',\n\t\t\t'Tamil',\n\t\t\t'Tangsa',\n\t\t\t'Tangut',\n\t\t\t'Telugu',\n\t\t\t'Thaana',\n\t\t\t'Thai',\n\t\t\t'Tibetan',\n\t\t\t'Tifinagh',\n\t\t\t'Tirhuta',\n\t\t\t'Toto',\n\t\t\t'Ugaritic',\n\t\t\t'Vai',\n\t\t\t'Vithkuqi',\n\t\t\t'Wancho',\n\t\t\t'Warang_Citi',\n\t\t\t'Yezidi',\n\t\t\t'Yi',\n\t\t\t'Zanabazar_Square'\n\t\t]],\n\t\t['Binary_Property', [\n\t\t\t'ASCII',\n\t\t\t'ASCII_Hex_Digit',\n\t\t\t'Alphabetic',\n\t\t\t'Any',\n\t\t\t'Assigned',\n\t\t\t'Bidi_Control',\n\t\t\t'Bidi_Mirrored',\n\t\t\t'Case_Ignorable',\n\t\t\t'Cased',\n\t\t\t'Changes_When_Casefolded',\n\t\t\t'Changes_When_Casemapped',\n\t\t\t'Changes_When_Lowercased',\n\t\t\t'Changes_When_NFKC_Casefolded',\n\t\t\t'Changes_When_Titlecased',\n\t\t\t'Changes_When_Uppercased',\n\t\t\t'Dash',\n\t\t\t'Default_Ignorable_Code_Point',\n\t\t\t'Deprecated',\n\t\t\t'Diacritic',\n\t\t\t'Emoji',\n\t\t\t'Emoji_Component',\n\t\t\t'Emoji_Modifier',\n\t\t\t'Emoji_Modifier_Base',\n\t\t\t'Emoji_Presentation',\n\t\t\t'Extended_Pictographic',\n\t\t\t'Extender',\n\t\t\t'Grapheme_Base',\n\t\t\t'Grapheme_Extend',\n\t\t\t'Hex_Digit',\n\t\t\t'IDS_Binary_Operator',\n\t\t\t'IDS_Trinary_Operator',\n\t\t\t'ID_Continue',\n\t\t\t'ID_Start',\n\t\t\t'Ideographic',\n\t\t\t'Join_Control',\n\t\t\t'Logical_Order_Exception',\n\t\t\t'Lowercase',\n\t\t\t'Math',\n\t\t\t'Noncharacter_Code_Point',\n\t\t\t'Pattern_Syntax',\n\t\t\t'Pattern_White_Space',\n\t\t\t'Quotation_Mark',\n\t\t\t'Radical',\n\t\t\t'Regional_Indicator',\n\t\t\t'Sentence_Terminal',\n\t\t\t'Soft_Dotted',\n\t\t\t'Terminal_Punctuation',\n\t\t\t'Unified_Ideograph',\n\t\t\t'Uppercase',\n\t\t\t'Variation_Selector',\n\t\t\t'White_Space',\n\t\t\t'XID_Continue',\n\t\t\t'XID_Start'\n\t\t]]\n\t]);\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Adlam.js\", function (module, exports) {\n\t const set = regenerate(0x61F, 0x640);\n\tset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ahom.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Anatolian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x14400, 0x14646);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Arabic.js\", function (module, exports) {\n\t const set = regenerate(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x600, 0x604).addRange(0x606, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x102E0, 0x102FB).addRange(0x10E60, 0x10E7E).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Armenian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Avestan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Balinese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bamum.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bassa_Vah.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Batak.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bengali.js\", function (module, exports) {\n\t const set = regenerate(0x9B2, 0x9D7, 0x1CD0, 0x1CD2, 0x1CD8, 0x1CE1, 0x1CEA, 0x1CED, 0x1CF2, 0xA8F1);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0x1CD5, 0x1CD6).addRange(0x1CF5, 0x1CF7);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bhaiksuki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bopomofo.js\", function (module, exports) {\n\t const set = regenerate(0x3030, 0x3037, 0x30FB);\n\tset.addRange(0x2EA, 0x2EB).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302A, 0x302D).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Brahmi.js\", function (module, exports) {\n\t const set = regenerate(0x1107F);\n\tset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Braille.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2800, 0x28FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Buginese.js\", function (module, exports) {\n\t const set = regenerate(0xA9CF);\n\tset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Buhid.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1735, 0x1736).addRange(0x1740, 0x1753);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Canadian_Aboriginal.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Carian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x102A0, 0x102D0);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Caucasian_Albanian.js\", function (module, exports) {\n\t const set = regenerate(0x1056F);\n\tset.addRange(0x10530, 0x10563);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Chakma.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x9E6, 0x9EF).addRange(0x1040, 0x1049).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cherokee.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Chorasmian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FB0, 0x10FCB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Common.js\", function (module, exports) {\n\t const set = regenerate(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x6DD, 0x8E2, 0xE3F, 0x3000, 0x3004, 0x3012, 0x3020, 0x3036, 0x327F, 0x33FF, 0xAB5B, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\n\tset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x2000, 0x200B).addRange(0x200E, 0x202E).addRange(0x2030, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E42).addRange(0x2E44, 0x2E5D).addRange(0x2FF0, 0x2FFB).addRange(0x3248, 0x325F).addRange(0x32B1, 0x32BF).addRange(0x32CC, 0x32CF).addRange(0x3371, 0x337A).addRange(0x3380, 0x33DF).addRange(0x4DC0, 0x4DFF).addRange(0xA708, 0xA721).addRange(0xA788, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF60).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE);\n\tset.addRange(0xFFF9, 0xFFFD).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D372, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8);\n\tset.addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Coptic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF).addRange(0x102E0, 0x102FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cuneiform.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cypriot.js\", function (module, exports) {\n\t const set = regenerate(0x10808, 0x1083C, 0x1083F);\n\tset.addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cypro_Minoan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10100, 0x10101).addRange(0x12F90, 0x12FF2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cyrillic.js\", function (module, exports) {\n\t const set = regenerate(0x1D2B, 0x1D78, 0x1DF8, 0x2E43);\n\tset.addRange(0x400, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Deseret.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10400, 0x1044F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Devanagari.js\", function (module, exports) {\n\t const set = regenerate(0x20F0);\n\tset.addRange(0x900, 0x952).addRange(0x955, 0x97F).addRange(0x1CD0, 0x1CF6).addRange(0x1CF8, 0x1CF9).addRange(0xA830, 0xA839).addRange(0xA8E0, 0xA8FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Dives_Akuru.js\", function (module, exports) {\n\t const set = regenerate(0x11909);\n\tset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Dogra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11800, 0x1183B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Duployan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Egyptian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13000, 0x1342E).addRange(0x13430, 0x13438);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Elbasan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10500, 0x10527);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Elymaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FE0, 0x10FF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ethiopic.js\", function (module, exports) {\n\t const set = regenerate(0x1258, 0x12C0);\n\tset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Georgian.js\", function (module, exports) {\n\t const set = regenerate(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\n\tset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Glagolitic.js\", function (module, exports) {\n\t const set = regenerate(0x484, 0x487, 0x2E43, 0xA66F);\n\tset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gothic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10330, 0x1034A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Grantha.js\", function (module, exports) {\n\t const set = regenerate(0x1CD0, 0x20F0, 0x11350, 0x11357, 0x11FD3);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xBE6, 0xBF3).addRange(0x1CD2, 0x1CD3).addRange(0x1CF2, 0x1CF4).addRange(0x1CF8, 0x1CF9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11FD0, 0x11FD1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Greek.js\", function (module, exports) {\n\t const set = regenerate(0x342, 0x345, 0x37F, 0x384, 0x386, 0x38C, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\n\tset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1DBF, 0x1DC1).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gujarati.js\", function (module, exports) {\n\t const set = regenerate(0xAD0);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xA830, 0xA839);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gunjala_Gondi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gurmukhi.js\", function (module, exports) {\n\t const set = regenerate(0xA3C, 0xA51, 0xA5E);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA830, 0xA839);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Han.js\", function (module, exports) {\n\t const set = regenerate(0x3030, 0x30FB, 0x32FF);\n\tset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3001, 0x3003).addRange(0x3005, 0x3011).addRange(0x3013, 0x301F).addRange(0x3021, 0x302D).addRange(0x3037, 0x303F).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x3247).addRange(0x3280, 0x32B0).addRange(0x32C0, 0x32CB).addRange(0x3358, 0x3370).addRange(0x337B, 0x337F).addRange(0x33E0, 0x33FE).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xA700, 0xA707).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x1D360, 0x1D371).addRange(0x1F250, 0x1F251).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hangul.js\", function (module, exports) {\n\t const set = regenerate(0x3037, 0x30FB);\n\tset.addRange(0x1100, 0x11FF).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302E, 0x3030).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hanifi_Rohingya.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61B, 0x61F, 0x640, 0x6D4);\n\tset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hanunoo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1720, 0x1736);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hatran.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hebrew.js\", function (module, exports) {\n\t const set = regenerate(0xFB3E);\n\tset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hiragana.js\", function (module, exports) {\n\t const set = regenerate(0x3037, 0xFF70, 0x1F200);\n\tset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3041, 0x3096).addRange(0x3099, 0x30A0).addRange(0x30FB, 0x30FC).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Imperial_Aramaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Inherited.js\", function (module, exports) {\n\t const set = regenerate(0x1DF9, 0x101FD);\n\tset.addRange(0x300, 0x341).addRange(0x343, 0x344).addRange(0x346, 0x362).addRange(0x953, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1DC2, 0x1DF7).addRange(0x1DFB, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20EF).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Inscriptional_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Inscriptional_Parthian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Javanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kaithi.js\", function (module, exports) {\n\t const set = regenerate(0x110CD);\n\tset.addRange(0x966, 0x96F).addRange(0xA830, 0xA839).addRange(0x11080, 0x110C2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kannada.js\", function (module, exports) {\n\t const set = regenerate(0x1CD0, 0x1CD2, 0x1CDA, 0x1CF2, 0x1CF4);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xA830, 0xA835);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Katakana.js\", function (module, exports) {\n\t const set = regenerate(0x3037, 0x1B000);\n\tset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3099, 0x309C).addRange(0x30A0, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF9F).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kayah_Li.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA900, 0xA92F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kharoshthi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khitan_Small_Script.js\", function (module, exports) {\n\t const set = regenerate(0x16FE4);\n\tset.addRange(0x18B00, 0x18CD5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khmer.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khojki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAE6, 0xAEF).addRange(0xA830, 0xA839).addRange(0x11200, 0x11211).addRange(0x11213, 0x1123E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khudawadi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lao.js\", function (module, exports) {\n\t const set = regenerate(0xE84, 0xEA5, 0xEC6);\n\tset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Latin.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xBA, 0x10FB, 0x202F, 0x2071, 0x207F, 0x20F0, 0x2132, 0x214E, 0xA7D3, 0xA92E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x363, 0x36F).addRange(0x485, 0x486).addRange(0x951, 0x952).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA700, 0xA707).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lepcha.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Limbu.js\", function (module, exports) {\n\t const set = regenerate(0x965, 0x1940);\n\tset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Linear_A.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10107, 0x10133).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Linear_B.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lisu.js\", function (module, exports) {\n\t const set = regenerate(0x11FB0);\n\tset.addRange(0xA4D0, 0xA4FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lycian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10280, 0x1029C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lydian.js\", function (module, exports) {\n\t const set = regenerate(0x1093F);\n\tset.addRange(0x10920, 0x10939);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mahajani.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11150, 0x11176);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Makasar.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11EE0, 0x11EF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Malayalam.js\", function (module, exports) {\n\t const set = regenerate(0x1CDA);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xA830, 0xA832);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mandaic.js\", function (module, exports) {\n\t const set = regenerate(0x640, 0x85E);\n\tset.addRange(0x840, 0x85B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Manichaean.js\", function (module, exports) {\n\t const set = regenerate(0x640);\n\tset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Marchen.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Masaram_Gondi.js\", function (module, exports) {\n\t const set = regenerate(0x11D3A);\n\tset.addRange(0x964, 0x965).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Medefaidrin.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16E40, 0x16E9A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Meetei_Mayek.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mende_Kikakui.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Meroitic_Cursive.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Meroitic_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10980, 0x1099F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Miao.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Modi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA830, 0xA839).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mongolian.js\", function (module, exports) {\n\t const set = regenerate(0x202F);\n\tset.addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mro.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Multani.js\", function (module, exports) {\n\t const set = regenerate(0x11288);\n\tset.addRange(0xA66, 0xA6F).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Myanmar.js\", function (module, exports) {\n\t const set = regenerate(0xA92E);\n\tset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nabataean.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nandinagari.js\", function (module, exports) {\n\t const set = regenerate(0x1CE9, 0x1CF2, 0x1CFA);\n\tset.addRange(0x964, 0x965).addRange(0xCE6, 0xCEF).addRange(0xA830, 0xA835).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/New_Tai_Lue.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Newa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nko.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61B, 0x61F);\n\tset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF).addRange(0xFD3E, 0xFD3F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nushu.js\", function (module, exports) {\n\t const set = regenerate(0x16FE1);\n\tset.addRange(0x1B170, 0x1B2FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nyiakeng_Puachue_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ogham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1680, 0x169C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ol_Chiki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C50, 0x1C7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Hungarian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Italic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_North_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A80, 0x10A9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Permic.js\", function (module, exports) {\n\t const set = regenerate(0x483);\n\tset.addRange(0x10350, 0x1037A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Persian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Sogdian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F00, 0x10F27);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_South_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A60, 0x10A7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Turkic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C00, 0x10C48);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Uyghur.js\", function (module, exports) {\n\t const set = regenerate(0x640, 0x10AF2);\n\tset.addRange(0x10F70, 0x10F89);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Oriya.js\", function (module, exports) {\n\t const set = regenerate(0x1CDA, 0x1CF2);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Osage.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Osmanya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Pahawh_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Palmyrene.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10860, 0x1087F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Pau_Cin_Hau.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11AC0, 0x11AF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Phags_Pa.js\", function (module, exports) {\n\t const set = regenerate(0x1805);\n\tset.addRange(0x1802, 0x1803).addRange(0xA840, 0xA877);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Phoenician.js\", function (module, exports) {\n\t const set = regenerate(0x1091F);\n\tset.addRange(0x10900, 0x1091B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Psalter_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate(0x640);\n\tset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Rejang.js\", function (module, exports) {\n\t const set = regenerate(0xA95F);\n\tset.addRange(0xA930, 0xA953);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Runic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Samaritan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Saurashtra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sharada.js\", function (module, exports) {\n\t const set = regenerate(0x951, 0x1CD7, 0x1CD9, 0x1CE0);\n\tset.addRange(0x1CDC, 0x1CDD).addRange(0x11180, 0x111DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Shavian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10450, 0x1047F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Siddham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/SignWriting.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sinhala.js\", function (module, exports) {\n\t const set = regenerate(0xDBD, 0xDCA, 0xDD6);\n\tset.addRange(0x964, 0x965).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sogdian.js\", function (module, exports) {\n\t const set = regenerate(0x640);\n\tset.addRange(0x10F30, 0x10F59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sora_Sompeng.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Soyombo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A50, 0x11AA2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sundanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Syloti_Nagri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0x9E6, 0x9EF).addRange(0xA800, 0xA82C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Syriac.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61F, 0x640, 0x670, 0x1DF8, 0x1DFA);\n\tset.addRange(0x61B, 0x61C).addRange(0x64B, 0x655).addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tagalog.js\", function (module, exports) {\n\t const set = regenerate(0x171F);\n\tset.addRange(0x1700, 0x1715).addRange(0x1735, 0x1736);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tagbanwa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1735, 0x1736).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tai_Le.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1040, 0x1049).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tai_Tham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tai_Viet.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Takri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tamil.js\", function (module, exports) {\n\t const set = regenerate(0xB9C, 0xBD0, 0xBD7, 0x1CDA, 0xA8F3, 0x11301, 0x11303, 0x11FFF);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x1133B, 0x1133C).addRange(0x11FC0, 0x11FF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tangsa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tangut.js\", function (module, exports) {\n\t const set = regenerate(0x16FE0);\n\tset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Telugu.js\", function (module, exports) {\n\t const set = regenerate(0xC5D, 0x1CDA, 0x1CF2);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Thaana.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61F, 0xFDF2, 0xFDFD);\n\tset.addRange(0x61B, 0x61C).addRange(0x660, 0x669).addRange(0x780, 0x7B1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Thai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tibetan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tifinagh.js\", function (module, exports) {\n\t const set = regenerate(0x2D7F);\n\tset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tirhuta.js\", function (module, exports) {\n\t const set = regenerate(0x1CF2);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Toto.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E290, 0x1E2AE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ugaritic.js\", function (module, exports) {\n\t const set = regenerate(0x1039F);\n\tset.addRange(0x10380, 0x1039D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Vai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA500, 0xA62B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Vithkuqi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Wancho.js\", function (module, exports) {\n\t const set = regenerate(0x1E2FF);\n\tset.addRange(0x1E2C0, 0x1E2F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Warang_Citi.js\", function (module, exports) {\n\t const set = regenerate(0x118FF);\n\tset.addRange(0x118A0, 0x118F2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Yezidi.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61B, 0x61F);\n\tset.addRange(0x660, 0x669).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Yi.js\", function (module, exports) {\n\t const set = regenerate(0x30FB);\n\tset.addRange(0x3001, 0x3002).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xFF61, 0xFF65);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Zanabazar_Square.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A00, 0x11A47);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Adlam.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ahom.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Anatolian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x14400, 0x14646);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Arabic.js\", function (module, exports) {\n\t const set = regenerate(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x600, 0x604).addRange(0x606, 0x60B).addRange(0x60D, 0x61A).addRange(0x61C, 0x61E).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x656, 0x66F).addRange(0x671, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD3D).addRange(0xFD40, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x10E60, 0x10E7E).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Armenian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Avestan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Balinese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bamum.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bassa_Vah.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Batak.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bengali.js\", function (module, exports) {\n\t const set = regenerate(0x9B2, 0x9D7);\n\tset.addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bhaiksuki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bopomofo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2EA, 0x2EB).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Brahmi.js\", function (module, exports) {\n\t const set = regenerate(0x1107F);\n\tset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Braille.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2800, 0x28FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Buginese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Buhid.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1740, 0x1753);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Canadian_Aboriginal.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Carian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x102A0, 0x102D0);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Caucasian_Albanian.js\", function (module, exports) {\n\t const set = regenerate(0x1056F);\n\tset.addRange(0x10530, 0x10563);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Chakma.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cherokee.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Chorasmian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FB0, 0x10FCB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Common.js\", function (module, exports) {\n\t const set = regenerate(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x60C, 0x61B, 0x61F, 0x640, 0x6DD, 0x8E2, 0xE3F, 0x10FB, 0x1805, 0x1CD3, 0x1CE1, 0x1CFA, 0x3006, 0x30A0, 0x32FF, 0xA92E, 0xA9CF, 0xAB5B, 0xFEFF, 0xFF70, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\n\tset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0x964, 0x965).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x1802, 0x1803).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x2000, 0x200B).addRange(0x200E, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E5D).addRange(0x2FF0, 0x2FFB).addRange(0x3000, 0x3004).addRange(0x3008, 0x3020).addRange(0x3030, 0x3037).addRange(0x303C, 0x303F).addRange(0x309B, 0x309C).addRange(0x30FB, 0x30FC).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x325F).addRange(0x327F, 0x32CF).addRange(0x3358, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA830, 0xA839);\n\tset.addRange(0xAB6A, 0xAB6B).addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF9, 0xFFFD).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x102E1, 0x102FB).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D);\n\tset.addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Coptic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cuneiform.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cypriot.js\", function (module, exports) {\n\t const set = regenerate(0x10808, 0x1083C, 0x1083F);\n\tset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cypro_Minoan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x12F90, 0x12FF2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cyrillic.js\", function (module, exports) {\n\t const set = regenerate(0x1D2B, 0x1D78);\n\tset.addRange(0x400, 0x484).addRange(0x487, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Deseret.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10400, 0x1044F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Devanagari.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x900, 0x950).addRange(0x955, 0x963).addRange(0x966, 0x97F).addRange(0xA8E0, 0xA8FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Dives_Akuru.js\", function (module, exports) {\n\t const set = regenerate(0x11909);\n\tset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Dogra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11800, 0x1183B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Duployan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BC9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Egyptian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13000, 0x1342E).addRange(0x13430, 0x13438);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Elbasan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10500, 0x10527);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Elymaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FE0, 0x10FF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ethiopic.js\", function (module, exports) {\n\t const set = regenerate(0x1258, 0x12C0);\n\tset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Georgian.js\", function (module, exports) {\n\t const set = regenerate(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\n\tset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Glagolitic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gothic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10330, 0x1034A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Grantha.js\", function (module, exports) {\n\t const set = regenerate(0x11350, 0x11357);\n\tset.addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133C, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Greek.js\", function (module, exports) {\n\t const set = regenerate(0x37F, 0x384, 0x386, 0x38C, 0x1DBF, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\n\tset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gujarati.js\", function (module, exports) {\n\t const set = regenerate(0xAD0);\n\tset.addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gunjala_Gondi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gurmukhi.js\", function (module, exports) {\n\t const set = regenerate(0xA3C, 0xA51, 0xA5E);\n\tset.addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Han.js\", function (module, exports) {\n\t const set = regenerate(0x3005, 0x3007);\n\tset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3021, 0x3029).addRange(0x3038, 0x303B).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hangul.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1100, 0x11FF).addRange(0x302E, 0x302F).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hanifi_Rohingya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hanunoo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1720, 0x1734);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hatran.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hebrew.js\", function (module, exports) {\n\t const set = regenerate(0xFB3E);\n\tset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hiragana.js\", function (module, exports) {\n\t const set = regenerate(0x1F200);\n\tset.addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Imperial_Aramaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Inherited.js\", function (module, exports) {\n\t const set = regenerate(0x670, 0x1CED, 0x1CF4, 0x101FD, 0x102E0, 0x1133B);\n\tset.addRange(0x300, 0x36F).addRange(0x485, 0x486).addRange(0x64B, 0x655).addRange(0x951, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20F0).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Inscriptional_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Inscriptional_Parthian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Javanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA980, 0xA9CD).addRange(0xA9D0, 0xA9D9).addRange(0xA9DE, 0xA9DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kaithi.js\", function (module, exports) {\n\t const set = regenerate(0x110CD);\n\tset.addRange(0x11080, 0x110C2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kannada.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Katakana.js\", function (module, exports) {\n\t const set = regenerate(0x1B000);\n\tset.addRange(0x30A1, 0x30FA).addRange(0x30FD, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kayah_Li.js\", function (module, exports) {\n\t const set = regenerate(0xA92F);\n\tset.addRange(0xA900, 0xA92D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kharoshthi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khitan_Small_Script.js\", function (module, exports) {\n\t const set = regenerate(0x16FE4);\n\tset.addRange(0x18B00, 0x18CD5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khmer.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khojki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11200, 0x11211).addRange(0x11213, 0x1123E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khudawadi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lao.js\", function (module, exports) {\n\t const set = regenerate(0xE84, 0xEA5, 0xEC6);\n\tset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Latin.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xBA, 0x2071, 0x207F, 0x2132, 0x214E, 0xA7D3);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lepcha.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Limbu.js\", function (module, exports) {\n\t const set = regenerate(0x1940);\n\tset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Linear_A.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Linear_B.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lisu.js\", function (module, exports) {\n\t const set = regenerate(0x11FB0);\n\tset.addRange(0xA4D0, 0xA4FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lycian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10280, 0x1029C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lydian.js\", function (module, exports) {\n\t const set = regenerate(0x1093F);\n\tset.addRange(0x10920, 0x10939);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mahajani.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11150, 0x11176);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Makasar.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11EE0, 0x11EF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Malayalam.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mandaic.js\", function (module, exports) {\n\t const set = regenerate(0x85E);\n\tset.addRange(0x840, 0x85B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Manichaean.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Marchen.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Masaram_Gondi.js\", function (module, exports) {\n\t const set = regenerate(0x11D3A);\n\tset.addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Medefaidrin.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16E40, 0x16E9A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Meetei_Mayek.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mende_Kikakui.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Meroitic_Cursive.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Meroitic_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10980, 0x1099F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Miao.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Modi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mongolian.js\", function (module, exports) {\n\t const set = regenerate(0x1804);\n\tset.addRange(0x1800, 0x1801).addRange(0x1806, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mro.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Multani.js\", function (module, exports) {\n\t const set = regenerate(0x11288);\n\tset.addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Myanmar.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nabataean.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nandinagari.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/New_Tai_Lue.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Newa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nko.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nushu.js\", function (module, exports) {\n\t const set = regenerate(0x16FE1);\n\tset.addRange(0x1B170, 0x1B2FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nyiakeng_Puachue_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ogham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1680, 0x169C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ol_Chiki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C50, 0x1C7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Hungarian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Italic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_North_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A80, 0x10A9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Permic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10350, 0x1037A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Persian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Sogdian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F00, 0x10F27);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_South_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A60, 0x10A7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Turkic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C00, 0x10C48);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Uyghur.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F70, 0x10F89);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Oriya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Osage.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Osmanya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Pahawh_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Palmyrene.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10860, 0x1087F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Pau_Cin_Hau.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11AC0, 0x11AF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Phags_Pa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA840, 0xA877);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Phoenician.js\", function (module, exports) {\n\t const set = regenerate(0x1091F);\n\tset.addRange(0x10900, 0x1091B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Psalter_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Rejang.js\", function (module, exports) {\n\t const set = regenerate(0xA95F);\n\tset.addRange(0xA930, 0xA953);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Runic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Samaritan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Saurashtra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sharada.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11180, 0x111DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Shavian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10450, 0x1047F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Siddham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/SignWriting.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sinhala.js\", function (module, exports) {\n\t const set = regenerate(0xDBD, 0xDCA, 0xDD6);\n\tset.addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sogdian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F30, 0x10F59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sora_Sompeng.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Soyombo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A50, 0x11AA2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sundanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Syloti_Nagri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA800, 0xA82C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Syriac.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tagalog.js\", function (module, exports) {\n\t const set = regenerate(0x171F);\n\tset.addRange(0x1700, 0x1715);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tagbanwa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tai_Le.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tai_Tham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tai_Viet.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Takri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tamil.js\", function (module, exports) {\n\t const set = regenerate(0xB9C, 0xBD0, 0xBD7, 0x11FFF);\n\tset.addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x11FC0, 0x11FF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tangsa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tangut.js\", function (module, exports) {\n\t const set = regenerate(0x16FE0);\n\tset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Telugu.js\", function (module, exports) {\n\t const set = regenerate(0xC5D);\n\tset.addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Thaana.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x780, 0x7B1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Thai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tibetan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tifinagh.js\", function (module, exports) {\n\t const set = regenerate(0x2D7F);\n\tset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tirhuta.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Toto.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E290, 0x1E2AE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ugaritic.js\", function (module, exports) {\n\t const set = regenerate(0x1039F);\n\tset.addRange(0x10380, 0x1039D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Vai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA500, 0xA62B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Vithkuqi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Wancho.js\", function (module, exports) {\n\t const set = regenerate(0x1E2FF);\n\tset.addRange(0x1E2C0, 0x1E2F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Warang_Citi.js\", function (module, exports) {\n\t const set = regenerate(0x118FF);\n\tset.addRange(0x118A0, 0x118F2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Yezidi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Yi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Zanabazar_Square.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A00, 0x11A47);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/unicode-version.js\", function (module, exports) {\n\t module.exports = '14.0.0';\n\n\t});\n\n\tfunction _defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t var descriptor = props[i];\n\t descriptor.enumerable = descriptor.enumerable || false;\n\t descriptor.configurable = true;\n\t if (\"value\" in descriptor) descriptor.writable = true;\n\t Object.defineProperty(target, descriptor.key, descriptor);\n\t }\n\t}\n\n\tfunction _createClass(Constructor, protoProps, staticProps) {\n\t if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\t if (staticProps) _defineProperties(Constructor, staticProps);\n\t return Constructor;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function\");\n\t }\n\n\t subClass.prototype = Object.create(superClass && superClass.prototype, {\n\t constructor: {\n\t value: subClass,\n\t writable: true,\n\t configurable: true\n\t }\n\t });\n\t if (superClass) _setPrototypeOf(subClass, superClass);\n\t}\n\n\tfunction _setPrototypeOf(o, p) {\n\t _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n\t o.__proto__ = p;\n\t return o;\n\t };\n\n\t return _setPrototypeOf(o, p);\n\t}\n\n\tfunction _objectWithoutPropertiesLoose(source, excluded) {\n\t if (source == null) return {};\n\t var target = {};\n\t var sourceKeys = Object.keys(source);\n\t var key, i;\n\n\t for (i = 0; i < sourceKeys.length; i++) {\n\t key = sourceKeys[i];\n\t if (excluded.indexOf(key) >= 0) continue;\n\t target[key] = source[key];\n\t }\n\n\t return target;\n\t}\n\n\tfunction _objectWithoutProperties(source, excluded) {\n\t if (source == null) return {};\n\n\t var target = _objectWithoutPropertiesLoose(source, excluded);\n\n\t var key, i;\n\n\t if (Object.getOwnPropertySymbols) {\n\t var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n\t for (i = 0; i < sourceSymbolKeys.length; i++) {\n\t key = sourceSymbolKeys[i];\n\t if (excluded.indexOf(key) >= 0) continue;\n\t if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n\t target[key] = source[key];\n\t }\n\t }\n\n\t return target;\n\t}\n\n\tfunction _taggedTemplateLiteralLoose(strings, raw) {\n\t if (!raw) {\n\t raw = strings.slice(0);\n\t }\n\n\t strings.raw = raw;\n\t return strings;\n\t}\n\n\tfunction _slicedToArray$1(arr, i) {\n\t return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n\t}\n\n\tfunction _toConsumableArray(arr) {\n\t return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n\t}\n\n\tfunction _arrayWithoutHoles(arr) {\n\t if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n\t}\n\n\tfunction _arrayWithHoles(arr) {\n\t if (Array.isArray(arr)) return arr;\n\t}\n\n\tfunction _iterableToArray(iter) {\n\t if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n\t}\n\n\tfunction _iterableToArrayLimit(arr, i) {\n\t var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n\t if (_i == null) return;\n\t var _arr = [];\n\t var _n = true;\n\t var _d = false;\n\n\t var _s, _e;\n\n\t try {\n\t for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n\t _arr.push(_s.value);\n\n\t if (i && _arr.length === i) break;\n\t }\n\t } catch (err) {\n\t _d = true;\n\t _e = err;\n\t } finally {\n\t try {\n\t if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n\t } finally {\n\t if (_d) throw _e;\n\t }\n\t }\n\n\t return _arr;\n\t}\n\n\tfunction _unsupportedIterableToArray(o, minLen) {\n\t if (!o) return;\n\t if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n\t var n = Object.prototype.toString.call(o).slice(8, -1);\n\t if (n === \"Object\" && o.constructor) n = o.constructor.name;\n\t if (n === \"Map\" || n === \"Set\") return Array.from(o);\n\t if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n\t}\n\n\tfunction _arrayLikeToArray(arr, len) {\n\t if (len == null || len > arr.length) len = arr.length;\n\n\t for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n\t return arr2;\n\t}\n\n\tfunction _nonIterableSpread() {\n\t throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tfunction _nonIterableRest() {\n\t throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n\t var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\t if (it) return (it = it.call(o)).next.bind(it);\n\n\t if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n\t if (it) o = it;\n\t var i = 0;\n\t return function () {\n\t if (i >= o.length) return {\n\t done: true\n\t };\n\t return {\n\t done: false,\n\t value: o[i++]\n\t };\n\t };\n\t }\n\n\t throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tfunction shallowEqual(actual, expected) {\n\t var keys = Object.keys(expected);\n\n\t for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {\n\t var key = _keys[_i];\n\n\t if (actual[key] !== expected[key]) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}\n\n\tfunction isArrayExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrayExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAssignmentExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AssignmentExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBinaryExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BinaryExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterpreterDirective(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterpreterDirective\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDirective(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Directive\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDirectiveLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DirectiveLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBlockStatement$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BlockStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBreakStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BreakStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isCallExpression$6(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"CallExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isCatchClause(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"CatchClause\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isConditionalExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ConditionalExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isContinueStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ContinueStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDebuggerStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DebuggerStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDoWhileStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DoWhileStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEmptyStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EmptyStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExpressionStatement$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExpressionStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFile$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"File\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForInStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ForInStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForStatement$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ForStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIdentifier$g(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Identifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIfStatement$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"IfStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLabeledStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"LabeledStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStringLiteral$7(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StringLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumericLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumericLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNullLiteral$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NullLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBooleanLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BooleanLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRegExpLiteral$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RegExpLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLogicalExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"LogicalExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMemberExpression$8(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"MemberExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNewExpression$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NewExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isProgram$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Program\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectMethod$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectProperty$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRestElement$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RestElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isReturnStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ReturnStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSequenceExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SequenceExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isParenthesizedExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ParenthesizedExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSwitchCase(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SwitchCase\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSwitchStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SwitchStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isThisExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ThisExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isThrowStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ThrowStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTryStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TryStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUnaryExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"UnaryExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUpdateExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"UpdateExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVariableDeclaration$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"VariableDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVariableDeclarator$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"VariableDeclarator\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isWhileStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"WhileStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isWithStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"WithStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAssignmentPattern$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AssignmentPattern\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArrayPattern(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrayPattern\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArrowFunctionExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrowFunctionExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassBody$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassDeclaration$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportAllDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportAllDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportDefaultDeclaration$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportDefaultDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportNamedDeclaration$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportNamedDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportSpecifier(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForOfStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ForOfStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportDeclaration$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportDefaultSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportDefaultSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportNamespaceSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportNamespaceSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMetaProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"MetaProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassMethod$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectPattern$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectPattern\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSpreadElement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SpreadElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSuper$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Super\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTaggedTemplateExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TaggedTemplateExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTemplateElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TemplateElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTemplateLiteral$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TemplateLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isYieldExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"YieldExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAwaitExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AwaitExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImport(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Import\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBigIntLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BigIntLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportNamespaceSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportNamespaceSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOptionalMemberExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OptionalMemberExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOptionalCallExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OptionalCallExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassPrivateProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassPrivateProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassPrivateMethod(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassPrivateMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPrivateName$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PrivateName\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAnyTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AnyTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArrayTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrayTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBooleanTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BooleanTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBooleanLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BooleanLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNullLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NullLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassImplements(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassImplements\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareClass(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareClass\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareFunction(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareFunction\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareInterface(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareInterface\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareModule(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareModule\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareModuleExports(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareModuleExports\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareTypeAlias(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareTypeAlias\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareOpaqueType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareOpaqueType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareVariable(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareVariable\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareExportDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareExportDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareExportAllDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareExportAllDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclaredPredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclaredPredicate\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExistsTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExistsTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionTypeParam(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionTypeParam\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isGenericTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"GenericTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInferredPredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InferredPredicate\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterfaceExtends(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterfaceExtends\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterfaceDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterfaceDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterfaceTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterfaceTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIntersectionTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"IntersectionTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMixedTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"MixedTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEmptyTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EmptyTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNullableTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NullableTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumberLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumberLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumberTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumberTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeInternalSlot(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeInternalSlot\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeCallProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeCallProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeIndexer(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeIndexer\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeSpreadProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeSpreadProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOpaqueType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OpaqueType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isQualifiedTypeIdentifier(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"QualifiedTypeIdentifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStringLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StringLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStringTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StringTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSymbolTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SymbolTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isThisTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ThisTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTupleTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TupleTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeofTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeofTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeAlias(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeAlias\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeAnnotation$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeCastExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeCastExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeParameter(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeParameter\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeParameterDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeParameterDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeParameterInstantiation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeParameterInstantiation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUnionTypeAnnotation$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"UnionTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVariance(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Variance\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVoidTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"VoidTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumBooleanBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumBooleanBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumNumberBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumNumberBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumStringBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumStringBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumSymbolBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumSymbolBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumBooleanMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumBooleanMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumNumberMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumNumberMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumStringMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumStringMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumDefaultedMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumDefaultedMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIndexedAccessType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"IndexedAccessType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOptionalIndexedAccessType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OptionalIndexedAccessType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXAttribute(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXAttribute\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXClosingElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXClosingElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXEmptyExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXEmptyExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXExpressionContainer$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXExpressionContainer\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXSpreadChild(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXSpreadChild\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXIdentifier$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXIdentifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXMemberExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXMemberExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXNamespacedName$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXNamespacedName\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXOpeningElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXOpeningElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXSpreadAttribute$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXSpreadAttribute\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXText(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXText\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXFragment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXFragment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXOpeningFragment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXOpeningFragment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXClosingFragment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXClosingFragment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNoop(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Noop\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPlaceholder$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Placeholder\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isV8IntrinsicIdentifier(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"V8IntrinsicIdentifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArgumentPlaceholder(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArgumentPlaceholder\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBindExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BindExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportAttribute(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportAttribute\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDecorator(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Decorator\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDoExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DoExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportDefaultSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportDefaultSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRecordExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RecordExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTupleExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TupleExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDecimalLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DecimalLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStaticBlock(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StaticBlock\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isModuleExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ModuleExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTopicReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TopicReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPipelineTopicExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PipelineTopicExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPipelineBareFunction(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PipelineBareFunction\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPipelinePrimaryTopicReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PipelinePrimaryTopicReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSParameterProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSParameterProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSDeclareFunction(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSDeclareFunction\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSDeclareMethod(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSDeclareMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSQualifiedName(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSQualifiedName\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSCallSignatureDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSCallSignatureDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSConstructSignatureDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSConstructSignatureDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSPropertySignature(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSPropertySignature\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSMethodSignature(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSMethodSignature\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIndexSignature(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIndexSignature\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSAnyKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSAnyKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSBooleanKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSBooleanKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSBigIntKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSBigIntKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIntrinsicKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIntrinsicKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNeverKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNeverKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNullKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNullKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNumberKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNumberKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSObjectKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSObjectKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSStringKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSStringKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSSymbolKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSSymbolKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSUndefinedKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSUndefinedKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSUnknownKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSUnknownKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSVoidKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSVoidKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSThisType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSThisType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSFunctionType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSFunctionType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSConstructorType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSConstructorType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypePredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypePredicate\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeQuery(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeQuery\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSArrayType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSArrayType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTupleType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTupleType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSOptionalType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSOptionalType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSRestType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSRestType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNamedTupleMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNamedTupleMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSUnionType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSUnionType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIntersectionType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIntersectionType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSConditionalType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSConditionalType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSInferType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSInferType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSParenthesizedType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSParenthesizedType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeOperator(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeOperator\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIndexedAccessType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIndexedAccessType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSMappedType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSMappedType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSLiteralType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSLiteralType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSExpressionWithTypeArguments(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSExpressionWithTypeArguments\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSInterfaceDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSInterfaceDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSInterfaceBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSInterfaceBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeAliasDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeAliasDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSAsExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSAsExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeAssertion$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeAssertion\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSEnumDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSEnumDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSEnumMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSEnumMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSModuleDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSModuleDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSModuleBlock(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSModuleBlock\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSImportType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSImportType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSImportEqualsDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSImportEqualsDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSExternalModuleReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSExternalModuleReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNonNullExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNonNullExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSExportAssignment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSExportAssignment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNamespaceExportDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNamespaceExportDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeAnnotation$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeParameterInstantiation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeParameterInstantiation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeParameterDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeParameterDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeParameter(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeParameter\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExpression$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ArrayExpression\" === nodeType || \"AssignmentExpression\" === nodeType || \"BinaryExpression\" === nodeType || \"CallExpression\" === nodeType || \"ConditionalExpression\" === nodeType || \"FunctionExpression\" === nodeType || \"Identifier\" === nodeType || \"StringLiteral\" === nodeType || \"NumericLiteral\" === nodeType || \"NullLiteral\" === nodeType || \"BooleanLiteral\" === nodeType || \"RegExpLiteral\" === nodeType || \"LogicalExpression\" === nodeType || \"MemberExpression\" === nodeType || \"NewExpression\" === nodeType || \"ObjectExpression\" === nodeType || \"SequenceExpression\" === nodeType || \"ParenthesizedExpression\" === nodeType || \"ThisExpression\" === nodeType || \"UnaryExpression\" === nodeType || \"UpdateExpression\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassExpression\" === nodeType || \"MetaProperty\" === nodeType || \"Super\" === nodeType || \"TaggedTemplateExpression\" === nodeType || \"TemplateLiteral\" === nodeType || \"YieldExpression\" === nodeType || \"AwaitExpression\" === nodeType || \"Import\" === nodeType || \"BigIntLiteral\" === nodeType || \"OptionalMemberExpression\" === nodeType || \"OptionalCallExpression\" === nodeType || \"TypeCastExpression\" === nodeType || \"JSXElement\" === nodeType || \"JSXFragment\" === nodeType || \"BindExpression\" === nodeType || \"DoExpression\" === nodeType || \"RecordExpression\" === nodeType || \"TupleExpression\" === nodeType || \"DecimalLiteral\" === nodeType || \"ModuleExpression\" === nodeType || \"TopicReference\" === nodeType || \"PipelineTopicExpression\" === nodeType || \"PipelineBareFunction\" === nodeType || \"PipelinePrimaryTopicReference\" === nodeType || \"TSAsExpression\" === nodeType || \"TSTypeAssertion\" === nodeType || \"TSNonNullExpression\" === nodeType || nodeType === \"Placeholder\" && (\"Expression\" === node.expectedNode || \"Identifier\" === node.expectedNode || \"StringLiteral\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBinary$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BinaryExpression\" === nodeType || \"LogicalExpression\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isScopable(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"CatchClause\" === nodeType || \"DoWhileStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"Program\" === nodeType || \"ObjectMethod\" === nodeType || \"SwitchStatement\" === nodeType || \"WhileStatement\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassExpression\" === nodeType || \"ClassDeclaration\" === nodeType || \"ForOfStatement\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType || \"StaticBlock\" === nodeType || \"TSModuleBlock\" === nodeType || nodeType === \"Placeholder\" && \"BlockStatement\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBlockParent(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"CatchClause\" === nodeType || \"DoWhileStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"Program\" === nodeType || \"ObjectMethod\" === nodeType || \"SwitchStatement\" === nodeType || \"WhileStatement\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ForOfStatement\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType || \"StaticBlock\" === nodeType || \"TSModuleBlock\" === nodeType || nodeType === \"Placeholder\" && \"BlockStatement\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBlock(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"Program\" === nodeType || \"TSModuleBlock\" === nodeType || nodeType === \"Placeholder\" && \"BlockStatement\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStatement$7(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"BreakStatement\" === nodeType || \"ContinueStatement\" === nodeType || \"DebuggerStatement\" === nodeType || \"DoWhileStatement\" === nodeType || \"EmptyStatement\" === nodeType || \"ExpressionStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"FunctionDeclaration\" === nodeType || \"IfStatement\" === nodeType || \"LabeledStatement\" === nodeType || \"ReturnStatement\" === nodeType || \"SwitchStatement\" === nodeType || \"ThrowStatement\" === nodeType || \"TryStatement\" === nodeType || \"VariableDeclaration\" === nodeType || \"WhileStatement\" === nodeType || \"WithStatement\" === nodeType || \"ClassDeclaration\" === nodeType || \"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType || \"ForOfStatement\" === nodeType || \"ImportDeclaration\" === nodeType || \"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"OpaqueType\" === nodeType || \"TypeAlias\" === nodeType || \"EnumDeclaration\" === nodeType || \"TSDeclareFunction\" === nodeType || \"TSInterfaceDeclaration\" === nodeType || \"TSTypeAliasDeclaration\" === nodeType || \"TSEnumDeclaration\" === nodeType || \"TSModuleDeclaration\" === nodeType || \"TSImportEqualsDeclaration\" === nodeType || \"TSExportAssignment\" === nodeType || \"TSNamespaceExportDeclaration\" === nodeType || nodeType === \"Placeholder\" && (\"Statement\" === node.expectedNode || \"Declaration\" === node.expectedNode || \"BlockStatement\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTerminatorless(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BreakStatement\" === nodeType || \"ContinueStatement\" === nodeType || \"ReturnStatement\" === nodeType || \"ThrowStatement\" === nodeType || \"YieldExpression\" === nodeType || \"AwaitExpression\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isCompletionStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BreakStatement\" === nodeType || \"ContinueStatement\" === nodeType || \"ReturnStatement\" === nodeType || \"ThrowStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isConditional$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ConditionalExpression\" === nodeType || \"IfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLoop$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DoWhileStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"WhileStatement\" === nodeType || \"ForOfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isWhile(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DoWhileStatement\" === nodeType || \"WhileStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExpressionWrapper(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExpressionStatement\" === nodeType || \"ParenthesizedExpression\" === nodeType || \"TypeCastExpression\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFor$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"ForOfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForXStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ForInStatement\" === nodeType || \"ForOfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunction$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"ObjectMethod\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionParent(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"ObjectMethod\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPureish$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"StringLiteral\" === nodeType || \"NumericLiteral\" === nodeType || \"NullLiteral\" === nodeType || \"BooleanLiteral\" === nodeType || \"RegExpLiteral\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"BigIntLiteral\" === nodeType || \"DecimalLiteral\" === nodeType || nodeType === \"Placeholder\" && \"StringLiteral\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"VariableDeclaration\" === nodeType || \"ClassDeclaration\" === nodeType || \"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType || \"ImportDeclaration\" === nodeType || \"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"OpaqueType\" === nodeType || \"TypeAlias\" === nodeType || \"EnumDeclaration\" === nodeType || \"TSDeclareFunction\" === nodeType || \"TSInterfaceDeclaration\" === nodeType || \"TSTypeAliasDeclaration\" === nodeType || \"TSEnumDeclaration\" === nodeType || \"TSModuleDeclaration\" === nodeType || nodeType === \"Placeholder\" && \"Declaration\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPatternLike(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"Identifier\" === nodeType || \"RestElement\" === nodeType || \"AssignmentPattern\" === nodeType || \"ArrayPattern\" === nodeType || \"ObjectPattern\" === nodeType || nodeType === \"Placeholder\" && (\"Pattern\" === node.expectedNode || \"Identifier\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLVal(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"Identifier\" === nodeType || \"MemberExpression\" === nodeType || \"RestElement\" === nodeType || \"AssignmentPattern\" === nodeType || \"ArrayPattern\" === nodeType || \"ObjectPattern\" === nodeType || \"TSParameterProperty\" === nodeType || nodeType === \"Placeholder\" && (\"Pattern\" === node.expectedNode || \"Identifier\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSEntityName(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"Identifier\" === nodeType || \"TSQualifiedName\" === nodeType || nodeType === \"Placeholder\" && \"Identifier\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLiteral$7(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"StringLiteral\" === nodeType || \"NumericLiteral\" === nodeType || \"NullLiteral\" === nodeType || \"BooleanLiteral\" === nodeType || \"RegExpLiteral\" === nodeType || \"TemplateLiteral\" === nodeType || \"BigIntLiteral\" === nodeType || \"DecimalLiteral\" === nodeType || nodeType === \"Placeholder\" && \"StringLiteral\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUserWhitespacable(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectMethod\" === nodeType || \"ObjectProperty\" === nodeType || \"ObjectTypeInternalSlot\" === nodeType || \"ObjectTypeCallProperty\" === nodeType || \"ObjectTypeIndexer\" === nodeType || \"ObjectTypeProperty\" === nodeType || \"ObjectTypeSpreadProperty\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMethod$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectMethod\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectMethod\" === nodeType || \"ObjectProperty\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isProperty$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectProperty\" === nodeType || \"ClassProperty\" === nodeType || \"ClassPrivateProperty\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUnaryLike$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"UnaryExpression\" === nodeType || \"SpreadElement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPattern(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AssignmentPattern\" === nodeType || \"ArrayPattern\" === nodeType || \"ObjectPattern\" === nodeType || nodeType === \"Placeholder\" && \"Pattern\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClass$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ClassExpression\" === nodeType || \"ClassDeclaration\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isModuleDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType || \"ImportDeclaration\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportDeclaration$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isModuleSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExportSpecifier\" === nodeType || \"ImportDefaultSpecifier\" === nodeType || \"ImportNamespaceSpecifier\" === nodeType || \"ImportSpecifier\" === nodeType || \"ExportNamespaceSpecifier\" === nodeType || \"ExportDefaultSpecifier\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPrivate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ClassPrivateProperty\" === nodeType || \"ClassPrivateMethod\" === nodeType || \"PrivateName\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlow$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AnyTypeAnnotation\" === nodeType || \"ArrayTypeAnnotation\" === nodeType || \"BooleanTypeAnnotation\" === nodeType || \"BooleanLiteralTypeAnnotation\" === nodeType || \"NullLiteralTypeAnnotation\" === nodeType || \"ClassImplements\" === nodeType || \"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"DeclaredPredicate\" === nodeType || \"ExistsTypeAnnotation\" === nodeType || \"FunctionTypeAnnotation\" === nodeType || \"FunctionTypeParam\" === nodeType || \"GenericTypeAnnotation\" === nodeType || \"InferredPredicate\" === nodeType || \"InterfaceExtends\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"InterfaceTypeAnnotation\" === nodeType || \"IntersectionTypeAnnotation\" === nodeType || \"MixedTypeAnnotation\" === nodeType || \"EmptyTypeAnnotation\" === nodeType || \"NullableTypeAnnotation\" === nodeType || \"NumberLiteralTypeAnnotation\" === nodeType || \"NumberTypeAnnotation\" === nodeType || \"ObjectTypeAnnotation\" === nodeType || \"ObjectTypeInternalSlot\" === nodeType || \"ObjectTypeCallProperty\" === nodeType || \"ObjectTypeIndexer\" === nodeType || \"ObjectTypeProperty\" === nodeType || \"ObjectTypeSpreadProperty\" === nodeType || \"OpaqueType\" === nodeType || \"QualifiedTypeIdentifier\" === nodeType || \"StringLiteralTypeAnnotation\" === nodeType || \"StringTypeAnnotation\" === nodeType || \"SymbolTypeAnnotation\" === nodeType || \"ThisTypeAnnotation\" === nodeType || \"TupleTypeAnnotation\" === nodeType || \"TypeofTypeAnnotation\" === nodeType || \"TypeAlias\" === nodeType || \"TypeAnnotation\" === nodeType || \"TypeCastExpression\" === nodeType || \"TypeParameter\" === nodeType || \"TypeParameterDeclaration\" === nodeType || \"TypeParameterInstantiation\" === nodeType || \"UnionTypeAnnotation\" === nodeType || \"Variance\" === nodeType || \"VoidTypeAnnotation\" === nodeType || \"IndexedAccessType\" === nodeType || \"OptionalIndexedAccessType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AnyTypeAnnotation\" === nodeType || \"ArrayTypeAnnotation\" === nodeType || \"BooleanTypeAnnotation\" === nodeType || \"BooleanLiteralTypeAnnotation\" === nodeType || \"NullLiteralTypeAnnotation\" === nodeType || \"ExistsTypeAnnotation\" === nodeType || \"FunctionTypeAnnotation\" === nodeType || \"GenericTypeAnnotation\" === nodeType || \"InterfaceTypeAnnotation\" === nodeType || \"IntersectionTypeAnnotation\" === nodeType || \"MixedTypeAnnotation\" === nodeType || \"EmptyTypeAnnotation\" === nodeType || \"NullableTypeAnnotation\" === nodeType || \"NumberLiteralTypeAnnotation\" === nodeType || \"NumberTypeAnnotation\" === nodeType || \"ObjectTypeAnnotation\" === nodeType || \"StringLiteralTypeAnnotation\" === nodeType || \"StringTypeAnnotation\" === nodeType || \"SymbolTypeAnnotation\" === nodeType || \"ThisTypeAnnotation\" === nodeType || \"TupleTypeAnnotation\" === nodeType || \"TypeofTypeAnnotation\" === nodeType || \"UnionTypeAnnotation\" === nodeType || \"VoidTypeAnnotation\" === nodeType || \"IndexedAccessType\" === nodeType || \"OptionalIndexedAccessType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowBaseAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AnyTypeAnnotation\" === nodeType || \"BooleanTypeAnnotation\" === nodeType || \"NullLiteralTypeAnnotation\" === nodeType || \"MixedTypeAnnotation\" === nodeType || \"EmptyTypeAnnotation\" === nodeType || \"NumberTypeAnnotation\" === nodeType || \"StringTypeAnnotation\" === nodeType || \"SymbolTypeAnnotation\" === nodeType || \"ThisTypeAnnotation\" === nodeType || \"VoidTypeAnnotation\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"OpaqueType\" === nodeType || \"TypeAlias\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowPredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DeclaredPredicate\" === nodeType || \"InferredPredicate\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"EnumBooleanBody\" === nodeType || \"EnumNumberBody\" === nodeType || \"EnumStringBody\" === nodeType || \"EnumSymbolBody\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"EnumBooleanMember\" === nodeType || \"EnumNumberMember\" === nodeType || \"EnumStringMember\" === nodeType || \"EnumDefaultedMember\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSX(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"JSXAttribute\" === nodeType || \"JSXClosingElement\" === nodeType || \"JSXElement\" === nodeType || \"JSXEmptyExpression\" === nodeType || \"JSXExpressionContainer\" === nodeType || \"JSXSpreadChild\" === nodeType || \"JSXIdentifier\" === nodeType || \"JSXMemberExpression\" === nodeType || \"JSXNamespacedName\" === nodeType || \"JSXOpeningElement\" === nodeType || \"JSXSpreadAttribute\" === nodeType || \"JSXText\" === nodeType || \"JSXFragment\" === nodeType || \"JSXOpeningFragment\" === nodeType || \"JSXClosingFragment\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"TSCallSignatureDeclaration\" === nodeType || \"TSConstructSignatureDeclaration\" === nodeType || \"TSPropertySignature\" === nodeType || \"TSMethodSignature\" === nodeType || \"TSIndexSignature\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"TSAnyKeyword\" === nodeType || \"TSBooleanKeyword\" === nodeType || \"TSBigIntKeyword\" === nodeType || \"TSIntrinsicKeyword\" === nodeType || \"TSNeverKeyword\" === nodeType || \"TSNullKeyword\" === nodeType || \"TSNumberKeyword\" === nodeType || \"TSObjectKeyword\" === nodeType || \"TSStringKeyword\" === nodeType || \"TSSymbolKeyword\" === nodeType || \"TSUndefinedKeyword\" === nodeType || \"TSUnknownKeyword\" === nodeType || \"TSVoidKeyword\" === nodeType || \"TSThisType\" === nodeType || \"TSFunctionType\" === nodeType || \"TSConstructorType\" === nodeType || \"TSTypeReference\" === nodeType || \"TSTypePredicate\" === nodeType || \"TSTypeQuery\" === nodeType || \"TSTypeLiteral\" === nodeType || \"TSArrayType\" === nodeType || \"TSTupleType\" === nodeType || \"TSOptionalType\" === nodeType || \"TSRestType\" === nodeType || \"TSUnionType\" === nodeType || \"TSIntersectionType\" === nodeType || \"TSConditionalType\" === nodeType || \"TSInferType\" === nodeType || \"TSParenthesizedType\" === nodeType || \"TSTypeOperator\" === nodeType || \"TSIndexedAccessType\" === nodeType || \"TSMappedType\" === nodeType || \"TSLiteralType\" === nodeType || \"TSExpressionWithTypeArguments\" === nodeType || \"TSImportType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSBaseType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"TSAnyKeyword\" === nodeType || \"TSBooleanKeyword\" === nodeType || \"TSBigIntKeyword\" === nodeType || \"TSIntrinsicKeyword\" === nodeType || \"TSNeverKeyword\" === nodeType || \"TSNullKeyword\" === nodeType || \"TSNumberKeyword\" === nodeType || \"TSObjectKeyword\" === nodeType || \"TSStringKeyword\" === nodeType || \"TSSymbolKeyword\" === nodeType || \"TSUndefinedKeyword\" === nodeType || \"TSUnknownKeyword\" === nodeType || \"TSVoidKeyword\" === nodeType || \"TSThisType\" === nodeType || \"TSLiteralType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumberLiteral(node, opts) {\n\t console.trace(\"The node type NumberLiteral has been renamed to NumericLiteral\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumberLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRegexLiteral(node, opts) {\n\t console.trace(\"The node type RegexLiteral has been renamed to RegExpLiteral\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RegexLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRestProperty(node, opts) {\n\t console.trace(\"The node type RestProperty has been renamed to RestElement\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RestProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSpreadProperty(node, opts) {\n\t console.trace(\"The node type SpreadProperty has been renamed to SpreadElement\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SpreadProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction matchesPattern$2(member, match, allowPartial) {\n\t if (!isMemberExpression$8(member)) return false;\n\t var parts = Array.isArray(match) ? match : match.split(\".\");\n\t var nodes = [];\n\t var node;\n\n\t for (node = member; isMemberExpression$8(node); node = node.object) {\n\t nodes.push(node.property);\n\t }\n\n\t nodes.push(node);\n\t if (nodes.length < parts.length) return false;\n\t if (!allowPartial && nodes.length > parts.length) return false;\n\n\t for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {\n\t var _node = nodes[j];\n\t var value = void 0;\n\n\t if (isIdentifier$g(_node)) {\n\t value = _node.name;\n\t } else if (isStringLiteral$7(_node)) {\n\t value = _node.value;\n\t } else if (isThisExpression$2(_node)) {\n\t value = \"this\";\n\t } else {\n\t return false;\n\t }\n\n\t if (parts[i] !== value) return false;\n\t }\n\n\t return true;\n\t}\n\n\tfunction buildMatchMemberExpression$1(match, allowPartial) {\n\t var parts = match.split(\".\");\n\t return function (member) {\n\t return matchesPattern$2(member, parts, allowPartial);\n\t };\n\t}\n\n\tvar isReactComponent = buildMatchMemberExpression$1(\"React.Component\");\n\n\tfunction isCompatTag$1(tagName) {\n\t return !!tagName && /^[a-z]/.test(tagName);\n\t}\n\n\tvar fastProto = null;\n\n\tfunction FastObject(o) {\n\t if (fastProto !== null && typeof fastProto.property) {\n\t var result = fastProto;\n\t fastProto = FastObject.prototype = null;\n\t return result;\n\t }\n\n\t fastProto = FastObject.prototype = o == null ? Object.create(null) : o;\n\t return new FastObject();\n\t}\n\n\tFastObject();\n\n\tvar toFastProperties = function toFastproperties(o) {\n\t return FastObject(o);\n\t};\n\n\tvar browser$4 = createCommonjsModule(function (module) {\n\t var process = module.exports = {};\n\t var cachedSetTimeout;\n\t var cachedClearTimeout;\n\n\t function defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t }\n\n\t function defaultClearTimeout() {\n\t throw new Error('clearTimeout has not been defined');\n\t }\n\n\t (function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t })();\n\n\t function runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t return setTimeout(fun, 0);\n\t }\n\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\n\t try {\n\t return cachedSetTimeout(fun, 0);\n\t } catch (e) {\n\t try {\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch (e) {\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t }\n\n\t function runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t return clearTimeout(marker);\n\t }\n\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\n\t try {\n\t return cachedClearTimeout(marker);\n\t } catch (e) {\n\t try {\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e) {\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t }\n\n\t var queue = [];\n\t var draining = false;\n\t var currentQueue;\n\t var queueIndex = -1;\n\n\t function cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\n\t draining = false;\n\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t }\n\n\t function drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t var len = queue.length;\n\n\t while (len) {\n\t currentQueue = queue;\n\t queue = [];\n\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t }\n\n\t process.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\n\t queue.push(new Item(fun, args));\n\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t };\n\n\t function Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t }\n\n\t Item.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t };\n\n\t process.title = 'browser';\n\t process.browser = true;\n\t process.env = {};\n\t process.argv = [];\n\t process.version = '';\n\t process.versions = {};\n\n\t function noop() {}\n\n\t process.on = noop;\n\t process.addListener = noop;\n\t process.once = noop;\n\t process.off = noop;\n\t process.removeListener = noop;\n\t process.removeAllListeners = noop;\n\t process.emit = noop;\n\t process.prependListener = noop;\n\t process.prependOnceListener = noop;\n\n\t process.listeners = function (name) {\n\t return [];\n\t };\n\n\t process.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t };\n\n\t process.cwd = function () {\n\t return '/';\n\t };\n\n\t process.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t };\n\n\t process.umask = function () {\n\t return 0;\n\t };\n\t}, \"/$$rollup_base$$/node_modules/process\");\n\n\tfunction isType$2(nodeType, targetType) {\n\t if (nodeType === targetType) return true;\n\t if (ALIAS_KEYS[targetType]) return false;\n\t var aliases = FLIPPED_ALIAS_KEYS$3[targetType];\n\n\t if (aliases) {\n\t if (aliases[0] === nodeType) return true;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {\n\t var alias = _step.value;\n\t if (nodeType === alias) return true;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction isPlaceholderType(placeholderType, targetType) {\n\t if (placeholderType === targetType) return true;\n\t var aliases = PLACEHOLDERS_ALIAS[placeholderType];\n\n\t if (aliases) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {\n\t var alias = _step.value;\n\t if (targetType === alias) return true;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction is$1(type, node, opts) {\n\t if (!node) return false;\n\t var matches = isType$2(node.type, type);\n\n\t if (!matches) {\n\t if (!opts && node.type === \"Placeholder\" && type in FLIPPED_ALIAS_KEYS$3) {\n\t return isPlaceholderType(node.expectedNode, type);\n\t }\n\n\t return false;\n\t }\n\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t}\n\n\tvar nonASCIIidentifierStartChars = \"\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u09FC\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\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8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\";\n\tvar nonASCIIidentifierChars = \"\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D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u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u180F-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1ABF-\\u1ACE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\";\n\tvar nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\n\tvar nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\n\tnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\tvar astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];\n\tvar astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];\n\n\tfunction isInAstralSet(code, set) {\n\t var pos = 0x10000;\n\n\t for (var i = 0, length = set.length; i < length; i += 2) {\n\t pos += set[i];\n\t if (pos > code) return false;\n\t pos += set[i + 1];\n\t if (pos >= code) return true;\n\t }\n\n\t return false;\n\t}\n\n\tfunction isIdentifierStart(code) {\n\t if (code < 65) return code === 36;\n\t if (code <= 90) return true;\n\t if (code < 97) return code === 95;\n\t if (code <= 122) return true;\n\n\t if (code <= 0xffff) {\n\t return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n\t }\n\n\t return isInAstralSet(code, astralIdentifierStartCodes);\n\t}\n\tfunction isIdentifierChar(code) {\n\t if (code < 48) return code === 36;\n\t if (code < 58) return true;\n\t if (code < 65) return false;\n\t if (code <= 90) return true;\n\t if (code < 97) return code === 95;\n\t if (code <= 122) return true;\n\n\t if (code <= 0xffff) {\n\t return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n\t }\n\n\t return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n\t}\n\tfunction isIdentifierName(name) {\n\t var isFirst = true;\n\n\t for (var i = 0; i < name.length; i++) {\n\t var cp = name.charCodeAt(i);\n\n\t if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n\t var trail = name.charCodeAt(++i);\n\n\t if ((trail & 0xfc00) === 0xdc00) {\n\t cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n\t }\n\t }\n\n\t if (isFirst) {\n\t isFirst = false;\n\n\t if (!isIdentifierStart(cp)) {\n\t return false;\n\t }\n\t } else if (!isIdentifierChar(cp)) {\n\t return false;\n\t }\n\t }\n\n\t return !isFirst;\n\t}\n\n\tvar reservedWords = {\n\t keyword: [\"break\", \"case\", \"catch\", \"continue\", \"debugger\", \"default\", \"do\", \"else\", \"finally\", \"for\", \"function\", \"if\", \"return\", \"switch\", \"throw\", \"try\", \"var\", \"const\", \"while\", \"with\", \"new\", \"this\", \"super\", \"class\", \"extends\", \"export\", \"import\", \"null\", \"true\", \"false\", \"in\", \"instanceof\", \"typeof\", \"void\", \"delete\"],\n\t strict: [\"implements\", \"interface\", \"let\", \"package\", \"private\", \"protected\", \"public\", \"static\", \"yield\"],\n\t strictBind: [\"eval\", \"arguments\"]\n\t};\n\tvar keywords$1 = new Set(reservedWords.keyword);\n\tvar reservedWordsStrictSet = new Set(reservedWords.strict);\n\tvar reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\tfunction isReservedWord(word, inModule) {\n\t return inModule && word === \"await\" || word === \"enum\";\n\t}\n\tfunction isStrictReservedWord(word, inModule) {\n\t return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n\t}\n\tfunction isStrictBindOnlyReservedWord(word) {\n\t return reservedWordsStrictBindSet.has(word);\n\t}\n\tfunction isStrictBindReservedWord(word, inModule) {\n\t return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);\n\t}\n\tfunction isKeyword(word) {\n\t return keywords$1.has(word);\n\t}\n\n\tfunction isValidIdentifier$1(name, reserved) {\n\t if (reserved === void 0) {\n\t reserved = true;\n\t }\n\n\t if (typeof name !== \"string\") return false;\n\n\t if (reserved) {\n\t if (isKeyword(name) || isStrictReservedWord(name, true)) {\n\t return false;\n\t }\n\t }\n\n\t return isIdentifierName(name);\n\t}\n\n\tvar STATEMENT_OR_BLOCK_KEYS$1 = [\"consequent\", \"body\", \"alternate\"];\n\tvar FLATTENABLE_KEYS = [\"body\", \"expressions\"];\n\tvar FOR_INIT_KEYS = [\"left\", \"init\"];\n\tvar COMMENT_KEYS = [\"leadingComments\", \"trailingComments\", \"innerComments\"];\n\tvar LOGICAL_OPERATORS$2 = [\"||\", \"&&\", \"??\"];\n\tvar UPDATE_OPERATORS = [\"++\", \"--\"];\n\tvar BOOLEAN_NUMBER_BINARY_OPERATORS$1 = [\">\", \"<\", \">=\", \"<=\"];\n\tvar EQUALITY_BINARY_OPERATORS = [\"==\", \"===\", \"!=\", \"!==\"];\n\tvar COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, [\"in\", \"instanceof\"]);\n\tvar BOOLEAN_BINARY_OPERATORS$1 = [].concat(_toConsumableArray(COMPARISON_BINARY_OPERATORS), BOOLEAN_NUMBER_BINARY_OPERATORS$1);\n\tvar NUMBER_BINARY_OPERATORS$1 = [\"-\", \"/\", \"%\", \"*\", \"**\", \"&\", \"|\", \">>\", \">>>\", \"<<\", \"^\"];\n\tvar BINARY_OPERATORS = [\"+\"].concat(NUMBER_BINARY_OPERATORS$1, _toConsumableArray(BOOLEAN_BINARY_OPERATORS$1));\n\tvar ASSIGNMENT_OPERATORS = [\"=\", \"+=\"].concat(_toConsumableArray(NUMBER_BINARY_OPERATORS$1.map(function (op) {\n\t return op + \"=\";\n\t})), _toConsumableArray(LOGICAL_OPERATORS$2.map(function (op) {\n\t return op + \"=\";\n\t})));\n\tvar BOOLEAN_UNARY_OPERATORS$1 = [\"delete\", \"!\"];\n\tvar NUMBER_UNARY_OPERATORS$1 = [\"+\", \"-\", \"~\"];\n\tvar STRING_UNARY_OPERATORS$1 = [\"typeof\"];\n\tvar UNARY_OPERATORS = [\"void\", \"throw\"].concat(BOOLEAN_UNARY_OPERATORS$1, NUMBER_UNARY_OPERATORS$1, STRING_UNARY_OPERATORS$1);\n\tvar INHERIT_KEYS = {\n\t optional: [\"typeAnnotation\", \"typeParameters\", \"returnType\"],\n\t force: [\"start\", \"loc\", \"end\"]\n\t};\n\tvar BLOCK_SCOPED_SYMBOL = Symbol[\"for\"](\"var used to be block scoped\");\n\tvar NOT_LOCAL_BINDING$2 = Symbol[\"for\"](\"should not be considered a local binding\");\n\n\tfunction validate$6(node, key, val) {\n\t if (!node) return;\n\t var fields = NODE_FIELDS[node.type];\n\t if (!fields) return;\n\t var field = fields[key];\n\t validateField(node, key, val, field);\n\t validateChild(node, key, val);\n\t}\n\tfunction validateField(node, key, val, field) {\n\t if (!(field != null && field.validate)) return;\n\t if (field.optional && val == null) return;\n\t field.validate(node, key, val);\n\t}\n\tfunction validateChild(node, key, val) {\n\t if (val == null) return;\n\t var validate = NODE_PARENT_VALIDATIONS[val.type];\n\t if (!validate) return;\n\t validate(node, key, val);\n\t}\n\n\tvar VISITOR_KEYS$6 = {};\n\tvar ALIAS_KEYS = {};\n\tvar FLIPPED_ALIAS_KEYS$3 = {};\n\tvar NODE_FIELDS = {};\n\tvar BUILDER_KEYS = {};\n\tvar DEPRECATED_KEYS$1 = {};\n\tvar NODE_PARENT_VALIDATIONS = {};\n\n\tfunction getType$2(val) {\n\t if (Array.isArray(val)) {\n\t return \"array\";\n\t } else if (val === null) {\n\t return \"null\";\n\t } else {\n\t return typeof val;\n\t }\n\t}\n\n\tfunction validate$5(validate) {\n\t return {\n\t validate: validate\n\t };\n\t}\n\tfunction typeIs(typeName) {\n\t return typeof typeName === \"string\" ? assertNodeType(typeName) : assertNodeType.apply(void 0, _toConsumableArray(typeName));\n\t}\n\tfunction validateType(typeName) {\n\t return validate$5(typeIs(typeName));\n\t}\n\tfunction validateOptional(validate) {\n\t return {\n\t validate: validate,\n\t optional: true\n\t };\n\t}\n\tfunction validateOptionalType(typeName) {\n\t return {\n\t validate: typeIs(typeName),\n\t optional: true\n\t };\n\t}\n\tfunction arrayOf(elementType) {\n\t return chain$1(assertValueType(\"array\"), assertEach(elementType));\n\t}\n\tfunction arrayOfType(typeName) {\n\t return arrayOf(typeIs(typeName));\n\t}\n\tfunction validateArrayOfType(typeName) {\n\t return validate$5(arrayOfType(typeName));\n\t}\n\tfunction assertEach(callback) {\n\t function validator(node, key, val) {\n\t if (!Array.isArray(val)) return;\n\n\t for (var i = 0; i < val.length; i++) {\n\t var subkey = key + \"[\" + i + \"]\";\n\t var v = val[i];\n\t callback(node, subkey, v);\n\t if (browser$4.env.BABEL_TYPES_8_BREAKING) validateChild(node, subkey, v);\n\t }\n\t }\n\n\t validator.each = callback;\n\t return validator;\n\t}\n\tfunction assertOneOf() {\n\t for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n\t values[_key] = arguments[_key];\n\t }\n\n\t function validate(node, key, val) {\n\t if (values.indexOf(val) < 0) {\n\t throw new TypeError(\"Property \" + key + \" expected value to be one of \" + JSON.stringify(values) + \" but got \" + JSON.stringify(val));\n\t }\n\t }\n\n\t validate.oneOf = values;\n\t return validate;\n\t}\n\tfunction assertNodeType() {\n\t for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t types[_key2] = arguments[_key2];\n\t }\n\n\t function validate(node, key, val) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(types), _step; !(_step = _iterator()).done;) {\n\t var type = _step.value;\n\n\t if (is$1(type, val)) {\n\t validateChild(node, key, val);\n\t return;\n\t }\n\t }\n\n\t throw new TypeError(\"Property \" + key + \" of \" + node.type + \" expected node to be of a type \" + JSON.stringify(types) + \" but instead got \" + JSON.stringify(val == null ? void 0 : val.type));\n\t }\n\n\t validate.oneOfNodeTypes = types;\n\t return validate;\n\t}\n\tfunction assertNodeOrValueType() {\n\t for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t types[_key3] = arguments[_key3];\n\t }\n\n\t function validate(node, key, val) {\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(types), _step2; !(_step2 = _iterator2()).done;) {\n\t var type = _step2.value;\n\n\t if (getType$2(val) === type || is$1(type, val)) {\n\t validateChild(node, key, val);\n\t return;\n\t }\n\t }\n\n\t throw new TypeError(\"Property \" + key + \" of \" + node.type + \" expected node to be of a type \" + JSON.stringify(types) + \" but instead got \" + JSON.stringify(val == null ? void 0 : val.type));\n\t }\n\n\t validate.oneOfNodeOrValueTypes = types;\n\t return validate;\n\t}\n\tfunction assertValueType(type) {\n\t function validate(node, key, val) {\n\t var valid = getType$2(val) === type;\n\n\t if (!valid) {\n\t throw new TypeError(\"Property \" + key + \" expected type of \" + type + \" but got \" + getType$2(val));\n\t }\n\t }\n\n\t validate.type = type;\n\t return validate;\n\t}\n\tfunction assertShape(shape) {\n\t function validate(node, key, val) {\n\t var errors = [];\n\n\t for (var _i = 0, _Object$keys = Object.keys(shape); _i < _Object$keys.length; _i++) {\n\t var property = _Object$keys[_i];\n\n\t try {\n\t validateField(node, property, val[property], shape[property]);\n\t } catch (error) {\n\t if (error instanceof TypeError) {\n\t errors.push(error.message);\n\t continue;\n\t }\n\n\t throw error;\n\t }\n\t }\n\n\t if (errors.length) {\n\t throw new TypeError(\"Property \" + key + \" of \" + node.type + \" expected to have the following:\\n\" + errors.join(\"\\n\"));\n\t }\n\t }\n\n\t validate.shapeOf = shape;\n\t return validate;\n\t}\n\tfunction assertOptionalChainStart() {\n\t function validate(node) {\n\t var _current2;\n\n\t var current = node;\n\n\t while (node) {\n\t var _current = current,\n\t type = _current.type;\n\n\t if (type === \"OptionalCallExpression\") {\n\t if (current.optional) return;\n\t current = current.callee;\n\t continue;\n\t }\n\n\t if (type === \"OptionalMemberExpression\") {\n\t if (current.optional) return;\n\t current = current.object;\n\t continue;\n\t }\n\n\t break;\n\t }\n\n\t throw new TypeError(\"Non-optional \" + node.type + \" must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from \" + ((_current2 = current) == null ? void 0 : _current2.type));\n\t }\n\n\t return validate;\n\t}\n\tfunction chain$1() {\n\t for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t fns[_key4] = arguments[_key4];\n\t }\n\n\t function validate() {\n\t for (var _iterator3 = _createForOfIteratorHelperLoose(fns), _step3; !(_step3 = _iterator3()).done;) {\n\t var fn = _step3.value;\n\t fn.apply(void 0, arguments);\n\t }\n\t }\n\n\t validate.chainOf = fns;\n\n\t if (fns.length >= 2 && \"type\" in fns[0] && fns[0].type === \"array\" && !(\"each\" in fns[1])) {\n\t throw new Error(\"An assertValueType(\\\"array\\\") validator can only be followed by an assertEach(...) validator.\");\n\t }\n\n\t return validate;\n\t}\n\tvar validTypeOpts = [\"aliases\", \"builder\", \"deprecatedAlias\", \"fields\", \"inherits\", \"visitor\", \"validate\"];\n\tvar validFieldKeys = [\"default\", \"optional\", \"validate\"];\n\tfunction defineType(type, opts) {\n\t if (opts === void 0) {\n\t opts = {};\n\t }\n\n\t var inherits = opts.inherits && store[opts.inherits] || {};\n\t var fields = opts.fields;\n\n\t if (!fields) {\n\t fields = {};\n\n\t if (inherits.fields) {\n\t var keys = Object.getOwnPropertyNames(inherits.fields);\n\n\t for (var _iterator4 = _createForOfIteratorHelperLoose(keys), _step4; !(_step4 = _iterator4()).done;) {\n\t var _key5 = _step4.value;\n\t var field = inherits.fields[_key5];\n\t var def = field[\"default\"];\n\n\t if (Array.isArray(def) ? def.length > 0 : def && typeof def === \"object\") {\n\t throw new Error(\"field defaults can only be primitives or empty arrays currently\");\n\t }\n\n\t fields[_key5] = {\n\t \"default\": Array.isArray(def) ? [] : def,\n\t optional: field.optional,\n\t validate: field.validate\n\t };\n\t }\n\t }\n\t }\n\n\t var visitor = opts.visitor || inherits.visitor || [];\n\t var aliases = opts.aliases || inherits.aliases || [];\n\t var builder = opts.builder || inherits.builder || opts.visitor || [];\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(opts); _i2 < _Object$keys2.length; _i2++) {\n\t var k = _Object$keys2[_i2];\n\n\t if (validTypeOpts.indexOf(k) === -1) {\n\t throw new Error(\"Unknown type option \\\"\" + k + \"\\\" on \" + type);\n\t }\n\t }\n\n\t if (opts.deprecatedAlias) {\n\t DEPRECATED_KEYS$1[opts.deprecatedAlias] = type;\n\t }\n\n\t for (var _iterator5 = _createForOfIteratorHelperLoose(visitor.concat(builder)), _step5; !(_step5 = _iterator5()).done;) {\n\t var _key7 = _step5.value;\n\t fields[_key7] = fields[_key7] || {};\n\t }\n\n\t for (var _i3 = 0, _Object$keys3 = Object.keys(fields); _i3 < _Object$keys3.length; _i3++) {\n\t var _key6 = _Object$keys3[_i3];\n\t var _field = fields[_key6];\n\n\t if (_field[\"default\"] !== undefined && builder.indexOf(_key6) === -1) {\n\t _field.optional = true;\n\t }\n\n\t if (_field[\"default\"] === undefined) {\n\t _field[\"default\"] = null;\n\t } else if (!_field.validate && _field[\"default\"] != null) {\n\t _field.validate = assertValueType(getType$2(_field[\"default\"]));\n\t }\n\n\t for (var _i4 = 0, _Object$keys4 = Object.keys(_field); _i4 < _Object$keys4.length; _i4++) {\n\t var _k = _Object$keys4[_i4];\n\n\t if (validFieldKeys.indexOf(_k) === -1) {\n\t throw new Error(\"Unknown field key \\\"\" + _k + \"\\\" on \" + type + \".\" + _key6);\n\t }\n\t }\n\t }\n\n\t VISITOR_KEYS$6[type] = opts.visitor = visitor;\n\t BUILDER_KEYS[type] = opts.builder = builder;\n\t NODE_FIELDS[type] = opts.fields = fields;\n\t ALIAS_KEYS[type] = opts.aliases = aliases;\n\t aliases.forEach(function (alias) {\n\t FLIPPED_ALIAS_KEYS$3[alias] = FLIPPED_ALIAS_KEYS$3[alias] || [];\n\t FLIPPED_ALIAS_KEYS$3[alias].push(type);\n\t });\n\n\t if (opts.validate) {\n\t NODE_PARENT_VALIDATIONS[type] = opts.validate;\n\t }\n\n\t store[type] = opts;\n\t}\n\tvar store = {};\n\n\tdefineType(\"ArrayExpression\", {\n\t fields: {\n\t elements: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeOrValueType(\"null\", \"Expression\", \"SpreadElement\"))),\n\t \"default\": !browser$4.env.BABEL_TYPES_8_BREAKING ? [] : undefined\n\t }\n\t },\n\t visitor: [\"elements\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"AssignmentExpression\", {\n\t fields: {\n\t operator: {\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) {\n\t return assertValueType(\"string\");\n\t }\n\n\t var identifier = assertOneOf.apply(void 0, _toConsumableArray(ASSIGNMENT_OPERATORS));\n\t var pattern = assertOneOf(\"=\");\n\t return function (node, key, val) {\n\t var validator = is$1(\"Pattern\", node.left) ? pattern : identifier;\n\t validator(node, key, val);\n\t };\n\t }()\n\t },\n\t left: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"LVal\") : assertNodeType(\"Identifier\", \"MemberExpression\", \"ArrayPattern\", \"ObjectPattern\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t builder: [\"operator\", \"left\", \"right\"],\n\t visitor: [\"left\", \"right\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"BinaryExpression\", {\n\t builder: [\"operator\", \"left\", \"right\"],\n\t fields: {\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(BINARY_OPERATORS))\n\t },\n\t left: {\n\t validate: function () {\n\t var expression = assertNodeType(\"Expression\");\n\t var inOp = assertNodeType(\"Expression\", \"PrivateName\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.operator === \"in\" ? inOp : expression;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"PrivateName\"];\n\t return validator;\n\t }()\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t visitor: [\"left\", \"right\"],\n\t aliases: [\"Binary\", \"Expression\"]\n\t});\n\tdefineType(\"InterpreterDirective\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"Directive\", {\n\t visitor: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertNodeType(\"DirectiveLiteral\")\n\t }\n\t }\n\t});\n\tdefineType(\"DirectiveLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"BlockStatement\", {\n\t builder: [\"body\", \"directives\"],\n\t visitor: [\"directives\", \"body\"],\n\t fields: {\n\t directives: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Directive\"))),\n\t \"default\": []\n\t },\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\", \"Block\", \"Statement\"]\n\t});\n\tdefineType(\"BreakStatement\", {\n\t visitor: [\"label\"],\n\t fields: {\n\t label: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t }\n\t },\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"]\n\t});\n\tdefineType(\"CallExpression\", {\n\t visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n\t builder: [\"callee\", \"arguments\"],\n\t aliases: [\"Expression\"],\n\t fields: Object.assign({\n\t callee: {\n\t validate: assertNodeType(\"Expression\", \"V8IntrinsicIdentifier\")\n\t },\n\t arguments: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"SpreadElement\", \"JSXNamespacedName\", \"ArgumentPlaceholder\")))\n\t }\n\t }, !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t optional: {\n\t validate: assertOneOf(true, false),\n\t optional: true\n\t }\n\t } : {}, {\n\t typeArguments: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"CatchClause\", {\n\t visitor: [\"param\", \"body\"],\n\t fields: {\n\t param: {\n\t validate: assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\"]\n\t});\n\tdefineType(\"ConditionalExpression\", {\n\t visitor: [\"test\", \"consequent\", \"alternate\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t consequent: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t alternate: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Conditional\"]\n\t});\n\tdefineType(\"ContinueStatement\", {\n\t visitor: [\"label\"],\n\t fields: {\n\t label: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t }\n\t },\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"]\n\t});\n\tdefineType(\"DebuggerStatement\", {\n\t aliases: [\"Statement\"]\n\t});\n\tdefineType(\"DoWhileStatement\", {\n\t visitor: [\"test\", \"body\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t },\n\t aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"]\n\t});\n\tdefineType(\"EmptyStatement\", {\n\t aliases: [\"Statement\"]\n\t});\n\tdefineType(\"ExpressionStatement\", {\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Statement\", \"ExpressionWrapper\"]\n\t});\n\tdefineType(\"File\", {\n\t builder: [\"program\", \"comments\", \"tokens\"],\n\t visitor: [\"program\"],\n\t fields: {\n\t program: {\n\t validate: assertNodeType(\"Program\")\n\t },\n\t comments: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? Object.assign(function () {}, {\n\t each: {\n\t oneOfNodeTypes: [\"CommentBlock\", \"CommentLine\"]\n\t }\n\t }) : assertEach(assertNodeType(\"CommentBlock\", \"CommentLine\")),\n\t optional: true\n\t },\n\t tokens: {\n\t validate: assertEach(Object.assign(function () {}, {\n\t type: \"any\"\n\t })),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ForInStatement\", {\n\t visitor: [\"left\", \"right\", \"body\"],\n\t aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\", \"ForXStatement\"],\n\t fields: {\n\t left: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"VariableDeclaration\", \"LVal\") : assertNodeType(\"VariableDeclaration\", \"Identifier\", \"MemberExpression\", \"ArrayPattern\", \"ObjectPattern\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"ForStatement\", {\n\t visitor: [\"init\", \"test\", \"update\", \"body\"],\n\t aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\"],\n\t fields: {\n\t init: {\n\t validate: assertNodeType(\"VariableDeclaration\", \"Expression\"),\n\t optional: true\n\t },\n\t test: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t update: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tvar functionCommon = {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Identifier\", \"Pattern\", \"RestElement\")))\n\t },\n\t generator: {\n\t \"default\": false\n\t },\n\t async: {\n\t \"default\": false\n\t }\n\t};\n\tvar functionTypeAnnotationCommon = {\n\t returnType: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t }\n\t};\n\tvar functionDeclarationCommon = Object.assign({}, functionCommon, {\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t id: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t }\n\t});\n\tdefineType(\"FunctionDeclaration\", {\n\t builder: [\"id\", \"params\", \"body\", \"generator\", \"async\"],\n\t visitor: [\"id\", \"params\", \"body\", \"returnType\", \"typeParameters\"],\n\t fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t }),\n\t aliases: [\"Scopable\", \"Function\", \"BlockParent\", \"FunctionParent\", \"Statement\", \"Pureish\", \"Declaration\"],\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return function () {};\n\t var identifier = assertNodeType(\"Identifier\");\n\t return function (parent, key, node) {\n\t if (!is$1(\"ExportDefaultDeclaration\", parent)) {\n\t identifier(node, \"id\", node.id);\n\t }\n\t };\n\t }()\n\t});\n\tdefineType(\"FunctionExpression\", {\n\t inherits: \"FunctionDeclaration\",\n\t aliases: [\"Scopable\", \"Function\", \"BlockParent\", \"FunctionParent\", \"Expression\", \"Pureish\"],\n\t fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {\n\t id: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t })\n\t});\n\tvar patternLikeCommon = {\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\")))\n\t }\n\t};\n\tdefineType(\"Identifier\", {\n\t builder: [\"name\"],\n\t visitor: [\"typeAnnotation\", \"decorators\"],\n\t aliases: [\"Expression\", \"PatternLike\", \"LVal\", \"TSEntityName\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t name: {\n\t validate: chain$1(assertValueType(\"string\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (!isValidIdentifier$1(val, false)) {\n\t throw new TypeError(\"\\\"\" + val + \"\\\" is not a valid identifier name\");\n\t }\n\t }, {\n\t type: \"string\"\n\t }))\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t }),\n\t validate: function validate(parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var match = /\\.(\\w+)$/.exec(key);\n\t if (!match) return;\n\n\t var _match = _slicedToArray$1(match, 2),\n\t parentKey = _match[1];\n\n\t var nonComp = {\n\t computed: false\n\t };\n\n\t if (parentKey === \"property\") {\n\t if (is$1(\"MemberExpression\", parent, nonComp)) return;\n\t if (is$1(\"OptionalMemberExpression\", parent, nonComp)) return;\n\t } else if (parentKey === \"key\") {\n\t if (is$1(\"Property\", parent, nonComp)) return;\n\t if (is$1(\"Method\", parent, nonComp)) return;\n\t } else if (parentKey === \"exported\") {\n\t if (is$1(\"ExportSpecifier\", parent)) return;\n\t } else if (parentKey === \"imported\") {\n\t if (is$1(\"ImportSpecifier\", parent, {\n\t imported: node\n\t })) return;\n\t } else if (parentKey === \"meta\") {\n\t if (is$1(\"MetaProperty\", parent, {\n\t meta: node\n\t })) return;\n\t }\n\n\t if ((isKeyword(node.name) || isReservedWord(node.name, false)) && node.name !== \"this\") {\n\t throw new TypeError(\"\\\"\" + node.name + \"\\\" is not a valid identifier\");\n\t }\n\t }\n\t});\n\tdefineType(\"IfStatement\", {\n\t visitor: [\"test\", \"consequent\", \"alternate\"],\n\t aliases: [\"Statement\", \"Conditional\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t consequent: {\n\t validate: assertNodeType(\"Statement\")\n\t },\n\t alternate: {\n\t optional: true,\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"LabeledStatement\", {\n\t visitor: [\"label\", \"body\"],\n\t aliases: [\"Statement\"],\n\t fields: {\n\t label: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"StringLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"NumericLiteral\", {\n\t builder: [\"value\"],\n\t deprecatedAlias: \"NumberLiteral\",\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"number\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"NullLiteral\", {\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"BooleanLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"boolean\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"RegExpLiteral\", {\n\t builder: [\"pattern\", \"flags\"],\n\t deprecatedAlias: \"RegexLiteral\",\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\"],\n\t fields: {\n\t pattern: {\n\t validate: assertValueType(\"string\")\n\t },\n\t flags: {\n\t validate: chain$1(assertValueType(\"string\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var invalid = /[^gimsuy]/.exec(val);\n\n\t if (invalid) {\n\t throw new TypeError(\"\\\"\" + invalid[0] + \"\\\" is not a valid RegExp flag\");\n\t }\n\t }, {\n\t type: \"string\"\n\t })),\n\t \"default\": \"\"\n\t }\n\t }\n\t});\n\tdefineType(\"LogicalExpression\", {\n\t builder: [\"operator\", \"left\", \"right\"],\n\t visitor: [\"left\", \"right\"],\n\t aliases: [\"Binary\", \"Expression\"],\n\t fields: {\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(LOGICAL_OPERATORS$2))\n\t },\n\t left: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"MemberExpression\", {\n\t builder: [\"object\", \"property\", \"computed\"].concat(_toConsumableArray(!browser$4.env.BABEL_TYPES_8_BREAKING ? [\"optional\"] : [])),\n\t visitor: [\"object\", \"property\"],\n\t aliases: [\"Expression\", \"LVal\"],\n\t fields: Object.assign({\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t property: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\", \"PrivateName\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"PrivateName\"];\n\t return validator;\n\t }()\n\t },\n\t computed: {\n\t \"default\": false\n\t }\n\t }, !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t optional: {\n\t validate: assertOneOf(true, false),\n\t optional: true\n\t }\n\t } : {})\n\t});\n\tdefineType(\"NewExpression\", {\n\t inherits: \"CallExpression\"\n\t});\n\tdefineType(\"Program\", {\n\t visitor: [\"directives\", \"body\"],\n\t builder: [\"body\", \"directives\", \"sourceType\", \"interpreter\"],\n\t fields: {\n\t sourceFile: {\n\t validate: assertValueType(\"string\")\n\t },\n\t sourceType: {\n\t validate: assertOneOf(\"script\", \"module\"),\n\t \"default\": \"script\"\n\t },\n\t interpreter: {\n\t validate: assertNodeType(\"InterpreterDirective\"),\n\t \"default\": null,\n\t optional: true\n\t },\n\t directives: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Directive\"))),\n\t \"default\": []\n\t },\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\", \"Block\"]\n\t});\n\tdefineType(\"ObjectExpression\", {\n\t visitor: [\"properties\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t properties: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ObjectMethod\", \"ObjectProperty\", \"SpreadElement\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ObjectMethod\", {\n\t builder: [\"kind\", \"key\", \"params\", \"body\", \"computed\", \"generator\", \"async\"],\n\t fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {\n\t kind: Object.assign({\n\t validate: assertOneOf(\"method\", \"get\", \"set\")\n\t }, !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t \"default\": \"method\"\n\t } : {}),\n\t computed: {\n\t \"default\": false\n\t },\n\t key: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"StringLiteral\", \"NumericLiteral\"];\n\t return validator;\n\t }()\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t }),\n\t visitor: [\"key\", \"params\", \"body\", \"decorators\", \"returnType\", \"typeParameters\"],\n\t aliases: [\"UserWhitespacable\", \"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\", \"ObjectMember\"]\n\t});\n\tdefineType(\"ObjectProperty\", {\n\t builder: [\"key\", \"value\", \"computed\", \"shorthand\"].concat(_toConsumableArray(!browser$4.env.BABEL_TYPES_8_BREAKING ? [\"decorators\"] : [])),\n\t fields: {\n\t computed: {\n\t \"default\": false\n\t },\n\t key: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"StringLiteral\", \"NumericLiteral\"];\n\t return validator;\n\t }()\n\t },\n\t value: {\n\t validate: assertNodeType(\"Expression\", \"PatternLike\")\n\t },\n\t shorthand: {\n\t validate: chain$1(assertValueType(\"boolean\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && node.computed) {\n\t throw new TypeError(\"Property shorthand of ObjectProperty cannot be true if computed is true\");\n\t }\n\t }, {\n\t type: \"boolean\"\n\t }), function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && !is$1(\"Identifier\", node.key)) {\n\t throw new TypeError(\"Property shorthand of ObjectProperty cannot be true if key is not an Identifier\");\n\t }\n\t }),\n\t \"default\": false\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t },\n\t visitor: [\"key\", \"value\", \"decorators\"],\n\t aliases: [\"UserWhitespacable\", \"Property\", \"ObjectMember\"],\n\t validate: function () {\n\t var pattern = assertNodeType(\"Identifier\", \"Pattern\");\n\t var expression = assertNodeType(\"Expression\");\n\t return function (parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var validator = is$1(\"ObjectPattern\", parent) ? pattern : expression;\n\t validator(node, \"value\", node.value);\n\t };\n\t }()\n\t});\n\tdefineType(\"RestElement\", {\n\t visitor: [\"argument\", \"typeAnnotation\"],\n\t builder: [\"argument\"],\n\t aliases: [\"LVal\", \"PatternLike\"],\n\t deprecatedAlias: \"RestProperty\",\n\t fields: Object.assign({}, patternLikeCommon, {\n\t argument: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"LVal\") : assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\", \"MemberExpression\")\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t }),\n\t validate: function validate(parent, key) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var match = /(\\w+)\\[(\\d+)\\]/.exec(key);\n\t if (!match) throw new Error(\"Internal Babel error: malformed key.\");\n\n\t var _match2 = _slicedToArray$1(match, 3),\n\t listKey = _match2[1],\n\t index = _match2[2];\n\n\t if (parent[listKey].length > index + 1) {\n\t throw new TypeError(\"RestElement must be last element of \" + listKey);\n\t }\n\t }\n\t});\n\tdefineType(\"ReturnStatement\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"SequenceExpression\", {\n\t visitor: [\"expressions\"],\n\t fields: {\n\t expressions: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\")))\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"ParenthesizedExpression\", {\n\t visitor: [\"expression\"],\n\t aliases: [\"Expression\", \"ExpressionWrapper\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"SwitchCase\", {\n\t visitor: [\"test\", \"consequent\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t consequent: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t }\n\t});\n\tdefineType(\"SwitchStatement\", {\n\t visitor: [\"discriminant\", \"cases\"],\n\t aliases: [\"Statement\", \"BlockParent\", \"Scopable\"],\n\t fields: {\n\t discriminant: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t cases: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"SwitchCase\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ThisExpression\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"ThrowStatement\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"TryStatement\", {\n\t visitor: [\"block\", \"handler\", \"finalizer\"],\n\t aliases: [\"Statement\"],\n\t fields: {\n\t block: {\n\t validate: chain$1(assertNodeType(\"BlockStatement\"), Object.assign(function (node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (!node.handler && !node.finalizer) {\n\t throw new TypeError(\"TryStatement expects either a handler or finalizer, or both\");\n\t }\n\t }, {\n\t oneOfNodeTypes: [\"BlockStatement\"]\n\t }))\n\t },\n\t handler: {\n\t optional: true,\n\t validate: assertNodeType(\"CatchClause\")\n\t },\n\t finalizer: {\n\t optional: true,\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t }\n\t});\n\tdefineType(\"UnaryExpression\", {\n\t builder: [\"operator\", \"argument\", \"prefix\"],\n\t fields: {\n\t prefix: {\n\t \"default\": true\n\t },\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(UNARY_OPERATORS))\n\t }\n\t },\n\t visitor: [\"argument\"],\n\t aliases: [\"UnaryLike\", \"Expression\"]\n\t});\n\tdefineType(\"UpdateExpression\", {\n\t builder: [\"operator\", \"argument\", \"prefix\"],\n\t fields: {\n\t prefix: {\n\t \"default\": false\n\t },\n\t argument: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"Expression\") : assertNodeType(\"Identifier\", \"MemberExpression\")\n\t },\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(UPDATE_OPERATORS))\n\t }\n\t },\n\t visitor: [\"argument\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"VariableDeclaration\", {\n\t builder: [\"kind\", \"declarations\"],\n\t visitor: [\"declarations\"],\n\t aliases: [\"Statement\", \"Declaration\"],\n\t fields: {\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t kind: {\n\t validate: assertOneOf(\"var\", \"let\", \"const\")\n\t },\n\t declarations: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"VariableDeclarator\")))\n\t }\n\t },\n\t validate: function validate(parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t if (!is$1(\"ForXStatement\", parent, {\n\t left: node\n\t })) return;\n\n\t if (node.declarations.length !== 1) {\n\t throw new TypeError(\"Exactly one VariableDeclarator is required in the VariableDeclaration of a \" + parent.type);\n\t }\n\t }\n\t});\n\tdefineType(\"VariableDeclarator\", {\n\t visitor: [\"id\", \"init\"],\n\t fields: {\n\t id: {\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) {\n\t return assertNodeType(\"LVal\");\n\t }\n\n\t var normal = assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\");\n\t var without = assertNodeType(\"Identifier\");\n\t return function (node, key, val) {\n\t var validator = node.init ? normal : without;\n\t validator(node, key, val);\n\t };\n\t }()\n\t },\n\t definite: {\n\t optional: true,\n\t validate: assertValueType(\"boolean\")\n\t },\n\t init: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"WhileStatement\", {\n\t visitor: [\"test\", \"body\"],\n\t aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"WithStatement\", {\n\t visitor: [\"object\", \"body\"],\n\t aliases: [\"Statement\"],\n\t fields: {\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"AssignmentPattern\", {\n\t visitor: [\"left\", \"right\", \"decorators\"],\n\t builder: [\"left\", \"right\"],\n\t aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t left: {\n\t validate: assertNodeType(\"Identifier\", \"ObjectPattern\", \"ArrayPattern\", \"MemberExpression\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"ArrayPattern\", {\n\t visitor: [\"elements\", \"typeAnnotation\"],\n\t builder: [\"elements\"],\n\t aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t elements: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeOrValueType(\"null\", \"PatternLike\")))\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"ArrowFunctionExpression\", {\n\t builder: [\"params\", \"body\", \"async\"],\n\t visitor: [\"params\", \"body\", \"returnType\", \"typeParameters\"],\n\t aliases: [\"Scopable\", \"Function\", \"BlockParent\", \"FunctionParent\", \"Expression\", \"Pureish\"],\n\t fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {\n\t expression: {\n\t validate: assertValueType(\"boolean\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\", \"Expression\")\n\t }\n\t })\n\t});\n\tdefineType(\"ClassBody\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ClassMethod\", \"ClassPrivateMethod\", \"ClassProperty\", \"ClassPrivateProperty\", \"TSDeclareMethod\", \"TSIndexSignature\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ClassExpression\", {\n\t builder: [\"id\", \"superClass\", \"body\", \"decorators\"],\n\t visitor: [\"id\", \"body\", \"superClass\", \"mixins\", \"typeParameters\", \"superTypeParameters\", \"implements\", \"decorators\"],\n\t aliases: [\"Scopable\", \"Class\", \"Expression\"],\n\t fields: {\n\t id: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"ClassBody\")\n\t },\n\t superClass: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t superTypeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t \"implements\": {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"))),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t mixins: {\n\t validate: assertNodeType(\"InterfaceExtends\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ClassDeclaration\", {\n\t inherits: \"ClassExpression\",\n\t aliases: [\"Scopable\", \"Class\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"ClassBody\")\n\t },\n\t superClass: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t superTypeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t \"implements\": {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"))),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t mixins: {\n\t validate: assertNodeType(\"InterfaceExtends\"),\n\t optional: true\n\t },\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t \"abstract\": {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t },\n\t validate: function () {\n\t var identifier = assertNodeType(\"Identifier\");\n\t return function (parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (!is$1(\"ExportDefaultDeclaration\", parent)) {\n\t identifier(node, \"id\", node.id);\n\t }\n\t };\n\t }()\n\t});\n\tdefineType(\"ExportAllDeclaration\", {\n\t visitor: [\"source\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\", \"ExportDeclaration\"],\n\t fields: {\n\t source: {\n\t validate: assertNodeType(\"StringLiteral\")\n\t },\n\t exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n\t assertions: {\n\t optional: true,\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportAttribute\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ExportDefaultDeclaration\", {\n\t visitor: [\"declaration\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\", \"ExportDeclaration\"],\n\t fields: {\n\t declaration: {\n\t validate: assertNodeType(\"FunctionDeclaration\", \"TSDeclareFunction\", \"ClassDeclaration\", \"Expression\")\n\t },\n\t exportKind: validateOptional(assertOneOf(\"value\"))\n\t }\n\t});\n\tdefineType(\"ExportNamedDeclaration\", {\n\t visitor: [\"declaration\", \"specifiers\", \"source\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\", \"ExportDeclaration\"],\n\t fields: {\n\t declaration: {\n\t optional: true,\n\t validate: chain$1(assertNodeType(\"Declaration\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && node.specifiers.length) {\n\t throw new TypeError(\"Only declaration or specifiers is allowed on ExportNamedDeclaration\");\n\t }\n\t }, {\n\t oneOfNodeTypes: [\"Declaration\"]\n\t }), function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && node.source) {\n\t throw new TypeError(\"Cannot export a declaration from a source\");\n\t }\n\t })\n\t },\n\t assertions: {\n\t optional: true,\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportAttribute\")))\n\t },\n\t specifiers: {\n\t \"default\": [],\n\t validate: chain$1(assertValueType(\"array\"), assertEach(function () {\n\t var sourced = assertNodeType(\"ExportSpecifier\", \"ExportDefaultSpecifier\", \"ExportNamespaceSpecifier\");\n\t var sourceless = assertNodeType(\"ExportSpecifier\");\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return sourced;\n\t return function (node, key, val) {\n\t var validator = node.source ? sourced : sourceless;\n\t validator(node, key, val);\n\t };\n\t }()))\n\t },\n\t source: {\n\t validate: assertNodeType(\"StringLiteral\"),\n\t optional: true\n\t },\n\t exportKind: validateOptional(assertOneOf(\"type\", \"value\"))\n\t }\n\t});\n\tdefineType(\"ExportSpecifier\", {\n\t visitor: [\"local\", \"exported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t exported: {\n\t validate: assertNodeType(\"Identifier\", \"StringLiteral\")\n\t }\n\t }\n\t});\n\tdefineType(\"ForOfStatement\", {\n\t visitor: [\"left\", \"right\", \"body\"],\n\t builder: [\"left\", \"right\", \"body\", \"await\"],\n\t aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\", \"ForXStatement\"],\n\t fields: {\n\t left: {\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) {\n\t return assertNodeType(\"VariableDeclaration\", \"LVal\");\n\t }\n\n\t var declaration = assertNodeType(\"VariableDeclaration\");\n\t var lval = assertNodeType(\"Identifier\", \"MemberExpression\", \"ArrayPattern\", \"ObjectPattern\");\n\t return function (node, key, val) {\n\t if (is$1(\"VariableDeclaration\", val)) {\n\t declaration(node, key, val);\n\t } else {\n\t lval(node, key, val);\n\t }\n\t };\n\t }()\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t },\n\t \"await\": {\n\t \"default\": false\n\t }\n\t }\n\t});\n\tdefineType(\"ImportDeclaration\", {\n\t visitor: [\"specifiers\", \"source\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\"],\n\t fields: {\n\t assertions: {\n\t optional: true,\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportAttribute\")))\n\t },\n\t specifiers: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportSpecifier\", \"ImportDefaultSpecifier\", \"ImportNamespaceSpecifier\")))\n\t },\n\t source: {\n\t validate: assertNodeType(\"StringLiteral\")\n\t },\n\t importKind: {\n\t validate: assertOneOf(\"type\", \"typeof\", \"value\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ImportDefaultSpecifier\", {\n\t visitor: [\"local\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"ImportNamespaceSpecifier\", {\n\t visitor: [\"local\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"ImportSpecifier\", {\n\t visitor: [\"local\", \"imported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t imported: {\n\t validate: assertNodeType(\"Identifier\", \"StringLiteral\")\n\t },\n\t importKind: {\n\t validate: assertOneOf(\"type\", \"typeof\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"MetaProperty\", {\n\t visitor: [\"meta\", \"property\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t meta: {\n\t validate: chain$1(assertNodeType(\"Identifier\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var property;\n\n\t switch (val.name) {\n\t case \"function\":\n\t property = \"sent\";\n\t break;\n\n\t case \"new\":\n\t property = \"target\";\n\t break;\n\n\t case \"import\":\n\t property = \"meta\";\n\t break;\n\t }\n\n\t if (!is$1(\"Identifier\", node.property, {\n\t name: property\n\t })) {\n\t throw new TypeError(\"Unrecognised MetaProperty\");\n\t }\n\t }, {\n\t oneOfNodeTypes: [\"Identifier\"]\n\t }))\n\t },\n\t property: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tvar classMethodOrPropertyCommon = {\n\t \"abstract\": {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t accessibility: {\n\t validate: assertOneOf(\"public\", \"private\", \"protected\"),\n\t optional: true\n\t },\n\t \"static\": {\n\t \"default\": false\n\t },\n\t override: {\n\t \"default\": false\n\t },\n\t computed: {\n\t \"default\": false\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t key: {\n\t validate: chain$1(function () {\n\t var normal = assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\");\n\t var computed = assertNodeType(\"Expression\");\n\t return function (node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\t }(), assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\", \"Expression\"))\n\t }\n\t};\n\tvar classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Identifier\", \"Pattern\", \"RestElement\", \"TSParameterProperty\")))\n\t },\n\t kind: {\n\t validate: assertOneOf(\"get\", \"set\", \"method\", \"constructor\"),\n\t \"default\": \"method\"\n\t },\n\t access: {\n\t validate: chain$1(assertValueType(\"string\"), assertOneOf(\"public\", \"private\", \"protected\")),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t});\n\tdefineType(\"ClassMethod\", {\n\t aliases: [\"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\"],\n\t builder: [\"kind\", \"key\", \"params\", \"body\", \"computed\", \"static\", \"generator\", \"async\"],\n\t visitor: [\"key\", \"params\", \"body\", \"decorators\", \"returnType\", \"typeParameters\"],\n\t fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t })\n\t});\n\tdefineType(\"ObjectPattern\", {\n\t visitor: [\"properties\", \"typeAnnotation\", \"decorators\"],\n\t builder: [\"properties\"],\n\t aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t properties: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"RestElement\", \"ObjectProperty\")))\n\t }\n\t })\n\t});\n\tdefineType(\"SpreadElement\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"UnaryLike\"],\n\t deprecatedAlias: \"SpreadProperty\",\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"Super\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"TaggedTemplateExpression\", {\n\t visitor: [\"tag\", \"quasi\", \"typeParameters\"],\n\t builder: [\"tag\", \"quasi\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t tag: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t quasi: {\n\t validate: assertNodeType(\"TemplateLiteral\")\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"TemplateElement\", {\n\t builder: [\"value\", \"tail\"],\n\t fields: {\n\t value: {\n\t validate: assertShape({\n\t raw: {\n\t validate: assertValueType(\"string\")\n\t },\n\t cooked: {\n\t validate: assertValueType(\"string\"),\n\t optional: true\n\t }\n\t })\n\t },\n\t tail: {\n\t \"default\": false\n\t }\n\t }\n\t});\n\tdefineType(\"TemplateLiteral\", {\n\t visitor: [\"quasis\", \"expressions\"],\n\t aliases: [\"Expression\", \"Literal\"],\n\t fields: {\n\t quasis: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TemplateElement\")))\n\t },\n\t expressions: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"TSType\")), function (node, key, val) {\n\t if (node.quasis.length !== val.length + 1) {\n\t throw new TypeError(\"Number of \" + node.type + \" quasis should be exactly one more than the number of expressions.\\nExpected \" + (val.length + 1) + \" quasis but got \" + node.quasis.length);\n\t }\n\t })\n\t }\n\t }\n\t});\n\tdefineType(\"YieldExpression\", {\n\t builder: [\"argument\", \"delegate\"],\n\t visitor: [\"argument\"],\n\t aliases: [\"Expression\", \"Terminatorless\"],\n\t fields: {\n\t delegate: {\n\t validate: chain$1(assertValueType(\"boolean\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && !node.argument) {\n\t throw new TypeError(\"Property delegate of YieldExpression cannot be true if there is no argument\");\n\t }\n\t }, {\n\t type: \"boolean\"\n\t })),\n\t \"default\": false\n\t },\n\t argument: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"AwaitExpression\", {\n\t builder: [\"argument\"],\n\t visitor: [\"argument\"],\n\t aliases: [\"Expression\", \"Terminatorless\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"Import\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"BigIntLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"ExportNamespaceSpecifier\", {\n\t visitor: [\"exported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t exported: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"OptionalMemberExpression\", {\n\t builder: [\"object\", \"property\", \"computed\", \"optional\"],\n\t visitor: [\"object\", \"property\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t property: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\"];\n\t return validator;\n\t }()\n\t },\n\t computed: {\n\t \"default\": false\n\t },\n\t optional: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertValueType(\"boolean\") : chain$1(assertValueType(\"boolean\"), assertOptionalChainStart())\n\t }\n\t }\n\t});\n\tdefineType(\"OptionalCallExpression\", {\n\t visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n\t builder: [\"callee\", \"arguments\", \"optional\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t callee: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t arguments: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"SpreadElement\", \"JSXNamespacedName\", \"ArgumentPlaceholder\")))\n\t },\n\t optional: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertValueType(\"boolean\") : chain$1(assertValueType(\"boolean\"), assertOptionalChainStart())\n\t },\n\t typeArguments: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ClassProperty\", {\n\t visitor: [\"key\", \"value\", \"typeAnnotation\", \"decorators\"],\n\t builder: [\"key\", \"value\", \"typeAnnotation\", \"decorators\", \"computed\", \"static\"],\n\t aliases: [\"Property\"],\n\t fields: Object.assign({}, classMethodOrPropertyCommon, {\n\t value: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t definite: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t readonly: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t variance: {\n\t validate: assertNodeType(\"Variance\"),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"ClassPrivateProperty\", {\n\t visitor: [\"key\", \"value\", \"decorators\", \"typeAnnotation\"],\n\t builder: [\"key\", \"value\", \"decorators\", \"static\"],\n\t aliases: [\"Property\", \"Private\"],\n\t fields: {\n\t key: {\n\t validate: assertNodeType(\"PrivateName\")\n\t },\n\t value: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t readonly: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t definite: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t variance: {\n\t validate: assertNodeType(\"Variance\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ClassPrivateMethod\", {\n\t builder: [\"kind\", \"key\", \"params\", \"body\", \"static\"],\n\t visitor: [\"key\", \"params\", \"body\", \"decorators\", \"returnType\", \"typeParameters\"],\n\t aliases: [\"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\", \"Private\"],\n\t fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {\n\t key: {\n\t validate: assertNodeType(\"PrivateName\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t })\n\t});\n\tdefineType(\"PrivateName\", {\n\t visitor: [\"id\"],\n\t aliases: [\"Private\"],\n\t fields: {\n\t id: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\n\tvar defineInterfaceishType = function defineInterfaceishType(name, typeParameterType) {\n\t if (typeParameterType === void 0) {\n\t typeParameterType = \"TypeParameterDeclaration\";\n\t }\n\n\t defineType(name, {\n\t builder: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n\t visitor: [\"id\", \"typeParameters\", \"extends\", \"mixins\", \"implements\", \"body\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(typeParameterType),\n\t \"extends\": validateOptional(arrayOfType(\"InterfaceExtends\")),\n\t mixins: validateOptional(arrayOfType(\"InterfaceExtends\")),\n\t \"implements\": validateOptional(arrayOfType(\"ClassImplements\")),\n\t body: validateType(\"ObjectTypeAnnotation\")\n\t }\n\t });\n\t};\n\n\tdefineType(\"AnyTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ArrayTypeAnnotation\", {\n\t visitor: [\"elementType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t elementType: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"BooleanTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"BooleanLiteralTypeAnnotation\", {\n\t builder: [\"value\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t value: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"NullLiteralTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ClassImplements\", {\n\t visitor: [\"id\", \"typeParameters\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterInstantiation\")\n\t }\n\t});\n\tdefineInterfaceishType(\"DeclareClass\");\n\tdefineType(\"DeclareFunction\", {\n\t visitor: [\"id\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t predicate: validateOptionalType(\"DeclaredPredicate\")\n\t }\n\t});\n\tdefineInterfaceishType(\"DeclareInterface\");\n\tdefineType(\"DeclareModule\", {\n\t builder: [\"id\", \"body\", \"kind\"],\n\t visitor: [\"id\", \"body\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"StringLiteral\"]),\n\t body: validateType(\"BlockStatement\"),\n\t kind: validateOptional(assertOneOf(\"CommonJS\", \"ES\"))\n\t }\n\t});\n\tdefineType(\"DeclareModuleExports\", {\n\t visitor: [\"typeAnnotation\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TypeAnnotation\")\n\t }\n\t});\n\tdefineType(\"DeclareTypeAlias\", {\n\t visitor: [\"id\", \"typeParameters\", \"right\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t right: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"DeclareOpaqueType\", {\n\t visitor: [\"id\", \"typeParameters\", \"supertype\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t supertype: validateOptionalType(\"FlowType\"),\n\t impltype: validateOptionalType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"DeclareVariable\", {\n\t visitor: [\"id\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\")\n\t }\n\t});\n\tdefineType(\"DeclareExportDeclaration\", {\n\t visitor: [\"declaration\", \"specifiers\", \"source\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t declaration: validateOptionalType(\"Flow\"),\n\t specifiers: validateOptional(arrayOfType([\"ExportSpecifier\", \"ExportNamespaceSpecifier\"])),\n\t source: validateOptionalType(\"StringLiteral\"),\n\t \"default\": validateOptional(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"DeclareExportAllDeclaration\", {\n\t visitor: [\"source\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t source: validateType(\"StringLiteral\"),\n\t exportKind: validateOptional(assertOneOf(\"type\", \"value\"))\n\t }\n\t});\n\tdefineType(\"DeclaredPredicate\", {\n\t visitor: [\"value\"],\n\t aliases: [\"Flow\", \"FlowPredicate\"],\n\t fields: {\n\t value: validateType(\"Flow\")\n\t }\n\t});\n\tdefineType(\"ExistsTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\"]\n\t});\n\tdefineType(\"FunctionTypeAnnotation\", {\n\t visitor: [\"typeParameters\", \"params\", \"rest\", \"returnType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t params: validate$5(arrayOfType(\"FunctionTypeParam\")),\n\t rest: validateOptionalType(\"FunctionTypeParam\"),\n\t \"this\": validateOptionalType(\"FunctionTypeParam\"),\n\t returnType: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"FunctionTypeParam\", {\n\t visitor: [\"name\", \"typeAnnotation\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t name: validateOptionalType(\"Identifier\"),\n\t typeAnnotation: validateType(\"FlowType\"),\n\t optional: validateOptional(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"GenericTypeAnnotation\", {\n\t visitor: [\"id\", \"typeParameters\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n\t typeParameters: validateOptionalType(\"TypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"InferredPredicate\", {\n\t aliases: [\"Flow\", \"FlowPredicate\"]\n\t});\n\tdefineType(\"InterfaceExtends\", {\n\t visitor: [\"id\", \"typeParameters\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n\t typeParameters: validateOptionalType(\"TypeParameterInstantiation\")\n\t }\n\t});\n\tdefineInterfaceishType(\"InterfaceDeclaration\");\n\tdefineType(\"InterfaceTypeAnnotation\", {\n\t visitor: [\"extends\", \"body\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t \"extends\": validateOptional(arrayOfType(\"InterfaceExtends\")),\n\t body: validateType(\"ObjectTypeAnnotation\")\n\t }\n\t});\n\tdefineType(\"IntersectionTypeAnnotation\", {\n\t visitor: [\"types\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t types: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"MixedTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"EmptyTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"NullableTypeAnnotation\", {\n\t visitor: [\"typeAnnotation\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t typeAnnotation: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"NumberLiteralTypeAnnotation\", {\n\t builder: [\"value\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t value: validate$5(assertValueType(\"number\"))\n\t }\n\t});\n\tdefineType(\"NumberTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ObjectTypeAnnotation\", {\n\t visitor: [\"properties\", \"indexers\", \"callProperties\", \"internalSlots\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t builder: [\"properties\", \"indexers\", \"callProperties\", \"internalSlots\", \"exact\"],\n\t fields: {\n\t properties: validate$5(arrayOfType([\"ObjectTypeProperty\", \"ObjectTypeSpreadProperty\"])),\n\t indexers: validateOptional(arrayOfType(\"ObjectTypeIndexer\")),\n\t callProperties: validateOptional(arrayOfType(\"ObjectTypeCallProperty\")),\n\t internalSlots: validateOptional(arrayOfType(\"ObjectTypeInternalSlot\")),\n\t exact: {\n\t validate: assertValueType(\"boolean\"),\n\t \"default\": false\n\t },\n\t inexact: validateOptional(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeInternalSlot\", {\n\t visitor: [\"id\", \"value\", \"optional\", \"static\", \"method\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t value: validateType(\"FlowType\"),\n\t optional: validate$5(assertValueType(\"boolean\")),\n\t \"static\": validate$5(assertValueType(\"boolean\")),\n\t method: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeCallProperty\", {\n\t visitor: [\"value\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t value: validateType(\"FlowType\"),\n\t \"static\": validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeIndexer\", {\n\t visitor: [\"id\", \"key\", \"value\", \"variance\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t id: validateOptionalType(\"Identifier\"),\n\t key: validateType(\"FlowType\"),\n\t value: validateType(\"FlowType\"),\n\t \"static\": validate$5(assertValueType(\"boolean\")),\n\t variance: validateOptionalType(\"Variance\")\n\t }\n\t});\n\tdefineType(\"ObjectTypeProperty\", {\n\t visitor: [\"key\", \"value\", \"variance\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t key: validateType([\"Identifier\", \"StringLiteral\"]),\n\t value: validateType(\"FlowType\"),\n\t kind: validate$5(assertOneOf(\"init\", \"get\", \"set\")),\n\t \"static\": validate$5(assertValueType(\"boolean\")),\n\t proto: validate$5(assertValueType(\"boolean\")),\n\t optional: validate$5(assertValueType(\"boolean\")),\n\t variance: validateOptionalType(\"Variance\"),\n\t method: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeSpreadProperty\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t argument: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"OpaqueType\", {\n\t visitor: [\"id\", \"typeParameters\", \"supertype\", \"impltype\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t supertype: validateOptionalType(\"FlowType\"),\n\t impltype: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"QualifiedTypeIdentifier\", {\n\t visitor: [\"id\", \"qualification\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t qualification: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"])\n\t }\n\t});\n\tdefineType(\"StringLiteralTypeAnnotation\", {\n\t builder: [\"value\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t value: validate$5(assertValueType(\"string\"))\n\t }\n\t});\n\tdefineType(\"StringTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"SymbolTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ThisTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"TupleTypeAnnotation\", {\n\t visitor: [\"types\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t types: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"TypeofTypeAnnotation\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t argument: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"TypeAlias\", {\n\t visitor: [\"id\", \"typeParameters\", \"right\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t right: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"TypeAnnotation\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"TypeCastExpression\", {\n\t visitor: [\"expression\", \"typeAnnotation\"],\n\t aliases: [\"Flow\", \"ExpressionWrapper\", \"Expression\"],\n\t fields: {\n\t expression: validateType(\"Expression\"),\n\t typeAnnotation: validateType(\"TypeAnnotation\")\n\t }\n\t});\n\tdefineType(\"TypeParameter\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"bound\", \"default\", \"variance\"],\n\t fields: {\n\t name: validate$5(assertValueType(\"string\")),\n\t bound: validateOptionalType(\"TypeAnnotation\"),\n\t \"default\": validateOptionalType(\"FlowType\"),\n\t variance: validateOptionalType(\"Variance\")\n\t }\n\t});\n\tdefineType(\"TypeParameterDeclaration\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"params\"],\n\t fields: {\n\t params: validate$5(arrayOfType(\"TypeParameter\"))\n\t }\n\t});\n\tdefineType(\"TypeParameterInstantiation\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"params\"],\n\t fields: {\n\t params: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"UnionTypeAnnotation\", {\n\t visitor: [\"types\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t types: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"Variance\", {\n\t aliases: [\"Flow\"],\n\t builder: [\"kind\"],\n\t fields: {\n\t kind: validate$5(assertOneOf(\"minus\", \"plus\"))\n\t }\n\t});\n\tdefineType(\"VoidTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"EnumDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"body\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t body: validateType([\"EnumBooleanBody\", \"EnumNumberBody\", \"EnumStringBody\", \"EnumSymbolBody\"])\n\t }\n\t});\n\tdefineType(\"EnumBooleanBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t explicitType: validate$5(assertValueType(\"boolean\")),\n\t members: validateArrayOfType(\"EnumBooleanMember\"),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumNumberBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t explicitType: validate$5(assertValueType(\"boolean\")),\n\t members: validateArrayOfType(\"EnumNumberMember\"),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumStringBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t explicitType: validate$5(assertValueType(\"boolean\")),\n\t members: validateArrayOfType([\"EnumStringMember\", \"EnumDefaultedMember\"]),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumSymbolBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t members: validateArrayOfType(\"EnumDefaultedMember\"),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumBooleanMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t init: validateType(\"BooleanLiteral\")\n\t }\n\t});\n\tdefineType(\"EnumNumberMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\", \"init\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t init: validateType(\"NumericLiteral\")\n\t }\n\t});\n\tdefineType(\"EnumStringMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\", \"init\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t init: validateType(\"StringLiteral\")\n\t }\n\t});\n\tdefineType(\"EnumDefaultedMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\"],\n\t fields: {\n\t id: validateType(\"Identifier\")\n\t }\n\t});\n\tdefineType(\"IndexedAccessType\", {\n\t visitor: [\"objectType\", \"indexType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t objectType: validateType(\"FlowType\"),\n\t indexType: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"OptionalIndexedAccessType\", {\n\t visitor: [\"objectType\", \"indexType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t objectType: validateType(\"FlowType\"),\n\t indexType: validateType(\"FlowType\"),\n\t optional: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\n\tdefineType(\"JSXAttribute\", {\n\t visitor: [\"name\", \"value\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\", \"JSXNamespacedName\")\n\t },\n\t value: {\n\t optional: true,\n\t validate: assertNodeType(\"JSXElement\", \"JSXFragment\", \"StringLiteral\", \"JSXExpressionContainer\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXClosingElement\", {\n\t visitor: [\"name\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\", \"JSXMemberExpression\", \"JSXNamespacedName\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXElement\", {\n\t builder: [\"openingElement\", \"closingElement\", \"children\", \"selfClosing\"],\n\t visitor: [\"openingElement\", \"children\", \"closingElement\"],\n\t aliases: [\"JSX\", \"Immutable\", \"Expression\"],\n\t fields: {\n\t openingElement: {\n\t validate: assertNodeType(\"JSXOpeningElement\")\n\t },\n\t closingElement: {\n\t optional: true,\n\t validate: assertNodeType(\"JSXClosingElement\")\n\t },\n\t children: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"JSXText\", \"JSXExpressionContainer\", \"JSXSpreadChild\", \"JSXElement\", \"JSXFragment\")))\n\t },\n\t selfClosing: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"JSXEmptyExpression\", {\n\t aliases: [\"JSX\"]\n\t});\n\tdefineType(\"JSXExpressionContainer\", {\n\t visitor: [\"expression\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\", \"JSXEmptyExpression\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXSpreadChild\", {\n\t visitor: [\"expression\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXIdentifier\", {\n\t builder: [\"name\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t name: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXMemberExpression\", {\n\t visitor: [\"object\", \"property\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t object: {\n\t validate: assertNodeType(\"JSXMemberExpression\", \"JSXIdentifier\")\n\t },\n\t property: {\n\t validate: assertNodeType(\"JSXIdentifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXNamespacedName\", {\n\t visitor: [\"namespace\", \"name\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t namespace: {\n\t validate: assertNodeType(\"JSXIdentifier\")\n\t },\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXOpeningElement\", {\n\t builder: [\"name\", \"attributes\", \"selfClosing\"],\n\t visitor: [\"name\", \"attributes\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\", \"JSXMemberExpression\", \"JSXNamespacedName\")\n\t },\n\t selfClosing: {\n\t \"default\": false\n\t },\n\t attributes: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"JSXAttribute\", \"JSXSpreadAttribute\")))\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"JSXSpreadAttribute\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXText\", {\n\t aliases: [\"JSX\", \"Immutable\"],\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXFragment\", {\n\t builder: [\"openingFragment\", \"closingFragment\", \"children\"],\n\t visitor: [\"openingFragment\", \"children\", \"closingFragment\"],\n\t aliases: [\"JSX\", \"Immutable\", \"Expression\"],\n\t fields: {\n\t openingFragment: {\n\t validate: assertNodeType(\"JSXOpeningFragment\")\n\t },\n\t closingFragment: {\n\t validate: assertNodeType(\"JSXClosingFragment\")\n\t },\n\t children: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"JSXText\", \"JSXExpressionContainer\", \"JSXSpreadChild\", \"JSXElement\", \"JSXFragment\")))\n\t }\n\t }\n\t});\n\tdefineType(\"JSXOpeningFragment\", {\n\t aliases: [\"JSX\", \"Immutable\"]\n\t});\n\tdefineType(\"JSXClosingFragment\", {\n\t aliases: [\"JSX\", \"Immutable\"]\n\t});\n\n\tvar PLACEHOLDERS = [\"Identifier\", \"StringLiteral\", \"Expression\", \"Statement\", \"Declaration\", \"BlockStatement\", \"ClassBody\", \"Pattern\"];\n\tvar PLACEHOLDERS_ALIAS = {\n\t Declaration: [\"Statement\"],\n\t Pattern: [\"PatternLike\", \"LVal\"]\n\t};\n\n\tfor (var _i$3 = 0, _PLACEHOLDERS = PLACEHOLDERS; _i$3 < _PLACEHOLDERS.length; _i$3++) {\n\t var type$2 = _PLACEHOLDERS[_i$3];\n\t var alias = ALIAS_KEYS[type$2];\n\t if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type$2] = alias;\n\t}\n\n\tvar PLACEHOLDERS_FLIPPED_ALIAS = {};\n\tObject.keys(PLACEHOLDERS_ALIAS).forEach(function (type) {\n\t PLACEHOLDERS_ALIAS[type].forEach(function (alias) {\n\t if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {\n\t PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];\n\t }\n\n\t PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);\n\t });\n\t});\n\n\t{\n\t defineType(\"Noop\", {\n\t visitor: []\n\t });\n\t}\n\tdefineType(\"Placeholder\", {\n\t visitor: [],\n\t builder: [\"expectedNode\", \"name\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t expectedNode: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(PLACEHOLDERS))\n\t }\n\t }\n\t});\n\tdefineType(\"V8IntrinsicIdentifier\", {\n\t builder: [\"name\"],\n\t fields: {\n\t name: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\n\tdefineType(\"ArgumentPlaceholder\", {});\n\tdefineType(\"BindExpression\", {\n\t visitor: [\"object\", \"callee\"],\n\t aliases: [\"Expression\"],\n\t fields: !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t object: {\n\t validate: Object.assign(function () {}, {\n\t oneOfNodeTypes: [\"Expression\"]\n\t })\n\t },\n\t callee: {\n\t validate: Object.assign(function () {}, {\n\t oneOfNodeTypes: [\"Expression\"]\n\t })\n\t }\n\t } : {\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t callee: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"ImportAttribute\", {\n\t visitor: [\"key\", \"value\"],\n\t fields: {\n\t key: {\n\t validate: assertNodeType(\"Identifier\", \"StringLiteral\")\n\t },\n\t value: {\n\t validate: assertNodeType(\"StringLiteral\")\n\t }\n\t }\n\t});\n\tdefineType(\"Decorator\", {\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"DoExpression\", {\n\t visitor: [\"body\"],\n\t builder: [\"body\", \"async\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t },\n\t async: {\n\t validate: assertValueType(\"boolean\"),\n\t \"default\": false\n\t }\n\t }\n\t});\n\tdefineType(\"ExportDefaultSpecifier\", {\n\t visitor: [\"exported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t exported: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"RecordExpression\", {\n\t visitor: [\"properties\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t properties: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ObjectProperty\", \"SpreadElement\")))\n\t }\n\t }\n\t});\n\tdefineType(\"TupleExpression\", {\n\t fields: {\n\t elements: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"SpreadElement\"))),\n\t \"default\": []\n\t }\n\t },\n\t visitor: [\"elements\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"DecimalLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"StaticBlock\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\"]\n\t});\n\tdefineType(\"ModuleExpression\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: {\n\t validate: assertNodeType(\"Program\")\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"TopicReference\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"PipelineTopicExpression\", {\n\t builder: [\"expression\"],\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"PipelineBareFunction\", {\n\t builder: [\"callee\"],\n\t visitor: [\"callee\"],\n\t fields: {\n\t callee: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"PipelinePrimaryTopicReference\", {\n\t aliases: [\"Expression\"]\n\t});\n\n\tvar bool = assertValueType(\"boolean\");\n\tvar tSFunctionTypeAnnotationCommon = {\n\t returnType: {\n\t validate: assertNodeType(\"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t }\n\t};\n\tdefineType(\"TSParameterProperty\", {\n\t aliases: [\"LVal\"],\n\t visitor: [\"parameter\"],\n\t fields: {\n\t accessibility: {\n\t validate: assertOneOf(\"public\", \"private\", \"protected\"),\n\t optional: true\n\t },\n\t readonly: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t parameter: {\n\t validate: assertNodeType(\"Identifier\", \"AssignmentPattern\")\n\t },\n\t override: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"TSDeclareFunction\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"typeParameters\", \"params\", \"returnType\"],\n\t fields: Object.assign({}, functionDeclarationCommon, tSFunctionTypeAnnotationCommon)\n\t});\n\tdefineType(\"TSDeclareMethod\", {\n\t visitor: [\"decorators\", \"key\", \"typeParameters\", \"params\", \"returnType\"],\n\t fields: Object.assign({}, classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)\n\t});\n\tdefineType(\"TSQualifiedName\", {\n\t aliases: [\"TSEntityName\"],\n\t visitor: [\"left\", \"right\"],\n\t fields: {\n\t left: validateType(\"TSEntityName\"),\n\t right: validateType(\"Identifier\")\n\t }\n\t});\n\tvar signatureDeclarationCommon = {\n\t typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n\t parameters: validateArrayOfType([\"Identifier\", \"RestElement\"]),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\")\n\t};\n\tvar callConstructSignatureDeclaration = {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"typeParameters\", \"parameters\", \"typeAnnotation\"],\n\t fields: signatureDeclarationCommon\n\t};\n\tdefineType(\"TSCallSignatureDeclaration\", callConstructSignatureDeclaration);\n\tdefineType(\"TSConstructSignatureDeclaration\", callConstructSignatureDeclaration);\n\tvar namedTypeElementCommon = {\n\t key: validateType(\"Expression\"),\n\t computed: validate$5(bool),\n\t optional: validateOptional(bool)\n\t};\n\tdefineType(\"TSPropertySignature\", {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"key\", \"typeAnnotation\", \"initializer\"],\n\t fields: Object.assign({}, namedTypeElementCommon, {\n\t readonly: validateOptional(bool),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n\t initializer: validateOptionalType(\"Expression\"),\n\t kind: {\n\t validate: assertOneOf(\"get\", \"set\")\n\t }\n\t })\n\t});\n\tdefineType(\"TSMethodSignature\", {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"key\", \"typeParameters\", \"parameters\", \"typeAnnotation\"],\n\t fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {\n\t kind: {\n\t validate: assertOneOf(\"method\", \"get\", \"set\")\n\t }\n\t })\n\t});\n\tdefineType(\"TSIndexSignature\", {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"parameters\", \"typeAnnotation\"],\n\t fields: {\n\t readonly: validateOptional(bool),\n\t \"static\": validateOptional(bool),\n\t parameters: validateArrayOfType(\"Identifier\"),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\")\n\t }\n\t});\n\tvar tsKeywordTypes = [\"TSAnyKeyword\", \"TSBooleanKeyword\", \"TSBigIntKeyword\", \"TSIntrinsicKeyword\", \"TSNeverKeyword\", \"TSNullKeyword\", \"TSNumberKeyword\", \"TSObjectKeyword\", \"TSStringKeyword\", \"TSSymbolKeyword\", \"TSUndefinedKeyword\", \"TSUnknownKeyword\", \"TSVoidKeyword\"];\n\n\tfor (var _i$2 = 0, _tsKeywordTypes = tsKeywordTypes; _i$2 < _tsKeywordTypes.length; _i$2++) {\n\t var type$1 = _tsKeywordTypes[_i$2];\n\t defineType(type$1, {\n\t aliases: [\"TSType\", \"TSBaseType\"],\n\t visitor: [],\n\t fields: {}\n\t });\n\t}\n\n\tdefineType(\"TSThisType\", {\n\t aliases: [\"TSType\", \"TSBaseType\"],\n\t visitor: [],\n\t fields: {}\n\t});\n\tvar fnOrCtrBase = {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeParameters\", \"parameters\", \"typeAnnotation\"]\n\t};\n\tdefineType(\"TSFunctionType\", Object.assign({}, fnOrCtrBase, {\n\t fields: signatureDeclarationCommon\n\t}));\n\tdefineType(\"TSConstructorType\", Object.assign({}, fnOrCtrBase, {\n\t fields: Object.assign({}, signatureDeclarationCommon, {\n\t \"abstract\": validateOptional(bool)\n\t })\n\t}));\n\tdefineType(\"TSTypeReference\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeName\", \"typeParameters\"],\n\t fields: {\n\t typeName: validateType(\"TSEntityName\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"TSTypePredicate\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"parameterName\", \"typeAnnotation\"],\n\t builder: [\"parameterName\", \"typeAnnotation\", \"asserts\"],\n\t fields: {\n\t parameterName: validateType([\"Identifier\", \"TSThisType\"]),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n\t asserts: validateOptional(bool)\n\t }\n\t});\n\tdefineType(\"TSTypeQuery\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"exprName\"],\n\t fields: {\n\t exprName: validateType([\"TSEntityName\", \"TSImportType\"])\n\t }\n\t});\n\tdefineType(\"TSTypeLiteral\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t members: validateArrayOfType(\"TSTypeElement\")\n\t }\n\t});\n\tdefineType(\"TSArrayType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"elementType\"],\n\t fields: {\n\t elementType: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSTupleType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"elementTypes\"],\n\t fields: {\n\t elementTypes: validateArrayOfType([\"TSType\", \"TSNamedTupleMember\"])\n\t }\n\t});\n\tdefineType(\"TSOptionalType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSRestType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSNamedTupleMember\", {\n\t visitor: [\"label\", \"elementType\"],\n\t builder: [\"label\", \"elementType\", \"optional\"],\n\t fields: {\n\t label: validateType(\"Identifier\"),\n\t optional: {\n\t validate: bool,\n\t \"default\": false\n\t },\n\t elementType: validateType(\"TSType\")\n\t }\n\t});\n\tvar unionOrIntersection = {\n\t aliases: [\"TSType\"],\n\t visitor: [\"types\"],\n\t fields: {\n\t types: validateArrayOfType(\"TSType\")\n\t }\n\t};\n\tdefineType(\"TSUnionType\", unionOrIntersection);\n\tdefineType(\"TSIntersectionType\", unionOrIntersection);\n\tdefineType(\"TSConditionalType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"checkType\", \"extendsType\", \"trueType\", \"falseType\"],\n\t fields: {\n\t checkType: validateType(\"TSType\"),\n\t extendsType: validateType(\"TSType\"),\n\t trueType: validateType(\"TSType\"),\n\t falseType: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSInferType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeParameter\"],\n\t fields: {\n\t typeParameter: validateType(\"TSTypeParameter\")\n\t }\n\t});\n\tdefineType(\"TSParenthesizedType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSTypeOperator\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t operator: validate$5(assertValueType(\"string\")),\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSIndexedAccessType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"objectType\", \"indexType\"],\n\t fields: {\n\t objectType: validateType(\"TSType\"),\n\t indexType: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSMappedType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeParameter\", \"typeAnnotation\", \"nameType\"],\n\t fields: {\n\t readonly: validateOptional(bool),\n\t typeParameter: validateType(\"TSTypeParameter\"),\n\t optional: validateOptional(bool),\n\t typeAnnotation: validateOptionalType(\"TSType\"),\n\t nameType: validateOptionalType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSLiteralType\", {\n\t aliases: [\"TSType\", \"TSBaseType\"],\n\t visitor: [\"literal\"],\n\t fields: {\n\t literal: {\n\t validate: function () {\n\t var unaryExpression = assertNodeType(\"NumericLiteral\", \"BigIntLiteral\");\n\t var unaryOperator = assertOneOf(\"-\");\n\t var literal = assertNodeType(\"NumericLiteral\", \"StringLiteral\", \"BooleanLiteral\", \"BigIntLiteral\");\n\n\t function validator(parent, key, node) {\n\t if (is$1(\"UnaryExpression\", node)) {\n\t unaryOperator(node, \"operator\", node.operator);\n\t unaryExpression(node, \"argument\", node.argument);\n\t } else {\n\t literal(parent, key, node);\n\t }\n\t }\n\n\t validator.oneOfNodeTypes = [\"NumericLiteral\", \"StringLiteral\", \"BooleanLiteral\", \"BigIntLiteral\", \"UnaryExpression\"];\n\t return validator;\n\t }()\n\t }\n\t }\n\t});\n\tdefineType(\"TSExpressionWithTypeArguments\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"expression\", \"typeParameters\"],\n\t fields: {\n\t expression: validateType(\"TSEntityName\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"TSInterfaceDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n\t \"extends\": validateOptional(arrayOfType(\"TSExpressionWithTypeArguments\")),\n\t body: validateType(\"TSInterfaceBody\")\n\t }\n\t});\n\tdefineType(\"TSInterfaceBody\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: validateArrayOfType(\"TSTypeElement\")\n\t }\n\t});\n\tdefineType(\"TSTypeAliasDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"typeParameters\", \"typeAnnotation\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSAsExpression\", {\n\t aliases: [\"Expression\"],\n\t visitor: [\"expression\", \"typeAnnotation\"],\n\t fields: {\n\t expression: validateType(\"Expression\"),\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSTypeAssertion\", {\n\t aliases: [\"Expression\"],\n\t visitor: [\"typeAnnotation\", \"expression\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\"),\n\t expression: validateType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSEnumDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"members\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t \"const\": validateOptional(bool),\n\t id: validateType(\"Identifier\"),\n\t members: validateArrayOfType(\"TSEnumMember\"),\n\t initializer: validateOptionalType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSEnumMember\", {\n\t visitor: [\"id\", \"initializer\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"StringLiteral\"]),\n\t initializer: validateOptionalType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSModuleDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"body\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t global: validateOptional(bool),\n\t id: validateType([\"Identifier\", \"StringLiteral\"]),\n\t body: validateType([\"TSModuleBlock\", \"TSModuleDeclaration\"])\n\t }\n\t});\n\tdefineType(\"TSModuleBlock\", {\n\t aliases: [\"Scopable\", \"Block\", \"BlockParent\"],\n\t visitor: [\"body\"],\n\t fields: {\n\t body: validateArrayOfType(\"Statement\")\n\t }\n\t});\n\tdefineType(\"TSImportType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"argument\", \"qualifier\", \"typeParameters\"],\n\t fields: {\n\t argument: validateType(\"StringLiteral\"),\n\t qualifier: validateOptionalType(\"TSEntityName\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"TSImportEqualsDeclaration\", {\n\t aliases: [\"Statement\"],\n\t visitor: [\"id\", \"moduleReference\"],\n\t fields: {\n\t isExport: validate$5(bool),\n\t id: validateType(\"Identifier\"),\n\t moduleReference: validateType([\"TSEntityName\", \"TSExternalModuleReference\"]),\n\t importKind: {\n\t validate: assertOneOf(\"type\", \"value\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"TSExternalModuleReference\", {\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: validateType(\"StringLiteral\")\n\t }\n\t});\n\tdefineType(\"TSNonNullExpression\", {\n\t aliases: [\"Expression\"],\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: validateType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSExportAssignment\", {\n\t aliases: [\"Statement\"],\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: validateType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSNamespaceExportDeclaration\", {\n\t aliases: [\"Statement\"],\n\t visitor: [\"id\"],\n\t fields: {\n\t id: validateType(\"Identifier\")\n\t }\n\t});\n\tdefineType(\"TSTypeAnnotation\", {\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TSType\")\n\t }\n\t }\n\t});\n\tdefineType(\"TSTypeParameterInstantiation\", {\n\t visitor: [\"params\"],\n\t fields: {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSType\")))\n\t }\n\t }\n\t});\n\tdefineType(\"TSTypeParameterDeclaration\", {\n\t visitor: [\"params\"],\n\t fields: {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSTypeParameter\")))\n\t }\n\t }\n\t});\n\tdefineType(\"TSTypeParameter\", {\n\t builder: [\"constraint\", \"default\", \"name\"],\n\t visitor: [\"constraint\", \"default\"],\n\t fields: {\n\t name: {\n\t validate: assertValueType(\"string\")\n\t },\n\t constraint: {\n\t validate: assertNodeType(\"TSType\"),\n\t optional: true\n\t },\n\t \"default\": {\n\t validate: assertNodeType(\"TSType\"),\n\t optional: true\n\t }\n\t }\n\t});\n\n\ttoFastProperties(VISITOR_KEYS$6);\n\ttoFastProperties(ALIAS_KEYS);\n\ttoFastProperties(FLIPPED_ALIAS_KEYS$3);\n\ttoFastProperties(NODE_FIELDS);\n\ttoFastProperties(BUILDER_KEYS);\n\ttoFastProperties(DEPRECATED_KEYS$1);\n\ttoFastProperties(PLACEHOLDERS_ALIAS);\n\ttoFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);\n\tvar TYPES$1 = Object.keys(VISITOR_KEYS$6).concat(Object.keys(FLIPPED_ALIAS_KEYS$3)).concat(Object.keys(DEPRECATED_KEYS$1));\n\n\tfunction builder(type) {\n\t for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var keys = BUILDER_KEYS[type];\n\t var countArgs = args.length;\n\n\t if (countArgs > keys.length) {\n\t throw new Error(type + \": Too many arguments passed. Received \" + countArgs + \" but can receive no more than \" + keys.length);\n\t }\n\n\t var node = {\n\t type: type\n\t };\n\t var i = 0;\n\t keys.forEach(function (key) {\n\t var field = NODE_FIELDS[type][key];\n\t var arg;\n\t if (i < countArgs) arg = args[i];\n\n\t if (arg === undefined) {\n\t arg = Array.isArray(field[\"default\"]) ? [] : field[\"default\"];\n\t }\n\n\t node[key] = arg;\n\t i++;\n\t });\n\n\t for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t validate$6(node, key, node[key]);\n\t }\n\n\t return node;\n\t}\n\n\tfunction arrayExpression$2(elements) {\n\t return builder.apply(void 0, [\"ArrayExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction assignmentExpression$c(operator, left, right) {\n\t return builder.apply(void 0, [\"AssignmentExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction binaryExpression$4(operator, left, right) {\n\t return builder.apply(void 0, [\"BinaryExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interpreterDirective$1(value) {\n\t return builder.apply(void 0, [\"InterpreterDirective\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction directive$1(value) {\n\t return builder.apply(void 0, [\"Directive\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction directiveLiteral$1(value) {\n\t return builder.apply(void 0, [\"DirectiveLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction blockStatement$6(body, directives) {\n\t return builder.apply(void 0, [\"BlockStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction breakStatement(label) {\n\t return builder.apply(void 0, [\"BreakStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction callExpression$e(callee, _arguments) {\n\t return builder.apply(void 0, [\"CallExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction catchClause(param, body) {\n\t return builder.apply(void 0, [\"CatchClause\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction conditionalExpression$3(test, consequent, alternate) {\n\t return builder.apply(void 0, [\"ConditionalExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction continueStatement(label) {\n\t return builder.apply(void 0, [\"ContinueStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction debuggerStatement() {\n\t return builder.apply(void 0, [\"DebuggerStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction doWhileStatement(test, body) {\n\t return builder.apply(void 0, [\"DoWhileStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction emptyStatement$1() {\n\t return builder.apply(void 0, [\"EmptyStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction expressionStatement$a(expression) {\n\t return builder.apply(void 0, [\"ExpressionStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction file$1(program, comments, tokens) {\n\t return builder.apply(void 0, [\"File\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction forInStatement(left, right, body) {\n\t return builder.apply(void 0, [\"ForInStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction forStatement(init, test, update, body) {\n\t return builder.apply(void 0, [\"ForStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionDeclaration(id, params, body, generator, async) {\n\t return builder.apply(void 0, [\"FunctionDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionExpression$3(id, params, body, generator, async) {\n\t return builder.apply(void 0, [\"FunctionExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction identifier$j(name) {\n\t return builder.apply(void 0, [\"Identifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction ifStatement(test, consequent, alternate) {\n\t return builder.apply(void 0, [\"IfStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction labeledStatement(label, body) {\n\t return builder.apply(void 0, [\"LabeledStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction stringLiteral$8(value) {\n\t return builder.apply(void 0, [\"StringLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction numericLiteral$8(value) {\n\t return builder.apply(void 0, [\"NumericLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction nullLiteral$2() {\n\t return builder.apply(void 0, [\"NullLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction booleanLiteral$5(value) {\n\t return builder.apply(void 0, [\"BooleanLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction regExpLiteral(pattern, flags) {\n\t return builder.apply(void 0, [\"RegExpLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction logicalExpression$2(operator, left, right) {\n\t return builder.apply(void 0, [\"LogicalExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction memberExpression$b(object, property, computed, optional) {\n\t return builder.apply(void 0, [\"MemberExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction newExpression(callee, _arguments) {\n\t return builder.apply(void 0, [\"NewExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction program$3(body, directives, sourceType, interpreter) {\n\t return builder.apply(void 0, [\"Program\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectExpression$4(properties) {\n\t return builder.apply(void 0, [\"ObjectExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectMethod(kind, key, params, body, computed, generator, async) {\n\t return builder.apply(void 0, [\"ObjectMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectProperty$2(key, value, computed, shorthand, decorators) {\n\t return builder.apply(void 0, [\"ObjectProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction restElement$1(argument) {\n\t return builder.apply(void 0, [\"RestElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction returnStatement$3(argument) {\n\t return builder.apply(void 0, [\"ReturnStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction sequenceExpression$7(expressions) {\n\t return builder.apply(void 0, [\"SequenceExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction parenthesizedExpression(expression) {\n\t return builder.apply(void 0, [\"ParenthesizedExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction switchCase(test, consequent) {\n\t return builder.apply(void 0, [\"SwitchCase\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction switchStatement(discriminant, cases) {\n\t return builder.apply(void 0, [\"SwitchStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction thisExpression$3() {\n\t return builder.apply(void 0, [\"ThisExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction throwStatement(argument) {\n\t return builder.apply(void 0, [\"ThrowStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tryStatement(block, handler, finalizer) {\n\t return builder.apply(void 0, [\"TryStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction unaryExpression$7(operator, argument, prefix) {\n\t return builder.apply(void 0, [\"UnaryExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction updateExpression(operator, argument, prefix) {\n\t return builder.apply(void 0, [\"UpdateExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction variableDeclaration$8(kind, declarations) {\n\t return builder.apply(void 0, [\"VariableDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction variableDeclarator$8(id, init) {\n\t return builder.apply(void 0, [\"VariableDeclarator\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction whileStatement(test, body) {\n\t return builder.apply(void 0, [\"WhileStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction withStatement(object, body) {\n\t return builder.apply(void 0, [\"WithStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction assignmentPattern(left, right) {\n\t return builder.apply(void 0, [\"AssignmentPattern\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction arrayPattern(elements) {\n\t return builder.apply(void 0, [\"ArrayPattern\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction arrowFunctionExpression$4(params, body, async) {\n\t return builder.apply(void 0, [\"ArrowFunctionExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classBody(body) {\n\t return builder.apply(void 0, [\"ClassBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classExpression(id, superClass, body, decorators) {\n\t return builder.apply(void 0, [\"ClassExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classDeclaration(id, superClass, body, decorators) {\n\t return builder.apply(void 0, [\"ClassDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportAllDeclaration(source) {\n\t return builder.apply(void 0, [\"ExportAllDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportDefaultDeclaration(declaration) {\n\t return builder.apply(void 0, [\"ExportDefaultDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportNamedDeclaration$2(declaration, specifiers, source) {\n\t return builder.apply(void 0, [\"ExportNamedDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportSpecifier$2(local, exported) {\n\t return builder.apply(void 0, [\"ExportSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction forOfStatement(left, right, body, _await) {\n\t return builder.apply(void 0, [\"ForOfStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importDeclaration$1(specifiers, source) {\n\t return builder.apply(void 0, [\"ImportDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importDefaultSpecifier$1(local) {\n\t return builder.apply(void 0, [\"ImportDefaultSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importNamespaceSpecifier$1(local) {\n\t return builder.apply(void 0, [\"ImportNamespaceSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importSpecifier$1(local, imported) {\n\t return builder.apply(void 0, [\"ImportSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction metaProperty$1(meta, property) {\n\t return builder.apply(void 0, [\"MetaProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classMethod(kind, key, params, body, computed, _static, generator, async) {\n\t return builder.apply(void 0, [\"ClassMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectPattern(properties) {\n\t return builder.apply(void 0, [\"ObjectPattern\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction spreadElement$2(argument) {\n\t return builder.apply(void 0, [\"SpreadElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\n\tfunction _super$1() {\n\t return builder.apply(void 0, [\"Super\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction taggedTemplateExpression(tag, quasi) {\n\t return builder.apply(void 0, [\"TaggedTemplateExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction templateElement(value, tail) {\n\t return builder.apply(void 0, [\"TemplateElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction templateLiteral(quasis, expressions) {\n\t return builder.apply(void 0, [\"TemplateLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction yieldExpression$2(argument, delegate) {\n\t return builder.apply(void 0, [\"YieldExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction awaitExpression$1(argument) {\n\t return builder.apply(void 0, [\"AwaitExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\n\tfunction _import() {\n\t return builder.apply(void 0, [\"Import\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction bigIntLiteral(value) {\n\t return builder.apply(void 0, [\"BigIntLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportNamespaceSpecifier(exported) {\n\t return builder.apply(void 0, [\"ExportNamespaceSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction optionalMemberExpression$2(object, property, computed, optional) {\n\t return builder.apply(void 0, [\"OptionalMemberExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction optionalCallExpression$2(callee, _arguments, optional) {\n\t return builder.apply(void 0, [\"OptionalCallExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classProperty(key, value, typeAnnotation, decorators, computed, _static) {\n\t return builder.apply(void 0, [\"ClassProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classPrivateProperty(key, value, decorators, _static) {\n\t return builder.apply(void 0, [\"ClassPrivateProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classPrivateMethod(kind, key, params, body, _static) {\n\t return builder.apply(void 0, [\"ClassPrivateMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction privateName(id) {\n\t return builder.apply(void 0, [\"PrivateName\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction anyTypeAnnotation$2() {\n\t return builder.apply(void 0, [\"AnyTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction arrayTypeAnnotation$1(elementType) {\n\t return builder.apply(void 0, [\"ArrayTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction booleanTypeAnnotation$1() {\n\t return builder.apply(void 0, [\"BooleanTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction booleanLiteralTypeAnnotation(value) {\n\t return builder.apply(void 0, [\"BooleanLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction nullLiteralTypeAnnotation$1() {\n\t return builder.apply(void 0, [\"NullLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classImplements(id, typeParameters) {\n\t return builder.apply(void 0, [\"ClassImplements\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareClass(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"DeclareClass\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareFunction(id) {\n\t return builder.apply(void 0, [\"DeclareFunction\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareInterface(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"DeclareInterface\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareModule(id, body, kind) {\n\t return builder.apply(void 0, [\"DeclareModule\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareModuleExports(typeAnnotation) {\n\t return builder.apply(void 0, [\"DeclareModuleExports\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareTypeAlias(id, typeParameters, right) {\n\t return builder.apply(void 0, [\"DeclareTypeAlias\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareOpaqueType(id, typeParameters, supertype) {\n\t return builder.apply(void 0, [\"DeclareOpaqueType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareVariable(id) {\n\t return builder.apply(void 0, [\"DeclareVariable\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareExportDeclaration(declaration, specifiers, source) {\n\t return builder.apply(void 0, [\"DeclareExportDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareExportAllDeclaration(source) {\n\t return builder.apply(void 0, [\"DeclareExportAllDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declaredPredicate(value) {\n\t return builder.apply(void 0, [\"DeclaredPredicate\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction existsTypeAnnotation() {\n\t return builder.apply(void 0, [\"ExistsTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionTypeAnnotation(typeParameters, params, rest, returnType) {\n\t return builder.apply(void 0, [\"FunctionTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionTypeParam(name, typeAnnotation) {\n\t return builder.apply(void 0, [\"FunctionTypeParam\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction genericTypeAnnotation$1(id, typeParameters) {\n\t return builder.apply(void 0, [\"GenericTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction inferredPredicate() {\n\t return builder.apply(void 0, [\"InferredPredicate\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interfaceExtends(id, typeParameters) {\n\t return builder.apply(void 0, [\"InterfaceExtends\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interfaceDeclaration(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"InterfaceDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interfaceTypeAnnotation(_extends, body) {\n\t return builder.apply(void 0, [\"InterfaceTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction intersectionTypeAnnotation(types) {\n\t return builder.apply(void 0, [\"IntersectionTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction mixedTypeAnnotation() {\n\t return builder.apply(void 0, [\"MixedTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction emptyTypeAnnotation() {\n\t return builder.apply(void 0, [\"EmptyTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction nullableTypeAnnotation(typeAnnotation) {\n\t return builder.apply(void 0, [\"NullableTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction numberLiteralTypeAnnotation(value) {\n\t return builder.apply(void 0, [\"NumberLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction numberTypeAnnotation$2() {\n\t return builder.apply(void 0, [\"NumberTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {\n\t return builder.apply(void 0, [\"ObjectTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeInternalSlot(id, value, optional, _static, method) {\n\t return builder.apply(void 0, [\"ObjectTypeInternalSlot\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeCallProperty(value) {\n\t return builder.apply(void 0, [\"ObjectTypeCallProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeIndexer(id, key, value, variance) {\n\t return builder.apply(void 0, [\"ObjectTypeIndexer\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeProperty(key, value, variance) {\n\t return builder.apply(void 0, [\"ObjectTypeProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeSpreadProperty(argument) {\n\t return builder.apply(void 0, [\"ObjectTypeSpreadProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction opaqueType(id, typeParameters, supertype, impltype) {\n\t return builder.apply(void 0, [\"OpaqueType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction qualifiedTypeIdentifier(id, qualification) {\n\t return builder.apply(void 0, [\"QualifiedTypeIdentifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction stringLiteralTypeAnnotation(value) {\n\t return builder.apply(void 0, [\"StringLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction stringTypeAnnotation$2() {\n\t return builder.apply(void 0, [\"StringTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction symbolTypeAnnotation() {\n\t return builder.apply(void 0, [\"SymbolTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction thisTypeAnnotation() {\n\t return builder.apply(void 0, [\"ThisTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tupleTypeAnnotation$1(types) {\n\t return builder.apply(void 0, [\"TupleTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeofTypeAnnotation(argument) {\n\t return builder.apply(void 0, [\"TypeofTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeAlias(id, typeParameters, right) {\n\t return builder.apply(void 0, [\"TypeAlias\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeAnnotation(typeAnnotation) {\n\t return builder.apply(void 0, [\"TypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeCastExpression(expression, typeAnnotation) {\n\t return builder.apply(void 0, [\"TypeCastExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeParameter(bound, _default, variance) {\n\t return builder.apply(void 0, [\"TypeParameter\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeParameterDeclaration(params) {\n\t return builder.apply(void 0, [\"TypeParameterDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeParameterInstantiation(params) {\n\t return builder.apply(void 0, [\"TypeParameterInstantiation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction unionTypeAnnotation$1(types) {\n\t return builder.apply(void 0, [\"UnionTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction variance(kind) {\n\t return builder.apply(void 0, [\"Variance\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction voidTypeAnnotation$3() {\n\t return builder.apply(void 0, [\"VoidTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumDeclaration(id, body) {\n\t return builder.apply(void 0, [\"EnumDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumBooleanBody(members) {\n\t return builder.apply(void 0, [\"EnumBooleanBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumNumberBody(members) {\n\t return builder.apply(void 0, [\"EnumNumberBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumStringBody(members) {\n\t return builder.apply(void 0, [\"EnumStringBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumSymbolBody(members) {\n\t return builder.apply(void 0, [\"EnumSymbolBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumBooleanMember(id) {\n\t return builder.apply(void 0, [\"EnumBooleanMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumNumberMember(id, init) {\n\t return builder.apply(void 0, [\"EnumNumberMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumStringMember(id, init) {\n\t return builder.apply(void 0, [\"EnumStringMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumDefaultedMember(id) {\n\t return builder.apply(void 0, [\"EnumDefaultedMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction indexedAccessType(objectType, indexType) {\n\t return builder.apply(void 0, [\"IndexedAccessType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction optionalIndexedAccessType(objectType, indexType) {\n\t return builder.apply(void 0, [\"OptionalIndexedAccessType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxAttribute(name, value) {\n\t return builder.apply(void 0, [\"JSXAttribute\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxClosingElement(name) {\n\t return builder.apply(void 0, [\"JSXClosingElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxElement(openingElement, closingElement, children, selfClosing) {\n\t return builder.apply(void 0, [\"JSXElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxEmptyExpression() {\n\t return builder.apply(void 0, [\"JSXEmptyExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxExpressionContainer$1(expression) {\n\t return builder.apply(void 0, [\"JSXExpressionContainer\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxSpreadChild(expression) {\n\t return builder.apply(void 0, [\"JSXSpreadChild\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxIdentifier$2(name) {\n\t return builder.apply(void 0, [\"JSXIdentifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxMemberExpression$1(object, property) {\n\t return builder.apply(void 0, [\"JSXMemberExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxNamespacedName(namespace, name) {\n\t return builder.apply(void 0, [\"JSXNamespacedName\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxOpeningElement(name, attributes, selfClosing) {\n\t return builder.apply(void 0, [\"JSXOpeningElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxSpreadAttribute(argument) {\n\t return builder.apply(void 0, [\"JSXSpreadAttribute\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxText(value) {\n\t return builder.apply(void 0, [\"JSXText\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxFragment(openingFragment, closingFragment, children) {\n\t return builder.apply(void 0, [\"JSXFragment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxOpeningFragment() {\n\t return builder.apply(void 0, [\"JSXOpeningFragment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxClosingFragment() {\n\t return builder.apply(void 0, [\"JSXClosingFragment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction noop$1() {\n\t return builder.apply(void 0, [\"Noop\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction placeholder(expectedNode, name) {\n\t return builder.apply(void 0, [\"Placeholder\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction v8IntrinsicIdentifier(name) {\n\t return builder.apply(void 0, [\"V8IntrinsicIdentifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction argumentPlaceholder() {\n\t return builder.apply(void 0, [\"ArgumentPlaceholder\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction bindExpression(object, callee) {\n\t return builder.apply(void 0, [\"BindExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importAttribute(key, value) {\n\t return builder.apply(void 0, [\"ImportAttribute\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction decorator(expression) {\n\t return builder.apply(void 0, [\"Decorator\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction doExpression(body, async) {\n\t return builder.apply(void 0, [\"DoExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportDefaultSpecifier(exported) {\n\t return builder.apply(void 0, [\"ExportDefaultSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction recordExpression(properties) {\n\t return builder.apply(void 0, [\"RecordExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tupleExpression(elements) {\n\t return builder.apply(void 0, [\"TupleExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction decimalLiteral(value) {\n\t return builder.apply(void 0, [\"DecimalLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction staticBlock$1(body) {\n\t return builder.apply(void 0, [\"StaticBlock\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction moduleExpression(body) {\n\t return builder.apply(void 0, [\"ModuleExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction topicReference() {\n\t return builder.apply(void 0, [\"TopicReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction pipelineTopicExpression(expression) {\n\t return builder.apply(void 0, [\"PipelineTopicExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction pipelineBareFunction(callee) {\n\t return builder.apply(void 0, [\"PipelineBareFunction\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction pipelinePrimaryTopicReference() {\n\t return builder.apply(void 0, [\"PipelinePrimaryTopicReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsParameterProperty(parameter) {\n\t return builder.apply(void 0, [\"TSParameterProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsDeclareFunction(id, typeParameters, params, returnType) {\n\t return builder.apply(void 0, [\"TSDeclareFunction\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsDeclareMethod(decorators, key, typeParameters, params, returnType) {\n\t return builder.apply(void 0, [\"TSDeclareMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsQualifiedName(left, right) {\n\t return builder.apply(void 0, [\"TSQualifiedName\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSCallSignatureDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSConstructSignatureDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsPropertySignature(key, typeAnnotation, initializer) {\n\t return builder.apply(void 0, [\"TSPropertySignature\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsMethodSignature(key, typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSMethodSignature\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIndexSignature(parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSIndexSignature\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsAnyKeyword() {\n\t return builder.apply(void 0, [\"TSAnyKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsBooleanKeyword() {\n\t return builder.apply(void 0, [\"TSBooleanKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsBigIntKeyword() {\n\t return builder.apply(void 0, [\"TSBigIntKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIntrinsicKeyword() {\n\t return builder.apply(void 0, [\"TSIntrinsicKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNeverKeyword() {\n\t return builder.apply(void 0, [\"TSNeverKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNullKeyword() {\n\t return builder.apply(void 0, [\"TSNullKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNumberKeyword() {\n\t return builder.apply(void 0, [\"TSNumberKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsObjectKeyword() {\n\t return builder.apply(void 0, [\"TSObjectKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsStringKeyword() {\n\t return builder.apply(void 0, [\"TSStringKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsSymbolKeyword() {\n\t return builder.apply(void 0, [\"TSSymbolKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsUndefinedKeyword() {\n\t return builder.apply(void 0, [\"TSUndefinedKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsUnknownKeyword() {\n\t return builder.apply(void 0, [\"TSUnknownKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsVoidKeyword() {\n\t return builder.apply(void 0, [\"TSVoidKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsThisType() {\n\t return builder.apply(void 0, [\"TSThisType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsFunctionType(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSFunctionType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsConstructorType(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSConstructorType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeReference(typeName, typeParameters) {\n\t return builder.apply(void 0, [\"TSTypeReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypePredicate(parameterName, typeAnnotation, asserts) {\n\t return builder.apply(void 0, [\"TSTypePredicate\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeQuery(exprName) {\n\t return builder.apply(void 0, [\"TSTypeQuery\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeLiteral(members) {\n\t return builder.apply(void 0, [\"TSTypeLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsArrayType(elementType) {\n\t return builder.apply(void 0, [\"TSArrayType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTupleType(elementTypes) {\n\t return builder.apply(void 0, [\"TSTupleType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsOptionalType(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSOptionalType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsRestType(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSRestType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNamedTupleMember(label, elementType, optional) {\n\t return builder.apply(void 0, [\"TSNamedTupleMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsUnionType(types) {\n\t return builder.apply(void 0, [\"TSUnionType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIntersectionType(types) {\n\t return builder.apply(void 0, [\"TSIntersectionType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsConditionalType(checkType, extendsType, trueType, falseType) {\n\t return builder.apply(void 0, [\"TSConditionalType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsInferType(typeParameter) {\n\t return builder.apply(void 0, [\"TSInferType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsParenthesizedType(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSParenthesizedType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeOperator(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSTypeOperator\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIndexedAccessType(objectType, indexType) {\n\t return builder.apply(void 0, [\"TSIndexedAccessType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsMappedType(typeParameter, typeAnnotation, nameType) {\n\t return builder.apply(void 0, [\"TSMappedType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsLiteralType(literal) {\n\t return builder.apply(void 0, [\"TSLiteralType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsExpressionWithTypeArguments(expression, typeParameters) {\n\t return builder.apply(void 0, [\"TSExpressionWithTypeArguments\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsInterfaceDeclaration(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"TSInterfaceDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsInterfaceBody(body) {\n\t return builder.apply(void 0, [\"TSInterfaceBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSTypeAliasDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsAsExpression(expression, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSAsExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeAssertion(typeAnnotation, expression) {\n\t return builder.apply(void 0, [\"TSTypeAssertion\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsEnumDeclaration(id, members) {\n\t return builder.apply(void 0, [\"TSEnumDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsEnumMember(id, initializer) {\n\t return builder.apply(void 0, [\"TSEnumMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsModuleDeclaration(id, body) {\n\t return builder.apply(void 0, [\"TSModuleDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsModuleBlock(body) {\n\t return builder.apply(void 0, [\"TSModuleBlock\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsImportType(argument, qualifier, typeParameters) {\n\t return builder.apply(void 0, [\"TSImportType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsImportEqualsDeclaration(id, moduleReference) {\n\t return builder.apply(void 0, [\"TSImportEqualsDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsExternalModuleReference(expression) {\n\t return builder.apply(void 0, [\"TSExternalModuleReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNonNullExpression(expression) {\n\t return builder.apply(void 0, [\"TSNonNullExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsExportAssignment(expression) {\n\t return builder.apply(void 0, [\"TSExportAssignment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNamespaceExportDeclaration(id) {\n\t return builder.apply(void 0, [\"TSNamespaceExportDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeAnnotation(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeParameterInstantiation(params) {\n\t return builder.apply(void 0, [\"TSTypeParameterInstantiation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeParameterDeclaration(params) {\n\t return builder.apply(void 0, [\"TSTypeParameterDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeParameter(constraint, _default, name) {\n\t return builder.apply(void 0, [\"TSTypeParameter\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\n\tfunction NumberLiteral() {\n\t console.trace(\"The node type NumberLiteral has been renamed to NumericLiteral\");\n\n\t for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\n\t return builder.apply(void 0, [\"NumberLiteral\"].concat(args));\n\t}\n\n\tfunction RegexLiteral() {\n\t console.trace(\"The node type RegexLiteral has been renamed to RegExpLiteral\");\n\n\t for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t args[_key2] = arguments[_key2];\n\t }\n\n\t return builder.apply(void 0, [\"RegexLiteral\"].concat(args));\n\t}\n\n\tfunction RestProperty$1() {\n\t console.trace(\"The node type RestProperty has been renamed to RestElement\");\n\n\t for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t args[_key3] = arguments[_key3];\n\t }\n\n\t return builder.apply(void 0, [\"RestProperty\"].concat(args));\n\t}\n\n\tfunction SpreadProperty$1() {\n\t console.trace(\"The node type SpreadProperty has been renamed to SpreadElement\");\n\n\t for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t args[_key4] = arguments[_key4];\n\t }\n\n\t return builder.apply(void 0, [\"SpreadProperty\"].concat(args));\n\t}\n\n\tfunction cleanJSXElementLiteralChild(child, args) {\n\t var lines = child.value.split(/\\r\\n|\\n|\\r/);\n\t var lastNonEmptyLine = 0;\n\n\t for (var i = 0; i < lines.length; i++) {\n\t if (lines[i].match(/[^ \\t]/)) {\n\t lastNonEmptyLine = i;\n\t }\n\t }\n\n\t var str = \"\";\n\n\t for (var _i = 0; _i < lines.length; _i++) {\n\t var line = lines[_i];\n\t var isFirstLine = _i === 0;\n\t var isLastLine = _i === lines.length - 1;\n\t var isLastNonEmptyLine = _i === lastNonEmptyLine;\n\t var trimmedLine = line.replace(/\\t/g, \" \");\n\n\t if (!isFirstLine) {\n\t trimmedLine = trimmedLine.replace(/^[ ]+/, \"\");\n\t }\n\n\t if (!isLastLine) {\n\t trimmedLine = trimmedLine.replace(/[ ]+$/, \"\");\n\t }\n\n\t if (trimmedLine) {\n\t if (!isLastNonEmptyLine) {\n\t trimmedLine += \" \";\n\t }\n\n\t str += trimmedLine;\n\t }\n\t }\n\n\t if (str) args.push(stringLiteral$8(str));\n\t}\n\n\tfunction buildChildren(node) {\n\t var elements = [];\n\n\t for (var i = 0; i < node.children.length; i++) {\n\t var child = node.children[i];\n\n\t if (isJSXText(child)) {\n\t cleanJSXElementLiteralChild(child, elements);\n\t continue;\n\t }\n\n\t if (isJSXExpressionContainer$1(child)) child = child.expression;\n\t if (isJSXEmptyExpression(child)) continue;\n\t elements.push(child);\n\t }\n\n\t return elements;\n\t}\n\n\tfunction isNode(node) {\n\t return !!(node && VISITOR_KEYS$6[node.type]);\n\t}\n\n\tfunction assertNode(node) {\n\t if (!isNode(node)) {\n\t var _node$type;\n\n\t var type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);\n\t throw new TypeError(\"Not a valid node of type \\\"\" + type + \"\\\"\");\n\t }\n\t}\n\n\tfunction assert$1(type, node, opts) {\n\t if (!is$1(type, node, opts)) {\n\t throw new Error(\"Expected type \\\"\" + type + \"\\\" with option \" + JSON.stringify(opts) + \", \" + (\"but instead got \\\"\" + node.type + \"\\\".\"));\n\t }\n\t}\n\n\tfunction assertArrayExpression(node, opts) {\n\t assert$1(\"ArrayExpression\", node, opts);\n\t}\n\tfunction assertAssignmentExpression(node, opts) {\n\t assert$1(\"AssignmentExpression\", node, opts);\n\t}\n\tfunction assertBinaryExpression(node, opts) {\n\t assert$1(\"BinaryExpression\", node, opts);\n\t}\n\tfunction assertInterpreterDirective(node, opts) {\n\t assert$1(\"InterpreterDirective\", node, opts);\n\t}\n\tfunction assertDirective(node, opts) {\n\t assert$1(\"Directive\", node, opts);\n\t}\n\tfunction assertDirectiveLiteral(node, opts) {\n\t assert$1(\"DirectiveLiteral\", node, opts);\n\t}\n\tfunction assertBlockStatement(node, opts) {\n\t assert$1(\"BlockStatement\", node, opts);\n\t}\n\tfunction assertBreakStatement(node, opts) {\n\t assert$1(\"BreakStatement\", node, opts);\n\t}\n\tfunction assertCallExpression(node, opts) {\n\t assert$1(\"CallExpression\", node, opts);\n\t}\n\tfunction assertCatchClause(node, opts) {\n\t assert$1(\"CatchClause\", node, opts);\n\t}\n\tfunction assertConditionalExpression(node, opts) {\n\t assert$1(\"ConditionalExpression\", node, opts);\n\t}\n\tfunction assertContinueStatement(node, opts) {\n\t assert$1(\"ContinueStatement\", node, opts);\n\t}\n\tfunction assertDebuggerStatement(node, opts) {\n\t assert$1(\"DebuggerStatement\", node, opts);\n\t}\n\tfunction assertDoWhileStatement(node, opts) {\n\t assert$1(\"DoWhileStatement\", node, opts);\n\t}\n\tfunction assertEmptyStatement(node, opts) {\n\t assert$1(\"EmptyStatement\", node, opts);\n\t}\n\tfunction assertExpressionStatement$1(node, opts) {\n\t assert$1(\"ExpressionStatement\", node, opts);\n\t}\n\tfunction assertFile(node, opts) {\n\t assert$1(\"File\", node, opts);\n\t}\n\tfunction assertForInStatement(node, opts) {\n\t assert$1(\"ForInStatement\", node, opts);\n\t}\n\tfunction assertForStatement(node, opts) {\n\t assert$1(\"ForStatement\", node, opts);\n\t}\n\tfunction assertFunctionDeclaration(node, opts) {\n\t assert$1(\"FunctionDeclaration\", node, opts);\n\t}\n\tfunction assertFunctionExpression(node, opts) {\n\t assert$1(\"FunctionExpression\", node, opts);\n\t}\n\tfunction assertIdentifier(node, opts) {\n\t assert$1(\"Identifier\", node, opts);\n\t}\n\tfunction assertIfStatement(node, opts) {\n\t assert$1(\"IfStatement\", node, opts);\n\t}\n\tfunction assertLabeledStatement(node, opts) {\n\t assert$1(\"LabeledStatement\", node, opts);\n\t}\n\tfunction assertStringLiteral(node, opts) {\n\t assert$1(\"StringLiteral\", node, opts);\n\t}\n\tfunction assertNumericLiteral(node, opts) {\n\t assert$1(\"NumericLiteral\", node, opts);\n\t}\n\tfunction assertNullLiteral(node, opts) {\n\t assert$1(\"NullLiteral\", node, opts);\n\t}\n\tfunction assertBooleanLiteral(node, opts) {\n\t assert$1(\"BooleanLiteral\", node, opts);\n\t}\n\tfunction assertRegExpLiteral(node, opts) {\n\t assert$1(\"RegExpLiteral\", node, opts);\n\t}\n\tfunction assertLogicalExpression(node, opts) {\n\t assert$1(\"LogicalExpression\", node, opts);\n\t}\n\tfunction assertMemberExpression(node, opts) {\n\t assert$1(\"MemberExpression\", node, opts);\n\t}\n\tfunction assertNewExpression(node, opts) {\n\t assert$1(\"NewExpression\", node, opts);\n\t}\n\tfunction assertProgram(node, opts) {\n\t assert$1(\"Program\", node, opts);\n\t}\n\tfunction assertObjectExpression(node, opts) {\n\t assert$1(\"ObjectExpression\", node, opts);\n\t}\n\tfunction assertObjectMethod(node, opts) {\n\t assert$1(\"ObjectMethod\", node, opts);\n\t}\n\tfunction assertObjectProperty(node, opts) {\n\t assert$1(\"ObjectProperty\", node, opts);\n\t}\n\tfunction assertRestElement(node, opts) {\n\t assert$1(\"RestElement\", node, opts);\n\t}\n\tfunction assertReturnStatement(node, opts) {\n\t assert$1(\"ReturnStatement\", node, opts);\n\t}\n\tfunction assertSequenceExpression(node, opts) {\n\t assert$1(\"SequenceExpression\", node, opts);\n\t}\n\tfunction assertParenthesizedExpression(node, opts) {\n\t assert$1(\"ParenthesizedExpression\", node, opts);\n\t}\n\tfunction assertSwitchCase(node, opts) {\n\t assert$1(\"SwitchCase\", node, opts);\n\t}\n\tfunction assertSwitchStatement(node, opts) {\n\t assert$1(\"SwitchStatement\", node, opts);\n\t}\n\tfunction assertThisExpression(node, opts) {\n\t assert$1(\"ThisExpression\", node, opts);\n\t}\n\tfunction assertThrowStatement(node, opts) {\n\t assert$1(\"ThrowStatement\", node, opts);\n\t}\n\tfunction assertTryStatement(node, opts) {\n\t assert$1(\"TryStatement\", node, opts);\n\t}\n\tfunction assertUnaryExpression(node, opts) {\n\t assert$1(\"UnaryExpression\", node, opts);\n\t}\n\tfunction assertUpdateExpression(node, opts) {\n\t assert$1(\"UpdateExpression\", node, opts);\n\t}\n\tfunction assertVariableDeclaration(node, opts) {\n\t assert$1(\"VariableDeclaration\", node, opts);\n\t}\n\tfunction assertVariableDeclarator(node, opts) {\n\t assert$1(\"VariableDeclarator\", node, opts);\n\t}\n\tfunction assertWhileStatement(node, opts) {\n\t assert$1(\"WhileStatement\", node, opts);\n\t}\n\tfunction assertWithStatement(node, opts) {\n\t assert$1(\"WithStatement\", node, opts);\n\t}\n\tfunction assertAssignmentPattern(node, opts) {\n\t assert$1(\"AssignmentPattern\", node, opts);\n\t}\n\tfunction assertArrayPattern(node, opts) {\n\t assert$1(\"ArrayPattern\", node, opts);\n\t}\n\tfunction assertArrowFunctionExpression(node, opts) {\n\t assert$1(\"ArrowFunctionExpression\", node, opts);\n\t}\n\tfunction assertClassBody(node, opts) {\n\t assert$1(\"ClassBody\", node, opts);\n\t}\n\tfunction assertClassExpression(node, opts) {\n\t assert$1(\"ClassExpression\", node, opts);\n\t}\n\tfunction assertClassDeclaration(node, opts) {\n\t assert$1(\"ClassDeclaration\", node, opts);\n\t}\n\tfunction assertExportAllDeclaration(node, opts) {\n\t assert$1(\"ExportAllDeclaration\", node, opts);\n\t}\n\tfunction assertExportDefaultDeclaration(node, opts) {\n\t assert$1(\"ExportDefaultDeclaration\", node, opts);\n\t}\n\tfunction assertExportNamedDeclaration(node, opts) {\n\t assert$1(\"ExportNamedDeclaration\", node, opts);\n\t}\n\tfunction assertExportSpecifier$1(node, opts) {\n\t assert$1(\"ExportSpecifier\", node, opts);\n\t}\n\tfunction assertForOfStatement(node, opts) {\n\t assert$1(\"ForOfStatement\", node, opts);\n\t}\n\tfunction assertImportDeclaration(node, opts) {\n\t assert$1(\"ImportDeclaration\", node, opts);\n\t}\n\tfunction assertImportDefaultSpecifier(node, opts) {\n\t assert$1(\"ImportDefaultSpecifier\", node, opts);\n\t}\n\tfunction assertImportNamespaceSpecifier(node, opts) {\n\t assert$1(\"ImportNamespaceSpecifier\", node, opts);\n\t}\n\tfunction assertImportSpecifier(node, opts) {\n\t assert$1(\"ImportSpecifier\", node, opts);\n\t}\n\tfunction assertMetaProperty(node, opts) {\n\t assert$1(\"MetaProperty\", node, opts);\n\t}\n\tfunction assertClassMethod(node, opts) {\n\t assert$1(\"ClassMethod\", node, opts);\n\t}\n\tfunction assertObjectPattern(node, opts) {\n\t assert$1(\"ObjectPattern\", node, opts);\n\t}\n\tfunction assertSpreadElement(node, opts) {\n\t assert$1(\"SpreadElement\", node, opts);\n\t}\n\tfunction assertSuper(node, opts) {\n\t assert$1(\"Super\", node, opts);\n\t}\n\tfunction assertTaggedTemplateExpression(node, opts) {\n\t assert$1(\"TaggedTemplateExpression\", node, opts);\n\t}\n\tfunction assertTemplateElement(node, opts) {\n\t assert$1(\"TemplateElement\", node, opts);\n\t}\n\tfunction assertTemplateLiteral(node, opts) {\n\t assert$1(\"TemplateLiteral\", node, opts);\n\t}\n\tfunction assertYieldExpression(node, opts) {\n\t assert$1(\"YieldExpression\", node, opts);\n\t}\n\tfunction assertAwaitExpression(node, opts) {\n\t assert$1(\"AwaitExpression\", node, opts);\n\t}\n\tfunction assertImport(node, opts) {\n\t assert$1(\"Import\", node, opts);\n\t}\n\tfunction assertBigIntLiteral(node, opts) {\n\t assert$1(\"BigIntLiteral\", node, opts);\n\t}\n\tfunction assertExportNamespaceSpecifier(node, opts) {\n\t assert$1(\"ExportNamespaceSpecifier\", node, opts);\n\t}\n\tfunction assertOptionalMemberExpression(node, opts) {\n\t assert$1(\"OptionalMemberExpression\", node, opts);\n\t}\n\tfunction assertOptionalCallExpression(node, opts) {\n\t assert$1(\"OptionalCallExpression\", node, opts);\n\t}\n\tfunction assertClassProperty(node, opts) {\n\t assert$1(\"ClassProperty\", node, opts);\n\t}\n\tfunction assertClassPrivateProperty(node, opts) {\n\t assert$1(\"ClassPrivateProperty\", node, opts);\n\t}\n\tfunction assertClassPrivateMethod(node, opts) {\n\t assert$1(\"ClassPrivateMethod\", node, opts);\n\t}\n\tfunction assertPrivateName(node, opts) {\n\t assert$1(\"PrivateName\", node, opts);\n\t}\n\tfunction assertAnyTypeAnnotation(node, opts) {\n\t assert$1(\"AnyTypeAnnotation\", node, opts);\n\t}\n\tfunction assertArrayTypeAnnotation(node, opts) {\n\t assert$1(\"ArrayTypeAnnotation\", node, opts);\n\t}\n\tfunction assertBooleanTypeAnnotation(node, opts) {\n\t assert$1(\"BooleanTypeAnnotation\", node, opts);\n\t}\n\tfunction assertBooleanLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"BooleanLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNullLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"NullLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertClassImplements(node, opts) {\n\t assert$1(\"ClassImplements\", node, opts);\n\t}\n\tfunction assertDeclareClass(node, opts) {\n\t assert$1(\"DeclareClass\", node, opts);\n\t}\n\tfunction assertDeclareFunction(node, opts) {\n\t assert$1(\"DeclareFunction\", node, opts);\n\t}\n\tfunction assertDeclareInterface(node, opts) {\n\t assert$1(\"DeclareInterface\", node, opts);\n\t}\n\tfunction assertDeclareModule(node, opts) {\n\t assert$1(\"DeclareModule\", node, opts);\n\t}\n\tfunction assertDeclareModuleExports(node, opts) {\n\t assert$1(\"DeclareModuleExports\", node, opts);\n\t}\n\tfunction assertDeclareTypeAlias(node, opts) {\n\t assert$1(\"DeclareTypeAlias\", node, opts);\n\t}\n\tfunction assertDeclareOpaqueType(node, opts) {\n\t assert$1(\"DeclareOpaqueType\", node, opts);\n\t}\n\tfunction assertDeclareVariable(node, opts) {\n\t assert$1(\"DeclareVariable\", node, opts);\n\t}\n\tfunction assertDeclareExportDeclaration(node, opts) {\n\t assert$1(\"DeclareExportDeclaration\", node, opts);\n\t}\n\tfunction assertDeclareExportAllDeclaration(node, opts) {\n\t assert$1(\"DeclareExportAllDeclaration\", node, opts);\n\t}\n\tfunction assertDeclaredPredicate(node, opts) {\n\t assert$1(\"DeclaredPredicate\", node, opts);\n\t}\n\tfunction assertExistsTypeAnnotation(node, opts) {\n\t assert$1(\"ExistsTypeAnnotation\", node, opts);\n\t}\n\tfunction assertFunctionTypeAnnotation(node, opts) {\n\t assert$1(\"FunctionTypeAnnotation\", node, opts);\n\t}\n\tfunction assertFunctionTypeParam(node, opts) {\n\t assert$1(\"FunctionTypeParam\", node, opts);\n\t}\n\tfunction assertGenericTypeAnnotation(node, opts) {\n\t assert$1(\"GenericTypeAnnotation\", node, opts);\n\t}\n\tfunction assertInferredPredicate(node, opts) {\n\t assert$1(\"InferredPredicate\", node, opts);\n\t}\n\tfunction assertInterfaceExtends(node, opts) {\n\t assert$1(\"InterfaceExtends\", node, opts);\n\t}\n\tfunction assertInterfaceDeclaration(node, opts) {\n\t assert$1(\"InterfaceDeclaration\", node, opts);\n\t}\n\tfunction assertInterfaceTypeAnnotation(node, opts) {\n\t assert$1(\"InterfaceTypeAnnotation\", node, opts);\n\t}\n\tfunction assertIntersectionTypeAnnotation(node, opts) {\n\t assert$1(\"IntersectionTypeAnnotation\", node, opts);\n\t}\n\tfunction assertMixedTypeAnnotation(node, opts) {\n\t assert$1(\"MixedTypeAnnotation\", node, opts);\n\t}\n\tfunction assertEmptyTypeAnnotation(node, opts) {\n\t assert$1(\"EmptyTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNullableTypeAnnotation(node, opts) {\n\t assert$1(\"NullableTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNumberLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"NumberLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNumberTypeAnnotation(node, opts) {\n\t assert$1(\"NumberTypeAnnotation\", node, opts);\n\t}\n\tfunction assertObjectTypeAnnotation(node, opts) {\n\t assert$1(\"ObjectTypeAnnotation\", node, opts);\n\t}\n\tfunction assertObjectTypeInternalSlot(node, opts) {\n\t assert$1(\"ObjectTypeInternalSlot\", node, opts);\n\t}\n\tfunction assertObjectTypeCallProperty(node, opts) {\n\t assert$1(\"ObjectTypeCallProperty\", node, opts);\n\t}\n\tfunction assertObjectTypeIndexer(node, opts) {\n\t assert$1(\"ObjectTypeIndexer\", node, opts);\n\t}\n\tfunction assertObjectTypeProperty(node, opts) {\n\t assert$1(\"ObjectTypeProperty\", node, opts);\n\t}\n\tfunction assertObjectTypeSpreadProperty(node, opts) {\n\t assert$1(\"ObjectTypeSpreadProperty\", node, opts);\n\t}\n\tfunction assertOpaqueType(node, opts) {\n\t assert$1(\"OpaqueType\", node, opts);\n\t}\n\tfunction assertQualifiedTypeIdentifier(node, opts) {\n\t assert$1(\"QualifiedTypeIdentifier\", node, opts);\n\t}\n\tfunction assertStringLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"StringLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertStringTypeAnnotation(node, opts) {\n\t assert$1(\"StringTypeAnnotation\", node, opts);\n\t}\n\tfunction assertSymbolTypeAnnotation(node, opts) {\n\t assert$1(\"SymbolTypeAnnotation\", node, opts);\n\t}\n\tfunction assertThisTypeAnnotation(node, opts) {\n\t assert$1(\"ThisTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTupleTypeAnnotation(node, opts) {\n\t assert$1(\"TupleTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTypeofTypeAnnotation(node, opts) {\n\t assert$1(\"TypeofTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTypeAlias(node, opts) {\n\t assert$1(\"TypeAlias\", node, opts);\n\t}\n\tfunction assertTypeAnnotation(node, opts) {\n\t assert$1(\"TypeAnnotation\", node, opts);\n\t}\n\tfunction assertTypeCastExpression(node, opts) {\n\t assert$1(\"TypeCastExpression\", node, opts);\n\t}\n\tfunction assertTypeParameter(node, opts) {\n\t assert$1(\"TypeParameter\", node, opts);\n\t}\n\tfunction assertTypeParameterDeclaration(node, opts) {\n\t assert$1(\"TypeParameterDeclaration\", node, opts);\n\t}\n\tfunction assertTypeParameterInstantiation(node, opts) {\n\t assert$1(\"TypeParameterInstantiation\", node, opts);\n\t}\n\tfunction assertUnionTypeAnnotation(node, opts) {\n\t assert$1(\"UnionTypeAnnotation\", node, opts);\n\t}\n\tfunction assertVariance(node, opts) {\n\t assert$1(\"Variance\", node, opts);\n\t}\n\tfunction assertVoidTypeAnnotation(node, opts) {\n\t assert$1(\"VoidTypeAnnotation\", node, opts);\n\t}\n\tfunction assertEnumDeclaration(node, opts) {\n\t assert$1(\"EnumDeclaration\", node, opts);\n\t}\n\tfunction assertEnumBooleanBody(node, opts) {\n\t assert$1(\"EnumBooleanBody\", node, opts);\n\t}\n\tfunction assertEnumNumberBody(node, opts) {\n\t assert$1(\"EnumNumberBody\", node, opts);\n\t}\n\tfunction assertEnumStringBody(node, opts) {\n\t assert$1(\"EnumStringBody\", node, opts);\n\t}\n\tfunction assertEnumSymbolBody(node, opts) {\n\t assert$1(\"EnumSymbolBody\", node, opts);\n\t}\n\tfunction assertEnumBooleanMember(node, opts) {\n\t assert$1(\"EnumBooleanMember\", node, opts);\n\t}\n\tfunction assertEnumNumberMember(node, opts) {\n\t assert$1(\"EnumNumberMember\", node, opts);\n\t}\n\tfunction assertEnumStringMember(node, opts) {\n\t assert$1(\"EnumStringMember\", node, opts);\n\t}\n\tfunction assertEnumDefaultedMember(node, opts) {\n\t assert$1(\"EnumDefaultedMember\", node, opts);\n\t}\n\tfunction assertIndexedAccessType(node, opts) {\n\t assert$1(\"IndexedAccessType\", node, opts);\n\t}\n\tfunction assertOptionalIndexedAccessType(node, opts) {\n\t assert$1(\"OptionalIndexedAccessType\", node, opts);\n\t}\n\tfunction assertJSXAttribute(node, opts) {\n\t assert$1(\"JSXAttribute\", node, opts);\n\t}\n\tfunction assertJSXClosingElement(node, opts) {\n\t assert$1(\"JSXClosingElement\", node, opts);\n\t}\n\tfunction assertJSXElement(node, opts) {\n\t assert$1(\"JSXElement\", node, opts);\n\t}\n\tfunction assertJSXEmptyExpression(node, opts) {\n\t assert$1(\"JSXEmptyExpression\", node, opts);\n\t}\n\tfunction assertJSXExpressionContainer(node, opts) {\n\t assert$1(\"JSXExpressionContainer\", node, opts);\n\t}\n\tfunction assertJSXSpreadChild(node, opts) {\n\t assert$1(\"JSXSpreadChild\", node, opts);\n\t}\n\tfunction assertJSXIdentifier(node, opts) {\n\t assert$1(\"JSXIdentifier\", node, opts);\n\t}\n\tfunction assertJSXMemberExpression(node, opts) {\n\t assert$1(\"JSXMemberExpression\", node, opts);\n\t}\n\tfunction assertJSXNamespacedName(node, opts) {\n\t assert$1(\"JSXNamespacedName\", node, opts);\n\t}\n\tfunction assertJSXOpeningElement(node, opts) {\n\t assert$1(\"JSXOpeningElement\", node, opts);\n\t}\n\tfunction assertJSXSpreadAttribute(node, opts) {\n\t assert$1(\"JSXSpreadAttribute\", node, opts);\n\t}\n\tfunction assertJSXText(node, opts) {\n\t assert$1(\"JSXText\", node, opts);\n\t}\n\tfunction assertJSXFragment(node, opts) {\n\t assert$1(\"JSXFragment\", node, opts);\n\t}\n\tfunction assertJSXOpeningFragment(node, opts) {\n\t assert$1(\"JSXOpeningFragment\", node, opts);\n\t}\n\tfunction assertJSXClosingFragment(node, opts) {\n\t assert$1(\"JSXClosingFragment\", node, opts);\n\t}\n\tfunction assertNoop(node, opts) {\n\t assert$1(\"Noop\", node, opts);\n\t}\n\tfunction assertPlaceholder(node, opts) {\n\t assert$1(\"Placeholder\", node, opts);\n\t}\n\tfunction assertV8IntrinsicIdentifier(node, opts) {\n\t assert$1(\"V8IntrinsicIdentifier\", node, opts);\n\t}\n\tfunction assertArgumentPlaceholder(node, opts) {\n\t assert$1(\"ArgumentPlaceholder\", node, opts);\n\t}\n\tfunction assertBindExpression(node, opts) {\n\t assert$1(\"BindExpression\", node, opts);\n\t}\n\tfunction assertImportAttribute(node, opts) {\n\t assert$1(\"ImportAttribute\", node, opts);\n\t}\n\tfunction assertDecorator(node, opts) {\n\t assert$1(\"Decorator\", node, opts);\n\t}\n\tfunction assertDoExpression(node, opts) {\n\t assert$1(\"DoExpression\", node, opts);\n\t}\n\tfunction assertExportDefaultSpecifier(node, opts) {\n\t assert$1(\"ExportDefaultSpecifier\", node, opts);\n\t}\n\tfunction assertRecordExpression(node, opts) {\n\t assert$1(\"RecordExpression\", node, opts);\n\t}\n\tfunction assertTupleExpression(node, opts) {\n\t assert$1(\"TupleExpression\", node, opts);\n\t}\n\tfunction assertDecimalLiteral(node, opts) {\n\t assert$1(\"DecimalLiteral\", node, opts);\n\t}\n\tfunction assertStaticBlock(node, opts) {\n\t assert$1(\"StaticBlock\", node, opts);\n\t}\n\tfunction assertModuleExpression(node, opts) {\n\t assert$1(\"ModuleExpression\", node, opts);\n\t}\n\tfunction assertTopicReference(node, opts) {\n\t assert$1(\"TopicReference\", node, opts);\n\t}\n\tfunction assertPipelineTopicExpression(node, opts) {\n\t assert$1(\"PipelineTopicExpression\", node, opts);\n\t}\n\tfunction assertPipelineBareFunction(node, opts) {\n\t assert$1(\"PipelineBareFunction\", node, opts);\n\t}\n\tfunction assertPipelinePrimaryTopicReference(node, opts) {\n\t assert$1(\"PipelinePrimaryTopicReference\", node, opts);\n\t}\n\tfunction assertTSParameterProperty(node, opts) {\n\t assert$1(\"TSParameterProperty\", node, opts);\n\t}\n\tfunction assertTSDeclareFunction(node, opts) {\n\t assert$1(\"TSDeclareFunction\", node, opts);\n\t}\n\tfunction assertTSDeclareMethod(node, opts) {\n\t assert$1(\"TSDeclareMethod\", node, opts);\n\t}\n\tfunction assertTSQualifiedName(node, opts) {\n\t assert$1(\"TSQualifiedName\", node, opts);\n\t}\n\tfunction assertTSCallSignatureDeclaration(node, opts) {\n\t assert$1(\"TSCallSignatureDeclaration\", node, opts);\n\t}\n\tfunction assertTSConstructSignatureDeclaration(node, opts) {\n\t assert$1(\"TSConstructSignatureDeclaration\", node, opts);\n\t}\n\tfunction assertTSPropertySignature(node, opts) {\n\t assert$1(\"TSPropertySignature\", node, opts);\n\t}\n\tfunction assertTSMethodSignature(node, opts) {\n\t assert$1(\"TSMethodSignature\", node, opts);\n\t}\n\tfunction assertTSIndexSignature(node, opts) {\n\t assert$1(\"TSIndexSignature\", node, opts);\n\t}\n\tfunction assertTSAnyKeyword(node, opts) {\n\t assert$1(\"TSAnyKeyword\", node, opts);\n\t}\n\tfunction assertTSBooleanKeyword(node, opts) {\n\t assert$1(\"TSBooleanKeyword\", node, opts);\n\t}\n\tfunction assertTSBigIntKeyword(node, opts) {\n\t assert$1(\"TSBigIntKeyword\", node, opts);\n\t}\n\tfunction assertTSIntrinsicKeyword(node, opts) {\n\t assert$1(\"TSIntrinsicKeyword\", node, opts);\n\t}\n\tfunction assertTSNeverKeyword(node, opts) {\n\t assert$1(\"TSNeverKeyword\", node, opts);\n\t}\n\tfunction assertTSNullKeyword(node, opts) {\n\t assert$1(\"TSNullKeyword\", node, opts);\n\t}\n\tfunction assertTSNumberKeyword(node, opts) {\n\t assert$1(\"TSNumberKeyword\", node, opts);\n\t}\n\tfunction assertTSObjectKeyword(node, opts) {\n\t assert$1(\"TSObjectKeyword\", node, opts);\n\t}\n\tfunction assertTSStringKeyword(node, opts) {\n\t assert$1(\"TSStringKeyword\", node, opts);\n\t}\n\tfunction assertTSSymbolKeyword(node, opts) {\n\t assert$1(\"TSSymbolKeyword\", node, opts);\n\t}\n\tfunction assertTSUndefinedKeyword(node, opts) {\n\t assert$1(\"TSUndefinedKeyword\", node, opts);\n\t}\n\tfunction assertTSUnknownKeyword(node, opts) {\n\t assert$1(\"TSUnknownKeyword\", node, opts);\n\t}\n\tfunction assertTSVoidKeyword(node, opts) {\n\t assert$1(\"TSVoidKeyword\", node, opts);\n\t}\n\tfunction assertTSThisType(node, opts) {\n\t assert$1(\"TSThisType\", node, opts);\n\t}\n\tfunction assertTSFunctionType(node, opts) {\n\t assert$1(\"TSFunctionType\", node, opts);\n\t}\n\tfunction assertTSConstructorType(node, opts) {\n\t assert$1(\"TSConstructorType\", node, opts);\n\t}\n\tfunction assertTSTypeReference(node, opts) {\n\t assert$1(\"TSTypeReference\", node, opts);\n\t}\n\tfunction assertTSTypePredicate(node, opts) {\n\t assert$1(\"TSTypePredicate\", node, opts);\n\t}\n\tfunction assertTSTypeQuery(node, opts) {\n\t assert$1(\"TSTypeQuery\", node, opts);\n\t}\n\tfunction assertTSTypeLiteral(node, opts) {\n\t assert$1(\"TSTypeLiteral\", node, opts);\n\t}\n\tfunction assertTSArrayType(node, opts) {\n\t assert$1(\"TSArrayType\", node, opts);\n\t}\n\tfunction assertTSTupleType(node, opts) {\n\t assert$1(\"TSTupleType\", node, opts);\n\t}\n\tfunction assertTSOptionalType(node, opts) {\n\t assert$1(\"TSOptionalType\", node, opts);\n\t}\n\tfunction assertTSRestType(node, opts) {\n\t assert$1(\"TSRestType\", node, opts);\n\t}\n\tfunction assertTSNamedTupleMember(node, opts) {\n\t assert$1(\"TSNamedTupleMember\", node, opts);\n\t}\n\tfunction assertTSUnionType(node, opts) {\n\t assert$1(\"TSUnionType\", node, opts);\n\t}\n\tfunction assertTSIntersectionType(node, opts) {\n\t assert$1(\"TSIntersectionType\", node, opts);\n\t}\n\tfunction assertTSConditionalType(node, opts) {\n\t assert$1(\"TSConditionalType\", node, opts);\n\t}\n\tfunction assertTSInferType(node, opts) {\n\t assert$1(\"TSInferType\", node, opts);\n\t}\n\tfunction assertTSParenthesizedType(node, opts) {\n\t assert$1(\"TSParenthesizedType\", node, opts);\n\t}\n\tfunction assertTSTypeOperator(node, opts) {\n\t assert$1(\"TSTypeOperator\", node, opts);\n\t}\n\tfunction assertTSIndexedAccessType(node, opts) {\n\t assert$1(\"TSIndexedAccessType\", node, opts);\n\t}\n\tfunction assertTSMappedType(node, opts) {\n\t assert$1(\"TSMappedType\", node, opts);\n\t}\n\tfunction assertTSLiteralType(node, opts) {\n\t assert$1(\"TSLiteralType\", node, opts);\n\t}\n\tfunction assertTSExpressionWithTypeArguments(node, opts) {\n\t assert$1(\"TSExpressionWithTypeArguments\", node, opts);\n\t}\n\tfunction assertTSInterfaceDeclaration(node, opts) {\n\t assert$1(\"TSInterfaceDeclaration\", node, opts);\n\t}\n\tfunction assertTSInterfaceBody(node, opts) {\n\t assert$1(\"TSInterfaceBody\", node, opts);\n\t}\n\tfunction assertTSTypeAliasDeclaration(node, opts) {\n\t assert$1(\"TSTypeAliasDeclaration\", node, opts);\n\t}\n\tfunction assertTSAsExpression(node, opts) {\n\t assert$1(\"TSAsExpression\", node, opts);\n\t}\n\tfunction assertTSTypeAssertion(node, opts) {\n\t assert$1(\"TSTypeAssertion\", node, opts);\n\t}\n\tfunction assertTSEnumDeclaration(node, opts) {\n\t assert$1(\"TSEnumDeclaration\", node, opts);\n\t}\n\tfunction assertTSEnumMember(node, opts) {\n\t assert$1(\"TSEnumMember\", node, opts);\n\t}\n\tfunction assertTSModuleDeclaration(node, opts) {\n\t assert$1(\"TSModuleDeclaration\", node, opts);\n\t}\n\tfunction assertTSModuleBlock(node, opts) {\n\t assert$1(\"TSModuleBlock\", node, opts);\n\t}\n\tfunction assertTSImportType(node, opts) {\n\t assert$1(\"TSImportType\", node, opts);\n\t}\n\tfunction assertTSImportEqualsDeclaration(node, opts) {\n\t assert$1(\"TSImportEqualsDeclaration\", node, opts);\n\t}\n\tfunction assertTSExternalModuleReference(node, opts) {\n\t assert$1(\"TSExternalModuleReference\", node, opts);\n\t}\n\tfunction assertTSNonNullExpression(node, opts) {\n\t assert$1(\"TSNonNullExpression\", node, opts);\n\t}\n\tfunction assertTSExportAssignment(node, opts) {\n\t assert$1(\"TSExportAssignment\", node, opts);\n\t}\n\tfunction assertTSNamespaceExportDeclaration(node, opts) {\n\t assert$1(\"TSNamespaceExportDeclaration\", node, opts);\n\t}\n\tfunction assertTSTypeAnnotation(node, opts) {\n\t assert$1(\"TSTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTSTypeParameterInstantiation(node, opts) {\n\t assert$1(\"TSTypeParameterInstantiation\", node, opts);\n\t}\n\tfunction assertTSTypeParameterDeclaration(node, opts) {\n\t assert$1(\"TSTypeParameterDeclaration\", node, opts);\n\t}\n\tfunction assertTSTypeParameter(node, opts) {\n\t assert$1(\"TSTypeParameter\", node, opts);\n\t}\n\tfunction assertExpression$1(node, opts) {\n\t assert$1(\"Expression\", node, opts);\n\t}\n\tfunction assertBinary(node, opts) {\n\t assert$1(\"Binary\", node, opts);\n\t}\n\tfunction assertScopable(node, opts) {\n\t assert$1(\"Scopable\", node, opts);\n\t}\n\tfunction assertBlockParent(node, opts) {\n\t assert$1(\"BlockParent\", node, opts);\n\t}\n\tfunction assertBlock(node, opts) {\n\t assert$1(\"Block\", node, opts);\n\t}\n\tfunction assertStatement(node, opts) {\n\t assert$1(\"Statement\", node, opts);\n\t}\n\tfunction assertTerminatorless(node, opts) {\n\t assert$1(\"Terminatorless\", node, opts);\n\t}\n\tfunction assertCompletionStatement(node, opts) {\n\t assert$1(\"CompletionStatement\", node, opts);\n\t}\n\tfunction assertConditional(node, opts) {\n\t assert$1(\"Conditional\", node, opts);\n\t}\n\tfunction assertLoop(node, opts) {\n\t assert$1(\"Loop\", node, opts);\n\t}\n\tfunction assertWhile(node, opts) {\n\t assert$1(\"While\", node, opts);\n\t}\n\tfunction assertExpressionWrapper(node, opts) {\n\t assert$1(\"ExpressionWrapper\", node, opts);\n\t}\n\tfunction assertFor(node, opts) {\n\t assert$1(\"For\", node, opts);\n\t}\n\tfunction assertForXStatement(node, opts) {\n\t assert$1(\"ForXStatement\", node, opts);\n\t}\n\tfunction assertFunction$1(node, opts) {\n\t assert$1(\"Function\", node, opts);\n\t}\n\tfunction assertFunctionParent(node, opts) {\n\t assert$1(\"FunctionParent\", node, opts);\n\t}\n\tfunction assertPureish(node, opts) {\n\t assert$1(\"Pureish\", node, opts);\n\t}\n\tfunction assertDeclaration(node, opts) {\n\t assert$1(\"Declaration\", node, opts);\n\t}\n\tfunction assertPatternLike(node, opts) {\n\t assert$1(\"PatternLike\", node, opts);\n\t}\n\tfunction assertLVal(node, opts) {\n\t assert$1(\"LVal\", node, opts);\n\t}\n\tfunction assertTSEntityName(node, opts) {\n\t assert$1(\"TSEntityName\", node, opts);\n\t}\n\tfunction assertLiteral(node, opts) {\n\t assert$1(\"Literal\", node, opts);\n\t}\n\tfunction assertImmutable(node, opts) {\n\t assert$1(\"Immutable\", node, opts);\n\t}\n\tfunction assertUserWhitespacable(node, opts) {\n\t assert$1(\"UserWhitespacable\", node, opts);\n\t}\n\tfunction assertMethod(node, opts) {\n\t assert$1(\"Method\", node, opts);\n\t}\n\tfunction assertObjectMember(node, opts) {\n\t assert$1(\"ObjectMember\", node, opts);\n\t}\n\tfunction assertProperty(node, opts) {\n\t assert$1(\"Property\", node, opts);\n\t}\n\tfunction assertUnaryLike(node, opts) {\n\t assert$1(\"UnaryLike\", node, opts);\n\t}\n\tfunction assertPattern(node, opts) {\n\t assert$1(\"Pattern\", node, opts);\n\t}\n\tfunction assertClass(node, opts) {\n\t assert$1(\"Class\", node, opts);\n\t}\n\tfunction assertModuleDeclaration(node, opts) {\n\t assert$1(\"ModuleDeclaration\", node, opts);\n\t}\n\tfunction assertExportDeclaration(node, opts) {\n\t assert$1(\"ExportDeclaration\", node, opts);\n\t}\n\tfunction assertModuleSpecifier(node, opts) {\n\t assert$1(\"ModuleSpecifier\", node, opts);\n\t}\n\tfunction assertPrivate(node, opts) {\n\t assert$1(\"Private\", node, opts);\n\t}\n\tfunction assertFlow(node, opts) {\n\t assert$1(\"Flow\", node, opts);\n\t}\n\tfunction assertFlowType(node, opts) {\n\t assert$1(\"FlowType\", node, opts);\n\t}\n\tfunction assertFlowBaseAnnotation(node, opts) {\n\t assert$1(\"FlowBaseAnnotation\", node, opts);\n\t}\n\tfunction assertFlowDeclaration(node, opts) {\n\t assert$1(\"FlowDeclaration\", node, opts);\n\t}\n\tfunction assertFlowPredicate(node, opts) {\n\t assert$1(\"FlowPredicate\", node, opts);\n\t}\n\tfunction assertEnumBody(node, opts) {\n\t assert$1(\"EnumBody\", node, opts);\n\t}\n\tfunction assertEnumMember(node, opts) {\n\t assert$1(\"EnumMember\", node, opts);\n\t}\n\tfunction assertJSX(node, opts) {\n\t assert$1(\"JSX\", node, opts);\n\t}\n\tfunction assertTSTypeElement(node, opts) {\n\t assert$1(\"TSTypeElement\", node, opts);\n\t}\n\tfunction assertTSType(node, opts) {\n\t assert$1(\"TSType\", node, opts);\n\t}\n\tfunction assertTSBaseType(node, opts) {\n\t assert$1(\"TSBaseType\", node, opts);\n\t}\n\tfunction assertNumberLiteral(node, opts) {\n\t console.trace(\"The node type NumberLiteral has been renamed to NumericLiteral\");\n\t assert$1(\"NumberLiteral\", node, opts);\n\t}\n\tfunction assertRegexLiteral(node, opts) {\n\t console.trace(\"The node type RegexLiteral has been renamed to RegExpLiteral\");\n\t assert$1(\"RegexLiteral\", node, opts);\n\t}\n\tfunction assertRestProperty(node, opts) {\n\t console.trace(\"The node type RestProperty has been renamed to RestElement\");\n\t assert$1(\"RestProperty\", node, opts);\n\t}\n\tfunction assertSpreadProperty(node, opts) {\n\t console.trace(\"The node type SpreadProperty has been renamed to SpreadElement\");\n\t assert$1(\"SpreadProperty\", node, opts);\n\t}\n\n\tfunction createTypeAnnotationBasedOnTypeof$1(type) {\n\t if (type === \"string\") {\n\t return stringTypeAnnotation$2();\n\t } else if (type === \"number\") {\n\t return numberTypeAnnotation$2();\n\t } else if (type === \"undefined\") {\n\t return voidTypeAnnotation$3();\n\t } else if (type === \"boolean\") {\n\t return booleanTypeAnnotation$1();\n\t } else if (type === \"function\") {\n\t return genericTypeAnnotation$1(identifier$j(\"Function\"));\n\t } else if (type === \"object\") {\n\t return genericTypeAnnotation$1(identifier$j(\"Object\"));\n\t } else if (type === \"symbol\") {\n\t return genericTypeAnnotation$1(identifier$j(\"Symbol\"));\n\t } else if (type === \"bigint\") {\n\t return anyTypeAnnotation$2();\n\t } else {\n\t throw new Error(\"Invalid typeof value: \" + type);\n\t }\n\t}\n\n\tfunction getQualifiedName(node) {\n\t return isIdentifier$g(node) ? node.name : node.id.name + \".\" + getQualifiedName(node.qualification);\n\t}\n\n\tfunction removeTypeDuplicates$1(nodes) {\n\t var generics = {};\n\t var bases = {};\n\t var typeGroups = new Set();\n\t var types = [];\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t var node = nodes[i];\n\t if (!node) continue;\n\n\t if (types.indexOf(node) >= 0) {\n\t continue;\n\t }\n\n\t if (isAnyTypeAnnotation$1(node)) {\n\t return [node];\n\t }\n\n\t if (isFlowBaseAnnotation$1(node)) {\n\t bases[node.type] = node;\n\t continue;\n\t }\n\n\t if (isUnionTypeAnnotation$2(node)) {\n\t if (!typeGroups.has(node.types)) {\n\t nodes = nodes.concat(node.types);\n\t typeGroups.add(node.types);\n\t }\n\n\t continue;\n\t }\n\n\t if (isGenericTypeAnnotation$1(node)) {\n\t var name = getQualifiedName(node.id);\n\n\t if (generics[name]) {\n\t var existing = generics[name];\n\n\t if (existing.typeParameters) {\n\t if (node.typeParameters) {\n\t existing.typeParameters.params = removeTypeDuplicates$1(existing.typeParameters.params.concat(node.typeParameters.params));\n\t }\n\t } else {\n\t existing = node.typeParameters;\n\t }\n\t } else {\n\t generics[name] = node;\n\t }\n\n\t continue;\n\t }\n\n\t types.push(node);\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(bases); _i < _Object$keys.length; _i++) {\n\t var type = _Object$keys[_i];\n\t types.push(bases[type]);\n\t }\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(generics); _i2 < _Object$keys2.length; _i2++) {\n\t var _name = _Object$keys2[_i2];\n\t types.push(generics[_name]);\n\t }\n\n\t return types;\n\t}\n\n\tfunction createFlowUnionType$2(types) {\n\t var flattened = removeTypeDuplicates$1(types);\n\n\t if (flattened.length === 1) {\n\t return flattened[0];\n\t } else {\n\t return unionTypeAnnotation$1(flattened);\n\t }\n\t}\n\n\tfunction removeTypeDuplicates(nodes) {\n\t var generics = {};\n\t var bases = {};\n\t var typeGroups = new Set();\n\t var types = [];\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t var node = nodes[i];\n\t if (!node) continue;\n\n\t if (types.indexOf(node) >= 0) {\n\t continue;\n\t }\n\n\t if (isTSAnyKeyword(node)) {\n\t return [node];\n\t }\n\n\t if (isTSBaseType(node)) {\n\t bases[node.type] = node;\n\t continue;\n\t }\n\n\t if (isTSUnionType$1(node)) {\n\t if (!typeGroups.has(node.types)) {\n\t nodes.push.apply(nodes, _toConsumableArray(node.types));\n\t typeGroups.add(node.types);\n\t }\n\n\t continue;\n\t }\n\n\t types.push(node);\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(bases); _i < _Object$keys.length; _i++) {\n\t var type = _Object$keys[_i];\n\t types.push(bases[type]);\n\t }\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(generics); _i2 < _Object$keys2.length; _i2++) {\n\t var name = _Object$keys2[_i2];\n\t types.push(generics[name]);\n\t }\n\n\t return types;\n\t}\n\n\tfunction createTSUnionType$2(typeAnnotations) {\n\t var types = typeAnnotations.map(function (type) {\n\t return type.typeAnnotation;\n\t });\n\t var flattened = removeTypeDuplicates(types);\n\n\t if (flattened.length === 1) {\n\t return flattened[0];\n\t } else {\n\t return tsUnionType(flattened);\n\t }\n\t}\n\n\tvar has$c = Function.call.bind(Object.prototype.hasOwnProperty);\n\n\tfunction cloneIfNode(obj, deep, withoutLoc) {\n\t if (obj && typeof obj.type === \"string\") {\n\t return cloneNode$i(obj, deep, withoutLoc);\n\t }\n\n\t return obj;\n\t}\n\n\tfunction cloneIfNodeOrArray(obj, deep, withoutLoc) {\n\t if (Array.isArray(obj)) {\n\t return obj.map(function (node) {\n\t return cloneIfNode(node, deep, withoutLoc);\n\t });\n\t }\n\n\t return cloneIfNode(obj, deep, withoutLoc);\n\t}\n\n\tfunction cloneNode$i(node, deep, withoutLoc) {\n\t if (deep === void 0) {\n\t deep = true;\n\t }\n\n\t if (withoutLoc === void 0) {\n\t withoutLoc = false;\n\t }\n\n\t if (!node) return node;\n\t var type = node.type;\n\t var newNode = {\n\t type: node.type\n\t };\n\n\t if (isIdentifier$g(node)) {\n\t newNode.name = node.name;\n\n\t if (has$c(node, \"optional\") && typeof node.optional === \"boolean\") {\n\t newNode.optional = node.optional;\n\t }\n\n\t if (has$c(node, \"typeAnnotation\")) {\n\t newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;\n\t }\n\t } else if (!has$c(NODE_FIELDS, type)) {\n\t throw new Error(\"Unknown node type: \\\"\" + type + \"\\\"\");\n\t } else {\n\t for (var _i = 0, _Object$keys = Object.keys(NODE_FIELDS[type]); _i < _Object$keys.length; _i++) {\n\t var field = _Object$keys[_i];\n\n\t if (has$c(node, field)) {\n\t if (deep) {\n\t newNode[field] = isFile$1(node) && field === \"comments\" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);\n\t } else {\n\t newNode[field] = node[field];\n\t }\n\t }\n\t }\n\t }\n\n\t if (has$c(node, \"loc\")) {\n\t if (withoutLoc) {\n\t newNode.loc = null;\n\t } else {\n\t newNode.loc = node.loc;\n\t }\n\t }\n\n\t if (has$c(node, \"leadingComments\")) {\n\t newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);\n\t }\n\n\t if (has$c(node, \"innerComments\")) {\n\t newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);\n\t }\n\n\t if (has$c(node, \"trailingComments\")) {\n\t newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);\n\t }\n\n\t if (has$c(node, \"extra\")) {\n\t newNode.extra = Object.assign({}, node.extra);\n\t }\n\n\t return newNode;\n\t}\n\n\tfunction maybeCloneComments(comments, deep, withoutLoc) {\n\t if (!comments || !deep) {\n\t return comments;\n\t }\n\n\t return comments.map(function (_ref) {\n\t var type = _ref.type,\n\t value = _ref.value,\n\t loc = _ref.loc;\n\n\t if (withoutLoc) {\n\t return {\n\t type: type,\n\t value: value,\n\t loc: null\n\t };\n\t }\n\n\t return {\n\t type: type,\n\t value: value,\n\t loc: loc\n\t };\n\t });\n\t}\n\n\tfunction clone(node) {\n\t return cloneNode$i(node, false);\n\t}\n\n\tfunction cloneDeep$1(node) {\n\t return cloneNode$i(node);\n\t}\n\n\tfunction cloneDeepWithoutLoc(node) {\n\t return cloneNode$i(node, true, true);\n\t}\n\n\tfunction cloneWithoutLoc(node) {\n\t return cloneNode$i(node, false, true);\n\t}\n\n\tfunction addComments$1(node, type, comments) {\n\t if (!comments || !node) return node;\n\t var key = type + \"Comments\";\n\n\t if (node[key]) {\n\t if (type === \"leading\") {\n\t node[key] = comments.concat(node[key]);\n\t } else {\n\t var _node$key;\n\n\t (_node$key = node[key]).push.apply(_node$key, _toConsumableArray(comments));\n\t }\n\t } else {\n\t node[key] = comments;\n\t }\n\n\t return node;\n\t}\n\n\tfunction addComment$2(node, type, content, line) {\n\t return addComments$1(node, type, [{\n\t type: line ? \"CommentLine\" : \"CommentBlock\",\n\t value: content\n\t }]);\n\t}\n\n\tfunction inherit(key, child, parent) {\n\t if (child && parent) {\n\t child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));\n\t }\n\t}\n\n\tfunction inheritInnerComments(child, parent) {\n\t inherit(\"innerComments\", child, parent);\n\t}\n\n\tfunction inheritLeadingComments$1(child, parent) {\n\t inherit(\"leadingComments\", child, parent);\n\t}\n\n\tfunction inheritTrailingComments$1(child, parent) {\n\t inherit(\"trailingComments\", child, parent);\n\t}\n\n\tfunction inheritsComments$2(child, parent) {\n\t inheritTrailingComments$1(child, parent);\n\t inheritLeadingComments$1(child, parent);\n\t inheritInnerComments(child, parent);\n\t return child;\n\t}\n\n\tfunction removeComments$2(node) {\n\t COMMENT_KEYS.forEach(function (key) {\n\t node[key] = null;\n\t });\n\t return node;\n\t}\n\n\tvar EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS$3[\"Expression\"];\n\tvar BINARY_TYPES = FLIPPED_ALIAS_KEYS$3[\"Binary\"];\n\tvar SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS$3[\"Scopable\"];\n\tvar BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"BlockParent\"];\n\tvar BLOCK_TYPES = FLIPPED_ALIAS_KEYS$3[\"Block\"];\n\tvar STATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"Statement\"];\n\tvar TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS$3[\"Terminatorless\"];\n\tvar COMPLETIONSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"CompletionStatement\"];\n\tvar CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS$3[\"Conditional\"];\n\tvar LOOP_TYPES = FLIPPED_ALIAS_KEYS$3[\"Loop\"];\n\tvar WHILE_TYPES = FLIPPED_ALIAS_KEYS$3[\"While\"];\n\tvar EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS$3[\"ExpressionWrapper\"];\n\tvar FOR_TYPES = FLIPPED_ALIAS_KEYS$3[\"For\"];\n\tvar FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"ForXStatement\"];\n\tvar FUNCTION_TYPES$1 = FLIPPED_ALIAS_KEYS$3[\"Function\"];\n\tvar FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"FunctionParent\"];\n\tvar PUREISH_TYPES = FLIPPED_ALIAS_KEYS$3[\"Pureish\"];\n\tvar DECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"Declaration\"];\n\tvar PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS$3[\"PatternLike\"];\n\tvar LVAL_TYPES = FLIPPED_ALIAS_KEYS$3[\"LVal\"];\n\tvar TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSEntityName\"];\n\tvar LITERAL_TYPES = FLIPPED_ALIAS_KEYS$3[\"Literal\"];\n\tvar IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS$3[\"Immutable\"];\n\tvar USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS$3[\"UserWhitespacable\"];\n\tvar METHOD_TYPES = FLIPPED_ALIAS_KEYS$3[\"Method\"];\n\tvar OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS$3[\"ObjectMember\"];\n\tvar PROPERTY_TYPES = FLIPPED_ALIAS_KEYS$3[\"Property\"];\n\tvar UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS$3[\"UnaryLike\"];\n\tvar PATTERN_TYPES = FLIPPED_ALIAS_KEYS$3[\"Pattern\"];\n\tvar CLASS_TYPES = FLIPPED_ALIAS_KEYS$3[\"Class\"];\n\tvar MODULEDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"ModuleDeclaration\"];\n\tvar EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"ExportDeclaration\"];\n\tvar MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS$3[\"ModuleSpecifier\"];\n\tvar PRIVATE_TYPES = FLIPPED_ALIAS_KEYS$3[\"Private\"];\n\tvar FLOW_TYPES = FLIPPED_ALIAS_KEYS$3[\"Flow\"];\n\tvar FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowType\"];\n\tvar FLOWBASEANNOTATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowBaseAnnotation\"];\n\tvar FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowDeclaration\"];\n\tvar FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowPredicate\"];\n\tvar ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS$3[\"EnumBody\"];\n\tvar ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS$3[\"EnumMember\"];\n\tvar JSX_TYPES = FLIPPED_ALIAS_KEYS$3[\"JSX\"];\n\tvar TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSTypeElement\"];\n\tvar TSTYPE_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSType\"];\n\tvar TSBASETYPE_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSBaseType\"];\n\n\tfunction toBlock(node, parent) {\n\t if (isBlockStatement$2(node)) {\n\t return node;\n\t }\n\n\t var blockNodes = [];\n\n\t if (isEmptyStatement$1(node)) {\n\t blockNodes = [];\n\t } else {\n\t if (!isStatement$7(node)) {\n\t if (isFunction$4(parent)) {\n\t node = returnStatement$3(node);\n\t } else {\n\t node = expressionStatement$a(node);\n\t }\n\t }\n\n\t blockNodes = [node];\n\t }\n\n\t return blockStatement$6(blockNodes);\n\t}\n\n\tfunction ensureBlock$1(node, key) {\n\t if (key === void 0) {\n\t key = \"body\";\n\t }\n\n\t return node[key] = toBlock(node[key], node);\n\t}\n\n\tfunction toIdentifier$1(input) {\n\t input = input + \"\";\n\t var name = \"\";\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(input), _step; !(_step = _iterator()).done;) {\n\t var c = _step.value;\n\t name += isIdentifierChar(c.codePointAt(0)) ? c : \"-\";\n\t }\n\n\t name = name.replace(/^[-0-9]+/, \"\");\n\t name = name.replace(/[-\\s]+(.)?/g, function (match, c) {\n\t return c ? c.toUpperCase() : \"\";\n\t });\n\n\t if (!isValidIdentifier$1(name)) {\n\t name = \"_\" + name;\n\t }\n\n\t return name || \"_\";\n\t}\n\n\tfunction toBindingIdentifierName$1(name) {\n\t name = toIdentifier$1(name);\n\t if (name === \"eval\" || name === \"arguments\") name = \"_\" + name;\n\t return name;\n\t}\n\n\tfunction toComputedKey$3(node, key) {\n\t if (key === void 0) {\n\t key = node.key || node.property;\n\t }\n\n\t if (!node.computed && isIdentifier$g(key)) key = stringLiteral$8(key.name);\n\t return key;\n\t}\n\n\tfunction toExpression(node) {\n\t if (isExpressionStatement$4(node)) {\n\t node = node.expression;\n\t }\n\n\t if (isExpression$4(node)) {\n\t return node;\n\t }\n\n\t if (isClass$1(node)) {\n\t node.type = \"ClassExpression\";\n\t } else if (isFunction$4(node)) {\n\t node.type = \"FunctionExpression\";\n\t }\n\n\t if (!isExpression$4(node)) {\n\t throw new Error(\"cannot turn \" + node.type + \" to an expression\");\n\t }\n\n\t return node;\n\t}\n\n\tfunction traverseFast$2(node, enter, opts) {\n\t if (!node) return;\n\t var keys = VISITOR_KEYS$6[node.type];\n\t if (!keys) return;\n\t opts = opts || {};\n\t enter(node, opts);\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {\n\t var key = _step.value;\n\t var subNode = node[key];\n\n\t if (Array.isArray(subNode)) {\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(subNode), _step2; !(_step2 = _iterator2()).done;) {\n\t var _node = _step2.value;\n\t traverseFast$2(_node, enter, opts);\n\t }\n\t } else {\n\t traverseFast$2(subNode, enter, opts);\n\t }\n\t }\n\t}\n\n\tvar CLEAR_KEYS = [\"tokens\", \"start\", \"end\", \"loc\", \"raw\", \"rawValue\"];\n\tvar CLEAR_KEYS_PLUS_COMMENTS = COMMENT_KEYS.concat([\"comments\"]).concat(CLEAR_KEYS);\n\tfunction removeProperties$1(node, opts) {\n\t if (opts === void 0) {\n\t opts = {};\n\t }\n\n\t var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(map), _step; !(_step = _iterator()).done;) {\n\t var _key = _step.value;\n\t if (node[_key] != null) node[_key] = undefined;\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t if (key[0] === \"_\" && node[key] != null) node[key] = undefined;\n\t }\n\n\t var symbols = Object.getOwnPropertySymbols(node);\n\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(symbols), _step2; !(_step2 = _iterator2()).done;) {\n\t var sym = _step2.value;\n\t node[sym] = null;\n\t }\n\t}\n\n\tfunction removePropertiesDeep$1(tree, opts) {\n\t traverseFast$2(tree, removeProperties$1, opts);\n\t return tree;\n\t}\n\n\tfunction toKeyAlias$1(node, key) {\n\t if (key === void 0) {\n\t key = node.key;\n\t }\n\n\t var alias;\n\n\t if (node.kind === \"method\") {\n\t return toKeyAlias$1.increment() + \"\";\n\t } else if (isIdentifier$g(key)) {\n\t alias = key.name;\n\t } else if (isStringLiteral$7(key)) {\n\t alias = JSON.stringify(key.value);\n\t } else {\n\t alias = JSON.stringify(removePropertiesDeep$1(cloneNode$i(key)));\n\t }\n\n\t if (node.computed) {\n\t alias = \"[\" + alias + \"]\";\n\t }\n\n\t if (node[\"static\"]) {\n\t alias = \"static:\" + alias;\n\t }\n\n\t return alias;\n\t}\n\ttoKeyAlias$1.uid = 0;\n\n\ttoKeyAlias$1.increment = function () {\n\t if (toKeyAlias$1.uid >= Number.MAX_SAFE_INTEGER) {\n\t return toKeyAlias$1.uid = 0;\n\t } else {\n\t return toKeyAlias$1.uid++;\n\t }\n\t};\n\n\tfunction getBindingIdentifiers$2(node, duplicates, outerOnly) {\n\t var search = [].concat(node);\n\t var ids = Object.create(null);\n\n\t while (search.length) {\n\t var id = search.shift();\n\t if (!id) continue;\n\t var keys = getBindingIdentifiers$2.keys[id.type];\n\n\t if (isIdentifier$g(id)) {\n\t if (duplicates) {\n\t var _ids = ids[id.name] = ids[id.name] || [];\n\n\t _ids.push(id);\n\t } else {\n\t ids[id.name] = id;\n\t }\n\n\t continue;\n\t }\n\n\t if (isExportDeclaration$2(id) && !isExportAllDeclaration$1(id)) {\n\t if (isDeclaration$1(id.declaration)) {\n\t search.push(id.declaration);\n\t }\n\n\t continue;\n\t }\n\n\t if (outerOnly) {\n\t if (isFunctionDeclaration$1(id)) {\n\t search.push(id.id);\n\t continue;\n\t }\n\n\t if (isFunctionExpression$1(id)) {\n\t continue;\n\t }\n\t }\n\n\t if (keys) {\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\n\t if (id[key]) {\n\t search = search.concat(id[key]);\n\t }\n\t }\n\t }\n\t }\n\n\t return ids;\n\t}\n\n\tgetBindingIdentifiers$2.keys = {\n\t DeclareClass: [\"id\"],\n\t DeclareFunction: [\"id\"],\n\t DeclareModule: [\"id\"],\n\t DeclareVariable: [\"id\"],\n\t DeclareInterface: [\"id\"],\n\t DeclareTypeAlias: [\"id\"],\n\t DeclareOpaqueType: [\"id\"],\n\t InterfaceDeclaration: [\"id\"],\n\t TypeAlias: [\"id\"],\n\t OpaqueType: [\"id\"],\n\t CatchClause: [\"param\"],\n\t LabeledStatement: [\"label\"],\n\t UnaryExpression: [\"argument\"],\n\t AssignmentExpression: [\"left\"],\n\t ImportSpecifier: [\"local\"],\n\t ImportNamespaceSpecifier: [\"local\"],\n\t ImportDefaultSpecifier: [\"local\"],\n\t ImportDeclaration: [\"specifiers\"],\n\t ExportSpecifier: [\"exported\"],\n\t ExportNamespaceSpecifier: [\"exported\"],\n\t ExportDefaultSpecifier: [\"exported\"],\n\t FunctionDeclaration: [\"id\", \"params\"],\n\t FunctionExpression: [\"id\", \"params\"],\n\t ArrowFunctionExpression: [\"params\"],\n\t ObjectMethod: [\"params\"],\n\t ClassMethod: [\"params\"],\n\t ClassPrivateMethod: [\"params\"],\n\t ForInStatement: [\"left\"],\n\t ForOfStatement: [\"left\"],\n\t ClassDeclaration: [\"id\"],\n\t ClassExpression: [\"id\"],\n\t RestElement: [\"argument\"],\n\t UpdateExpression: [\"argument\"],\n\t ObjectProperty: [\"value\"],\n\t AssignmentPattern: [\"left\"],\n\t ArrayPattern: [\"elements\"],\n\t ObjectPattern: [\"properties\"],\n\t VariableDeclaration: [\"declarations\"],\n\t VariableDeclarator: [\"id\"]\n\t};\n\n\tfunction gatherSequenceExpressions(nodes, scope, declars) {\n\t var exprs = [];\n\t var ensureLastUndefined = true;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(nodes), _step; !(_step = _iterator()).done;) {\n\t var node = _step.value;\n\n\t if (!isEmptyStatement$1(node)) {\n\t ensureLastUndefined = false;\n\t }\n\n\t if (isExpression$4(node)) {\n\t exprs.push(node);\n\t } else if (isExpressionStatement$4(node)) {\n\t exprs.push(node.expression);\n\t } else if (isVariableDeclaration$3(node)) {\n\t if (node.kind !== \"var\") return;\n\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(node.declarations), _step2; !(_step2 = _iterator2()).done;) {\n\t var declar = _step2.value;\n\t var bindings = getBindingIdentifiers$2(declar);\n\n\t for (var _i = 0, _Object$keys = Object.keys(bindings); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t declars.push({\n\t kind: node.kind,\n\t id: cloneNode$i(bindings[key])\n\t });\n\t }\n\n\t if (declar.init) {\n\t exprs.push(assignmentExpression$c(\"=\", declar.id, declar.init));\n\t }\n\t }\n\n\t ensureLastUndefined = true;\n\t } else if (isIfStatement$2(node)) {\n\t var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();\n\t var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();\n\t if (!consequent || !alternate) return;\n\t exprs.push(conditionalExpression$3(node.test, consequent, alternate));\n\t } else if (isBlockStatement$2(node)) {\n\t var body = gatherSequenceExpressions(node.body, scope, declars);\n\t if (!body) return;\n\t exprs.push(body);\n\t } else if (isEmptyStatement$1(node)) {\n\t if (nodes.indexOf(node) === 0) {\n\t ensureLastUndefined = true;\n\t }\n\t } else {\n\t return;\n\t }\n\t }\n\n\t if (ensureLastUndefined) {\n\t exprs.push(scope.buildUndefinedNode());\n\t }\n\n\t if (exprs.length === 1) {\n\t return exprs[0];\n\t } else {\n\t return sequenceExpression$7(exprs);\n\t }\n\t}\n\n\tfunction toSequenceExpression$1(nodes, scope) {\n\t if (!(nodes != null && nodes.length)) return;\n\t var declars = [];\n\t var result = gatherSequenceExpressions(nodes, scope, declars);\n\t if (!result) return;\n\n\t for (var _i = 0, _declars = declars; _i < _declars.length; _i++) {\n\t var declar = _declars[_i];\n\t scope.push(declar);\n\t }\n\n\t return result;\n\t}\n\n\tfunction toStatement(node, ignore) {\n\t if (isStatement$7(node)) {\n\t return node;\n\t }\n\n\t var mustHaveId = false;\n\t var newType;\n\n\t if (isClass$1(node)) {\n\t mustHaveId = true;\n\t newType = \"ClassDeclaration\";\n\t } else if (isFunction$4(node)) {\n\t mustHaveId = true;\n\t newType = \"FunctionDeclaration\";\n\t } else if (isAssignmentExpression$3(node)) {\n\t return expressionStatement$a(node);\n\t }\n\n\t if (mustHaveId && !node.id) {\n\t newType = false;\n\t }\n\n\t if (!newType) {\n\t if (ignore) {\n\t return false;\n\t } else {\n\t throw new Error(\"cannot turn \" + node.type + \" to a statement\");\n\t }\n\t }\n\n\t node.type = newType;\n\t return node;\n\t}\n\n\tvar objectToString = Function.call.bind(Object.prototype.toString);\n\n\tfunction isRegExp(value) {\n\t return objectToString(value) === \"[object RegExp]\";\n\t}\n\n\tfunction isPlainObject(value) {\n\t if (typeof value !== \"object\" || value === null || Object.prototype.toString.call(value) !== \"[object Object]\") {\n\t return false;\n\t }\n\n\t var proto = Object.getPrototypeOf(value);\n\t return proto === null || Object.getPrototypeOf(proto) === null;\n\t}\n\n\tfunction valueToNode$1(value) {\n\t if (value === undefined) {\n\t return identifier$j(\"undefined\");\n\t }\n\n\t if (value === true || value === false) {\n\t return booleanLiteral$5(value);\n\t }\n\n\t if (value === null) {\n\t return nullLiteral$2();\n\t }\n\n\t if (typeof value === \"string\") {\n\t return stringLiteral$8(value);\n\t }\n\n\t if (typeof value === \"number\") {\n\t var result;\n\n\t if (Number.isFinite(value)) {\n\t result = numericLiteral$8(Math.abs(value));\n\t } else {\n\t var numerator;\n\n\t if (Number.isNaN(value)) {\n\t numerator = numericLiteral$8(0);\n\t } else {\n\t numerator = numericLiteral$8(1);\n\t }\n\n\t result = binaryExpression$4(\"/\", numerator, numericLiteral$8(0));\n\t }\n\n\t if (value < 0 || Object.is(value, -0)) {\n\t result = unaryExpression$7(\"-\", result);\n\t }\n\n\t return result;\n\t }\n\n\t if (isRegExp(value)) {\n\t var pattern = value.source;\n\t var flags = value.toString().match(/\\/([a-z]+|)$/)[1];\n\t return regExpLiteral(pattern, flags);\n\t }\n\n\t if (Array.isArray(value)) {\n\t return arrayExpression$2(value.map(valueToNode$1));\n\t }\n\n\t if (isPlainObject(value)) {\n\t var props = [];\n\n\t for (var _i = 0, _Object$keys = Object.keys(value); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t var nodeKey = void 0;\n\n\t if (isValidIdentifier$1(key)) {\n\t nodeKey = identifier$j(key);\n\t } else {\n\t nodeKey = stringLiteral$8(key);\n\t }\n\n\t props.push(objectProperty$2(nodeKey, valueToNode$1(value[key])));\n\t }\n\n\t return objectExpression$4(props);\n\t }\n\n\t throw new Error(\"don't know how to turn this value into a node\");\n\t}\n\n\tfunction appendToMemberExpression(member, append, computed) {\n\t if (computed === void 0) {\n\t computed = false;\n\t }\n\n\t member.object = memberExpression$b(member.object, member.property, member.computed);\n\t member.property = append;\n\t member.computed = !!computed;\n\t return member;\n\t}\n\n\tfunction inherits$1(child, parent) {\n\t if (!child || !parent) return child;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(INHERIT_KEYS.optional), _step; !(_step = _iterator()).done;) {\n\t var _key = _step.value;\n\n\t if (child[_key] == null) {\n\t child[_key] = parent[_key];\n\t }\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(parent); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t if (key[0] === \"_\" && key !== \"__clone\") child[key] = parent[key];\n\t }\n\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(INHERIT_KEYS.force), _step2; !(_step2 = _iterator2()).done;) {\n\t var _key2 = _step2.value;\n\t child[_key2] = parent[_key2];\n\t }\n\n\t inheritsComments$2(child, parent);\n\t return child;\n\t}\n\n\tfunction prependToMemberExpression(member, prepend) {\n\t member.object = memberExpression$b(prepend, member.object);\n\t return member;\n\t}\n\n\tfunction getOuterBindingIdentifiers$2(node, duplicates) {\n\t return getBindingIdentifiers$2(node, duplicates, true);\n\t}\n\n\tfunction traverse$2(node, handlers, state) {\n\t if (typeof handlers === \"function\") {\n\t handlers = {\n\t enter: handlers\n\t };\n\t }\n\n\t var _ref = handlers,\n\t enter = _ref.enter,\n\t exit = _ref.exit;\n\t traverseSimpleImpl(node, enter, exit, state, []);\n\t}\n\n\tfunction traverseSimpleImpl(node, enter, exit, state, ancestors) {\n\t var keys = VISITOR_KEYS$6[node.type];\n\t if (!keys) return;\n\t if (enter) enter(node, ancestors, state);\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {\n\t var key = _step.value;\n\t var subNode = node[key];\n\n\t if (Array.isArray(subNode)) {\n\t for (var i = 0; i < subNode.length; i++) {\n\t var child = subNode[i];\n\t if (!child) continue;\n\t ancestors.push({\n\t node: node,\n\t key: key,\n\t index: i\n\t });\n\t traverseSimpleImpl(child, enter, exit, state, ancestors);\n\t ancestors.pop();\n\t }\n\t } else if (subNode) {\n\t ancestors.push({\n\t node: node,\n\t key: key\n\t });\n\t traverseSimpleImpl(subNode, enter, exit, state, ancestors);\n\t ancestors.pop();\n\t }\n\t }\n\n\t if (exit) exit(node, ancestors, state);\n\t}\n\n\tfunction isBinding$1(node, parent, grandparent) {\n\t if (grandparent && node.type === \"Identifier\" && parent.type === \"ObjectProperty\" && grandparent.type === \"ObjectExpression\") {\n\t return false;\n\t }\n\n\t var keys = getBindingIdentifiers$2.keys[parent.type];\n\n\t if (keys) {\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\t var val = parent[key];\n\n\t if (Array.isArray(val)) {\n\t if (val.indexOf(node) >= 0) return true;\n\t } else {\n\t if (val === node) return true;\n\t }\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction isLet(node) {\n\t return isVariableDeclaration$3(node) && (node.kind !== \"var\" || node[BLOCK_SCOPED_SYMBOL]);\n\t}\n\n\tfunction isBlockScoped$2(node) {\n\t return isFunctionDeclaration$1(node) || isClassDeclaration$3(node) || isLet(node);\n\t}\n\n\tfunction isImmutable(node) {\n\t if (isType$2(node.type, \"Immutable\")) return true;\n\n\t if (isIdentifier$g(node)) {\n\t if (node.name === \"undefined\") {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction isNodesEquivalent(a, b) {\n\t if (typeof a !== \"object\" || typeof b !== \"object\" || a == null || b == null) {\n\t return a === b;\n\t }\n\n\t if (a.type !== b.type) {\n\t return false;\n\t }\n\n\t var fields = Object.keys(NODE_FIELDS[a.type] || a.type);\n\t var visitorKeys = VISITOR_KEYS$6[a.type];\n\n\t for (var _i = 0, _fields = fields; _i < _fields.length; _i++) {\n\t var field = _fields[_i];\n\n\t if (typeof a[field] !== typeof b[field]) {\n\t return false;\n\t }\n\n\t if (a[field] == null && b[field] == null) {\n\t continue;\n\t } else if (a[field] == null || b[field] == null) {\n\t return false;\n\t }\n\n\t if (Array.isArray(a[field])) {\n\t if (!Array.isArray(b[field])) {\n\t return false;\n\t }\n\n\t if (a[field].length !== b[field].length) {\n\t return false;\n\t }\n\n\t for (var i = 0; i < a[field].length; i++) {\n\t if (!isNodesEquivalent(a[field][i], b[field][i])) {\n\t return false;\n\t }\n\t }\n\n\t continue;\n\t }\n\n\t if (typeof a[field] === \"object\" && !(visitorKeys != null && visitorKeys.includes(field))) {\n\t for (var _i2 = 0, _Object$keys = Object.keys(a[field]); _i2 < _Object$keys.length; _i2++) {\n\t var key = _Object$keys[_i2];\n\n\t if (a[field][key] !== b[field][key]) {\n\t return false;\n\t }\n\t }\n\n\t continue;\n\t }\n\n\t if (!isNodesEquivalent(a[field], b[field])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}\n\n\tfunction isReferenced$2(node, parent, grandparent) {\n\t switch (parent.type) {\n\t case \"MemberExpression\":\n\t case \"OptionalMemberExpression\":\n\t if (parent.property === node) {\n\t return !!parent.computed;\n\t }\n\n\t return parent.object === node;\n\n\t case \"JSXMemberExpression\":\n\t return parent.object === node;\n\n\t case \"VariableDeclarator\":\n\t return parent.init === node;\n\n\t case \"ArrowFunctionExpression\":\n\t return parent.body === node;\n\n\t case \"PrivateName\":\n\t return false;\n\n\t case \"ClassMethod\":\n\t case \"ClassPrivateMethod\":\n\t case \"ObjectMethod\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return false;\n\n\t case \"ObjectProperty\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return !grandparent || grandparent.type !== \"ObjectPattern\";\n\n\t case \"ClassProperty\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return true;\n\n\t case \"ClassPrivateProperty\":\n\t return parent.key !== node;\n\n\t case \"ClassDeclaration\":\n\t case \"ClassExpression\":\n\t return parent.superClass === node;\n\n\t case \"AssignmentExpression\":\n\t return parent.right === node;\n\n\t case \"AssignmentPattern\":\n\t return parent.right === node;\n\n\t case \"LabeledStatement\":\n\t return false;\n\n\t case \"CatchClause\":\n\t return false;\n\n\t case \"RestElement\":\n\t return false;\n\n\t case \"BreakStatement\":\n\t case \"ContinueStatement\":\n\t return false;\n\n\t case \"FunctionDeclaration\":\n\t case \"FunctionExpression\":\n\t return false;\n\n\t case \"ExportNamespaceSpecifier\":\n\t case \"ExportDefaultSpecifier\":\n\t return false;\n\n\t case \"ExportSpecifier\":\n\t if (grandparent != null && grandparent.source) {\n\t return false;\n\t }\n\n\t return parent.local === node;\n\n\t case \"ImportDefaultSpecifier\":\n\t case \"ImportNamespaceSpecifier\":\n\t case \"ImportSpecifier\":\n\t return false;\n\n\t case \"ImportAttribute\":\n\t return false;\n\n\t case \"JSXAttribute\":\n\t return false;\n\n\t case \"ObjectPattern\":\n\t case \"ArrayPattern\":\n\t return false;\n\n\t case \"MetaProperty\":\n\t return false;\n\n\t case \"ObjectTypeProperty\":\n\t return parent.key !== node;\n\n\t case \"TSEnumMember\":\n\t return parent.id !== node;\n\n\t case \"TSPropertySignature\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return true;\n\t }\n\n\t return true;\n\t}\n\n\tfunction isScope$1(node, parent) {\n\t if (isBlockStatement$2(node) && (isFunction$4(parent) || isCatchClause(parent))) {\n\t return false;\n\t }\n\n\t if (isPattern(node) && (isFunction$4(parent) || isCatchClause(parent))) {\n\t return true;\n\t }\n\n\t return isScopable(node);\n\t}\n\n\tfunction isSpecifierDefault(specifier) {\n\t return isImportDefaultSpecifier$1(specifier) || isIdentifier$g(specifier.imported || specifier.exported, {\n\t name: \"default\"\n\t });\n\t}\n\n\tvar RESERVED_WORDS_ES3_ONLY = new Set([\"abstract\", \"boolean\", \"byte\", \"char\", \"double\", \"enum\", \"final\", \"float\", \"goto\", \"implements\", \"int\", \"interface\", \"long\", \"native\", \"package\", \"private\", \"protected\", \"public\", \"short\", \"static\", \"synchronized\", \"throws\", \"transient\", \"volatile\"]);\n\tfunction isValidES3Identifier(name) {\n\t return isValidIdentifier$1(name) && !RESERVED_WORDS_ES3_ONLY.has(name);\n\t}\n\n\tfunction isVar$2(node) {\n\t return isVariableDeclaration$3(node, {\n\t kind: \"var\"\n\t }) && !node[BLOCK_SCOPED_SYMBOL];\n\t}\n\n\tvar react$3 = {\n\t isReactComponent: isReactComponent,\n\t isCompatTag: isCompatTag$1,\n\t buildChildren: buildChildren\n\t};\n\n\tvar t$f = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\treact: react$3,\n\t\tassertNode: assertNode,\n\t\tcreateTypeAnnotationBasedOnTypeof: createTypeAnnotationBasedOnTypeof$1,\n\t\tcreateUnionTypeAnnotation: createFlowUnionType$2,\n\t\tcreateFlowUnionType: createFlowUnionType$2,\n\t\tcreateTSUnionType: createTSUnionType$2,\n\t\tcloneNode: cloneNode$i,\n\t\tclone: clone,\n\t\tcloneDeep: cloneDeep$1,\n\t\tcloneDeepWithoutLoc: cloneDeepWithoutLoc,\n\t\tcloneWithoutLoc: cloneWithoutLoc,\n\t\taddComment: addComment$2,\n\t\taddComments: addComments$1,\n\t\tinheritInnerComments: inheritInnerComments,\n\t\tinheritLeadingComments: inheritLeadingComments$1,\n\t\tinheritsComments: inheritsComments$2,\n\t\tinheritTrailingComments: inheritTrailingComments$1,\n\t\tremoveComments: removeComments$2,\n\t\tensureBlock: ensureBlock$1,\n\t\ttoBindingIdentifierName: toBindingIdentifierName$1,\n\t\ttoBlock: toBlock,\n\t\ttoComputedKey: toComputedKey$3,\n\t\ttoExpression: toExpression,\n\t\ttoIdentifier: toIdentifier$1,\n\t\ttoKeyAlias: toKeyAlias$1,\n\t\ttoSequenceExpression: toSequenceExpression$1,\n\t\ttoStatement: toStatement,\n\t\tvalueToNode: valueToNode$1,\n\t\tappendToMemberExpression: appendToMemberExpression,\n\t\tinherits: inherits$1,\n\t\tprependToMemberExpression: prependToMemberExpression,\n\t\tremoveProperties: removeProperties$1,\n\t\tremovePropertiesDeep: removePropertiesDeep$1,\n\t\tremoveTypeDuplicates: removeTypeDuplicates$1,\n\t\tgetBindingIdentifiers: getBindingIdentifiers$2,\n\t\tgetOuterBindingIdentifiers: getOuterBindingIdentifiers$2,\n\t\ttraverse: traverse$2,\n\t\ttraverseFast: traverseFast$2,\n\t\tshallowEqual: shallowEqual,\n\t\tis: is$1,\n\t\tisBinding: isBinding$1,\n\t\tisBlockScoped: isBlockScoped$2,\n\t\tisImmutable: isImmutable,\n\t\tisLet: isLet,\n\t\tisNode: isNode,\n\t\tisNodesEquivalent: isNodesEquivalent,\n\t\tisPlaceholderType: isPlaceholderType,\n\t\tisReferenced: isReferenced$2,\n\t\tisScope: isScope$1,\n\t\tisSpecifierDefault: isSpecifierDefault,\n\t\tisType: isType$2,\n\t\tisValidES3Identifier: isValidES3Identifier,\n\t\tisValidIdentifier: isValidIdentifier$1,\n\t\tisVar: isVar$2,\n\t\tmatchesPattern: matchesPattern$2,\n\t\tvalidate: validate$6,\n\t\tbuildMatchMemberExpression: buildMatchMemberExpression$1,\n\t\tassertArrayExpression: assertArrayExpression,\n\t\tassertAssignmentExpression: assertAssignmentExpression,\n\t\tassertBinaryExpression: assertBinaryExpression,\n\t\tassertInterpreterDirective: assertInterpreterDirective,\n\t\tassertDirective: assertDirective,\n\t\tassertDirectiveLiteral: assertDirectiveLiteral,\n\t\tassertBlockStatement: assertBlockStatement,\n\t\tassertBreakStatement: assertBreakStatement,\n\t\tassertCallExpression: assertCallExpression,\n\t\tassertCatchClause: assertCatchClause,\n\t\tassertConditionalExpression: assertConditionalExpression,\n\t\tassertContinueStatement: assertContinueStatement,\n\t\tassertDebuggerStatement: assertDebuggerStatement,\n\t\tassertDoWhileStatement: assertDoWhileStatement,\n\t\tassertEmptyStatement: assertEmptyStatement,\n\t\tassertExpressionStatement: assertExpressionStatement$1,\n\t\tassertFile: assertFile,\n\t\tassertForInStatement: assertForInStatement,\n\t\tassertForStatement: assertForStatement,\n\t\tassertFunctionDeclaration: assertFunctionDeclaration,\n\t\tassertFunctionExpression: assertFunctionExpression,\n\t\tassertIdentifier: assertIdentifier,\n\t\tassertIfStatement: assertIfStatement,\n\t\tassertLabeledStatement: assertLabeledStatement,\n\t\tassertStringLiteral: assertStringLiteral,\n\t\tassertNumericLiteral: assertNumericLiteral,\n\t\tassertNullLiteral: assertNullLiteral,\n\t\tassertBooleanLiteral: assertBooleanLiteral,\n\t\tassertRegExpLiteral: assertRegExpLiteral,\n\t\tassertLogicalExpression: assertLogicalExpression,\n\t\tassertMemberExpression: assertMemberExpression,\n\t\tassertNewExpression: assertNewExpression,\n\t\tassertProgram: assertProgram,\n\t\tassertObjectExpression: assertObjectExpression,\n\t\tassertObjectMethod: assertObjectMethod,\n\t\tassertObjectProperty: assertObjectProperty,\n\t\tassertRestElement: assertRestElement,\n\t\tassertReturnStatement: assertReturnStatement,\n\t\tassertSequenceExpression: assertSequenceExpression,\n\t\tassertParenthesizedExpression: assertParenthesizedExpression,\n\t\tassertSwitchCase: assertSwitchCase,\n\t\tassertSwitchStatement: assertSwitchStatement,\n\t\tassertThisExpression: assertThisExpression,\n\t\tassertThrowStatement: assertThrowStatement,\n\t\tassertTryStatement: assertTryStatement,\n\t\tassertUnaryExpression: assertUnaryExpression,\n\t\tassertUpdateExpression: assertUpdateExpression,\n\t\tassertVariableDeclaration: assertVariableDeclaration,\n\t\tassertVariableDeclarator: assertVariableDeclarator,\n\t\tassertWhileStatement: assertWhileStatement,\n\t\tassertWithStatement: assertWithStatement,\n\t\tassertAssignmentPattern: assertAssignmentPattern,\n\t\tassertArrayPattern: assertArrayPattern,\n\t\tassertArrowFunctionExpression: assertArrowFunctionExpression,\n\t\tassertClassBody: assertClassBody,\n\t\tassertClassExpression: assertClassExpression,\n\t\tassertClassDeclaration: assertClassDeclaration,\n\t\tassertExportAllDeclaration: assertExportAllDeclaration,\n\t\tassertExportDefaultDeclaration: assertExportDefaultDeclaration,\n\t\tassertExportNamedDeclaration: assertExportNamedDeclaration,\n\t\tassertExportSpecifier: assertExportSpecifier$1,\n\t\tassertForOfStatement: assertForOfStatement,\n\t\tassertImportDeclaration: assertImportDeclaration,\n\t\tassertImportDefaultSpecifier: assertImportDefaultSpecifier,\n\t\tassertImportNamespaceSpecifier: assertImportNamespaceSpecifier,\n\t\tassertImportSpecifier: assertImportSpecifier,\n\t\tassertMetaProperty: assertMetaProperty,\n\t\tassertClassMethod: assertClassMethod,\n\t\tassertObjectPattern: assertObjectPattern,\n\t\tassertSpreadElement: assertSpreadElement,\n\t\tassertSuper: assertSuper,\n\t\tassertTaggedTemplateExpression: assertTaggedTemplateExpression,\n\t\tassertTemplateElement: assertTemplateElement,\n\t\tassertTemplateLiteral: assertTemplateLiteral,\n\t\tassertYieldExpression: assertYieldExpression,\n\t\tassertAwaitExpression: assertAwaitExpression,\n\t\tassertImport: assertImport,\n\t\tassertBigIntLiteral: assertBigIntLiteral,\n\t\tassertExportNamespaceSpecifier: assertExportNamespaceSpecifier,\n\t\tassertOptionalMemberExpression: assertOptionalMemberExpression,\n\t\tassertOptionalCallExpression: assertOptionalCallExpression,\n\t\tassertClassProperty: assertClassProperty,\n\t\tassertClassPrivateProperty: assertClassPrivateProperty,\n\t\tassertClassPrivateMethod: assertClassPrivateMethod,\n\t\tassertPrivateName: assertPrivateName,\n\t\tassertAnyTypeAnnotation: assertAnyTypeAnnotation,\n\t\tassertArrayTypeAnnotation: assertArrayTypeAnnotation,\n\t\tassertBooleanTypeAnnotation: assertBooleanTypeAnnotation,\n\t\tassertBooleanLiteralTypeAnnotation: assertBooleanLiteralTypeAnnotation,\n\t\tassertNullLiteralTypeAnnotation: assertNullLiteralTypeAnnotation,\n\t\tassertClassImplements: assertClassImplements,\n\t\tassertDeclareClass: assertDeclareClass,\n\t\tassertDeclareFunction: assertDeclareFunction,\n\t\tassertDeclareInterface: assertDeclareInterface,\n\t\tassertDeclareModule: assertDeclareModule,\n\t\tassertDeclareModuleExports: assertDeclareModuleExports,\n\t\tassertDeclareTypeAlias: assertDeclareTypeAlias,\n\t\tassertDeclareOpaqueType: assertDeclareOpaqueType,\n\t\tassertDeclareVariable: assertDeclareVariable,\n\t\tassertDeclareExportDeclaration: assertDeclareExportDeclaration,\n\t\tassertDeclareExportAllDeclaration: assertDeclareExportAllDeclaration,\n\t\tassertDeclaredPredicate: assertDeclaredPredicate,\n\t\tassertExistsTypeAnnotation: assertExistsTypeAnnotation,\n\t\tassertFunctionTypeAnnotation: assertFunctionTypeAnnotation,\n\t\tassertFunctionTypeParam: assertFunctionTypeParam,\n\t\tassertGenericTypeAnnotation: assertGenericTypeAnnotation,\n\t\tassertInferredPredicate: assertInferredPredicate,\n\t\tassertInterfaceExtends: assertInterfaceExtends,\n\t\tassertInterfaceDeclaration: assertInterfaceDeclaration,\n\t\tassertInterfaceTypeAnnotation: assertInterfaceTypeAnnotation,\n\t\tassertIntersectionTypeAnnotation: assertIntersectionTypeAnnotation,\n\t\tassertMixedTypeAnnotation: assertMixedTypeAnnotation,\n\t\tassertEmptyTypeAnnotation: assertEmptyTypeAnnotation,\n\t\tassertNullableTypeAnnotation: assertNullableTypeAnnotation,\n\t\tassertNumberLiteralTypeAnnotation: assertNumberLiteralTypeAnnotation,\n\t\tassertNumberTypeAnnotation: assertNumberTypeAnnotation,\n\t\tassertObjectTypeAnnotation: assertObjectTypeAnnotation,\n\t\tassertObjectTypeInternalSlot: assertObjectTypeInternalSlot,\n\t\tassertObjectTypeCallProperty: assertObjectTypeCallProperty,\n\t\tassertObjectTypeIndexer: assertObjectTypeIndexer,\n\t\tassertObjectTypeProperty: assertObjectTypeProperty,\n\t\tassertObjectTypeSpreadProperty: assertObjectTypeSpreadProperty,\n\t\tassertOpaqueType: assertOpaqueType,\n\t\tassertQualifiedTypeIdentifier: assertQualifiedTypeIdentifier,\n\t\tassertStringLiteralTypeAnnotation: assertStringLiteralTypeAnnotation,\n\t\tassertStringTypeAnnotation: assertStringTypeAnnotation,\n\t\tassertSymbolTypeAnnotation: assertSymbolTypeAnnotation,\n\t\tassertThisTypeAnnotation: assertThisTypeAnnotation,\n\t\tassertTupleTypeAnnotation: assertTupleTypeAnnotation,\n\t\tassertTypeofTypeAnnotation: assertTypeofTypeAnnotation,\n\t\tassertTypeAlias: assertTypeAlias,\n\t\tassertTypeAnnotation: assertTypeAnnotation,\n\t\tassertTypeCastExpression: assertTypeCastExpression,\n\t\tassertTypeParameter: assertTypeParameter,\n\t\tassertTypeParameterDeclaration: assertTypeParameterDeclaration,\n\t\tassertTypeParameterInstantiation: assertTypeParameterInstantiation,\n\t\tassertUnionTypeAnnotation: assertUnionTypeAnnotation,\n\t\tassertVariance: assertVariance,\n\t\tassertVoidTypeAnnotation: assertVoidTypeAnnotation,\n\t\tassertEnumDeclaration: assertEnumDeclaration,\n\t\tassertEnumBooleanBody: assertEnumBooleanBody,\n\t\tassertEnumNumberBody: assertEnumNumberBody,\n\t\tassertEnumStringBody: assertEnumStringBody,\n\t\tassertEnumSymbolBody: assertEnumSymbolBody,\n\t\tassertEnumBooleanMember: assertEnumBooleanMember,\n\t\tassertEnumNumberMember: assertEnumNumberMember,\n\t\tassertEnumStringMember: assertEnumStringMember,\n\t\tassertEnumDefaultedMember: assertEnumDefaultedMember,\n\t\tassertIndexedAccessType: assertIndexedAccessType,\n\t\tassertOptionalIndexedAccessType: assertOptionalIndexedAccessType,\n\t\tassertJSXAttribute: assertJSXAttribute,\n\t\tassertJSXClosingElement: assertJSXClosingElement,\n\t\tassertJSXElement: assertJSXElement,\n\t\tassertJSXEmptyExpression: assertJSXEmptyExpression,\n\t\tassertJSXExpressionContainer: assertJSXExpressionContainer,\n\t\tassertJSXSpreadChild: assertJSXSpreadChild,\n\t\tassertJSXIdentifier: assertJSXIdentifier,\n\t\tassertJSXMemberExpression: assertJSXMemberExpression,\n\t\tassertJSXNamespacedName: assertJSXNamespacedName,\n\t\tassertJSXOpeningElement: assertJSXOpeningElement,\n\t\tassertJSXSpreadAttribute: assertJSXSpreadAttribute,\n\t\tassertJSXText: assertJSXText,\n\t\tassertJSXFragment: assertJSXFragment,\n\t\tassertJSXOpeningFragment: assertJSXOpeningFragment,\n\t\tassertJSXClosingFragment: assertJSXClosingFragment,\n\t\tassertNoop: assertNoop,\n\t\tassertPlaceholder: assertPlaceholder,\n\t\tassertV8IntrinsicIdentifier: assertV8IntrinsicIdentifier,\n\t\tassertArgumentPlaceholder: assertArgumentPlaceholder,\n\t\tassertBindExpression: assertBindExpression,\n\t\tassertImportAttribute: assertImportAttribute,\n\t\tassertDecorator: assertDecorator,\n\t\tassertDoExpression: assertDoExpression,\n\t\tassertExportDefaultSpecifier: assertExportDefaultSpecifier,\n\t\tassertRecordExpression: assertRecordExpression,\n\t\tassertTupleExpression: assertTupleExpression,\n\t\tassertDecimalLiteral: assertDecimalLiteral,\n\t\tassertStaticBlock: assertStaticBlock,\n\t\tassertModuleExpression: assertModuleExpression,\n\t\tassertTopicReference: assertTopicReference,\n\t\tassertPipelineTopicExpression: assertPipelineTopicExpression,\n\t\tassertPipelineBareFunction: assertPipelineBareFunction,\n\t\tassertPipelinePrimaryTopicReference: assertPipelinePrimaryTopicReference,\n\t\tassertTSParameterProperty: assertTSParameterProperty,\n\t\tassertTSDeclareFunction: assertTSDeclareFunction,\n\t\tassertTSDeclareMethod: assertTSDeclareMethod,\n\t\tassertTSQualifiedName: assertTSQualifiedName,\n\t\tassertTSCallSignatureDeclaration: assertTSCallSignatureDeclaration,\n\t\tassertTSConstructSignatureDeclaration: assertTSConstructSignatureDeclaration,\n\t\tassertTSPropertySignature: assertTSPropertySignature,\n\t\tassertTSMethodSignature: assertTSMethodSignature,\n\t\tassertTSIndexSignature: assertTSIndexSignature,\n\t\tassertTSAnyKeyword: assertTSAnyKeyword,\n\t\tassertTSBooleanKeyword: assertTSBooleanKeyword,\n\t\tassertTSBigIntKeyword: assertTSBigIntKeyword,\n\t\tassertTSIntrinsicKeyword: assertTSIntrinsicKeyword,\n\t\tassertTSNeverKeyword: assertTSNeverKeyword,\n\t\tassertTSNullKeyword: assertTSNullKeyword,\n\t\tassertTSNumberKeyword: assertTSNumberKeyword,\n\t\tassertTSObjectKeyword: assertTSObjectKeyword,\n\t\tassertTSStringKeyword: assertTSStringKeyword,\n\t\tassertTSSymbolKeyword: assertTSSymbolKeyword,\n\t\tassertTSUndefinedKeyword: assertTSUndefinedKeyword,\n\t\tassertTSUnknownKeyword: assertTSUnknownKeyword,\n\t\tassertTSVoidKeyword: assertTSVoidKeyword,\n\t\tassertTSThisType: assertTSThisType,\n\t\tassertTSFunctionType: assertTSFunctionType,\n\t\tassertTSConstructorType: assertTSConstructorType,\n\t\tassertTSTypeReference: assertTSTypeReference,\n\t\tassertTSTypePredicate: assertTSTypePredicate,\n\t\tassertTSTypeQuery: assertTSTypeQuery,\n\t\tassertTSTypeLiteral: assertTSTypeLiteral,\n\t\tassertTSArrayType: assertTSArrayType,\n\t\tassertTSTupleType: assertTSTupleType,\n\t\tassertTSOptionalType: assertTSOptionalType,\n\t\tassertTSRestType: assertTSRestType,\n\t\tassertTSNamedTupleMember: assertTSNamedTupleMember,\n\t\tassertTSUnionType: assertTSUnionType,\n\t\tassertTSIntersectionType: assertTSIntersectionType,\n\t\tassertTSConditionalType: assertTSConditionalType,\n\t\tassertTSInferType: assertTSInferType,\n\t\tassertTSParenthesizedType: assertTSParenthesizedType,\n\t\tassertTSTypeOperator: assertTSTypeOperator,\n\t\tassertTSIndexedAccessType: assertTSIndexedAccessType,\n\t\tassertTSMappedType: assertTSMappedType,\n\t\tassertTSLiteralType: assertTSLiteralType,\n\t\tassertTSExpressionWithTypeArguments: assertTSExpressionWithTypeArguments,\n\t\tassertTSInterfaceDeclaration: assertTSInterfaceDeclaration,\n\t\tassertTSInterfaceBody: assertTSInterfaceBody,\n\t\tassertTSTypeAliasDeclaration: assertTSTypeAliasDeclaration,\n\t\tassertTSAsExpression: assertTSAsExpression,\n\t\tassertTSTypeAssertion: assertTSTypeAssertion,\n\t\tassertTSEnumDeclaration: assertTSEnumDeclaration,\n\t\tassertTSEnumMember: assertTSEnumMember,\n\t\tassertTSModuleDeclaration: assertTSModuleDeclaration,\n\t\tassertTSModuleBlock: assertTSModuleBlock,\n\t\tassertTSImportType: assertTSImportType,\n\t\tassertTSImportEqualsDeclaration: assertTSImportEqualsDeclaration,\n\t\tassertTSExternalModuleReference: assertTSExternalModuleReference,\n\t\tassertTSNonNullExpression: assertTSNonNullExpression,\n\t\tassertTSExportAssignment: assertTSExportAssignment,\n\t\tassertTSNamespaceExportDeclaration: assertTSNamespaceExportDeclaration,\n\t\tassertTSTypeAnnotation: assertTSTypeAnnotation,\n\t\tassertTSTypeParameterInstantiation: assertTSTypeParameterInstantiation,\n\t\tassertTSTypeParameterDeclaration: assertTSTypeParameterDeclaration,\n\t\tassertTSTypeParameter: assertTSTypeParameter,\n\t\tassertExpression: assertExpression$1,\n\t\tassertBinary: assertBinary,\n\t\tassertScopable: assertScopable,\n\t\tassertBlockParent: assertBlockParent,\n\t\tassertBlock: assertBlock,\n\t\tassertStatement: assertStatement,\n\t\tassertTerminatorless: assertTerminatorless,\n\t\tassertCompletionStatement: assertCompletionStatement,\n\t\tassertConditional: assertConditional,\n\t\tassertLoop: assertLoop,\n\t\tassertWhile: assertWhile,\n\t\tassertExpressionWrapper: assertExpressionWrapper,\n\t\tassertFor: assertFor,\n\t\tassertForXStatement: assertForXStatement,\n\t\tassertFunction: assertFunction$1,\n\t\tassertFunctionParent: assertFunctionParent,\n\t\tassertPureish: assertPureish,\n\t\tassertDeclaration: assertDeclaration,\n\t\tassertPatternLike: assertPatternLike,\n\t\tassertLVal: assertLVal,\n\t\tassertTSEntityName: assertTSEntityName,\n\t\tassertLiteral: assertLiteral,\n\t\tassertImmutable: assertImmutable,\n\t\tassertUserWhitespacable: assertUserWhitespacable,\n\t\tassertMethod: assertMethod,\n\t\tassertObjectMember: assertObjectMember,\n\t\tassertProperty: assertProperty,\n\t\tassertUnaryLike: assertUnaryLike,\n\t\tassertPattern: assertPattern,\n\t\tassertClass: assertClass,\n\t\tassertModuleDeclaration: assertModuleDeclaration,\n\t\tassertExportDeclaration: assertExportDeclaration,\n\t\tassertModuleSpecifier: assertModuleSpecifier,\n\t\tassertPrivate: assertPrivate,\n\t\tassertFlow: assertFlow,\n\t\tassertFlowType: assertFlowType,\n\t\tassertFlowBaseAnnotation: assertFlowBaseAnnotation,\n\t\tassertFlowDeclaration: assertFlowDeclaration,\n\t\tassertFlowPredicate: assertFlowPredicate,\n\t\tassertEnumBody: assertEnumBody,\n\t\tassertEnumMember: assertEnumMember,\n\t\tassertJSX: assertJSX,\n\t\tassertTSTypeElement: assertTSTypeElement,\n\t\tassertTSType: assertTSType,\n\t\tassertTSBaseType: assertTSBaseType,\n\t\tassertNumberLiteral: assertNumberLiteral,\n\t\tassertRegexLiteral: assertRegexLiteral,\n\t\tassertRestProperty: assertRestProperty,\n\t\tassertSpreadProperty: assertSpreadProperty,\n\t\tarrayExpression: arrayExpression$2,\n\t\tassignmentExpression: assignmentExpression$c,\n\t\tbinaryExpression: binaryExpression$4,\n\t\tinterpreterDirective: interpreterDirective$1,\n\t\tdirective: directive$1,\n\t\tdirectiveLiteral: directiveLiteral$1,\n\t\tblockStatement: blockStatement$6,\n\t\tbreakStatement: breakStatement,\n\t\tcallExpression: callExpression$e,\n\t\tcatchClause: catchClause,\n\t\tconditionalExpression: conditionalExpression$3,\n\t\tcontinueStatement: continueStatement,\n\t\tdebuggerStatement: debuggerStatement,\n\t\tdoWhileStatement: doWhileStatement,\n\t\temptyStatement: emptyStatement$1,\n\t\texpressionStatement: expressionStatement$a,\n\t\tfile: file$1,\n\t\tforInStatement: forInStatement,\n\t\tforStatement: forStatement,\n\t\tfunctionDeclaration: functionDeclaration,\n\t\tfunctionExpression: functionExpression$3,\n\t\tidentifier: identifier$j,\n\t\tifStatement: ifStatement,\n\t\tlabeledStatement: labeledStatement,\n\t\tstringLiteral: stringLiteral$8,\n\t\tnumericLiteral: numericLiteral$8,\n\t\tnullLiteral: nullLiteral$2,\n\t\tbooleanLiteral: booleanLiteral$5,\n\t\tregExpLiteral: regExpLiteral,\n\t\tlogicalExpression: logicalExpression$2,\n\t\tmemberExpression: memberExpression$b,\n\t\tnewExpression: newExpression,\n\t\tprogram: program$3,\n\t\tobjectExpression: objectExpression$4,\n\t\tobjectMethod: objectMethod,\n\t\tobjectProperty: objectProperty$2,\n\t\trestElement: restElement$1,\n\t\treturnStatement: returnStatement$3,\n\t\tsequenceExpression: sequenceExpression$7,\n\t\tparenthesizedExpression: parenthesizedExpression,\n\t\tswitchCase: switchCase,\n\t\tswitchStatement: switchStatement,\n\t\tthisExpression: thisExpression$3,\n\t\tthrowStatement: throwStatement,\n\t\ttryStatement: tryStatement,\n\t\tunaryExpression: unaryExpression$7,\n\t\tupdateExpression: updateExpression,\n\t\tvariableDeclaration: variableDeclaration$8,\n\t\tvariableDeclarator: variableDeclarator$8,\n\t\twhileStatement: whileStatement,\n\t\twithStatement: withStatement,\n\t\tassignmentPattern: assignmentPattern,\n\t\tarrayPattern: arrayPattern,\n\t\tarrowFunctionExpression: arrowFunctionExpression$4,\n\t\tclassBody: classBody,\n\t\tclassExpression: classExpression,\n\t\tclassDeclaration: classDeclaration,\n\t\texportAllDeclaration: exportAllDeclaration,\n\t\texportDefaultDeclaration: exportDefaultDeclaration,\n\t\texportNamedDeclaration: exportNamedDeclaration$2,\n\t\texportSpecifier: exportSpecifier$2,\n\t\tforOfStatement: forOfStatement,\n\t\timportDeclaration: importDeclaration$1,\n\t\timportDefaultSpecifier: importDefaultSpecifier$1,\n\t\timportNamespaceSpecifier: importNamespaceSpecifier$1,\n\t\timportSpecifier: importSpecifier$1,\n\t\tmetaProperty: metaProperty$1,\n\t\tclassMethod: classMethod,\n\t\tobjectPattern: objectPattern,\n\t\tspreadElement: spreadElement$2,\n\t\t'super': _super$1,\n\t\ttaggedTemplateExpression: taggedTemplateExpression,\n\t\ttemplateElement: templateElement,\n\t\ttemplateLiteral: templateLiteral,\n\t\tyieldExpression: yieldExpression$2,\n\t\tawaitExpression: awaitExpression$1,\n\t\t'import': _import,\n\t\tbigIntLiteral: bigIntLiteral,\n\t\texportNamespaceSpecifier: exportNamespaceSpecifier,\n\t\toptionalMemberExpression: optionalMemberExpression$2,\n\t\toptionalCallExpression: optionalCallExpression$2,\n\t\tclassProperty: classProperty,\n\t\tclassPrivateProperty: classPrivateProperty,\n\t\tclassPrivateMethod: classPrivateMethod,\n\t\tprivateName: privateName,\n\t\tanyTypeAnnotation: anyTypeAnnotation$2,\n\t\tarrayTypeAnnotation: arrayTypeAnnotation$1,\n\t\tbooleanTypeAnnotation: booleanTypeAnnotation$1,\n\t\tbooleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation,\n\t\tnullLiteralTypeAnnotation: nullLiteralTypeAnnotation$1,\n\t\tclassImplements: classImplements,\n\t\tdeclareClass: declareClass,\n\t\tdeclareFunction: declareFunction,\n\t\tdeclareInterface: declareInterface,\n\t\tdeclareModule: declareModule,\n\t\tdeclareModuleExports: declareModuleExports,\n\t\tdeclareTypeAlias: declareTypeAlias,\n\t\tdeclareOpaqueType: declareOpaqueType,\n\t\tdeclareVariable: declareVariable,\n\t\tdeclareExportDeclaration: declareExportDeclaration,\n\t\tdeclareExportAllDeclaration: declareExportAllDeclaration,\n\t\tdeclaredPredicate: declaredPredicate,\n\t\texistsTypeAnnotation: existsTypeAnnotation,\n\t\tfunctionTypeAnnotation: functionTypeAnnotation,\n\t\tfunctionTypeParam: functionTypeParam,\n\t\tgenericTypeAnnotation: genericTypeAnnotation$1,\n\t\tinferredPredicate: inferredPredicate,\n\t\tinterfaceExtends: interfaceExtends,\n\t\tinterfaceDeclaration: interfaceDeclaration,\n\t\tinterfaceTypeAnnotation: interfaceTypeAnnotation,\n\t\tintersectionTypeAnnotation: intersectionTypeAnnotation,\n\t\tmixedTypeAnnotation: mixedTypeAnnotation,\n\t\temptyTypeAnnotation: emptyTypeAnnotation,\n\t\tnullableTypeAnnotation: nullableTypeAnnotation,\n\t\tnumberLiteralTypeAnnotation: numberLiteralTypeAnnotation,\n\t\tnumberTypeAnnotation: numberTypeAnnotation$2,\n\t\tobjectTypeAnnotation: objectTypeAnnotation,\n\t\tobjectTypeInternalSlot: objectTypeInternalSlot,\n\t\tobjectTypeCallProperty: objectTypeCallProperty,\n\t\tobjectTypeIndexer: objectTypeIndexer,\n\t\tobjectTypeProperty: objectTypeProperty,\n\t\tobjectTypeSpreadProperty: objectTypeSpreadProperty,\n\t\topaqueType: opaqueType,\n\t\tqualifiedTypeIdentifier: qualifiedTypeIdentifier,\n\t\tstringLiteralTypeAnnotation: stringLiteralTypeAnnotation,\n\t\tstringTypeAnnotation: stringTypeAnnotation$2,\n\t\tsymbolTypeAnnotation: symbolTypeAnnotation,\n\t\tthisTypeAnnotation: thisTypeAnnotation,\n\t\ttupleTypeAnnotation: tupleTypeAnnotation$1,\n\t\ttypeofTypeAnnotation: typeofTypeAnnotation,\n\t\ttypeAlias: typeAlias,\n\t\ttypeAnnotation: typeAnnotation,\n\t\ttypeCastExpression: typeCastExpression,\n\t\ttypeParameter: typeParameter,\n\t\ttypeParameterDeclaration: typeParameterDeclaration,\n\t\ttypeParameterInstantiation: typeParameterInstantiation,\n\t\tunionTypeAnnotation: unionTypeAnnotation$1,\n\t\tvariance: variance,\n\t\tvoidTypeAnnotation: voidTypeAnnotation$3,\n\t\tenumDeclaration: enumDeclaration,\n\t\tenumBooleanBody: enumBooleanBody,\n\t\tenumNumberBody: enumNumberBody,\n\t\tenumStringBody: enumStringBody,\n\t\tenumSymbolBody: enumSymbolBody,\n\t\tenumBooleanMember: enumBooleanMember,\n\t\tenumNumberMember: enumNumberMember,\n\t\tenumStringMember: enumStringMember,\n\t\tenumDefaultedMember: enumDefaultedMember,\n\t\tindexedAccessType: indexedAccessType,\n\t\toptionalIndexedAccessType: optionalIndexedAccessType,\n\t\tjsxAttribute: jsxAttribute,\n\t\tjSXAttribute: jsxAttribute,\n\t\tjsxClosingElement: jsxClosingElement,\n\t\tjSXClosingElement: jsxClosingElement,\n\t\tjsxElement: jsxElement,\n\t\tjSXElement: jsxElement,\n\t\tjsxEmptyExpression: jsxEmptyExpression,\n\t\tjSXEmptyExpression: jsxEmptyExpression,\n\t\tjsxExpressionContainer: jsxExpressionContainer$1,\n\t\tjSXExpressionContainer: jsxExpressionContainer$1,\n\t\tjsxSpreadChild: jsxSpreadChild,\n\t\tjSXSpreadChild: jsxSpreadChild,\n\t\tjsxIdentifier: jsxIdentifier$2,\n\t\tjSXIdentifier: jsxIdentifier$2,\n\t\tjsxMemberExpression: jsxMemberExpression$1,\n\t\tjSXMemberExpression: jsxMemberExpression$1,\n\t\tjsxNamespacedName: jsxNamespacedName,\n\t\tjSXNamespacedName: jsxNamespacedName,\n\t\tjsxOpeningElement: jsxOpeningElement,\n\t\tjSXOpeningElement: jsxOpeningElement,\n\t\tjsxSpreadAttribute: jsxSpreadAttribute,\n\t\tjSXSpreadAttribute: jsxSpreadAttribute,\n\t\tjsxText: jsxText,\n\t\tjSXText: jsxText,\n\t\tjsxFragment: jsxFragment,\n\t\tjSXFragment: jsxFragment,\n\t\tjsxOpeningFragment: jsxOpeningFragment,\n\t\tjSXOpeningFragment: jsxOpeningFragment,\n\t\tjsxClosingFragment: jsxClosingFragment,\n\t\tjSXClosingFragment: jsxClosingFragment,\n\t\tnoop: noop$1,\n\t\tplaceholder: placeholder,\n\t\tv8IntrinsicIdentifier: v8IntrinsicIdentifier,\n\t\targumentPlaceholder: argumentPlaceholder,\n\t\tbindExpression: bindExpression,\n\t\timportAttribute: importAttribute,\n\t\tdecorator: decorator,\n\t\tdoExpression: doExpression,\n\t\texportDefaultSpecifier: exportDefaultSpecifier,\n\t\trecordExpression: recordExpression,\n\t\ttupleExpression: tupleExpression,\n\t\tdecimalLiteral: decimalLiteral,\n\t\tstaticBlock: staticBlock$1,\n\t\tmoduleExpression: moduleExpression,\n\t\ttopicReference: topicReference,\n\t\tpipelineTopicExpression: pipelineTopicExpression,\n\t\tpipelineBareFunction: pipelineBareFunction,\n\t\tpipelinePrimaryTopicReference: pipelinePrimaryTopicReference,\n\t\ttsParameterProperty: tsParameterProperty,\n\t\ttSParameterProperty: tsParameterProperty,\n\t\ttsDeclareFunction: tsDeclareFunction,\n\t\ttSDeclareFunction: tsDeclareFunction,\n\t\ttsDeclareMethod: tsDeclareMethod,\n\t\ttSDeclareMethod: tsDeclareMethod,\n\t\ttsQualifiedName: tsQualifiedName,\n\t\ttSQualifiedName: tsQualifiedName,\n\t\ttsCallSignatureDeclaration: tsCallSignatureDeclaration,\n\t\ttSCallSignatureDeclaration: tsCallSignatureDeclaration,\n\t\ttsConstructSignatureDeclaration: tsConstructSignatureDeclaration,\n\t\ttSConstructSignatureDeclaration: tsConstructSignatureDeclaration,\n\t\ttsPropertySignature: tsPropertySignature,\n\t\ttSPropertySignature: tsPropertySignature,\n\t\ttsMethodSignature: tsMethodSignature,\n\t\ttSMethodSignature: tsMethodSignature,\n\t\ttsIndexSignature: tsIndexSignature,\n\t\ttSIndexSignature: tsIndexSignature,\n\t\ttsAnyKeyword: tsAnyKeyword,\n\t\ttSAnyKeyword: tsAnyKeyword,\n\t\ttsBooleanKeyword: tsBooleanKeyword,\n\t\ttSBooleanKeyword: tsBooleanKeyword,\n\t\ttsBigIntKeyword: tsBigIntKeyword,\n\t\ttSBigIntKeyword: tsBigIntKeyword,\n\t\ttsIntrinsicKeyword: tsIntrinsicKeyword,\n\t\ttSIntrinsicKeyword: tsIntrinsicKeyword,\n\t\ttsNeverKeyword: tsNeverKeyword,\n\t\ttSNeverKeyword: tsNeverKeyword,\n\t\ttsNullKeyword: tsNullKeyword,\n\t\ttSNullKeyword: tsNullKeyword,\n\t\ttsNumberKeyword: tsNumberKeyword,\n\t\ttSNumberKeyword: tsNumberKeyword,\n\t\ttsObjectKeyword: tsObjectKeyword,\n\t\ttSObjectKeyword: tsObjectKeyword,\n\t\ttsStringKeyword: tsStringKeyword,\n\t\ttSStringKeyword: tsStringKeyword,\n\t\ttsSymbolKeyword: tsSymbolKeyword,\n\t\ttSSymbolKeyword: tsSymbolKeyword,\n\t\ttsUndefinedKeyword: tsUndefinedKeyword,\n\t\ttSUndefinedKeyword: tsUndefinedKeyword,\n\t\ttsUnknownKeyword: tsUnknownKeyword,\n\t\ttSUnknownKeyword: tsUnknownKeyword,\n\t\ttsVoidKeyword: tsVoidKeyword,\n\t\ttSVoidKeyword: tsVoidKeyword,\n\t\ttsThisType: tsThisType,\n\t\ttSThisType: tsThisType,\n\t\ttsFunctionType: tsFunctionType,\n\t\ttSFunctionType: tsFunctionType,\n\t\ttsConstructorType: tsConstructorType,\n\t\ttSConstructorType: tsConstructorType,\n\t\ttsTypeReference: tsTypeReference,\n\t\ttSTypeReference: tsTypeReference,\n\t\ttsTypePredicate: tsTypePredicate,\n\t\ttSTypePredicate: tsTypePredicate,\n\t\ttsTypeQuery: tsTypeQuery,\n\t\ttSTypeQuery: tsTypeQuery,\n\t\ttsTypeLiteral: tsTypeLiteral,\n\t\ttSTypeLiteral: tsTypeLiteral,\n\t\ttsArrayType: tsArrayType,\n\t\ttSArrayType: tsArrayType,\n\t\ttsTupleType: tsTupleType,\n\t\ttSTupleType: tsTupleType,\n\t\ttsOptionalType: tsOptionalType,\n\t\ttSOptionalType: tsOptionalType,\n\t\ttsRestType: tsRestType,\n\t\ttSRestType: tsRestType,\n\t\ttsNamedTupleMember: tsNamedTupleMember,\n\t\ttSNamedTupleMember: tsNamedTupleMember,\n\t\ttsUnionType: tsUnionType,\n\t\ttSUnionType: tsUnionType,\n\t\ttsIntersectionType: tsIntersectionType,\n\t\ttSIntersectionType: tsIntersectionType,\n\t\ttsConditionalType: tsConditionalType,\n\t\ttSConditionalType: tsConditionalType,\n\t\ttsInferType: tsInferType,\n\t\ttSInferType: tsInferType,\n\t\ttsParenthesizedType: tsParenthesizedType,\n\t\ttSParenthesizedType: tsParenthesizedType,\n\t\ttsTypeOperator: tsTypeOperator,\n\t\ttSTypeOperator: tsTypeOperator,\n\t\ttsIndexedAccessType: tsIndexedAccessType,\n\t\ttSIndexedAccessType: tsIndexedAccessType,\n\t\ttsMappedType: tsMappedType,\n\t\ttSMappedType: tsMappedType,\n\t\ttsLiteralType: tsLiteralType,\n\t\ttSLiteralType: tsLiteralType,\n\t\ttsExpressionWithTypeArguments: tsExpressionWithTypeArguments,\n\t\ttSExpressionWithTypeArguments: tsExpressionWithTypeArguments,\n\t\ttsInterfaceDeclaration: tsInterfaceDeclaration,\n\t\ttSInterfaceDeclaration: tsInterfaceDeclaration,\n\t\ttsInterfaceBody: tsInterfaceBody,\n\t\ttSInterfaceBody: tsInterfaceBody,\n\t\ttsTypeAliasDeclaration: tsTypeAliasDeclaration,\n\t\ttSTypeAliasDeclaration: tsTypeAliasDeclaration,\n\t\ttsAsExpression: tsAsExpression,\n\t\ttSAsExpression: tsAsExpression,\n\t\ttsTypeAssertion: tsTypeAssertion,\n\t\ttSTypeAssertion: tsTypeAssertion,\n\t\ttsEnumDeclaration: tsEnumDeclaration,\n\t\ttSEnumDeclaration: tsEnumDeclaration,\n\t\ttsEnumMember: tsEnumMember,\n\t\ttSEnumMember: tsEnumMember,\n\t\ttsModuleDeclaration: tsModuleDeclaration,\n\t\ttSModuleDeclaration: tsModuleDeclaration,\n\t\ttsModuleBlock: tsModuleBlock,\n\t\ttSModuleBlock: tsModuleBlock,\n\t\ttsImportType: tsImportType,\n\t\ttSImportType: tsImportType,\n\t\ttsImportEqualsDeclaration: tsImportEqualsDeclaration,\n\t\ttSImportEqualsDeclaration: tsImportEqualsDeclaration,\n\t\ttsExternalModuleReference: tsExternalModuleReference,\n\t\ttSExternalModuleReference: tsExternalModuleReference,\n\t\ttsNonNullExpression: tsNonNullExpression,\n\t\ttSNonNullExpression: tsNonNullExpression,\n\t\ttsExportAssignment: tsExportAssignment,\n\t\ttSExportAssignment: tsExportAssignment,\n\t\ttsNamespaceExportDeclaration: tsNamespaceExportDeclaration,\n\t\ttSNamespaceExportDeclaration: tsNamespaceExportDeclaration,\n\t\ttsTypeAnnotation: tsTypeAnnotation,\n\t\ttSTypeAnnotation: tsTypeAnnotation,\n\t\ttsTypeParameterInstantiation: tsTypeParameterInstantiation,\n\t\ttSTypeParameterInstantiation: tsTypeParameterInstantiation,\n\t\ttsTypeParameterDeclaration: tsTypeParameterDeclaration,\n\t\ttSTypeParameterDeclaration: tsTypeParameterDeclaration,\n\t\ttsTypeParameter: tsTypeParameter,\n\t\ttSTypeParameter: tsTypeParameter,\n\t\tnumberLiteral: NumberLiteral,\n\t\tregexLiteral: RegexLiteral,\n\t\trestProperty: RestProperty$1,\n\t\tspreadProperty: SpreadProperty$1,\n\t\tArrayExpression: arrayExpression$2,\n\t\tAssignmentExpression: assignmentExpression$c,\n\t\tBinaryExpression: binaryExpression$4,\n\t\tInterpreterDirective: interpreterDirective$1,\n\t\tDirective: directive$1,\n\t\tDirectiveLiteral: directiveLiteral$1,\n\t\tBlockStatement: blockStatement$6,\n\t\tBreakStatement: breakStatement,\n\t\tCallExpression: callExpression$e,\n\t\tCatchClause: catchClause,\n\t\tConditionalExpression: conditionalExpression$3,\n\t\tContinueStatement: continueStatement,\n\t\tDebuggerStatement: debuggerStatement,\n\t\tDoWhileStatement: doWhileStatement,\n\t\tEmptyStatement: emptyStatement$1,\n\t\tExpressionStatement: expressionStatement$a,\n\t\tFile: file$1,\n\t\tForInStatement: forInStatement,\n\t\tForStatement: forStatement,\n\t\tFunctionDeclaration: functionDeclaration,\n\t\tFunctionExpression: functionExpression$3,\n\t\tIdentifier: identifier$j,\n\t\tIfStatement: ifStatement,\n\t\tLabeledStatement: labeledStatement,\n\t\tStringLiteral: stringLiteral$8,\n\t\tNumericLiteral: numericLiteral$8,\n\t\tNullLiteral: nullLiteral$2,\n\t\tBooleanLiteral: booleanLiteral$5,\n\t\tRegExpLiteral: regExpLiteral,\n\t\tLogicalExpression: logicalExpression$2,\n\t\tMemberExpression: memberExpression$b,\n\t\tNewExpression: newExpression,\n\t\tProgram: program$3,\n\t\tObjectExpression: objectExpression$4,\n\t\tObjectMethod: objectMethod,\n\t\tObjectProperty: objectProperty$2,\n\t\tRestElement: restElement$1,\n\t\tReturnStatement: returnStatement$3,\n\t\tSequenceExpression: sequenceExpression$7,\n\t\tParenthesizedExpression: parenthesizedExpression,\n\t\tSwitchCase: switchCase,\n\t\tSwitchStatement: switchStatement,\n\t\tThisExpression: thisExpression$3,\n\t\tThrowStatement: throwStatement,\n\t\tTryStatement: tryStatement,\n\t\tUnaryExpression: unaryExpression$7,\n\t\tUpdateExpression: updateExpression,\n\t\tVariableDeclaration: variableDeclaration$8,\n\t\tVariableDeclarator: variableDeclarator$8,\n\t\tWhileStatement: whileStatement,\n\t\tWithStatement: withStatement,\n\t\tAssignmentPattern: assignmentPattern,\n\t\tArrayPattern: arrayPattern,\n\t\tArrowFunctionExpression: arrowFunctionExpression$4,\n\t\tClassBody: classBody,\n\t\tClassExpression: classExpression,\n\t\tClassDeclaration: classDeclaration,\n\t\tExportAllDeclaration: exportAllDeclaration,\n\t\tExportDefaultDeclaration: exportDefaultDeclaration,\n\t\tExportNamedDeclaration: exportNamedDeclaration$2,\n\t\tExportSpecifier: exportSpecifier$2,\n\t\tForOfStatement: forOfStatement,\n\t\tImportDeclaration: importDeclaration$1,\n\t\tImportDefaultSpecifier: importDefaultSpecifier$1,\n\t\tImportNamespaceSpecifier: importNamespaceSpecifier$1,\n\t\tImportSpecifier: importSpecifier$1,\n\t\tMetaProperty: metaProperty$1,\n\t\tClassMethod: classMethod,\n\t\tObjectPattern: objectPattern,\n\t\tSpreadElement: spreadElement$2,\n\t\tSuper: _super$1,\n\t\tTaggedTemplateExpression: taggedTemplateExpression,\n\t\tTemplateElement: templateElement,\n\t\tTemplateLiteral: templateLiteral,\n\t\tYieldExpression: yieldExpression$2,\n\t\tAwaitExpression: awaitExpression$1,\n\t\tImport: _import,\n\t\tBigIntLiteral: bigIntLiteral,\n\t\tExportNamespaceSpecifier: exportNamespaceSpecifier,\n\t\tOptionalMemberExpression: optionalMemberExpression$2,\n\t\tOptionalCallExpression: optionalCallExpression$2,\n\t\tClassProperty: classProperty,\n\t\tClassPrivateProperty: classPrivateProperty,\n\t\tClassPrivateMethod: classPrivateMethod,\n\t\tPrivateName: privateName,\n\t\tAnyTypeAnnotation: anyTypeAnnotation$2,\n\t\tArrayTypeAnnotation: arrayTypeAnnotation$1,\n\t\tBooleanTypeAnnotation: booleanTypeAnnotation$1,\n\t\tBooleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation,\n\t\tNullLiteralTypeAnnotation: nullLiteralTypeAnnotation$1,\n\t\tClassImplements: classImplements,\n\t\tDeclareClass: declareClass,\n\t\tDeclareFunction: declareFunction,\n\t\tDeclareInterface: declareInterface,\n\t\tDeclareModule: declareModule,\n\t\tDeclareModuleExports: declareModuleExports,\n\t\tDeclareTypeAlias: declareTypeAlias,\n\t\tDeclareOpaqueType: declareOpaqueType,\n\t\tDeclareVariable: declareVariable,\n\t\tDeclareExportDeclaration: declareExportDeclaration,\n\t\tDeclareExportAllDeclaration: declareExportAllDeclaration,\n\t\tDeclaredPredicate: declaredPredicate,\n\t\tExistsTypeAnnotation: existsTypeAnnotation,\n\t\tFunctionTypeAnnotation: functionTypeAnnotation,\n\t\tFunctionTypeParam: functionTypeParam,\n\t\tGenericTypeAnnotation: genericTypeAnnotation$1,\n\t\tInferredPredicate: inferredPredicate,\n\t\tInterfaceExtends: interfaceExtends,\n\t\tInterfaceDeclaration: interfaceDeclaration,\n\t\tInterfaceTypeAnnotation: interfaceTypeAnnotation,\n\t\tIntersectionTypeAnnotation: intersectionTypeAnnotation,\n\t\tMixedTypeAnnotation: mixedTypeAnnotation,\n\t\tEmptyTypeAnnotation: emptyTypeAnnotation,\n\t\tNullableTypeAnnotation: nullableTypeAnnotation,\n\t\tNumberLiteralTypeAnnotation: numberLiteralTypeAnnotation,\n\t\tNumberTypeAnnotation: numberTypeAnnotation$2,\n\t\tObjectTypeAnnotation: objectTypeAnnotation,\n\t\tObjectTypeInternalSlot: objectTypeInternalSlot,\n\t\tObjectTypeCallProperty: objectTypeCallProperty,\n\t\tObjectTypeIndexer: objectTypeIndexer,\n\t\tObjectTypeProperty: objectTypeProperty,\n\t\tObjectTypeSpreadProperty: objectTypeSpreadProperty,\n\t\tOpaqueType: opaqueType,\n\t\tQualifiedTypeIdentifier: qualifiedTypeIdentifier,\n\t\tStringLiteralTypeAnnotation: stringLiteralTypeAnnotation,\n\t\tStringTypeAnnotation: stringTypeAnnotation$2,\n\t\tSymbolTypeAnnotation: symbolTypeAnnotation,\n\t\tThisTypeAnnotation: thisTypeAnnotation,\n\t\tTupleTypeAnnotation: tupleTypeAnnotation$1,\n\t\tTypeofTypeAnnotation: typeofTypeAnnotation,\n\t\tTypeAlias: typeAlias,\n\t\tTypeAnnotation: typeAnnotation,\n\t\tTypeCastExpression: typeCastExpression,\n\t\tTypeParameter: typeParameter,\n\t\tTypeParameterDeclaration: typeParameterDeclaration,\n\t\tTypeParameterInstantiation: typeParameterInstantiation,\n\t\tUnionTypeAnnotation: unionTypeAnnotation$1,\n\t\tVariance: variance,\n\t\tVoidTypeAnnotation: voidTypeAnnotation$3,\n\t\tEnumDeclaration: enumDeclaration,\n\t\tEnumBooleanBody: enumBooleanBody,\n\t\tEnumNumberBody: enumNumberBody,\n\t\tEnumStringBody: enumStringBody,\n\t\tEnumSymbolBody: enumSymbolBody,\n\t\tEnumBooleanMember: enumBooleanMember,\n\t\tEnumNumberMember: enumNumberMember,\n\t\tEnumStringMember: enumStringMember,\n\t\tEnumDefaultedMember: enumDefaultedMember,\n\t\tIndexedAccessType: indexedAccessType,\n\t\tOptionalIndexedAccessType: optionalIndexedAccessType,\n\t\tJSXAttribute: jsxAttribute,\n\t\tJSXClosingElement: jsxClosingElement,\n\t\tJSXElement: jsxElement,\n\t\tJSXEmptyExpression: jsxEmptyExpression,\n\t\tJSXExpressionContainer: jsxExpressionContainer$1,\n\t\tJSXSpreadChild: jsxSpreadChild,\n\t\tJSXIdentifier: jsxIdentifier$2,\n\t\tJSXMemberExpression: jsxMemberExpression$1,\n\t\tJSXNamespacedName: jsxNamespacedName,\n\t\tJSXOpeningElement: jsxOpeningElement,\n\t\tJSXSpreadAttribute: jsxSpreadAttribute,\n\t\tJSXText: jsxText,\n\t\tJSXFragment: jsxFragment,\n\t\tJSXOpeningFragment: jsxOpeningFragment,\n\t\tJSXClosingFragment: jsxClosingFragment,\n\t\tNoop: noop$1,\n\t\tPlaceholder: placeholder,\n\t\tV8IntrinsicIdentifier: v8IntrinsicIdentifier,\n\t\tArgumentPlaceholder: argumentPlaceholder,\n\t\tBindExpression: bindExpression,\n\t\tImportAttribute: importAttribute,\n\t\tDecorator: decorator,\n\t\tDoExpression: doExpression,\n\t\tExportDefaultSpecifier: exportDefaultSpecifier,\n\t\tRecordExpression: recordExpression,\n\t\tTupleExpression: tupleExpression,\n\t\tDecimalLiteral: decimalLiteral,\n\t\tStaticBlock: staticBlock$1,\n\t\tModuleExpression: moduleExpression,\n\t\tTopicReference: topicReference,\n\t\tPipelineTopicExpression: pipelineTopicExpression,\n\t\tPipelineBareFunction: pipelineBareFunction,\n\t\tPipelinePrimaryTopicReference: pipelinePrimaryTopicReference,\n\t\tTSParameterProperty: tsParameterProperty,\n\t\tTSDeclareFunction: tsDeclareFunction,\n\t\tTSDeclareMethod: tsDeclareMethod,\n\t\tTSQualifiedName: tsQualifiedName,\n\t\tTSCallSignatureDeclaration: tsCallSignatureDeclaration,\n\t\tTSConstructSignatureDeclaration: tsConstructSignatureDeclaration,\n\t\tTSPropertySignature: tsPropertySignature,\n\t\tTSMethodSignature: tsMethodSignature,\n\t\tTSIndexSignature: tsIndexSignature,\n\t\tTSAnyKeyword: tsAnyKeyword,\n\t\tTSBooleanKeyword: tsBooleanKeyword,\n\t\tTSBigIntKeyword: tsBigIntKeyword,\n\t\tTSIntrinsicKeyword: tsIntrinsicKeyword,\n\t\tTSNeverKeyword: tsNeverKeyword,\n\t\tTSNullKeyword: tsNullKeyword,\n\t\tTSNumberKeyword: tsNumberKeyword,\n\t\tTSObjectKeyword: tsObjectKeyword,\n\t\tTSStringKeyword: tsStringKeyword,\n\t\tTSSymbolKeyword: tsSymbolKeyword,\n\t\tTSUndefinedKeyword: tsUndefinedKeyword,\n\t\tTSUnknownKeyword: tsUnknownKeyword,\n\t\tTSVoidKeyword: tsVoidKeyword,\n\t\tTSThisType: tsThisType,\n\t\tTSFunctionType: tsFunctionType,\n\t\tTSConstructorType: tsConstructorType,\n\t\tTSTypeReference: tsTypeReference,\n\t\tTSTypePredicate: tsTypePredicate,\n\t\tTSTypeQuery: tsTypeQuery,\n\t\tTSTypeLiteral: tsTypeLiteral,\n\t\tTSArrayType: tsArrayType,\n\t\tTSTupleType: tsTupleType,\n\t\tTSOptionalType: tsOptionalType,\n\t\tTSRestType: tsRestType,\n\t\tTSNamedTupleMember: tsNamedTupleMember,\n\t\tTSUnionType: tsUnionType,\n\t\tTSIntersectionType: tsIntersectionType,\n\t\tTSConditionalType: tsConditionalType,\n\t\tTSInferType: tsInferType,\n\t\tTSParenthesizedType: tsParenthesizedType,\n\t\tTSTypeOperator: tsTypeOperator,\n\t\tTSIndexedAccessType: tsIndexedAccessType,\n\t\tTSMappedType: tsMappedType,\n\t\tTSLiteralType: tsLiteralType,\n\t\tTSExpressionWithTypeArguments: tsExpressionWithTypeArguments,\n\t\tTSInterfaceDeclaration: tsInterfaceDeclaration,\n\t\tTSInterfaceBody: tsInterfaceBody,\n\t\tTSTypeAliasDeclaration: tsTypeAliasDeclaration,\n\t\tTSAsExpression: tsAsExpression,\n\t\tTSTypeAssertion: tsTypeAssertion,\n\t\tTSEnumDeclaration: tsEnumDeclaration,\n\t\tTSEnumMember: tsEnumMember,\n\t\tTSModuleDeclaration: tsModuleDeclaration,\n\t\tTSModuleBlock: tsModuleBlock,\n\t\tTSImportType: tsImportType,\n\t\tTSImportEqualsDeclaration: tsImportEqualsDeclaration,\n\t\tTSExternalModuleReference: tsExternalModuleReference,\n\t\tTSNonNullExpression: tsNonNullExpression,\n\t\tTSExportAssignment: tsExportAssignment,\n\t\tTSNamespaceExportDeclaration: tsNamespaceExportDeclaration,\n\t\tTSTypeAnnotation: tsTypeAnnotation,\n\t\tTSTypeParameterInstantiation: tsTypeParameterInstantiation,\n\t\tTSTypeParameterDeclaration: tsTypeParameterDeclaration,\n\t\tTSTypeParameter: tsTypeParameter,\n\t\tNumberLiteral: NumberLiteral,\n\t\tRegexLiteral: RegexLiteral,\n\t\tRestProperty: RestProperty$1,\n\t\tSpreadProperty: SpreadProperty$1,\n\t\tEXPRESSION_TYPES: EXPRESSION_TYPES,\n\t\tBINARY_TYPES: BINARY_TYPES,\n\t\tSCOPABLE_TYPES: SCOPABLE_TYPES,\n\t\tBLOCKPARENT_TYPES: BLOCKPARENT_TYPES,\n\t\tBLOCK_TYPES: BLOCK_TYPES,\n\t\tSTATEMENT_TYPES: STATEMENT_TYPES,\n\t\tTERMINATORLESS_TYPES: TERMINATORLESS_TYPES,\n\t\tCOMPLETIONSTATEMENT_TYPES: COMPLETIONSTATEMENT_TYPES,\n\t\tCONDITIONAL_TYPES: CONDITIONAL_TYPES,\n\t\tLOOP_TYPES: LOOP_TYPES,\n\t\tWHILE_TYPES: WHILE_TYPES,\n\t\tEXPRESSIONWRAPPER_TYPES: EXPRESSIONWRAPPER_TYPES,\n\t\tFOR_TYPES: FOR_TYPES,\n\t\tFORXSTATEMENT_TYPES: FORXSTATEMENT_TYPES,\n\t\tFUNCTION_TYPES: FUNCTION_TYPES$1,\n\t\tFUNCTIONPARENT_TYPES: FUNCTIONPARENT_TYPES,\n\t\tPUREISH_TYPES: PUREISH_TYPES,\n\t\tDECLARATION_TYPES: DECLARATION_TYPES,\n\t\tPATTERNLIKE_TYPES: PATTERNLIKE_TYPES,\n\t\tLVAL_TYPES: LVAL_TYPES,\n\t\tTSENTITYNAME_TYPES: TSENTITYNAME_TYPES,\n\t\tLITERAL_TYPES: LITERAL_TYPES,\n\t\tIMMUTABLE_TYPES: IMMUTABLE_TYPES,\n\t\tUSERWHITESPACABLE_TYPES: USERWHITESPACABLE_TYPES,\n\t\tMETHOD_TYPES: METHOD_TYPES,\n\t\tOBJECTMEMBER_TYPES: OBJECTMEMBER_TYPES,\n\t\tPROPERTY_TYPES: PROPERTY_TYPES,\n\t\tUNARYLIKE_TYPES: UNARYLIKE_TYPES,\n\t\tPATTERN_TYPES: PATTERN_TYPES,\n\t\tCLASS_TYPES: CLASS_TYPES,\n\t\tMODULEDECLARATION_TYPES: MODULEDECLARATION_TYPES,\n\t\tEXPORTDECLARATION_TYPES: EXPORTDECLARATION_TYPES,\n\t\tMODULESPECIFIER_TYPES: MODULESPECIFIER_TYPES,\n\t\tPRIVATE_TYPES: PRIVATE_TYPES,\n\t\tFLOW_TYPES: FLOW_TYPES,\n\t\tFLOWTYPE_TYPES: FLOWTYPE_TYPES,\n\t\tFLOWBASEANNOTATION_TYPES: FLOWBASEANNOTATION_TYPES,\n\t\tFLOWDECLARATION_TYPES: FLOWDECLARATION_TYPES,\n\t\tFLOWPREDICATE_TYPES: FLOWPREDICATE_TYPES,\n\t\tENUMBODY_TYPES: ENUMBODY_TYPES,\n\t\tENUMMEMBER_TYPES: ENUMMEMBER_TYPES,\n\t\tJSX_TYPES: JSX_TYPES,\n\t\tTSTYPEELEMENT_TYPES: TSTYPEELEMENT_TYPES,\n\t\tTSTYPE_TYPES: TSTYPE_TYPES,\n\t\tTSBASETYPE_TYPES: TSBASETYPE_TYPES,\n\t\tSTATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS$1,\n\t\tFLATTENABLE_KEYS: FLATTENABLE_KEYS,\n\t\tFOR_INIT_KEYS: FOR_INIT_KEYS,\n\t\tCOMMENT_KEYS: COMMENT_KEYS,\n\t\tLOGICAL_OPERATORS: LOGICAL_OPERATORS$2,\n\t\tUPDATE_OPERATORS: UPDATE_OPERATORS,\n\t\tBOOLEAN_NUMBER_BINARY_OPERATORS: BOOLEAN_NUMBER_BINARY_OPERATORS$1,\n\t\tEQUALITY_BINARY_OPERATORS: EQUALITY_BINARY_OPERATORS,\n\t\tCOMPARISON_BINARY_OPERATORS: COMPARISON_BINARY_OPERATORS,\n\t\tBOOLEAN_BINARY_OPERATORS: BOOLEAN_BINARY_OPERATORS$1,\n\t\tNUMBER_BINARY_OPERATORS: NUMBER_BINARY_OPERATORS$1,\n\t\tBINARY_OPERATORS: BINARY_OPERATORS,\n\t\tASSIGNMENT_OPERATORS: ASSIGNMENT_OPERATORS,\n\t\tBOOLEAN_UNARY_OPERATORS: BOOLEAN_UNARY_OPERATORS$1,\n\t\tNUMBER_UNARY_OPERATORS: NUMBER_UNARY_OPERATORS$1,\n\t\tSTRING_UNARY_OPERATORS: STRING_UNARY_OPERATORS$1,\n\t\tUNARY_OPERATORS: UNARY_OPERATORS,\n\t\tINHERIT_KEYS: INHERIT_KEYS,\n\t\tBLOCK_SCOPED_SYMBOL: BLOCK_SCOPED_SYMBOL,\n\t\tNOT_LOCAL_BINDING: NOT_LOCAL_BINDING$2,\n\t\tVISITOR_KEYS: VISITOR_KEYS$6,\n\t\tALIAS_KEYS: ALIAS_KEYS,\n\t\tFLIPPED_ALIAS_KEYS: FLIPPED_ALIAS_KEYS$3,\n\t\tNODE_FIELDS: NODE_FIELDS,\n\t\tBUILDER_KEYS: BUILDER_KEYS,\n\t\tDEPRECATED_KEYS: DEPRECATED_KEYS$1,\n\t\tNODE_PARENT_VALIDATIONS: NODE_PARENT_VALIDATIONS,\n\t\tPLACEHOLDERS: PLACEHOLDERS,\n\t\tPLACEHOLDERS_ALIAS: PLACEHOLDERS_ALIAS,\n\t\tPLACEHOLDERS_FLIPPED_ALIAS: PLACEHOLDERS_FLIPPED_ALIAS,\n\t\tTYPES: TYPES$1,\n\t\tisArrayExpression: isArrayExpression$2,\n\t\tisAssignmentExpression: isAssignmentExpression$3,\n\t\tisBinaryExpression: isBinaryExpression$1,\n\t\tisInterpreterDirective: isInterpreterDirective,\n\t\tisDirective: isDirective,\n\t\tisDirectiveLiteral: isDirectiveLiteral,\n\t\tisBlockStatement: isBlockStatement$2,\n\t\tisBreakStatement: isBreakStatement,\n\t\tisCallExpression: isCallExpression$6,\n\t\tisCatchClause: isCatchClause,\n\t\tisConditionalExpression: isConditionalExpression$1,\n\t\tisContinueStatement: isContinueStatement,\n\t\tisDebuggerStatement: isDebuggerStatement,\n\t\tisDoWhileStatement: isDoWhileStatement,\n\t\tisEmptyStatement: isEmptyStatement$1,\n\t\tisExpressionStatement: isExpressionStatement$4,\n\t\tisFile: isFile$1,\n\t\tisForInStatement: isForInStatement$1,\n\t\tisForStatement: isForStatement$3,\n\t\tisFunctionDeclaration: isFunctionDeclaration$1,\n\t\tisFunctionExpression: isFunctionExpression$1,\n\t\tisIdentifier: isIdentifier$g,\n\t\tisIfStatement: isIfStatement$2,\n\t\tisLabeledStatement: isLabeledStatement,\n\t\tisStringLiteral: isStringLiteral$7,\n\t\tisNumericLiteral: isNumericLiteral,\n\t\tisNullLiteral: isNullLiteral$1,\n\t\tisBooleanLiteral: isBooleanLiteral,\n\t\tisRegExpLiteral: isRegExpLiteral$1,\n\t\tisLogicalExpression: isLogicalExpression$1,\n\t\tisMemberExpression: isMemberExpression$8,\n\t\tisNewExpression: isNewExpression$4,\n\t\tisProgram: isProgram$2,\n\t\tisObjectExpression: isObjectExpression$3,\n\t\tisObjectMethod: isObjectMethod$2,\n\t\tisObjectProperty: isObjectProperty$2,\n\t\tisRestElement: isRestElement$2,\n\t\tisReturnStatement: isReturnStatement$1,\n\t\tisSequenceExpression: isSequenceExpression$1,\n\t\tisParenthesizedExpression: isParenthesizedExpression$1,\n\t\tisSwitchCase: isSwitchCase,\n\t\tisSwitchStatement: isSwitchStatement$1,\n\t\tisThisExpression: isThisExpression$2,\n\t\tisThrowStatement: isThrowStatement$1,\n\t\tisTryStatement: isTryStatement,\n\t\tisUnaryExpression: isUnaryExpression$1,\n\t\tisUpdateExpression: isUpdateExpression$1,\n\t\tisVariableDeclaration: isVariableDeclaration$3,\n\t\tisVariableDeclarator: isVariableDeclarator$2,\n\t\tisWhileStatement: isWhileStatement$1,\n\t\tisWithStatement: isWithStatement,\n\t\tisAssignmentPattern: isAssignmentPattern$3,\n\t\tisArrayPattern: isArrayPattern,\n\t\tisArrowFunctionExpression: isArrowFunctionExpression$1,\n\t\tisClassBody: isClassBody$1,\n\t\tisClassExpression: isClassExpression$1,\n\t\tisClassDeclaration: isClassDeclaration$3,\n\t\tisExportAllDeclaration: isExportAllDeclaration$1,\n\t\tisExportDefaultDeclaration: isExportDefaultDeclaration$3,\n\t\tisExportNamedDeclaration: isExportNamedDeclaration$2,\n\t\tisExportSpecifier: isExportSpecifier,\n\t\tisForOfStatement: isForOfStatement$1,\n\t\tisImportDeclaration: isImportDeclaration$2,\n\t\tisImportDefaultSpecifier: isImportDefaultSpecifier$1,\n\t\tisImportNamespaceSpecifier: isImportNamespaceSpecifier$1,\n\t\tisImportSpecifier: isImportSpecifier$1,\n\t\tisMetaProperty: isMetaProperty,\n\t\tisClassMethod: isClassMethod$1,\n\t\tisObjectPattern: isObjectPattern$1,\n\t\tisSpreadElement: isSpreadElement$1,\n\t\tisSuper: isSuper$2,\n\t\tisTaggedTemplateExpression: isTaggedTemplateExpression$2,\n\t\tisTemplateElement: isTemplateElement,\n\t\tisTemplateLiteral: isTemplateLiteral$2,\n\t\tisYieldExpression: isYieldExpression$1,\n\t\tisAwaitExpression: isAwaitExpression$1,\n\t\tisImport: isImport,\n\t\tisBigIntLiteral: isBigIntLiteral,\n\t\tisExportNamespaceSpecifier: isExportNamespaceSpecifier$1,\n\t\tisOptionalMemberExpression: isOptionalMemberExpression$3,\n\t\tisOptionalCallExpression: isOptionalCallExpression$3,\n\t\tisClassProperty: isClassProperty,\n\t\tisClassPrivateProperty: isClassPrivateProperty,\n\t\tisClassPrivateMethod: isClassPrivateMethod,\n\t\tisPrivateName: isPrivateName$1,\n\t\tisAnyTypeAnnotation: isAnyTypeAnnotation$1,\n\t\tisArrayTypeAnnotation: isArrayTypeAnnotation$1,\n\t\tisBooleanTypeAnnotation: isBooleanTypeAnnotation$1,\n\t\tisBooleanLiteralTypeAnnotation: isBooleanLiteralTypeAnnotation,\n\t\tisNullLiteralTypeAnnotation: isNullLiteralTypeAnnotation,\n\t\tisClassImplements: isClassImplements,\n\t\tisDeclareClass: isDeclareClass,\n\t\tisDeclareFunction: isDeclareFunction,\n\t\tisDeclareInterface: isDeclareInterface,\n\t\tisDeclareModule: isDeclareModule,\n\t\tisDeclareModuleExports: isDeclareModuleExports,\n\t\tisDeclareTypeAlias: isDeclareTypeAlias,\n\t\tisDeclareOpaqueType: isDeclareOpaqueType,\n\t\tisDeclareVariable: isDeclareVariable,\n\t\tisDeclareExportDeclaration: isDeclareExportDeclaration$1,\n\t\tisDeclareExportAllDeclaration: isDeclareExportAllDeclaration,\n\t\tisDeclaredPredicate: isDeclaredPredicate,\n\t\tisExistsTypeAnnotation: isExistsTypeAnnotation,\n\t\tisFunctionTypeAnnotation: isFunctionTypeAnnotation,\n\t\tisFunctionTypeParam: isFunctionTypeParam,\n\t\tisGenericTypeAnnotation: isGenericTypeAnnotation$1,\n\t\tisInferredPredicate: isInferredPredicate,\n\t\tisInterfaceExtends: isInterfaceExtends,\n\t\tisInterfaceDeclaration: isInterfaceDeclaration,\n\t\tisInterfaceTypeAnnotation: isInterfaceTypeAnnotation,\n\t\tisIntersectionTypeAnnotation: isIntersectionTypeAnnotation$1,\n\t\tisMixedTypeAnnotation: isMixedTypeAnnotation$1,\n\t\tisEmptyTypeAnnotation: isEmptyTypeAnnotation$1,\n\t\tisNullableTypeAnnotation: isNullableTypeAnnotation$1,\n\t\tisNumberLiteralTypeAnnotation: isNumberLiteralTypeAnnotation,\n\t\tisNumberTypeAnnotation: isNumberTypeAnnotation$1,\n\t\tisObjectTypeAnnotation: isObjectTypeAnnotation,\n\t\tisObjectTypeInternalSlot: isObjectTypeInternalSlot,\n\t\tisObjectTypeCallProperty: isObjectTypeCallProperty,\n\t\tisObjectTypeIndexer: isObjectTypeIndexer,\n\t\tisObjectTypeProperty: isObjectTypeProperty,\n\t\tisObjectTypeSpreadProperty: isObjectTypeSpreadProperty,\n\t\tisOpaqueType: isOpaqueType,\n\t\tisQualifiedTypeIdentifier: isQualifiedTypeIdentifier,\n\t\tisStringLiteralTypeAnnotation: isStringLiteralTypeAnnotation,\n\t\tisStringTypeAnnotation: isStringTypeAnnotation$1,\n\t\tisSymbolTypeAnnotation: isSymbolTypeAnnotation,\n\t\tisThisTypeAnnotation: isThisTypeAnnotation,\n\t\tisTupleTypeAnnotation: isTupleTypeAnnotation,\n\t\tisTypeofTypeAnnotation: isTypeofTypeAnnotation,\n\t\tisTypeAlias: isTypeAlias,\n\t\tisTypeAnnotation: isTypeAnnotation$2,\n\t\tisTypeCastExpression: isTypeCastExpression$1,\n\t\tisTypeParameter: isTypeParameter,\n\t\tisTypeParameterDeclaration: isTypeParameterDeclaration,\n\t\tisTypeParameterInstantiation: isTypeParameterInstantiation,\n\t\tisUnionTypeAnnotation: isUnionTypeAnnotation$2,\n\t\tisVariance: isVariance,\n\t\tisVoidTypeAnnotation: isVoidTypeAnnotation$1,\n\t\tisEnumDeclaration: isEnumDeclaration,\n\t\tisEnumBooleanBody: isEnumBooleanBody,\n\t\tisEnumNumberBody: isEnumNumberBody,\n\t\tisEnumStringBody: isEnumStringBody,\n\t\tisEnumSymbolBody: isEnumSymbolBody,\n\t\tisEnumBooleanMember: isEnumBooleanMember,\n\t\tisEnumNumberMember: isEnumNumberMember,\n\t\tisEnumStringMember: isEnumStringMember,\n\t\tisEnumDefaultedMember: isEnumDefaultedMember,\n\t\tisIndexedAccessType: isIndexedAccessType$1,\n\t\tisOptionalIndexedAccessType: isOptionalIndexedAccessType,\n\t\tisJSXAttribute: isJSXAttribute,\n\t\tisJSXClosingElement: isJSXClosingElement,\n\t\tisJSXElement: isJSXElement,\n\t\tisJSXEmptyExpression: isJSXEmptyExpression,\n\t\tisJSXExpressionContainer: isJSXExpressionContainer$1,\n\t\tisJSXSpreadChild: isJSXSpreadChild,\n\t\tisJSXIdentifier: isJSXIdentifier$3,\n\t\tisJSXMemberExpression: isJSXMemberExpression$2,\n\t\tisJSXNamespacedName: isJSXNamespacedName$1,\n\t\tisJSXOpeningElement: isJSXOpeningElement,\n\t\tisJSXSpreadAttribute: isJSXSpreadAttribute$1,\n\t\tisJSXText: isJSXText,\n\t\tisJSXFragment: isJSXFragment,\n\t\tisJSXOpeningFragment: isJSXOpeningFragment,\n\t\tisJSXClosingFragment: isJSXClosingFragment,\n\t\tisNoop: isNoop,\n\t\tisPlaceholder: isPlaceholder$1,\n\t\tisV8IntrinsicIdentifier: isV8IntrinsicIdentifier,\n\t\tisArgumentPlaceholder: isArgumentPlaceholder,\n\t\tisBindExpression: isBindExpression,\n\t\tisImportAttribute: isImportAttribute,\n\t\tisDecorator: isDecorator,\n\t\tisDoExpression: isDoExpression,\n\t\tisExportDefaultSpecifier: isExportDefaultSpecifier$1,\n\t\tisRecordExpression: isRecordExpression,\n\t\tisTupleExpression: isTupleExpression,\n\t\tisDecimalLiteral: isDecimalLiteral,\n\t\tisStaticBlock: isStaticBlock,\n\t\tisModuleExpression: isModuleExpression,\n\t\tisTopicReference: isTopicReference,\n\t\tisPipelineTopicExpression: isPipelineTopicExpression,\n\t\tisPipelineBareFunction: isPipelineBareFunction,\n\t\tisPipelinePrimaryTopicReference: isPipelinePrimaryTopicReference,\n\t\tisTSParameterProperty: isTSParameterProperty,\n\t\tisTSDeclareFunction: isTSDeclareFunction,\n\t\tisTSDeclareMethod: isTSDeclareMethod,\n\t\tisTSQualifiedName: isTSQualifiedName,\n\t\tisTSCallSignatureDeclaration: isTSCallSignatureDeclaration,\n\t\tisTSConstructSignatureDeclaration: isTSConstructSignatureDeclaration,\n\t\tisTSPropertySignature: isTSPropertySignature,\n\t\tisTSMethodSignature: isTSMethodSignature,\n\t\tisTSIndexSignature: isTSIndexSignature,\n\t\tisTSAnyKeyword: isTSAnyKeyword,\n\t\tisTSBooleanKeyword: isTSBooleanKeyword,\n\t\tisTSBigIntKeyword: isTSBigIntKeyword,\n\t\tisTSIntrinsicKeyword: isTSIntrinsicKeyword,\n\t\tisTSNeverKeyword: isTSNeverKeyword,\n\t\tisTSNullKeyword: isTSNullKeyword,\n\t\tisTSNumberKeyword: isTSNumberKeyword,\n\t\tisTSObjectKeyword: isTSObjectKeyword,\n\t\tisTSStringKeyword: isTSStringKeyword,\n\t\tisTSSymbolKeyword: isTSSymbolKeyword,\n\t\tisTSUndefinedKeyword: isTSUndefinedKeyword,\n\t\tisTSUnknownKeyword: isTSUnknownKeyword,\n\t\tisTSVoidKeyword: isTSVoidKeyword,\n\t\tisTSThisType: isTSThisType,\n\t\tisTSFunctionType: isTSFunctionType,\n\t\tisTSConstructorType: isTSConstructorType,\n\t\tisTSTypeReference: isTSTypeReference,\n\t\tisTSTypePredicate: isTSTypePredicate,\n\t\tisTSTypeQuery: isTSTypeQuery,\n\t\tisTSTypeLiteral: isTSTypeLiteral,\n\t\tisTSArrayType: isTSArrayType$1,\n\t\tisTSTupleType: isTSTupleType,\n\t\tisTSOptionalType: isTSOptionalType$1,\n\t\tisTSRestType: isTSRestType$1,\n\t\tisTSNamedTupleMember: isTSNamedTupleMember,\n\t\tisTSUnionType: isTSUnionType$1,\n\t\tisTSIntersectionType: isTSIntersectionType$1,\n\t\tisTSConditionalType: isTSConditionalType,\n\t\tisTSInferType: isTSInferType,\n\t\tisTSParenthesizedType: isTSParenthesizedType,\n\t\tisTSTypeOperator: isTSTypeOperator,\n\t\tisTSIndexedAccessType: isTSIndexedAccessType,\n\t\tisTSMappedType: isTSMappedType,\n\t\tisTSLiteralType: isTSLiteralType,\n\t\tisTSExpressionWithTypeArguments: isTSExpressionWithTypeArguments,\n\t\tisTSInterfaceDeclaration: isTSInterfaceDeclaration,\n\t\tisTSInterfaceBody: isTSInterfaceBody,\n\t\tisTSTypeAliasDeclaration: isTSTypeAliasDeclaration,\n\t\tisTSAsExpression: isTSAsExpression$2,\n\t\tisTSTypeAssertion: isTSTypeAssertion$2,\n\t\tisTSEnumDeclaration: isTSEnumDeclaration,\n\t\tisTSEnumMember: isTSEnumMember,\n\t\tisTSModuleDeclaration: isTSModuleDeclaration,\n\t\tisTSModuleBlock: isTSModuleBlock,\n\t\tisTSImportType: isTSImportType,\n\t\tisTSImportEqualsDeclaration: isTSImportEqualsDeclaration,\n\t\tisTSExternalModuleReference: isTSExternalModuleReference,\n\t\tisTSNonNullExpression: isTSNonNullExpression$2,\n\t\tisTSExportAssignment: isTSExportAssignment,\n\t\tisTSNamespaceExportDeclaration: isTSNamespaceExportDeclaration,\n\t\tisTSTypeAnnotation: isTSTypeAnnotation$2,\n\t\tisTSTypeParameterInstantiation: isTSTypeParameterInstantiation,\n\t\tisTSTypeParameterDeclaration: isTSTypeParameterDeclaration,\n\t\tisTSTypeParameter: isTSTypeParameter,\n\t\tisExpression: isExpression$4,\n\t\tisBinary: isBinary$3,\n\t\tisScopable: isScopable,\n\t\tisBlockParent: isBlockParent,\n\t\tisBlock: isBlock,\n\t\tisStatement: isStatement$7,\n\t\tisTerminatorless: isTerminatorless,\n\t\tisCompletionStatement: isCompletionStatement,\n\t\tisConditional: isConditional$1,\n\t\tisLoop: isLoop$1,\n\t\tisWhile: isWhile,\n\t\tisExpressionWrapper: isExpressionWrapper,\n\t\tisFor: isFor$2,\n\t\tisForXStatement: isForXStatement$1,\n\t\tisFunction: isFunction$4,\n\t\tisFunctionParent: isFunctionParent,\n\t\tisPureish: isPureish$2,\n\t\tisDeclaration: isDeclaration$1,\n\t\tisPatternLike: isPatternLike,\n\t\tisLVal: isLVal,\n\t\tisTSEntityName: isTSEntityName,\n\t\tisLiteral: isLiteral$7,\n\t\tisUserWhitespacable: isUserWhitespacable,\n\t\tisMethod: isMethod$1,\n\t\tisObjectMember: isObjectMember,\n\t\tisProperty: isProperty$2,\n\t\tisUnaryLike: isUnaryLike$1,\n\t\tisPattern: isPattern,\n\t\tisClass: isClass$1,\n\t\tisModuleDeclaration: isModuleDeclaration$1,\n\t\tisExportDeclaration: isExportDeclaration$2,\n\t\tisModuleSpecifier: isModuleSpecifier$1,\n\t\tisPrivate: isPrivate,\n\t\tisFlow: isFlow$1,\n\t\tisFlowType: isFlowType,\n\t\tisFlowBaseAnnotation: isFlowBaseAnnotation$1,\n\t\tisFlowDeclaration: isFlowDeclaration,\n\t\tisFlowPredicate: isFlowPredicate,\n\t\tisEnumBody: isEnumBody,\n\t\tisEnumMember: isEnumMember,\n\t\tisJSX: isJSX,\n\t\tisTSTypeElement: isTSTypeElement,\n\t\tisTSType: isTSType,\n\t\tisTSBaseType: isTSBaseType,\n\t\tisNumberLiteral: isNumberLiteral,\n\t\tisRegexLiteral: isRegexLiteral,\n\t\tisRestProperty: isRestProperty,\n\t\tisSpreadProperty: isSpreadProperty\n\t});\n\n\tvar isBinding = isBinding$1,\n\t isBlockScoped$1 = isBlockScoped$2,\n\t isExportDeclaration$1 = isExportDeclaration$2,\n\t isExpression$3 = isExpression$4,\n\t isFlow = isFlow$1,\n\t isForStatement$2 = isForStatement$3,\n\t isForXStatement = isForXStatement$1,\n\t isIdentifier$f = isIdentifier$g,\n\t isImportDeclaration$1 = isImportDeclaration$2,\n\t isImportSpecifier = isImportSpecifier$1,\n\t isJSXIdentifier$2 = isJSXIdentifier$3,\n\t isJSXMemberExpression$1 = isJSXMemberExpression$2,\n\t isMemberExpression$7 = isMemberExpression$8,\n\t isReferenced$1 = isReferenced$2,\n\t isScope = isScope$1,\n\t isStatement$6 = isStatement$7,\n\t isVar$1 = isVar$2,\n\t isVariableDeclaration$2 = isVariableDeclaration$3,\n\t react$2 = react$3;\n\tvar isCompatTag = react$2.isCompatTag;\n\tvar ReferencedIdentifier = {\n\t types: [\"Identifier\", \"JSXIdentifier\"],\n\t checkPath: function checkPath(path, opts) {\n\t var node = path.node,\n\t parent = path.parent;\n\n\t if (!isIdentifier$f(node, opts) && !isJSXMemberExpression$1(parent, opts)) {\n\t if (isJSXIdentifier$2(node, opts)) {\n\t if (isCompatTag(node.name)) return false;\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return isReferenced$1(node, parent, path.parentPath.parent);\n\t }\n\t};\n\tvar ReferencedMemberExpression = {\n\t types: [\"MemberExpression\"],\n\t checkPath: function checkPath(_ref) {\n\t var node = _ref.node,\n\t parent = _ref.parent;\n\t return isMemberExpression$7(node) && isReferenced$1(node, parent);\n\t }\n\t};\n\tvar BindingIdentifier = {\n\t types: [\"Identifier\"],\n\t checkPath: function checkPath(path) {\n\t var node = path.node,\n\t parent = path.parent;\n\t var grandparent = path.parentPath.parent;\n\t return isIdentifier$f(node) && isBinding(node, parent, grandparent);\n\t }\n\t};\n\tvar Statement = {\n\t types: [\"Statement\"],\n\t checkPath: function checkPath(_ref2) {\n\t var node = _ref2.node,\n\t parent = _ref2.parent;\n\n\t if (isStatement$6(node)) {\n\t if (isVariableDeclaration$2(node)) {\n\t if (isForXStatement(parent, {\n\t left: node\n\t })) return false;\n\t if (isForStatement$2(parent, {\n\t init: node\n\t })) return false;\n\t }\n\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }\n\t};\n\tvar Expression = {\n\t types: [\"Expression\"],\n\t checkPath: function checkPath(path) {\n\t if (path.isIdentifier()) {\n\t return path.isReferencedIdentifier();\n\t } else {\n\t return isExpression$3(path.node);\n\t }\n\t }\n\t};\n\tvar Scope$2 = {\n\t types: [\"Scopable\", \"Pattern\"],\n\t checkPath: function checkPath(path) {\n\t return isScope(path.node, path.parent);\n\t }\n\t};\n\tvar Referenced = {\n\t checkPath: function checkPath(path) {\n\t return isReferenced$1(path.node, path.parent);\n\t }\n\t};\n\tvar BlockScoped = {\n\t checkPath: function checkPath(path) {\n\t return isBlockScoped$1(path.node);\n\t }\n\t};\n\tvar Var = {\n\t types: [\"VariableDeclaration\"],\n\t checkPath: function checkPath(path) {\n\t return isVar$1(path.node);\n\t }\n\t};\n\tvar User = {\n\t checkPath: function checkPath(path) {\n\t return path.node && !!path.node.loc;\n\t }\n\t};\n\tvar Generated = {\n\t checkPath: function checkPath(path) {\n\t return !path.isUser();\n\t }\n\t};\n\tvar Pure = {\n\t checkPath: function checkPath(path, opts) {\n\t return path.scope.isPure(path.node, opts);\n\t }\n\t};\n\tvar Flow = {\n\t types: [\"Flow\", \"ImportDeclaration\", \"ExportDeclaration\", \"ImportSpecifier\"],\n\t checkPath: function checkPath(_ref3) {\n\t var node = _ref3.node;\n\n\t if (isFlow(node)) {\n\t return true;\n\t } else if (isImportDeclaration$1(node)) {\n\t return node.importKind === \"type\" || node.importKind === \"typeof\";\n\t } else if (isExportDeclaration$1(node)) {\n\t return node.exportKind === \"type\";\n\t } else if (isImportSpecifier(node)) {\n\t return node.importKind === \"type\" || node.importKind === \"typeof\";\n\t } else {\n\t return false;\n\t }\n\t }\n\t};\n\tvar RestProperty = {\n\t types: [\"RestElement\"],\n\t checkPath: function checkPath(path) {\n\t return path.parentPath && path.parentPath.isObjectPattern();\n\t }\n\t};\n\tvar SpreadProperty = {\n\t types: [\"RestElement\"],\n\t checkPath: function checkPath(path) {\n\t return path.parentPath && path.parentPath.isObjectExpression();\n\t }\n\t};\n\tvar ExistentialTypeParam = {\n\t types: [\"ExistsTypeAnnotation\"]\n\t};\n\tvar NumericLiteralTypeAnnotation = {\n\t types: [\"NumberLiteralTypeAnnotation\"]\n\t};\n\tvar ForAwaitStatement = {\n\t types: [\"ForOfStatement\"],\n\t checkPath: function checkPath(_ref4) {\n\t var node = _ref4.node;\n\t return node[\"await\"] === true;\n\t }\n\t};\n\n\tvar virtualTypes = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tReferencedIdentifier: ReferencedIdentifier,\n\t\tReferencedMemberExpression: ReferencedMemberExpression,\n\t\tBindingIdentifier: BindingIdentifier,\n\t\tStatement: Statement,\n\t\tExpression: Expression,\n\t\tScope: Scope$2,\n\t\tReferenced: Referenced,\n\t\tBlockScoped: BlockScoped,\n\t\tVar: Var,\n\t\tUser: User,\n\t\tGenerated: Generated,\n\t\tPure: Pure,\n\t\tFlow: Flow,\n\t\tRestProperty: RestProperty,\n\t\tSpreadProperty: SpreadProperty,\n\t\tExistentialTypeParam: ExistentialTypeParam,\n\t\tNumericLiteralTypeAnnotation: NumericLiteralTypeAnnotation,\n\t\tForAwaitStatement: ForAwaitStatement\n\t});\n\n\tvar s = 1000;\n\tvar m$1 = s * 60;\n\tvar h = m$1 * 60;\n\tvar d = h * 24;\n\tvar w = d * 7;\n\tvar y = d * 365.25;\n\n\tvar ms = function ms(val, options) {\n\t options = options || {};\n\t var type = typeof val;\n\n\t if (type === 'string' && val.length > 0) {\n\t return parse$6(val);\n\t } else if (type === 'number' && isFinite(val)) {\n\t return options[\"long\"] ? fmtLong(val) : fmtShort(val);\n\t }\n\n\t throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));\n\t};\n\n\tfunction parse$6(str) {\n\t str = String(str);\n\n\t if (str.length > 100) {\n\t return;\n\t }\n\n\t var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);\n\n\t if (!match) {\n\t return;\n\t }\n\n\t var n = parseFloat(match[1]);\n\t var type = (match[2] || 'ms').toLowerCase();\n\n\t switch (type) {\n\t case 'years':\n\t case 'year':\n\t case 'yrs':\n\t case 'yr':\n\t case 'y':\n\t return n * y;\n\n\t case 'weeks':\n\t case 'week':\n\t case 'w':\n\t return n * w;\n\n\t case 'days':\n\t case 'day':\n\t case 'd':\n\t return n * d;\n\n\t case 'hours':\n\t case 'hour':\n\t case 'hrs':\n\t case 'hr':\n\t case 'h':\n\t return n * h;\n\n\t case 'minutes':\n\t case 'minute':\n\t case 'mins':\n\t case 'min':\n\t case 'm':\n\t return n * m$1;\n\n\t case 'seconds':\n\t case 'second':\n\t case 'secs':\n\t case 'sec':\n\t case 's':\n\t return n * s;\n\n\t case 'milliseconds':\n\t case 'millisecond':\n\t case 'msecs':\n\t case 'msec':\n\t case 'ms':\n\t return n;\n\n\t default:\n\t return undefined;\n\t }\n\t}\n\n\tfunction fmtShort(ms) {\n\t var msAbs = Math.abs(ms);\n\n\t if (msAbs >= d) {\n\t return Math.round(ms / d) + 'd';\n\t }\n\n\t if (msAbs >= h) {\n\t return Math.round(ms / h) + 'h';\n\t }\n\n\t if (msAbs >= m$1) {\n\t return Math.round(ms / m$1) + 'm';\n\t }\n\n\t if (msAbs >= s) {\n\t return Math.round(ms / s) + 's';\n\t }\n\n\t return ms + 'ms';\n\t}\n\n\tfunction fmtLong(ms) {\n\t var msAbs = Math.abs(ms);\n\n\t if (msAbs >= d) {\n\t return plural(ms, msAbs, d, 'day');\n\t }\n\n\t if (msAbs >= h) {\n\t return plural(ms, msAbs, h, 'hour');\n\t }\n\n\t if (msAbs >= m$1) {\n\t return plural(ms, msAbs, m$1, 'minute');\n\t }\n\n\t if (msAbs >= s) {\n\t return plural(ms, msAbs, s, 'second');\n\t }\n\n\t return ms + ' ms';\n\t}\n\n\tfunction plural(ms, msAbs, n, name) {\n\t var isPlural = msAbs >= n * 1.5;\n\t return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n\t}\n\n\tfunction setup$1(env) {\n\t createDebug.debug = createDebug;\n\t createDebug[\"default\"] = createDebug;\n\t createDebug.coerce = coerce;\n\t createDebug.disable = disable;\n\t createDebug.enable = enable;\n\t createDebug.enabled = enabled;\n\t createDebug.humanize = ms;\n\t createDebug.destroy = destroy;\n\t Object.keys(env).forEach(function (key) {\n\t createDebug[key] = env[key];\n\t });\n\t createDebug.names = [];\n\t createDebug.skips = [];\n\t createDebug.formatters = {};\n\n\t function selectColor(namespace) {\n\t var hash = 0;\n\n\t for (var i = 0; i < namespace.length; i++) {\n\t hash = (hash << 5) - hash + namespace.charCodeAt(i);\n\t hash |= 0;\n\t }\n\n\t return createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t }\n\n\t createDebug.selectColor = selectColor;\n\n\t function createDebug(namespace) {\n\t var prevTime;\n\t var enableOverride = null;\n\t var namespacesCache;\n\t var enabledCache;\n\n\t function debug() {\n\t for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\n\t if (!debug.enabled) {\n\t return;\n\t }\n\n\t var self = debug;\n\t var curr = Number(new Date());\n\t var ms = curr - (prevTime || curr);\n\t self.diff = ms;\n\t self.prev = prevTime;\n\t self.curr = curr;\n\t prevTime = curr;\n\t args[0] = createDebug.coerce(args[0]);\n\n\t if (typeof args[0] !== 'string') {\n\t args.unshift('%O');\n\t }\n\n\t var index = 0;\n\t args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {\n\t if (match === '%%') {\n\t return '%';\n\t }\n\n\t index++;\n\t var formatter = createDebug.formatters[format];\n\n\t if (typeof formatter === 'function') {\n\t var val = args[index];\n\t match = formatter.call(self, val);\n\t args.splice(index, 1);\n\t index--;\n\t }\n\n\t return match;\n\t });\n\t createDebug.formatArgs.call(self, args);\n\t var logFn = self.log || createDebug.log;\n\t logFn.apply(self, args);\n\t }\n\n\t debug.namespace = namespace;\n\t debug.useColors = createDebug.useColors();\n\t debug.color = createDebug.selectColor(namespace);\n\t debug.extend = extend;\n\t debug.destroy = createDebug.destroy;\n\t Object.defineProperty(debug, 'enabled', {\n\t enumerable: true,\n\t configurable: false,\n\t get: function get() {\n\t if (enableOverride !== null) {\n\t return enableOverride;\n\t }\n\n\t if (namespacesCache !== createDebug.namespaces) {\n\t namespacesCache = createDebug.namespaces;\n\t enabledCache = createDebug.enabled(namespace);\n\t }\n\n\t return enabledCache;\n\t },\n\t set: function set(v) {\n\t enableOverride = v;\n\t }\n\t });\n\n\t if (typeof createDebug.init === 'function') {\n\t createDebug.init(debug);\n\t }\n\n\t return debug;\n\t }\n\n\t function extend(namespace, delimiter) {\n\t var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t newDebug.log = this.log;\n\t return newDebug;\n\t }\n\n\t function enable(namespaces) {\n\t createDebug.save(namespaces);\n\t createDebug.namespaces = namespaces;\n\t createDebug.names = [];\n\t createDebug.skips = [];\n\t var i;\n\t var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t var len = split.length;\n\n\t for (i = 0; i < len; i++) {\n\t if (!split[i]) {\n\t continue;\n\t }\n\n\t namespaces = split[i].replace(/\\*/g, '.*?');\n\n\t if (namespaces[0] === '-') {\n\t createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t } else {\n\t createDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t }\n\t }\n\t }\n\n\t function disable() {\n\t var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {\n\t return '-' + namespace;\n\t }))).join(',');\n\t createDebug.enable('');\n\t return namespaces;\n\t }\n\n\t function enabled(name) {\n\t if (name[name.length - 1] === '*') {\n\t return true;\n\t }\n\n\t var i;\n\t var len;\n\n\t for (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t if (createDebug.skips[i].test(name)) {\n\t return false;\n\t }\n\t }\n\n\t for (i = 0, len = createDebug.names.length; i < len; i++) {\n\t if (createDebug.names[i].test(name)) {\n\t return true;\n\t }\n\t }\n\n\t return false;\n\t }\n\n\t function toNamespace(regexp) {\n\t return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\\.\\*\\?$/, '*');\n\t }\n\n\t function coerce(val) {\n\t if (val instanceof Error) {\n\t return val.stack || val.message;\n\t }\n\n\t return val;\n\t }\n\n\t function destroy() {\n\t console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t }\n\n\t createDebug.enable(createDebug.load());\n\t return createDebug;\n\t}\n\n\tvar common = setup$1;\n\n\tvar browser$3 = createCommonjsModule(function (module, exports) {\n\t exports.formatArgs = formatArgs;\n\t exports.save = save;\n\t exports.load = load;\n\t exports.useColors = useColors;\n\t exports.storage = localstorage();\n\n\t exports.destroy = function () {\n\t var warned = false;\n\t return function () {\n\t if (!warned) {\n\t warned = true;\n\t console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t }\n\t };\n\t }();\n\n\t exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];\n\n\t function useColors() {\n\t if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t return true;\n\t }\n\n\t if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t return false;\n\t }\n\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t }\n\n\t function formatArgs(args) {\n\t args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);\n\n\t if (!this.useColors) {\n\t return;\n\t }\n\n\t var c = 'color: ' + this.color;\n\t args.splice(1, 0, c, 'color: inherit');\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-zA-Z%]/g, function (match) {\n\t if (match === '%%') {\n\t return;\n\t }\n\n\t index++;\n\n\t if (match === '%c') {\n\t lastC = index;\n\t }\n\t });\n\t args.splice(lastC, 0, c);\n\t }\n\n\t exports.log = console.debug || console.log || function () {};\n\n\t function save(namespaces) {\n\t try {\n\t if (namespaces) {\n\t exports.storage.setItem('debug', namespaces);\n\t } else {\n\t exports.storage.removeItem('debug');\n\t }\n\t } catch (error) {}\n\t }\n\n\t function load() {\n\t var r;\n\n\t try {\n\t r = exports.storage.getItem('debug');\n\t } catch (error) {}\n\n\t if (!r && typeof browser$4 !== 'undefined' && 'env' in browser$4) {\n\t r = browser$4.env.DEBUG;\n\t }\n\n\t return r;\n\t }\n\n\t function localstorage() {\n\t try {\n\t return localStorage;\n\t } catch (error) {}\n\t }\n\n\t module.exports = common(exports);\n\t var formatters = module.exports.formatters;\n\n\t formatters.j = function (v) {\n\t try {\n\t return JSON.stringify(v);\n\t } catch (error) {\n\t return '[UnexpectedJSONParseError]: ' + error.message;\n\t }\n\t };\n\t}, \"/$$rollup_base$$/node_modules/debug/src\");\n\n\tvar Binding = function () {\n\t function Binding(_ref) {\n\t var identifier = _ref.identifier,\n\t scope = _ref.scope,\n\t path = _ref.path,\n\t kind = _ref.kind;\n\t this.identifier = void 0;\n\t this.scope = void 0;\n\t this.path = void 0;\n\t this.kind = void 0;\n\t this.constantViolations = [];\n\t this.constant = true;\n\t this.referencePaths = [];\n\t this.referenced = false;\n\t this.references = 0;\n\t this.identifier = identifier;\n\t this.scope = scope;\n\t this.path = path;\n\t this.kind = kind;\n\t this.clearValue();\n\t }\n\n\t var _proto = Binding.prototype;\n\n\t _proto.deoptValue = function deoptValue() {\n\t this.clearValue();\n\t this.hasDeoptedValue = true;\n\t };\n\n\t _proto.setValue = function setValue(value) {\n\t if (this.hasDeoptedValue) return;\n\t this.hasValue = true;\n\t this.value = value;\n\t };\n\n\t _proto.clearValue = function clearValue() {\n\t this.hasDeoptedValue = false;\n\t this.hasValue = false;\n\t this.value = null;\n\t };\n\n\t _proto.reassign = function reassign(path) {\n\t this.constant = false;\n\n\t if (this.constantViolations.indexOf(path) !== -1) {\n\t return;\n\t }\n\n\t this.constantViolations.push(path);\n\t };\n\n\t _proto.reference = function reference(path) {\n\t if (this.referencePaths.indexOf(path) !== -1) {\n\t return;\n\t }\n\n\t this.referenced = true;\n\t this.references++;\n\t this.referencePaths.push(path);\n\t };\n\n\t _proto.dereference = function dereference() {\n\t this.references--;\n\t this.referenced = !!this.references;\n\t };\n\n\t return Binding;\n\t}();\n\n\tvar cloneNode$h = cloneNode$i,\n\t exportNamedDeclaration$1 = exportNamedDeclaration$2,\n\t exportSpecifier$1 = exportSpecifier$2,\n\t identifier$i = identifier$j,\n\t variableDeclaration$7 = variableDeclaration$8,\n\t variableDeclarator$7 = variableDeclarator$8;\n\tfunction splitExportDeclaration(exportDeclaration) {\n\t if (!exportDeclaration.isExportDeclaration()) {\n\t throw new Error(\"Only export declarations can be split.\");\n\t }\n\n\t var isDefault = exportDeclaration.isExportDefaultDeclaration();\n\t var declaration = exportDeclaration.get(\"declaration\");\n\t var isClassDeclaration = declaration.isClassDeclaration();\n\n\t if (isDefault) {\n\t var standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;\n\t var scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;\n\t var id = declaration.node.id;\n\t var needBindingRegistration = false;\n\n\t if (!id) {\n\t needBindingRegistration = true;\n\t id = scope.generateUidIdentifier(\"default\");\n\n\t if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {\n\t declaration.node.id = cloneNode$h(id);\n\t }\n\t }\n\n\t var updatedDeclaration = standaloneDeclaration ? declaration : variableDeclaration$7(\"var\", [variableDeclarator$7(cloneNode$h(id), declaration.node)]);\n\t var updatedExportDeclaration = exportNamedDeclaration$1(null, [exportSpecifier$1(cloneNode$h(id), identifier$i(\"default\"))]);\n\t exportDeclaration.insertAfter(updatedExportDeclaration);\n\t exportDeclaration.replaceWith(updatedDeclaration);\n\n\t if (needBindingRegistration) {\n\t scope.registerDeclaration(exportDeclaration);\n\t }\n\n\t return exportDeclaration;\n\t }\n\n\t if (exportDeclaration.get(\"specifiers\").length > 0) {\n\t throw new Error(\"It doesn't make sense to split exported specifiers.\");\n\t }\n\n\t var bindingIdentifiers = declaration.getOuterBindingIdentifiers();\n\t var specifiers = Object.keys(bindingIdentifiers).map(function (name) {\n\t return exportSpecifier$1(identifier$i(name), identifier$i(name));\n\t });\n\t var aliasDeclar = exportNamedDeclaration$1(null, specifiers);\n\t exportDeclaration.insertAfter(aliasDeclar);\n\t exportDeclaration.replaceWith(declaration.node);\n\t return exportDeclaration;\n\t}\n\n\tvar VISITOR_KEYS$5 = VISITOR_KEYS$6;\n\tvar renameVisitor = {\n\t ReferencedIdentifier: function ReferencedIdentifier(_ref, state) {\n\t var node = _ref.node;\n\n\t if (node.name === state.oldName) {\n\t node.name = state.newName;\n\t }\n\t },\n\t Scope: function Scope(path, state) {\n\t if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {\n\t skipAllButComputedMethodKey(path);\n\t }\n\t },\n\t \"AssignmentExpression|Declaration|VariableDeclarator\": function AssignmentExpressionDeclarationVariableDeclarator(path, state) {\n\t if (path.isVariableDeclaration()) return;\n\t var ids = path.getOuterBindingIdentifiers();\n\n\t for (var name in ids) {\n\t if (name === state.oldName) ids[name].name = state.newName;\n\t }\n\t }\n\t};\n\n\tvar Renamer = function () {\n\t function Renamer(binding, oldName, newName) {\n\t this.newName = newName;\n\t this.oldName = oldName;\n\t this.binding = binding;\n\t }\n\n\t var _proto = Renamer.prototype;\n\n\t _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) {\n\t var maybeExportDeclar = parentDeclar.parentPath;\n\n\t if (!maybeExportDeclar.isExportDeclaration()) {\n\t return;\n\t }\n\n\t if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get(\"declaration\").node.id) {\n\t return;\n\t }\n\n\t splitExportDeclaration(maybeExportDeclar);\n\t };\n\n\t _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) {\n\t return;\n\t };\n\n\t _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) {\n\t return;\n\t };\n\n\t _proto.rename = function rename(block) {\n\t var _this = this;\n\n\t var binding = this.binding,\n\t oldName = this.oldName,\n\t newName = this.newName;\n\t var scope = binding.scope,\n\t path = binding.path;\n\t var parentDeclar = path.find(function (path) {\n\t return path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression();\n\t });\n\n\t if (parentDeclar) {\n\t var bindingIds = parentDeclar.getOuterBindingIdentifiers();\n\n\t if (bindingIds[oldName] === binding.identifier) {\n\t this.maybeConvertFromExportDeclaration(parentDeclar);\n\t }\n\t }\n\n\t var blockToTraverse = block || scope.block;\n\n\t if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === \"SwitchStatement\") {\n\t blockToTraverse.cases.forEach(function (c) {\n\t scope.traverse(c, renameVisitor, _this);\n\t });\n\t } else {\n\t scope.traverse(blockToTraverse, renameVisitor, this);\n\t }\n\n\t if (!block) {\n\t scope.removeOwnBinding(oldName);\n\t scope.bindings[newName] = binding;\n\t this.binding.identifier.name = newName;\n\t }\n\n\t if (parentDeclar) {\n\t this.maybeConvertFromClassFunctionDeclaration(parentDeclar);\n\t this.maybeConvertFromClassFunctionExpression(parentDeclar);\n\t }\n\t };\n\n\t return Renamer;\n\t}();\n\n\tfunction skipAllButComputedMethodKey(path) {\n\t if (!path.isMethod() || !path.node.computed) {\n\t path.skip();\n\t return;\n\t }\n\n\t var keys = VISITOR_KEYS$5[path.type];\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {\n\t var key = _step.value;\n\t if (key !== \"key\") path.skipKey(key);\n\t }\n\t}\n\n\tvar builtin = {\n\t\t\"Array\": false,\n\t\t\"ArrayBuffer\": false,\n\t\tAtomics: false,\n\t\tBigInt: false,\n\t\tBigInt64Array: false,\n\t\tBigUint64Array: false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"DataView\": false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Float32Array\": false,\n\t\t\"Float64Array\": false,\n\t\t\"Function\": false,\n\t\tglobalThis: false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"Int16Array\": false,\n\t\t\"Int32Array\": false,\n\t\t\"Int8Array\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Map\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\t\"Promise\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"Proxy\": false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"Reflect\": false,\n\t\t\"RegExp\": false,\n\t\t\"Set\": false,\n\t\tSharedArrayBuffer: false,\n\t\t\"String\": false,\n\t\t\"Symbol\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"Uint16Array\": false,\n\t\t\"Uint32Array\": false,\n\t\t\"Uint8Array\": false,\n\t\t\"Uint8ClampedArray\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false,\n\t\t\"WeakMap\": false,\n\t\t\"WeakSet\": false\n\t};\n\tvar es5 = {\n\t\t\"Array\": false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Function\": false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"RegExp\": false,\n\t\t\"String\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false\n\t};\n\tvar es2015 = {\n\t\t\"Array\": false,\n\t\t\"ArrayBuffer\": false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"DataView\": false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Float32Array\": false,\n\t\t\"Float64Array\": false,\n\t\t\"Function\": false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"Int16Array\": false,\n\t\t\"Int32Array\": false,\n\t\t\"Int8Array\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Map\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\t\"Promise\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"Proxy\": false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"Reflect\": false,\n\t\t\"RegExp\": false,\n\t\t\"Set\": false,\n\t\t\"String\": false,\n\t\t\"Symbol\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"Uint16Array\": false,\n\t\t\"Uint32Array\": false,\n\t\t\"Uint8Array\": false,\n\t\t\"Uint8ClampedArray\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false,\n\t\t\"WeakMap\": false,\n\t\t\"WeakSet\": false\n\t};\n\tvar es2017 = {\n\t\t\"Array\": false,\n\t\t\"ArrayBuffer\": false,\n\t\tAtomics: false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"DataView\": false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Float32Array\": false,\n\t\t\"Float64Array\": false,\n\t\t\"Function\": false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"Int16Array\": false,\n\t\t\"Int32Array\": false,\n\t\t\"Int8Array\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Map\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\t\"Promise\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"Proxy\": false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"Reflect\": false,\n\t\t\"RegExp\": false,\n\t\t\"Set\": false,\n\t\tSharedArrayBuffer: false,\n\t\t\"String\": false,\n\t\t\"Symbol\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"Uint16Array\": false,\n\t\t\"Uint32Array\": false,\n\t\t\"Uint8Array\": false,\n\t\t\"Uint8ClampedArray\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false,\n\t\t\"WeakMap\": false,\n\t\t\"WeakSet\": false\n\t};\n\tvar browser$2 = {\n\t\tAbortController: false,\n\t\tAbortSignal: false,\n\t\taddEventListener: false,\n\t\talert: false,\n\t\tAnalyserNode: false,\n\t\tAnimation: false,\n\t\tAnimationEffectReadOnly: false,\n\t\tAnimationEffectTiming: false,\n\t\tAnimationEffectTimingReadOnly: false,\n\t\tAnimationEvent: false,\n\t\tAnimationPlaybackEvent: false,\n\t\tAnimationTimeline: false,\n\t\tapplicationCache: false,\n\t\tApplicationCache: false,\n\t\tApplicationCacheErrorEvent: false,\n\t\tatob: false,\n\t\tAttr: false,\n\t\tAudio: false,\n\t\tAudioBuffer: false,\n\t\tAudioBufferSourceNode: false,\n\t\tAudioContext: false,\n\t\tAudioDestinationNode: false,\n\t\tAudioListener: false,\n\t\tAudioNode: false,\n\t\tAudioParam: false,\n\t\tAudioProcessingEvent: false,\n\t\tAudioScheduledSourceNode: false,\n\t\t\"AudioWorkletGlobalScope \": false,\n\t\tAudioWorkletNode: false,\n\t\tAudioWorkletProcessor: false,\n\t\tBarProp: false,\n\t\tBaseAudioContext: false,\n\t\tBatteryManager: false,\n\t\tBeforeUnloadEvent: false,\n\t\tBiquadFilterNode: false,\n\t\tBlob: false,\n\t\tBlobEvent: false,\n\t\tblur: false,\n\t\tBroadcastChannel: false,\n\t\tbtoa: false,\n\t\tBudgetService: false,\n\t\tByteLengthQueuingStrategy: false,\n\t\tCache: false,\n\t\tcaches: false,\n\t\tCacheStorage: false,\n\t\tcancelAnimationFrame: false,\n\t\tcancelIdleCallback: false,\n\t\tCanvasCaptureMediaStreamTrack: false,\n\t\tCanvasGradient: false,\n\t\tCanvasPattern: false,\n\t\tCanvasRenderingContext2D: false,\n\t\tChannelMergerNode: false,\n\t\tChannelSplitterNode: false,\n\t\tCharacterData: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tclientInformation: false,\n\t\tClipboardEvent: false,\n\t\tclose: false,\n\t\tclosed: false,\n\t\tCloseEvent: false,\n\t\tComment: false,\n\t\tCompositionEvent: false,\n\t\tconfirm: false,\n\t\tconsole: false,\n\t\tConstantSourceNode: false,\n\t\tConvolverNode: false,\n\t\tCountQueuingStrategy: false,\n\t\tcreateImageBitmap: false,\n\t\tCredential: false,\n\t\tCredentialsContainer: false,\n\t\tcrypto: false,\n\t\tCrypto: false,\n\t\tCryptoKey: false,\n\t\tCSS: false,\n\t\tCSSConditionRule: false,\n\t\tCSSFontFaceRule: false,\n\t\tCSSGroupingRule: false,\n\t\tCSSImportRule: false,\n\t\tCSSKeyframeRule: false,\n\t\tCSSKeyframesRule: false,\n\t\tCSSMediaRule: false,\n\t\tCSSNamespaceRule: false,\n\t\tCSSPageRule: false,\n\t\tCSSRule: false,\n\t\tCSSRuleList: false,\n\t\tCSSStyleDeclaration: false,\n\t\tCSSStyleRule: false,\n\t\tCSSStyleSheet: false,\n\t\tCSSSupportsRule: false,\n\t\tCustomElementRegistry: false,\n\t\tcustomElements: false,\n\t\tCustomEvent: false,\n\t\tDataTransfer: false,\n\t\tDataTransferItem: false,\n\t\tDataTransferItemList: false,\n\t\tdefaultstatus: false,\n\t\tdefaultStatus: false,\n\t\tDelayNode: false,\n\t\tDeviceMotionEvent: false,\n\t\tDeviceOrientationEvent: false,\n\t\tdevicePixelRatio: false,\n\t\tdispatchEvent: false,\n\t\tdocument: false,\n\t\tDocument: false,\n\t\tDocumentFragment: false,\n\t\tDocumentType: false,\n\t\tDOMError: false,\n\t\tDOMException: false,\n\t\tDOMImplementation: false,\n\t\tDOMMatrix: false,\n\t\tDOMMatrixReadOnly: false,\n\t\tDOMParser: false,\n\t\tDOMPoint: false,\n\t\tDOMPointReadOnly: false,\n\t\tDOMQuad: false,\n\t\tDOMRect: false,\n\t\tDOMRectReadOnly: false,\n\t\tDOMStringList: false,\n\t\tDOMStringMap: false,\n\t\tDOMTokenList: false,\n\t\tDragEvent: false,\n\t\tDynamicsCompressorNode: false,\n\t\tElement: false,\n\t\tErrorEvent: false,\n\t\tevent: false,\n\t\tEvent: false,\n\t\tEventSource: false,\n\t\tEventTarget: false,\n\t\texternal: false,\n\t\tfetch: false,\n\t\tFile: false,\n\t\tFileList: false,\n\t\tFileReader: false,\n\t\tfind: false,\n\t\tfocus: false,\n\t\tFocusEvent: false,\n\t\tFontFace: false,\n\t\tFontFaceSetLoadEvent: false,\n\t\tFormData: false,\n\t\tframeElement: false,\n\t\tframes: false,\n\t\tGainNode: false,\n\t\tGamepad: false,\n\t\tGamepadButton: false,\n\t\tGamepadEvent: false,\n\t\tgetComputedStyle: false,\n\t\tgetSelection: false,\n\t\tHashChangeEvent: false,\n\t\tHeaders: false,\n\t\thistory: false,\n\t\tHistory: false,\n\t\tHTMLAllCollection: false,\n\t\tHTMLAnchorElement: false,\n\t\tHTMLAreaElement: false,\n\t\tHTMLAudioElement: false,\n\t\tHTMLBaseElement: false,\n\t\tHTMLBodyElement: false,\n\t\tHTMLBRElement: false,\n\t\tHTMLButtonElement: false,\n\t\tHTMLCanvasElement: false,\n\t\tHTMLCollection: false,\n\t\tHTMLContentElement: false,\n\t\tHTMLDataElement: false,\n\t\tHTMLDataListElement: false,\n\t\tHTMLDetailsElement: false,\n\t\tHTMLDialogElement: false,\n\t\tHTMLDirectoryElement: false,\n\t\tHTMLDivElement: false,\n\t\tHTMLDListElement: false,\n\t\tHTMLDocument: false,\n\t\tHTMLElement: false,\n\t\tHTMLEmbedElement: false,\n\t\tHTMLFieldSetElement: false,\n\t\tHTMLFontElement: false,\n\t\tHTMLFormControlsCollection: false,\n\t\tHTMLFormElement: false,\n\t\tHTMLFrameElement: false,\n\t\tHTMLFrameSetElement: false,\n\t\tHTMLHeadElement: false,\n\t\tHTMLHeadingElement: false,\n\t\tHTMLHRElement: false,\n\t\tHTMLHtmlElement: false,\n\t\tHTMLIFrameElement: false,\n\t\tHTMLImageElement: false,\n\t\tHTMLInputElement: false,\n\t\tHTMLLabelElement: false,\n\t\tHTMLLegendElement: false,\n\t\tHTMLLIElement: false,\n\t\tHTMLLinkElement: false,\n\t\tHTMLMapElement: false,\n\t\tHTMLMarqueeElement: false,\n\t\tHTMLMediaElement: false,\n\t\tHTMLMenuElement: false,\n\t\tHTMLMetaElement: false,\n\t\tHTMLMeterElement: false,\n\t\tHTMLModElement: false,\n\t\tHTMLObjectElement: false,\n\t\tHTMLOListElement: false,\n\t\tHTMLOptGroupElement: false,\n\t\tHTMLOptionElement: false,\n\t\tHTMLOptionsCollection: false,\n\t\tHTMLOutputElement: false,\n\t\tHTMLParagraphElement: false,\n\t\tHTMLParamElement: false,\n\t\tHTMLPictureElement: false,\n\t\tHTMLPreElement: false,\n\t\tHTMLProgressElement: false,\n\t\tHTMLQuoteElement: false,\n\t\tHTMLScriptElement: false,\n\t\tHTMLSelectElement: false,\n\t\tHTMLShadowElement: false,\n\t\tHTMLSlotElement: false,\n\t\tHTMLSourceElement: false,\n\t\tHTMLSpanElement: false,\n\t\tHTMLStyleElement: false,\n\t\tHTMLTableCaptionElement: false,\n\t\tHTMLTableCellElement: false,\n\t\tHTMLTableColElement: false,\n\t\tHTMLTableElement: false,\n\t\tHTMLTableRowElement: false,\n\t\tHTMLTableSectionElement: false,\n\t\tHTMLTemplateElement: false,\n\t\tHTMLTextAreaElement: false,\n\t\tHTMLTimeElement: false,\n\t\tHTMLTitleElement: false,\n\t\tHTMLTrackElement: false,\n\t\tHTMLUListElement: false,\n\t\tHTMLUnknownElement: false,\n\t\tHTMLVideoElement: false,\n\t\tIDBCursor: false,\n\t\tIDBCursorWithValue: false,\n\t\tIDBDatabase: false,\n\t\tIDBFactory: false,\n\t\tIDBIndex: false,\n\t\tIDBKeyRange: false,\n\t\tIDBObjectStore: false,\n\t\tIDBOpenDBRequest: false,\n\t\tIDBRequest: false,\n\t\tIDBTransaction: false,\n\t\tIDBVersionChangeEvent: false,\n\t\tIdleDeadline: false,\n\t\tIIRFilterNode: false,\n\t\tImage: false,\n\t\tImageBitmap: false,\n\t\tImageBitmapRenderingContext: false,\n\t\tImageCapture: false,\n\t\tImageData: false,\n\t\tindexedDB: false,\n\t\tinnerHeight: false,\n\t\tinnerWidth: false,\n\t\tInputEvent: false,\n\t\tIntersectionObserver: false,\n\t\tIntersectionObserverEntry: false,\n\t\t\"Intl\": false,\n\t\tisSecureContext: false,\n\t\tKeyboardEvent: false,\n\t\tKeyframeEffect: false,\n\t\tKeyframeEffectReadOnly: false,\n\t\tlength: false,\n\t\tlocalStorage: false,\n\t\tlocation: true,\n\t\tLocation: false,\n\t\tlocationbar: false,\n\t\tmatchMedia: false,\n\t\tMediaDeviceInfo: false,\n\t\tMediaDevices: false,\n\t\tMediaElementAudioSourceNode: false,\n\t\tMediaEncryptedEvent: false,\n\t\tMediaError: false,\n\t\tMediaKeyMessageEvent: false,\n\t\tMediaKeySession: false,\n\t\tMediaKeyStatusMap: false,\n\t\tMediaKeySystemAccess: false,\n\t\tMediaList: false,\n\t\tMediaQueryList: false,\n\t\tMediaQueryListEvent: false,\n\t\tMediaRecorder: false,\n\t\tMediaSettingsRange: false,\n\t\tMediaSource: false,\n\t\tMediaStream: false,\n\t\tMediaStreamAudioDestinationNode: false,\n\t\tMediaStreamAudioSourceNode: false,\n\t\tMediaStreamEvent: false,\n\t\tMediaStreamTrack: false,\n\t\tMediaStreamTrackEvent: false,\n\t\tmenubar: false,\n\t\tMessageChannel: false,\n\t\tMessageEvent: false,\n\t\tMessagePort: false,\n\t\tMIDIAccess: false,\n\t\tMIDIConnectionEvent: false,\n\t\tMIDIInput: false,\n\t\tMIDIInputMap: false,\n\t\tMIDIMessageEvent: false,\n\t\tMIDIOutput: false,\n\t\tMIDIOutputMap: false,\n\t\tMIDIPort: false,\n\t\tMimeType: false,\n\t\tMimeTypeArray: false,\n\t\tMouseEvent: false,\n\t\tmoveBy: false,\n\t\tmoveTo: false,\n\t\tMutationEvent: false,\n\t\tMutationObserver: false,\n\t\tMutationRecord: false,\n\t\tname: false,\n\t\tNamedNodeMap: false,\n\t\tNavigationPreloadManager: false,\n\t\tnavigator: false,\n\t\tNavigator: false,\n\t\tNetworkInformation: false,\n\t\tNode: false,\n\t\tNodeFilter: false,\n\t\tNodeIterator: false,\n\t\tNodeList: false,\n\t\tNotification: false,\n\t\tOfflineAudioCompletionEvent: false,\n\t\tOfflineAudioContext: false,\n\t\toffscreenBuffering: false,\n\t\tOffscreenCanvas: true,\n\t\tonabort: true,\n\t\tonafterprint: true,\n\t\tonanimationend: true,\n\t\tonanimationiteration: true,\n\t\tonanimationstart: true,\n\t\tonappinstalled: true,\n\t\tonauxclick: true,\n\t\tonbeforeinstallprompt: true,\n\t\tonbeforeprint: true,\n\t\tonbeforeunload: true,\n\t\tonblur: true,\n\t\toncancel: true,\n\t\toncanplay: true,\n\t\toncanplaythrough: true,\n\t\tonchange: true,\n\t\tonclick: true,\n\t\tonclose: true,\n\t\toncontextmenu: true,\n\t\toncuechange: true,\n\t\tondblclick: true,\n\t\tondevicemotion: true,\n\t\tondeviceorientation: true,\n\t\tondeviceorientationabsolute: true,\n\t\tondrag: true,\n\t\tondragend: true,\n\t\tondragenter: true,\n\t\tondragleave: true,\n\t\tondragover: true,\n\t\tondragstart: true,\n\t\tondrop: true,\n\t\tondurationchange: true,\n\t\tonemptied: true,\n\t\tonended: true,\n\t\tonerror: true,\n\t\tonfocus: true,\n\t\tongotpointercapture: true,\n\t\tonhashchange: true,\n\t\toninput: true,\n\t\toninvalid: true,\n\t\tonkeydown: true,\n\t\tonkeypress: true,\n\t\tonkeyup: true,\n\t\tonlanguagechange: true,\n\t\tonload: true,\n\t\tonloadeddata: true,\n\t\tonloadedmetadata: true,\n\t\tonloadstart: true,\n\t\tonlostpointercapture: true,\n\t\tonmessage: true,\n\t\tonmessageerror: true,\n\t\tonmousedown: true,\n\t\tonmouseenter: true,\n\t\tonmouseleave: true,\n\t\tonmousemove: true,\n\t\tonmouseout: true,\n\t\tonmouseover: true,\n\t\tonmouseup: true,\n\t\tonmousewheel: true,\n\t\tonoffline: true,\n\t\tononline: true,\n\t\tonpagehide: true,\n\t\tonpageshow: true,\n\t\tonpause: true,\n\t\tonplay: true,\n\t\tonplaying: true,\n\t\tonpointercancel: true,\n\t\tonpointerdown: true,\n\t\tonpointerenter: true,\n\t\tonpointerleave: true,\n\t\tonpointermove: true,\n\t\tonpointerout: true,\n\t\tonpointerover: true,\n\t\tonpointerup: true,\n\t\tonpopstate: true,\n\t\tonprogress: true,\n\t\tonratechange: true,\n\t\tonrejectionhandled: true,\n\t\tonreset: true,\n\t\tonresize: true,\n\t\tonscroll: true,\n\t\tonsearch: true,\n\t\tonseeked: true,\n\t\tonseeking: true,\n\t\tonselect: true,\n\t\tonstalled: true,\n\t\tonstorage: true,\n\t\tonsubmit: true,\n\t\tonsuspend: true,\n\t\tontimeupdate: true,\n\t\tontoggle: true,\n\t\tontransitionend: true,\n\t\tonunhandledrejection: true,\n\t\tonunload: true,\n\t\tonvolumechange: true,\n\t\tonwaiting: true,\n\t\tonwheel: true,\n\t\topen: false,\n\t\topenDatabase: false,\n\t\topener: false,\n\t\tOption: false,\n\t\torigin: false,\n\t\tOscillatorNode: false,\n\t\touterHeight: false,\n\t\touterWidth: false,\n\t\tPageTransitionEvent: false,\n\t\tpageXOffset: false,\n\t\tpageYOffset: false,\n\t\tPannerNode: false,\n\t\tparent: false,\n\t\tPath2D: false,\n\t\tPaymentAddress: false,\n\t\tPaymentRequest: false,\n\t\tPaymentRequestUpdateEvent: false,\n\t\tPaymentResponse: false,\n\t\tperformance: false,\n\t\tPerformance: false,\n\t\tPerformanceEntry: false,\n\t\tPerformanceLongTaskTiming: false,\n\t\tPerformanceMark: false,\n\t\tPerformanceMeasure: false,\n\t\tPerformanceNavigation: false,\n\t\tPerformanceNavigationTiming: false,\n\t\tPerformanceObserver: false,\n\t\tPerformanceObserverEntryList: false,\n\t\tPerformancePaintTiming: false,\n\t\tPerformanceResourceTiming: false,\n\t\tPerformanceTiming: false,\n\t\tPeriodicWave: false,\n\t\tPermissions: false,\n\t\tPermissionStatus: false,\n\t\tpersonalbar: false,\n\t\tPhotoCapabilities: false,\n\t\tPlugin: false,\n\t\tPluginArray: false,\n\t\tPointerEvent: false,\n\t\tPopStateEvent: false,\n\t\tpostMessage: false,\n\t\tPresentation: false,\n\t\tPresentationAvailability: false,\n\t\tPresentationConnection: false,\n\t\tPresentationConnectionAvailableEvent: false,\n\t\tPresentationConnectionCloseEvent: false,\n\t\tPresentationConnectionList: false,\n\t\tPresentationReceiver: false,\n\t\tPresentationRequest: false,\n\t\tprint: false,\n\t\tProcessingInstruction: false,\n\t\tProgressEvent: false,\n\t\tPromiseRejectionEvent: false,\n\t\tprompt: false,\n\t\tPushManager: false,\n\t\tPushSubscription: false,\n\t\tPushSubscriptionOptions: false,\n\t\tqueueMicrotask: false,\n\t\tRadioNodeList: false,\n\t\tRange: false,\n\t\tReadableStream: false,\n\t\tregisterProcessor: false,\n\t\tRemotePlayback: false,\n\t\tremoveEventListener: false,\n\t\tRequest: false,\n\t\trequestAnimationFrame: false,\n\t\trequestIdleCallback: false,\n\t\tresizeBy: false,\n\t\tResizeObserver: false,\n\t\tResizeObserverEntry: false,\n\t\tresizeTo: false,\n\t\tResponse: false,\n\t\tRTCCertificate: false,\n\t\tRTCDataChannel: false,\n\t\tRTCDataChannelEvent: false,\n\t\tRTCDtlsTransport: false,\n\t\tRTCIceCandidate: false,\n\t\tRTCIceGatherer: false,\n\t\tRTCIceTransport: false,\n\t\tRTCPeerConnection: false,\n\t\tRTCPeerConnectionIceEvent: false,\n\t\tRTCRtpContributingSource: false,\n\t\tRTCRtpReceiver: false,\n\t\tRTCRtpSender: false,\n\t\tRTCSctpTransport: false,\n\t\tRTCSessionDescription: false,\n\t\tRTCStatsReport: false,\n\t\tRTCTrackEvent: false,\n\t\tscreen: false,\n\t\tScreen: false,\n\t\tscreenLeft: false,\n\t\tScreenOrientation: false,\n\t\tscreenTop: false,\n\t\tscreenX: false,\n\t\tscreenY: false,\n\t\tScriptProcessorNode: false,\n\t\tscroll: false,\n\t\tscrollbars: false,\n\t\tscrollBy: false,\n\t\tscrollTo: false,\n\t\tscrollX: false,\n\t\tscrollY: false,\n\t\tSecurityPolicyViolationEvent: false,\n\t\tSelection: false,\n\t\tself: false,\n\t\tServiceWorker: false,\n\t\tServiceWorkerContainer: false,\n\t\tServiceWorkerRegistration: false,\n\t\tsessionStorage: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tShadowRoot: false,\n\t\tSharedWorker: false,\n\t\tSourceBuffer: false,\n\t\tSourceBufferList: false,\n\t\tspeechSynthesis: false,\n\t\tSpeechSynthesisEvent: false,\n\t\tSpeechSynthesisUtterance: false,\n\t\tStaticRange: false,\n\t\tstatus: false,\n\t\tstatusbar: false,\n\t\tStereoPannerNode: false,\n\t\tstop: false,\n\t\tStorage: false,\n\t\tStorageEvent: false,\n\t\tStorageManager: false,\n\t\tstyleMedia: false,\n\t\tStyleSheet: false,\n\t\tStyleSheetList: false,\n\t\tSubtleCrypto: false,\n\t\tSVGAElement: false,\n\t\tSVGAngle: false,\n\t\tSVGAnimatedAngle: false,\n\t\tSVGAnimatedBoolean: false,\n\t\tSVGAnimatedEnumeration: false,\n\t\tSVGAnimatedInteger: false,\n\t\tSVGAnimatedLength: false,\n\t\tSVGAnimatedLengthList: false,\n\t\tSVGAnimatedNumber: false,\n\t\tSVGAnimatedNumberList: false,\n\t\tSVGAnimatedPreserveAspectRatio: false,\n\t\tSVGAnimatedRect: false,\n\t\tSVGAnimatedString: false,\n\t\tSVGAnimatedTransformList: false,\n\t\tSVGAnimateElement: false,\n\t\tSVGAnimateMotionElement: false,\n\t\tSVGAnimateTransformElement: false,\n\t\tSVGAnimationElement: false,\n\t\tSVGCircleElement: false,\n\t\tSVGClipPathElement: false,\n\t\tSVGComponentTransferFunctionElement: false,\n\t\tSVGDefsElement: false,\n\t\tSVGDescElement: false,\n\t\tSVGDiscardElement: false,\n\t\tSVGElement: false,\n\t\tSVGEllipseElement: false,\n\t\tSVGFEBlendElement: false,\n\t\tSVGFEColorMatrixElement: false,\n\t\tSVGFEComponentTransferElement: false,\n\t\tSVGFECompositeElement: false,\n\t\tSVGFEConvolveMatrixElement: false,\n\t\tSVGFEDiffuseLightingElement: false,\n\t\tSVGFEDisplacementMapElement: false,\n\t\tSVGFEDistantLightElement: false,\n\t\tSVGFEDropShadowElement: false,\n\t\tSVGFEFloodElement: false,\n\t\tSVGFEFuncAElement: false,\n\t\tSVGFEFuncBElement: false,\n\t\tSVGFEFuncGElement: false,\n\t\tSVGFEFuncRElement: false,\n\t\tSVGFEGaussianBlurElement: false,\n\t\tSVGFEImageElement: false,\n\t\tSVGFEMergeElement: false,\n\t\tSVGFEMergeNodeElement: false,\n\t\tSVGFEMorphologyElement: false,\n\t\tSVGFEOffsetElement: false,\n\t\tSVGFEPointLightElement: false,\n\t\tSVGFESpecularLightingElement: false,\n\t\tSVGFESpotLightElement: false,\n\t\tSVGFETileElement: false,\n\t\tSVGFETurbulenceElement: false,\n\t\tSVGFilterElement: false,\n\t\tSVGForeignObjectElement: false,\n\t\tSVGGElement: false,\n\t\tSVGGeometryElement: false,\n\t\tSVGGradientElement: false,\n\t\tSVGGraphicsElement: false,\n\t\tSVGImageElement: false,\n\t\tSVGLength: false,\n\t\tSVGLengthList: false,\n\t\tSVGLinearGradientElement: false,\n\t\tSVGLineElement: false,\n\t\tSVGMarkerElement: false,\n\t\tSVGMaskElement: false,\n\t\tSVGMatrix: false,\n\t\tSVGMetadataElement: false,\n\t\tSVGMPathElement: false,\n\t\tSVGNumber: false,\n\t\tSVGNumberList: false,\n\t\tSVGPathElement: false,\n\t\tSVGPatternElement: false,\n\t\tSVGPoint: false,\n\t\tSVGPointList: false,\n\t\tSVGPolygonElement: false,\n\t\tSVGPolylineElement: false,\n\t\tSVGPreserveAspectRatio: false,\n\t\tSVGRadialGradientElement: false,\n\t\tSVGRect: false,\n\t\tSVGRectElement: false,\n\t\tSVGScriptElement: false,\n\t\tSVGSetElement: false,\n\t\tSVGStopElement: false,\n\t\tSVGStringList: false,\n\t\tSVGStyleElement: false,\n\t\tSVGSVGElement: false,\n\t\tSVGSwitchElement: false,\n\t\tSVGSymbolElement: false,\n\t\tSVGTextContentElement: false,\n\t\tSVGTextElement: false,\n\t\tSVGTextPathElement: false,\n\t\tSVGTextPositioningElement: false,\n\t\tSVGTitleElement: false,\n\t\tSVGTransform: false,\n\t\tSVGTransformList: false,\n\t\tSVGTSpanElement: false,\n\t\tSVGUnitTypes: false,\n\t\tSVGUseElement: false,\n\t\tSVGViewElement: false,\n\t\tTaskAttributionTiming: false,\n\t\tText: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tTextEvent: false,\n\t\tTextMetrics: false,\n\t\tTextTrack: false,\n\t\tTextTrackCue: false,\n\t\tTextTrackCueList: false,\n\t\tTextTrackList: false,\n\t\tTimeRanges: false,\n\t\ttoolbar: false,\n\t\ttop: false,\n\t\tTouch: false,\n\t\tTouchEvent: false,\n\t\tTouchList: false,\n\t\tTrackEvent: false,\n\t\tTransitionEvent: false,\n\t\tTreeWalker: false,\n\t\tUIEvent: false,\n\t\tURL: false,\n\t\tURLSearchParams: false,\n\t\tValidityState: false,\n\t\tvisualViewport: false,\n\t\tVisualViewport: false,\n\t\tVTTCue: false,\n\t\tWaveShaperNode: false,\n\t\tWebAssembly: false,\n\t\tWebGL2RenderingContext: false,\n\t\tWebGLActiveInfo: false,\n\t\tWebGLBuffer: false,\n\t\tWebGLContextEvent: false,\n\t\tWebGLFramebuffer: false,\n\t\tWebGLProgram: false,\n\t\tWebGLQuery: false,\n\t\tWebGLRenderbuffer: false,\n\t\tWebGLRenderingContext: false,\n\t\tWebGLSampler: false,\n\t\tWebGLShader: false,\n\t\tWebGLShaderPrecisionFormat: false,\n\t\tWebGLSync: false,\n\t\tWebGLTexture: false,\n\t\tWebGLTransformFeedback: false,\n\t\tWebGLUniformLocation: false,\n\t\tWebGLVertexArrayObject: false,\n\t\tWebSocket: false,\n\t\tWheelEvent: false,\n\t\twindow: false,\n\t\tWindow: false,\n\t\tWorker: false,\n\t\tWritableStream: false,\n\t\tXMLDocument: false,\n\t\tXMLHttpRequest: false,\n\t\tXMLHttpRequestEventTarget: false,\n\t\tXMLHttpRequestUpload: false,\n\t\tXMLSerializer: false,\n\t\tXPathEvaluator: false,\n\t\tXPathExpression: false,\n\t\tXPathResult: false,\n\t\tXSLTProcessor: false\n\t};\n\tvar worker = {\n\t\taddEventListener: false,\n\t\tapplicationCache: false,\n\t\tatob: false,\n\t\tBlob: false,\n\t\tBroadcastChannel: false,\n\t\tbtoa: false,\n\t\tCache: false,\n\t\tcaches: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tclose: true,\n\t\tconsole: false,\n\t\tfetch: false,\n\t\tFileReaderSync: false,\n\t\tFormData: false,\n\t\tHeaders: false,\n\t\tIDBCursor: false,\n\t\tIDBCursorWithValue: false,\n\t\tIDBDatabase: false,\n\t\tIDBFactory: false,\n\t\tIDBIndex: false,\n\t\tIDBKeyRange: false,\n\t\tIDBObjectStore: false,\n\t\tIDBOpenDBRequest: false,\n\t\tIDBRequest: false,\n\t\tIDBTransaction: false,\n\t\tIDBVersionChangeEvent: false,\n\t\tImageData: false,\n\t\timportScripts: true,\n\t\tindexedDB: false,\n\t\tlocation: false,\n\t\tMessageChannel: false,\n\t\tMessagePort: false,\n\t\tname: false,\n\t\tnavigator: false,\n\t\tNotification: false,\n\t\tonclose: true,\n\t\tonconnect: true,\n\t\tonerror: true,\n\t\tonlanguagechange: true,\n\t\tonmessage: true,\n\t\tonoffline: true,\n\t\tononline: true,\n\t\tonrejectionhandled: true,\n\t\tonunhandledrejection: true,\n\t\tperformance: false,\n\t\tPerformance: false,\n\t\tPerformanceEntry: false,\n\t\tPerformanceMark: false,\n\t\tPerformanceMeasure: false,\n\t\tPerformanceNavigation: false,\n\t\tPerformanceResourceTiming: false,\n\t\tPerformanceTiming: false,\n\t\tpostMessage: true,\n\t\t\"Promise\": false,\n\t\tqueueMicrotask: false,\n\t\tremoveEventListener: false,\n\t\tRequest: false,\n\t\tResponse: false,\n\t\tself: true,\n\t\tServiceWorkerRegistration: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tURL: false,\n\t\tURLSearchParams: false,\n\t\tWebSocket: false,\n\t\tWorker: false,\n\t\tWorkerGlobalScope: false,\n\t\tXMLHttpRequest: false\n\t};\n\tvar node = {\n\t\t__dirname: false,\n\t\t__filename: false,\n\t\tBuffer: false,\n\t\tclearImmediate: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tconsole: false,\n\t\texports: true,\n\t\tglobal: false,\n\t\t\"Intl\": false,\n\t\tmodule: false,\n\t\tprocess: false,\n\t\tqueueMicrotask: false,\n\t\trequire: false,\n\t\tsetImmediate: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tURL: false,\n\t\tURLSearchParams: false\n\t};\n\tvar commonjs = {\n\t\texports: true,\n\t\tglobal: false,\n\t\tmodule: false,\n\t\trequire: false\n\t};\n\tvar amd = {\n\t\tdefine: false,\n\t\trequire: false\n\t};\n\tvar mocha = {\n\t\tafter: false,\n\t\tafterEach: false,\n\t\tbefore: false,\n\t\tbeforeEach: false,\n\t\tcontext: false,\n\t\tdescribe: false,\n\t\tit: false,\n\t\tmocha: false,\n\t\trun: false,\n\t\tsetup: false,\n\t\tspecify: false,\n\t\tsuite: false,\n\t\tsuiteSetup: false,\n\t\tsuiteTeardown: false,\n\t\tteardown: false,\n\t\ttest: false,\n\t\txcontext: false,\n\t\txdescribe: false,\n\t\txit: false,\n\t\txspecify: false\n\t};\n\tvar jasmine = {\n\t\tafterAll: false,\n\t\tafterEach: false,\n\t\tbeforeAll: false,\n\t\tbeforeEach: false,\n\t\tdescribe: false,\n\t\texpect: false,\n\t\tfail: false,\n\t\tfdescribe: false,\n\t\tfit: false,\n\t\tit: false,\n\t\tjasmine: false,\n\t\tpending: false,\n\t\truns: false,\n\t\tspyOn: false,\n\t\tspyOnProperty: false,\n\t\twaits: false,\n\t\twaitsFor: false,\n\t\txdescribe: false,\n\t\txit: false\n\t};\n\tvar jest = {\n\t\tafterAll: false,\n\t\tafterEach: false,\n\t\tbeforeAll: false,\n\t\tbeforeEach: false,\n\t\tdescribe: false,\n\t\texpect: false,\n\t\tfdescribe: false,\n\t\tfit: false,\n\t\tit: false,\n\t\tjest: false,\n\t\tpit: false,\n\t\trequire: false,\n\t\ttest: false,\n\t\txdescribe: false,\n\t\txit: false,\n\t\txtest: false\n\t};\n\tvar qunit = {\n\t\tasyncTest: false,\n\t\tdeepEqual: false,\n\t\tequal: false,\n\t\texpect: false,\n\t\tmodule: false,\n\t\tnotDeepEqual: false,\n\t\tnotEqual: false,\n\t\tnotOk: false,\n\t\tnotPropEqual: false,\n\t\tnotStrictEqual: false,\n\t\tok: false,\n\t\tpropEqual: false,\n\t\tQUnit: false,\n\t\traises: false,\n\t\tstart: false,\n\t\tstop: false,\n\t\tstrictEqual: false,\n\t\ttest: false,\n\t\tthrows: false\n\t};\n\tvar phantomjs = {\n\t\tconsole: true,\n\t\texports: true,\n\t\tphantom: true,\n\t\trequire: true,\n\t\tWebPage: true\n\t};\n\tvar couch = {\n\t\temit: false,\n\t\texports: false,\n\t\tgetRow: false,\n\t\tlog: false,\n\t\tmodule: false,\n\t\tprovides: false,\n\t\trequire: false,\n\t\trespond: false,\n\t\tsend: false,\n\t\tstart: false,\n\t\tsum: false\n\t};\n\tvar rhino = {\n\t\tdefineClass: false,\n\t\tdeserialize: false,\n\t\tgc: false,\n\t\thelp: false,\n\t\timportClass: false,\n\t\timportPackage: false,\n\t\tjava: false,\n\t\tload: false,\n\t\tloadClass: false,\n\t\tPackages: false,\n\t\tprint: false,\n\t\tquit: false,\n\t\treadFile: false,\n\t\treadUrl: false,\n\t\trunCommand: false,\n\t\tseal: false,\n\t\tserialize: false,\n\t\tspawn: false,\n\t\tsync: false,\n\t\ttoint32: false,\n\t\tversion: false\n\t};\n\tvar nashorn = {\n\t\t__DIR__: false,\n\t\t__FILE__: false,\n\t\t__LINE__: false,\n\t\tcom: false,\n\t\tedu: false,\n\t\texit: false,\n\t\tjava: false,\n\t\tJava: false,\n\t\tjavafx: false,\n\t\tJavaImporter: false,\n\t\tjavax: false,\n\t\tJSAdapter: false,\n\t\tload: false,\n\t\tloadWithNewGlobal: false,\n\t\torg: false,\n\t\tPackages: false,\n\t\tprint: false,\n\t\tquit: false\n\t};\n\tvar wsh = {\n\t\tActiveXObject: true,\n\t\tEnumerator: true,\n\t\tGetObject: true,\n\t\tScriptEngine: true,\n\t\tScriptEngineBuildVersion: true,\n\t\tScriptEngineMajorVersion: true,\n\t\tScriptEngineMinorVersion: true,\n\t\tVBArray: true,\n\t\tWScript: true,\n\t\tWSH: true,\n\t\tXDomainRequest: true\n\t};\n\tvar jquery = {\n\t\t$: false,\n\t\tjQuery: false\n\t};\n\tvar yui = {\n\t\tYAHOO: false,\n\t\tYAHOO_config: false,\n\t\tYUI: false,\n\t\tYUI_config: false\n\t};\n\tvar shelljs = {\n\t\tcat: false,\n\t\tcd: false,\n\t\tchmod: false,\n\t\tconfig: false,\n\t\tcp: false,\n\t\tdirs: false,\n\t\techo: false,\n\t\tenv: false,\n\t\terror: false,\n\t\texec: false,\n\t\texit: false,\n\t\tfind: false,\n\t\tgrep: false,\n\t\tln: false,\n\t\tls: false,\n\t\tmkdir: false,\n\t\tmv: false,\n\t\tpopd: false,\n\t\tpushd: false,\n\t\tpwd: false,\n\t\trm: false,\n\t\tsed: false,\n\t\tset: false,\n\t\ttarget: false,\n\t\ttempdir: false,\n\t\ttest: false,\n\t\ttouch: false,\n\t\twhich: false\n\t};\n\tvar prototypejs = {\n\t\t$: false,\n\t\t$$: false,\n\t\t$A: false,\n\t\t$break: false,\n\t\t$continue: false,\n\t\t$F: false,\n\t\t$H: false,\n\t\t$R: false,\n\t\t$w: false,\n\t\tAbstract: false,\n\t\tAjax: false,\n\t\tAutocompleter: false,\n\t\tBuilder: false,\n\t\tClass: false,\n\t\tControl: false,\n\t\tDraggable: false,\n\t\tDraggables: false,\n\t\tDroppables: false,\n\t\tEffect: false,\n\t\tElement: false,\n\t\tEnumerable: false,\n\t\tEvent: false,\n\t\tField: false,\n\t\tForm: false,\n\t\tHash: false,\n\t\tInsertion: false,\n\t\tObjectRange: false,\n\t\tPeriodicalExecuter: false,\n\t\tPosition: false,\n\t\tPrototype: false,\n\t\tScriptaculous: false,\n\t\tSelector: false,\n\t\tSortable: false,\n\t\tSortableObserver: false,\n\t\tSound: false,\n\t\tTemplate: false,\n\t\tToggle: false,\n\t\tTry: false\n\t};\n\tvar meteor = {\n\t\t_: false,\n\t\t$: false,\n\t\tAccounts: false,\n\t\tAccountsClient: false,\n\t\tAccountsCommon: false,\n\t\tAccountsServer: false,\n\t\tApp: false,\n\t\tAssets: false,\n\t\tBlaze: false,\n\t\tcheck: false,\n\t\tCordova: false,\n\t\tDDP: false,\n\t\tDDPRateLimiter: false,\n\t\tDDPServer: false,\n\t\tDeps: false,\n\t\tEJSON: false,\n\t\tEmail: false,\n\t\tHTTP: false,\n\t\tLog: false,\n\t\tMatch: false,\n\t\tMeteor: false,\n\t\tMongo: false,\n\t\tMongoInternals: false,\n\t\tNpm: false,\n\t\tPackage: false,\n\t\tPlugin: false,\n\t\tprocess: false,\n\t\tRandom: false,\n\t\tReactiveDict: false,\n\t\tReactiveVar: false,\n\t\tRouter: false,\n\t\tServiceConfiguration: false,\n\t\tSession: false,\n\t\tshare: false,\n\t\tSpacebars: false,\n\t\tTemplate: false,\n\t\tTinytest: false,\n\t\tTracker: false,\n\t\tUI: false,\n\t\tUtils: false,\n\t\tWebApp: false,\n\t\tWebAppInternals: false\n\t};\n\tvar mongo = {\n\t\t_isWindows: false,\n\t\t_rand: false,\n\t\tBulkWriteResult: false,\n\t\tcat: false,\n\t\tcd: false,\n\t\tconnect: false,\n\t\tdb: false,\n\t\tgetHostName: false,\n\t\tgetMemInfo: false,\n\t\thostname: false,\n\t\tISODate: false,\n\t\tlistFiles: false,\n\t\tload: false,\n\t\tls: false,\n\t\tmd5sumFile: false,\n\t\tmkdir: false,\n\t\tMongo: false,\n\t\tNumberInt: false,\n\t\tNumberLong: false,\n\t\tObjectId: false,\n\t\tPlanCache: false,\n\t\tprint: false,\n\t\tprintjson: false,\n\t\tpwd: false,\n\t\tquit: false,\n\t\tremoveFile: false,\n\t\trs: false,\n\t\tsh: false,\n\t\tUUID: false,\n\t\tversion: false,\n\t\tWriteResult: false\n\t};\n\tvar applescript = {\n\t\t$: false,\n\t\tApplication: false,\n\t\tAutomation: false,\n\t\tconsole: false,\n\t\tdelay: false,\n\t\tLibrary: false,\n\t\tObjC: false,\n\t\tObjectSpecifier: false,\n\t\tPath: false,\n\t\tProgress: false,\n\t\tRef: false\n\t};\n\tvar serviceworker = {\n\t\taddEventListener: false,\n\t\tapplicationCache: false,\n\t\tatob: false,\n\t\tBlob: false,\n\t\tBroadcastChannel: false,\n\t\tbtoa: false,\n\t\tCache: false,\n\t\tcaches: false,\n\t\tCacheStorage: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tClient: false,\n\t\tclients: false,\n\t\tClients: false,\n\t\tclose: true,\n\t\tconsole: false,\n\t\tExtendableEvent: false,\n\t\tExtendableMessageEvent: false,\n\t\tfetch: false,\n\t\tFetchEvent: false,\n\t\tFileReaderSync: false,\n\t\tFormData: false,\n\t\tHeaders: false,\n\t\tIDBCursor: false,\n\t\tIDBCursorWithValue: false,\n\t\tIDBDatabase: false,\n\t\tIDBFactory: false,\n\t\tIDBIndex: false,\n\t\tIDBKeyRange: false,\n\t\tIDBObjectStore: false,\n\t\tIDBOpenDBRequest: false,\n\t\tIDBRequest: false,\n\t\tIDBTransaction: false,\n\t\tIDBVersionChangeEvent: false,\n\t\tImageData: false,\n\t\timportScripts: false,\n\t\tindexedDB: false,\n\t\tlocation: false,\n\t\tMessageChannel: false,\n\t\tMessagePort: false,\n\t\tname: false,\n\t\tnavigator: false,\n\t\tNotification: false,\n\t\tonclose: true,\n\t\tonconnect: true,\n\t\tonerror: true,\n\t\tonfetch: true,\n\t\toninstall: true,\n\t\tonlanguagechange: true,\n\t\tonmessage: true,\n\t\tonmessageerror: true,\n\t\tonnotificationclick: true,\n\t\tonnotificationclose: true,\n\t\tonoffline: true,\n\t\tononline: true,\n\t\tonpush: true,\n\t\tonpushsubscriptionchange: true,\n\t\tonrejectionhandled: true,\n\t\tonsync: true,\n\t\tonunhandledrejection: true,\n\t\tperformance: false,\n\t\tPerformance: false,\n\t\tPerformanceEntry: false,\n\t\tPerformanceMark: false,\n\t\tPerformanceMeasure: false,\n\t\tPerformanceNavigation: false,\n\t\tPerformanceResourceTiming: false,\n\t\tPerformanceTiming: false,\n\t\tpostMessage: true,\n\t\t\"Promise\": false,\n\t\tqueueMicrotask: false,\n\t\tregistration: false,\n\t\tremoveEventListener: false,\n\t\tRequest: false,\n\t\tResponse: false,\n\t\tself: false,\n\t\tServiceWorker: false,\n\t\tServiceWorkerContainer: false,\n\t\tServiceWorkerGlobalScope: false,\n\t\tServiceWorkerMessageEvent: false,\n\t\tServiceWorkerRegistration: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tskipWaiting: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tURL: false,\n\t\tURLSearchParams: false,\n\t\tWebSocket: false,\n\t\tWindowClient: false,\n\t\tWorker: false,\n\t\tWorkerGlobalScope: false,\n\t\tXMLHttpRequest: false\n\t};\n\tvar atomtest = {\n\t\tadvanceClock: false,\n\t\tfakeClearInterval: false,\n\t\tfakeClearTimeout: false,\n\t\tfakeSetInterval: false,\n\t\tfakeSetTimeout: false,\n\t\tresetTimeouts: false,\n\t\twaitsForPromise: false\n\t};\n\tvar embertest = {\n\t\tandThen: false,\n\t\tclick: false,\n\t\tcurrentPath: false,\n\t\tcurrentRouteName: false,\n\t\tcurrentURL: false,\n\t\tfillIn: false,\n\t\tfind: false,\n\t\tfindAll: false,\n\t\tfindWithAssert: false,\n\t\tkeyEvent: false,\n\t\tpauseTest: false,\n\t\tresumeTest: false,\n\t\ttriggerEvent: false,\n\t\tvisit: false,\n\t\twait: false\n\t};\n\tvar protractor = {\n\t\t$: false,\n\t\t$$: false,\n\t\tbrowser: false,\n\t\tby: false,\n\t\tBy: false,\n\t\tDartObject: false,\n\t\telement: false,\n\t\tprotractor: false\n\t};\n\tvar webextensions = {\n\t\tbrowser: false,\n\t\tchrome: false,\n\t\topr: false\n\t};\n\tvar greasemonkey = {\n\t\tcloneInto: false,\n\t\tcreateObjectIn: false,\n\t\texportFunction: false,\n\t\tGM: false,\n\t\tGM_addStyle: false,\n\t\tGM_deleteValue: false,\n\t\tGM_getResourceText: false,\n\t\tGM_getResourceURL: false,\n\t\tGM_getValue: false,\n\t\tGM_info: false,\n\t\tGM_listValues: false,\n\t\tGM_log: false,\n\t\tGM_openInTab: false,\n\t\tGM_registerMenuCommand: false,\n\t\tGM_setClipboard: false,\n\t\tGM_setValue: false,\n\t\tGM_xmlhttpRequest: false,\n\t\tunsafeWindow: false\n\t};\n\tvar devtools = {\n\t\t$: false,\n\t\t$_: false,\n\t\t$$: false,\n\t\t$0: false,\n\t\t$1: false,\n\t\t$2: false,\n\t\t$3: false,\n\t\t$4: false,\n\t\t$x: false,\n\t\tchrome: false,\n\t\tclear: false,\n\t\tcopy: false,\n\t\tdebug: false,\n\t\tdir: false,\n\t\tdirxml: false,\n\t\tgetEventListeners: false,\n\t\tinspect: false,\n\t\tkeys: false,\n\t\tmonitor: false,\n\t\tmonitorEvents: false,\n\t\tprofile: false,\n\t\tprofileEnd: false,\n\t\tqueryObjects: false,\n\t\ttable: false,\n\t\tundebug: false,\n\t\tunmonitor: false,\n\t\tunmonitorEvents: false,\n\t\tvalues: false\n\t};\n\tvar require$$0$7 = {\n\t\tbuiltin: builtin,\n\t\tes5: es5,\n\t\tes2015: es2015,\n\t\tes2017: es2017,\n\t\tbrowser: browser$2,\n\t\tworker: worker,\n\t\tnode: node,\n\t\tcommonjs: commonjs,\n\t\tamd: amd,\n\t\tmocha: mocha,\n\t\tjasmine: jasmine,\n\t\tjest: jest,\n\t\tqunit: qunit,\n\t\tphantomjs: phantomjs,\n\t\tcouch: couch,\n\t\trhino: rhino,\n\t\tnashorn: nashorn,\n\t\twsh: wsh,\n\t\tjquery: jquery,\n\t\tyui: yui,\n\t\tshelljs: shelljs,\n\t\tprototypejs: prototypejs,\n\t\tmeteor: meteor,\n\t\tmongo: mongo,\n\t\tapplescript: applescript,\n\t\tserviceworker: serviceworker,\n\t\tatomtest: atomtest,\n\t\tembertest: embertest,\n\t\tprotractor: protractor,\n\t\t\"shared-node-browser\": {\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tconsole: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tURL: false,\n\t\tURLSearchParams: false\n\t},\n\t\twebextensions: webextensions,\n\t\tgreasemonkey: greasemonkey,\n\t\tdevtools: devtools\n\t};\n\n\tvar globalsBABEL_8_BREAKINGFalse = require$$0$7;\n\n\tvar globals = globalsBABEL_8_BREAKINGFalse;\n\n\tvar path$3 = new WeakMap();\n\tvar scope = new WeakMap();\n\tfunction clear() {\n\t clearPath();\n\t clearScope();\n\t}\n\tfunction clearPath() {\n\t path$3 = new WeakMap();\n\t}\n\tfunction clearScope() {\n\t scope = new WeakMap();\n\t}\n\n\tvar cache$2 = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tget path () { return path$3; },\n\t\tget scope () { return scope; },\n\t\tclear: clear,\n\t\tclearPath: clearPath,\n\t\tclearScope: clearScope\n\t});\n\n\tvar NOT_LOCAL_BINDING$1 = NOT_LOCAL_BINDING$2,\n\t callExpression$d = callExpression$e,\n\t cloneNode$g = cloneNode$i,\n\t getBindingIdentifiers$1 = getBindingIdentifiers$2,\n\t identifier$h = identifier$j,\n\t isArrayExpression$1 = isArrayExpression$2,\n\t isBinary$2 = isBinary$3,\n\t isClass = isClass$1,\n\t isClassBody = isClassBody$1,\n\t isClassDeclaration$2 = isClassDeclaration$3,\n\t isExportAllDeclaration = isExportAllDeclaration$1,\n\t isExportDefaultDeclaration$2 = isExportDefaultDeclaration$3,\n\t isExportNamedDeclaration$1 = isExportNamedDeclaration$2,\n\t isFunctionDeclaration = isFunctionDeclaration$1,\n\t isIdentifier$e = isIdentifier$g,\n\t isImportDeclaration = isImportDeclaration$2,\n\t isLiteral$6 = isLiteral$7,\n\t isMethod = isMethod$1,\n\t isModuleDeclaration = isModuleDeclaration$1,\n\t isModuleSpecifier = isModuleSpecifier$1,\n\t isObjectExpression$2 = isObjectExpression$3,\n\t isProperty$1 = isProperty$2,\n\t isPureish$1 = isPureish$2,\n\t isSuper$1 = isSuper$2,\n\t isTaggedTemplateExpression$1 = isTaggedTemplateExpression$2,\n\t isTemplateLiteral$1 = isTemplateLiteral$2,\n\t isThisExpression$1 = isThisExpression$2,\n\t isUnaryExpression = isUnaryExpression$1,\n\t isVariableDeclaration$1 = isVariableDeclaration$3,\n\t matchesPattern$1 = matchesPattern$2,\n\t memberExpression$a = memberExpression$b,\n\t numericLiteral$7 = numericLiteral$8,\n\t toIdentifier = toIdentifier$1,\n\t unaryExpression$6 = unaryExpression$7,\n\t variableDeclaration$6 = variableDeclaration$8,\n\t variableDeclarator$6 = variableDeclarator$8;\n\n\tfunction gatherNodeParts(node, parts) {\n\t switch (node == null ? void 0 : node.type) {\n\t default:\n\t if (isModuleDeclaration(node)) {\n\t if ((isExportAllDeclaration(node) || isExportNamedDeclaration$1(node) || isImportDeclaration(node)) && node.source) {\n\t gatherNodeParts(node.source, parts);\n\t } else if ((isExportNamedDeclaration$1(node) || isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(node.specifiers), _step; !(_step = _iterator()).done;) {\n\t var e = _step.value;\n\t gatherNodeParts(e, parts);\n\t }\n\t } else if ((isExportDefaultDeclaration$2(node) || isExportNamedDeclaration$1(node)) && node.declaration) {\n\t gatherNodeParts(node.declaration, parts);\n\t }\n\t } else if (isModuleSpecifier(node)) {\n\t gatherNodeParts(node.local, parts);\n\t } else if (isLiteral$6(node)) {\n\t parts.push(node.value);\n\t }\n\n\t break;\n\n\t case \"MemberExpression\":\n\t case \"OptionalMemberExpression\":\n\t case \"JSXMemberExpression\":\n\t gatherNodeParts(node.object, parts);\n\t gatherNodeParts(node.property, parts);\n\t break;\n\n\t case \"Identifier\":\n\t case \"JSXIdentifier\":\n\t parts.push(node.name);\n\t break;\n\n\t case \"CallExpression\":\n\t case \"OptionalCallExpression\":\n\t case \"NewExpression\":\n\t gatherNodeParts(node.callee, parts);\n\t break;\n\n\t case \"ObjectExpression\":\n\t case \"ObjectPattern\":\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(node.properties), _step2; !(_step2 = _iterator2()).done;) {\n\t var _e = _step2.value;\n\t gatherNodeParts(_e, parts);\n\t }\n\n\t break;\n\n\t case \"SpreadElement\":\n\t case \"RestElement\":\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"ObjectProperty\":\n\t case \"ObjectMethod\":\n\t case \"ClassProperty\":\n\t case \"ClassMethod\":\n\t case \"ClassPrivateProperty\":\n\t case \"ClassPrivateMethod\":\n\t gatherNodeParts(node.key, parts);\n\t break;\n\n\t case \"ThisExpression\":\n\t parts.push(\"this\");\n\t break;\n\n\t case \"Super\":\n\t parts.push(\"super\");\n\t break;\n\n\t case \"Import\":\n\t parts.push(\"import\");\n\t break;\n\n\t case \"DoExpression\":\n\t parts.push(\"do\");\n\t break;\n\n\t case \"YieldExpression\":\n\t parts.push(\"yield\");\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"AwaitExpression\":\n\t parts.push(\"await\");\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"AssignmentExpression\":\n\t gatherNodeParts(node.left, parts);\n\t break;\n\n\t case \"VariableDeclarator\":\n\t gatherNodeParts(node.id, parts);\n\t break;\n\n\t case \"FunctionExpression\":\n\t case \"FunctionDeclaration\":\n\t case \"ClassExpression\":\n\t case \"ClassDeclaration\":\n\t gatherNodeParts(node.id, parts);\n\t break;\n\n\t case \"PrivateName\":\n\t gatherNodeParts(node.id, parts);\n\t break;\n\n\t case \"ParenthesizedExpression\":\n\t gatherNodeParts(node.expression, parts);\n\t break;\n\n\t case \"UnaryExpression\":\n\t case \"UpdateExpression\":\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"MetaProperty\":\n\t gatherNodeParts(node.meta, parts);\n\t gatherNodeParts(node.property, parts);\n\t break;\n\n\t case \"JSXElement\":\n\t gatherNodeParts(node.openingElement, parts);\n\t break;\n\n\t case \"JSXOpeningElement\":\n\t parts.push(node.name);\n\t break;\n\n\t case \"JSXFragment\":\n\t gatherNodeParts(node.openingFragment, parts);\n\t break;\n\n\t case \"JSXOpeningFragment\":\n\t parts.push(\"Fragment\");\n\t break;\n\n\t case \"JSXNamespacedName\":\n\t gatherNodeParts(node.namespace, parts);\n\t gatherNodeParts(node.name, parts);\n\t break;\n\t }\n\t}\n\n\tvar collectorVisitor = {\n\t ForStatement: function ForStatement(path) {\n\t var declar = path.get(\"init\");\n\n\t if (declar.isVar()) {\n\t var scope = path.scope;\n\t var parentScope = scope.getFunctionParent() || scope.getProgramParent();\n\t parentScope.registerBinding(\"var\", declar);\n\t }\n\t },\n\t Declaration: function Declaration(path) {\n\t if (path.isBlockScoped()) return;\n\t if (path.isImportDeclaration()) return;\n\t if (path.isExportDeclaration()) return;\n\t var parent = path.scope.getFunctionParent() || path.scope.getProgramParent();\n\t parent.registerDeclaration(path);\n\t },\n\t ImportDeclaration: function ImportDeclaration(path) {\n\t var parent = path.scope.getBlockParent();\n\t parent.registerDeclaration(path);\n\t },\n\t ReferencedIdentifier: function ReferencedIdentifier(path, state) {\n\t state.references.push(path);\n\t },\n\t ForXStatement: function ForXStatement(path, state) {\n\t var left = path.get(\"left\");\n\n\t if (left.isPattern() || left.isIdentifier()) {\n\t state.constantViolations.push(path);\n\t } else if (left.isVar()) {\n\t var scope = path.scope;\n\t var parentScope = scope.getFunctionParent() || scope.getProgramParent();\n\t parentScope.registerBinding(\"var\", left);\n\t }\n\t },\n\t ExportDeclaration: {\n\t exit: function exit(path) {\n\t var node = path.node,\n\t scope = path.scope;\n\t if (isExportAllDeclaration(node)) return;\n\t var declar = node.declaration;\n\n\t if (isClassDeclaration$2(declar) || isFunctionDeclaration(declar)) {\n\t var id = declar.id;\n\t if (!id) return;\n\t var binding = scope.getBinding(id.name);\n\t binding == null ? void 0 : binding.reference(path);\n\t } else if (isVariableDeclaration$1(declar)) {\n\t for (var _iterator3 = _createForOfIteratorHelperLoose(declar.declarations), _step3; !(_step3 = _iterator3()).done;) {\n\t var decl = _step3.value;\n\n\t for (var _i = 0, _Object$keys = Object.keys(getBindingIdentifiers$1(decl)); _i < _Object$keys.length; _i++) {\n\t var _name = _Object$keys[_i];\n\n\t var _binding = scope.getBinding(_name);\n\n\t _binding == null ? void 0 : _binding.reference(path);\n\t }\n\t }\n\t }\n\t }\n\t },\n\t LabeledStatement: function LabeledStatement(path) {\n\t path.scope.getBlockParent().registerDeclaration(path);\n\t },\n\t AssignmentExpression: function AssignmentExpression(path, state) {\n\t state.assignments.push(path);\n\t },\n\t UpdateExpression: function UpdateExpression(path, state) {\n\t state.constantViolations.push(path);\n\t },\n\t UnaryExpression: function UnaryExpression(path, state) {\n\t if (path.node.operator === \"delete\") {\n\t state.constantViolations.push(path);\n\t }\n\t },\n\t BlockScoped: function BlockScoped(path) {\n\t var scope = path.scope;\n\t if (scope.path === path) scope = scope.parent;\n\t var parent = scope.getBlockParent();\n\t parent.registerDeclaration(path);\n\n\t if (path.isClassDeclaration() && path.node.id) {\n\t var id = path.node.id;\n\t var _name2 = id.name;\n\t path.scope.bindings[_name2] = path.scope.parent.getBinding(_name2);\n\t }\n\t },\n\t CatchClause: function CatchClause(path) {\n\t path.scope.registerBinding(\"let\", path);\n\t },\n\t Function: function Function(path) {\n\t if (path.isFunctionExpression() && path.has(\"id\") && !path.get(\"id\").node[NOT_LOCAL_BINDING$1]) {\n\t path.scope.registerBinding(\"local\", path.get(\"id\"), path);\n\t }\n\n\t var params = path.get(\"params\");\n\n\t for (var _iterator4 = _createForOfIteratorHelperLoose(params), _step4; !(_step4 = _iterator4()).done;) {\n\t var param = _step4.value;\n\t path.scope.registerBinding(\"param\", param);\n\t }\n\t },\n\t ClassExpression: function ClassExpression(path) {\n\t if (path.has(\"id\") && !path.get(\"id\").node[NOT_LOCAL_BINDING$1]) {\n\t path.scope.registerBinding(\"local\", path);\n\t }\n\t }\n\t};\n\tvar uid = 0;\n\n\tvar Scope$1 = function () {\n\t function Scope(path) {\n\t this.uid = void 0;\n\t this.path = void 0;\n\t this.block = void 0;\n\t this.labels = void 0;\n\t this.inited = void 0;\n\t this.bindings = void 0;\n\t this.references = void 0;\n\t this.globals = void 0;\n\t this.uids = void 0;\n\t this.data = void 0;\n\t this.crawling = void 0;\n\t var node = path.node;\n\t var cached = scope.get(node);\n\n\t if ((cached == null ? void 0 : cached.path) === path) {\n\t return cached;\n\t }\n\n\t scope.set(node, this);\n\t this.uid = uid++;\n\t this.block = node;\n\t this.path = path;\n\t this.labels = new Map();\n\t this.inited = false;\n\t }\n\n\t var _proto = Scope.prototype;\n\n\t _proto.traverse = function traverse$1(node, opts, state) {\n\t traverse(node, opts, this, state, this.path);\n\t };\n\n\t _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) {\n\t var id = this.generateUidIdentifier(name);\n\t this.push({\n\t id: id\n\t });\n\t return cloneNode$g(id);\n\t };\n\n\t _proto.generateUidIdentifier = function generateUidIdentifier(name) {\n\t return identifier$h(this.generateUid(name));\n\t };\n\n\t _proto.generateUid = function generateUid(name) {\n\t if (name === void 0) {\n\t name = \"temp\";\n\t }\n\n\t name = toIdentifier(name).replace(/^_+/, \"\").replace(/[0-9]+$/g, \"\");\n\t var uid;\n\t var i = 1;\n\n\t do {\n\t uid = this._generateUid(name, i);\n\t i++;\n\t } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));\n\n\t var program = this.getProgramParent();\n\t program.references[uid] = true;\n\t program.uids[uid] = true;\n\t return uid;\n\t };\n\n\t _proto._generateUid = function _generateUid(name, i) {\n\t var id = name;\n\t if (i > 1) id += i;\n\t return \"_\" + id;\n\t };\n\n\t _proto.generateUidBasedOnNode = function generateUidBasedOnNode(node, defaultName) {\n\t var parts = [];\n\t gatherNodeParts(node, parts);\n\t var id = parts.join(\"$\");\n\t id = id.replace(/^_/, \"\") || defaultName || \"ref\";\n\t return this.generateUid(id.slice(0, 20));\n\t };\n\n\t _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(node, defaultName) {\n\t return identifier$h(this.generateUidBasedOnNode(node, defaultName));\n\t };\n\n\t _proto.isStatic = function isStatic(node) {\n\t if (isThisExpression$1(node) || isSuper$1(node)) {\n\t return true;\n\t }\n\n\t if (isIdentifier$e(node)) {\n\t var binding = this.getBinding(node.name);\n\n\t if (binding) {\n\t return binding.constant;\n\t } else {\n\t return this.hasBinding(node.name);\n\t }\n\t }\n\n\t return false;\n\t };\n\n\t _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) {\n\t if (this.isStatic(node)) {\n\t return null;\n\t } else {\n\t var id = this.generateUidIdentifierBasedOnNode(node);\n\n\t if (!dontPush) {\n\t this.push({\n\t id: id\n\t });\n\t return cloneNode$g(id);\n\t }\n\n\t return id;\n\t }\n\t };\n\n\t _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) {\n\t if (kind === \"param\") return;\n\t if (local.kind === \"local\") return;\n\t var duplicate = kind === \"let\" || local.kind === \"let\" || local.kind === \"const\" || local.kind === \"module\" || local.kind === \"param\" && (kind === \"let\" || kind === \"const\");\n\n\t if (duplicate) {\n\t throw this.hub.buildError(id, \"Duplicate declaration \\\"\" + name + \"\\\"\", TypeError);\n\t }\n\t };\n\n\t _proto.rename = function rename(oldName, newName, block) {\n\t var binding = this.getBinding(oldName);\n\n\t if (binding) {\n\t newName = newName || this.generateUidIdentifier(oldName).name;\n\t return new Renamer(binding, oldName, newName).rename(block);\n\t }\n\t };\n\n\t _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) {\n\t if (map[oldName]) {\n\t map[newName] = value;\n\t map[oldName] = null;\n\t }\n\t };\n\n\t _proto.dump = function dump() {\n\t var sep = \"-\".repeat(60);\n\t console.log(sep);\n\t var scope = this;\n\n\t do {\n\t console.log(\"#\", scope.block.type);\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(scope.bindings); _i2 < _Object$keys2.length; _i2++) {\n\t var _name3 = _Object$keys2[_i2];\n\t var binding = scope.bindings[_name3];\n\t console.log(\" -\", _name3, {\n\t constant: binding.constant,\n\t references: binding.references,\n\t violations: binding.constantViolations.length,\n\t kind: binding.kind\n\t });\n\t }\n\t } while (scope = scope.parent);\n\n\t console.log(sep);\n\t };\n\n\t _proto.toArray = function toArray(node, i, arrayLikeIsIterable) {\n\t if (isIdentifier$e(node)) {\n\t var binding = this.getBinding(node.name);\n\n\t if (binding != null && binding.constant && binding.path.isGenericType(\"Array\")) {\n\t return node;\n\t }\n\t }\n\n\t if (isArrayExpression$1(node)) {\n\t return node;\n\t }\n\n\t if (isIdentifier$e(node, {\n\t name: \"arguments\"\n\t })) {\n\t return callExpression$d(memberExpression$a(memberExpression$a(memberExpression$a(identifier$h(\"Array\"), identifier$h(\"prototype\")), identifier$h(\"slice\")), identifier$h(\"call\")), [node]);\n\t }\n\n\t var helperName;\n\t var args = [node];\n\n\t if (i === true) {\n\t helperName = \"toConsumableArray\";\n\t } else if (i) {\n\t args.push(numericLiteral$7(i));\n\t helperName = \"slicedToArray\";\n\t } else {\n\t helperName = \"toArray\";\n\t }\n\n\t if (arrayLikeIsIterable) {\n\t args.unshift(this.hub.addHelper(helperName));\n\t helperName = \"maybeArrayLike\";\n\t }\n\n\t return callExpression$d(this.hub.addHelper(helperName), args);\n\t };\n\n\t _proto.hasLabel = function hasLabel(name) {\n\t return !!this.getLabel(name);\n\t };\n\n\t _proto.getLabel = function getLabel(name) {\n\t return this.labels.get(name);\n\t };\n\n\t _proto.registerLabel = function registerLabel(path) {\n\t this.labels.set(path.node.label.name, path);\n\t };\n\n\t _proto.registerDeclaration = function registerDeclaration(path) {\n\t if (path.isLabeledStatement()) {\n\t this.registerLabel(path);\n\t } else if (path.isFunctionDeclaration()) {\n\t this.registerBinding(\"hoisted\", path.get(\"id\"), path);\n\t } else if (path.isVariableDeclaration()) {\n\t var declarations = path.get(\"declarations\");\n\n\t for (var _iterator5 = _createForOfIteratorHelperLoose(declarations), _step5; !(_step5 = _iterator5()).done;) {\n\t var declar = _step5.value;\n\t this.registerBinding(path.node.kind, declar);\n\t }\n\t } else if (path.isClassDeclaration()) {\n\t this.registerBinding(\"let\", path);\n\t } else if (path.isImportDeclaration()) {\n\t var specifiers = path.get(\"specifiers\");\n\n\t for (var _iterator6 = _createForOfIteratorHelperLoose(specifiers), _step6; !(_step6 = _iterator6()).done;) {\n\t var specifier = _step6.value;\n\t this.registerBinding(\"module\", specifier);\n\t }\n\t } else if (path.isExportDeclaration()) {\n\t var _declar = path.get(\"declaration\");\n\n\t if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) {\n\t this.registerDeclaration(_declar);\n\t }\n\t } else {\n\t this.registerBinding(\"unknown\", path);\n\t }\n\t };\n\n\t _proto.buildUndefinedNode = function buildUndefinedNode() {\n\t return unaryExpression$6(\"void\", numericLiteral$7(0), true);\n\t };\n\n\t _proto.registerConstantViolation = function registerConstantViolation(path) {\n\t var ids = path.getBindingIdentifiers();\n\n\t for (var _i3 = 0, _Object$keys3 = Object.keys(ids); _i3 < _Object$keys3.length; _i3++) {\n\t var _name4 = _Object$keys3[_i3];\n\t var binding = this.getBinding(_name4);\n\t if (binding) binding.reassign(path);\n\t }\n\t };\n\n\t _proto.registerBinding = function registerBinding(kind, path, bindingPath) {\n\t if (bindingPath === void 0) {\n\t bindingPath = path;\n\t }\n\n\t if (!kind) throw new ReferenceError(\"no `kind`\");\n\n\t if (path.isVariableDeclaration()) {\n\t var declarators = path.get(\"declarations\");\n\n\t for (var _iterator7 = _createForOfIteratorHelperLoose(declarators), _step7; !(_step7 = _iterator7()).done;) {\n\t var declar = _step7.value;\n\t this.registerBinding(kind, declar);\n\t }\n\n\t return;\n\t }\n\n\t var parent = this.getProgramParent();\n\t var ids = path.getOuterBindingIdentifiers(true);\n\n\t for (var _i4 = 0, _Object$keys4 = Object.keys(ids); _i4 < _Object$keys4.length; _i4++) {\n\t var _name5 = _Object$keys4[_i4];\n\t parent.references[_name5] = true;\n\n\t for (var _iterator8 = _createForOfIteratorHelperLoose(ids[_name5]), _step8; !(_step8 = _iterator8()).done;) {\n\t var id = _step8.value;\n\t var local = this.getOwnBinding(_name5);\n\n\t if (local) {\n\t if (local.identifier === id) continue;\n\t this.checkBlockScopedCollisions(local, kind, _name5, id);\n\t }\n\n\t if (local) {\n\t this.registerConstantViolation(bindingPath);\n\t } else {\n\t this.bindings[_name5] = new Binding({\n\t identifier: id,\n\t scope: this,\n\t path: bindingPath,\n\t kind: kind\n\t });\n\t }\n\t }\n\t }\n\t };\n\n\t _proto.addGlobal = function addGlobal(node) {\n\t this.globals[node.name] = node;\n\t };\n\n\t _proto.hasUid = function hasUid(name) {\n\t var scope = this;\n\n\t do {\n\t if (scope.uids[name]) return true;\n\t } while (scope = scope.parent);\n\n\t return false;\n\t };\n\n\t _proto.hasGlobal = function hasGlobal(name) {\n\t var scope = this;\n\n\t do {\n\t if (scope.globals[name]) return true;\n\t } while (scope = scope.parent);\n\n\t return false;\n\t };\n\n\t _proto.hasReference = function hasReference(name) {\n\t return !!this.getProgramParent().references[name];\n\t };\n\n\t _proto.isPure = function isPure(node, constantsOnly) {\n\t if (isIdentifier$e(node)) {\n\t var binding = this.getBinding(node.name);\n\t if (!binding) return false;\n\t if (constantsOnly) return binding.constant;\n\t return true;\n\t } else if (isClass(node)) {\n\t if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {\n\t return false;\n\t }\n\n\t return this.isPure(node.body, constantsOnly);\n\t } else if (isClassBody(node)) {\n\t for (var _iterator9 = _createForOfIteratorHelperLoose(node.body), _step9; !(_step9 = _iterator9()).done;) {\n\t var method = _step9.value;\n\t if (!this.isPure(method, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else if (isBinary$2(node)) {\n\t return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);\n\t } else if (isArrayExpression$1(node)) {\n\t for (var _iterator10 = _createForOfIteratorHelperLoose(node.elements), _step10; !(_step10 = _iterator10()).done;) {\n\t var elem = _step10.value;\n\t if (!this.isPure(elem, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else if (isObjectExpression$2(node)) {\n\t for (var _iterator11 = _createForOfIteratorHelperLoose(node.properties), _step11; !(_step11 = _iterator11()).done;) {\n\t var prop = _step11.value;\n\t if (!this.isPure(prop, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else if (isMethod(node)) {\n\t if (node.computed && !this.isPure(node.key, constantsOnly)) return false;\n\t if (node.kind === \"get\" || node.kind === \"set\") return false;\n\t return true;\n\t } else if (isProperty$1(node)) {\n\t if (node.computed && !this.isPure(node.key, constantsOnly)) return false;\n\t return this.isPure(node.value, constantsOnly);\n\t } else if (isUnaryExpression(node)) {\n\t return this.isPure(node.argument, constantsOnly);\n\t } else if (isTaggedTemplateExpression$1(node)) {\n\t return matchesPattern$1(node.tag, \"String.raw\") && !this.hasBinding(\"String\", true) && this.isPure(node.quasi, constantsOnly);\n\t } else if (isTemplateLiteral$1(node)) {\n\t for (var _iterator12 = _createForOfIteratorHelperLoose(node.expressions), _step12; !(_step12 = _iterator12()).done;) {\n\t var expression = _step12.value;\n\t if (!this.isPure(expression, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else {\n\t return isPureish$1(node);\n\t }\n\t };\n\n\t _proto.setData = function setData(key, val) {\n\t return this.data[key] = val;\n\t };\n\n\t _proto.getData = function getData(key) {\n\t var scope = this;\n\n\t do {\n\t var data = scope.data[key];\n\t if (data != null) return data;\n\t } while (scope = scope.parent);\n\t };\n\n\t _proto.removeData = function removeData(key) {\n\t var scope = this;\n\n\t do {\n\t var data = scope.data[key];\n\t if (data != null) scope.data[key] = null;\n\t } while (scope = scope.parent);\n\t };\n\n\t _proto.init = function init() {\n\t if (!this.inited) {\n\t this.inited = true;\n\t this.crawl();\n\t }\n\t };\n\n\t _proto.crawl = function crawl() {\n\t var path = this.path;\n\t this.references = Object.create(null);\n\t this.bindings = Object.create(null);\n\t this.globals = Object.create(null);\n\t this.uids = Object.create(null);\n\t this.data = Object.create(null);\n\t var programParent = this.getProgramParent();\n\t if (programParent.crawling) return;\n\t var state = {\n\t references: [],\n\t constantViolations: [],\n\t assignments: []\n\t };\n\t this.crawling = true;\n\n\t if (path.type !== \"Program\" && collectorVisitor._exploded) {\n\t for (var _iterator13 = _createForOfIteratorHelperLoose(collectorVisitor.enter), _step13; !(_step13 = _iterator13()).done;) {\n\t var _visit = _step13.value;\n\n\t _visit(path, state);\n\t }\n\n\t var typeVisitors = collectorVisitor[path.type];\n\n\t if (typeVisitors) {\n\t for (var _iterator14 = _createForOfIteratorHelperLoose(typeVisitors.enter), _step14; !(_step14 = _iterator14()).done;) {\n\t var visit = _step14.value;\n\t visit(path, state);\n\t }\n\t }\n\t }\n\n\t path.traverse(collectorVisitor, state);\n\t this.crawling = false;\n\n\t for (var _iterator15 = _createForOfIteratorHelperLoose(state.assignments), _step15; !(_step15 = _iterator15()).done;) {\n\t var _path = _step15.value;\n\n\t var ids = _path.getBindingIdentifiers();\n\n\t for (var _i5 = 0, _Object$keys5 = Object.keys(ids); _i5 < _Object$keys5.length; _i5++) {\n\t var _name6 = _Object$keys5[_i5];\n\t if (_path.scope.getBinding(_name6)) continue;\n\t programParent.addGlobal(ids[_name6]);\n\t }\n\n\t _path.scope.registerConstantViolation(_path);\n\t }\n\n\t for (var _iterator16 = _createForOfIteratorHelperLoose(state.references), _step16; !(_step16 = _iterator16()).done;) {\n\t var ref = _step16.value;\n\t var binding = ref.scope.getBinding(ref.node.name);\n\n\t if (binding) {\n\t binding.reference(ref);\n\t } else {\n\t programParent.addGlobal(ref.node);\n\t }\n\t }\n\n\t for (var _iterator17 = _createForOfIteratorHelperLoose(state.constantViolations), _step17; !(_step17 = _iterator17()).done;) {\n\t var _path2 = _step17.value;\n\n\t _path2.scope.registerConstantViolation(_path2);\n\t }\n\t };\n\n\t _proto.push = function push(opts) {\n\t var path = this.path;\n\n\t if (!path.isBlockStatement() && !path.isProgram()) {\n\t path = this.getBlockParent().path;\n\t }\n\n\t if (path.isSwitchStatement()) {\n\t path = (this.getFunctionParent() || this.getProgramParent()).path;\n\t }\n\n\t if (path.isLoop() || path.isCatchClause() || path.isFunction()) {\n\t path.ensureBlock();\n\t path = path.get(\"body\");\n\t }\n\n\t var unique = opts.unique;\n\t var kind = opts.kind || \"var\";\n\t var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;\n\t var dataKey = \"declaration:\" + kind + \":\" + blockHoist;\n\t var declarPath = !unique && path.getData(dataKey);\n\n\t if (!declarPath) {\n\t var declar = variableDeclaration$6(kind, []);\n\t declar._blockHoist = blockHoist;\n\n\t var _path$unshiftContaine = path.unshiftContainer(\"body\", [declar]);\n\n\t var _path$unshiftContaine2 = _slicedToArray$1(_path$unshiftContaine, 1);\n\n\t declarPath = _path$unshiftContaine2[0];\n\t if (!unique) path.setData(dataKey, declarPath);\n\t }\n\n\t var declarator = variableDeclarator$6(opts.id, opts.init);\n\t declarPath.node.declarations.push(declarator);\n\t this.registerBinding(kind, declarPath.get(\"declarations\").pop());\n\t };\n\n\t _proto.getProgramParent = function getProgramParent() {\n\t var scope = this;\n\n\t do {\n\t if (scope.path.isProgram()) {\n\t return scope;\n\t }\n\t } while (scope = scope.parent);\n\n\t throw new Error(\"Couldn't find a Program\");\n\t };\n\n\t _proto.getFunctionParent = function getFunctionParent() {\n\t var scope = this;\n\n\t do {\n\t if (scope.path.isFunctionParent()) {\n\t return scope;\n\t }\n\t } while (scope = scope.parent);\n\n\t return null;\n\t };\n\n\t _proto.getBlockParent = function getBlockParent() {\n\t var scope = this;\n\n\t do {\n\t if (scope.path.isBlockParent()) {\n\t return scope;\n\t }\n\t } while (scope = scope.parent);\n\n\t throw new Error(\"We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...\");\n\t };\n\n\t _proto.getAllBindings = function getAllBindings() {\n\t var ids = Object.create(null);\n\t var scope = this;\n\n\t do {\n\t for (var _i6 = 0, _Object$keys6 = Object.keys(scope.bindings); _i6 < _Object$keys6.length; _i6++) {\n\t var key = _Object$keys6[_i6];\n\n\t if (key in ids === false) {\n\t ids[key] = scope.bindings[key];\n\t }\n\t }\n\n\t scope = scope.parent;\n\t } while (scope);\n\n\t return ids;\n\t };\n\n\t _proto.getAllBindingsOfKind = function getAllBindingsOfKind() {\n\t var ids = Object.create(null);\n\n\t for (var _len = arguments.length, kinds = new Array(_len), _key = 0; _key < _len; _key++) {\n\t kinds[_key] = arguments[_key];\n\t }\n\n\t for (var _i7 = 0, _kinds = kinds; _i7 < _kinds.length; _i7++) {\n\t var kind = _kinds[_i7];\n\t var scope = this;\n\n\t do {\n\t for (var _i8 = 0, _Object$keys7 = Object.keys(scope.bindings); _i8 < _Object$keys7.length; _i8++) {\n\t var _name7 = _Object$keys7[_i8];\n\t var binding = scope.bindings[_name7];\n\t if (binding.kind === kind) ids[_name7] = binding;\n\t }\n\n\t scope = scope.parent;\n\t } while (scope);\n\t }\n\n\t return ids;\n\t };\n\n\t _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) {\n\t return this.getBindingIdentifier(name) === node;\n\t };\n\n\t _proto.getBinding = function getBinding(name) {\n\t var scope = this;\n\t var previousPath;\n\n\t do {\n\t var binding = scope.getOwnBinding(name);\n\n\t if (binding) {\n\t var _previousPath;\n\n\t if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== \"param\") ; else {\n\t return binding;\n\t }\n\t }\n\n\t previousPath = scope.path;\n\t } while (scope = scope.parent);\n\t };\n\n\t _proto.getOwnBinding = function getOwnBinding(name) {\n\t return this.bindings[name];\n\t };\n\n\t _proto.getBindingIdentifier = function getBindingIdentifier(name) {\n\t var _this$getBinding;\n\n\t return (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.identifier;\n\t };\n\n\t _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) {\n\t var binding = this.bindings[name];\n\t return binding == null ? void 0 : binding.identifier;\n\t };\n\n\t _proto.hasOwnBinding = function hasOwnBinding(name) {\n\t return !!this.getOwnBinding(name);\n\t };\n\n\t _proto.hasBinding = function hasBinding(name, noGlobals) {\n\t if (!name) return false;\n\t if (this.hasOwnBinding(name)) return true;\n\t if (this.parentHasBinding(name, noGlobals)) return true;\n\t if (this.hasUid(name)) return true;\n\t if (!noGlobals && Scope.globals.includes(name)) return true;\n\t if (!noGlobals && Scope.contextVariables.includes(name)) return true;\n\t return false;\n\t };\n\n\t _proto.parentHasBinding = function parentHasBinding(name, noGlobals) {\n\t var _this$parent;\n\n\t return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name, noGlobals);\n\t };\n\n\t _proto.moveBindingTo = function moveBindingTo(name, scope) {\n\t var info = this.getBinding(name);\n\n\t if (info) {\n\t info.scope.removeOwnBinding(name);\n\t info.scope = scope;\n\t scope.bindings[name] = info;\n\t }\n\t };\n\n\t _proto.removeOwnBinding = function removeOwnBinding(name) {\n\t delete this.bindings[name];\n\t };\n\n\t _proto.removeBinding = function removeBinding(name) {\n\t var _this$getBinding2;\n\n\t (_this$getBinding2 = this.getBinding(name)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name);\n\t var scope = this;\n\n\t do {\n\t if (scope.uids[name]) {\n\t scope.uids[name] = false;\n\t }\n\t } while (scope = scope.parent);\n\t };\n\n\t _createClass(Scope, [{\n\t key: \"parent\",\n\t get: function get() {\n\t var _parent;\n\n\t var parent,\n\t path = this.path;\n\n\t do {\n\t var isKey = path.key === \"key\";\n\t path = path.parentPath;\n\t if (isKey && path.isMethod()) path = path.parentPath;\n\t if (path && path.isScope()) parent = path;\n\t } while (path && !parent);\n\n\t return (_parent = parent) == null ? void 0 : _parent.scope;\n\t }\n\t }, {\n\t key: \"parentBlock\",\n\t get: function get() {\n\t return this.path.parent;\n\t }\n\t }, {\n\t key: \"hub\",\n\t get: function get() {\n\t return this.path.hub;\n\t }\n\t }]);\n\n\t return Scope;\n\t}();\n\n\tScope$1.globals = Object.keys(globals.builtin);\n\tScope$1.contextVariables = [\"arguments\", \"undefined\", \"Infinity\", \"NaN\"];\n\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n\tvar encode$1 = function encode(number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\n\tvar decode$1 = function decode(charCode) {\n\t var bigA = 65;\n\t var bigZ = 90;\n\t var littleA = 97;\n\t var littleZ = 122;\n\t var zero = 48;\n\t var nine = 57;\n\t var plus = 43;\n\t var slash = 47;\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return charCode - bigA;\n\t }\n\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return charCode - littleA + littleOffset;\n\t }\n\n\t if (zero <= charCode && charCode <= nine) {\n\t return charCode - zero + numberOffset;\n\t }\n\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\n\t return -1;\n\t};\n\n\tvar base64 = {\n\t encode: encode$1,\n\t decode: decode$1\n\t};\n\n\tvar VLQ_BASE_SHIFT = 5;\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;\n\t}\n\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative ? -shifted : shifted;\n\t}\n\n\tvar encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t var vlq = toVLQSigned(aValue);\n\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\n\t if (vlq > 0) {\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\n\t return encoded;\n\t};\n\n\tvar decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\tvar base64Vlq = {\n\t encode: encode,\n\t decode: decode\n\t};\n\n\tvar util$5 = createCommonjsModule(function (module, exports) {\n\t function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }\n\n\t exports.getArg = getArg;\n\t var urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\t var dataUrlRegexp = /^data:.+\\,.+$/;\n\n\t function urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\n\t if (!match) {\n\t return null;\n\t }\n\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t }\n\n\t exports.urlParse = urlParse;\n\n\t function urlGenerate(aParsedUrl) {\n\t var url = '';\n\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\n\t url += '//';\n\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port;\n\t }\n\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\n\t return url;\n\t }\n\n\t exports.urlGenerate = urlGenerate;\n\n\t function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\n\t path = url.path;\n\t }\n\n\t var isAbsolute = exports.isAbsolute(path);\n\t var parts = path.split(/\\/+/);\n\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\n\t return path;\n\t }\n\n\t exports.normalize = normalize;\n\n\t function join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\n\t return urlGenerate(aPathUrl);\n\t }\n\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\n\t var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\n\t return joined;\n\t }\n\n\t exports.join = join;\n\n\t exports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t };\n\n\t function relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t var level = 0;\n\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\n\t if (index < 0) {\n\t return aPath;\n\t }\n\n\t aRoot = aRoot.slice(0, index);\n\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\n\t ++level;\n\t }\n\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t }\n\n\t exports.relative = relative;\n\n\t var supportsNullProto = function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t }();\n\n\t function identity(s) {\n\t return s;\n\t }\n\n\t function toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\n\t return aStr;\n\t }\n\n\t exports.toSetString = supportsNullProto ? identity : toSetString;\n\n\t function fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\n\t return aStr;\n\t }\n\n\t exports.fromSetString = supportsNullProto ? identity : fromSetString;\n\n\t function isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\n\t var length = s.length;\n\n\t if (length < 9) {\n\t return false;\n\t }\n\n\t if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {\n\t return false;\n\t }\n\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t return mappingA.name - mappingB.name;\n\t }\n\n\t exports.compareByOriginalPositions = compareByOriginalPositions;\n\n\t function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.source - mappingB.source;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t return mappingA.name - mappingB.name;\n\t }\n\n\t exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\n\t function strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\n\t return -1;\n\t }\n\n\t function compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t return strcmp(mappingA.name, mappingB.name);\n\t }\n\n\t exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t}, \"/$$rollup_base$$/node_modules/source-map/lib\");\n\n\tvar has$b = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\n\tfunction ArraySet$2() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\n\tArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet$2();\n\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\n\t return set;\n\t};\n\n\tArraySet$2.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\n\tArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util$5.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has$b.call(this._set, sStr);\n\t var idx = this._array.length;\n\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\n\tArraySet$2.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util$5.toSetString(aStr);\n\t return has$b.call(this._set, sStr);\n\t }\n\t};\n\n\tArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util$5.toSetString(aStr);\n\n\t if (has$b.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\n\tArraySet$2.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\n\tArraySet$2.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\n\tvar ArraySet_1 = ArraySet$2;\n\tvar arraySet = {\n\t ArraySet: ArraySet_1\n\t};\n\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA || util$5.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\n\tfunction MappingList$1() {\n\t this._array = [];\n\t this._sorted = true;\n\t this._last = {\n\t generatedLine: -1,\n\t generatedColumn: 0\n\t };\n\t}\n\n\tMappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t};\n\n\tMappingList$1.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\n\t this._array.push(aMapping);\n\t }\n\t};\n\n\tMappingList$1.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util$5.compareByGeneratedPositionsInflated);\n\n\t this._sorted = true;\n\t }\n\n\t return this._array;\n\t};\n\n\tvar MappingList_1 = MappingList$1;\n\tvar mappingList = {\n\t MappingList: MappingList_1\n\t};\n\n\tvar ArraySet$1 = arraySet.ArraySet;\n\tvar MappingList = mappingList.MappingList;\n\n\tfunction SourceMapGenerator$2(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\n\t this._file = util$5.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util$5.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util$5.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet$1();\n\t this._names = new ArraySet$1();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t}\n\n\tSourceMapGenerator$2.prototype._version = 3;\n\n\tSourceMapGenerator$2.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator$2({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\n\t if (sourceRoot != null) {\n\t newMapping.source = util$5.relative(sourceRoot, newMapping.source);\n\t }\n\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t};\n\n\tSourceMapGenerator$2.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util$5.getArg(aArgs, 'generated');\n\t var original = util$5.getArg(aArgs, 'original', null);\n\t var source = util$5.getArg(aArgs, 'source', null);\n\t var name = util$5.getArg(aArgs, 'name', null);\n\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\n\t if (source != null) {\n\t source = String(source);\n\n\t if (!this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t }\n\n\t if (name != null) {\n\t name = String(name);\n\n\t if (!this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t }\n\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t};\n\n\tSourceMapGenerator$2.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\n\t if (this._sourceRoot != null) {\n\t source = util$5.relative(this._sourceRoot, source);\n\t }\n\n\t if (aSourceContent != null) {\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = Object.create(null);\n\t }\n\n\t this._sourcesContents[util$5.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t delete this._sourcesContents[util$5.toSetString(source)];\n\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t};\n\n\tSourceMapGenerator$2.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\\'s \"file\" property. Both were omitted.');\n\t }\n\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\n\t var sourceRoot = this._sourceRoot;\n\n\t if (sourceRoot != null) {\n\t sourceFile = util$5.relative(sourceRoot, sourceFile);\n\t }\n\n\t var newSources = new ArraySet$1();\n\t var newNames = new ArraySet$1();\n\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\n\t if (original.source != null) {\n\t mapping.source = original.source;\n\n\t if (aSourceMapPath != null) {\n\t mapping.source = util$5.join(aSourceMapPath, mapping.source);\n\t }\n\n\t if (sourceRoot != null) {\n\t mapping.source = util$5.relative(sourceRoot, mapping.source);\n\t }\n\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\n\t var source = mapping.source;\n\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\n\t var name = mapping.name;\n\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t }, this);\n\n\t this._sources = newSources;\n\t this._names = newNames;\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util$5.join(aSourceMapPath, sourceFile);\n\t }\n\n\t if (sourceRoot != null) {\n\t sourceFile = util$5.relative(sourceRoot, sourceFile);\n\t }\n\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t};\n\n\tSourceMapGenerator$2.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {\n\t if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n\t throw new Error('original.line and original.column are not numbers -- you probably meant to omit ' + 'the original mapping entirely and only map the generated position. If so, pass ' + 'null for the original mapping instead of an object with empty or null values.');\n\t }\n\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {\n\t return;\n\t } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {\n\t return;\n\t } else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t};\n\n\tSourceMapGenerator$2.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\n\t var mappings = this._mappings.toArray();\n\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = '';\n\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t } else {\n\t if (i > 0) {\n\t if (!util$5.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\n\t next += ',';\n\t }\n\t }\n\n\t next += base64Vlq.encode(mapping.generatedColumn - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64Vlq.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t next += base64Vlq.encode(mapping.originalLine - 1 - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t next += base64Vlq.encode(mapping.originalColumn - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64Vlq.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\n\t result += next;\n\t }\n\n\t return result;\n\t};\n\n\tSourceMapGenerator$2.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\n\t if (aSourceRoot != null) {\n\t source = util$5.relative(aSourceRoot, source);\n\t }\n\n\t var key = util$5.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;\n\t }, this);\n\t};\n\n\tSourceMapGenerator$2.prototype.toJSON = function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\n\t return map;\n\t};\n\n\tSourceMapGenerator$2.prototype.toString = function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t};\n\n\tvar SourceMapGenerator_1 = SourceMapGenerator$2;\n\tvar sourceMapGenerator = {\n\t SourceMapGenerator: SourceMapGenerator_1\n\t};\n\n\tvar binarySearch = createCommonjsModule(function (module, exports) {\n\t exports.GREATEST_LOWER_BOUND = 1;\n\t exports.LEAST_UPPER_BOUND = 2;\n\n\t function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\n\t if (cmp === 0) {\n\t return mid;\n\t } else if (cmp > 0) {\n\t if (aHigh - mid > 1) {\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t } else {\n\t if (mid - aLow > 1) {\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t }\n\n\t exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\n\t if (index < 0) {\n\t return -1;\n\t }\n\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\n\t --index;\n\t }\n\n\t return index;\n\t };\n\t}, \"/$$rollup_base$$/node_modules/source-map/lib\");\n\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + Math.random() * (high - low));\n\t}\n\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t if (p < r) {\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\n\tvar quickSort_1 = function quickSort_1(ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\tvar quickSort$1 = {\n\t quickSort: quickSort_1\n\t};\n\n\tvar ArraySet = arraySet.ArraySet;\n\tvar quickSort = quickSort$1.quickSort;\n\n\tfunction SourceMapConsumer$1(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\n\t return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap);\n\t}\n\n\tSourceMapConsumer$1.fromSourceMap = function (aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t};\n\n\tSourceMapConsumer$1.prototype._version = 3;\n\tSourceMapConsumer$1.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer$1.prototype, '_generatedMappings', {\n\t get: function get() {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\n\t return this.__generatedMappings;\n\t }\n\t});\n\tSourceMapConsumer$1.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer$1.prototype, '_originalMappings', {\n\t get: function get() {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\n\t return this.__originalMappings;\n\t }\n\t});\n\n\tSourceMapConsumer$1.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t};\n\n\tSourceMapConsumer$1.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t};\n\n\tSourceMapConsumer$1.GENERATED_ORDER = 1;\n\tSourceMapConsumer$1.ORIGINAL_ORDER = 2;\n\tSourceMapConsumer$1.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer$1.LEAST_UPPER_BOUND = 2;\n\n\tSourceMapConsumer$1.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer$1.GENERATED_ORDER;\n\t var mappings;\n\n\t switch (order) {\n\t case SourceMapConsumer$1.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\n\t case SourceMapConsumer$1.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\n\t if (source != null && sourceRoot != null) {\n\t source = util$5.join(sourceRoot, source);\n\t }\n\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t};\n\n\tSourceMapConsumer$1.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util$5.getArg(aArgs, 'line');\n\t var needle = {\n\t source: util$5.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util$5.getArg(aArgs, 'column', 0)\n\t };\n\n\t if (this.sourceRoot != null) {\n\t needle.source = util$5.relative(this.sourceRoot, needle.source);\n\t }\n\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\n\t needle.source = this._sources.indexOf(needle.source);\n\t var mappings = [];\n\n\t var index = this._findMapping(needle, this._originalMappings, \"originalLine\", \"originalColumn\", util$5.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);\n\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util$5.getArg(mapping, 'generatedLine', null),\n\t column: util$5.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util$5.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\n\t while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util$5.getArg(mapping, 'generatedLine', null),\n\t column: util$5.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util$5.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\n\t return mappings;\n\t};\n\n\tvar SourceMapConsumer_1 = SourceMapConsumer$1;\n\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\n\t var version = util$5.getArg(sourceMap, 'version');\n\t var sources = util$5.getArg(sourceMap, 'sources');\n\t var names = util$5.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util$5.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util$5.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util$5.getArg(sourceMap, 'mappings');\n\t var file = util$5.getArg(sourceMap, 'file', null);\n\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\n\t sources = sources.map(String).map(util$5.normalize).map(function (source) {\n\t return sourceRoot && util$5.isAbsolute(sourceRoot) && util$5.isAbsolute(source) ? util$5.relative(sourceRoot, source) : source;\n\t });\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1;\n\n\tBasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping();\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\n\t destOriginalMappings.push(destMapping);\n\t }\n\n\t destGeneratedMappings.push(destMapping);\n\t }\n\n\t quickSort(smc.__originalMappings, util$5.compareByOriginalPositions);\n\t return smc;\n\t};\n\n\tBasicSourceMapConsumer.prototype._version = 3;\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function get() {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util$5.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\n\tBasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t } else if (aStr.charAt(index) === ',') {\n\t index++;\n\t } else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\n\t str = aStr.slice(index, end);\n\t segment = cachedSegments[str];\n\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\n\t while (index < end) {\n\t base64Vlq.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\n\t cachedSegments[str] = segment;\n\t }\n\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\n\t if (segment.length > 1) {\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t mapping.originalLine += 1;\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\n\t if (segment.length > 4) {\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\n\t generatedMappings.push(mapping);\n\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\n\t quickSort(generatedMappings, util$5.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t quickSort(originalMappings, util$5.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t};\n\n\tBasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);\n\t }\n\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);\n\t }\n\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t};\n\n\tBasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t};\n\n\tBasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util$5.getArg(aArgs, 'line'),\n\t generatedColumn: util$5.getArg(aArgs, 'column')\n\t };\n\n\t var index = this._findMapping(needle, this._generatedMappings, \"generatedLine\", \"generatedColumn\", util$5.compareByGeneratedPositionsDeflated, util$5.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND));\n\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util$5.getArg(mapping, 'source', null);\n\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\n\t if (this.sourceRoot != null) {\n\t source = util$5.join(this.sourceRoot, source);\n\t }\n\t }\n\n\t var name = util$5.getArg(mapping, 'name', null);\n\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\n\t return {\n\t source: source,\n\t line: util$5.getArg(mapping, 'originalLine', null),\n\t column: util$5.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t};\n\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\n\t return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) {\n\t return sc == null;\n\t });\n\t};\n\n\tBasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\n\t if (this.sourceRoot != null) {\n\t aSource = util$5.relative(this.sourceRoot, aSource);\n\t }\n\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\n\t var url;\n\n\t if (this.sourceRoot != null && (url = util$5.urlParse(this.sourceRoot))) {\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\n\t if (url.scheme == \"file\" && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];\n\t }\n\n\t if ((!url.path || url.path == \"/\") && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\n\t if (nullOnMissing) {\n\t return null;\n\t } else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t};\n\n\tBasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util$5.getArg(aArgs, 'source');\n\n\t if (this.sourceRoot != null) {\n\t source = util$5.relative(this.sourceRoot, source);\n\t }\n\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\n\t source = this._sources.indexOf(source);\n\t var needle = {\n\t source: source,\n\t originalLine: util$5.getArg(aArgs, 'line'),\n\t originalColumn: util$5.getArg(aArgs, 'column')\n\t };\n\n\t var index = this._findMapping(needle, this._originalMappings, \"originalLine\", \"originalColumn\", util$5.compareByOriginalPositions, util$5.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND));\n\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util$5.getArg(mapping, 'generatedLine', null),\n\t column: util$5.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util$5.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t};\n\n\tvar BasicSourceMapConsumer_1 = BasicSourceMapConsumer;\n\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\n\t var version = util$5.getArg(sourceMap, 'version');\n\t var sections = util$5.getArg(sourceMap, 'sections');\n\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\n\t var offset = util$5.getArg(s, 'offset');\n\t var offsetLine = util$5.getArg(offset, 'line');\n\t var offsetColumn = util$5.getArg(offset, 'column');\n\n\t if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\n\t lastOffset = offset;\n\t return {\n\t generatedOffset: {\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer$1(util$5.getArg(s, 'map'))\n\t };\n\t });\n\t}\n\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer$1;\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function get() {\n\t var sources = [];\n\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\n\t return sources;\n\t }\n\t});\n\n\tIndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util$5.getArg(aArgs, 'line'),\n\t generatedColumn: util$5.getArg(aArgs, 'column')\n\t };\n\t var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\n\t if (cmp) {\n\t return cmp;\n\t }\n\n\t return needle.generatedColumn - section.generatedOffset.generatedColumn;\n\t });\n\t var section = this._sections[sectionIndex];\n\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),\n\t bias: aArgs.bias\n\t });\n\t};\n\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t};\n\n\tIndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\n\t if (content) {\n\t return content;\n\t }\n\t }\n\n\t if (nullOnMissing) {\n\t return null;\n\t } else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t};\n\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\n\t if (section.consumer.sources.indexOf(util$5.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t};\n\n\tIndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\n\t var source = section.consumer._sources.at(mapping.source);\n\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util$5.join(section.consumer.sourceRoot, source);\n\t }\n\n\t this._sources.add(source);\n\n\t source = this._sources.indexOf(source);\n\n\t var name = section.consumer._names.at(mapping.name);\n\n\t this._names.add(name);\n\n\t name = this._names.indexOf(name);\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\n\t this.__generatedMappings.push(adjustedMapping);\n\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\n\t quickSort(this.__generatedMappings, util$5.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util$5.compareByOriginalPositions);\n\t};\n\n\tvar IndexedSourceMapConsumer_1 = IndexedSourceMapConsumer;\n\tvar sourceMapConsumer = {\n\t SourceMapConsumer: SourceMapConsumer_1,\n\t BasicSourceMapConsumer: BasicSourceMapConsumer_1,\n\t IndexedSourceMapConsumer: IndexedSourceMapConsumer_1\n\t};\n\n\tvar SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator;\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\tvar NEWLINE_CODE = 10;\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\n\tfunction SourceNode$1(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\n\tSourceNode$1.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t var node = new SourceNode$1();\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\n\t var shiftNextLine = function shiftNextLine() {\n\t var lineContents = getNextLine();\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\n\t var lastGeneratedLine = 1,\n\t lastGeneratedColumn = 0;\n\t var lastMapping = null;\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t } else {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\n\t lastMapping = mapping;\n\t }, this);\n\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util$5.join(aRelativePath, sourceFile);\n\t }\n\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return node;\n\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath ? util$5.join(aRelativePath, mapping.source) : mapping.source;\n\t node.add(new SourceNode$1(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));\n\t }\n\t }\n\t};\n\n\tSourceNode$1.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t } else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t } else {\n\t throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk);\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length - 1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t } else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t } else {\n\t throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk);\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t } else {\n\t if (chunk !== '') {\n\t aFn(chunk, {\n\t source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name\n\t });\n\t }\n\t }\n\t }\n\t};\n\n\tSourceNode$1.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\n\t if (len > 0) {\n\t newChildren = [];\n\n\t for (i = 0; i < len - 1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t } else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t } else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util$5.toSetString(aSourceFile)] = aSourceContent;\n\t};\n\n\tSourceNode$1.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\n\t var sources = Object.keys(this.sourceContents);\n\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util$5.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t};\n\n\tSourceNode$1.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\n\tSourceNode$1.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator$1(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\n\t if (original.source !== null && original.line !== null && original.column !== null) {\n\t if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t return {\n\t code: generated.code,\n\t map: map\n\t };\n\t};\n\n\tvar SourceNode_1 = SourceNode$1;\n\tvar sourceNode = {\n\t SourceNode: SourceNode_1\n\t};\n\n\tvar SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;\n\tvar SourceMapConsumer = sourceMapConsumer.SourceMapConsumer;\n\tvar SourceNode = sourceNode.SourceNode;\n\tvar sourceMap = {\n\t SourceMapGenerator: SourceMapGenerator,\n\t SourceMapConsumer: SourceMapConsumer,\n\t SourceNode: SourceNode\n\t};\n\n\tvar SourceMap = function () {\n\t function SourceMap(opts, code) {\n\t this._cachedMap = void 0;\n\t this._code = void 0;\n\t this._opts = void 0;\n\t this._rawMappings = void 0;\n\t this._lastGenLine = void 0;\n\t this._lastSourceLine = void 0;\n\t this._lastSourceColumn = void 0;\n\t this._cachedMap = null;\n\t this._code = code;\n\t this._opts = opts;\n\t this._rawMappings = [];\n\t }\n\n\t var _proto = SourceMap.prototype;\n\n\t _proto.get = function get() {\n\t if (!this._cachedMap) {\n\t var map = this._cachedMap = new sourceMap.SourceMapGenerator({\n\t sourceRoot: this._opts.sourceRoot\n\t });\n\t var code = this._code;\n\n\t if (typeof code === \"string\") {\n\t map.setSourceContent(this._opts.sourceFileName.replace(/\\\\/g, \"/\"), code);\n\t } else if (typeof code === \"object\") {\n\t Object.keys(code).forEach(function (sourceFileName) {\n\t map.setSourceContent(sourceFileName.replace(/\\\\/g, \"/\"), code[sourceFileName]);\n\t });\n\t }\n\n\t this._rawMappings.forEach(function (mapping) {\n\t return map.addMapping(mapping);\n\t }, map);\n\t }\n\n\t return this._cachedMap.toJSON();\n\t };\n\n\t _proto.getRawMappings = function getRawMappings() {\n\t return this._rawMappings.slice();\n\t };\n\n\t _proto.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {\n\t if (this._lastGenLine !== generatedLine && line === null) return;\n\n\t if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {\n\t return;\n\t }\n\n\t this._cachedMap = null;\n\t this._lastGenLine = generatedLine;\n\t this._lastSourceLine = line;\n\t this._lastSourceColumn = column;\n\n\t this._rawMappings.push({\n\t name: identifierName || undefined,\n\t generated: {\n\t line: generatedLine,\n\t column: generatedColumn\n\t },\n\t source: line == null ? undefined : (filename || this._opts.sourceFileName).replace(/\\\\/g, \"/\"),\n\t original: line == null ? undefined : {\n\t line: line,\n\t column: column\n\t }\n\t });\n\t };\n\n\t return SourceMap;\n\t}();\n\n\tvar SPACES_RE = /^[ \\t]+$/;\n\n\tvar Buffer = function () {\n\t function Buffer(map) {\n\t this._map = null;\n\t this._buf = \"\";\n\t this._last = 0;\n\t this._queue = [];\n\t this._position = {\n\t line: 1,\n\t column: 0\n\t };\n\t this._sourcePosition = {\n\t identifierName: null,\n\t line: null,\n\t column: null,\n\t filename: null\n\t };\n\t this._disallowedPop = null;\n\t this._map = map;\n\t }\n\n\t var _proto = Buffer.prototype;\n\n\t _proto.get = function get() {\n\t this._flush();\n\n\t var map = this._map;\n\t var result = {\n\t code: this._buf.trimRight(),\n\t map: null,\n\t rawMappings: map == null ? void 0 : map.getRawMappings()\n\t };\n\n\t if (map) {\n\t Object.defineProperty(result, \"map\", {\n\t configurable: true,\n\t enumerable: true,\n\t get: function get() {\n\t return this.map = map.get();\n\t },\n\t set: function set(value) {\n\t Object.defineProperty(this, \"map\", {\n\t value: value,\n\t writable: true\n\t });\n\t }\n\t });\n\t }\n\n\t return result;\n\t };\n\n\t _proto.append = function append(str) {\n\t this._flush();\n\n\t var _this$_sourcePosition = this._sourcePosition,\n\t line = _this$_sourcePosition.line,\n\t column = _this$_sourcePosition.column,\n\t filename = _this$_sourcePosition.filename,\n\t identifierName = _this$_sourcePosition.identifierName,\n\t force = _this$_sourcePosition.force;\n\n\t this._append(str, line, column, identifierName, filename, force);\n\t };\n\n\t _proto.queue = function queue(str) {\n\t if (str === \"\\n\") {\n\t while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {\n\t this._queue.shift();\n\t }\n\t }\n\n\t var _this$_sourcePosition2 = this._sourcePosition,\n\t line = _this$_sourcePosition2.line,\n\t column = _this$_sourcePosition2.column,\n\t filename = _this$_sourcePosition2.filename,\n\t identifierName = _this$_sourcePosition2.identifierName,\n\t force = _this$_sourcePosition2.force;\n\n\t this._queue.unshift([str, line, column, identifierName, filename, force]);\n\t };\n\n\t _proto._flush = function _flush() {\n\t var item;\n\n\t while (item = this._queue.pop()) {\n\t this._append.apply(this, _toConsumableArray(item));\n\t }\n\t };\n\n\t _proto._append = function _append(str, line, column, identifierName, filename, force) {\n\t this._buf += str;\n\t this._last = str.charCodeAt(str.length - 1);\n\t var i = str.indexOf(\"\\n\");\n\t var last = 0;\n\n\t if (i !== 0) {\n\t this._mark(line, column, identifierName, filename, force);\n\t }\n\n\t while (i !== -1) {\n\t this._position.line++;\n\t this._position.column = 0;\n\t last = i + 1;\n\n\t if (last < str.length) {\n\t this._mark(++line, 0, identifierName, filename, force);\n\t }\n\n\t i = str.indexOf(\"\\n\", last);\n\t }\n\n\t this._position.column += str.length - last;\n\t };\n\n\t _proto._mark = function _mark(line, column, identifierName, filename, force) {\n\t var _this$_map;\n\n\t (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);\n\t };\n\n\t _proto.removeTrailingNewline = function removeTrailingNewline() {\n\t if (this._queue.length > 0 && this._queue[0][0] === \"\\n\") {\n\t this._queue.shift();\n\t }\n\t };\n\n\t _proto.removeLastSemicolon = function removeLastSemicolon() {\n\t if (this._queue.length > 0 && this._queue[0][0] === \";\") {\n\t this._queue.shift();\n\t }\n\t };\n\n\t _proto.getLastChar = function getLastChar() {\n\t var last;\n\n\t if (this._queue.length > 0) {\n\t var _str = this._queue[0][0];\n\t last = _str.charCodeAt(0);\n\t } else {\n\t last = this._last;\n\t }\n\n\t return last;\n\t };\n\n\t _proto.endsWithCharAndNewline = function endsWithCharAndNewline() {\n\t var queue = this._queue;\n\n\t if (queue.length > 0) {\n\t var last = queue[0][0];\n\t var lastCp = last.charCodeAt(0);\n\t if (lastCp !== 10) return;\n\n\t if (queue.length > 1) {\n\t var secondLast = queue[1][0];\n\t return secondLast.charCodeAt(0);\n\t } else {\n\t return this._last;\n\t }\n\t }\n\t };\n\n\t _proto.hasContent = function hasContent() {\n\t return this._queue.length > 0 || !!this._last;\n\t };\n\n\t _proto.exactSource = function exactSource(loc, cb) {\n\t this.source(\"start\", loc, true);\n\t cb();\n\t this.source(\"end\", loc);\n\n\t this._disallowPop(\"start\", loc);\n\t };\n\n\t _proto.source = function source(prop, loc, force) {\n\t if (prop && !loc) return;\n\n\t this._normalizePosition(prop, loc, this._sourcePosition, force);\n\t };\n\n\t _proto.withSource = function withSource(prop, loc, cb) {\n\t if (!this._map) return cb();\n\t var originalLine = this._sourcePosition.line;\n\t var originalColumn = this._sourcePosition.column;\n\t var originalFilename = this._sourcePosition.filename;\n\t var originalIdentifierName = this._sourcePosition.identifierName;\n\t this.source(prop, loc);\n\t cb();\n\n\t if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {\n\t this._sourcePosition.line = originalLine;\n\t this._sourcePosition.column = originalColumn;\n\t this._sourcePosition.filename = originalFilename;\n\t this._sourcePosition.identifierName = originalIdentifierName;\n\t this._sourcePosition.force = false;\n\t this._disallowedPop = null;\n\t }\n\t };\n\n\t _proto._disallowPop = function _disallowPop(prop, loc) {\n\t if (prop && !loc) return;\n\t this._disallowedPop = this._normalizePosition(prop, loc);\n\t };\n\n\t _proto._normalizePosition = function _normalizePosition(prop, loc, targetObj, force) {\n\t var pos = loc ? loc[prop] : null;\n\n\t if (targetObj === undefined) {\n\t targetObj = {\n\t identifierName: null,\n\t line: null,\n\t column: null,\n\t filename: null,\n\t force: false\n\t };\n\t }\n\n\t var origLine = targetObj.line;\n\t var origColumn = targetObj.column;\n\t var origFilename = targetObj.filename;\n\t targetObj.identifierName = prop === \"start\" && (loc == null ? void 0 : loc.identifierName) || null;\n\t targetObj.line = pos == null ? void 0 : pos.line;\n\t targetObj.column = pos == null ? void 0 : pos.column;\n\t targetObj.filename = loc == null ? void 0 : loc.filename;\n\n\t if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {\n\t targetObj.force = force;\n\t }\n\n\t return targetObj;\n\t };\n\n\t _proto.getCurrentColumn = function getCurrentColumn() {\n\t var extra = this._queue.reduce(function (acc, item) {\n\t return item[0] + acc;\n\t }, \"\");\n\n\t var lastIndex = extra.lastIndexOf(\"\\n\");\n\t return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;\n\t };\n\n\t _proto.getCurrentLine = function getCurrentLine() {\n\t var extra = this._queue.reduce(function (acc, item) {\n\t return item[0] + acc;\n\t }, \"\");\n\n\t var count = 0;\n\n\t for (var i = 0; i < extra.length; i++) {\n\t if (extra[i] === \"\\n\") count++;\n\t }\n\n\t return this._position.line + count;\n\t };\n\n\t return Buffer;\n\t}();\n\n\tvar FLIPPED_ALIAS_KEYS$2 = FLIPPED_ALIAS_KEYS$3,\n\t isArrayExpression = isArrayExpression$2,\n\t isAssignmentExpression$2 = isAssignmentExpression$3,\n\t isBinary$1 = isBinary$3,\n\t isBlockStatement$1 = isBlockStatement$2,\n\t isCallExpression$5 = isCallExpression$6,\n\t isFunction$3 = isFunction$4,\n\t isIdentifier$d = isIdentifier$g,\n\t isLiteral$5 = isLiteral$7,\n\t isMemberExpression$6 = isMemberExpression$8,\n\t isObjectExpression$1 = isObjectExpression$3,\n\t isOptionalCallExpression$2 = isOptionalCallExpression$3,\n\t isOptionalMemberExpression$2 = isOptionalMemberExpression$3,\n\t isStringLiteral$6 = isStringLiteral$7;\n\n\tfunction crawl(node, state) {\n\t if (state === void 0) {\n\t state = {};\n\t }\n\n\t if (isMemberExpression$6(node) || isOptionalMemberExpression$2(node)) {\n\t crawl(node.object, state);\n\t if (node.computed) crawl(node.property, state);\n\t } else if (isBinary$1(node) || isAssignmentExpression$2(node)) {\n\t crawl(node.left, state);\n\t crawl(node.right, state);\n\t } else if (isCallExpression$5(node) || isOptionalCallExpression$2(node)) {\n\t state.hasCall = true;\n\t crawl(node.callee, state);\n\t } else if (isFunction$3(node)) {\n\t state.hasFunction = true;\n\t } else if (isIdentifier$d(node)) {\n\t state.hasHelper = state.hasHelper || isHelper(node.callee);\n\t }\n\n\t return state;\n\t}\n\n\tfunction isHelper(node) {\n\t if (isMemberExpression$6(node)) {\n\t return isHelper(node.object) || isHelper(node.property);\n\t } else if (isIdentifier$d(node)) {\n\t return node.name === \"require\" || node.name[0] === \"_\";\n\t } else if (isCallExpression$5(node)) {\n\t return isHelper(node.callee);\n\t } else if (isBinary$1(node) || isAssignmentExpression$2(node)) {\n\t return isIdentifier$d(node.left) && isHelper(node.left) || isHelper(node.right);\n\t } else {\n\t return false;\n\t }\n\t}\n\n\tfunction isType$1(node) {\n\t return isLiteral$5(node) || isObjectExpression$1(node) || isArrayExpression(node) || isIdentifier$d(node) || isMemberExpression$6(node);\n\t}\n\n\tvar nodes = {\n\t AssignmentExpression: function (_AssignmentExpression) {\n\t function AssignmentExpression(_x) {\n\t return _AssignmentExpression.apply(this, arguments);\n\t }\n\n\t AssignmentExpression.toString = function () {\n\t return _AssignmentExpression.toString();\n\t };\n\n\t return AssignmentExpression;\n\t }(function (node) {\n\t var state = crawl(node.right);\n\n\t if (state.hasCall && state.hasHelper || state.hasFunction) {\n\t return {\n\t before: state.hasFunction,\n\t after: true\n\t };\n\t }\n\t }),\n\t SwitchCase: function (_SwitchCase) {\n\t function SwitchCase(_x2, _x3) {\n\t return _SwitchCase.apply(this, arguments);\n\t }\n\n\t SwitchCase.toString = function () {\n\t return _SwitchCase.toString();\n\t };\n\n\t return SwitchCase;\n\t }(function (node, parent) {\n\t return {\n\t before: !!node.consequent.length || parent.cases[0] === node,\n\t after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node\n\t };\n\t }),\n\t LogicalExpression: function (_LogicalExpression) {\n\t function LogicalExpression(_x4) {\n\t return _LogicalExpression.apply(this, arguments);\n\t }\n\n\t LogicalExpression.toString = function () {\n\t return _LogicalExpression.toString();\n\t };\n\n\t return LogicalExpression;\n\t }(function (node) {\n\t if (isFunction$3(node.left) || isFunction$3(node.right)) {\n\t return {\n\t after: true\n\t };\n\t }\n\t }),\n\t Literal: function (_Literal) {\n\t function Literal(_x5) {\n\t return _Literal.apply(this, arguments);\n\t }\n\n\t Literal.toString = function () {\n\t return _Literal.toString();\n\t };\n\n\t return Literal;\n\t }(function (node) {\n\t if (isStringLiteral$6(node) && node.value === \"use strict\") {\n\t return {\n\t after: true\n\t };\n\t }\n\t }),\n\t CallExpression: function (_CallExpression) {\n\t function CallExpression(_x6) {\n\t return _CallExpression.apply(this, arguments);\n\t }\n\n\t CallExpression.toString = function () {\n\t return _CallExpression.toString();\n\t };\n\n\t return CallExpression;\n\t }(function (node) {\n\t if (isFunction$3(node.callee) || isHelper(node)) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t }),\n\t OptionalCallExpression: function (_OptionalCallExpression) {\n\t function OptionalCallExpression(_x7) {\n\t return _OptionalCallExpression.apply(this, arguments);\n\t }\n\n\t OptionalCallExpression.toString = function () {\n\t return _OptionalCallExpression.toString();\n\t };\n\n\t return OptionalCallExpression;\n\t }(function (node) {\n\t if (isFunction$3(node.callee)) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t }),\n\t VariableDeclaration: function (_VariableDeclaration) {\n\t function VariableDeclaration(_x8) {\n\t return _VariableDeclaration.apply(this, arguments);\n\t }\n\n\t VariableDeclaration.toString = function () {\n\t return _VariableDeclaration.toString();\n\t };\n\n\t return VariableDeclaration;\n\t }(function (node) {\n\t for (var i = 0; i < node.declarations.length; i++) {\n\t var declar = node.declarations[i];\n\t var enabled = isHelper(declar.id) && !isType$1(declar.init);\n\n\t if (!enabled) {\n\t var state = crawl(declar.init);\n\t enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;\n\t }\n\n\t if (enabled) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t }\n\t }),\n\t IfStatement: function (_IfStatement) {\n\t function IfStatement(_x9) {\n\t return _IfStatement.apply(this, arguments);\n\t }\n\n\t IfStatement.toString = function () {\n\t return _IfStatement.toString();\n\t };\n\n\t return IfStatement;\n\t }(function (node) {\n\t if (isBlockStatement$1(node.consequent)) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t })\n\t};\n\n\tnodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {\n\t if (parent.properties[0] === node) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tnodes.ObjectTypeCallProperty = function (node, parent) {\n\t var _parent$properties;\n\n\t if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tnodes.ObjectTypeIndexer = function (node, parent) {\n\t var _parent$properties2, _parent$callPropertie;\n\n\t if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tnodes.ObjectTypeInternalSlot = function (node, parent) {\n\t var _parent$properties3, _parent$callPropertie2, _parent$indexers;\n\n\t if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tvar list$1 = {\n\t VariableDeclaration: function (_VariableDeclaration2) {\n\t function VariableDeclaration(_x10) {\n\t return _VariableDeclaration2.apply(this, arguments);\n\t }\n\n\t VariableDeclaration.toString = function () {\n\t return _VariableDeclaration2.toString();\n\t };\n\n\t return VariableDeclaration;\n\t }(function (node) {\n\t return node.declarations.map(function (decl) {\n\t return decl.init;\n\t });\n\t }),\n\t ArrayExpression: function (_ArrayExpression) {\n\t function ArrayExpression(_x11) {\n\t return _ArrayExpression.apply(this, arguments);\n\t }\n\n\t ArrayExpression.toString = function () {\n\t return _ArrayExpression.toString();\n\t };\n\n\t return ArrayExpression;\n\t }(function (node) {\n\t return node.elements;\n\t }),\n\t ObjectExpression: function (_ObjectExpression) {\n\t function ObjectExpression(_x12) {\n\t return _ObjectExpression.apply(this, arguments);\n\t }\n\n\t ObjectExpression.toString = function () {\n\t return _ObjectExpression.toString();\n\t };\n\n\t return ObjectExpression;\n\t }(function (node) {\n\t return node.properties;\n\t })\n\t};\n\t[[\"Function\", true], [\"Class\", true], [\"Loop\", true], [\"LabeledStatement\", true], [\"SwitchStatement\", true], [\"TryStatement\", true]].forEach(function (_ref) {\n\t var _ref2 = _slicedToArray$1(_ref, 2),\n\t type = _ref2[0],\n\t amounts = _ref2[1];\n\n\t if (typeof amounts === \"boolean\") {\n\t amounts = {\n\t after: amounts,\n\t before: amounts\n\t };\n\t }\n\n\t [type].concat(FLIPPED_ALIAS_KEYS$2[type] || []).forEach(function (type) {\n\t nodes[type] = function () {\n\t return amounts;\n\t };\n\t });\n\t});\n\n\tvar isArrayTypeAnnotation = isArrayTypeAnnotation$1,\n\t isArrowFunctionExpression = isArrowFunctionExpression$1,\n\t isAssignmentExpression$1 = isAssignmentExpression$3,\n\t isAwaitExpression = isAwaitExpression$1,\n\t isBinary = isBinary$3,\n\t isBinaryExpression = isBinaryExpression$1,\n\t isCallExpression$4 = isCallExpression$6,\n\t isClassDeclaration$1 = isClassDeclaration$3,\n\t isClassExpression = isClassExpression$1,\n\t isConditional = isConditional$1,\n\t isConditionalExpression = isConditionalExpression$1,\n\t isExportDeclaration = isExportDeclaration$2,\n\t isExportDefaultDeclaration$1 = isExportDefaultDeclaration$3,\n\t isExpressionStatement$3 = isExpressionStatement$4,\n\t isFor$1 = isFor$2,\n\t isForInStatement = isForInStatement$1,\n\t isForOfStatement = isForOfStatement$1,\n\t isForStatement$1 = isForStatement$3,\n\t isIfStatement$1 = isIfStatement$2,\n\t isIndexedAccessType = isIndexedAccessType$1,\n\t isIntersectionTypeAnnotation = isIntersectionTypeAnnotation$1,\n\t isLogicalExpression = isLogicalExpression$1,\n\t isMemberExpression$5 = isMemberExpression$8,\n\t isNewExpression$3 = isNewExpression$4,\n\t isNullableTypeAnnotation = isNullableTypeAnnotation$1,\n\t isObjectPattern = isObjectPattern$1,\n\t isOptionalCallExpression$1 = isOptionalCallExpression$3,\n\t isOptionalMemberExpression$1 = isOptionalMemberExpression$3,\n\t isReturnStatement = isReturnStatement$1,\n\t isSequenceExpression = isSequenceExpression$1,\n\t isSwitchStatement = isSwitchStatement$1,\n\t isTSArrayType = isTSArrayType$1,\n\t isTSAsExpression$1 = isTSAsExpression$2,\n\t isTSIntersectionType = isTSIntersectionType$1,\n\t isTSNonNullExpression$1 = isTSNonNullExpression$2,\n\t isTSOptionalType = isTSOptionalType$1,\n\t isTSRestType = isTSRestType$1,\n\t isTSTypeAssertion$1 = isTSTypeAssertion$2,\n\t isTSUnionType = isTSUnionType$1,\n\t isTaggedTemplateExpression = isTaggedTemplateExpression$2,\n\t isThrowStatement = isThrowStatement$1,\n\t isTypeAnnotation$1 = isTypeAnnotation$2,\n\t isUnaryLike = isUnaryLike$1,\n\t isUnionTypeAnnotation$1 = isUnionTypeAnnotation$2,\n\t isVariableDeclarator$1 = isVariableDeclarator$2,\n\t isWhileStatement = isWhileStatement$1,\n\t isYieldExpression = isYieldExpression$1;\n\tvar PRECEDENCE = {\n\t \"||\": 0,\n\t \"??\": 0,\n\t \"&&\": 1,\n\t \"|\": 2,\n\t \"^\": 3,\n\t \"&\": 4,\n\t \"==\": 5,\n\t \"===\": 5,\n\t \"!=\": 5,\n\t \"!==\": 5,\n\t \"<\": 6,\n\t \">\": 6,\n\t \"<=\": 6,\n\t \">=\": 6,\n\t \"in\": 6,\n\t \"instanceof\": 6,\n\t \">>\": 7,\n\t \"<<\": 7,\n\t \">>>\": 7,\n\t \"+\": 8,\n\t \"-\": 8,\n\t \"*\": 9,\n\t \"/\": 9,\n\t \"%\": 9,\n\t \"**\": 10\n\t};\n\n\tvar isClassExtendsClause = function isClassExtendsClause(node, parent) {\n\t return (isClassDeclaration$1(parent) || isClassExpression(parent)) && parent.superClass === node;\n\t};\n\n\tvar hasPostfixPart = function hasPostfixPart(node, parent) {\n\t return (isMemberExpression$5(parent) || isOptionalMemberExpression$1(parent)) && parent.object === node || (isCallExpression$4(parent) || isOptionalCallExpression$1(parent) || isNewExpression$3(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression$1(parent);\n\t};\n\n\tfunction NullableTypeAnnotation$1(node, parent) {\n\t return isArrayTypeAnnotation(parent);\n\t}\n\tfunction FunctionTypeAnnotation$1(node, parent, printStack) {\n\t return isUnionTypeAnnotation$1(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation$1(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]);\n\t}\n\tfunction UpdateExpression$2(node, parent) {\n\t return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);\n\t}\n\tfunction ObjectExpression$2(node, parent, printStack) {\n\t return isFirstInContext(printStack, {\n\t expressionStatement: true,\n\t arrowBody: true\n\t });\n\t}\n\tfunction DoExpression$1(node, parent, printStack) {\n\t return !node.async && isFirstInContext(printStack, {\n\t expressionStatement: true\n\t });\n\t}\n\tfunction Binary(node, parent) {\n\t if (node.operator === \"**\" && isBinaryExpression(parent, {\n\t operator: \"**\"\n\t })) {\n\t return parent.left === node;\n\t }\n\n\t if (isClassExtendsClause(node, parent)) {\n\t return true;\n\t }\n\n\t if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) {\n\t return true;\n\t }\n\n\t if (isBinary(parent)) {\n\t var parentOp = parent.operator;\n\t var parentPos = PRECEDENCE[parentOp];\n\t var nodeOp = node.operator;\n\t var nodePos = PRECEDENCE[nodeOp];\n\n\t if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) {\n\t return true;\n\t }\n\t }\n\t}\n\tfunction UnionTypeAnnotation$1(node, parent) {\n\t return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation$1(parent);\n\t}\n\tfunction OptionalIndexedAccessType$1(node, parent) {\n\t return isIndexedAccessType(parent, {\n\t objectType: node\n\t });\n\t}\n\tfunction TSAsExpression$1() {\n\t return true;\n\t}\n\tfunction TSTypeAssertion$1() {\n\t return true;\n\t}\n\tfunction TSUnionType$1(node, parent) {\n\t return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent);\n\t}\n\tfunction TSInferType$1(node, parent) {\n\t return isTSArrayType(parent) || isTSOptionalType(parent);\n\t}\n\tfunction BinaryExpression$1(node, parent) {\n\t return node.operator === \"in\" && (isVariableDeclarator$1(parent) || isFor$1(parent));\n\t}\n\tfunction SequenceExpression$2(node, parent) {\n\t if (isForStatement$1(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement$1(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement$3(parent) && parent.expression === node) {\n\t return false;\n\t }\n\n\t return true;\n\t}\n\tfunction YieldExpression$1(node, parent) {\n\t return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);\n\t}\n\tfunction ClassExpression(node, parent, printStack) {\n\t return isFirstInContext(printStack, {\n\t expressionStatement: true,\n\t exportDefault: true\n\t });\n\t}\n\tfunction UnaryLike(node, parent) {\n\t return hasPostfixPart(node, parent) || isBinaryExpression(parent, {\n\t operator: \"**\",\n\t left: node\n\t }) || isClassExtendsClause(node, parent);\n\t}\n\tfunction FunctionExpression$1(node, parent, printStack) {\n\t return isFirstInContext(printStack, {\n\t expressionStatement: true,\n\t exportDefault: true\n\t });\n\t}\n\tfunction ArrowFunctionExpression$1(node, parent) {\n\t return isExportDeclaration(parent) || ConditionalExpression$2(node, parent);\n\t}\n\tfunction ConditionalExpression$2(node, parent) {\n\t if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, {\n\t test: node\n\t }) || isAwaitExpression(parent) || isTSTypeAssertion$1(parent) || isTSAsExpression$1(parent)) {\n\t return true;\n\t }\n\n\t return UnaryLike(node, parent);\n\t}\n\tfunction OptionalMemberExpression$1(node, parent) {\n\t return isCallExpression$4(parent, {\n\t callee: node\n\t }) || isMemberExpression$5(parent, {\n\t object: node\n\t });\n\t}\n\tfunction AssignmentExpression$2(node, parent) {\n\t if (isObjectPattern(node.left)) {\n\t return true;\n\t } else {\n\t return ConditionalExpression$2(node, parent);\n\t }\n\t}\n\tfunction LogicalExpression$1(node, parent) {\n\t switch (node.operator) {\n\t case \"||\":\n\t if (!isLogicalExpression(parent)) return false;\n\t return parent.operator === \"??\" || parent.operator === \"&&\";\n\n\t case \"&&\":\n\t return isLogicalExpression(parent, {\n\t operator: \"??\"\n\t });\n\n\t case \"??\":\n\t return isLogicalExpression(parent) && parent.operator !== \"??\";\n\t }\n\t}\n\tfunction Identifier$1(node, parent, printStack) {\n\t if (node.name === \"let\") {\n\t var isFollowedByBracket = isMemberExpression$5(parent, {\n\t object: node,\n\t computed: true\n\t }) || isOptionalMemberExpression$1(parent, {\n\t object: node,\n\t computed: true,\n\t optional: false\n\t });\n\t return isFirstInContext(printStack, {\n\t expressionStatement: isFollowedByBracket,\n\t forHead: isFollowedByBracket,\n\t forInHead: isFollowedByBracket,\n\t forOfHead: true\n\t });\n\t }\n\n\t return node.name === \"async\" && isForOfStatement(parent) && node === parent.left;\n\t}\n\n\tfunction isFirstInContext(printStack, _ref) {\n\t var _ref$expressionStatem = _ref.expressionStatement,\n\t expressionStatement = _ref$expressionStatem === void 0 ? false : _ref$expressionStatem,\n\t _ref$arrowBody = _ref.arrowBody,\n\t arrowBody = _ref$arrowBody === void 0 ? false : _ref$arrowBody,\n\t _ref$exportDefault = _ref.exportDefault,\n\t exportDefault = _ref$exportDefault === void 0 ? false : _ref$exportDefault,\n\t _ref$forHead = _ref.forHead,\n\t forHead = _ref$forHead === void 0 ? false : _ref$forHead,\n\t _ref$forInHead = _ref.forInHead,\n\t forInHead = _ref$forInHead === void 0 ? false : _ref$forInHead,\n\t _ref$forOfHead = _ref.forOfHead,\n\t forOfHead = _ref$forOfHead === void 0 ? false : _ref$forOfHead;\n\t var i = printStack.length - 1;\n\t var node = printStack[i];\n\t i--;\n\t var parent = printStack[i];\n\n\t while (i >= 0) {\n\t if (expressionStatement && isExpressionStatement$3(parent, {\n\t expression: node\n\t }) || exportDefault && isExportDefaultDeclaration$1(parent, {\n\t declaration: node\n\t }) || arrowBody && isArrowFunctionExpression(parent, {\n\t body: node\n\t }) || forHead && isForStatement$1(parent, {\n\t init: node\n\t }) || forInHead && isForInStatement(parent, {\n\t left: node\n\t }) || forOfHead && isForOfStatement(parent, {\n\t left: node\n\t })) {\n\t return true;\n\t }\n\n\t if (hasPostfixPart(node, parent) && !isNewExpression$3(parent) || isSequenceExpression(parent) && parent.expressions[0] === node || isConditional(parent, {\n\t test: node\n\t }) || isBinary(parent, {\n\t left: node\n\t }) || isAssignmentExpression$1(parent, {\n\t left: node\n\t })) {\n\t node = parent;\n\t i--;\n\t parent = printStack[i];\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tvar parens = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tNullableTypeAnnotation: NullableTypeAnnotation$1,\n\t\tFunctionTypeAnnotation: FunctionTypeAnnotation$1,\n\t\tUpdateExpression: UpdateExpression$2,\n\t\tObjectExpression: ObjectExpression$2,\n\t\tDoExpression: DoExpression$1,\n\t\tBinary: Binary,\n\t\tUnionTypeAnnotation: UnionTypeAnnotation$1,\n\t\tIntersectionTypeAnnotation: UnionTypeAnnotation$1,\n\t\tOptionalIndexedAccessType: OptionalIndexedAccessType$1,\n\t\tTSAsExpression: TSAsExpression$1,\n\t\tTSTypeAssertion: TSTypeAssertion$1,\n\t\tTSUnionType: TSUnionType$1,\n\t\tTSIntersectionType: TSUnionType$1,\n\t\tTSInferType: TSInferType$1,\n\t\tBinaryExpression: BinaryExpression$1,\n\t\tSequenceExpression: SequenceExpression$2,\n\t\tYieldExpression: YieldExpression$1,\n\t\tAwaitExpression: YieldExpression$1,\n\t\tClassExpression: ClassExpression,\n\t\tUnaryLike: UnaryLike,\n\t\tFunctionExpression: FunctionExpression$1,\n\t\tArrowFunctionExpression: ArrowFunctionExpression$1,\n\t\tConditionalExpression: ConditionalExpression$2,\n\t\tOptionalMemberExpression: OptionalMemberExpression$1,\n\t\tOptionalCallExpression: OptionalMemberExpression$1,\n\t\tAssignmentExpression: AssignmentExpression$2,\n\t\tLogicalExpression: LogicalExpression$1,\n\t\tIdentifier: Identifier$1\n\t});\n\n\tvar FLIPPED_ALIAS_KEYS$1 = FLIPPED_ALIAS_KEYS$3,\n\t isCallExpression$3 = isCallExpression$6,\n\t isExpressionStatement$2 = isExpressionStatement$4,\n\t isMemberExpression$4 = isMemberExpression$8,\n\t isNewExpression$2 = isNewExpression$4;\n\n\tfunction expandAliases(obj) {\n\t var newObj = {};\n\n\t function add(type, func) {\n\t var fn = newObj[type];\n\t newObj[type] = fn ? function (node, parent, stack) {\n\t var result = fn(node, parent, stack);\n\t return result == null ? func(node, parent, stack) : result;\n\t } : func;\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {\n\t var type = _Object$keys[_i];\n\t var aliases = FLIPPED_ALIAS_KEYS$1[type];\n\n\t if (aliases) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {\n\t var alias = _step.value;\n\t add(alias, obj[type]);\n\t }\n\t } else {\n\t add(type, obj[type]);\n\t }\n\t }\n\n\t return newObj;\n\t}\n\n\tvar expandedParens = expandAliases(parens);\n\tvar expandedWhitespaceNodes = expandAliases(nodes);\n\tvar expandedWhitespaceList = expandAliases(list$1);\n\n\tfunction find$2(obj, node, parent, printStack) {\n\t var fn = obj[node.type];\n\t return fn ? fn(node, parent, printStack) : null;\n\t}\n\n\tfunction isOrHasCallExpression(node) {\n\t if (isCallExpression$3(node)) {\n\t return true;\n\t }\n\n\t return isMemberExpression$4(node) && isOrHasCallExpression(node.object);\n\t}\n\n\tfunction needsWhitespace(node, parent, type) {\n\t if (!node) return 0;\n\n\t if (isExpressionStatement$2(node)) {\n\t node = node.expression;\n\t }\n\n\t var linesInfo = find$2(expandedWhitespaceNodes, node, parent);\n\n\t if (!linesInfo) {\n\t var items = find$2(expandedWhitespaceList, node, parent);\n\n\t if (items) {\n\t for (var i = 0; i < items.length; i++) {\n\t linesInfo = needsWhitespace(items[i], node, type);\n\t if (linesInfo) break;\n\t }\n\t }\n\t }\n\n\t if (typeof linesInfo === \"object\" && linesInfo !== null) {\n\t return linesInfo[type] || 0;\n\t }\n\n\t return 0;\n\t}\n\tfunction needsWhitespaceBefore$1(node, parent) {\n\t return needsWhitespace(node, parent, \"before\");\n\t}\n\tfunction needsWhitespaceAfter$1(node, parent) {\n\t return needsWhitespace(node, parent, \"after\");\n\t}\n\tfunction needsParens$1(node, parent, printStack) {\n\t if (!parent) return false;\n\n\t if (isNewExpression$2(parent) && parent.callee === node) {\n\t if (isOrHasCallExpression(node)) return true;\n\t }\n\n\t return find$2(expandedParens, node, parent, printStack);\n\t}\n\n\tfunction TaggedTemplateExpression$1(node) {\n\t this.print(node.tag, node);\n\t this.print(node.typeParameters, node);\n\t this.print(node.quasi, node);\n\t}\n\tfunction TemplateElement(node, parent) {\n\t var isFirst = parent.quasis[0] === node;\n\t var isLast = parent.quasis[parent.quasis.length - 1] === node;\n\t var value = (isFirst ? \"`\" : \"}\") + node.value.raw + (isLast ? \"`\" : \"${\");\n\t this.token(value);\n\t}\n\tfunction TemplateLiteral$1(node) {\n\t var quasis = node.quasis;\n\n\t for (var i = 0; i < quasis.length; i++) {\n\t this.print(quasis[i], node);\n\n\t if (i + 1 < quasis.length) {\n\t this.print(node.expressions[i], node);\n\t }\n\t }\n\t}\n\n\tvar isCallExpression$2 = isCallExpression$6,\n\t isLiteral$4 = isLiteral$7,\n\t isMemberExpression$3 = isMemberExpression$8,\n\t isNewExpression$1 = isNewExpression$4;\n\tfunction UnaryExpression$1(node) {\n\t if (node.operator === \"void\" || node.operator === \"delete\" || node.operator === \"typeof\" || node.operator === \"throw\") {\n\t this.word(node.operator);\n\t this.space();\n\t } else {\n\t this.token(node.operator);\n\t }\n\n\t this.print(node.argument, node);\n\t}\n\tfunction DoExpression(node) {\n\t if (node.async) {\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t this.word(\"do\");\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ParenthesizedExpression$1(node) {\n\t this.token(\"(\");\n\t this.print(node.expression, node);\n\t this.token(\")\");\n\t}\n\tfunction UpdateExpression$1(node) {\n\t if (node.prefix) {\n\t this.token(node.operator);\n\t this.print(node.argument, node);\n\t } else {\n\t this.startTerminatorless(true);\n\t this.print(node.argument, node);\n\t this.endTerminatorless();\n\t this.token(node.operator);\n\t }\n\t}\n\tfunction ConditionalExpression$1(node) {\n\t this.print(node.test, node);\n\t this.space();\n\t this.token(\"?\");\n\t this.space();\n\t this.print(node.consequent, node);\n\t this.space();\n\t this.token(\":\");\n\t this.space();\n\t this.print(node.alternate, node);\n\t}\n\tfunction NewExpression$1(node, parent) {\n\t this.word(\"new\");\n\t this.space();\n\t this.print(node.callee, node);\n\n\t if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression$2(parent, {\n\t callee: node\n\t }) && !isMemberExpression$3(parent) && !isNewExpression$1(parent)) {\n\t return;\n\t }\n\n\t this.print(node.typeArguments, node);\n\t this.print(node.typeParameters, node);\n\n\t if (node.optional) {\n\t this.token(\"?.\");\n\t }\n\n\t this.token(\"(\");\n\t this.printList(node.arguments, node);\n\t this.token(\")\");\n\t}\n\tfunction SequenceExpression$1(node) {\n\t this.printList(node.expressions, node);\n\t}\n\tfunction ThisExpression() {\n\t this.word(\"this\");\n\t}\n\tfunction Super() {\n\t this.word(\"super\");\n\t}\n\tfunction Decorator(node) {\n\t this.token(\"@\");\n\t this.print(node.expression, node);\n\t this.newline();\n\t}\n\tfunction OptionalMemberExpression(node) {\n\t this.print(node.object, node);\n\n\t if (!node.computed && isMemberExpression$3(node.property)) {\n\t throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n\t }\n\n\t var computed = node.computed;\n\n\t if (isLiteral$4(node.property) && typeof node.property.value === \"number\") {\n\t computed = true;\n\t }\n\n\t if (node.optional) {\n\t this.token(\"?.\");\n\t }\n\n\t if (computed) {\n\t this.token(\"[\");\n\t this.print(node.property, node);\n\t this.token(\"]\");\n\t } else {\n\t if (!node.optional) {\n\t this.token(\".\");\n\t }\n\n\t this.print(node.property, node);\n\t }\n\t}\n\tfunction OptionalCallExpression(node) {\n\t this.print(node.callee, node);\n\t this.print(node.typeArguments, node);\n\t this.print(node.typeParameters, node);\n\n\t if (node.optional) {\n\t this.token(\"?.\");\n\t }\n\n\t this.token(\"(\");\n\t this.printList(node.arguments, node);\n\t this.token(\")\");\n\t}\n\tfunction CallExpression$1(node) {\n\t this.print(node.callee, node);\n\t this.print(node.typeArguments, node);\n\t this.print(node.typeParameters, node);\n\t this.token(\"(\");\n\t this.printList(node.arguments, node);\n\t this.token(\")\");\n\t}\n\tfunction Import() {\n\t this.word(\"import\");\n\t}\n\n\tfunction buildYieldAwait(keyword) {\n\t return function (node) {\n\t this.word(keyword);\n\n\t if (node.delegate) {\n\t this.token(\"*\");\n\t }\n\n\t if (node.argument) {\n\t this.space();\n\t var terminatorState = this.startTerminatorless();\n\t this.print(node.argument, node);\n\t this.endTerminatorless(terminatorState);\n\t }\n\t };\n\t}\n\n\tvar YieldExpression = buildYieldAwait(\"yield\");\n\tvar AwaitExpression = buildYieldAwait(\"await\");\n\tfunction EmptyStatement() {\n\t this.semicolon(true);\n\t}\n\tfunction ExpressionStatement(node) {\n\t this.print(node.expression, node);\n\t this.semicolon();\n\t}\n\tfunction AssignmentPattern(node) {\n\t this.print(node.left, node);\n\t if (node.left.optional) this.token(\"?\");\n\t this.print(node.left.typeAnnotation, node);\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.right, node);\n\t}\n\tfunction AssignmentExpression$1(node, parent) {\n\t var parens = this.inForStatementInitCounter && node.operator === \"in\" && !needsParens$1(node, parent);\n\n\t if (parens) {\n\t this.token(\"(\");\n\t }\n\n\t this.print(node.left, node);\n\t this.space();\n\n\t if (node.operator === \"in\" || node.operator === \"instanceof\") {\n\t this.word(node.operator);\n\t } else {\n\t this.token(node.operator);\n\t }\n\n\t this.space();\n\t this.print(node.right, node);\n\n\t if (parens) {\n\t this.token(\")\");\n\t }\n\t}\n\tfunction BindExpression(node) {\n\t this.print(node.object, node);\n\t this.token(\"::\");\n\t this.print(node.callee, node);\n\t}\n\tfunction MemberExpression(node) {\n\t this.print(node.object, node);\n\n\t if (!node.computed && isMemberExpression$3(node.property)) {\n\t throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n\t }\n\n\t var computed = node.computed;\n\n\t if (isLiteral$4(node.property) && typeof node.property.value === \"number\") {\n\t computed = true;\n\t }\n\n\t if (computed) {\n\t this.token(\"[\");\n\t this.print(node.property, node);\n\t this.token(\"]\");\n\t } else {\n\t this.token(\".\");\n\t this.print(node.property, node);\n\t }\n\t}\n\tfunction MetaProperty(node) {\n\t this.print(node.meta, node);\n\t this.token(\".\");\n\t this.print(node.property, node);\n\t}\n\tfunction PrivateName(node) {\n\t this.token(\"#\");\n\t this.print(node.id, node);\n\t}\n\tfunction V8IntrinsicIdentifier(node) {\n\t this.token(\"%\");\n\t this.word(node.name);\n\t}\n\tfunction ModuleExpression(node) {\n\t this.word(\"module\");\n\t this.space();\n\t this.token(\"{\");\n\n\t if (node.body.body.length === 0) {\n\t this.token(\"}\");\n\t } else {\n\t this.newline();\n\t this.printSequence(node.body.body, node, {\n\t indent: true\n\t });\n\t this.rightBrace();\n\t }\n\t}\n\n\tvar isFor = isFor$2,\n\t isForStatement = isForStatement$3,\n\t isIfStatement = isIfStatement$2,\n\t isStatement$5 = isStatement$7;\n\tfunction WithStatement(node) {\n\t this.word(\"with\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.object, node);\n\t this.token(\")\");\n\t this.printBlock(node);\n\t}\n\tfunction IfStatement(node) {\n\t this.word(\"if\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.test, node);\n\t this.token(\")\");\n\t this.space();\n\t var needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));\n\n\t if (needsBlock) {\n\t this.token(\"{\");\n\t this.newline();\n\t this.indent();\n\t }\n\n\t this.printAndIndentOnComments(node.consequent, node);\n\n\t if (needsBlock) {\n\t this.dedent();\n\t this.newline();\n\t this.token(\"}\");\n\t }\n\n\t if (node.alternate) {\n\t if (this.endsWith(125)) this.space();\n\t this.word(\"else\");\n\t this.space();\n\t this.printAndIndentOnComments(node.alternate, node);\n\t }\n\t}\n\n\tfunction getLastStatement(statement) {\n\t if (!isStatement$5(statement.body)) return statement;\n\t return getLastStatement(statement.body);\n\t}\n\n\tfunction ForStatement(node) {\n\t this.word(\"for\");\n\t this.space();\n\t this.token(\"(\");\n\t this.inForStatementInitCounter++;\n\t this.print(node.init, node);\n\t this.inForStatementInitCounter--;\n\t this.token(\";\");\n\n\t if (node.test) {\n\t this.space();\n\t this.print(node.test, node);\n\t }\n\n\t this.token(\";\");\n\n\t if (node.update) {\n\t this.space();\n\t this.print(node.update, node);\n\t }\n\n\t this.token(\")\");\n\t this.printBlock(node);\n\t}\n\tfunction WhileStatement(node) {\n\t this.word(\"while\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.test, node);\n\t this.token(\")\");\n\t this.printBlock(node);\n\t}\n\n\tvar buildForXStatement = function buildForXStatement(op) {\n\t return function (node) {\n\t this.word(\"for\");\n\t this.space();\n\n\t if (op === \"of\" && node[\"await\"]) {\n\t this.word(\"await\");\n\t this.space();\n\t }\n\n\t this.token(\"(\");\n\t this.print(node.left, node);\n\t this.space();\n\t this.word(op);\n\t this.space();\n\t this.print(node.right, node);\n\t this.token(\")\");\n\t this.printBlock(node);\n\t };\n\t};\n\n\tvar ForInStatement = buildForXStatement(\"in\");\n\tvar ForOfStatement = buildForXStatement(\"of\");\n\tfunction DoWhileStatement(node) {\n\t this.word(\"do\");\n\t this.space();\n\t this.print(node.body, node);\n\t this.space();\n\t this.word(\"while\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.test, node);\n\t this.token(\")\");\n\t this.semicolon();\n\t}\n\n\tfunction buildLabelStatement(prefix, key) {\n\t if (key === void 0) {\n\t key = \"label\";\n\t }\n\n\t return function (node) {\n\t this.word(prefix);\n\t var label = node[key];\n\n\t if (label) {\n\t this.space();\n\t var isLabel = key == \"label\";\n\t var terminatorState = this.startTerminatorless(isLabel);\n\t this.print(label, node);\n\t this.endTerminatorless(terminatorState);\n\t }\n\n\t this.semicolon();\n\t };\n\t}\n\n\tvar ContinueStatement = buildLabelStatement(\"continue\");\n\tvar ReturnStatement = buildLabelStatement(\"return\", \"argument\");\n\tvar BreakStatement = buildLabelStatement(\"break\");\n\tvar ThrowStatement = buildLabelStatement(\"throw\", \"argument\");\n\tfunction LabeledStatement(node) {\n\t this.print(node.label, node);\n\t this.token(\":\");\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction TryStatement(node) {\n\t this.word(\"try\");\n\t this.space();\n\t this.print(node.block, node);\n\t this.space();\n\n\t if (node.handlers) {\n\t this.print(node.handlers[0], node);\n\t } else {\n\t this.print(node.handler, node);\n\t }\n\n\t if (node.finalizer) {\n\t this.space();\n\t this.word(\"finally\");\n\t this.space();\n\t this.print(node.finalizer, node);\n\t }\n\t}\n\tfunction CatchClause(node) {\n\t this.word(\"catch\");\n\t this.space();\n\n\t if (node.param) {\n\t this.token(\"(\");\n\t this.print(node.param, node);\n\t this.print(node.param.typeAnnotation, node);\n\t this.token(\")\");\n\t this.space();\n\t }\n\n\t this.print(node.body, node);\n\t}\n\tfunction SwitchStatement(node) {\n\t this.word(\"switch\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.discriminant, node);\n\t this.token(\")\");\n\t this.space();\n\t this.token(\"{\");\n\t this.printSequence(node.cases, node, {\n\t indent: true,\n\t addNewlines: function addNewlines(leading, cas) {\n\t if (!leading && node.cases[node.cases.length - 1] === cas) return -1;\n\t }\n\t });\n\t this.token(\"}\");\n\t}\n\tfunction SwitchCase(node) {\n\t if (node.test) {\n\t this.word(\"case\");\n\t this.space();\n\t this.print(node.test, node);\n\t this.token(\":\");\n\t } else {\n\t this.word(\"default\");\n\t this.token(\":\");\n\t }\n\n\t if (node.consequent.length) {\n\t this.newline();\n\t this.printSequence(node.consequent, node, {\n\t indent: true\n\t });\n\t }\n\t}\n\tfunction DebuggerStatement() {\n\t this.word(\"debugger\");\n\t this.semicolon();\n\t}\n\n\tfunction variableDeclarationIndent() {\n\t this.token(\",\");\n\t this.newline();\n\n\t if (this.endsWith(10)) {\n\t for (var i = 0; i < 4; i++) {\n\t this.space(true);\n\t }\n\t }\n\t}\n\n\tfunction constDeclarationIndent() {\n\t this.token(\",\");\n\t this.newline();\n\n\t if (this.endsWith(10)) {\n\t for (var i = 0; i < 6; i++) {\n\t this.space(true);\n\t }\n\t }\n\t}\n\n\tfunction VariableDeclaration(node, parent) {\n\t if (node.declare) {\n\t this.word(\"declare\");\n\t this.space();\n\t }\n\n\t this.word(node.kind);\n\t this.space();\n\t var hasInits = false;\n\n\t if (!isFor(parent)) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(node.declarations), _step; !(_step = _iterator()).done;) {\n\t var declar = _step.value;\n\n\t if (declar.init) {\n\t hasInits = true;\n\t }\n\t }\n\t }\n\n\t var separator;\n\n\t if (hasInits) {\n\t separator = node.kind === \"const\" ? constDeclarationIndent : variableDeclarationIndent;\n\t }\n\n\t this.printList(node.declarations, node, {\n\t separator: separator\n\t });\n\n\t if (isFor(parent)) {\n\t if (isForStatement(parent)) {\n\t if (parent.init === node) return;\n\t } else {\n\t if (parent.left === node) return;\n\t }\n\t }\n\n\t this.semicolon();\n\t}\n\tfunction VariableDeclarator$1(node) {\n\t this.print(node.id, node);\n\t if (node.definite) this.token(\"!\");\n\t this.print(node.id.typeAnnotation, node);\n\n\t if (node.init) {\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.init, node);\n\t }\n\t}\n\n\tvar isExportDefaultDeclaration = isExportDefaultDeclaration$3,\n\t isExportNamedDeclaration = isExportNamedDeclaration$2;\n\tfunction ClassDeclaration(node, parent) {\n\t if (!this.format.decoratorsBeforeExport || !isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent)) {\n\t this.printJoin(node.decorators, node);\n\t }\n\n\t if (node.declare) {\n\t this.word(\"declare\");\n\t this.space();\n\t }\n\n\t if (node[\"abstract\"]) {\n\t this.word(\"abstract\");\n\t this.space();\n\t }\n\n\t this.word(\"class\");\n\n\t if (node.id) {\n\t this.space();\n\t this.print(node.id, node);\n\t }\n\n\t this.print(node.typeParameters, node);\n\n\t if (node.superClass) {\n\t this.space();\n\t this.word(\"extends\");\n\t this.space();\n\t this.print(node.superClass, node);\n\t this.print(node.superTypeParameters, node);\n\t }\n\n\t if (node[\"implements\"]) {\n\t this.space();\n\t this.word(\"implements\");\n\t this.space();\n\t this.printList(node[\"implements\"], node);\n\t }\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ClassBody(node) {\n\t this.token(\"{\");\n\t this.printInnerComments(node);\n\n\t if (node.body.length === 0) {\n\t this.token(\"}\");\n\t } else {\n\t this.newline();\n\t this.indent();\n\t this.printSequence(node.body, node);\n\t this.dedent();\n\t if (!this.endsWith(10)) this.newline();\n\t this.rightBrace();\n\t }\n\t}\n\tfunction ClassProperty(node) {\n\t this.printJoin(node.decorators, node);\n\t this.source(\"end\", node.key.loc);\n\t this.tsPrintClassMemberModifiers(node, true);\n\n\t if (node.computed) {\n\t this.token(\"[\");\n\t this.print(node.key, node);\n\t this.token(\"]\");\n\t } else {\n\t this._variance(node);\n\n\t this.print(node.key, node);\n\t }\n\n\t if (node.optional) {\n\t this.token(\"?\");\n\t }\n\n\t if (node.definite) {\n\t this.token(\"!\");\n\t }\n\n\t this.print(node.typeAnnotation, node);\n\n\t if (node.value) {\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.value, node);\n\t }\n\n\t this.semicolon();\n\t}\n\tfunction ClassPrivateProperty(node) {\n\t this.printJoin(node.decorators, node);\n\n\t if (node[\"static\"]) {\n\t this.word(\"static\");\n\t this.space();\n\t }\n\n\t this.print(node.key, node);\n\t this.print(node.typeAnnotation, node);\n\n\t if (node.value) {\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.value, node);\n\t }\n\n\t this.semicolon();\n\t}\n\tfunction ClassMethod(node) {\n\t this._classMethodHead(node);\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ClassPrivateMethod(node) {\n\t this._classMethodHead(node);\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction _classMethodHead(node) {\n\t this.printJoin(node.decorators, node);\n\t this.source(\"end\", node.key.loc);\n\t this.tsPrintClassMemberModifiers(node, false);\n\n\t this._methodHead(node);\n\t}\n\tfunction StaticBlock(node) {\n\t this.word(\"static\");\n\t this.space();\n\t this.token(\"{\");\n\n\t if (node.body.length === 0) {\n\t this.token(\"}\");\n\t } else {\n\t this.newline();\n\t this.printSequence(node.body, node, {\n\t indent: true\n\t });\n\t this.rightBrace();\n\t }\n\t}\n\n\tvar isIdentifier$c = isIdentifier$g;\n\tfunction _params(node) {\n\t this.print(node.typeParameters, node);\n\t this.token(\"(\");\n\n\t this._parameters(node.params, node);\n\n\t this.token(\")\");\n\t this.print(node.returnType, node);\n\t}\n\tfunction _parameters(parameters, parent) {\n\t for (var i = 0; i < parameters.length; i++) {\n\t this._param(parameters[i], parent);\n\n\t if (i < parameters.length - 1) {\n\t this.token(\",\");\n\t this.space();\n\t }\n\t }\n\t}\n\tfunction _param(parameter, parent) {\n\t this.printJoin(parameter.decorators, parameter);\n\t this.print(parameter, parent);\n\t if (parameter.optional) this.token(\"?\");\n\t this.print(parameter.typeAnnotation, parameter);\n\t}\n\tfunction _methodHead(node) {\n\t var kind = node.kind;\n\t var key = node.key;\n\n\t if (kind === \"get\" || kind === \"set\") {\n\t this.word(kind);\n\t this.space();\n\t }\n\n\t if (node.async) {\n\t this._catchUp(\"start\", key.loc);\n\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t if (kind === \"method\" || kind === \"init\") {\n\t if (node.generator) {\n\t this.token(\"*\");\n\t }\n\t }\n\n\t if (node.computed) {\n\t this.token(\"[\");\n\t this.print(key, node);\n\t this.token(\"]\");\n\t } else {\n\t this.print(key, node);\n\t }\n\n\t if (node.optional) {\n\t this.token(\"?\");\n\t }\n\n\t this._params(node);\n\t}\n\tfunction _predicate(node) {\n\t if (node.predicate) {\n\t if (!node.returnType) {\n\t this.token(\":\");\n\t }\n\n\t this.space();\n\t this.print(node.predicate, node);\n\t }\n\t}\n\tfunction _functionHead(node) {\n\t if (node.async) {\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t this.word(\"function\");\n\t if (node.generator) this.token(\"*\");\n\t this.space();\n\n\t if (node.id) {\n\t this.print(node.id, node);\n\t }\n\n\t this._params(node);\n\n\t this._predicate(node);\n\t}\n\tfunction FunctionExpression(node) {\n\t this._functionHead(node);\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ArrowFunctionExpression(node) {\n\t if (node.async) {\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t var firstParam = node.params[0];\n\n\t if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && isIdentifier$c(firstParam) && !hasTypesOrComments(node, firstParam)) {\n\t this.print(firstParam, node);\n\t } else {\n\t this._params(node);\n\t }\n\n\t this._predicate(node);\n\n\t this.space();\n\t this.token(\"=>\");\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\n\tfunction hasTypesOrComments(node, param) {\n\t var _param$leadingComment, _param$trailingCommen;\n\n\t return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);\n\t}\n\n\tvar isClassDeclaration = isClassDeclaration$3,\n\t isExportDefaultSpecifier = isExportDefaultSpecifier$1,\n\t isExportNamespaceSpecifier = isExportNamespaceSpecifier$1,\n\t isImportDefaultSpecifier = isImportDefaultSpecifier$1,\n\t isImportNamespaceSpecifier = isImportNamespaceSpecifier$1,\n\t isStatement$4 = isStatement$7;\n\tfunction ImportSpecifier(node) {\n\t if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n\t this.word(node.importKind);\n\t this.space();\n\t }\n\n\t this.print(node.imported, node);\n\n\t if (node.local && node.local.name !== node.imported.name) {\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.local, node);\n\t }\n\t}\n\tfunction ImportDefaultSpecifier(node) {\n\t this.print(node.local, node);\n\t}\n\tfunction ExportDefaultSpecifier(node) {\n\t this.print(node.exported, node);\n\t}\n\tfunction ExportSpecifier(node) {\n\t this.print(node.local, node);\n\n\t if (node.exported && node.local.name !== node.exported.name) {\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.exported, node);\n\t }\n\t}\n\tfunction ExportNamespaceSpecifier(node) {\n\t this.token(\"*\");\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.exported, node);\n\t}\n\tfunction ExportAllDeclaration(node) {\n\t this.word(\"export\");\n\t this.space();\n\n\t if (node.exportKind === \"type\") {\n\t this.word(\"type\");\n\t this.space();\n\t }\n\n\t this.token(\"*\");\n\t this.space();\n\t this.word(\"from\");\n\t this.space();\n\t this.print(node.source, node);\n\t this.printAssertions(node);\n\t this.semicolon();\n\t}\n\tfunction ExportNamedDeclaration(node) {\n\t if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {\n\t this.printJoin(node.declaration.decorators, node);\n\t }\n\n\t this.word(\"export\");\n\t this.space();\n\t ExportDeclaration.apply(this, arguments);\n\t}\n\tfunction ExportDefaultDeclaration(node) {\n\t if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {\n\t this.printJoin(node.declaration.decorators, node);\n\t }\n\n\t this.word(\"export\");\n\t this.space();\n\t this.word(\"default\");\n\t this.space();\n\t ExportDeclaration.apply(this, arguments);\n\t}\n\n\tfunction ExportDeclaration(node) {\n\t if (node.declaration) {\n\t var declar = node.declaration;\n\t this.print(declar, node);\n\t if (!isStatement$4(declar)) this.semicolon();\n\t } else {\n\t if (node.exportKind === \"type\") {\n\t this.word(\"type\");\n\t this.space();\n\t }\n\n\t var specifiers = node.specifiers.slice(0);\n\t var hasSpecial = false;\n\n\t for (;;) {\n\t var first = specifiers[0];\n\n\t if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {\n\t hasSpecial = true;\n\t this.print(specifiers.shift(), node);\n\n\t if (specifiers.length) {\n\t this.token(\",\");\n\t this.space();\n\t }\n\t } else {\n\t break;\n\t }\n\t }\n\n\t if (specifiers.length || !specifiers.length && !hasSpecial) {\n\t this.token(\"{\");\n\n\t if (specifiers.length) {\n\t this.space();\n\t this.printList(specifiers, node);\n\t this.space();\n\t }\n\n\t this.token(\"}\");\n\t }\n\n\t if (node.source) {\n\t this.space();\n\t this.word(\"from\");\n\t this.space();\n\t this.print(node.source, node);\n\t this.printAssertions(node);\n\t }\n\n\t this.semicolon();\n\t }\n\t}\n\n\tfunction ImportDeclaration(node) {\n\t this.word(\"import\");\n\t this.space();\n\n\t if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n\t this.word(node.importKind);\n\t this.space();\n\t }\n\n\t var specifiers = node.specifiers.slice(0);\n\n\t if (specifiers != null && specifiers.length) {\n\t for (;;) {\n\t var first = specifiers[0];\n\n\t if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {\n\t this.print(specifiers.shift(), node);\n\n\t if (specifiers.length) {\n\t this.token(\",\");\n\t this.space();\n\t }\n\t } else {\n\t break;\n\t }\n\t }\n\n\t if (specifiers.length) {\n\t this.token(\"{\");\n\t this.space();\n\t this.printList(specifiers, node);\n\t this.space();\n\t this.token(\"}\");\n\t }\n\n\t this.space();\n\t this.word(\"from\");\n\t this.space();\n\t }\n\n\t this.print(node.source, node);\n\t this.printAssertions(node);\n\t {\n\t var _node$attributes;\n\n\t if ((_node$attributes = node.attributes) != null && _node$attributes.length) {\n\t this.space();\n\t this.word(\"with\");\n\t this.space();\n\t this.printList(node.attributes, node);\n\t }\n\t }\n\t this.semicolon();\n\t}\n\tfunction ImportAttribute(node) {\n\t this.print(node.key);\n\t this.token(\":\");\n\t this.space();\n\t this.print(node.value);\n\t}\n\tfunction ImportNamespaceSpecifier(node) {\n\t this.token(\"*\");\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.local, node);\n\t}\n\n\tvar byteLength_1 = byteLength;\n\tvar toByteArray_1 = toByteArray;\n\tvar fromByteArray_1 = fromByteArray;\n\tvar lookup = [];\n\tvar revLookup = [];\n\tvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\tvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n\tfor (var i = 0, len = code.length; i < len; ++i) {\n\t lookup[i] = code[i];\n\t revLookup[code.charCodeAt(i)] = i;\n\t}\n\n\trevLookup['-'.charCodeAt(0)] = 62;\n\trevLookup['_'.charCodeAt(0)] = 63;\n\n\tfunction getLens(b64) {\n\t var len = b64.length;\n\n\t if (len % 4 > 0) {\n\t throw new Error('Invalid string. Length must be a multiple of 4');\n\t }\n\n\t var validLen = b64.indexOf('=');\n\t if (validLen === -1) validLen = len;\n\t var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n\t return [validLen, placeHoldersLen];\n\t}\n\n\tfunction byteLength(b64) {\n\t var lens = getLens(b64);\n\t var validLen = lens[0];\n\t var placeHoldersLen = lens[1];\n\t return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n\t}\n\n\tfunction _byteLength(b64, validLen, placeHoldersLen) {\n\t return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n\t}\n\n\tfunction toByteArray(b64) {\n\t var tmp;\n\t var lens = getLens(b64);\n\t var validLen = lens[0];\n\t var placeHoldersLen = lens[1];\n\t var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\t var curByte = 0;\n\t var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n\t var i;\n\n\t for (i = 0; i < len; i += 4) {\n\t tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];\n\t arr[curByte++] = tmp >> 16 & 0xFF;\n\t arr[curByte++] = tmp >> 8 & 0xFF;\n\t arr[curByte++] = tmp & 0xFF;\n\t }\n\n\t if (placeHoldersLen === 2) {\n\t tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;\n\t arr[curByte++] = tmp & 0xFF;\n\t }\n\n\t if (placeHoldersLen === 1) {\n\t tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;\n\t arr[curByte++] = tmp >> 8 & 0xFF;\n\t arr[curByte++] = tmp & 0xFF;\n\t }\n\n\t return arr;\n\t}\n\n\tfunction tripletToBase64(num) {\n\t return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];\n\t}\n\n\tfunction encodeChunk(uint8, start, end) {\n\t var tmp;\n\t var output = [];\n\n\t for (var i = start; i < end; i += 3) {\n\t tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n\t output.push(tripletToBase64(tmp));\n\t }\n\n\t return output.join('');\n\t}\n\n\tfunction fromByteArray(uint8) {\n\t var tmp;\n\t var len = uint8.length;\n\t var extraBytes = len % 3;\n\t var parts = [];\n\t var maxChunkLength = 16383;\n\n\t for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n\t parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n\t }\n\n\t if (extraBytes === 1) {\n\t tmp = uint8[len - 1];\n\t parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');\n\t } else if (extraBytes === 2) {\n\t tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n\t parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');\n\t }\n\n\t return parts.join('');\n\t}\n\n\tvar base64Js = {\n\t byteLength: byteLength_1,\n\t toByteArray: toByteArray_1,\n\t fromByteArray: fromByteArray_1\n\t};\n\n\tvar read = function read(buffer, offset, isLE, mLen, nBytes) {\n\t var e, m;\n\t var eLen = nBytes * 8 - mLen - 1;\n\t var eMax = (1 << eLen) - 1;\n\t var eBias = eMax >> 1;\n\t var nBits = -7;\n\t var i = isLE ? nBytes - 1 : 0;\n\t var d = isLE ? -1 : 1;\n\t var s = buffer[offset + i];\n\t i += d;\n\t e = s & (1 << -nBits) - 1;\n\t s >>= -nBits;\n\t nBits += eLen;\n\n\t for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n\t m = e & (1 << -nBits) - 1;\n\t e >>= -nBits;\n\t nBits += mLen;\n\n\t for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n\t if (e === 0) {\n\t e = 1 - eBias;\n\t } else if (e === eMax) {\n\t return m ? NaN : (s ? -1 : 1) * Infinity;\n\t } else {\n\t m = m + Math.pow(2, mLen);\n\t e = e - eBias;\n\t }\n\n\t return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n\t};\n\n\tvar write = function write(buffer, value, offset, isLE, mLen, nBytes) {\n\t var e, m, c;\n\t var eLen = nBytes * 8 - mLen - 1;\n\t var eMax = (1 << eLen) - 1;\n\t var eBias = eMax >> 1;\n\t var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n\t var i = isLE ? 0 : nBytes - 1;\n\t var d = isLE ? 1 : -1;\n\t var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n\t value = Math.abs(value);\n\n\t if (isNaN(value) || value === Infinity) {\n\t m = isNaN(value) ? 1 : 0;\n\t e = eMax;\n\t } else {\n\t e = Math.floor(Math.log(value) / Math.LN2);\n\n\t if (value * (c = Math.pow(2, -e)) < 1) {\n\t e--;\n\t c *= 2;\n\t }\n\n\t if (e + eBias >= 1) {\n\t value += rt / c;\n\t } else {\n\t value += rt * Math.pow(2, 1 - eBias);\n\t }\n\n\t if (value * c >= 2) {\n\t e++;\n\t c /= 2;\n\t }\n\n\t if (e + eBias >= eMax) {\n\t m = 0;\n\t e = eMax;\n\t } else if (e + eBias >= 1) {\n\t m = (value * c - 1) * Math.pow(2, mLen);\n\t e = e + eBias;\n\t } else {\n\t m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n\t e = 0;\n\t }\n\t }\n\n\t for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n\t e = e << mLen | m;\n\t eLen += mLen;\n\n\t for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n\t buffer[offset + i - d] |= s * 128;\n\t};\n\n\tvar ieee754 = {\n\t read: read,\n\t write: write\n\t};\n\n\t/*!\n\t * The buffer module from node.js, for the browser.\n\t *\n\t * @author Feross Aboukhadijeh \n\t * @license MIT\n\t */\n\tvar buffer = createCommonjsModule(function (module, exports) {\n\n\t exports.Buffer = Buffer;\n\t exports.SlowBuffer = SlowBuffer;\n\t exports.INSPECT_MAX_BYTES = 50;\n\t var K_MAX_LENGTH = 0x7fffffff;\n\t exports.kMaxLength = K_MAX_LENGTH;\n\t Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') {\n\t 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.');\n\t }\n\n\t function typedArraySupport() {\n\t try {\n\t var arr = new Uint8Array(1);\n\t arr.__proto__ = {\n\t __proto__: Uint8Array.prototype,\n\t foo: function foo() {\n\t return 42;\n\t }\n\t };\n\t return arr.foo() === 42;\n\t } catch (e) {\n\t return false;\n\t }\n\t }\n\n\t Object.defineProperty(Buffer.prototype, 'parent', {\n\t enumerable: true,\n\t get: function get() {\n\t if (!Buffer.isBuffer(this)) return undefined;\n\t return this.buffer;\n\t }\n\t });\n\t Object.defineProperty(Buffer.prototype, 'offset', {\n\t enumerable: true,\n\t get: function get() {\n\t if (!Buffer.isBuffer(this)) return undefined;\n\t return this.byteOffset;\n\t }\n\t });\n\n\t function createBuffer(length) {\n\t if (length > K_MAX_LENGTH) {\n\t throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n\t }\n\n\t var buf = new Uint8Array(length);\n\t buf.__proto__ = Buffer.prototype;\n\t return buf;\n\t }\n\n\t function Buffer(arg, encodingOrOffset, length) {\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new TypeError('The \"string\" argument must be of type string. Received type number');\n\t }\n\n\t return allocUnsafe(arg);\n\t }\n\n\t return from(arg, encodingOrOffset, length);\n\t }\n\n\t if (typeof Symbol !== 'undefined' && Symbol.species != null && Buffer[Symbol.species] === Buffer) {\n\t Object.defineProperty(Buffer, Symbol.species, {\n\t value: null,\n\t configurable: true,\n\t enumerable: false,\n\t writable: false\n\t });\n\t }\n\n\t Buffer.poolSize = 8192;\n\n\t function from(value, encodingOrOffset, length) {\n\t if (typeof value === 'string') {\n\t return fromString(value, encodingOrOffset);\n\t }\n\n\t if (ArrayBuffer.isView(value)) {\n\t return fromArrayLike(value);\n\t }\n\n\t if (value == null) {\n\t throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);\n\t }\n\n\t if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n\t return fromArrayBuffer(value, encodingOrOffset, length);\n\t }\n\n\t if (typeof value === 'number') {\n\t throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n\t }\n\n\t var valueOf = value.valueOf && value.valueOf();\n\n\t if (valueOf != null && valueOf !== value) {\n\t return Buffer.from(valueOf, encodingOrOffset, length);\n\t }\n\n\t var b = fromObject(value);\n\t if (b) return b;\n\n\t if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') {\n\t return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);\n\t }\n\n\t throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);\n\t }\n\n\t Buffer.from = function (value, encodingOrOffset, length) {\n\t return from(value, encodingOrOffset, length);\n\t };\n\n\t Buffer.prototype.__proto__ = Uint8Array.prototype;\n\t Buffer.__proto__ = Uint8Array;\n\n\t function assertSize(size) {\n\t if (typeof size !== 'number') {\n\t throw new TypeError('\"size\" argument must be of type number');\n\t } else if (size < 0) {\n\t throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n\t }\n\t }\n\n\t function alloc(size, fill, encoding) {\n\t assertSize(size);\n\n\t if (size <= 0) {\n\t return createBuffer(size);\n\t }\n\n\t if (fill !== undefined) {\n\t return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);\n\t }\n\n\t return createBuffer(size);\n\t }\n\n\t Buffer.alloc = function (size, fill, encoding) {\n\t return alloc(size, fill, encoding);\n\t };\n\n\t function allocUnsafe(size) {\n\t assertSize(size);\n\t return createBuffer(size < 0 ? 0 : checked(size) | 0);\n\t }\n\n\t Buffer.allocUnsafe = function (size) {\n\t return allocUnsafe(size);\n\t };\n\n\t Buffer.allocUnsafeSlow = function (size) {\n\t return allocUnsafe(size);\n\t };\n\n\t function fromString(string, encoding) {\n\t if (typeof encoding !== 'string' || encoding === '') {\n\t encoding = 'utf8';\n\t }\n\n\t if (!Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding);\n\t }\n\n\t var length = byteLength(string, encoding) | 0;\n\t var buf = createBuffer(length);\n\t var actual = buf.write(string, encoding);\n\n\t if (actual !== length) {\n\t buf = buf.slice(0, actual);\n\t }\n\n\t return buf;\n\t }\n\n\t function fromArrayLike(array) {\n\t var length = array.length < 0 ? 0 : checked(array.length) | 0;\n\t var buf = createBuffer(length);\n\n\t for (var i = 0; i < length; i += 1) {\n\t buf[i] = array[i] & 255;\n\t }\n\n\t return buf;\n\t }\n\n\t function fromArrayBuffer(array, byteOffset, length) {\n\t if (byteOffset < 0 || array.byteLength < byteOffset) {\n\t throw new RangeError('\"offset\" is outside of buffer bounds');\n\t }\n\n\t if (array.byteLength < byteOffset + (length || 0)) {\n\t throw new RangeError('\"length\" is outside of buffer bounds');\n\t }\n\n\t var buf;\n\n\t if (byteOffset === undefined && length === undefined) {\n\t buf = new Uint8Array(array);\n\t } else if (length === undefined) {\n\t buf = new Uint8Array(array, byteOffset);\n\t } else {\n\t buf = new Uint8Array(array, byteOffset, length);\n\t }\n\n\t buf.__proto__ = Buffer.prototype;\n\t return buf;\n\t }\n\n\t function fromObject(obj) {\n\t if (Buffer.isBuffer(obj)) {\n\t var len = checked(obj.length) | 0;\n\t var buf = createBuffer(len);\n\n\t if (buf.length === 0) {\n\t return buf;\n\t }\n\n\t obj.copy(buf, 0, 0, len);\n\t return buf;\n\t }\n\n\t if (obj.length !== undefined) {\n\t if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n\t return createBuffer(0);\n\t }\n\n\t return fromArrayLike(obj);\n\t }\n\n\t if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n\t return fromArrayLike(obj.data);\n\t }\n\t }\n\n\t function checked(length) {\n\t if (length >= K_MAX_LENGTH) {\n\t throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');\n\t }\n\n\t return length | 0;\n\t }\n\n\t function SlowBuffer(length) {\n\t if (+length != length) {\n\t length = 0;\n\t }\n\n\t return Buffer.alloc(+length);\n\t }\n\n\t Buffer.isBuffer = function isBuffer(b) {\n\t return b != null && b._isBuffer === true && b !== Buffer.prototype;\n\t };\n\n\t Buffer.compare = function compare(a, b) {\n\t if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n\t if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n\n\t if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n\t throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n\t }\n\n\t if (a === b) return 0;\n\t var x = a.length;\n\t var y = b.length;\n\n\t for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n\t if (a[i] !== b[i]) {\n\t x = a[i];\n\t y = b[i];\n\t break;\n\t }\n\t }\n\n\t if (x < y) return -1;\n\t if (y < x) return 1;\n\t return 0;\n\t };\n\n\t Buffer.isEncoding = function isEncoding(encoding) {\n\t switch (String(encoding).toLowerCase()) {\n\t case 'hex':\n\t case 'utf8':\n\t case 'utf-8':\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t case 'base64':\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return true;\n\n\t default:\n\t return false;\n\t }\n\t };\n\n\t Buffer.concat = function concat(list, length) {\n\t if (!Array.isArray(list)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers');\n\t }\n\n\t if (list.length === 0) {\n\t return Buffer.alloc(0);\n\t }\n\n\t var i;\n\n\t if (length === undefined) {\n\t length = 0;\n\n\t for (i = 0; i < list.length; ++i) {\n\t length += list[i].length;\n\t }\n\t }\n\n\t var buffer = Buffer.allocUnsafe(length);\n\t var pos = 0;\n\n\t for (i = 0; i < list.length; ++i) {\n\t var buf = list[i];\n\n\t if (isInstance(buf, Uint8Array)) {\n\t buf = Buffer.from(buf);\n\t }\n\n\t if (!Buffer.isBuffer(buf)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers');\n\t }\n\n\t buf.copy(buffer, pos);\n\t pos += buf.length;\n\t }\n\n\t return buffer;\n\t };\n\n\t function byteLength(string, encoding) {\n\t if (Buffer.isBuffer(string)) {\n\t return string.length;\n\t }\n\n\t if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n\t return string.byteLength;\n\t }\n\n\t if (typeof string !== 'string') {\n\t throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + typeof string);\n\t }\n\n\t var len = string.length;\n\t var mustMatch = arguments.length > 2 && arguments[2] === true;\n\t if (!mustMatch && len === 0) return 0;\n\t var loweredCase = false;\n\n\t for (;;) {\n\t switch (encoding) {\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return len;\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8ToBytes(string).length;\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return len * 2;\n\n\t case 'hex':\n\t return len >>> 1;\n\n\t case 'base64':\n\t return base64ToBytes(string).length;\n\n\t default:\n\t if (loweredCase) {\n\t return mustMatch ? -1 : utf8ToBytes(string).length;\n\t }\n\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t }\n\n\t Buffer.byteLength = byteLength;\n\n\t function slowToString(encoding, start, end) {\n\t var loweredCase = false;\n\n\t if (start === undefined || start < 0) {\n\t start = 0;\n\t }\n\n\t if (start > this.length) {\n\t return '';\n\t }\n\n\t if (end === undefined || end > this.length) {\n\t end = this.length;\n\t }\n\n\t if (end <= 0) {\n\t return '';\n\t }\n\n\t end >>>= 0;\n\t start >>>= 0;\n\n\t if (end <= start) {\n\t return '';\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t while (true) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexSlice(this, start, end);\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Slice(this, start, end);\n\n\t case 'ascii':\n\t return asciiSlice(this, start, end);\n\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Slice(this, start, end);\n\n\t case 'base64':\n\t return base64Slice(this, start, end);\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return utf16leSlice(this, start, end);\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n\t encoding = (encoding + '').toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t }\n\n\t Buffer.prototype._isBuffer = true;\n\n\t function swap(b, n, m) {\n\t var i = b[n];\n\t b[n] = b[m];\n\t b[m] = i;\n\t }\n\n\t Buffer.prototype.swap16 = function swap16() {\n\t var len = this.length;\n\n\t if (len % 2 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 16-bits');\n\t }\n\n\t for (var i = 0; i < len; i += 2) {\n\t swap(this, i, i + 1);\n\t }\n\n\t return this;\n\t };\n\n\t Buffer.prototype.swap32 = function swap32() {\n\t var len = this.length;\n\n\t if (len % 4 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 32-bits');\n\t }\n\n\t for (var i = 0; i < len; i += 4) {\n\t swap(this, i, i + 3);\n\t swap(this, i + 1, i + 2);\n\t }\n\n\t return this;\n\t };\n\n\t Buffer.prototype.swap64 = function swap64() {\n\t var len = this.length;\n\n\t if (len % 8 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 64-bits');\n\t }\n\n\t for (var i = 0; i < len; i += 8) {\n\t swap(this, i, i + 7);\n\t swap(this, i + 1, i + 6);\n\t swap(this, i + 2, i + 5);\n\t swap(this, i + 3, i + 4);\n\t }\n\n\t return this;\n\t };\n\n\t Buffer.prototype.toString = function toString() {\n\t var length = this.length;\n\t if (length === 0) return '';\n\t if (arguments.length === 0) return utf8Slice(this, 0, length);\n\t return slowToString.apply(this, arguments);\n\t };\n\n\t Buffer.prototype.toLocaleString = Buffer.prototype.toString;\n\n\t Buffer.prototype.equals = function equals(b) {\n\t if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n\t if (this === b) return true;\n\t return Buffer.compare(this, b) === 0;\n\t };\n\n\t Buffer.prototype.inspect = function inspect() {\n\t var str = '';\n\t var max = exports.INSPECT_MAX_BYTES;\n\t str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n\t if (this.length > max) str += ' ... ';\n\t return '';\n\t };\n\n\t Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n\t if (isInstance(target, Uint8Array)) {\n\t target = Buffer.from(target, target.offset, target.byteLength);\n\t }\n\n\t if (!Buffer.isBuffer(target)) {\n\t throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + typeof target);\n\t }\n\n\t if (start === undefined) {\n\t start = 0;\n\t }\n\n\t if (end === undefined) {\n\t end = target ? target.length : 0;\n\t }\n\n\t if (thisStart === undefined) {\n\t thisStart = 0;\n\t }\n\n\t if (thisEnd === undefined) {\n\t thisEnd = this.length;\n\t }\n\n\t if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n\t throw new RangeError('out of range index');\n\t }\n\n\t if (thisStart >= thisEnd && start >= end) {\n\t return 0;\n\t }\n\n\t if (thisStart >= thisEnd) {\n\t return -1;\n\t }\n\n\t if (start >= end) {\n\t return 1;\n\t }\n\n\t start >>>= 0;\n\t end >>>= 0;\n\t thisStart >>>= 0;\n\t thisEnd >>>= 0;\n\t if (this === target) return 0;\n\t var x = thisEnd - thisStart;\n\t var y = end - start;\n\t var len = Math.min(x, y);\n\t var thisCopy = this.slice(thisStart, thisEnd);\n\t var targetCopy = target.slice(start, end);\n\n\t for (var i = 0; i < len; ++i) {\n\t if (thisCopy[i] !== targetCopy[i]) {\n\t x = thisCopy[i];\n\t y = targetCopy[i];\n\t break;\n\t }\n\t }\n\n\t if (x < y) return -1;\n\t if (y < x) return 1;\n\t return 0;\n\t };\n\n\t function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n\t if (buffer.length === 0) return -1;\n\n\t if (typeof byteOffset === 'string') {\n\t encoding = byteOffset;\n\t byteOffset = 0;\n\t } else if (byteOffset > 0x7fffffff) {\n\t byteOffset = 0x7fffffff;\n\t } else if (byteOffset < -0x80000000) {\n\t byteOffset = -0x80000000;\n\t }\n\n\t byteOffset = +byteOffset;\n\n\t if (numberIsNaN(byteOffset)) {\n\t byteOffset = dir ? 0 : buffer.length - 1;\n\t }\n\n\t if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n\t if (byteOffset >= buffer.length) {\n\t if (dir) return -1;else byteOffset = buffer.length - 1;\n\t } else if (byteOffset < 0) {\n\t if (dir) byteOffset = 0;else return -1;\n\t }\n\n\t if (typeof val === 'string') {\n\t val = Buffer.from(val, encoding);\n\t }\n\n\t if (Buffer.isBuffer(val)) {\n\t if (val.length === 0) {\n\t return -1;\n\t }\n\n\t return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n\t } else if (typeof val === 'number') {\n\t val = val & 0xFF;\n\n\t if (typeof Uint8Array.prototype.indexOf === 'function') {\n\t if (dir) {\n\t return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n\t } else {\n\t return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n\t }\n\t }\n\n\t return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n\t }\n\n\t throw new TypeError('val must be string, number or Buffer');\n\t }\n\n\t function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n\t var indexSize = 1;\n\t var arrLength = arr.length;\n\t var valLength = val.length;\n\n\t if (encoding !== undefined) {\n\t encoding = String(encoding).toLowerCase();\n\n\t if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n\t if (arr.length < 2 || val.length < 2) {\n\t return -1;\n\t }\n\n\t indexSize = 2;\n\t arrLength /= 2;\n\t valLength /= 2;\n\t byteOffset /= 2;\n\t }\n\t }\n\n\t function read(buf, i) {\n\t if (indexSize === 1) {\n\t return buf[i];\n\t } else {\n\t return buf.readUInt16BE(i * indexSize);\n\t }\n\t }\n\n\t var i;\n\n\t if (dir) {\n\t var foundIndex = -1;\n\n\t for (i = byteOffset; i < arrLength; i++) {\n\t if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n\t if (foundIndex === -1) foundIndex = i;\n\t if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n\t } else {\n\t if (foundIndex !== -1) i -= i - foundIndex;\n\t foundIndex = -1;\n\t }\n\t }\n\t } else {\n\t if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n\n\t for (i = byteOffset; i >= 0; i--) {\n\t var found = true;\n\n\t for (var j = 0; j < valLength; j++) {\n\t if (read(arr, i + j) !== read(val, j)) {\n\t found = false;\n\t break;\n\t }\n\t }\n\n\t if (found) return i;\n\t }\n\t }\n\n\t return -1;\n\t }\n\n\t Buffer.prototype.includes = function includes(val, byteOffset, encoding) {\n\t return this.indexOf(val, byteOffset, encoding) !== -1;\n\t };\n\n\t Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n\t };\n\n\t Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n\t };\n\n\t function hexWrite(buf, string, offset, length) {\n\t offset = Number(offset) || 0;\n\t var remaining = buf.length - offset;\n\n\t if (!length) {\n\t length = remaining;\n\t } else {\n\t length = Number(length);\n\n\t if (length > remaining) {\n\t length = remaining;\n\t }\n\t }\n\n\t var strLen = string.length;\n\n\t if (length > strLen / 2) {\n\t length = strLen / 2;\n\t }\n\n\t for (var i = 0; i < length; ++i) {\n\t var parsed = parseInt(string.substr(i * 2, 2), 16);\n\t if (numberIsNaN(parsed)) return i;\n\t buf[offset + i] = parsed;\n\t }\n\n\t return i;\n\t }\n\n\t function utf8Write(buf, string, offset, length) {\n\t return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n\t }\n\n\t function asciiWrite(buf, string, offset, length) {\n\t return blitBuffer(asciiToBytes(string), buf, offset, length);\n\t }\n\n\t function latin1Write(buf, string, offset, length) {\n\t return asciiWrite(buf, string, offset, length);\n\t }\n\n\t function base64Write(buf, string, offset, length) {\n\t return blitBuffer(base64ToBytes(string), buf, offset, length);\n\t }\n\n\t function ucs2Write(buf, string, offset, length) {\n\t return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n\t }\n\n\t Buffer.prototype.write = function write(string, offset, length, encoding) {\n\t if (offset === undefined) {\n\t encoding = 'utf8';\n\t length = this.length;\n\t offset = 0;\n\t } else if (length === undefined && typeof offset === 'string') {\n\t encoding = offset;\n\t length = this.length;\n\t offset = 0;\n\t } else if (isFinite(offset)) {\n\t offset = offset >>> 0;\n\n\t if (isFinite(length)) {\n\t length = length >>> 0;\n\t if (encoding === undefined) encoding = 'utf8';\n\t } else {\n\t encoding = length;\n\t length = undefined;\n\t }\n\t } else {\n\t throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n\t }\n\n\t var remaining = this.length - offset;\n\t if (length === undefined || length > remaining) length = remaining;\n\n\t if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n\t throw new RangeError('Attempt to write outside buffer bounds');\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\t var loweredCase = false;\n\n\t for (;;) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexWrite(this, string, offset, length);\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Write(this, string, offset, length);\n\n\t case 'ascii':\n\t return asciiWrite(this, string, offset, length);\n\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Write(this, string, offset, length);\n\n\t case 'base64':\n\t return base64Write(this, string, offset, length);\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return ucs2Write(this, string, offset, length);\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t };\n\n\t Buffer.prototype.toJSON = function toJSON() {\n\t return {\n\t type: 'Buffer',\n\t data: Array.prototype.slice.call(this._arr || this, 0)\n\t };\n\t };\n\n\t function base64Slice(buf, start, end) {\n\t if (start === 0 && end === buf.length) {\n\t return base64Js.fromByteArray(buf);\n\t } else {\n\t return base64Js.fromByteArray(buf.slice(start, end));\n\t }\n\t }\n\n\t function utf8Slice(buf, start, end) {\n\t end = Math.min(buf.length, end);\n\t var res = [];\n\t var i = start;\n\n\t while (i < end) {\n\t var firstByte = buf[i];\n\t var codePoint = null;\n\t var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n\n\t if (i + bytesPerSequence <= end) {\n\t var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n\t switch (bytesPerSequence) {\n\t case 1:\n\t if (firstByte < 0x80) {\n\t codePoint = firstByte;\n\t }\n\n\t break;\n\n\t case 2:\n\t secondByte = buf[i + 1];\n\n\t if ((secondByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n\n\t if (tempCodePoint > 0x7F) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\n\t break;\n\n\t case 3:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n\n\t if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\n\t break;\n\n\t case 4:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t fourthByte = buf[i + 3];\n\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n\n\t if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\n\t }\n\t }\n\n\t if (codePoint === null) {\n\t codePoint = 0xFFFD;\n\t bytesPerSequence = 1;\n\t } else if (codePoint > 0xFFFF) {\n\t codePoint -= 0x10000;\n\t res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n\t codePoint = 0xDC00 | codePoint & 0x3FF;\n\t }\n\n\t res.push(codePoint);\n\t i += bytesPerSequence;\n\t }\n\n\t return decodeCodePointsArray(res);\n\t }\n\n\t var MAX_ARGUMENTS_LENGTH = 0x1000;\n\n\t function decodeCodePointsArray(codePoints) {\n\t var len = codePoints.length;\n\n\t if (len <= MAX_ARGUMENTS_LENGTH) {\n\t return String.fromCharCode.apply(String, codePoints);\n\t }\n\n\t var res = '';\n\t var i = 0;\n\n\t while (i < len) {\n\t res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n\t }\n\n\t return res;\n\t }\n\n\t function asciiSlice(buf, start, end) {\n\t var ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i] & 0x7F);\n\t }\n\n\t return ret;\n\t }\n\n\t function latin1Slice(buf, start, end) {\n\t var ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i]);\n\t }\n\n\t return ret;\n\t }\n\n\t function hexSlice(buf, start, end) {\n\t var len = buf.length;\n\t if (!start || start < 0) start = 0;\n\t if (!end || end < 0 || end > len) end = len;\n\t var out = '';\n\n\t for (var i = start; i < end; ++i) {\n\t out += toHex(buf[i]);\n\t }\n\n\t return out;\n\t }\n\n\t function utf16leSlice(buf, start, end) {\n\t var bytes = buf.slice(start, end);\n\t var res = '';\n\n\t for (var i = 0; i < bytes.length; i += 2) {\n\t res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n\t }\n\n\t return res;\n\t }\n\n\t Buffer.prototype.slice = function slice(start, end) {\n\t var len = this.length;\n\t start = ~~start;\n\t end = end === undefined ? len : ~~end;\n\n\t if (start < 0) {\n\t start += len;\n\t if (start < 0) start = 0;\n\t } else if (start > len) {\n\t start = len;\n\t }\n\n\t if (end < 0) {\n\t end += len;\n\t if (end < 0) end = 0;\n\t } else if (end > len) {\n\t end = len;\n\t }\n\n\t if (end < start) end = start;\n\t var newBuf = this.subarray(start, end);\n\t newBuf.__proto__ = Buffer.prototype;\n\t return newBuf;\n\t };\n\n\t function checkOffset(offset, ext, length) {\n\t if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n\t }\n\n\t Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\t var val = this[offset];\n\t var mul = 1;\n\t var i = 0;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\n\t return val;\n\t };\n\n\t Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\n\t if (!noAssert) {\n\t checkOffset(offset, byteLength, this.length);\n\t }\n\n\t var val = this[offset + --byteLength];\n\t var mul = 1;\n\n\t while (byteLength > 0 && (mul *= 0x100)) {\n\t val += this[offset + --byteLength] * mul;\n\t }\n\n\t return val;\n\t };\n\n\t Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t return this[offset];\n\t };\n\n\t Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return this[offset] | this[offset + 1] << 8;\n\t };\n\n\t Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return this[offset] << 8 | this[offset + 1];\n\t };\n\n\t Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n\t };\n\n\t Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n\t };\n\n\t Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\t var val = this[offset];\n\t var mul = 1;\n\t var i = 0;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\n\t mul *= 0x80;\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\t return val;\n\t };\n\n\t Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\t var i = byteLength;\n\t var mul = 1;\n\t var val = this[offset + --i];\n\n\t while (i > 0 && (mul *= 0x100)) {\n\t val += this[offset + --i] * mul;\n\t }\n\n\t mul *= 0x80;\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\t return val;\n\t };\n\n\t Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t if (!(this[offset] & 0x80)) return this[offset];\n\t return (0xff - this[offset] + 1) * -1;\n\t };\n\n\t Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t var val = this[offset] | this[offset + 1] << 8;\n\t return val & 0x8000 ? val | 0xFFFF0000 : val;\n\t };\n\n\t Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t var val = this[offset + 1] | this[offset] << 8;\n\t return val & 0x8000 ? val | 0xFFFF0000 : val;\n\t };\n\n\t Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n\t };\n\n\t Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n\t };\n\n\t Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754.read(this, offset, true, 23, 4);\n\t };\n\n\t Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754.read(this, offset, false, 23, 4);\n\t };\n\n\t Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754.read(this, offset, true, 52, 8);\n\t };\n\n\t Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754.read(this, offset, false, 52, 8);\n\t };\n\n\t function checkInt(buf, value, offset, ext, max, min) {\n\t if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n\t if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range');\n\t }\n\n\t Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t var mul = 1;\n\t var i = 0;\n\t this[offset] = value & 0xFF;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t this[offset + i] = value / mul & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t var i = byteLength - 1;\n\t var mul = 1;\n\t this[offset + i] = value & 0xFF;\n\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t this[offset + i] = value / mul & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n\t this[offset] = value & 0xff;\n\t return offset + 1;\n\t };\n\n\t Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = value & 0xff;\n\t this[offset + 1] = value >>> 8;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = value >>> 8;\n\t this[offset + 1] = value & 0xff;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset + 3] = value >>> 24;\n\t this[offset + 2] = value >>> 16;\n\t this[offset + 1] = value >>> 8;\n\t this[offset] = value & 0xff;\n\t return offset + 4;\n\t };\n\n\t Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset] = value >>> 24;\n\t this[offset + 1] = value >>> 16;\n\t this[offset + 2] = value >>> 8;\n\t this[offset + 3] = value & 0xff;\n\t return offset + 4;\n\t };\n\n\t Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1);\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t var i = 0;\n\t var mul = 1;\n\t var sub = 0;\n\t this[offset] = value & 0xFF;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n\t sub = 1;\n\t }\n\n\t this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1);\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t var i = byteLength - 1;\n\t var mul = 1;\n\t var sub = 0;\n\t this[offset + i] = value & 0xFF;\n\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n\t sub = 1;\n\t }\n\n\t this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n\t if (value < 0) value = 0xff + value + 1;\n\t this[offset] = value & 0xff;\n\t return offset + 1;\n\t };\n\n\t Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = value & 0xff;\n\t this[offset + 1] = value >>> 8;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = value >>> 8;\n\t this[offset + 1] = value & 0xff;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t this[offset] = value & 0xff;\n\t this[offset + 1] = value >>> 8;\n\t this[offset + 2] = value >>> 16;\n\t this[offset + 3] = value >>> 24;\n\t return offset + 4;\n\t };\n\n\t Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t if (value < 0) value = 0xffffffff + value + 1;\n\t this[offset] = value >>> 24;\n\t this[offset + 1] = value >>> 16;\n\t this[offset + 2] = value >>> 8;\n\t this[offset + 3] = value & 0xff;\n\t return offset + 4;\n\t };\n\n\t function checkIEEE754(buf, value, offset, ext, max, min) {\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range');\n\t if (offset < 0) throw new RangeError('Index out of range');\n\t }\n\n\t function writeFloat(buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 4);\n\t }\n\n\t ieee754.write(buf, value, offset, littleEndian, 23, 4);\n\t return offset + 4;\n\t }\n\n\t Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n\t return writeFloat(this, value, offset, true, noAssert);\n\t };\n\n\t Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n\t return writeFloat(this, value, offset, false, noAssert);\n\t };\n\n\t function writeDouble(buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 8);\n\t }\n\n\t ieee754.write(buf, value, offset, littleEndian, 52, 8);\n\t return offset + 8;\n\t }\n\n\t Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n\t return writeDouble(this, value, offset, true, noAssert);\n\t };\n\n\t Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n\t return writeDouble(this, value, offset, false, noAssert);\n\t };\n\n\t Buffer.prototype.copy = function copy(target, targetStart, start, end) {\n\t if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');\n\t if (!start) start = 0;\n\t if (!end && end !== 0) end = this.length;\n\t if (targetStart >= target.length) targetStart = target.length;\n\t if (!targetStart) targetStart = 0;\n\t if (end > 0 && end < start) end = start;\n\t if (end === start) return 0;\n\t if (target.length === 0 || this.length === 0) return 0;\n\n\t if (targetStart < 0) {\n\t throw new RangeError('targetStart out of bounds');\n\t }\n\n\t if (start < 0 || start >= this.length) throw new RangeError('Index out of range');\n\t if (end < 0) throw new RangeError('sourceEnd out of bounds');\n\t if (end > this.length) end = this.length;\n\n\t if (target.length - targetStart < end - start) {\n\t end = target.length - targetStart + start;\n\t }\n\n\t var len = end - start;\n\n\t if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n\t this.copyWithin(targetStart, start, end);\n\t } else if (this === target && start < targetStart && targetStart < end) {\n\t for (var i = len - 1; i >= 0; --i) {\n\t target[i + targetStart] = this[i + start];\n\t }\n\t } else {\n\t Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n\t }\n\n\t return len;\n\t };\n\n\t Buffer.prototype.fill = function fill(val, start, end, encoding) {\n\t if (typeof val === 'string') {\n\t if (typeof start === 'string') {\n\t encoding = start;\n\t start = 0;\n\t end = this.length;\n\t } else if (typeof end === 'string') {\n\t encoding = end;\n\t end = this.length;\n\t }\n\n\t if (encoding !== undefined && typeof encoding !== 'string') {\n\t throw new TypeError('encoding must be a string');\n\t }\n\n\t if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding);\n\t }\n\n\t if (val.length === 1) {\n\t var code = val.charCodeAt(0);\n\n\t if (encoding === 'utf8' && code < 128 || encoding === 'latin1') {\n\t val = code;\n\t }\n\t }\n\t } else if (typeof val === 'number') {\n\t val = val & 255;\n\t }\n\n\t if (start < 0 || this.length < start || this.length < end) {\n\t throw new RangeError('Out of range index');\n\t }\n\n\t if (end <= start) {\n\t return this;\n\t }\n\n\t start = start >>> 0;\n\t end = end === undefined ? this.length : end >>> 0;\n\t if (!val) val = 0;\n\t var i;\n\n\t if (typeof val === 'number') {\n\t for (i = start; i < end; ++i) {\n\t this[i] = val;\n\t }\n\t } else {\n\t var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);\n\t var len = bytes.length;\n\n\t if (len === 0) {\n\t throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n\t }\n\n\t for (i = 0; i < end - start; ++i) {\n\t this[i + start] = bytes[i % len];\n\t }\n\t }\n\n\t return this;\n\t };\n\n\t var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\n\t function base64clean(str) {\n\t str = str.split('=')[0];\n\t str = str.trim().replace(INVALID_BASE64_RE, '');\n\t if (str.length < 2) return '';\n\n\t while (str.length % 4 !== 0) {\n\t str = str + '=';\n\t }\n\n\t return str;\n\t }\n\n\t function toHex(n) {\n\t if (n < 16) return '0' + n.toString(16);\n\t return n.toString(16);\n\t }\n\n\t function utf8ToBytes(string, units) {\n\t units = units || Infinity;\n\t var codePoint;\n\t var length = string.length;\n\t var leadSurrogate = null;\n\t var bytes = [];\n\n\t for (var i = 0; i < length; ++i) {\n\t codePoint = string.charCodeAt(i);\n\n\t if (codePoint > 0xD7FF && codePoint < 0xE000) {\n\t if (!leadSurrogate) {\n\t if (codePoint > 0xDBFF) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue;\n\t } else if (i + 1 === length) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue;\n\t }\n\n\t leadSurrogate = codePoint;\n\t continue;\n\t }\n\n\t if (codePoint < 0xDC00) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t leadSurrogate = codePoint;\n\t continue;\n\t }\n\n\t codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n\t } else if (leadSurrogate) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t }\n\n\t leadSurrogate = null;\n\n\t if (codePoint < 0x80) {\n\t if ((units -= 1) < 0) break;\n\t bytes.push(codePoint);\n\t } else if (codePoint < 0x800) {\n\t if ((units -= 2) < 0) break;\n\t bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n\t } else if (codePoint < 0x10000) {\n\t if ((units -= 3) < 0) break;\n\t bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n\t } else if (codePoint < 0x110000) {\n\t if ((units -= 4) < 0) break;\n\t bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n\t } else {\n\t throw new Error('Invalid code point');\n\t }\n\t }\n\n\t return bytes;\n\t }\n\n\t function asciiToBytes(str) {\n\t var byteArray = [];\n\n\t for (var i = 0; i < str.length; ++i) {\n\t byteArray.push(str.charCodeAt(i) & 0xFF);\n\t }\n\n\t return byteArray;\n\t }\n\n\t function utf16leToBytes(str, units) {\n\t var c, hi, lo;\n\t var byteArray = [];\n\n\t for (var i = 0; i < str.length; ++i) {\n\t if ((units -= 2) < 0) break;\n\t c = str.charCodeAt(i);\n\t hi = c >> 8;\n\t lo = c % 256;\n\t byteArray.push(lo);\n\t byteArray.push(hi);\n\t }\n\n\t return byteArray;\n\t }\n\n\t function base64ToBytes(str) {\n\t return base64Js.toByteArray(base64clean(str));\n\t }\n\n\t function blitBuffer(src, dst, offset, length) {\n\t for (var i = 0; i < length; ++i) {\n\t if (i + offset >= dst.length || i >= src.length) break;\n\t dst[i + offset] = src[i];\n\t }\n\n\t return i;\n\t }\n\n\t function isInstance(obj, type) {\n\t return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n\t }\n\n\t function numberIsNaN(obj) {\n\t return obj !== obj;\n\t }\n\t}, \"/$$rollup_base$$/node_modules/buffer\");\n\n\tvar object = {};\n\tvar hasOwnProperty$2 = object.hasOwnProperty;\n\n\tvar forOwn = function forOwn(object, callback) {\n\t for (var key in object) {\n\t if (hasOwnProperty$2.call(object, key)) {\n\t callback(key, object[key]);\n\t }\n\t }\n\t};\n\n\tvar extend = function extend(destination, source) {\n\t if (!source) {\n\t return destination;\n\t }\n\n\t forOwn(source, function (key, value) {\n\t destination[key] = value;\n\t });\n\t return destination;\n\t};\n\n\tvar forEach = function forEach(array, callback) {\n\t var length = array.length;\n\t var index = -1;\n\n\t while (++index < length) {\n\t callback(array[index]);\n\t }\n\t};\n\n\tvar toString = object.toString;\n\tvar isArray$1 = Array.isArray;\n\tvar isBuffer = buffer.Buffer.isBuffer;\n\n\tvar isObject = function isObject(value) {\n\t return toString.call(value) == '[object Object]';\n\t};\n\n\tvar isString = function isString(value) {\n\t return typeof value == 'string' || toString.call(value) == '[object String]';\n\t};\n\n\tvar isNumber = function isNumber(value) {\n\t return typeof value == 'number' || toString.call(value) == '[object Number]';\n\t};\n\n\tvar isFunction$2 = function isFunction(value) {\n\t return typeof value == 'function';\n\t};\n\n\tvar isMap = function isMap(value) {\n\t return toString.call(value) == '[object Map]';\n\t};\n\n\tvar isSet = function isSet(value) {\n\t return toString.call(value) == '[object Set]';\n\t};\n\n\tvar singleEscapes = {\n\t '\"': '\\\\\"',\n\t '\\'': '\\\\\\'',\n\t '\\\\': '\\\\\\\\',\n\t '\\b': '\\\\b',\n\t '\\f': '\\\\f',\n\t '\\n': '\\\\n',\n\t '\\r': '\\\\r',\n\t '\\t': '\\\\t'\n\t};\n\tvar regexSingleEscape = /[\"'\\\\\\b\\f\\n\\r\\t]/;\n\tvar regexDigit = /[0-9]/;\n\tvar regexWhitelist = /[ !#-&\\(-\\[\\]-_a-~]/;\n\n\tvar jsesc$1 = function jsesc(argument, options) {\n\t var increaseIndentation = function increaseIndentation() {\n\t oldIndent = indent;\n\t ++options.indentLevel;\n\t indent = options.indent.repeat(options.indentLevel);\n\t };\n\n\t var defaults = {\n\t 'escapeEverything': false,\n\t 'minimal': false,\n\t 'isScriptContext': false,\n\t 'quotes': 'single',\n\t 'wrap': false,\n\t 'es6': false,\n\t 'json': false,\n\t 'compact': true,\n\t 'lowercaseHex': false,\n\t 'numbers': 'decimal',\n\t 'indent': '\\t',\n\t 'indentLevel': 0,\n\t '__inline1__': false,\n\t '__inline2__': false\n\t };\n\t var json = options && options.json;\n\n\t if (json) {\n\t defaults.quotes = 'double';\n\t defaults.wrap = true;\n\t }\n\n\t options = extend(defaults, options);\n\n\t if (options.quotes != 'single' && options.quotes != 'double' && options.quotes != 'backtick') {\n\t options.quotes = 'single';\n\t }\n\n\t var quote = options.quotes == 'double' ? '\"' : options.quotes == 'backtick' ? '`' : '\\'';\n\t var compact = options.compact;\n\t var lowercaseHex = options.lowercaseHex;\n\t var indent = options.indent.repeat(options.indentLevel);\n\t var oldIndent = '';\n\t var inline1 = options.__inline1__;\n\t var inline2 = options.__inline2__;\n\t var newLine = compact ? '' : '\\n';\n\t var result;\n\t var isEmpty = true;\n\t var useBinNumbers = options.numbers == 'binary';\n\t var useOctNumbers = options.numbers == 'octal';\n\t var useDecNumbers = options.numbers == 'decimal';\n\t var useHexNumbers = options.numbers == 'hexadecimal';\n\n\t if (json && argument && isFunction$2(argument.toJSON)) {\n\t argument = argument.toJSON();\n\t }\n\n\t if (!isString(argument)) {\n\t if (isMap(argument)) {\n\t if (argument.size == 0) {\n\t return 'new Map()';\n\t }\n\n\t if (!compact) {\n\t options.__inline1__ = true;\n\t options.__inline2__ = false;\n\t }\n\n\t return 'new Map(' + jsesc(Array.from(argument), options) + ')';\n\t }\n\n\t if (isSet(argument)) {\n\t if (argument.size == 0) {\n\t return 'new Set()';\n\t }\n\n\t return 'new Set(' + jsesc(Array.from(argument), options) + ')';\n\t }\n\n\t if (isBuffer(argument)) {\n\t if (argument.length == 0) {\n\t return 'Buffer.from([])';\n\t }\n\n\t return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';\n\t }\n\n\t if (isArray$1(argument)) {\n\t result = [];\n\t options.wrap = true;\n\n\t if (inline1) {\n\t options.__inline1__ = false;\n\t options.__inline2__ = true;\n\t }\n\n\t if (!inline2) {\n\t increaseIndentation();\n\t }\n\n\t forEach(argument, function (value) {\n\t isEmpty = false;\n\n\t if (inline2) {\n\t options.__inline2__ = false;\n\t }\n\n\t result.push((compact || inline2 ? '' : indent) + jsesc(value, options));\n\t });\n\n\t if (isEmpty) {\n\t return '[]';\n\t }\n\n\t if (inline2) {\n\t return '[' + result.join(', ') + ']';\n\t }\n\n\t return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';\n\t } else if (isNumber(argument)) {\n\t if (json) {\n\t return JSON.stringify(argument);\n\t }\n\n\t if (useDecNumbers) {\n\t return String(argument);\n\t }\n\n\t if (useHexNumbers) {\n\t var hexadecimal = argument.toString(16);\n\n\t if (!lowercaseHex) {\n\t hexadecimal = hexadecimal.toUpperCase();\n\t }\n\n\t return '0x' + hexadecimal;\n\t }\n\n\t if (useBinNumbers) {\n\t return '0b' + argument.toString(2);\n\t }\n\n\t if (useOctNumbers) {\n\t return '0o' + argument.toString(8);\n\t }\n\t } else if (!isObject(argument)) {\n\t if (json) {\n\t return JSON.stringify(argument) || 'null';\n\t }\n\n\t return String(argument);\n\t } else {\n\t result = [];\n\t options.wrap = true;\n\t increaseIndentation();\n\t forOwn(argument, function (key, value) {\n\t isEmpty = false;\n\t result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options));\n\t });\n\n\t if (isEmpty) {\n\t return '{}';\n\t }\n\n\t return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';\n\t }\n\t }\n\n\t var string = argument;\n\t var index = -1;\n\t var length = string.length;\n\t result = '';\n\n\t while (++index < length) {\n\t var character = string.charAt(index);\n\n\t if (options.es6) {\n\t var first = string.charCodeAt(index);\n\n\t if (first >= 0xD800 && first <= 0xDBFF && length > index + 1) {\n\t var second = string.charCodeAt(index + 1);\n\n\t if (second >= 0xDC00 && second <= 0xDFFF) {\n\t var codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\n\t var _hexadecimal2 = codePoint.toString(16);\n\n\t if (!lowercaseHex) {\n\t _hexadecimal2 = _hexadecimal2.toUpperCase();\n\t }\n\n\t result += \"\\\\u{\" + _hexadecimal2 + '}';\n\t ++index;\n\t continue;\n\t }\n\t }\n\t }\n\n\t if (!options.escapeEverything) {\n\t if (regexWhitelist.test(character)) {\n\t result += character;\n\t continue;\n\t }\n\n\t if (character == '\"') {\n\t result += quote == character ? '\\\\\"' : character;\n\t continue;\n\t }\n\n\t if (character == '`') {\n\t result += quote == character ? '\\\\`' : character;\n\t continue;\n\t }\n\n\t if (character == '\\'') {\n\t result += quote == character ? '\\\\\\'' : character;\n\t continue;\n\t }\n\t }\n\n\t if (character == '\\0' && !json && !regexDigit.test(string.charAt(index + 1))) {\n\t result += '\\\\0';\n\t continue;\n\t }\n\n\t if (regexSingleEscape.test(character)) {\n\t result += singleEscapes[character];\n\t continue;\n\t }\n\n\t var charCode = character.charCodeAt(0);\n\n\t if (options.minimal && charCode != 0x2028 && charCode != 0x2029) {\n\t result += character;\n\t continue;\n\t }\n\n\t var _hexadecimal = charCode.toString(16);\n\n\t if (!lowercaseHex) {\n\t _hexadecimal = _hexadecimal.toUpperCase();\n\t }\n\n\t var longhand = _hexadecimal.length > 2 || json;\n\n\t var escaped = '\\\\' + (longhand ? 'u' : 'x') + ('0000' + _hexadecimal).slice(longhand ? -4 : -2);\n\n\t result += escaped;\n\t continue;\n\t }\n\n\t if (options.wrap) {\n\t result = quote + result + quote;\n\t }\n\n\t if (quote == '`') {\n\t result = result.replace(/\\$\\{/g, '\\\\\\$\\{');\n\t }\n\n\t if (options.isScriptContext) {\n\t return result.replace(/<\\/(script|style)/gi, '<\\\\/$1').replace(/\n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internal\n */\n ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type)\n return false;\n // Split names apart from both viewConfig and uiView into segments\n var vc = viewConfig.viewDecl;\n var vcSegments = vc.$uiViewName.split('.');\n var uivSegments = uiView.fqn.split('.');\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n var negOffset = 1 - vcSegments.length || undefined;\n var fqnToFirstSegment = uivSegments.slice(0, negOffset).join('.');\n var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }; };\n return ViewService;\n }());\n\n /**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\n var UIRouterGlobals = /** @class */ (function () {\n function UIRouterGlobals() {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n this.params = new StateParams();\n /** @internal */\n this.lastStartedTransitionId = -1;\n /** @internal */\n this.transitionHistory = new Queue([], 1);\n /** @internal */\n this.successfulTransitions = new Queue([], 1);\n }\n UIRouterGlobals.prototype.dispose = function () {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n };\n return UIRouterGlobals;\n }());\n\n var prioritySort = function (a, b) { return (b.priority || 0) - (a.priority || 0); };\n var typeSort = function (a, b) {\n var weights = { STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n };\n var urlMatcherSort = function (a, b) {\n return !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n };\n var idSort = function (a, b) {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n var useMatchPriority = { STATE: true, URLMATCHER: true };\n var equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n };\n /**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRules.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n */\n var defaultRuleSortFn;\n defaultRuleSortFn = function (a, b) {\n var cmp = prioritySort(a, b);\n if (cmp !== 0)\n return cmp;\n cmp = typeSort(a, b);\n if (cmp !== 0)\n return cmp;\n cmp = urlMatcherSort(a, b);\n if (cmp !== 0)\n return cmp;\n return idSort(a, b);\n };\n function getHandlerFn(handler) {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler : val(handler);\n }\n /**\n * API for managing URL rules\n *\n * This API is used to create and manage URL rules.\n * URL rules are a mechanism to respond to specific URL patterns.\n *\n * The most commonly used methods are [[otherwise]] and [[when]].\n *\n * This API is found at `router.urlService.rules` (see: [[UIRouter.urlService]], [[URLService.rules]])\n */\n var UrlRules = /** @class */ (function () {\n /** @internal */\n function UrlRules(/** @internal */ router) {\n this.router = router;\n /** @internal */ this._sortFn = defaultRuleSortFn;\n /** @internal */ this._rules = [];\n /** @internal */ this._id = 0;\n this.urlRuleFactory = new UrlRuleFactory(router);\n }\n /** @internal */\n UrlRules.prototype.dispose = function (router) {\n this._rules = [];\n delete this._otherwiseFn;\n };\n /**\n * Defines the initial state, path, or behavior to use when the app starts.\n *\n * This rule defines the initial/starting state for the application.\n *\n * This rule is triggered the first time the URL is checked (when the app initially loads).\n * The rule is triggered only when the url matches either `\"\"` or `\"/\"`.\n *\n * Note: The rule is intended to be used when the root of the application is directly linked to.\n * When the URL is *not* `\"\"` or `\"/\"` and doesn't match other rules, the [[otherwise]] rule is triggered.\n * This allows 404-like behavior when an unknown URL is deep-linked.\n *\n * #### Example:\n * Start app at `home` state.\n * ```js\n * .initial({ state: 'home' });\n * ```\n *\n * #### Example:\n * Start app at `/home` (by url)\n * ```js\n * .initial('/home');\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .initial((matchValue, url, router) => {\n * console.log('initial state');\n * return { state: 'home' };\n * })\n * ```\n *\n * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic).\n */\n UrlRules.prototype.initial = function (handler) {\n var handlerFn = getHandlerFn(handler);\n var matchFn = function (urlParts, router) {\n return router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n };\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n /**\n * Defines the state, url, or behavior to use when no other rule matches the URL.\n *\n * This rule is matched when *no other rule* matches.\n * It is generally used to handle unknown URLs (similar to \"404\" behavior, but on the client side).\n *\n * - If `handler` a string, it is treated as a url redirect\n *\n * #### Example:\n * When no other url rule matches, redirect to `/index`\n * ```js\n * .otherwise('/index');\n * ```\n *\n * - If `handler` is an object with a `state` property, the state is activated.\n *\n * #### Example:\n * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value.\n * ```js\n * .otherwise({ state: 'home', params: { dashboard: 'default' } });\n * ```\n *\n * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object.\n * The function can perform actions, and/or return a value.\n *\n * #### Example:\n * When no other url rule matches, manually trigger a transition to the `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * router.stateService.go('home');\n * });\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * return { state: 'home' };\n * });\n * ```\n *\n * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic).\n */\n UrlRules.prototype.otherwise = function (handler) {\n var handlerFn = getHandlerFn(handler);\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n /**\n * Remove a rule previously registered\n *\n * @param rule the matcher rule that was previously registered using [[rule]]\n */\n UrlRules.prototype.removeRule = function (rule) {\n removeFrom(this._rules, rule);\n };\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[urlRuleFactory]], or created manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n UrlRules.prototype.rule = function (rule) {\n var _this = this;\n if (!UrlRuleFactory.isUrlRule(rule))\n throw new Error('invalid rule');\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n this._rules.push(rule);\n this._sorted = false;\n return function () { return _this.removeRule(rule); };\n };\n /**\n * Gets all registered rules\n *\n * @returns an array of all the registered rules\n */\n UrlRules.prototype.rules = function () {\n this.ensureSorted();\n return this._rules.concat(this._otherwiseFn ? [this._otherwiseFn] : []);\n };\n /**\n * Defines URL Rule priorities\n *\n * More than one rule ([[UrlRule]]) might match a given URL.\n * This `compareFn` is used to sort the rules by priority.\n * Higher priority rules should sort earlier.\n *\n * The [[defaultRuleSortFn]] is used by default.\n *\n * You only need to call this function once.\n * The `compareFn` will be used to sort the rules as each is registered.\n *\n * If called without any parameter, it will re-sort the rules.\n *\n * ---\n *\n * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]].\n * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]]\n * The `$id` is is the order in which the rule was registered.\n *\n * The sort function should use these data, or data found on a specific type\n * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired.\n *\n * #### Example:\n * This compare function prioritizes rules by the order in which the rules were registered.\n * A rule registered earlier has higher priority.\n *\n * ```js\n * function compareFn(a, b) {\n * return a.$id - b.$id;\n * }\n * ```\n *\n * @param compareFn a function that compares to [[UrlRule]] objects.\n * The `compareFn` should abide by the `Array.sort` compare function rules.\n * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority.\n * Return a positive number if `b` should be higher priority.\n * Return `0` if the rules are identical.\n *\n * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description)\n * for details.\n */\n UrlRules.prototype.sort = function (compareFn) {\n var sorted = this.stableSort(this._rules, (this._sortFn = compareFn || this._sortFn));\n // precompute _sortGroup values and apply to each rule\n var group = 0;\n for (var i = 0; i < sorted.length; i++) {\n sorted[i]._group = group;\n if (i < sorted.length - 1 && this._sortFn(sorted[i], sorted[i + 1]) !== 0) {\n group++;\n }\n }\n this._rules = sorted;\n this._sorted = true;\n };\n /** @internal */\n UrlRules.prototype.ensureSorted = function () {\n this._sorted || this.sort();\n };\n /** @internal */\n UrlRules.prototype.stableSort = function (arr, compareFn) {\n var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); });\n arrOfWrapper.sort(function (wrapperA, wrapperB) {\n var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0 ? wrapperA.idx - wrapperB.idx : cmpDiff;\n });\n return arrOfWrapper.map(function (wrapper) { return wrapper.elem; });\n };\n /**\n * Registers a `matcher` and `handler` for custom URLs handling.\n *\n * The `matcher` can be:\n *\n * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]]\n * - a `string`: The string is compiled to a [[UrlMatcher]]\n * - a `RegExp`: The regexp is used to match the url.\n *\n * The `handler` can be:\n *\n * - a string: The url is redirected to the value of the string.\n * - a function: The url is redirected to the return value of the function.\n *\n * ---\n *\n * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect\n * string is interpolated with parameter values.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(\"/foo/:param1\", \"/bar/:param1\")\n * ```\n *\n * ---\n *\n * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is\n * interpolated with capture groups from the RegExp.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), \"/bar/$1\");\n * ```\n *\n * ---\n *\n * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]).\n * The \"matched value\" differs based on the `matcher`.\n * For [[UrlMatcher]]s, it will be the matched state params.\n * For `RegExp`, it will be the match array from `regexp.exec()`.\n *\n * If the handler returns a string, the URL is redirected to the string.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), match => \"/bar/\" + match[1]);\n * ```\n *\n * Note: the `handler` may also invoke arbitrary code, such as `$state.go()`\n *\n * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`.\n * @param handler The path to redirect to, or a function that returns the path.\n * @param options `{ priority: number }`\n *\n * @return the registered [[UrlRule]]\n */\n UrlRules.prototype.when = function (matcher, handler, options) {\n var rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority))\n rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n return UrlRules;\n }());\n\n /**\n * An API to customize the URL behavior and retrieve URL configuration\n *\n * This API is used to customize the behavior of the URL.\n * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]),\n * and custom parameter encoding (custom [[type]]).\n *\n * It also has information about the location (url) configuration such as [[port]] and [[baseHref]].\n * This information can be used to build absolute URLs, such as\n * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`;\n *\n * This API is found at `router.urlService.config` (see: [[UIRouter.urlService]], [[URLService.config]])\n */\n var UrlConfig = /** @class */ (function () {\n /** @internal */ function UrlConfig(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** @internal */ this.paramTypes = new ParamTypes();\n /** @internal */ this._decodeParams = true;\n /** @internal */ this._isCaseInsensitive = false;\n /** @internal */ this._isStrictMode = true;\n /** @internal */ this._defaultSquashPolicy = false;\n /** @internal */ this.dispose = function () { return _this.paramTypes.dispose(); };\n // Delegate these calls to the current LocationConfig implementation\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n this.baseHref = function () { return _this.router.locationConfig.baseHref(); };\n /**\n * Gets or sets the hashPrefix\n *\n * This only applies when not running in [[html5Mode]] (pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n this.hashPrefix = function (newprefix) { return _this.router.locationConfig.hashPrefix(newprefix); };\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n this.host = function () { return _this.router.locationConfig.host(); };\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in html5 mode (pushstate mode).\n */\n this.html5Mode = function () { return _this.router.locationConfig.html5Mode(); };\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n this.port = function () { return _this.router.locationConfig.port(); };\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n this.protocol = function () { return _this.router.locationConfig.protocol(); };\n }\n /**\n * Defines whether URL matching should be case sensitive (the default behavior), or not.\n *\n * #### Example:\n * ```js\n * // Allow case insensitive url matches\n * urlService.config.caseInsensitive(true);\n * ```\n *\n * @param value `false` to match URL in a case sensitive manner; otherwise `true`;\n * @returns the current value of caseInsensitive\n */\n UrlConfig.prototype.caseInsensitive = function (value) {\n return (this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive);\n };\n /**\n * Sets the default behavior when generating or matching URLs with default parameter values.\n *\n * #### Example:\n * ```js\n * // Remove default parameter values from the url\n * urlService.config.defaultSquashPolicy(true);\n * ```\n *\n * @param value A string that defines the default parameter URL squashing behavior.\n * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n * parameter is surrounded by slashes, squash (remove) one slash from the URL\n * - any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n * the parameter value from the URL and replace it with this string.\n * @returns the current value of defaultSquashPolicy\n */\n UrlConfig.prototype.defaultSquashPolicy = function (value) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(\"Invalid squash policy: \" + value + \". Valid policies: false, true, arbitrary-string\");\n return (this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy);\n };\n /**\n * Defines whether URLs should match trailing slashes, or not (the default behavior).\n *\n * #### Example:\n * ```js\n * // Allow optional trailing slashes\n * urlService.config.strictMode(false);\n * ```\n *\n * @param value `false` to match trailing slashes in URLs, otherwise `true`.\n * @returns the current value of strictMode\n */\n UrlConfig.prototype.strictMode = function (value) {\n return (this._isStrictMode = isDefined(value) ? value : this._isStrictMode);\n };\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.\n *\n * #### Note: Register custom types *before using them* in a state definition.\n *\n * #### Example:\n * ```js\n * // Encode object parameter as JSON string\n * urlService.config.type('myjson', {\n * encode: (obj) => JSON.stringify(obj),\n * decode: (str) => JSON.parse(str),\n * is: (val) => typeof(val) === 'object',\n * pattern: /[^/]+/,\n * equals: (a, b) => _.isEqual(a, b),\n * });\n * ```\n *\n * See [[ParamTypeDefinition]] for more examples\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n */\n UrlConfig.prototype.type = function (name, definition, definitionFn) {\n var type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n return UrlConfig;\n }());\n\n /**\n * API for URL management\n */\n var UrlService = /** @class */ (function () {\n /** @internal */\n function UrlService(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** @internal */ this.interceptDeferred = false;\n /**\n * The nested [[UrlRules]] API for managing URL rules and rewrites\n *\n * See: [[UrlRules]] for details\n */\n this.rules = new UrlRules(this.router);\n /**\n * The nested [[UrlConfig]] API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfig]] for details\n */\n this.config = new UrlConfig(this.router);\n // Delegate these calls to the current LocationServices implementation\n /**\n * Gets the current url, or updates the url\n *\n * ### Getting the current URL\n *\n * When no arguments are passed, returns the current URL.\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * ### Updating the URL\n *\n * When `newurl` arguments is provided, changes the URL to reflect `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n *\n * @return the url (after potentially being processed)\n */\n this.url = function (newurl, replace, state) {\n return _this.router.locationService.url(newurl, replace, state);\n };\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n this.path = function () { return _this.router.locationService.path(); };\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (query) portion of the url, as an object\n */\n this.search = function () { return _this.router.locationService.search(); };\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n this.hash = function () { return _this.router.locationService.hash(); };\n /**\n * @internal\n *\n * Registers a low level url change handler\n *\n * Note: Because this is a low level handler, it's not recommended for general use.\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n this.onChange = function (callback) { return _this.router.locationService.onChange(callback); };\n }\n /** @internal */\n UrlService.prototype.dispose = function () {\n this.listen(false);\n this.rules.dispose();\n };\n /**\n * Gets the current URL parts\n *\n * This method returns the different parts of the current URL (the [[path]], [[search]], and [[hash]]) as a [[UrlParts]] object.\n */\n UrlService.prototype.parts = function () {\n return { path: this.path(), search: this.search(), hash: this.hash() };\n };\n /**\n * Activates the best rule for the current URL\n *\n * Checks the current URL for a matching [[UrlRule]], then invokes that rule's handler.\n * This method is called internally any time the URL has changed.\n *\n * This effectively activates the state (or redirect, etc) which matches the current URL.\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * // Find the matching URL and invoke the handler.\n * urlService.sync();\n * });\n * ```\n */\n UrlService.prototype.sync = function (evt) {\n if (evt && evt.defaultPrevented)\n return;\n var _a = this.router, urlService = _a.urlService, stateService = _a.stateService;\n var url = { path: urlService.path(), search: urlService.search(), hash: urlService.hash() };\n var best = this.match(url);\n var applyResult = pattern([\n [isString, function (newurl) { return urlService.url(newurl, true); }],\n [TargetState.isDef, function (def) { return stateService.go(def.state, def.params, def.options); }],\n [is(TargetState), function (target) { return stateService.go(target.state(), target.params(), target.options()); }],\n ]);\n applyResult(best && best.rule.handler(best.match, url, this.router));\n };\n /**\n * Starts or stops listening for URL changes\n *\n * Call this sometime after calling [[deferIntercept]] to start monitoring the url.\n * This causes UI-Router to start listening for changes to the URL, if it wasn't already listening.\n *\n * If called with `false`, UI-Router will stop listening (call listen(true) to start listening again).\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * // Start responding to URL changes\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param enabled `true` or `false` to start or stop listening to URL changes\n */\n UrlService.prototype.listen = function (enabled) {\n var _this = this;\n if (enabled === false) {\n this._stopListeningFn && this._stopListeningFn();\n delete this._stopListeningFn;\n }\n else {\n return (this._stopListeningFn =\n this._stopListeningFn || this.router.urlService.onChange(function (evt) { return _this.sync(evt); }));\n }\n };\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * // Prevent UI-Router from automatically intercepting URL changes when it starts;\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n UrlService.prototype.deferIntercept = function (defer) {\n if (defer === undefined)\n defer = true;\n this.interceptDeferred = defer;\n };\n /**\n * Matches a URL\n *\n * Given a URL (as a [[UrlParts]] object), check all rules and determine the best matching rule.\n * Return the result as a [[MatchResult]].\n */\n UrlService.prototype.match = function (url) {\n var _this = this;\n url = extend({ path: '', search: {}, hash: '' }, url);\n var rules = this.rules.rules();\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n var checkRule = function (rule) {\n var match = rule.match(url, _this.router);\n return match && { match: match, rule: rule, weight: rule.matchPriority(match) };\n };\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n var best;\n for (var i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && best.rule._group !== rules[i]._group)\n break;\n var current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = !best || (current && current.weight > best.weight) ? current : best;\n }\n return best;\n };\n return UrlService;\n }());\n\n /** @internal */\n var _routerInstance = 0;\n /** @internal */\n var locSvcFns = ['url', 'path', 'search', 'hash', 'onChange'];\n /** @internal */\n var locCfgFns = ['port', 'protocol', 'host', 'baseHref', 'html5Mode', 'hashPrefix'];\n /** @internal */\n var locationServiceStub = makeStub('LocationServices', locSvcFns);\n /** @internal */\n var locationConfigStub = makeStub('LocationConfig', locCfgFns);\n /**\n * An instance of UI-Router.\n *\n * This object contains references to service APIs which define your application's routing behavior.\n */\n var UIRouter = /** @class */ (function () {\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internal\n */\n function UIRouter(locationService, locationConfig) {\n if (locationService === void 0) { locationService = locationServiceStub; }\n if (locationConfig === void 0) { locationConfig = locationConfigStub; }\n this.locationService = locationService;\n this.locationConfig = locationConfig;\n /** @internal */ this.$id = _routerInstance++;\n /** @internal */ this._disposed = false;\n /** @internal */ this._disposables = [];\n /** Enable/disable tracing to the javascript console */\n this.trace = trace;\n /** Provides services related to ui-view synchronization */\n this.viewService = new ViewService(this);\n /** An object that contains global router state, such as the current state and params */\n this.globals = new UIRouterGlobals();\n /** A service that exposes global Transition Hooks */\n this.transitionService = new TransitionService(this);\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n this.urlMatcherFactory = new UrlMatcherFactory(this);\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n this.urlRouter = new UrlRouter(this);\n /** Provides services related to the URL */\n this.urlService = new UrlService(this);\n /** Provides a registry for states, and related registration services */\n this.stateRegistry = new StateRegistry(this);\n /** Provides services related to states */\n this.stateService = new StateService(this);\n /** @internal plugin instances are registered here */\n this._plugins = {};\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlService);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n /** Registers an object to be notified when the router is disposed */\n UIRouter.prototype.disposable = function (disposable) {\n this._disposables.push(disposable);\n };\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @internal\n * @param disposable (optional) the disposable to dispose\n */\n UIRouter.prototype.dispose = function (disposable) {\n var _this = this;\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n this._disposed = true;\n this._disposables.slice().forEach(function (d) {\n try {\n typeof d.dispose === 'function' && d.dispose(_this);\n removeFrom(_this._disposables, d);\n }\n catch (ignored) { }\n });\n };\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n UIRouter.prototype.plugin = function (plugin, options) {\n if (options === void 0) { options = {}; }\n var pluginInstance = new plugin(this, options);\n if (!pluginInstance.name)\n throw new Error('Required property `name` missing on plugin: ' + pluginInstance);\n this._disposables.push(pluginInstance);\n return (this._plugins[pluginInstance.name] = pluginInstance);\n };\n UIRouter.prototype.getPlugin = function (pluginName) {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n };\n return UIRouter;\n }());\n\n function addCoreResolvables(trans) {\n trans.addResolvable(Resolvable.fromData(UIRouter, trans.router), '');\n trans.addResolvable(Resolvable.fromData(Transition, trans), '');\n trans.addResolvable(Resolvable.fromData('$transition$', trans), '');\n trans.addResolvable(Resolvable.fromData('$stateParams', trans.params()), '');\n trans.entering().forEach(function (state) {\n trans.addResolvable(Resolvable.fromData('$state$', state), state);\n });\n }\n var registerAddCoreResolvables = function (transitionService) {\n return transitionService.onCreate({}, addCoreResolvables);\n };\n var TRANSITION_TOKENS = ['$transition$', Transition];\n var isTransition = inArray(TRANSITION_TOKENS);\n // References to Transition in the treeChanges pathnodes makes all\n // previous Transitions reachable in memory, causing a memory leak\n // This function removes resolves for '$transition$' and `Transition` from the treeChanges.\n // Do not use this on current transitions, only on old ones.\n var treeChangesCleanup = function (trans) {\n var nodes = values(trans.treeChanges()).reduce(unnestR, []).reduce(uniqR, []);\n // If the resolvable is a Transition, return a new resolvable with null data\n var replaceTransitionWithNull = function (r) {\n return isTransition(r.token) ? Resolvable.fromData(r.token, null) : r;\n };\n nodes.forEach(function (node) {\n node.resolvables = node.resolvables.map(replaceTransitionWithNull);\n });\n };\n\n /**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n *\n * See [[StateDeclaration.redirectTo]]\n */\n var redirectToHook = function (trans) {\n var redirect = trans.to().redirectTo;\n if (!redirect)\n return;\n var $state = trans.router.stateService;\n function handleResult(result) {\n if (!result)\n return;\n if (result instanceof TargetState)\n return result;\n if (isString(result))\n return $state.target(result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n };\n var registerRedirectToHook = function (transitionService) {\n return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook);\n };\n\n /**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n */\n function makeEnterExitRetainHook(hookName) {\n return function (transition, state) {\n var _state = state.$$state();\n var hookFn = _state[hookName];\n return hookFn(transition, state);\n };\n }\n /**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\n var onExitHook = makeEnterExitRetainHook('onExit');\n var registerOnExitHook = function (transitionService) {\n return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook);\n };\n /**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\n var onRetainHook = makeEnterExitRetainHook('onRetain');\n var registerOnRetainHook = function (transitionService) {\n return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook);\n };\n /**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\n var onEnterHook = makeEnterExitRetainHook('onEnter');\n var registerOnEnterHook = function (transitionService) {\n return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook);\n };\n\n var RESOLVE_HOOK_PRIORITY = 1000;\n /**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath, { priority: 1000 });`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\n var eagerResolvePath = function (trans) {\n return new ResolveContext(trans.treeChanges().to).resolvePath('EAGER', trans).then(noop);\n };\n var registerEagerResolvePath = function (transitionService) {\n return transitionService.onStart({}, eagerResolvePath, { priority: RESOLVE_HOOK_PRIORITY });\n };\n /**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState, { priority: 1000 });`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\n var lazyResolveState = function (trans, state) {\n return new ResolveContext(trans.treeChanges().to).subContext(state.$$state()).resolvePath('LAZY', trans).then(noop);\n };\n var registerLazyResolveState = function (transitionService) {\n return transitionService.onEnter({ entering: val(true) }, lazyResolveState, { priority: RESOLVE_HOOK_PRIORITY });\n };\n /**\n * A [[TransitionHookFn]] which resolves any dynamically added (LAZY or EAGER) Resolvables.\n *\n * Registered using `transitionService.onFinish({}, eagerResolvePath, { priority: 1000 });`\n *\n * After all entering states have been entered, this hook resolves any remaining Resolvables.\n * These are typically dynamic resolves which were added by some Transition Hook using [[Transition.addResolvable]].\n *\n * See [[StateDeclaration.resolve]]\n */\n var resolveRemaining = function (trans) {\n return new ResolveContext(trans.treeChanges().to).resolvePath('LAZY', trans).then(noop);\n };\n var registerResolveRemaining = function (transitionService) {\n return transitionService.onFinish({}, resolveRemaining, { priority: RESOLVE_HOOK_PRIORITY });\n };\n\n /**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\n var loadEnteringViews = function (transition) {\n var $q = services.$q;\n var enteringViews = transition.views('entering');\n if (!enteringViews.length)\n return;\n return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(noop);\n };\n var registerLoadEnteringViews = function (transitionService) {\n return transitionService.onFinish({}, loadEnteringViews);\n };\n /**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\n var activateViews = function (transition) {\n var enteringViews = transition.views('entering');\n var exitingViews = transition.views('exiting');\n if (!enteringViews.length && !exitingViews.length)\n return;\n var $view = transition.router.viewService;\n exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); });\n enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); });\n $view.sync();\n };\n var registerActivateViews = function (transitionService) {\n return transitionService.onSuccess({}, activateViews);\n };\n\n /**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\n var updateGlobalState = function (trans) {\n var globals = trans.router.globals;\n var transitionSuccessful = function () {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n copy(trans.params(), globals.params);\n };\n var clearCurrentTransition = function () {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans)\n globals.transition = null;\n };\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n };\n var registerUpdateGlobalState = function (transitionService) {\n return transitionService.onCreate({}, updateGlobalState);\n };\n\n /**\n * A [[TransitionHookFn]] which updates the URL after a successful transition\n *\n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\n var updateUrl = function (transition) {\n var options = transition.options();\n var $state = transition.router.stateService;\n var $urlRouter = transition.router.urlRouter;\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = { replace: options.location === 'replace' };\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n $urlRouter.update(true);\n };\n var registerUpdateUrl = function (transitionService) {\n return transitionService.onSuccess({}, updateUrl, { priority: 9999 });\n };\n\n /**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\n var lazyLoadHook = function (transition) {\n var router = transition.router;\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n var orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n var $url = router.urlService;\n var result = $url.match($url.parts());\n var rule = result && result.rule;\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === 'STATE') {\n var state = rule.state;\n var params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n var promises = transition\n .entering()\n .filter(function (state) { return !!state.$$state().lazyLoad; })\n .map(function (state) { return lazyLoadState(transition, state); });\n return services.$q.all(promises).then(retryTransition);\n };\n var registerLazyLoadHook = function (transitionService) {\n return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook);\n };\n /**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\n function lazyLoadState(transition, state) {\n var lazyLoadFn = state.$$state().lazyLoad;\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n var promise = lazyLoadFn['_promise'];\n if (!promise) {\n var success = function (result) {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n var error = function (err) {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n promise = lazyLoadFn['_promise'] = services.$q\n .when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(function (_state) { return transition.router.stateRegistry.register(_state); });\n }\n return result;\n }\n return promise;\n }\n\n /**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n */\n var TransitionEventType = /** @class */ (function () {\n /* tslint:disable:no-inferrable-types */\n function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) {\n if (reverseSort === void 0) { reverseSort = false; }\n if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; }\n if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; }\n if (synchronous === void 0) { synchronous = false; }\n this.name = name;\n this.hookPhase = hookPhase;\n this.hookOrder = hookOrder;\n this.criteriaMatchPath = criteriaMatchPath;\n this.reverseSort = reverseSort;\n this.getResultHandler = getResultHandler;\n this.getErrorHandler = getErrorHandler;\n this.synchronous = synchronous;\n }\n return TransitionEventType;\n }());\n\n /**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\n function ignoredHook(trans) {\n var ignoredReason = trans._ignoredReason();\n if (!ignoredReason)\n return;\n trace.traceTransitionIgnored(trans);\n var pending = trans.router.globals.transition;\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n return Rejection.ignored().toPromise();\n }\n var registerIgnoredTransitionHook = function (transitionService) {\n return transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n };\n\n /**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\n function invalidTransitionHook(trans) {\n if (!trans.valid()) {\n throw new Error(trans.error().toString());\n }\n }\n var registerInvalidTransitionHook = function (transitionService) {\n return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n };\n\n /**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\n var defaultTransOpts = {\n location: true,\n relative: null,\n inherit: false,\n notify: true,\n reload: false,\n supercede: true,\n custom: {},\n current: function () { return null; },\n source: 'unknown',\n };\n /**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n *\n * This API is located at `router.transitionService` ([[UIRouter.transitionService]])\n */\n var TransitionService = /** @class */ (function () {\n /** @internal */\n function TransitionService(_router) {\n /** @internal */\n this._transitionCount = 0;\n /** The transition hook types, such as `onEnter`, `onStart`, etc */\n this._eventTypes = [];\n /** @internal The registered transition hooks */\n this._registeredHooks = {};\n /** The paths on a criteria object */\n this._criteriaPaths = {};\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = (createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]));\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n _router.globals.successfulTransitions.onEvict(treeChangesCleanup);\n }\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internal\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n TransitionService.prototype.onCreate = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onBefore = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onStart = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onExit = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onRetain = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onEnter = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onFinish = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onSuccess = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onError = function (criteria, callback, options) {\n return;\n };\n /**\n * dispose\n * @internal\n */\n TransitionService.prototype.dispose = function (router) {\n values(this._registeredHooks).forEach(function (hooksArray) {\n return hooksArray.forEach(function (hook) {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n });\n });\n };\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @internal\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n TransitionService.prototype.create = function (fromPath, targetState) {\n return new Transition(fromPath, targetState, this._router);\n };\n /** @internal */\n TransitionService.prototype._defineCoreEvents = function () {\n var Phase = exports.TransitionHookPhase;\n var TH = TransitionHook;\n var paths = this._criteriaPaths;\n var NORMAL_SORT = false, REVERSE_SORT = true;\n var SYNCHRONOUS = true;\n this._defineEvent('onCreate', Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n this._defineEvent('onBefore', Phase.BEFORE, 0, paths.to);\n this._defineEvent('onStart', Phase.RUN, 0, paths.to);\n this._defineEvent('onExit', Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent('onRetain', Phase.RUN, 200, paths.retained);\n this._defineEvent('onEnter', Phase.RUN, 300, paths.entering);\n this._defineEvent('onFinish', Phase.RUN, 400, paths.to);\n this._defineEvent('onSuccess', Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent('onError', Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n };\n /** @internal */\n TransitionService.prototype._defineCorePaths = function () {\n var STATE = exports.TransitionHookScope.STATE, TRANSITION = exports.TransitionHookScope.TRANSITION;\n this._definePathType('to', TRANSITION);\n this._definePathType('from', TRANSITION);\n this._definePathType('exiting', STATE);\n this._definePathType('retained', STATE);\n this._definePathType('entering', STATE);\n };\n /** @internal */\n TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) {\n if (reverseSort === void 0) { reverseSort = false; }\n if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; }\n if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; }\n if (synchronous === void 0) { synchronous = false; }\n var eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n /** @internal */\n TransitionService.prototype._getEvents = function (phase) {\n var transitionHookTypes = isDefined(phase)\n ? this._eventTypes.filter(function (type) { return type.hookPhase === phase; })\n : this._eventTypes.slice();\n return transitionHookTypes.sort(function (l, r) {\n var cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n });\n };\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @internal\n */\n TransitionService.prototype._definePathType = function (name, hookScope) {\n this._criteriaPaths[name] = { name: name, scope: hookScope };\n };\n /** @internal */\n // tslint:disable-next-line\n TransitionService.prototype._getPathTypes = function () {\n return this._criteriaPaths;\n };\n /** @internal */\n TransitionService.prototype.getHooks = function (hookName) {\n return this._registeredHooks[hookName];\n };\n /** @internal */\n TransitionService.prototype._registerCoreTransitionHooks = function () {\n var fns = this._deregisterHookFns;\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n fns.resolveAll = registerResolveRemaining(this);\n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n };\n return TransitionService;\n }());\n\n /**\n * Provides services related to ui-router states.\n *\n * This API is located at `router.stateService` ([[UIRouter.stateService]])\n */\n var StateService = /** @class */ (function () {\n /** @internal */\n function StateService(/** @internal */ router) {\n this.router = router;\n /** @internal */\n this.invalidCallbacks = [];\n /** @internal */\n this._defaultErrorHandler = function $defaultErrorHandler($error$) {\n if ($error$ instanceof Error && $error$.stack) {\n console.error($error$);\n console.error($error$.stack);\n }\n else if ($error$ instanceof Rejection) {\n console.error($error$.toString());\n if ($error$.detail && $error$.detail.stack)\n console.error($error$.detail.stack);\n }\n else {\n console.error($error$);\n }\n };\n var getters = ['current', '$current', 'params', 'transition'];\n var boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n Object.defineProperty(StateService.prototype, \"transition\", {\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get: function () {\n return this.router.globals.transition;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"params\", {\n /**\n * The latest successful state parameters\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get: function () {\n return this.router.globals.params;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"current\", {\n /**\n * The current [[StateDeclaration]]\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get: function () {\n return this.router.globals.current;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"$current\", {\n /**\n * The current [[StateObject]] (an internal API)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get: function () {\n return this.router.globals.$current;\n },\n enumerable: false,\n configurable: true\n });\n /** @internal */\n StateService.prototype.dispose = function () {\n this.defaultErrorHandler(noop);\n this.invalidCallbacks = [];\n };\n /**\n * Handler for when [[transitionTo]] is called with an invalid state.\n *\n * Invokes the [[onInvalid]] callbacks, in natural order.\n * Each callback's return value is checked in sequence until one of them returns an instance of TargetState.\n * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises.\n *\n * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.\n *\n * @internal\n */\n StateService.prototype._handleInvalidTargetState = function (fromPath, toState) {\n var _this = this;\n var fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n var globals = this.router.globals;\n var latestThing = function () { return globals.transitionHistory.peekTail(); };\n var latest = latestThing();\n var callbackQueue = new Queue(this.invalidCallbacks.slice());\n var injector = new ResolveContext(fromPath).injector();\n var checkForRedirect = function (result) {\n if (!(result instanceof TargetState)) {\n return;\n }\n var target = result;\n // Recreate the TargetState, in case the state is now defined.\n target = _this.target(target.identifier(), target.params(), target.options());\n if (!target.valid()) {\n return Rejection.invalid(target.error()).toPromise();\n }\n if (latestThing() !== latest) {\n return Rejection.superseded().toPromise();\n }\n return _this.transitionTo(target.identifier(), target.params(), target.options());\n };\n function invokeNextCallback() {\n var nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined)\n return Rejection.invalid(toState.error()).toPromise();\n var callbackResult = services.$q.when(nextCallback(toState, fromState, injector));\n return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); });\n }\n return invokeNextCallback();\n };\n /**\n * Registers an Invalid State handler\n *\n * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]]\n * has been called with an invalid state reference parameter\n *\n * Example:\n * ```js\n * stateService.onInvalid(function(to, from, injector) {\n * if (to.name() === 'foo') {\n * let lazyLoader = injector.get('LazyLoadService');\n * return lazyLoader.load('foo')\n * .then(() => stateService.target('foo'));\n * }\n * });\n * ```\n *\n * @param {function} callback invoked when the toState is invalid\n * This function receives the (invalid) toState, the fromState, and an injector.\n * The function may optionally return a [[TargetState]] or a Promise for a TargetState.\n * If one is returned, it is treated as a redirect.\n *\n * @returns a function which deregisters the callback\n */\n StateService.prototype.onInvalid = function (callback) {\n this.invalidCallbacks.push(callback);\n return function deregisterListener() {\n removeFrom(this.invalidCallbacks)(callback);\n }.bind(this);\n };\n /**\n * Reloads the current state\n *\n * A method that force reloads the current state, or a partial state hierarchy.\n * All resolves are re-resolved, and components reinstantiated.\n *\n * #### Example:\n * ```js\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * $state.reload();\n * }\n * });\n * ```\n *\n * Note: `reload()` is just an alias for:\n *\n * ```js\n * $state.transitionTo($state.current, $state.params, {\n * reload: true, inherit: false\n * });\n * ```\n *\n * @param reloadState A state name or a state object.\n * If present, this state and all its children will be reloaded, but ancestors will not reload.\n *\n * #### Example:\n * ```js\n * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item'\n * //and current state is 'contacts.detail.item'\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * //will reload 'contact.detail' and nested 'contact.detail.item' states\n * $state.reload('contact.detail');\n * }\n * });\n * ```\n *\n * @returns A promise representing the state of the new transition. See [[StateService.go]]\n */\n StateService.prototype.reload = function (reloadState) {\n return this.transitionTo(this.current, this.params, {\n reload: isDefined(reloadState) ? reloadState : true,\n inherit: false,\n notify: false,\n });\n };\n /**\n * Transition to a different state and/or parameters\n *\n * Convenience method for transitioning to a new state.\n *\n * `$state.go` calls `$state.transitionTo` internally but automatically sets options to\n * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`.\n * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`).\n * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters\n * inherit from the current parameter values (because of `inherit: true`).\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.go('contact.detail');\n * };\n * });\n * ```\n *\n * @param to Absolute state name, state object, or relative state path (relative to current state).\n *\n * Some examples:\n *\n * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n * - `$state.go('^')` - will go to the parent state\n * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state\n * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state\n *\n * @param params A map of the parameters that will be sent to the state, will populate $stateParams.\n *\n * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`).\n * This allows, for example, going to a sibling state that shares parameters defined by a parent state.\n *\n * @param options Transition options\n *\n * @returns {promise} A promise representing the state of the new transition.\n */\n StateService.prototype.go = function (to, params, options) {\n var defautGoOpts = { relative: this.$current, inherit: true };\n var transOpts = defaults(options, defautGoOpts, defaultTransOpts);\n return this.transitionTo(to, params, transOpts);\n };\n /**\n * Creates a [[TargetState]]\n *\n * This is a factory method for creating a TargetState\n *\n * This may be returned from a Transition Hook to redirect a transition, for example.\n */\n StateService.prototype.target = function (identifier, params, options) {\n if (options === void 0) { options = {}; }\n // If we're reloading, find the state object to reload from\n if (isObject(options.reload) && !options.reload.name)\n throw new Error('Invalid reload state object');\n var reg = this.router.stateRegistry;\n options.reloadState =\n options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative);\n if (options.reload && !options.reloadState)\n throw new Error(\"No such reload state '\" + (isString(options.reload) ? options.reload : options.reload.name) + \"'\");\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n /** @internal */\n StateService.prototype.getCurrentPath = function () {\n var _this = this;\n var globals = this.router.globals;\n var latestSuccess = globals.successfulTransitions.peekTail();\n var rootPath = function () { return [new PathNode(_this.router.stateRegistry.root())]; };\n return latestSuccess ? latestSuccess.treeChanges().to : rootPath();\n };\n /**\n * Low-level method for transitioning to a new state.\n *\n * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations.\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.transitionTo('contact.detail');\n * };\n * });\n * ```\n *\n * @param to State name or state object.\n * @param toParams A map of the parameters that will be sent to the state,\n * will populate $stateParams.\n * @param options Transition options\n *\n * @returns A promise representing the state of the new transition. See [[go]]\n */\n StateService.prototype.transitionTo = function (to, toParams, options) {\n var _this = this;\n if (toParams === void 0) { toParams = {}; }\n if (options === void 0) { options = {}; }\n var router = this.router;\n var globals = router.globals;\n options = defaults(options, defaultTransOpts);\n var getCurrent = function () { return globals.transition; };\n options = extend(options, { current: getCurrent });\n var ref = this.target(to, toParams, options);\n var currentPath = this.getCurrentPath();\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n if (!ref.valid())\n return silentRejection(ref.error());\n if (options.supercede === false && getCurrent()) {\n return (Rejection.ignored('Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.').toPromise());\n }\n /**\n * Special handling for Ignored, Aborted, and Redirected transitions\n *\n * The semantics for the transition.run() promise and the StateService.transitionTo()\n * promise differ. For instance, the run() promise may be rejected because it was\n * IGNORED, but the transitionTo() promise is resolved because from the user perspective\n * no error occurred. Likewise, the transition.run() promise may be rejected because of\n * a Redirect, but the transitionTo() promise is chained to the new Transition's promise.\n */\n var rejectedTransitionHandler = function (trans) { return function (error) {\n if (error instanceof Rejection) {\n var isLatest = router.globals.lastStartedTransitionId <= trans.$id;\n if (error.type === exports.RejectType.IGNORED) {\n isLatest && router.urlRouter.update();\n // Consider ignored `Transition.run()` as a successful `transitionTo`\n return services.$q.when(globals.current);\n }\n var detail = error.detail;\n if (error.type === exports.RejectType.SUPERSEDED && error.redirected && detail instanceof TargetState) {\n // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully\n // by returning the promise for the new (redirect) `Transition.run()`.\n var redirect = trans.redirect(detail);\n return redirect.run().catch(rejectedTransitionHandler(redirect));\n }\n if (error.type === exports.RejectType.ABORTED) {\n isLatest && router.urlRouter.update();\n return services.$q.reject(error);\n }\n }\n var errorHandler = _this.defaultErrorHandler();\n errorHandler(error);\n return services.$q.reject(error);\n }; };\n var transition = this.router.transitionService.create(currentPath, ref);\n var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition));\n silenceUncaughtInPromise(transitionToPromise); // issue #2676\n // Return a promise for the transition, which also has the transition object on it.\n return extend(transitionToPromise, { transition: transition });\n };\n /**\n * Checks if the current state *is* the provided state\n *\n * Similar to [[includes]] but only checks for the full state name.\n * If params is supplied then it will be tested for strict equality against the current\n * active params object, so all params must match with none missing and no extras.\n *\n * #### Example:\n * ```js\n * $state.$current.name = 'contacts.details.item';\n *\n * // absolute name\n * $state.is('contact.details.item'); // returns true\n * $state.is(contactDetailItemStateObject); // returns true\n * ```\n *\n * // relative name (. and ^), typically from a template\n * // E.g. from the 'contacts.details' template\n * ```html\n *
Item
\n * ```\n *\n * @param stateOrName The state name (absolute or relative) or state object you'd like to check.\n * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like\n * to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns Returns true if it is the state.\n */\n StateService.prototype.is = function (stateOrName, params, options) {\n options = defaults(options, { relative: this.$current });\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n if (!isDefined(state))\n return undefined;\n if (this.$current !== state)\n return false;\n if (!params)\n return true;\n var schema = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\n /**\n * Checks if the current state *includes* the provided state\n *\n * A method to determine if the current active state is equal to or is the child of the\n * state stateName. If any params are passed then they will be tested for a match as well.\n * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n *\n * #### Example when `$state.$current.name === 'contacts.details.item'`\n * ```js\n * // Using partial names\n * $state.includes(\"contacts\"); // returns true\n * $state.includes(\"contacts.details\"); // returns true\n * $state.includes(\"contacts.details.item\"); // returns true\n * $state.includes(\"contacts.list\"); // returns false\n * $state.includes(\"about\"); // returns false\n * ```\n *\n * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`:\n * ```js\n * $state.includes(\"*.details.*.*\"); // returns true\n * $state.includes(\"*.details.**\"); // returns true\n * $state.includes(\"**.item.**\"); // returns true\n * $state.includes(\"*.details.item.url\"); // returns true\n * $state.includes(\"*.details.*.url\"); // returns true\n * $state.includes(\"*.details.*\"); // returns false\n * $state.includes(\"item.**\"); // returns false\n * ```\n *\n * @param stateOrName A partial name, relative name, glob pattern,\n * or state object to be searched for within the current state name.\n * @param params A param object, e.g. `{sectionId: section.id}`,\n * that you'd like to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns {boolean} Returns true if it does include the state\n */\n StateService.prototype.includes = function (stateOrName, params, options) {\n options = defaults(options, { relative: this.$current });\n var glob = isString(stateOrName) && Glob.fromString(stateOrName);\n if (glob) {\n if (!glob.matches(this.$current.name))\n return false;\n stateOrName = this.$current.name;\n }\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes;\n if (!isDefined(state))\n return undefined;\n if (!isDefined(include[state.name]))\n return false;\n if (!params)\n return true;\n var schema = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\n /**\n * Generates a URL for a state and parameters\n *\n * Returns the url for the given state populated with the given params.\n *\n * #### Example:\n * ```js\n * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n * ```\n *\n * @param stateOrName The state name or state object you'd like to generate a url from.\n * @param params An object of parameter values to fill the state's required parameters.\n * @param options Options object. The options are:\n *\n * @returns {string} compiled state url\n */\n StateService.prototype.href = function (stateOrName, params, options) {\n var defaultHrefOpts = {\n lossy: true,\n inherit: true,\n absolute: false,\n relative: this.$current,\n };\n options = defaults(options, defaultHrefOpts);\n params = params || {};\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n if (!isDefined(state))\n return null;\n if (options.inherit)\n params = this.params.$inherit(params, this.$current, state);\n var nav = state && options.lossy ? state.navigable : state;\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, { absolute: options.absolute });\n };\n /**\n * Sets or gets the default [[transitionTo]] error handler.\n *\n * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition.\n * This includes errors caused by resolves and transition hooks.\n *\n * Note:\n * This handler does not receive certain Transition rejections.\n * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]].\n *\n * The built-in default error handler logs the error to the console.\n *\n * You can provide your own custom handler.\n *\n * #### Example:\n * ```js\n * stateService.defaultErrorHandler(function() {\n * // Do not log transitionTo errors\n * });\n * ```\n *\n * @param handler a global error handler function\n * @returns the current global error handler\n */\n StateService.prototype.defaultErrorHandler = function (handler) {\n return (this._defaultErrorHandler = handler || this._defaultErrorHandler);\n };\n StateService.prototype.get = function (stateOrName, base) {\n var reg = this.router.stateRegistry;\n if (arguments.length === 0)\n return reg.get();\n return reg.get(stateOrName, base || this.$current);\n };\n /**\n * Lazy loads a state\n *\n * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function.\n *\n * @param stateOrName the state that should be lazy loaded\n * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc)\n * Note: If no transition is provided, a noop transition is created using the from the current state to the current state.\n * This noop transition is not actually run.\n *\n * @returns a promise to lazy load\n */\n StateService.prototype.lazyLoad = function (stateOrName, transition) {\n var state = this.get(stateOrName);\n if (!state || !state.lazyLoad)\n throw new Error('Can not lazy load ' + stateOrName);\n var currentPath = this.getCurrentPath();\n var target = PathUtils.makeTargetState(this.router.stateRegistry, currentPath);\n transition = transition || this.router.transitionService.create(currentPath, target);\n return lazyLoadState(transition, state);\n };\n return StateService;\n }());\n\n /**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\n var $q = {\n /** Normalizes a value as a promise */\n when: function (val) { return new Promise(function (resolve, reject) { return resolve(val); }); },\n /** Normalizes a value as a promise rejection */\n reject: function (val) {\n return new Promise(function (resolve, reject) {\n reject(val);\n });\n },\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: function () {\n var deferred = {};\n deferred.promise = new Promise(function (resolve, reject) {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: function (promises) {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n var chain = Object.keys(promises).map(function (key) { return promises[key].then(function (val) { return ({ key: key, val: val }); }); });\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(function (values) {\n return values.reduce(function (acc, tuple) {\n acc[tuple.key] = tuple.val;\n return acc;\n }, {});\n });\n }\n },\n };\n\n // globally available injectables\n var globals = {};\n var STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/gm;\n var ARGUMENT_NAMES = /([^\\s,]+)/g;\n /**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\n var $injector = {\n /** Gets an object from DI based on a string token */\n get: function (name) { return globals[name]; },\n /** Returns true if an object named `name` exists in global DI */\n has: function (name) { return $injector.get(name) != null; },\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: function (fn, context, locals) {\n var all = extend({}, globals, locals || {});\n var params = $injector.annotate(fn);\n var ensureExist = assertPredicate(function (key) { return all.hasOwnProperty(key); }, function (key) { return \"DI can't find injectable: '\" + key + \"'\"; });\n var args = params.filter(ensureExist).map(function (x) { return all[x]; });\n if (isFunction(fn))\n return fn.apply(context, args);\n else\n return fn.slice(-1)[0].apply(context, args);\n },\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: function (fn) {\n if (!isInjectable(fn))\n throw new Error(\"Not an injectable function: \" + fn);\n if (fn && fn.$inject)\n return fn.$inject;\n if (isArray(fn))\n return fn.slice(0, -1);\n var fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n },\n };\n\n var keyValsToObjectR = function (accum, _a) {\n var key = _a[0], val = _a[1];\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n }\n else if (isArray(accum[key])) {\n accum[key].push(val);\n }\n else {\n accum[key] = [accum[key], val];\n }\n return accum;\n };\n var getParams = function (queryString) {\n return queryString.split('&').filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n };\n function parseUrl$1(url) {\n var orEmptyString = function (x) { return x || ''; };\n var _a = splitHash(url).map(orEmptyString), beforehash = _a[0], hash = _a[1];\n var _b = splitQuery(beforehash).map(orEmptyString), path = _b[0], search = _b[1];\n return { path: path, search: search, hash: hash, url: url };\n }\n var buildUrl = function (loc) {\n var path = loc.path();\n var searchObject = loc.search();\n var hash = loc.hash();\n var search = Object.keys(searchObject)\n .map(function (key) {\n var param = searchObject[key];\n var vals = isArray(param) ? param : [param];\n return vals.map(function (val) { return key + '=' + val; });\n })\n .reduce(unnestR, [])\n .join('&');\n return path + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n };\n function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) {\n return function (uiRouter) {\n var service = (uiRouter.locationService = new serviceClass(uiRouter));\n var configuration = (uiRouter.locationConfig = new configurationClass(uiRouter, isHtml5));\n function dispose(router) {\n router.dispose(service);\n router.dispose(configuration);\n }\n return { name: name, service: service, configuration: configuration, dispose: dispose };\n };\n }\n\n /** A base `LocationServices` */\n var BaseLocationServices = /** @class */ (function () {\n function BaseLocationServices(router, fireAfterUpdate) {\n var _this = this;\n this.fireAfterUpdate = fireAfterUpdate;\n this._listeners = [];\n this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); };\n this.hash = function () { return parseUrl$1(_this._get()).hash; };\n this.path = function () { return parseUrl$1(_this._get()).path; };\n this.search = function () { return getParams(parseUrl$1(_this._get()).search); };\n this._location = root.location;\n this._history = root.history;\n }\n BaseLocationServices.prototype.url = function (url, replace) {\n if (replace === void 0) { replace = true; }\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n if (this.fireAfterUpdate) {\n this._listeners.forEach(function (cb) { return cb({ url: url }); });\n }\n }\n return buildUrl(this);\n };\n BaseLocationServices.prototype.onChange = function (cb) {\n var _this = this;\n this._listeners.push(cb);\n return function () { return removeFrom(_this._listeners, cb); };\n };\n BaseLocationServices.prototype.dispose = function (router) {\n deregAll(this._listeners);\n };\n return BaseLocationServices;\n }());\n\n var __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n /** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\n var HashLocationService = /** @class */ (function (_super) {\n __extends(HashLocationService, _super);\n function HashLocationService(router) {\n var _this = _super.call(this, router, false) || this;\n root.addEventListener('hashchange', _this._listener, false);\n return _this;\n }\n HashLocationService.prototype._get = function () {\n return trimHashVal(this._location.hash);\n };\n HashLocationService.prototype._set = function (state, title, url, replace) {\n this._location.hash = url;\n };\n HashLocationService.prototype.dispose = function (router) {\n _super.prototype.dispose.call(this, router);\n root.removeEventListener('hashchange', this._listener);\n };\n return HashLocationService;\n }(BaseLocationServices));\n\n var __extends$1 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n /** A `LocationServices` that gets/sets the current location from an in-memory object */\n var MemoryLocationService = /** @class */ (function (_super) {\n __extends$1(MemoryLocationService, _super);\n function MemoryLocationService(router) {\n return _super.call(this, router, true) || this;\n }\n MemoryLocationService.prototype._get = function () {\n return this._url;\n };\n MemoryLocationService.prototype._set = function (state, title, url, replace) {\n this._url = url;\n };\n return MemoryLocationService;\n }(BaseLocationServices));\n\n var __extends$2 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n /**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\n var PushStateLocationService = /** @class */ (function (_super) {\n __extends$2(PushStateLocationService, _super);\n function PushStateLocationService(router) {\n var _this = _super.call(this, router, true) || this;\n _this._config = router.urlService.config;\n root.addEventListener('popstate', _this._listener, false);\n return _this;\n }\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/foo/base'.\n * If , this returns '/base'.\n * If , this returns '/base'.\n * If , this returns ''.\n * If , this returns ''.\n * If , this returns ''.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n PushStateLocationService.prototype._getBasePrefix = function () {\n return stripLastPathElement(this._config.baseHref());\n };\n PushStateLocationService.prototype._get = function () {\n var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n var basePrefix = this._getBasePrefix();\n var exactBaseHrefMatch = pathname === this._config.baseHref();\n var startsWithBase = pathname.substr(0, basePrefix.length) === basePrefix;\n pathname = exactBaseHrefMatch ? '/' : startsWithBase ? pathname.substring(basePrefix.length) : pathname;\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n };\n PushStateLocationService.prototype._set = function (state, title, url, replace) {\n var basePrefix = this._getBasePrefix();\n var slash = url && url[0] !== '/' ? '/' : '';\n var fullUrl = url === '' || url === '/' ? this._config.baseHref() : basePrefix + slash + url;\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n }\n else {\n this._history.pushState(state, title, fullUrl);\n }\n };\n PushStateLocationService.prototype.dispose = function (router) {\n _super.prototype.dispose.call(this, router);\n root.removeEventListener('popstate', this._listener);\n };\n return PushStateLocationService;\n }(BaseLocationServices));\n\n /** A `LocationConfig` mock that gets/sets all config from an in-memory object */\n var MemoryLocationConfig = /** @class */ (function () {\n function MemoryLocationConfig() {\n var _this = this;\n this.dispose = noop;\n this._baseHref = '';\n this._port = 80;\n this._protocol = 'http';\n this._host = 'localhost';\n this._hashPrefix = '';\n this.port = function () { return _this._port; };\n this.protocol = function () { return _this._protocol; };\n this.host = function () { return _this._host; };\n this.baseHref = function () { return _this._baseHref; };\n this.html5Mode = function () { return false; };\n this.hashPrefix = function (newval) { return (isDefined(newval) ? (_this._hashPrefix = newval) : _this._hashPrefix); };\n }\n return MemoryLocationConfig;\n }());\n\n /** A `LocationConfig` that delegates to the browser's `location` object */\n var BrowserLocationConfig = /** @class */ (function () {\n function BrowserLocationConfig(router, _isHtml5) {\n if (_isHtml5 === void 0) { _isHtml5 = false; }\n this._isHtml5 = _isHtml5;\n this._baseHref = undefined;\n this._hashPrefix = '';\n }\n BrowserLocationConfig.prototype.port = function () {\n if (location.port) {\n return Number(location.port);\n }\n return this.protocol() === 'https' ? 443 : 80;\n };\n BrowserLocationConfig.prototype.protocol = function () {\n return location.protocol.replace(/:/g, '');\n };\n BrowserLocationConfig.prototype.host = function () {\n return location.hostname;\n };\n BrowserLocationConfig.prototype.html5Mode = function () {\n return this._isHtml5;\n };\n BrowserLocationConfig.prototype.hashPrefix = function (newprefix) {\n return isDefined(newprefix) ? (this._hashPrefix = newprefix) : this._hashPrefix;\n };\n BrowserLocationConfig.prototype.baseHref = function (href) {\n if (isDefined(href))\n this._baseHref = href;\n if (isUndefined(this._baseHref))\n this._baseHref = this.getBaseHref();\n return this._baseHref;\n };\n BrowserLocationConfig.prototype.getBaseHref = function () {\n var baseTag = document.getElementsByTagName('base')[0];\n if (baseTag && baseTag.href) {\n return baseTag.href.replace(/^([^/:]*:)?\\/\\/[^/]*/, '');\n }\n return this._isHtml5 ? '/' : location.pathname || '/';\n };\n BrowserLocationConfig.prototype.dispose = function () { };\n return BrowserLocationConfig;\n }());\n\n function servicesPlugin(router) {\n services.$injector = $injector;\n services.$q = $q;\n return { name: 'vanilla.services', $q: $q, $injector: $injector, dispose: function () { return null; } };\n }\n /** A `UIRouterPlugin` uses the browser hash to get/set the current location */\n var hashLocationPlugin = locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n /** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\n var pushStateLocationPlugin = locationPluginFactory('vanilla.pushStateLocation', true, PushStateLocationService, BrowserLocationConfig);\n /** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\n var memoryLocationPlugin = locationPluginFactory('vanilla.memoryLocation', false, MemoryLocationService, MemoryLocationConfig);\n\n var UIRouterPluginBase = /** @class */ (function () {\n function UIRouterPluginBase() {\n }\n UIRouterPluginBase.prototype.dispose = function (router) { };\n return UIRouterPluginBase;\n }());\n\n var index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n root: root,\n fromJson: fromJson,\n toJson: toJson,\n forEach: forEach,\n extend: extend,\n equals: equals,\n identity: identity,\n noop: noop,\n createProxyFunctions: createProxyFunctions,\n inherit: inherit,\n inArray: inArray,\n _inArray: _inArray,\n removeFrom: removeFrom,\n _removeFrom: _removeFrom,\n pushTo: pushTo,\n _pushTo: _pushTo,\n deregAll: deregAll,\n defaults: defaults,\n mergeR: mergeR,\n ancestors: ancestors,\n pick: pick,\n omit: omit,\n pluck: pluck,\n filter: filter,\n find: find,\n mapObj: mapObj,\n map: map,\n values: values,\n allTrueR: allTrueR,\n anyTrueR: anyTrueR,\n unnestR: unnestR,\n flattenR: flattenR,\n pushR: pushR,\n uniqR: uniqR,\n unnest: unnest,\n flatten: flatten,\n assertPredicate: assertPredicate,\n assertMap: assertMap,\n assertFn: assertFn,\n pairs: pairs,\n arrayTuples: arrayTuples,\n applyPairs: applyPairs,\n tail: tail,\n copy: copy,\n _extend: _extend,\n silenceUncaughtInPromise: silenceUncaughtInPromise,\n silentRejection: silentRejection,\n makeStub: makeStub,\n services: services,\n Glob: Glob,\n curry: curry,\n compose: compose,\n pipe: pipe,\n prop: prop,\n propEq: propEq,\n parse: parse,\n not: not,\n and: and,\n or: or,\n all: all,\n any: any,\n is: is,\n eq: eq,\n val: val,\n invoke: invoke,\n pattern: pattern,\n isUndefined: isUndefined,\n isDefined: isDefined,\n isNull: isNull,\n isNullOrUndefined: isNullOrUndefined,\n isFunction: isFunction,\n isNumber: isNumber,\n isString: isString,\n isObject: isObject,\n isArray: isArray,\n isDate: isDate,\n isRegExp: isRegExp,\n isInjectable: isInjectable,\n isPromise: isPromise,\n Queue: Queue,\n maxLength: maxLength,\n padString: padString,\n kebobString: kebobString,\n functionToString: functionToString,\n fnToString: fnToString,\n stringify: stringify,\n beforeAfterSubstr: beforeAfterSubstr,\n hostRegex: hostRegex,\n stripLastPathElement: stripLastPathElement,\n splitHash: splitHash,\n splitQuery: splitQuery,\n splitEqual: splitEqual,\n trimHashVal: trimHashVal,\n splitOnDelim: splitOnDelim,\n joinNeighborsR: joinNeighborsR,\n get Category () { return exports.Category; },\n Trace: Trace,\n trace: trace,\n get DefType () { return exports.DefType; },\n Param: Param,\n ParamTypes: ParamTypes,\n StateParams: StateParams,\n ParamType: ParamType,\n PathNode: PathNode,\n PathUtils: PathUtils,\n resolvePolicies: resolvePolicies,\n defaultResolvePolicy: defaultResolvePolicy,\n Resolvable: Resolvable,\n NATIVE_INJECTOR_TOKEN: NATIVE_INJECTOR_TOKEN,\n ResolveContext: ResolveContext,\n resolvablesBuilder: resolvablesBuilder,\n StateBuilder: StateBuilder,\n StateObject: StateObject,\n StateMatcher: StateMatcher,\n StateQueueManager: StateQueueManager,\n StateRegistry: StateRegistry,\n StateService: StateService,\n TargetState: TargetState,\n get TransitionHookPhase () { return exports.TransitionHookPhase; },\n get TransitionHookScope () { return exports.TransitionHookScope; },\n HookBuilder: HookBuilder,\n matchState: matchState,\n RegisteredHook: RegisteredHook,\n makeEvent: makeEvent,\n get RejectType () { return exports.RejectType; },\n Rejection: Rejection,\n Transition: Transition,\n TransitionHook: TransitionHook,\n TransitionEventType: TransitionEventType,\n defaultTransOpts: defaultTransOpts,\n TransitionService: TransitionService,\n UrlRules: UrlRules,\n UrlConfig: UrlConfig,\n UrlMatcher: UrlMatcher,\n ParamFactory: ParamFactory,\n UrlMatcherFactory: UrlMatcherFactory,\n UrlRouter: UrlRouter,\n UrlRuleFactory: UrlRuleFactory,\n BaseUrlRule: BaseUrlRule,\n UrlService: UrlService,\n ViewService: ViewService,\n UIRouterGlobals: UIRouterGlobals,\n UIRouter: UIRouter,\n $q: $q,\n $injector: $injector,\n BaseLocationServices: BaseLocationServices,\n HashLocationService: HashLocationService,\n MemoryLocationService: MemoryLocationService,\n PushStateLocationService: PushStateLocationService,\n MemoryLocationConfig: MemoryLocationConfig,\n BrowserLocationConfig: BrowserLocationConfig,\n keyValsToObjectR: keyValsToObjectR,\n getParams: getParams,\n parseUrl: parseUrl$1,\n buildUrl: buildUrl,\n locationPluginFactory: locationPluginFactory,\n servicesPlugin: servicesPlugin,\n hashLocationPlugin: hashLocationPlugin,\n pushStateLocationPlugin: pushStateLocationPlugin,\n memoryLocationPlugin: memoryLocationPlugin,\n UIRouterPluginBase: UIRouterPluginBase\n });\n\n /** @publicapi @module ng1 */ /** */\n /** @internalapi */\n function getNg1ViewConfigFactory() {\n var templateFactory = null;\n return function (path, view) {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n }\n /** @internalapi */\n var hasAnyKey = function (keys, obj) { return keys.reduce(function (acc, key) { return acc || isDefined(obj[key]); }, false); };\n /**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\n function ng1ViewsBuilder(state) {\n // Do not process root state\n if (!state.parent)\n return {};\n var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys);\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\"State '\" + state.name + \"' has a 'views' object. \" +\n \"It cannot also have \\\"view properties\\\" at the state level. \" +\n \"Move the following properties into a view (in the 'views' object): \" +\n (\" \" + allViewKeys.filter(function (key) { return isDefined(state[key]); }).join(', ')));\n }\n var views = {}, viewsObject = state.views || { $default: pick(state, allViewKeys) };\n forEach(viewsObject, function (config, name) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config))\n config = { component: config };\n // Make a shallow copy of the config object\n config = extend({}, config);\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\"Cannot combine: \" + compKeys.join('|') + \" with: \" + nonCompKeys.join('|') + \" in stateview: '\" + name + \"@\" + state.name + \"'\");\n }\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n var normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n views[name] = config;\n });\n return views;\n }\n /** @hidden */\n var id$1 = 0;\n /** @internalapi */\n var Ng1ViewConfig = /** @class */ (function () {\n function Ng1ViewConfig(path, viewDecl, factory) {\n var _this = this;\n this.path = path;\n this.viewDecl = viewDecl;\n this.factory = factory;\n this.$id = id$1++;\n this.loaded = false;\n this.getTemplate = function (uiView, context) {\n return _this.component\n ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings)\n : _this.template;\n };\n }\n Ng1ViewConfig.prototype.load = function () {\n var _this = this;\n var $q = services.$q;\n var context = new ResolveContext(this.path);\n var params = this.path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {});\n var promises = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n return $q.all(promises).then(function (results) {\n trace.traceViewServiceEvent('Loaded', _this);\n _this.controller = results.controller;\n extend(_this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return _this;\n });\n };\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n Ng1ViewConfig.prototype.getController = function (context) {\n var provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider))\n return this.viewDecl.controller;\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n return Ng1ViewConfig;\n }());\n\n /** @publicapi @module view */ /** */\n /**\n * Service which manages loading of templates from a ViewConfig.\n */\n var TemplateFactory = /** @class */ (function () {\n function TemplateFactory() {\n var _this = this;\n /** @hidden */ this._useHttp = ng.version.minor < 3;\n /** @hidden */ this.$get = [\n '$http',\n '$templateCache',\n '$injector',\n function ($http, $templateCache, $injector) {\n _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n _this.$http = $http;\n _this.$templateCache = $templateCache;\n return _this;\n },\n ];\n }\n /** @hidden */\n TemplateFactory.prototype.useHttpService = function (value) {\n this._useHttp = value;\n };\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n TemplateFactory.prototype.fromConfig = function (config, params, context) {\n var defaultTemplate = '';\n var asTemplate = function (result) { return services.$q.when(result).then(function (str) { return ({ template: str }); }); };\n var asComponent = function (result) { return services.$q.when(result).then(function (str) { return ({ component: str }); }); };\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n };\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n TemplateFactory.prototype.fromString = function (template, params) {\n return isFunction(template) ? template(params) : template;\n };\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n TemplateFactory.prototype.fromUrl = function (url, params) {\n if (isFunction(url))\n url = url(params);\n if (url == null)\n return null;\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n return this.$templateRequest(url);\n };\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n TemplateFactory.prototype.fromProvider = function (provider, params, context) {\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) {\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) {\n bindings = bindings || {};\n // Bind once prefix\n var prefix = ng.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n var kebob = function (camelCase) {\n var kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? \"x-\" + kebobed : kebobed;\n };\n var attributeTpl = function (input) {\n var name = input.name, type = input.type;\n var attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return attrName + \"='\" + uiView.attr(attrName) + \"'\";\n var resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return attrName + \"='{{\" + prefix + \"$resolve.\" + resolveName + \"}}'\";\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n var res = context.getResolvable(resolveName);\n var fn = res && res.data;\n var args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n var arrayIdxStr = isArray(fn) ? \"[\" + (fn.length - 1) + \"]\" : '';\n return attrName + \"='$resolve.\" + resolveName + arrayIdxStr + \"(\" + args.join(',') + \")'\";\n }\n // some-attr=\"::$resolve.someResolveName\"\n return attrName + \"='\" + prefix + \"$resolve.\" + resolveName + \"'\";\n };\n var attrs = getComponentBindings(component).map(attributeTpl).join(' ');\n var kebobName = kebob(component);\n return \"<\" + kebobName + \" \" + attrs + \">\";\n };\n return TemplateFactory;\n }());\n // Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\n function getComponentBindings(name) {\n var cmpDefs = services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length)\n throw new Error(\"Unable to find component named '\" + name + \"'\");\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n }\n // Given a directive definition, find its object input attributes\n // Use different properties, depending on the type of directive (component, bindToController, normal)\n var getBindings = function (def) {\n if (isObject(def.bindToController))\n return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n };\n // for ng 1.2 style, process the scope: { input: \"=foo\" }\n // for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\n var scopeBindings = function (bindingsObj) {\n return Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; })\n // skip malformed values\n .filter(function (tuple) { return isDefined(tuple) && isArray(tuple[1]); })\n // { name: ('foo' || 'input'), type: '=' }\n .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); });\n };\n\n /** @publicapi @module ng1 */ /** */\n /**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\n var StateProvider = /** @class */ (function () {\n function StateProvider(stateRegistry, stateService) {\n this.stateRegistry = stateRegistry;\n this.stateService = stateService;\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n StateProvider.prototype.decorator = function (name, func) {\n return this.stateRegistry.decorator(name, func) || this;\n };\n StateProvider.prototype.state = function (name, definition) {\n if (isObject(name)) {\n definition = name;\n }\n else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n };\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n StateProvider.prototype.onInvalid = function (callback) {\n return this.stateService.onInvalid(callback);\n };\n return StateProvider;\n }());\n\n /** @publicapi @module ng1 */ /** */\n /**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n *\n * @internalapi\n */\n var getStateHookBuilder = function (hookName) {\n return function stateHookBuilder(stateObject) {\n var hook = stateObject[hookName];\n var pathname = hookName === 'onExit' ? 'from' : 'to';\n function decoratedNg1Hook(trans, state) {\n var resolveContext = new ResolveContext(trans.treeChanges(pathname));\n var subContext = resolveContext.subContext(state.$$state());\n var locals = extend(getLocals(subContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n return hook ? decoratedNg1Hook : undefined;\n };\n };\n\n /** @publicapi @module ng1 */ /** */\n /**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\n var Ng1LocationServices = /** @class */ (function () {\n function Ng1LocationServices($locationProvider) {\n // .onChange() registry\n this._urlListeners = [];\n this.$locationProvider = $locationProvider;\n var _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n Ng1LocationServices.monkeyPatchPathParameterType = function (router) {\n var pathType = router.urlMatcherFactory.type('path');\n pathType.encode = function (x) {\n return x != null ? x.toString().replace(/(~|\\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : x;\n };\n pathType.decode = function (x) {\n return x != null ? x.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : x;\n };\n };\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n Ng1LocationServices.prototype.dispose = function () { };\n Ng1LocationServices.prototype.onChange = function (callback) {\n var _this = this;\n this._urlListeners.push(callback);\n return function () { return removeFrom(_this._urlListeners)(callback); };\n };\n Ng1LocationServices.prototype.html5Mode = function () {\n var html5Mode = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n };\n Ng1LocationServices.prototype.baseHref = function () {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n };\n Ng1LocationServices.prototype.url = function (newUrl, replace, state) {\n if (replace === void 0) { replace = false; }\n if (isDefined(newUrl))\n this.$location.url(newUrl);\n if (replace)\n this.$location.replace();\n if (state)\n this.$location.state(state);\n return this.$location.url();\n };\n Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser, $window) {\n var _this = this;\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); });\n var _loc = val($location);\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n };\n return Ng1LocationServices;\n }());\n\n /** @publicapi @module url */ /** */\n /**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\n var UrlRouterProvider = /** @class */ (function () {\n /** @hidden */\n function UrlRouterProvider(/** @hidden */ router) {\n this.router = router;\n }\n UrlRouterProvider.injectableHandler = function (router, handler) {\n return function (match) { return services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); };\n };\n /** @hidden */\n UrlRouterProvider.prototype.$get = function () {\n var urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred)\n urlService.listen();\n return this.router.urlRouter;\n };\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n UrlRouterProvider.prototype.rule = function (ruleFn) {\n var _this = this;\n if (!isFunction(ruleFn))\n throw new Error(\"'rule' must be a function\");\n var match = function () { return ruleFn(services.$injector, _this.router.locationService); };\n var rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n };\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n UrlRouterProvider.prototype.otherwise = function (rule) {\n var _this = this;\n var urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n }\n else if (isFunction(rule)) {\n urlRules.otherwise(function () { return rule(services.$injector, _this.router.locationService); });\n }\n else {\n throw new Error(\"'rule' must be a string or function\");\n }\n return this;\n };\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n UrlRouterProvider.prototype.when = function (what, handler) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n this.router.urlService.rules.when(what, handler);\n return this;\n };\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n UrlRouterProvider.prototype.deferIntercept = function (defer) {\n this.router.urlService.deferIntercept(defer);\n };\n return UrlRouterProvider;\n }());\n\n /* eslint-disable @typescript-eslint/no-empty-function */\n ng.module('ui.router.angular1', []);\n var mod_init = ng.module('ui.router.init', ['ng']);\n var mod_util = ng.module('ui.router.util', ['ui.router.init']);\n var mod_rtr = ng.module('ui.router.router', ['ui.router.util']);\n var mod_state = ng.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\n var mod_main = ng.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\n var mod_cmpt = ng.module('ui.router.compat', ['ui.router']);\n var router = null;\n $uiRouterProvider.$inject = ['$locationProvider'];\n /** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\n function $uiRouterProvider($locationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n // Disable decoding of params by UrlMatcherFactory because $location already handles this\n router.urlService.config._decodeParams = false;\n var ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider));\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location, $browser, $window, $sniffer, $rootScope, $http, $templateCache) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n }\n var getProviderFor = function (serviceName) { return [\n '$uiRouterProvider',\n function ($urp) {\n var service = $urp.router[serviceName];\n service['$get'] = function () { return service; };\n return service;\n },\n ]; };\n // This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\n runBlock.$inject = ['$injector', '$q', '$uiRouter'];\n function runBlock($injector, $q, $uiRouter) {\n services.$injector = $injector;\n services.$q = $q;\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!Object.prototype.hasOwnProperty.call($injector, 'strictDi')) {\n try {\n $injector.invoke(function (checkStrictDi) { });\n }\n catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map(function (x) { return x.$$state().resolvables; })\n .reduce(unnestR, [])\n .filter(function (x) { return x.deps === 'deferred'; })\n .forEach(function (resolvable) { return (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)); });\n }\n // $urlRouter service and $urlRouterProvider\n var getUrlRouterProvider = function (uiRouter) { return (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter)); };\n // $state service and $stateProvider\n // $urlRouter service and $urlRouterProvider\n var getStateProvider = function () { return extend(router.stateProvider, { $get: function () { return router.stateService; } }); };\n watchDigests.$inject = ['$rootScope'];\n function watchDigests($rootScope) {\n $rootScope.$watch(function () {\n trace.approximateDigests++;\n });\n }\n mod_init.provider('$uiRouter', $uiRouterProvider);\n mod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\n mod_util.provider('$urlService', getProviderFor('urlService'));\n mod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]);\n mod_util.provider('$templateFactory', function () { return new TemplateFactory(); });\n mod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\n mod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\n mod_state.provider('$transitions', getProviderFor('transitionService'));\n mod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n mod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]);\n mod_main.factory('$view', function () { return router.viewService; });\n mod_main.service('$trace', function () { return trace; });\n mod_main.run(watchDigests);\n mod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]);\n mod_state.run(['$state', function ($state) { }]);\n mod_rtr.run(['$urlRouter', function ($urlRouter) { }]);\n mod_init.run(runBlock);\n /** @hidden TODO: find a place to move this */\n var getLocals = function (ctx) {\n var tokens = ctx.getTokens().filter(isString);\n var tuples = tokens.map(function (key) {\n var resolvable = ctx.getResolvable(key);\n var waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n return tuples.reduce(applyPairs, {});\n };\n\n /* eslint-disable @typescript-eslint/no-empty-interface */\n /** @hidden */\n function parseStateRef(ref) {\n var paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly)\n ref = '(' + paramsOnly[1] + ')';\n var parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4)\n throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n }\n /** @hidden */\n function stateContext(el) {\n var $uiView = el.parent().inheritedData('$uiView');\n var path = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n }\n /** @hidden */\n function processedDef($state, $element, def) {\n var uiState = def.uiState || $state.current.name;\n var uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n var href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href };\n }\n /** @hidden */\n function getTypeInfo(el) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === 'FORM';\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n }\n /** @hidden */\n function clickHook(el, $state, $timeout, type, getDef) {\n return function (e) {\n var button = e.which || e.button, target = getDef();\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition_1 = $timeout(function () {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n // if the state has no URL, ignore one preventDefault from the directive.\n var ignorePreventDefaultCount_1 = type.isAnchor && !target.href ? 1 : 0;\n e.preventDefault = function () {\n if (ignorePreventDefaultCount_1-- <= 0)\n $timeout.cancel(transition_1);\n };\n }\n };\n }\n /** @hidden */\n function defaultOpts(el, $state) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n }\n /** @hidden */\n function bindEvents(element, scope, hookFn, uiStateOpts) {\n var events;\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n if (!isArray(events)) {\n events = ['click'];\n }\n var on = element.on ? 'on' : 'bind';\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n element[on](event_1, hookFn);\n }\n scope.$on('$destroy', function () {\n var off = element.off ? 'off' : 'unbind';\n for (var _i = 0, events_2 = events; _i < events_2.length; _i++) {\n var event_2 = events_2[_i];\n element[off](event_2, hookFn);\n }\n });\n }\n /**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\n var uiSrefDirective;\n uiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n var hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n ];\n /**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\n var uiStateDirective;\n uiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var hookFn;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return ((acc[attr] = noop), acc); }, {});\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n inputAttrs.forEach(function (field) {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n attrs.$observe(field, function (expr) {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, function (newval) {\n rawDef[field] = newval;\n update();\n }, true);\n });\n });\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n ];\n /**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `
    ` and `` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\n var uiSrefActiveDirective;\n uiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function ($scope, $element, $attrs) {\n var states = [];\n var activeEqClass;\n var uiSrefActive;\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n }\n catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState, newParams) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n var deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n function setupEventListeners() {\n var deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n var deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n var deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n function setStatesFromDefinitionObject(statesDefinition) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function (stateOrName, activeClass) {\n // Helper function to abstract adding state.\n var addStateForClass = function (stateOrName, activeClass) {\n var ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName, activeClass);\n }\n else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function (stateOrName) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n function addState(stateName, stateParams, activeClass) {\n var state = $state.get(stateName, stateContext($element));\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n states.push(stateInfo);\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n // Update route state\n function update() {\n var splitClasses = function (str) { return str.split(/\\s/).filter(identity); };\n var getClasses = function (stateList) {\n return stateList\n .map(function (x) { return x.activeClass; })\n .map(splitClasses)\n .reduce(unnestR, []);\n };\n var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); }));\n var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length;\n var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n var addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n var removeClasses = allClasses.filter(function (cls) { return !inArray(addClasses, cls); });\n $scope.$evalAsync(function () {\n addClasses.forEach(function (className) { return $element.addClass(className); });\n removeClasses.forEach(function (className) { return $element.removeClass(className); });\n });\n }\n update();\n },\n ],\n };\n },\n ];\n ng\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n\n /** @publicapi @module ng1 */ /** */\n /**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n $IsStateFilter.$inject = ['$state'];\n function $IsStateFilter($state) {\n var isFilter = function (state, params, options) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n }\n /**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n $IncludedByStateFilter.$inject = ['$state'];\n function $IncludedByStateFilter($state) {\n var includesFilter = function (state, params, options) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n }\n ng.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);\n\n /** @publicapi @module directives */ /** */\n /**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\n var uiView;\n // eslint-disable-next-line prefer-const\n uiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) {\n function getRenderer() {\n return {\n enter: function (element, target, cb) {\n if (ng.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n }\n else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function (element, cb) {\n if (ng.version.minor > 2) {\n $animate.leave(element).then(cb);\n }\n else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n function configsEqual(config1, config2) {\n return config1 === config2;\n }\n var rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n var directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement, tAttrs, $transclude) {\n return function (scope, $element, attrs) {\n var onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(), inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n var previousEl, currentEl, currentScope, viewConfig;\n var activeUIView = {\n $type: 'ng1',\n id: directive.count++,\n name: name,\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name,\n config: null,\n configUpdated: configUpdatedCallback,\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n var fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n var fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n trace.traceUIViewEvent('Linking', activeUIView);\n function configUpdatedCallback(config) {\n if (config && !(config instanceof Ng1ViewConfig))\n return;\n if (configsEqual(viewConfig, config))\n return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n viewConfig = config;\n updateView(config);\n }\n $element.data('$uiView', { $uiView: activeUIView });\n updateView();\n var unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function () {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n if (currentEl) {\n var _viewData_1 = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData_1);\n renderer.leave(currentEl, function () {\n _viewData_1.$$animLeave.resolve();\n previousEl = null;\n });\n previousEl = currentEl;\n currentEl = null;\n }\n }\n function updateView(config) {\n var newScope = scope.$new();\n var animEnter = $q.defer(), animLeave = $q.defer();\n var $uiViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n var $uiViewAnim = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n var cloned = $transclude(newScope, function (clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope)\n currentScope.$emit('$viewContentAnimationEnded');\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n cleanupLastView();\n });\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n return directive;\n },\n ];\n $ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q'];\n /** @hidden */\n function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q) {\n var getControllerAs = parse('viewDecl.controllerAs');\n var getResolveAs = parse('viewDecl.resolveAs');\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement) {\n var initial = tElement.html();\n tElement.empty();\n return function (scope, $element) {\n var data = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n var cfg = data.$cfg || { viewDecl: {}, getTemplate: noop };\n var resolveCtx = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n var link = $compile($element.contents());\n var controller = cfg.controller;\n var controllerAs = getControllerAs(cfg);\n var resolveAs = getResolveAs(cfg);\n var locals = resolveCtx && getLocals(resolveCtx);\n scope[resolveAs] = locals;\n if (controller) {\n var controllerInstance = ($controller(controller, extend({}, locals, { $scope: scope, $element: $element })));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n var kebobName = kebobString(cfg.component);\n var tagRegexp_1 = new RegExp(\"^(x-|data-)?\" + kebobName + \"$\", 'i');\n var getComponentController = function () {\n var directiveEl = [].slice\n .call($element[0].children)\n .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); });\n return directiveEl && ng.element(directiveEl).data(\"$\" + cfg.component + \"Controller\");\n };\n var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) {\n if (!ctrlInstance)\n return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch_1();\n });\n }\n link(scope);\n };\n },\n };\n }\n /** @hidden */\n var hasComponentImpl = typeof ng.module('ui.router')['component'] === 'function';\n /** @hidden incrementing id */\n var _uiCanExitId = 0;\n /** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\n function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) &&\n !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n var viewState = tail(cfg.path).state.self;\n var hookOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n var resolveContext = new ResolveContext(cfg.path);\n var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data;\n // Fire callback on any successful transition\n var paramsUpdated = function ($transition$) {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1)\n return;\n var toParams = $transition$.params('to');\n var fromParams = $transition$.params('from');\n var getNodeSchema = function (node) { return node.paramSchema; };\n var toSchema = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\n var fromSchema = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\n // Find the to params that have different values than the from params\n var changedToParams = toSchema.filter(function (param) {\n var idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n var changedKeys_1 = changedToParams.map(function (x) { return x.id; });\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n var newValues = filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; });\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n var id_1 = _uiCanExitId++;\n var cacheProp_1 = '_uiCanExitIds';\n // Returns true if a redirect transition already answered truthy\n var prevTruthyAnswer_1 = function (trans) {\n return !!trans && ((trans[cacheProp_1] && trans[cacheProp_1][id_1] === true) || prevTruthyAnswer_1(trans.redirectedFrom()));\n };\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n var wrappedHook = function (trans) {\n var promise;\n var ids = (trans[cacheProp_1] = trans[cacheProp_1] || {});\n if (!prevTruthyAnswer_1(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(function (val) { return (ids[id_1] = val !== false); });\n }\n return promise;\n };\n var criteria = { exiting: viewState.name };\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n }\n ng.module('ui.router.state').directive('uiView', uiView);\n ng.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n\n /** @publicapi @module ng1 */ /** */\n /** @hidden */\n function $ViewScrollProvider() {\n var useAnchorScroll = false;\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function ($anchorScroll, $timeout) {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n return function ($element) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n },\n ];\n }\n ng.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n\n /**\n * Main entry point for angular 1.x build\n * @publicapi @module ng1\n */ /** */\n var index$1 = 'ui.router';\n\n exports.$injector = $injector;\n exports.$q = $q;\n exports.BaseLocationServices = BaseLocationServices;\n exports.BaseUrlRule = BaseUrlRule;\n exports.BrowserLocationConfig = BrowserLocationConfig;\n exports.Glob = Glob;\n exports.HashLocationService = HashLocationService;\n exports.HookBuilder = HookBuilder;\n exports.MemoryLocationConfig = MemoryLocationConfig;\n exports.MemoryLocationService = MemoryLocationService;\n exports.NATIVE_INJECTOR_TOKEN = NATIVE_INJECTOR_TOKEN;\n exports.Ng1ViewConfig = Ng1ViewConfig;\n exports.Param = Param;\n exports.ParamFactory = ParamFactory;\n exports.ParamType = ParamType;\n exports.ParamTypes = ParamTypes;\n exports.PathNode = PathNode;\n exports.PathUtils = PathUtils;\n exports.PushStateLocationService = PushStateLocationService;\n exports.Queue = Queue;\n exports.RegisteredHook = RegisteredHook;\n exports.Rejection = Rejection;\n exports.Resolvable = Resolvable;\n exports.ResolveContext = ResolveContext;\n exports.StateBuilder = StateBuilder;\n exports.StateMatcher = StateMatcher;\n exports.StateObject = StateObject;\n exports.StateParams = StateParams;\n exports.StateProvider = StateProvider;\n exports.StateQueueManager = StateQueueManager;\n exports.StateRegistry = StateRegistry;\n exports.StateService = StateService;\n exports.TargetState = TargetState;\n exports.Trace = Trace;\n exports.Transition = Transition;\n exports.TransitionEventType = TransitionEventType;\n exports.TransitionHook = TransitionHook;\n exports.TransitionService = TransitionService;\n exports.UIRouter = UIRouter;\n exports.UIRouterGlobals = UIRouterGlobals;\n exports.UIRouterPluginBase = UIRouterPluginBase;\n exports.UrlConfig = UrlConfig;\n exports.UrlMatcher = UrlMatcher;\n exports.UrlMatcherFactory = UrlMatcherFactory;\n exports.UrlRouter = UrlRouter;\n exports.UrlRouterProvider = UrlRouterProvider;\n exports.UrlRuleFactory = UrlRuleFactory;\n exports.UrlRules = UrlRules;\n exports.UrlService = UrlService;\n exports.ViewService = ViewService;\n exports._extend = _extend;\n exports._inArray = _inArray;\n exports._pushTo = _pushTo;\n exports._removeFrom = _removeFrom;\n exports.all = all;\n exports.allTrueR = allTrueR;\n exports.ancestors = ancestors;\n exports.and = and;\n exports.any = any;\n exports.anyTrueR = anyTrueR;\n exports.applyPairs = applyPairs;\n exports.arrayTuples = arrayTuples;\n exports.assertFn = assertFn;\n exports.assertMap = assertMap;\n exports.assertPredicate = assertPredicate;\n exports.beforeAfterSubstr = beforeAfterSubstr;\n exports.buildUrl = buildUrl;\n exports.compose = compose;\n exports.copy = copy;\n exports.core = index;\n exports.createProxyFunctions = createProxyFunctions;\n exports.curry = curry;\n exports.default = index$1;\n exports.defaultResolvePolicy = defaultResolvePolicy;\n exports.defaultTransOpts = defaultTransOpts;\n exports.defaults = defaults;\n exports.deregAll = deregAll;\n exports.eq = eq;\n exports.equals = equals;\n exports.extend = extend;\n exports.filter = filter;\n exports.find = find;\n exports.flatten = flatten;\n exports.flattenR = flattenR;\n exports.fnToString = fnToString;\n exports.forEach = forEach;\n exports.fromJson = fromJson;\n exports.functionToString = functionToString;\n exports.getLocals = getLocals;\n exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory;\n exports.getParams = getParams;\n exports.hashLocationPlugin = hashLocationPlugin;\n exports.hostRegex = hostRegex;\n exports.identity = identity;\n exports.inArray = inArray;\n exports.inherit = inherit;\n exports.invoke = invoke;\n exports.is = is;\n exports.isArray = isArray;\n exports.isDate = isDate;\n exports.isDefined = isDefined;\n exports.isFunction = isFunction;\n exports.isInjectable = isInjectable;\n exports.isNull = isNull;\n exports.isNullOrUndefined = isNullOrUndefined;\n exports.isNumber = isNumber;\n exports.isObject = isObject;\n exports.isPromise = isPromise;\n exports.isRegExp = isRegExp;\n exports.isString = isString;\n exports.isUndefined = isUndefined;\n exports.joinNeighborsR = joinNeighborsR;\n exports.kebobString = kebobString;\n exports.keyValsToObjectR = keyValsToObjectR;\n exports.locationPluginFactory = locationPluginFactory;\n exports.makeEvent = makeEvent;\n exports.makeStub = makeStub;\n exports.map = map;\n exports.mapObj = mapObj;\n exports.matchState = matchState;\n exports.maxLength = maxLength;\n exports.memoryLocationPlugin = memoryLocationPlugin;\n exports.mergeR = mergeR;\n exports.ng1ViewsBuilder = ng1ViewsBuilder;\n exports.noop = noop;\n exports.not = not;\n exports.omit = omit;\n exports.or = or;\n exports.padString = padString;\n exports.pairs = pairs;\n exports.parse = parse;\n exports.parseUrl = parseUrl$1;\n exports.pattern = pattern;\n exports.pick = pick;\n exports.pipe = pipe;\n exports.pluck = pluck;\n exports.prop = prop;\n exports.propEq = propEq;\n exports.pushR = pushR;\n exports.pushStateLocationPlugin = pushStateLocationPlugin;\n exports.pushTo = pushTo;\n exports.removeFrom = removeFrom;\n exports.resolvablesBuilder = resolvablesBuilder;\n exports.resolvePolicies = resolvePolicies;\n exports.root = root;\n exports.services = services;\n exports.servicesPlugin = servicesPlugin;\n exports.silenceUncaughtInPromise = silenceUncaughtInPromise;\n exports.silentRejection = silentRejection;\n exports.splitEqual = splitEqual;\n exports.splitHash = splitHash;\n exports.splitOnDelim = splitOnDelim;\n exports.splitQuery = splitQuery;\n exports.stringify = stringify;\n exports.stripLastPathElement = stripLastPathElement;\n exports.tail = tail;\n exports.toJson = toJson;\n exports.trace = trace;\n exports.trimHashVal = trimHashVal;\n exports.uniqR = uniqR;\n exports.unnest = unnest;\n exports.unnestR = unnestR;\n exports.val = val;\n exports.values = values;\n exports.watchDigests = watchDigests;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=angular-ui-router.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/global.js */ \"../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9AdWlyb3V0ZXIrYW5ndWxhcmpzQDEuMC4yOS9ub2RlX21vZHVsZXMvQHVpcm91dGVyL2FuZ3VsYXJqcy9yZWxlYXNlL2FuZ3VsYXItdWktcm91dGVyLmpzPzljNGUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElBQUksS0FBNEQsb0JBQW9CLG1CQUFPLENBQUMsd0JBQVM7QUFDckcsSUFBSSxTQUNzRjtBQUMxRixDQUFDLDRDQUE0Qzs7QUFFN0M7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxxREFBcUQsUUFBUTtBQUM3RCw0Q0FBNEMsUUFBUTtBQUNwRCw0REFBNEQsUUF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yBhbiBBcnJheSBvZiBzdHJpbmdzLCB3aGljaCBhcmUgdGhlIHdoaXRlbGlzdGVkIHByb3BlcnR5IG5hbWVzXG4gICAgICovXG4gICAgZnVuY3Rpb24gcGljayhvYmosIHByb3BOYW1lcykge1xuICAgICAgICB2YXIgb2JqQ29weSA9IHt9O1xuICAgICAgICBmb3IgKHZhciBfcHJvcCBpbiBvYmopIHtcbiAgICAgICAgICAgIGlmIChwcm9wTmFtZXMuaW5kZXhPZihfcHJvcCkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgb2JqQ29weVtfcHJvcF0gPSBvYmpbX3Byb3BdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmpDb3B5O1xuICAgIH1cbiAgICAvKipcbiAgICAgKiBSZXR1cm4gYSBjb3B5IG9mIHRoZSBvYmplY3Qgb21pdHRpbmcgdGhlIGJsYWNrbGlzdGVkIHByb3BlcnRpZXMuXG4gICAgICpcbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIGBgYFxuICAgICAqXG4gICAgICogdmFyIGZvbyA9IHsgYTogMSwgYjogMiwgYzogMyB9O1xuICAgICAqIHZhciBhYiA9IG9taXQoZm9vLCBbJ2EnLCAnYiddKTsgLy8geyBjOiAzIH1cbiAgICAgKiBgYGBcbiAgICAgKiBAcGFyYW0gb2JqIHRoZSBzb3VyY2Ugb2JqZWN0XG4gICAgICogQHBhcmFtIHByb3BOYW1lcyBhbiBBcnJheSBvZiBzdHJpbmdzLCB3aGljaCBhcmUgdGhlIGJsYWNrbGlzdGVkIHByb3BlcnR5IG5hbWVzXG4gICAgICovXG4gICAgZnVuY3Rpb24gb21pdChvYmosIHByb3BOYW1lcykge1xuICAgICAgICByZXR1cm4gT2JqZWN0LmtleXMob2JqKVxuICAgICAgICAgICAgLmZpbHRlcihub3QoaW5BcnJheShwcm9wTmFtZXMpKSlcbiAgICAgICAgICAgIC5yZWR1Y2UoZnVuY3Rpb24gKGFjYywga2V5KS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BpcyBhIGhvdCBmdW5jdGlvblxuICAgICAgICAgICAgLy8gVW5yb2xsIHdoZW4gdGhlcmUgYXJlIDEtNCBhcmd1bWVudHNcbiAgICAgICAgICAgIHN3aXRjaCAoYXJncy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFthcmdzWzBdW2ldXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goW2FyZ3NbMF1baV0sIGFyZ3NbMV1baV1dKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChbYXJnc1swXVtpXSwgYXJnc1sxXVtpXSwgYXJnc1syXVtpXV0pO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFthcmdzWzBdW2ldLCBhcmdzWzFdW2ldLCBhcmdzWzJdW2ldLCBhcmdzWzNdW2ldXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKGFyZ3MubWFwKGZ1bmN0aW9uIChhcnJheSkgeyByZXR1cm4gYXJyYXlbaV07IH0pKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbWF4QXJyYXlMZW47IGkrKykge1xuICAgICAgICAgICAgX2xvb3BfMShpKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cbiAgICAvK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NiLCBfdGhpcyk7XG4gICAgICAgIE9iamVjdC5rZXlzKG9iaikuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiBjYihvYmpba2V5XSwga2V5KTsgfSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIF9leHRlbmQodG9PYmopIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBhcmd1bWVudHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBvYmogPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICBpZiAoIW9iailcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMob2JqKTtcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwga2V5cy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHRvT2JqW2tleXNbal1dID0gb2JqW2tleXNbal1dO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0b09iajtcbiAgICB9XG4gICAgZnVuY3Rpb24gX2VxdWFscyhvMSwgbzIpIHtcbiAgICAgICAgaWYgKG8xID09PSBvMilcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICBpZiAobzEgPT09IG51bGwgfHwgbzIgPT09IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIGlmIChvMSAhPT0gbzEgJiYgbzIgIT09IG8yKVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7IC8vIE5hTiA9PT0gTmFOXG4gICAgICAgIHZhciB0MSA9IHR5cGVvZiBvMSwgdDIgPSB0eXBlb2YgbzI7XG4gICAgICAgIGlmICh0MSAhPT0gdDIgfHwgdDEgIT09ICdvYmplY3QnKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB2YXIgdHVwID0gW28xLCBvMl07XG4gICAgICAgIGlmIChhbGwoaXNBcnJheSkodHVwKSlcbiAgICAgICAgICAgIHJldHVybiBfYXJyYXlzRXEobzEsIG8yKTtcbiAgICAgICAgaWYgKGFsbChpc0RhdGUpKHR1cCkpXG4gICAgICAgICAgICByZXR1cm4gbzEuZ2V0VGltZSgpID09PSBvMi5nZXRUaW1lKCk7XG4gICAgICAgIGlmIChhbGwoaXNSZWdFeHApKHR1cCkpXG4gICAgICAgICAgICByZXR1cm4gbzEudG9TdHJpbmcoKSA9PT0gbzIudG9TdHJpbmcoKTtcbiAgICAgICAgaWYgKGFsbChpc0Z1bmN0aW9uKSh0dXApKVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7IC8vIG1laFxuICAgICAgICB2YXIgcHJlZGljYXRlcyA9IFtpc0Z1bmN0aW9uLCBpc0FycmF5LCBpc0RhdGUsIGlzUmVnRXhwXTtcbiAgICAgICAgaWYgKHByZWRpY2F0ZXMubWFwKGFueSkucmVkdWNlKGZ1bmN0aW9uIChiLCBmbikgeyByZXR1cm4gYiB8fCAhIWZuKHR1cCk7IH0sIGZhbHNlKSlcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgdmFyIGtleXMgPSB7fTtcbiAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOmZvcmluXG4gICAgICAgIGZvciAodmFyIGtleSBpbiBvMSkge1xuICAgICAgICAgICAgaWYgKCFfZXF1YWxzKG8xW2tleV0sIG8yW2tleV0pKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIGtleXNba2V5XSA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIga2V5IGluIG8yKSB7XG4gICAgICAgICAgICBpZiAoIWtleXNba2V5XSlcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIGZ1bmN0aW9uIF9hcnJheXNFcShhMSwgYTIpIHtcbiAgICAgIC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sIGAnWi5ZLlgnYCAgICAgICAgICAgICAgICAgICAgfCAobWF0Y2hlcyBhbGwgc3RhdGVzKSAgICAgICAgICAgICAgfFxuICAgICAqIHwgYCdBLioqJ2AgICAgfCBgJ0EnYCAsIGAnQS5CJ2AgLCBgJ0EuQy5YJ2AgICAgICAgICAgICAgICAgICAgfCBgJ1ouWS5YJ2AgICAgICAgICAgICAgICAgICAgICAgICAgfFxuICAgICAqIHwgYCcqKi5YJ2AgICAgfCBgJ1gnYCAsIGAnQS5YJ2AgLCBgJ1ouWS5YJ2AgICAgICAgICAgICAgICAgICAgfCBgJ0EnYCAsIGAnQS5sb2dpbi5aJ2AgICAgICAgICAgICAgfFxuICAgICAqIHwgYCdBLioqLlgnYCAgfCBgJ0EuWCdgICwgYCdBLkIuWCdgICwgYCdBLkIuQy5YJ2AgICAgICAgICAgICAgfCBgJ0EnYCAsIGAnQS5CLkMnYCAgICAgICAgICAgICAgICAgfFxuICAgICAqXG4gICAgICogQHBhY2thZ2VEb2N1bWVudGF0aW9uXG4gICAgICovXG4gICAgdmFyIEdsb2IgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgIGZ1bmN0aW9uIEdsb2IodGV4dCkge1xuICAgICAgICAgICAgdGhpcy50ZXh0ID0gdGV4dDtcbiAgICAgICAgICAgIHRoaXMuZ2xvYiA9IHRleHQuc3BsaXQoJy4nKTtcbiAgICAgICAgICAgIHZhciByZWdleHBTdHJpbmcgPSB0aGlzLnRleHRcbiAgICAgICAgICAgICAgICAuc3BsaXQoJy4nKVxuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHNlZykge1xuICAgICAgICAgICAgICAgIGlmIChzZWcgPT09ICcqKicpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnKD86fCg/OlxcXFwuW14uXSopKiknO1xuICAgICAgICAgICAgICAgIGlmIChzZWcgPT09ICcqJylcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdcXFxcLl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yaWVzLm1hcChub3JtYWxpemVkQ2F0KS5mb3JFYWNoKGZ1bmN0aW9uIChjYXRlZ29yeSkgeyByZXR1cm4gKF90aGlzLl9lbmFibGVkW2NhdGVnb3J5XSA9IGVuYWJsZWQpOyB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmVuYWJsZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBjYXRlZ29yaWVzID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgIGNhdGVnb3JpZXNbX2ldID0gYXJndW1lbnRzW19pXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX3NldCh0cnVlLCBjYXRlZ29yaWVzKTtcbiAgICAgICAgfTtcbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmRpc2FibGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgY2F0ZWdvcmllcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgICAgICBjYXRlZ29yaWVzW19pXSA9IGFyZ3VtZW50c1tfaV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLl9zZXQoZmFsc2UsIGNhdGVnb3JpZXMpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0cmlldmVzIHRoZSBlbmFibGVkIHN0YXRldXMgb2YgYSBbW0NhdGVnb3J5XV1cbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogdHJhY2UuZW5hYmxlZChcIlZJRVdDT05GSUdcIik7IC8vIHRydWUgb3IgZmFsc2VcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm5zIGJvb2x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uICAgICAgICBUcmFjZS5wcm90b3R5cGUudHJhY2VWaWV3U3luYyA9IGZ1bmN0aW9uIChwYWlycykge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmVuYWJsZWQoZXhwb3J0cy5DYXRlZ29yeS5WSUVXQ09ORklHKSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB2YXIgdWl2aGVhZGVyID0gJ3VpdmlldyBjb21wb25lbnQgZnFuJztcbiAgICAgICAgICAgIHZhciBjZmdoZWFkZXIgPSAndmlldyBjb25maWcgc3RhdGUgKHZpZXcgbmFtZSknO1xuICAgICAgICAgICAgdmFyIG1hcHBpbmcgPSBwYWlyc1xuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgdmFyIF9iO1xuICAgICAgICAgICAgICAgIHZhciB1aVZpZXcgPSBfYS51aVZpZXcsIHZpZXdDb25maWcgPSBfYS52aWV3Q29uZmlnO1xuICAgICAgICAgICAgICAgIHZhciB1aXYgPSB1aVZpZXcgJiYgdWlWaWV3LmZxbjtcbiAgICAgICAgICAgICAgICB2YXIgY2ZnID0gdmlld0NvbmZpZyAmJiB2aWV3Q29uZmlnLnZpZXdEZWNsLiRjb250ZXh0Lm5hbWUgKyBcIjogKFwiICsgdmlld0NvbmZpZy52aWV3RGVjbC4kbmFtZSArIFwiKVwiO1xuICAgICAgICAgICAgICAgIHJldHVybiBfYiA9IHt9LCBfYlt1aXZoZWFkZXJdID0gdWl2LCBfYltjZmdoZWFkZXJdID0gY2ZnLCBfYjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnNvcnQoZnVuY3Rpb24gKGEsIGIpIHsgcmV0dXJuIChhW3VpdmhlYWRlcl0gfHwgJycpLmxvY2FsZUNvbXBhcmUoYlt1aXZoZWFkZXJdIHx8ICcnKTsgfSk7XG4gICAgICAgICAgICBzYWZlQ29uc29sZS50YWJsZShtYXBwaW5nKTtcbiAgICAgIC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zKGEpICYmIGEgPT09IGI7IH0sXG4gICAgICogICBpczogZnVuY3Rpb24odmFsKSB7IHJldHVybiBhbmd1bGFyLmlzTnVtYmVyKHZhbCkgJiYgaXNGaW5pdGUodmFsKSAmJiB2YWwgJSAxID09PSAwOyB9LFxuICAgICAqICAgcGF0dGVybjogL1xcZCsvXG4gICAgICogfVxuICAgICAqXG4gICAgICogdmFyIHBhcmFtVHlwZSA9IG5ldyBQYXJhbVR5cGUocGFyYW1UeXBlRGVmKTtcbiAgICAgKiBgYGBcbiAgICAgKi9cbiAgICB2YXIgUGFyYW1UeXBlID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICAvKipcbiAgICAgICAgICogQHBhcmFtIGRlZiAgQSBjb25maWd1cmF0aW9uIG9iamVjdCB3aGljaCBjb250YWlucyB0aGUgY3VzdG9tIHR5cGUgZGVmaW5pdGlvbi4gIFRoZSBvYmplY3Qnc1xuICAgICAgICAgKiAgICAgICAgcHJvcGVydGllcyB3aWxsIG92ZXJyaWRlIHRoZSBkZWZhdWx0IG1ldGhvZHMgYW5kL29yIHBhdHRlcm4gaW4gYFBhcmFtVHlwZWAncyBwdWJsaWMgaW50ZXJmYWNlLlxuICAgICAgICAgKiBAcmV0dXJucyBhIG5ldyBQYXJhbVR5cGUgb2JqZWN0XG4gICAgICAgICAqL1xuICAgICAgICBmdW5jdGlvbiBQYXJhbVR5cGUoZGVmKSB7XG4gICAgICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgICAgIHRoaXMucGF0dGVybiA9IC8uKi87XG4gICAgICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgICAgIHRoaXMuaW5oZXJpdCA9IHRydWU7XG4gICAgICAgICAgICBleHRlbmQodGhpcywgZGVmKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBjb25zaWRlciB0aGVzZSBmb3VyIG1ldGhvZHMgdG8gYmUgXCJhYnN0cmFjdCBtZXRob2RzXCIgdGhhdCBzaG91bGQgYmUgb3ZlcnJpZGRlblxuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgUGFyYW1UeXBlLnByb3RvdHlwZS5pcyA9IGZ1bmN0aW9uICh2YWwsIGtleSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBQYXJhbVR5cGUucHJvdG90eXBlLmVuY29kZSA9IGZ1bmN0aW9uICh2YWwsIGtleSkge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIEBpbmhlcml0ZG9jICovXG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUuZGVjb2RlID0gZnVuY3Rpb24gKHZhbCwga2V5KSB7XG4gICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgUGFyYW1UeXBlLnByb3RvdHlwZS5lcXVhbHMgPSBmdW5jdGlvbiAoYSwgYikge1xuICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnRyaXBsZS1lcXVhbHNcbiAgICAgICAgICAgIHJldHVybiBhID09IGI7XG4gICAgICAgIH07XG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUuJHN1YlBhdHRlcm4gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgc3ViID0gdGhpcy5wYXR0ZXJuLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICByZXR1cm4gc3ViLnN1YnN0cigxLCBzdWIubGVuZ3RoIC0gMik7XG4gICAgICAgIH07XG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gXCJ7UGFyYW1UeXBlOlwiICsgdGhpcy5u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UsIGlzU2VhcmNoKSB7XG4gICAgICAgICAgICBpZiAoIW1vZGUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2F1dG8nICYmICFpc1NlYXJjaClcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCInYXV0bycgYXJyYXkgbW9kZSBpcyBmb3IgcXVlcnkgcGFyYW1ldGVycyBvbmx5XCIpO1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBBcnJheVR5cGUodGhpcywgbW9kZSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBQYXJhbVR5cGU7XG4gICAgfSgpKTtcbiAgICAvKiogV3JhcHMgdXAgYSBgUGFyYW1UeXBlYCBvYmplY3QgdG8gaGFuZGxlIGFycmF5IHZhbHVlcy4gKi9cbiAgICBmdW5jdGlvbiBBcnJheVR5cGUodHlwZSwgbW9kZSkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAvLyBXcmFwIG5vbi1hcnJheSB2YWx1ZSBhcyBhcnJheVxuICAgICAgICBmdW5jdGlvbiBhcnJheVdyYXAodmFsKSB7XG4gICAgICAgICAgICByZXR1cm4gaXNBcnJheSh2YWwpID8gdmFsIDogaXNEZWZpbmVkKHZhbCkgPyBbdmFsXSA6IFtdO1xuICAgICAgICB9XG4gICAgICAgIC8vIFVud3JhcCBhcnJheSB2YWx1ZSBmb3IgXCJhdXRvXCIgbW9kZS4gUmV0dXJuIHVuZGVmaW5lZCBmb3IgZW1wdHkgYXJyYXkuXG4gICAgICAgIGZ1bmN0aW9uIGFycmF5VW53cmFwKHZhbCkge1xuICAgICAgICAgICAgc3dpdGNoICh2YWwubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgIC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hbDIpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGVmdCA9IGFycmF5V3JhcCh2YWwxKSwgcmlnaHQgPSBhcnJheVdyYXAodmFsMik7XG4gICAgICAgICAgICAgICAgaWYgKGxlZnQubGVuZ3RoICE9PSByaWdodC5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlZnQubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjYWxsYmFjayhsZWZ0W2ldLCByaWdodFtpXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBbJ2VuY29kZScsICdkZWNvZGUnLCAnZXF1YWxzJywgJyRub3JtYWxpemUnXS5mb3JFYWNoKGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICB2YXIgcGFyYW1UeXBlRm4gPSB0eXBlW25hbWVdLmJpbmQodHlwZSk7XG4gICAgICAgICAgICB2YXIgd3JhcHBlckZuID0gbmFtZSA9PT0gJ2VxdWFscycgPyBhcnJheUVxdWFsc0hhbmRsZXIgOiBhcnJheUhhbmRsZXI7XG4gICAgICAgICAgICBfdGhpc1tuYW1lXSA9IHdyYXBwZXJGbihwYXJhbVR5cGVGbik7XG4gICAgICAgIH0pO1xuICAgICAgICBleHRlbmQodGhpcywge1xuICAgICAgICAgICAgZHluYW1pYzogdHlwZS5keW5hbWljLFxuICAgICAgICAgICAgbmFtZTogdHlwZS5uYW1lLFxuICAgICAgICAgICAgcGF0dGVybjogdHlwZS5wYXR0ZXJuLFxuICAgICAgICAgICAgaW5oZXJpdDogdHlwZS5pbmhlcml0LFxuICAgICAgICAgICAgcmF3OiB0eXBlLnJhdyxcbiAgICAgICA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ZSAmJiB1cmxUeXBlLm5hbWUgPT09ICdzdHJpbmcnICYmIHBhcmFtVHlwZXMudHlwZShjZmcudHlwZSkpXG4gICAgICAgICAgICByZXR1cm4gcGFyYW1UeXBlcy50eXBlKGNmZy50eXBlKTtcbiAgICAgICAgaWYgKHVybFR5cGUpXG4gICAgICAgICAgICByZXR1cm4gdXJsVHlwZTtcbiAgICAgICAgaWYgKCFjZmcudHlwZSkge1xuICAgICAgICAgICAgdmFyIHR5cGUgPSBsb2NhdGlvbiA9PT0gZXhwb3J0cy5EZWZUeXBlLkNPTkZJR1xuICAgICAgICAgICAgICAgID8gJ2FueSdcbiAgICAgICAgICAgICAgICA6IGxvY2F0aW9uID09PSBleHBvcnRzLkRlZlR5cGUuUEFUSFxuICAgICAgICAgICAgICAgICAgICA/ICdwYXRoJ1xuICAgICAgICAgICAgICAgICAgICA6IGxvY2F0aW9uID09PSBleHBvcnRzLkRlZlR5cGUuU0VBUkNIXG4gICAgICAgICAgICAgICAgICAgICAgICA/ICdxdWVyeSdcbiAgICAgICAgICAgICAgICAgICAgICAgIDogJ3N0cmluZyc7XG4gICAgICAgICAgICByZXR1cm4gcGFyYW1UeXBlcy50eXBlKHR5cGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjZmcudHlwZSBpbnN0YW5jZW9mIFBhcmFtVHlwZSA/IGNmZy50eXBlIDogcGFyYW1UeXBlcy50eXBlKGNmZy50eXBlKTtcbiAgICB9XG4gICAgLyoqIHJldHVybnMgZmFsc2UsIHRydWUsIG9yIHRoZSBzcXVhc2ggdmFsdWUgdG8gaW5kaWNhdGUgdGhlIFwiZGVmYXVsdCBwYXJhbWV0ZXIgdXJsIHNxdWFzaCBwb2xpY3lcIi4gKi9cbiAgICBmdW5jdGlvbiBnZXRTcXVhc2hQb2xpY3koY29uZmlnLCBpc09wdGlvbmFsLCBkZWZhdWx0UG9saWN5KSB7XG4gICAgICAgIHZhciBzcXVhc2ggPSBjb25maWcuc3F1YXNoO1xuICA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ZSAhPT0gbnVsbCAmJiBkZWZhdWx0VmFsdWUgIT09IHVuZGVmaW5lZCAmJiAhX3RoaXMudHlwZS5pcyhkZWZhdWx0VmFsdWUpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJEZWZhdWx0IHZhbHVlIChcIiArIGRlZmF1bHRWYWx1ZSArIFwiKSBmb3IgcGFyYW1ldGVyICdcIiArIF90aGlzLmlkICsgXCInIGlzIG5vdCBhbiBpbnN0YW5jZSBvZiBQYXJhbVR5cGUgKFwiICsgX3RoaXMudHlwZS5uYW1lICsgXCIpXCIpO1xuICAgICAgICAgICAgICAgIGlmIChfdGhpcy5jb25maWcuJCRmblsnX19jYWNoZWFibGUnXSkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5fZGVmYXVsdFZhbHVlQ2FjaGUgPSB7IGRlZmF1bHRWYWx1ZTogZGVmYXVsdFZhbHVlIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBkZWZhdWx0VmFsdWU7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIHJlcGxhY2VTcGVjaWFsVmFsdWVzID0gZnVuY3Rpb24gKHZhbCkge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIF9pID0gMCwgX2EgPSBfdGhpcy5yZXBsYWNlOyBfaSA8IF9hLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHVwbGUgPSBfYVtfaV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0dXBsZS5mcm9tID09PSB2YWwpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHVwbGUudG87XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFsdWUgPSByZXBsYWNlU3BlY2lhbFZhbHVlcyh2YWx1ZSk7XG4gICAgICAgICAgICByZXR1cm4gaXNV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25maWcudHlwZShjdXN0b21UeXBlKVxuICAgICAqIGBgYFxuICAgICAqL1xuICAgIHZhciBQYXJhbVR5cGVzID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBQYXJhbVR5cGVzKCkge1xuICAgICAgICAgICAgdGhpcy5lbnF1ZXVlID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMudHlwZVF1ZXVlID0gW107XG4gICAgICAgICAgICB0aGlzLmRlZmF1bHRUeXBlcyA9IHBpY2soUGFyYW1UeXBlcy5wcm90b3R5cGUsIFtcbiAgICAgICAgICAgICAgICAnaGFzaCcsXG4gICAgICAgICAgICAgICAgJ3N0cmluZycsXG4gICAgICAgICAgICAgICAgJ3F1ZXJ5JyxcbiAgICAgICAgICAgICAgICAncGF0aCcsXG4gICAgICAgICAgICAgICAgJ2ludCcsXG4gICAgICAgICAgICAgICAgJ2Jvb2wnLFxuICAgICAgICAgICAgICAgICdkYXRlJyxcbiAgICAgICAgICAgICAgICAnanNvbicsXG4gICAgICAgICAgICAgICAgJ2FueScsXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIC8vIFJlZ2lzdGVyIGRlZmF1bHQgdHlwZXMuIFN0b3JlIHRoZW0gaW4gdGhlIHByb3RvdHlwZSBvZiB0aGlzLnR5cGVzLlxuICAgICAgICAgICAgdmFyIG1ha2VUeXBlID0gZnVuY3Rpb24gKGRlZmluaXRpb24sIG5hbWUpIHsgcmV0dXJuIG5ldyBQYXJhbVR5cGUoZXh0ZW5kKHsgbmFtZTogbmFtZSB9LCBkZWZpbml0aW9uKSk7IH07XG4gICAgICAgICAgICB0aGlzLnR5cGVzID0gaW5oZXJpdChtYXAodGhpcy5kZWZhdWx0VHlwZXMsIG1ha2VUeXBlKSwge30pO1xuICAgICAgICB9XG4gICAgICAgIFBhcmFtVHlwZXMucHJvdG90eXBlLmRpc3Bvc2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGVzID0ge307XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBSZWdpc3RlcnMgYSBwYXJhbWV0ZXIgdHlwZVxuICAgICAgICAgKlxuICAgICAgICAgKiBFbmQgdXNlcnMgc2hvdWxkIGNhbGwgW1tVcmxNYXRjaGVyRmFjdG9yeS50eXBlXV0sIHdoaWNoIGRlbGVnYXRlcyB0byB0aGlzIG1ldGhvZC5cbiAgICAgICAgICovXG4gICAgICAgIFBhcmFtVHlwZXMucHJvdG90eXBlLnR5cGUgPSBmdW5jdGlvbiAobmFtZSwgZGVmaW5pdGlvbiwgZGVmaW5pdGlvbkZuKSB7XG4gICAgICAgICAgICBpZiAoIWlzRGVmaW5lZChkZWZpbml0aW9uKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy50eXBlc1tuYW1lXTtcbiAgICAgICAgICAgIGlmICh0aGlzLnR5cGVzLmhhc093blByb3BlcnR5KG5hbWUpKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkEgdHlwZSBuYW1lZCAnXCIgKyBuYW1lICsgXCInIGhhcyBhbHJlYWR5IGJlZW4gZGVmaW5lZC5cIik7XG4gICAgICAgICAgICB0aGlzLnR5cGVzW25hbWVdID0gbmV3IFBhcmFtVHlwZShleHRlbmQoeyBuYW1lOiBuYW1lIH0sIGRlZmluaXRpb24pKTtcbiAgICAgICAgICAgIGlmIChkZWZpbml0aW9uRm4pIHtcbiAgICAgICAgICAgICAgICB0aGlzLnR5cGVRdWV1ZS5wdXNoKHsgbmFtZTogbmFtZSwgZGVmOiBkZWZpbml0aW9uRm4gfSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0aGlzLmVucXVldWUpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2ZsdXNoVHlwZVF1ZXVlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfTtcbiAgICAgICAgUGFyYW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c1xuICAgICAgICAgICAgICAgIGVxdWFsczogZnVuY3Rpb24gKGEsIGIpIHsgcmV0dXJuIGEgPT0gYjsgfSxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gZXh0ZW5kKHt9LCBkZWZhdWx0VHlwZUJhc2UsIGRlZik7XG4gICAgICAgIH07XG4gICAgICAgIC8vIERlZmF1bHQgUGFyYW1ldGVyIFR5cGUgRGVmaW5pdGlvbnNcbiAgICAgICAgZXh0ZW5kKFBhcmFtVHlwZXMucHJvdG90eXBlLCB7XG4gICAgICAgICAgICBzdHJpbmc6IG1ha2VEZWZhdWx0VHlwZSh7fSksXG4gICAgICAgICAgICBwYXRoOiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIHBhdHRlcm46IC9bXi9dKi8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHF1ZXJ5OiBtYWtlRGVmYXVsdFR5cGUoe30pLFxuICAgICAgICAgICAgaGFzaDogbWFrZURlZmF1bHRUeXBlKHtcbiAgICAgICAgICAgICAgICBpbmhlcml0OiBmYWxzZSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgaW50OiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGRlY29kZTogZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gcGFyc2VJbnQodmFsLCAxMCk7IH0sXG4gICAgICAgICAgICAgICAgaXM6IGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFpc051bGxPclVuZGVmaW5lZCh2YWwpICYmIHRoaXMuZGVjb2RlKHZhbC50b1N0cmluZygpKSA9PT0gdmFsO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcGF0dGVybjogLy0/XFxkKy8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIGJvb2w6IG1ha2VEZWZhdWx0VHlwZSh7XG4gICAgICAgICAgICAgICAgZW5jb2RlOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiAodmFsICYmIDEpIHx8IDA7IH0sXG4gICAgICAgICAgICAgICAgZGVjb2RlOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiBwYXJzZUludCh2YWwsIDEwKSAhPT0gMDsgfSxcbiAgICAgICAgICAgICAgICBpczogaXMoQm9vbGVhbiksXG4gICAgICAgICAgICAgICAgcGF0dGVybjogLzB8MS8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIGRhdGU6IG1ha2VEZWZhdWx0VHlwZSh7XG4gICAgICAgICAgICAgICAgZW5jb2RlOiBmdW5jdGlvbiAodmFsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAhdGhpcy5pcyh2YWwpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBbdmFsLmdldEZ1bGxZZWFyKCksICgnMCcgKyAodmFsLmdldE1vbnRoKCkgKyAxKSkuc2xpY2UoLTIpLCAoJzAnICsgdmFsLmdldERhdGUoKSkuc2xpY2UoLTIpXS5qb2luKCctJyk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBkZWNvZGU6IGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaXModmFsKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IHRoaXMuY2FwdHVyZS5leGVjKHZhbCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXRjaCA/IG5ldyBEYXRlKG1hdGNoWzFdLCBtYXRjaFsyXSAtIDEsIG1hdGNoWzNdKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGlzOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiB2YWwgaW5zdGFuY2VvZiBEYXRlICYmICFpc05hTih2YWwudmFsdWVPZigpKTsgfSxcbiAgICAgICAgICAgICAgICBlcXVhbHM6IGZ1bmN0aW9uIChsLCByKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbJ2dldEZ1bGxZZWFyJywgJ2dldE1vbnRoJywgJ2dldERhdGUnXS5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgZm4pIHsgcmV0dXJuIGFjYyAmJiBsW2ZuXSgpID09PSByW2ZuXSgpOyB9LCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHBhdHRlcm46IC9bMC05XXs0fS0oPzowWzEtOV18MVswLTJdKS0oPzowWzEtOV18WzEtMl1bMC05XXwzWzAtMV0pLyxcbiAgICAgICAgICAgICAgICBjYXB0dXJlOiAvKFswLTldezR9KS0oMFsxLTldfDFbMC0yXSktKDBbMS05XXxbMS0yXVswLTldfDNbMC0xXSkvLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBqc29uOiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGVuY29kZTogdG9Kc29uLFxuICAgICAgICAgICAgICAgIGRlY29kZTogZnJvbUpzb24sXG4gICAgICAgICAgICAgICAgaXM6IGlzKE9iamVjdCksXG4gICAgICAgICAgICAgICAgZXF1YWxzOiBlcXVhbHMsXG4gICAgICAgICAgICAgICAgcGF0dGVybjogL1teL10qLyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgLy8gZG9lcyBub3QgZW5jb2RlL2RlY29kZVxuICAgICAgICAgICAgYW55OiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGVuY29kZTogaWRlbnRpdHksXG4gICAgICAgICAgICAgICAgZGVjb2RlOiBpZGVudGl0eSxcbiAgICAgICAgICAgICAgICBpczogZnVuY3Rpb24gKCkgeyByZXR1cm4gdHJ1ZTsgfSxcbiAgICAgICAgICAgICAgICBlcXVhbHM6IGVxdWFscy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gJGN1cnJlbnQsICR0bykge1xuICAgICAgICAgICAgdmFyIHBhcmVudFBhcmFtcztcbiAgICAgICAgICAgIHZhciBwYXJlbnRzID0gYW5jZXN0b3JzKCRjdXJyZW50LCAkdG8pLCBpbmhlcml0ZWQgPSB7fSwgaW5oZXJpdExpc3QgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gcGFyZW50cykge1xuICAgICAgICAgICAgICAgIGlmICghcGFyZW50c1tpXSB8fCAhcGFyZW50c1tpXS5wYXJhbXMpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIHBhcmVudFBhcmFtcyA9IE9iamVjdC5rZXlzKHBhcmVudHNbaV0ucGFyYW1zKTtcbiAgICAgICAgICAgICAgICBpZiAoIXBhcmVudFBhcmFtcy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogaW4gcGFyZW50UGFyYW1zKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmhlcml0TGlzdC5pbmRleE9mKHBhcmVudFBhcmFtc1tqXSkgPj0gMClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICBpbmhlcml0TGlzdC5wdXNoKHBhcmVudFBhcmFtc1tqXSk7XG4gICAgICAgICAgICAgICAgICAgIGluaGVyaXRlZFtwYXJlbnRQYXJhbXNbal1dID0gdGhpc1twYXJlbnRQYXJhbXNbal1dO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBleHRlbmQoe30sIGluaGVyaXRlZCwgbmV3UGFyYW1zKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIFN0YXRlUGFyYW1zO1xuICAgIH0oKSk7XG5cbiAgICAvKipcbiAgICAgKiBBIG5vZGUgaW4gYSBbW1RyZWVDaGFuZ2VzXV0g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ICAga2VlcCsrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLyoqIEdpdmVuIGEgcmV0YWluZWQgbm9kZSwgcmV0dXJuIGEgbmV3IG5vZGUgd2hpY2ggdXNlcyB0aGUgdG8gbm9kZSdzIHBhcmFtIHZhbHVlcyAqL1xuICAgICAgICAgICAgZnVuY3Rpb24gYXBwbHlUb1BhcmFtcyhyZXRhaW5lZE5vZGUsIGlkeCkge1xuICAgICAgICAgICAgICAgIHZhciBjbG9uZWQgPSByZXRhaW5lZE5vZGUuY2xvbmUoKTtcbiAgICAgICAgICAgICAgICBjbG9uZWQucGFyYW1WYWx1ZXMgPSB0b1BhdGhbaWR4XS5wYXJhbVZhbHVlcztcbiAgICAgICAgICAgICAgICByZXR1cm4gY2xvbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGZyb20sIHJldGFpbmVkLCBleGl0aW5nLCBlbnRlcmluZywgdG87XG4gICAgICAgICAgICBmcm9tID0gZnJvbVBhdGg7XG4gICAgICAgICAgICByZXRhaW5lZCA9IGZyb20uc2xpY2UoMCwga2VlcCk7XG4gICAgICAgICAgICBleGl0aW5nID0gZnJvbS5zbGljZShrZWVwKTtcbiAgICAgICAgICAgIC8vIENyZWF0ZSBhIG5ldyByZXRhaW5lZCBwYXRoICh3aXRoIHNoYWxsb3cgY29waWVzIG9mIG5vZGVzKSB3aGljaCBoYXZlIHRoZSBwYXJhbXMgb2YgdGhlIHRvUGF0aCBtYXBwZWRcbiAgICAgICAgICAgIHZhciByZXRhaW5lZFdpdGhUb1BhcmFtcyA9IHJldGFpbmVkLm1hcChhcHBseVRvUGFyYW1zKTtcbiAgICAgICAgICAgIGVudGVyaW5nID0gdG9QYXRoLnNsaWNlKGtlZXApO1xuICAgICAgICAgICAgdG8gPSByZXRhaW5lZFdpdGhUb1BhcmFtcy5jb25jYXQoZW50ZXJpbmcpO1xuICAgICAgICAgICAgcmV0dXJuIHsgZnJvbTogZnJvbSwgdG86IHRvLCBy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mVzb2x2ZUZuLCBkZXBzLCBwb2xpY3ksIGRhdGEpIHtcbiAgICAgICAgICAgIHRoaXMucmVzb2x2ZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMucHJvbWlzZSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIGlmIChhcmcxIGluc3RhbmNlb2YgUmVzb2x2YWJsZSkge1xuICAgICAgICAgICAgICAgIGV4dGVuZCh0aGlzLCBhcmcxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRnVuY3Rpb24ocmVzb2x2ZUZuKSkge1xuICAgICAgICAgICAgICAgIGlmIChpc051bGxPclVuZGVmaW5lZChhcmcxKSlcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCduZXcgUmVzb2x2YWJsZSgpOiB0b2tlbiBhcmd1bWVudCBpcyByZXF1aXJlZCcpO1xuICAgICAgICAgICAgICAgIGlmICghaXNGdW5jdGlvbihyZXNvbHZlRm4pKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ25ldyBSZXNvbHZhYmxlKCk6IHJlc29sdmVGbiBhcmd1bWVudCBtdXN0IGJlIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRva2VuID0gYXJnMTtcbiAgICAgICAgICAgICAgICB0aGlzLnBvbGljeSA9IHBvbGljeTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlc29sdmVGbiA9IHJlc29sdmVGbjtcbiAgICAgICAgICAgICAgICB0aGlzLmRlcHMgPSBkZXBzIHx8IFtdO1xuICAgICAgICAgICAgICAgIHRoaXMuZGF0YSA9IGRhdGE7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlZCA9IGRhdGEgIT09IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB0aGlzLnByb21pc2UgPSB0aGlzLnJlc29sdmVkID8gc2VydmljZXMuJHEud2hlbih0aGlzLmRhdGE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ICAgICAgIHJldHVybiAodGhpcy5wcm9taXNlID0gJHFcbiAgICAgICAgICAgICAgICAud2hlbigpXG4gICAgICAgICAgICAgICAgLnRoZW4oZ2V0UmVzb2x2YWJsZURlcGVuZGVuY2llcylcbiAgICAgICAgICAgICAgICAudGhlbihpbnZva2VSZXNvbHZlRm4pXG4gICAgICAgICAgICAgICAgLnRoZW4oY3VzdG9tQXN5bmNQb2xpY3kpXG4gICAgICAgICAgICAgICAgLnRoZW4oYXBwbHlSZXNvbHZlZFZhbHVlKSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXRzIGEgcHJvbWlzZSBmb3IgdGhpcyBSZXNvbHZhYmxlJ3MgZGF0YS5cbiAgICAgICAgICpcbiAgICAgICAgICogRmV0Y2hlcyB0aGUgZGF0YSBhbmQgcmV0dXJucyBhIHByb21pc2UuXG4gICAgICAgICAqIFJldHVybnMgdGhlIGV4aXN0aW5nIHByb21pc2UgaWYgaXQgaGFzIGFscmVhZHkgYmVlbiBmZXRjaGVkIG9uY2UuXG4gICAgICAgICAqL1xuICAgICAgICBSZXNvbHZhYmxlLnByb3RvdHlwZS5nZXQgPSBmdW5jdGlvbiAocmVzb2x2ZUNvbnRleHQsIHRyYW5zKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wcm9taXNlIHx8IHRoaXMucmVzb2x2ZShyZXNvbHZlQ29udGV4dCwgdHJhbnMpO1xuICAgICAgICB9O1xuICAgICAgICBSZXNvbHZhYmxlLnByb3RvdHlwZS50b1N0cmluZyA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBcIlJlc29sdmFibGUodG9rZW46IFwiICsgc3RyaW5naWZ5KHRoaXMudG9rZW4pICsgXCIsIHJlcXVpcmVzOiBbXCIgKyB0aGlzLmRlcHMubWFwKHN0cmluZ2lmeSkgKyBcIl0pXCI7XG4gICAgICAgIH07XG4gICAgICAgIFJlc29sdmFibGUucHJvdG90eXBlLmNsb25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dBSVQnXSwgJ2FzeW5jJykpO1xuICAgICAgICAgICAgICAgIHZhciB3YWl0ID0gbm9kZVJlc29sdmFibGVzLmZpbHRlcihub3QobWF0Y2hlc1BvbGljeShbJ05PV0FJVCddLCAnYXN5bmMnKSkpO1xuICAgICAgICAgICAgICAgIC8vIEZvciB0aGUgbWF0Y2hpbmcgUmVzb2x2YWJsZXMsIHN0YXJ0IHRoZWlyIGFzeW5jIGZldGNoIHByb2Nlc3MuXG4gICAgICAgICAgICAgICAgdmFyIHN1YkNvbnRleHQgPSBfdGhpcy5zdWJDb250ZXh0KG5vZGUuc3RhdGUpO1xuICAgICAgICAgICAgICAgIHZhciBnZXRSZXN1bHQgPSBmdW5jdGlvbiAocikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gclxuICAgICAgICAgICAgICAgICAgICAgICAgLmdldChzdWJDb250ZXh0LCB0cmFucylcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJldHVybiBhIHR1cGxlIHRoYXQgaW5jbHVkZXMgdGhlIFJlc29sdmFibGUncyB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKHZhbHVlKSB7IHJldHVybiAoeyB0b2tlbjogci50b2tlbiwgdmFsdWU6IHZhbHVlIH0pOyB9KTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG5vd2FpdC5mb3JFYWNoKGdldFJlc3VsdCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjYy5jb25jYXQod2FpdC5tYXAoZ2V0UmVzdWx0KSk7XG4gICAgICAgICAgICB9LCBbXSk7XG4gICAgICAgICAgICAvLyBXYWl0IGZvciBhbGwgdGhlIFwiV0FJVFwiIHJlc29sdmFibGVzXG4gICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEuYWxsKHByb21pc2VzKTtcbiAgICAgICAgfTtcbiAgICAgICAgUmVzb2x2ZUNvbnRleHQucHJvdG90eXBlLmluamVjdG9yID0gZn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ViUGF0aCA9IFBhdGhVdGlscy5zdWJQYXRoKHRoaXMuX3BhdGgsIGZ1bmN0aW9uICh4KSB7IHJldHVybiB4ID09PSBub2RlOyB9KSB8fCB0aGlzLl9wYXRoO1xuICAgICAgICAgICAgdmFyIGF2YWlsYWJsZVJlc29sdmFibGVzID0gc3ViUGF0aFxuICAgICAgICAgICAgICAgIC5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgX25vZGUpIHsgcmV0dXJuIGFjYy5jb25jYXQoX25vZGUucmVzb2x2YWJsZXMpOyB9LCBbXSkgLy8gYWxsIG9mIHN1YnBhdGgncyByZXNvbHZhYmxlc1xuICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24gKHJlcykgeyByZXR1cm4gcmVzICE9PSByZXNvbHZhYmxlOyB9KTsgLy8gZmlsdGVyIG91dCB0aGUgYHJlc29sdmFibGVgIGFyZ3VtZW50XG4gICAgICAgICAgICB2YXIgZ2V0RGVwZW5kZW5jeSA9IGZ1bmN0aW9uICh0b2tlbikge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGluZyA9IGF2YWlsYWJsZVJlc29sdmFibGVzLmZpbHRlcihmdW5jdGlvbiAocikgeyByZXR1cm4gci50b2tlbiA9PT0gdG9rZW47IH0pO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0YWlsKG1hdGNoaW5nKTtcbiAgICAgICAgICAgICAgICB2YXIgZnJvbUluamVjdG9yID0gX3RoaXMuaW5qZWN0b3IoKS5nZXROYXRpdmUodG9rZW4pO1xuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChmcm9tSW5qZWN0b3IpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ291bGQgbm90IGZpbmQgRGVwZW5kZW5jeSBJbmplY3Rpb24gdG9rZW46ICcgKyBzdHJpbmdpZnkodG9rZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBSZXNvbHZhYmxlKHRva2VuLCBmdW5jdGlvbiAoKSB7IHJldHVybiBmcm9tSW5qZWN0b3I7IH0sIFtdLCBmcm9tSW5qZWN0b3IpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmRlcHMubWFwKGdldERlcGVuZGVuY3kpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gUmVzb2x2ZUNvbnRleHQ7XG4gICAgfSgpKTtcbiAgICAvKiogQGludGVybmFsICovXG4gICAgdmFyIFVJSW5qZWN0b3JJbXBsID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBVSUluamVjdG9ySW1wbChjb250ZXh0KSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSBjb250ZXh0O1xuICAgICAgICAgICAgdGhpcy5uYXRpdmUgPSB0aGlzLmdldChOQVRJVkVfSU5KRUNUT1JfVE9LRU4pIHx8IHNlcnZpY2VzLiRpbmplY3RvcjtcbiAgICAgICAgfVxuICAgICAgICBVSUluamVjdG9ySW1wbC5wcm90b3R5cGUuZ2V0ID0gZnVuY3Rpb24gKHRva2VuKSB7XG4gICAgICAgICAgICB2YXIgcmVzb2x2YWJsZSA9IHRoaXMuY29udGV4dC5nZXRSZXNvbHZhYmxlKHRva2VuKTtcbiAgICAgICAgICAgIGlmIChyZXNvbHZhYmxlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY29udGV4dC5nZXRQb2xpY3kocmVzb2x2YWJsZSkuYXN5bmMgPT09ICdOT1dBSVQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmdldCh0aGlzLmNvbnRleHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIXJlc29sdmFibGUucmVzb2x2ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdSZXNvbHZhYmxlIGFzeW5jIC5nZXQoKSBub3QgY29tcGxldGU6JyArIHN0cmluZ2lmeShyZXNvbHZhYmxlLnRva2VuKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5nZXROYXRpdmUodG9rZW4pO1xuICAgICAgICB9O1xuICAgICAgICBVSUluamVjdG9ySW1wbC5wcm90b3R5cGUuZ2V0QXN5bmMgPSBmdW5jdGlvbiAodG9rZW4pIHtcbiAgICAgICAgICAgIHZhciByZXNvbHZhYmxlID0gdGhpcy5jb250ZXh0LmdldFJlc29sdmFibGUodG9rZW4pO1xuICAgICAgICAgICAgaWYgKHJlc29sdmFibGUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmFibGUuZ2V0KHRoaXMuY29udGV4dCk7XG4gICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbih0aGlzLm5hdGl2ZS5nZXQodG9rZW4pKTtcbiAgICAgICAgfTtcbiAgICAgICAgVUlJbmplY3RvckltcGwucHJvdG90eXBlLmdldE5hdGl2ZSA9IGZ1bmN0aW9uICh0b2tlbikge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMubmF0aXZlICYmIHRoaXMubmF0aXZlLmdldCh0b2tlbik7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBVSUluamVjdG9ySW1wbDtcbiAgICB9KCkpO1xuXG4gICAgdmFyIHBhcnNlVXJsID0gZnVuY3Rpb24gKHVybCkge1xuICAgICAgICBpZiAoIWlzU3RyaW5nKHVybCkpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIHZhciByb290ID0gdXJsLmNoYXJBdCgwKSA9PT0gJ14nO1xuICAgICAgICByZXR1cm4geyB2YWw6IHJvb3QgPy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cChmdW5jdGlvbiAodG9rZW4pIHsgcmV0dXJuICh7XG4gICAgICAgICAgICAgICAgdG9rZW46IHRva2VuLFxuICAgICAgICAgICAgICAgIHZhbDogcmVzb2x2ZU9ialt0b2tlbl0sXG4gICAgICAgICAgICAgICAgZGVwczogdW5kZWZpbmVkLFxuICAgICAgICAgICAgICAgIHBvbGljeTogcmVzb2x2ZVBvbGljaWVzW3Rva2VuXSxcbiAgICAgICAgICAgIH0pOyB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIGZldGNoIERJIGFubm90YXRpb25zIGZyb20gYSBmdW5jdGlvbiBvciBuZzEtc3R5bGUgYXJyYXkgKi9cbiAgICAgICAgdmFyIGFubm90YXRlID0gZnVuY3Rpb24gKGZuKSB7XG4gICAgICAgICAgICB2YXIgJGluamVjdG9yID0gc2VydmljZXMuJGluamVjdG9yO1xuICAgICAgICAgICAgLy8gbmcxIGRvZXNuJ3QgaGF2ZSBhbiAkaW5qZWN0b3IgdW50aWwgcnVudGltZS5cbiAgICAgICAgICAgIC8vIElmIHRoZSAkaW5qZWN0b3IgZG9lc24ndCBleGlzdCwgdXNlIFwiZGVmZXJyZWRcIiBsaXRlcmFsIGFzIGFcbiAgICAgICAgICAgIC8vIG1hcmtlciBpbmRpY2F0aW5nIHRoZXkgc2hvdWxkIGJlIGFubm90YXRlZCB3aGVuIHJ1bnRpbWUgc3RhcnRzXG4gICAgICAgICAgICByZXR1cm4gZm5bJyRpbmplY3QnXSB8fCAoJGluamVjdG9yICYmICRpbmplY3Rvci5hbm5vdGF0ZShmbiwgJGluamVjdG9yLnN0cmljdERpKSkgfHwgJ2RlZmVycmVkJztcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIHRydWUgaWYgdGhlIG9iamVjdCBoYXMgYm90aCBgdG9rZW5gIGFuZCBgcmVzb2x2ZUZuYCwgYW5kIGlzIHByb2JhYmx5IGEgW1tSZXNvbHZlTGl0ZXJhbF1dICovXG4gICAgICAgIHZhciBpc1Jlc29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CB3aGljaCBoYXMgYWxsIGl0c1xuICAgICAgICAgKiBwcm9wZXJ0aWVzIGFuZCBBUEkgYnVpbHQuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBzdGF0ZSBhbiB1bmluaXRpYWxpemVkIFN0YXRlIG9iamVjdFxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgYnVpbHQgU3RhdGUgb2JqZWN0XG4gICAgICAgICAqL1xuICAgICAgICBTdGF0ZUJ1aWxkZXIucHJvdG90eXBlLmJ1aWxkID0gZnVuY3Rpb24gKHN0YXRlKSB7XG4gICAgICAgICAgICB2YXIgX2EgPSB0aGlzLCBtYXRjaGVyID0gX2EubWF0Y2hlciwgYnVpbGRlcnMgPSBfYS5idWlsZGVycztcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSB0aGlzLnBhcmVudE5hbWUoc3RhdGUpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCAmJiAhbWF0Y2hlci5maW5kKHBhcmVudCwgdW5kZWZpbmVkLCBmYWxzZSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBidWlsZGVycykge1xuICAgICAgICAgICAgICAgIGlmICghYnVpbGRlcnMuaGFzT3duUHJvcGVydHkoa2V5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgdmFyIGNoYWluID0gYnVpbGRlcnNba2V5XS5yZWR1Y2UoZnVuY3Rpb24gKHBhcmVudEZuLCBzdGVwKSB7IHJldHVybiBmdW5jdGlvbiAoX3N0YXRlKSB7IHJldHVybiBzdGVwKF9zdGF0ZSwgcGFyZW50Rm4pOyB9OyB9LCBub29wKTtcbiAgICAgICAgICAgICAgICBzdGF0ZVtrZXldID0gY2hhaW4oc3RhdGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICB9O1xuICAgICAgICBTdGF0ZUJ1aWxkZXIucHJvdG90eXBlLnBhcmVudE5hbWUgPSBmdW5jdGlvbiAoc3RhdGUpIHtcbiAgICAgICAgICAgIC8vIG5hbWUgPSAnZm9vLmJhci5iYXouKionXG4gICAgICAgICAgICB2YXIgbmFtZSA9IHN0YXRlLm5hbWUgfHwgJyc7XG4gICAgICAgICAgICAvLyBzZWdtZW50cyA9IFsnZm9vJywgJ2JhcicsICdiYXonLCAnLioqJ11cbiAgICAgICAgICAgIHZhciBzZWdtZW50cyA9IG5hbWUuc3BsaXQoJy4nKTtcbiAgICAgICAgICAgIC8vIHNlZ21lbnRzID0gWydmb28nLCAnYmFyJywgJ2JheiddXG4gICAgICAgICAgICB2YXIgbGFzdFNlZ21lbnQgPSBzZWdtZW50cy5wb3AoKTtcbiAgICAgICAgICAgIC8vIHNlZ21lbnRzID0gWydmb28nLCAnYmFyJ10gKGlnbm9yZSAuKiogc2VnbWVudCBmb3IgZnV0dXJlIHN0YXRlcylcbiAgICAgICAgICAgIGlmIChsYXN0U2VnbWVudCA9PT0gJyoqJylcbiAgICAgICAgICAgICAgICBzZWdtZW50cy5wb3AoKTtcbiAgICAgICAgICAgIGlmIChzZWdtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUucGFyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlN0YXRlcyB0aGF0IHNwZWNpZnkgdGhlICdwYXJlbnQ6JyBwcm9wZXJ0eSBzaG91bGQgbm90IGhhdmUgYSAnLicgaW4gdGhlaXIgbmFtZSAoXCIgKyBuYW1lICsgXCIpXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyAnZm9vLmJhcidcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VnbWVudHMuam9pbignLicpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFzdGF0ZS5wYXJlbnQpXG4gICAgICAgIC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ICAgICByZXR1cm4gbWF0Y2hlc1swXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH07XG4gICAgICAgIFN0YXRlTWF0Y2hlci5wcm90b3R5cGUucmVzb2x2ZVBhdGggPSBmdW5jdGlvbiAobmFtZSwgYmFzZSkge1xuICAgICAgICAgICAgaWYgKCFiYXNlKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIk5vIHJlZmVyZW5jZSBwb2ludCBnaXZlbiBmb3IgcGF0aCAnXCIgKyBuYW1lICsgXCInXCIpO1xuICAgICAgICAgICAgdmFyIGJhc2VTdGF0ZSA9IHRoaXMuZmluZChiYXNlKTtcbiAgICAgICAgICAgIHZhciBzcGxpdE5hbWUgPSBuYW1lLnNwbGl0KCcuJyk7XG4gICAgICAgICAgICB2YXIgcGF0aExlbmd0aCA9IHNwbGl0TmFtZS5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgaSA9IDAsIGN1cnJlbnQgPSBiYXNlU3RhdGU7XG4gICAgICAgICAgICBmb3IgKDsgaSA8IHBhdGhMZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChzcGxpdE5hbWVbaV0gPT09ICcnICYmIGkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGJhc2VTdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzcGxpdE5hbWVbaV0gPT09ICdeJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWN1cnJlbnQucGFyZW50KVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiUGF0aCAnXCIgKyBuYW1lICsgXCInIG5vdCB2YWxpZCBmb3Igc3RhdGUgJ1wiICsgYmFzZVN0YXRlLm5hbWUgKyBcIidcIik7XG4gICAgICAgICAgICAgICAgICAg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VlcCB0cmFjayBvZiBob3cgbG9uZyB0aGUgcXVldWUgd2hlbiBhbiBvcnBoYW4gd2FzIGZpcnN0IGVuY291bnRlcmVkXG4gICAgICAgICAgICB2YXIgZ2V0U3RhdGUgPSBmdW5jdGlvbiAobmFtZSkgeyByZXR1cm4gX3RoaXMuc3RhdGVzLmhhc093blByb3BlcnR5KG5hbWUpICYmIF90aGlzLnN0YXRlc1tuYW1lXTsgfTtcbiAgICAgICAgICAgIHZhciBub3RpZnlMaXN0ZW5lcnMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlZ2lzdGVyZWQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmxpc3RlbmVycy5mb3JFYWNoKGZ1bmN0aW9uIChsaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpc3RlbmVyKCdyZWdpc3RlcmVkJywgcmVnaXN0ZXJlZC5tYXAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHMuc2VsZjsgfSkpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgd2hpbGUgKHF1ZXVlLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc3RhdGUgPSBxdWV1ZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgIHZhciBuYW1lXzEgPSBzdGF0ZS5uYW1lO1xuICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBidWlsZGVyLmJ1aWxkKHN0YXRlKTtcbiAgICAgICAgICAgICAgICB2YXIgb3JwaGFuSWR4ID0gb3JwaGFucy5pbmRleE9mKHN0YXRlKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBleGlzdGluZ1N0YXRlID0gZ2V0U3RhdGUobmFtZV8xKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4aXN0aW5nU3RhdGUgJiYgZXhpc3RpbmdTdGF0ZS5uYW1lID09PSBuYW1lXzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlN0YXRlICdcIiArIG5hbWVfMSArIFwiJyBpcyBhbHJlYWR5IGRlZmluZWRcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4aXN0aW5nRnV0dXJlU3RhdGUgPSBnZXRTdGF0ZShuYW1lXzEgKyAnLioqJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ0Z1dHVyZVN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmUgZnV0dXJlIHN0YXRlIG9mIHRoZSBzYW1lIG5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucm91dGVyLnN0YXRlUmVnaXN0cnkuZGVyZWdpc3RlcihleGlzdGluZ0Z1dHVyZVN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdGF0ZXNbbmFtZV8xXSA9IHN0YXRlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmF0dGFjaFJvdXRlKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9ycGhhbklkeCA+PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgb3JwaGFucy5zcGxpY2Uob3JwaGFuSWR4LCAxKTtcbiAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJlZC5wdXNoKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBwcmV2ID0gcHJldmlvdXNRdWV1ZUxlbmd0aFtuYW1lXzFdO1xuICAgICAgICAgICAgICAgIHByZXZpb3VzUXVldWVMZW5ndGhbbmFtZV8xXSA9IHF1ZXVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZiAob3JwaGFuSWR4ID49IDAgJiYgcHJldiA9PT0gcXVldWUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdhaXQgdW50aWwgdHdvIGNvbnNlY3V0aXZlIGl0ZXJhdGlvbnMgd2hlcmUgbm8gYWRkaXRpb25hbCBzdGF0ZXMgd2VyZSBkZXF1ZXVlZCBzdWNjZXNzZnVsbHkuXG4gICAgICAgICAgICAgICAgICAgIC8vIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IHJlZ2lzdGVyIG9ycGhhbmVkIHN0YXRlICcke25hbWV9J2ApO1xuICAgICAgICAgICAgICAgICAgICBxdWV1ZS5wdXNoKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgbm90aWZ5TGlzdGVuZXJzKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZXM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKG9ycGhhbklkeCA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgb3JwaGFucy5wdXNoKHN0YXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcXVldWUucHVzaChzdGF0ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBub3RpZnlMaXN0ZW5lcnMoKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZXM7XG4gICAgICAgIH07XG4gICAgICAgIFN0YXRlUXVldWVNYW5hZ2VyLnByb3RvdHlwZS5hdHRhY2hSb3V0ZSA9IGZ1bmN0aW9uIChzdGF0ZSkge1xuICAgICAgICAgICAgaWYgKHN0YXRlLmFic3RyYWN0IHx8ICFzdGF0ZS51cmwpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgdmFyIHJ1bGVzQXBpID0gdGhpcy5yb3V0ZXIudXJsU2VydmljZS5ydWxlcztcbiAgICAgICAgICAgIHJ1bGV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gICAgICAgICAqIENoYWlucyB0b2dldGhlciBhbiBhcnJheSBvZiBUcmFuc2l0aW9uSG9va3MuXG4gICAgICAgICAqXG4gICAgICAgICAqIEdpdmVuIGEgbGlzdCBvZiBbW1RyYW5zaXRpb25Ib29rXV0gb2JqZWN0cywgY2hhaW5zIHRoZW0gdG9nZXRoZXIuXG4gICAgICAgICAqIEVhY2ggaG9vayBpcyBpbnZva2VkIGFmdGVyIHRoZSBwcmV2aW91cyBvbmUgY29tcGxldGVzLlxuICAgICAgICAgKlxuICAgICAgICAgKiAjIyMjIEV4YW1wbGU6XG4gICAgICAgICAqIGBgYGpzXG4gICAgICAgICAqIHZhciBob29rczogVHJhbnNpdGlvbkhvb2tbXSA9IGdldEhvb2tzKCk7XG4gICAgICAgICAqIGxldCBwcm9taXNlOiBQcm9taXNlPGFueT4gPSBUcmFuc2l0aW9uSG9vay5jaGFpbihob29rcyk7XG4gICAgICAgICAqXG4gICAgICAgICAqIHByb21pc2UudGhlbihoYW5kbGVTdWNjZXNzLCBoYW5kbGVFcnJvcik7XG4gICAgICAgICAqIGBgYFxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gaG9va3MgdGhlIGxpc3Qgb2YgaG9va3MgdG8gY2hhaW4gdG9nZXRoZXJcbiAgICAgICAgICogQHBhcmFtIHdhaXRGb3IgaWYgcHJvdmlkZWQsIHRoZSBjaGFpbiBpcyBgLnRoZW4oKWAnZWQgb2ZmIHRoaXMgcHJvbWlzZVxuICAgICAgICAgKiBAcmV0dXJucyBhIGBQcm9taXNlYCBmb3Igc2VxdWVudGlhbGx5IGludm9raW5nIHRoZSBob29rcyAoaW4gb3JkZXIpXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5jaGFpbiA9IGZ1bmN0aW9uIChob29rcywgd2FpdEZvcikge1xuICAgICAgICAgICAgLy8gQ2hhaW4gdGhlIG5leHQgaG9vayBvZmYgdGhlIHByZXZpb3VzXG4gICAgICAgICAgICB2YX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2tcbiAgICAgICAgICovXG4gICAgICAgIFRyYW5zaXRpb25Ib29rLmludm9rZUhvb2tzID0gZnVuY3Rpb24gKGhvb2tzLCBkb25lQ2FsbGJhY2spIHtcbiAgICAgICAgICAgIGZvciAodmFyIGlkeCA9IDA7IGlkeCA8IGhvb2tzLmxlbmd0aDsgaWR4KyspIHtcbiAgICAgICAgICAgICAgICB2YXIgaG9va1Jlc3VsdCA9IGhvb2tzW2lkeF0uaW52b2tlSG9vaygpO1xuICAgICAgICAgICAgICAgIGlmIChpc1Byb21pc2UoaG9va1Jlc3VsdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbWFpbmluZ0hvb2tzID0gaG9va3Muc2xpY2UoaWR4ICsgMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBUcmFuc2l0aW9uSG9vay5jaGFpbihyZW1haW5pbmdIb29rcywgaG9va1Jlc3VsdCkudGhlbihkb25lQ2FsbGJhY2spO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkb25lQ2FsbGJhY2soKTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJ1biBhbGwgVHJhbnNpdGlvbkhvb2tzLCBpZ25vcmluZyB0aGVpciByZXR1cm4gdmFsdWUuXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5ydW5BbGxIb29rcyA9IGZ1bmN0aW9uIChob29rcykge1xuICAgICAgICAgICAgaG9va3MuZm9yRWFjaChmdW5jdGlvbiAoaG9vaykgeyByZXR1cm4gaG9vay5pbnZva2VIb29rKCk7IH0pO1xuICAgICAgICB9O1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5wcm90b3R5cGUubG9nRXJyb3IgPSBmdW5jdGlvbiAoZXJyKSB7XG4gICAgICAgICAgICB0aGlzLnRyYW5zaXRpb24ucm91dGVyLnN0YXRlU2VydmljZS5kZWZhdWx0RXJyb3JIYW5k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cmV0dXJuIGhvb2suZXZlbnRUeXBlLmdldFJlc3VsdEhhbmRsZXIoX3RoaXMpKHJlc3VsdCk7IH07XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBpbnZva2VDYWxsYmFjaygpO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy50eXBlLnN5bmNocm9ub3VzICYmIGlzUHJvbWlzZShyZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQuY2F0Y2gobm9ybWFsaXplRXJyKS50aGVuKGhhbmRsZVJlc3VsdCwgaGFuZGxlRXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZVJlc3VsdChyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBjYWxsYmFjayB0aHJvd3MgKHN5bmNocm9ub3VzbHkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZUVycm9yKFJlamVjdGlvbi5ub3JtYWxpemUoZXJyKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICBpZiAoaG9vay5pbnZva2VMaW1pdCAmJiArK2hvb2suaW52b2tlQ291bnQgPj0gaG9vay5pbnZva2VMaW1pdCkge1xuICAgICAgICAgICAgICAgICAgICBob29rLmRlcmVnaXN0ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBUaGlzIG1ldGhvZCBoYW5kbGVzIHRoZSByZXR1cm4gdmFsdWUgb2YgYSBUcmFuc2l0aW9uIEhvb2suXG4gICAgICAgICAqXG4gICAgICAgICAqIEEgaG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XR1cm5zIGFuIG9iamVjdCB3aGljaCBoYXMgYWxsIHRoZSBjcml0ZXJpYSBtYXRjaCBwYXRocyBhcyBrZXlzIGFuZCBgdHJ1ZWAgYXMgdmFsdWVzLCBpLmUuOlxuICAgICAgICAgKlxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiB7XG4gICAgICAgICAqICAgdG86IHRydWUsXG4gICAgICAgICAqICAgZnJvbTogdHJ1ZSxcbiAgICAgICAgICogICBlbnRlcmluZzogdHJ1ZSxcbiAgICAgICAgICogICBleGl0aW5nOiB0cnVlLFxuICAgICAgICAgKiAgIHJldGFpbmVkOiB0cnVlLFxuICAgICAgICAgKiB9XG4gICAgICAgICAqL1xuICAgICAgICBSZWdpc3RlcmVkSG9vay5wcm90b3R5cGUuX2dldERlZmF1bHRNYXRjaENyaXRlcmlhID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIG1hcE9iaih0aGlzLnRyYW5TdmMuX3BsdWdpbmFwaS5fZ2V0UGF0aFR5cGVzKCksIGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRydWU7IH0pO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0cyBtYXRjaGluZyBub2RlcyBhcyBbW0lNYXRjaGluZ05vZGVzXV1cbiAgICAgICAgICpcbiAgICAgICAgICogQ3JlYXRlIGEgSU1hdGNoaW5nTm9kZXMgb2JqZWN0IGZyb20gdGhlIFRyYW5zaXRpb25Ib29rVHlwZXMgdGhhdCBpcyByb3VnaGx5IGVxdWl2YWxlbnQgdG86XG4gICAgICAgICAqXG4gICAgICAgICAqIGBgYGpzXG4gICAgICAgICAqIGxldCBtYXRjaGVzOiBJTWF0Y2hpbmdOb2RlcyA9IHtcbiAgICAgICAgICogICB0bzogICAgICAgX21hdGNoaW5nTm9kZXMoW3RhaWwodHJlZUNoYW5nZXMudG8pXSwgICBtYy50byksXG4gICAgICAgICAqICAgZnJvbTogICAgIF9tYXRjaGluZ05v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biAgICAgICAgICAgICAgICAvLyBTZWxlY3QgdGhlIFBhdGhOb2RlW10gdGhhdCB3aWxsIGJlIHVzZWQgYXMgVHJhbnNpdGlvbkhvb2sgY29udGV4dCBvYmplY3RzXG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoaW5nTm9kZXMgPSBtYXRjaGVzW2hvb2tUeXBlLmNyaXRlcmlhTWF0Y2hQYXRoLm5hbWVdO1xuICAgICAgICAgICAgICAgIC8vIFJldHVybiBhbiBhcnJheSBvZiBIb29rVHVwbGVzXG4gICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoaW5nTm9kZXMubWFwKGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBfb3B0aW9ucyA9IGV4dGVuZCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBiaW5kOiBob29rLmJpbmQsXG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFjZURhdGE6IHsgaG9va1R5cGU6IGhvb2tUeXBlLm5hbWUsIGNvbnRleHQ6IG5vZGUgfSxcbiAgICAgICAgICAgICAgICAgICAgfSwgYmFzZUhvb2tPcHRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlID0gaG9va1R5cGUuY3JpdGVyaWFNYXRjaFBhdGguc2NvcGUgPT09IGV4cG9ydHMuVHJhbnNpdGlvbkhvb2tTY29wZS5TVEFURSA/IG5vZGUuc3RhdGUuc2VsZiA6IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0cmFuc2l0aW9uSG9vayA9IG5ldyBUcmFuc2l0aW9uSG9vayh0cmFuc2l0aW9uLCBzdGF0ZSwgaG9vaywgX29wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBob29rOiBob29rLCBub2RlOiBub2RlLCB0cmFuc2l0aW9uSG9vazogdHJhbnNpdGlvbkhvb2sgfTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICA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ub25SZXRhaW4gPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5vbkVudGVyID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUub25GaW5pc2ggPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5vblN1Y2Nlc3MgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5vbkVycm9yID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsXG4gICAgICAgICAqIENyZWF0ZXMgdGhlIHRyYW5zaXRpb24tbGV2ZWwgaG9vayByZWdpc3RyYXRpb24gZnVuY3Rpb25zXG4gICAgICAgICAqICh3aGljaCBjYW4gdGhlbiBiZSB1c2VkIHRvIHJlZ2lzdGVyIGhvb2tzKVxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUuY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TdGF0ZXMpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQGludGVybmFsXG4gICAgICAgICAqIEByZXR1cm5zIHRoZSBpbnRlcm5hbCBmcm9tIFtTdGF0ZV0gb2JqZWN0XG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS4kZnJvbSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0YWlsKHRoaXMuX3RyZWVDaGFuZ2VzLmZyb20pLnN0YXRlO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQGludGVybmFsXG4gICAgICAgICAqIEByZXR1cm5zIHRoZSBpbnRlcm5hbCB0byBbU3RhdGVdIG9iamVjdFxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUuJHRvID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRhaWwodGhpcy5fdHJlZUNoYW5nZXMudG8pLnN0YXRlO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0dXJucyB0aGUgXCJmcm9tIHN0YXRlXCJcbiAgICAgICAgICpcbiAgICAgICAgICogUmV0dXJucyB0aGUgc3RhdGUgdGhhdCB0aGUgdHJhbnNpdGlvbiBpcyBjb21pbmcgKmZyb20qLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyBUaGUgc3RhdGUgZGVjbGFyYXRpb24gb2JqZWN0IGZvciB0aGUgVHJhbnNpdGlvbidzIChcImZyb20gc3RhdGVcIikuXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5mcm9tID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJGZyb20oKS5zZWxmO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0dXJucyB0aGUgXCJ0byBzdGF0ZVwiXG4gICA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AgICAgICAgICAgaWYgKHRoaXMuX29wdGlvbnMucmVsb2FkKVxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAvLyBJZiBhbnkgc3RhdGVzIGFyZSBleGl0aW5nIG9yIGVudGVyaW5nXG4gICAgICAgICAgICBpZiAodGMuZXhpdGluZy5sZW5ndGggfHwgdGMuZW50ZXJpbmcubGVuZ3RoKVxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAvLyBJZiB0by9mcm9tIHBhdGggbGVuZ3RocyBkaWZmZXJcbiAgICAgICAgICAgIGlmICh0Yy50by5sZW5ndGggIT09IHRjLmZyb20ubGVuZ3RoKVxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdG8vZnJvbSBwYXRocyBhcmUgZGlmZmVyZW50XG4gICAgICAgICAgICB2YXIgcGF0aHNEaWZmZXIgPSBhcnJheVR1cGxlcyh0Yy50bywgdGMuZnJvbSlcbiAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uICh0dXBsZSkgeyByZXR1cm4gdHVwbGVbMF0uc3RhdGUgIT09IHR1cGxlWzFdLnN0YXRlOyB9KVxuICAgICAgICAgICAgICAgIC5yZWR1Y2UoYW55VHJ1ZVIsIGZhbHNlKTtcbiAgICAgICAgICAgIGlmIChwYXRoc0RpZmZlcilcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgLy8gRmluZCBhbnkgcGFyYW1ldGVyIHZhbHVlcyB0aGF0IGRpZmZlclxuICAgICAgICAgICAgdmFyIG5vZGVTY2hlbWFzID0gdGMudG8ubWFwKGZ1bmN0aW9uIChub2RlKSB7IHJldHVybiBub2RlLnBhcmFtU2NoZW1hOyB9KTtcbiAgICAgICAgICAgIHZhciBfYSA9IFt0Yy50bywgdGMuZnJvbV0ubWFwKGZ1bmN0aW9u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CA9IF90aGlzLiRpZDtcbiAgICAgICAgICAgICAgICBnbG9iYWxzLnRyYW5zaXRpb24gPSBfdGhpcztcbiAgICAgICAgICAgICAgICBnbG9iYWxzLnRyYW5zaXRpb25IaXN0b3J5LmVucXVldWUoX3RoaXMpO1xuICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVHJhbnNpdGlvblN0YXJ0KF90aGlzKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbih1bmRlZmluZWQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHZhciBhbGxCZWZvcmVIb29rcyA9IGdldEhvb2tzRm9yKGV4cG9ydHMuVHJhbnNpdGlvbkhvb2tQaGFzZS5CRUZPUkUpO1xuICAgICAgICAgICAgVHJhbnNpdGlvbkhvb2suaW52b2tlSG9va3MoYWxsQmVmb3JlSG9va3MsIHN0YXJ0VHJhbnNpdGlvbilcbiAgICAgICAgICAgICAgICAudGhlbihydW5UcmFuc2l0aW9uKVxuICAgICAgICAgICAgICAgIC50aGVuKHRyYW5zaXRpb25TdWNjZXNzLCB0cmFuc2l0aW9uRXJyb3IpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucHJvbWlzZTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIENoZWNrcyBpZiB0aGUgVHJhbnNpdGlvbiBpcyB2YWxpZFxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyB0cnVlIGlmIHRoZSBUcmFuc2l0aW9uIGlzIHZhbGlkXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS52YWxpZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAhdGhpcy5lcnJvcigpIHx8IHRoaXMuc3VjY2VzcyAhPT0gdW5kZWZpbmVkO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQWJvcnRzIHRoaXMgdHJhbnNpdGlv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laG9sZGVyIHJlZ2V4cCBicmVha3MgZG93biBhcyBmb2xsb3dzOlxuICAgICAgICAgICAgLy8gICAgKFs6Kl0pKFtcXHdcXFtcXF1dKykgICAgICAgICAgICAgIC0gY2xhc3NpYyBwbGFjZWhvbGRlciAoJDEgLyAkMikgKHNlYXJjaCB2ZXJzaW9uIGhhcyAtIGZvciBzbmFrZS1jYXNlKVxuICAgICAgICAgICAgLy8gICAgXFx7KFtcXHdcXFtcXF1dKykoPzpcXDpcXHMqKCAuLi4gKSk/XFx9ICAtIGN1cmx5IGJyYWNlIHBsYWNlaG9sZGVyICgkMykgd2l0aCBvcHRpb25hbCByZWdleHAvdHlwZSAuLi4gKCQ0KSAoc2VhcmNoIHZlcnNpb24gaGFzIC0gZm9yIHNuYWtlLWNhc2VcbiAgICAgICAgICAgIC8vICAgICg/OiAuLi4gfCAuLi4gfCAuLi4gKSsgICAgICAgICAtIHRoZSByZWdleHAgY29uc2lzdHMgb2YgYW55IG51bWJlciBvZiBhdG9tcywgYW4gYXRvbSBiZWluZyBlaXRoZXJcbiAgICAgICAgICAgIC8vICAgIFtee31cXFxcXSsgICAgICAgICAgICAgICAgICAgICAgIC0gYW55dGhpbmcgb3RoZXIgdGhhbiBjdXJseSBicmFjZXMgb3IgYmFja3NsYXNoXG4gICAgICAgICAgICAvLyAgICBcXFxcLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIGEgYmFja3NsYXNoIGVzY2FwZVxuICAgICAgICAgICAgLy8gICAgXFx7KD86W157fVxcXFxdK3xcXFxcLikqXFx9ICAgICAgICAgIC0gYSBtYXRjaGVkIHNldCBvZiBjdXJseSBicmFjZXMgY29udGFpbmluZyBvdGhlciBhdG9tc1xuICAgICAgICAgICAgdmFyIHBsYWNlaG9sZGVyID0gLyhbOipdKShbXFx3XFxbXFxdXSspfFxceyhbXFx3XFxbXFxdXSspKD86XFw6XFxzKigoPzpbXnt9XFxcXF0rfFxcXFwufFxceyg/Oltee31cXFxcXSt8XFxcXC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YW1ldGVycy5cbiAgICAgICAgICAgIHZhciBtYXRjaERldGFpbHMgPSBmdW5jdGlvbiAobSwgaXNTZWFyY2gpIHtcbiAgICAgICAgICAgICAgICAvLyBJRVs3OF0gcmV0dXJucyAnJyBmb3IgdW5tYXRjaGVkIGdyb3VwcyBpbnN0ZWFkIG9mIG51bGxcbiAgICAgICAgICAgICAgICB2YXIgaWQgPSBtWzJdIHx8IG1bM107XG4gICAgICAgICAgICAgICAgdmFyIHJlZ2V4cCA9IGlzU2VhcmNoID8gbVs0XSA6IG1bNF0gfHwgKG1bMV0gPT09ICcqJyA/ICdbXFxcXHNcXFxcU10qJyA6IG51bGwpO1xuICAgICAgICAgICAgICAgIHZhciBtYWtlUmVnZXhwVHlwZSA9IGZ1bmN0aW9uIChzdHIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluaGVyaXQocGFyYW1UeXBlcy50eXBlKGlzU2VhcmNoID8gJ3F1ZXJ5JyA6ICdwYXRoJyksIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IG5ldyBSZWdFeHAoc3RyLCBfdGhpcy5jb25maWcuY2FzZUluc2Vuc2l0aXZlID8gJ2knIDogdW5kZWZpbmVkKSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBpZDogaWQsXG4gICAgICAgICAgICAgICAgICAgIHJlZ2V4cDogcmVnZXhwLFxuICAgICAgICAgICAgICAgICAgICBzZWdtZW50OiBwYXR0ZXJuLnN1YnN0cmluZyhsYXN0LCBtLmluZGV4KSxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogIXJlZ2V4cCA/IG51bGwgOiBwYXJhbVR5cGVzLnR5cGUocmVnZXhwKSB8fCBtYWtlUmVnZXhwVHlwZShyZWdleHApLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGRldGFpbHM7XG4gICAgICAgICAgICB2YXIgc2VnbWVudDtcbiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpuby1jb25kaXRpb25hbC1hc3NpZ25tZW50XG4gICAgICAgICAgICB3aGlsZSAoKG1hdGNoQXJyYXkgPSBwbGFjZWhvbGRlci5leGVjKHBhdHRlcm4pKSkge1xuICAgICAgICAgICAgICAgIGRldGFpbHMgPSBtYXRjaERldGFpbHMobWF0Y2hBcnJheSwgZmFsc2UpO1xuICAgICAgICAgICAgICAgIGlmIChkZXRhaWxzLnNlZ21lbnQuaW5kZXhPZignPycpID49IDApXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrOyAvLyB3ZSdyZSBpbnRvIHRoZSBzZWFyY2ggcGFydFxuICAgICAgICAgICAgICAgIGNoZWNrUGFyYW1FcnJvcnMoZGV0YWlscy5pZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5fcGFyYW1zLnB1c2gocGFyYW1GYWN0b3J5LmZyb21QYXRoKGRldGFpbHMuaWQsIGRldGFpbHMudHlwZSwgY29uZmlnLnN0YXRlKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2VnbWVudHMucHVzaChkZXRhaWxzLnNlZ21lbnQpO1xuICAgICAgICAgICAgICAgIHBhdHRlcm5zLnB1c2goW2RldGFpbHMuc2VnbWVudCwgdGFpbCh0aGlzLl9wYXJhbXMpXSk7XG4gICAgICAgICAgICAgICAgbGFzdCA9IHBsYWNlaG9sZGVyLmxhc3RJbmRleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNlZ21lbnQgPSBwYXR0ZXJuLnN1YnN0cmluZyhsYXN0KTtcbiAgICAgICAgICAgIC8vIEZpbmQgYW55IHNlYXJjaCBwYXJhbWV0ZXIgbmFtZXMgYW5kIHJlbW92ZSB0aGVtIGZyb20gdGhlIGxhc3Qgc2VnbWVudFxuICAgICAgICAgICAgdmFyIGkgPSBzZWdtZW50LmluZGV4T2YoJz8nKTtcbiAgICAgICAgICAgIGlmIChpID49IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VnbWVudC5zdWJzdHJpbmcoaSk7XG4gICAgICAgICAgICAgICAgc2VnbWVudCA9IHNlZ21lbnQuc3Vic3RyaW5nKDAsIGkpO1xuICAgICAgICAgICAgICAgIGlmIChzZWFyY2gubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICBsYXN0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLWNvbmRpdGlvbmFsLWFzc2lnbm1lbnRcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChtYXRjaEFycmF5ID0gc2VhcmNoUGxhY2Vob2xkZXIuZXhlYyhzZWFyY2gpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWlscyA9IG1hdGNoRGV0YWlscyhtYXRjaEFycmF5LCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrUGFyYW1FcnJvcnMoZGV0YWlscy5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYXJhbXMucHVzaChwYXJhbUZhY3RvcnkuZnJvbVNlYXJjaChkZXRhaWxzLmlkLCBkZXRhaWxzLnR5cGUsIGNvbmZpZy5zdGF0ZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdCA9IHBsYWNlaG9sZGVyLmxhc3RJbmRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmID8mXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLl9zZWdtZW50cy5wdXNoKHNlZ21lbnQpO1xuICAgICAgICAgICAgdGhpcy5fY29tcGlsZWQgPSBwYXR0ZXJucy5tYXAoZnVuY3Rpb24gKF9wYXR0ZXJuKSB7IHJldH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dtZW50c0FuZFBhcmFtcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVkdWNlKHVubmVzdFIsIFtdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2Uoam9pbk5laWdoYm9yc1IsIFtdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHgpIHsgcmV0dXJuIChpc1N0cmluZyh4KSA/IHNwbGl0T25TbGFzaCh4KSA6IHgpOyB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgdGhlIHNvcnQgd2VpZ2h0IGZvciBlYWNoIHNlZ21lbnQgb2YgYSBVcmxNYXRjaGVyXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQ2FjaGVzIHRoZSByZXN1bHQgYXMgYG1hdGNoZXIuX2NhY2hlLndlaWdodHNgXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHZhciB3ZWlnaHRzID0gZnVuY3Rpb24gKG1hdGNoZXIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKG1hdGNoZXIuX2NhY2hlLndlaWdodHMgPVxuICAgICAgICAgICAgICAgICAgICBtYXRjaGVyLl9jYWNoZS53ZWlnaHRzIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWdtZW50cyhtYXRjaGVyKS5tYXAoZnVuY3Rpb24gKHNlZ21lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb3J0IHNsYXNoZXMgZmlyc3QsIHRoZW4gc3RhdGljIHN0cmluZ3MsIHRoZSBQYXJhbXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VnbWVudCA9PT0gJy8nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNTdHJpbmcoc2VnbWVudCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWdtZW50IGluc3RhbmNlb2YgUGFyYW0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogUGFkcyBzaG9ydGVyIGFycmF5IGluLXBsYWNlIChtdXRhdGVzKVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB2YXIgcGFkQXJyYXlzID0gZnVuY3Rpb24gKGwsIHIsIHBhZFZhbCkge1xuICAgICAgICAgICAgICAgIHZhciBsZW4gPSBNYXRoLm1heChsLmxlbmd0aCwgci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIHdoaWxlIChsLmxlbmd0aCA8IGxlbilcbiAgICAgICAgICAgICAgICAgICAgbC5wdXNoKHBhZFZhbCk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHIubGVuZ3RoIDwgbGVuKVxuICAgICAgICAgICAgICAgICAgICByLnB1c2gocGFkVmFsKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgd2VpZ2h0c0EgPSB3ZWlnaHRzKGEpLCB3ZWlnaHRzQiA9IHdlaWdodHMoYik7XG4gICAgICAgICAgICBwYWRBcnJheXMod2VpZ2h0c0EsIHdlaWdodHNCLCAwKTtcbiAgICAgICAgICAgIHZhciBfcGFpcnMgPSBhcnJheVR1cGxlcyh3ZWlnaHRzQSwgd2VpZ2h0c0IpO1xuICAgICAgICAgICAgdmFyIGNtcCwgaTtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBfcGFpcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjbXAgPSBfcGFpcnNbaV1bMF0gLSBfcGFpcnNbaV1bMV07XG4gICAgICAgICAgICAgICAgaWYgKGNtcCAhPT0gMClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNtcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQ3JlYXRlcyBhIG5ldyBjb25jYXRlbmF0ZWQgVXJsTWF0Y2hlclxuICAgICAgICAgKlxuICAgICAgICAgKiBCdWlsZHMgYSBuZXcgVXJsTWF0Y2hlciBieSBhcHBlbmRpbmcgYW5vdGhlciBVcmxNYXRjaGVyIHRvIHRoaXMgb25lLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gdXJsIEEgYFVybE1hdGNoZXJgIGluc3RhbmNlIHRvIGFwcGVuZCBhcyBhIGNoaWxkIG9mIHRoZSBjdXJyZW50IGBVcmxNYXRjaGVyYC5cbiAgICAgICAgICovXG4gICAgICAgIFVybE1hdGNoZXIucHJvdG90eXBlLmFwcGVuZCA9IGZ1bmN0aW9uICh1cmwpIHtcbiAgICAgICAgICAgIHRoaXMuX2NoaWxkcmVuLnB1c2godXJsKTtcbiAgICAgICAgICAgIHVybC5fY2FjaGUgPSB7XG4gICAgICAgICAgICAgICAgcGF0aDogdGhpcy5fY2FjaGUucGF0aC5jb25jYXQodXJsKSxcbiAgICAgICAgICAgICAgICBwYXJlbnQ6IHRoaXMsXG4gICAgICAgICAgICAgICAgcGF0dGVybjogbnVsbCxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gdXJsO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsICovXG4gICAgICAgIFVybE1hdGNoZXIucHJvdG90eXBlLmlzUm9vdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jYWNoZS5wYXRoWzBdID09PSB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICAvKiogUmV0dXJucyB0aGUgaW5wdXQgcGF0dGVybiBzdHJpbmcgKi9cbiAgICAgICAgVXJsTWF0Y2hlci5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXR0ZXJuO1xuICAgICAgICB9O1xuICAgICAgICBVcmxNYXRjaGVyLnByb3RvdHlwZS5fZ2V0RGVjb2RlZFBhcmFtVmFsdWUgPSBmdW5jdGlvbiAodmFsdWUsIHBhcmFtKSB7XG4gICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHZhbHVlKSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNvbmZpZy5kZWNvZGVQYXJhbXMgJiYgIXBhcmFtLnR5cGUucmF3KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5tYXAoZnVuY3Rpb24gKHBhcmFtVmFsdWUpIHsgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudChwYXJhbVZhbHVlKTsgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IGRlY29kZVVSSUNvbXBvbmVudCh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJhbS50eXBlLmRlY29kZSh2YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcGFyYW0udmFsdWUodmFsdWUpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogVGVzdHMgdGhlIHNwZWNpZmllZCB1cmwvcGF0aCBhZ2FpbnN0IHRoaXMgbWF0Y2hlci5cbiAgICAgICAgICpcbiAgICAgICAgICogVGVzdHMgaWYgd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ZXJzLCBlLmcuIGAkbG9jYXRpb24uc2VhcmNoKClgLlxuICAgICAgICAgKiBAcGFyYW0gaGFzaCAgICBVUkwgaGFzaCBlLmcuIGAkbG9jYXRpb24uaGFzaCgpYC5cbiAgICAgICAgICogQHBhcmFtIG9wdGlvbnNcbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgVGhlIGNhcHR1cmVkIHBhcmFtZXRlciB2YWx1ZXMuXG4gICAgICAgICAqL1xuICAgICAgICBVcmxNYXRjaGVyLnByb3RvdHlwZS5leGVjID0gZnVuY3Rpb24gKHBhdGgsIHNlYXJjaCwgaGFzaCwgb3B0aW9ucykge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IHZvaWQgMCkgeyBzZWFyY2ggPSB7fTsgfVxuICAgICAgICAgICAgdmFyIG1hdGNoID0gbWVtb2l6ZVRvKHRoaXMuX2NhY2hlLCAncGF0dGVybicsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFJlZ0V4cChbXG4gICAgICAgICAgICAgICAgICAgICdeJyxcbiAgICAgICAgICAgICAgICAgICAgdW5uZXN0KF90aGlzLl9jYWNoZS5wYXRoLm1hcChwcm9wKCdfY29tcGlsZWQnKSkpLmpvaW4oJycpLFxuICAgICAgICAgICAgICAgICAgICBfdGhpcy5jb25maWcuc3RyaWN0ID09PSBmYWxzZSA/ICcvPycgOiAnJyxcbiAgICAgICAgICAgICAgICAgICAgJyQnLFxuICAgICAgICAgICAgICAgIF0uam9pbignJyksIF90aGlzLmNvbmZpZy5jYXNlSW5zZW5zaXRpdmUgPyAnaScgOiB1bmRlZmluZWQpO1xuICAgICAgICAgICAgfSkuZXhlYyhwYXRoKTtcbiAgICAgICAgICAgIGlmICghbWF0Y2gpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAvLyBvcHRpb25zID0gZGVmYXVsdH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y5mb3JFYWNoKGZ1bmN0aW9uIChwYXJhbSkge1xuICAgICAgICAgICAgICAgIHZhciB2YWx1ZSA9IHNlYXJjaFtwYXJhbS5pZF07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwYXJhbS5yZXBsYWNlLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbS5yZXBsYWNlW2pdLmZyb20gPT09IHZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJhbS5yZXBsYWNlW2pdLnRvO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWx1ZXNbcGFyYW0uaWRdID0gX3RoaXMuX2dldERlY29kZWRQYXJhbVZhbHVlKHZhbHVlLCBwYXJhbSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmIChoYXNoKVxuICAgICAgICAgICAgICAgIHZhbHVlc1snIyddID0gaGFzaDtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZXM7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICogUmV0dXJucyBhbGwgdGhlIFtbUGFyYW1dXSBvYmplY3RzIG9mIGFsbCBwYXRoIGFuZCBzZWFyY2ggcGFyYW1ldGVycyBvZiB0aGlzIHBhdHRlcm4gaW4gb3JkZXIgb2YgYXBwZWFyYW5jZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMge0FycmF5LjxQYXJhbT59ICBBbiBhcnJheSBvZiBbW1BhcmFtXV0gb2JqZWN0cy4gTXVzdCBiZSB0cmVhdGVkIGFzIHJlYWQtb25seS4gSWYgdGhlXG4gICAgICAgICAqICAgIHBhdHRlcm4gaGFzIG5vIHBhcmFtZXRlcnMsIGFuIGVtcHR5IGFycmF5IGlzIHJldHVybmVkLlxuICAgICAgICAgKi9cbiAgICAgICAgVXJsTWF0Y2hlci5wcm90b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xdWFzaCwgZW5jb2RlZCA9IHguZW5jb2RlZCwgcGFyYW0gPSB4LnBhcmFtO1xuICAgICAgICAgICAgICAgIC8vIElmIHNxdWFzaCBpcyA9PT0gdHJ1ZSwgdHJ5IHRvIHJlbW92ZSBhIHNsYXNoIGZyb20gdGhlIHBhdGhcbiAgICAgICAgICAgICAgICBpZiAoc3F1YXNoID09PSB0cnVlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjLm1hdGNoKC9cXC8kLykgPyBhY2Muc2xpY2UoMCwgLTEpIDogYWNjO1xuICAgICAgICAgICAgICAgIC8vIElmIHNxdWFzaCBpcyBhIHN0cmluZywgdXNlIHRoZSBzdHJpbmcgZm9yIHRoZSBwYXJhbSB2YWx1ZVxuICAgICAgICAgICAgICAgIGlmIChpc1N0cmluZyhzcXVhc2gpKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjICsgc3F1YXNoO1xuICAgICAgICAgICAgICAgIGlmIChzcXVhc2ggIT09IGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjOyAvLyA/XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQgPT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIHBhcmFtZXRlciB2YWx1ZSBpcyBhbiBhcnJheSwgZW5jb2RlIHRoZSB2YWx1ZSB1c2luZyBlbmNvZGVEYXNoZXNcbiAgICAgICAgICAgICAgICBpZiAoaXNBcnJheShlbmNvZGVkKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIG1hcChlbmNvZGVkLCBVcmxNYXRjaGVyLmVuY29kZURhc2hlcykuam9pbignLScpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBwYXJhbWV0ZXIgdHlwZSBpcyBcInJhd1wiLCB0aGVuIGRvIG5vdCBlbmNvZGVVUklDb21wb25lbnRcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0ucmF3KVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjICsgZW5jb2RlZDtcbiAgICAgICAgICAgICAgICAvLyBFbmNvZGUgdGhlIHZhbHVlXG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIGVuY29kZVVSSUNvbXBvbmVudChlbmNvZGVkKTtcbiAgICAgICAgICAgIH0sICcnKTtcbiAgICAgICAgICAgIC8vIEJ1aWxkIHRoZSBxdWVyeSBzdHJpbmcgYnkgYXBwbHlpbmcgcGFyYW1ldGVyIHZhbHVlcyAoYXJyYXkgb3IgcmVndWxhcilcbiAgICAgICAgICAgIC8vIHRoZW4gbWFwcGluZyB0byBrZXk9dmFsdWUsIHRoZW4gZmxhdHRlbmluZyBhbmQgam9pbmluZyB1c2luZyBcIiZcIlxuICAgICAgICAgICAgdmFyIHF1ZXJ5U3RyaW5nID0gcXVlcnlQYXJhbXNcbiAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChwYXJhbURldGFpbHMpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFyYW0gPSBwYXJhbURldGFpbHMucGFyYW0sIHNxdWFzaCA9IHBhcmFtRGV0YWlscy5zcXVhc2gsIGVuY29kZWQgPSBwYXJhbURldGFpbHMuZW5jb2RlZCwgaXNEZWZhdWx0VmFsdWUgPSBwYXJhbURldGFpbHMuaXNEZWZhdWx0VmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQgPT0gbnVsbCB8fCAoaXNEZWZhdWx0VmFsdWUgJiYgc3F1YXNoICE9PSBmYWxzZSkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBpZiAoIWlzQXJyYXkoZW5jb2RlZCkpXG4gICAgICAgICAgICAgICAgICAgIGVuY29kZWQgPSBbZW5jb2RlZF07XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQubGVuZ3RoID09PSAwKVxuICAgICAgICAgICAgICAgICAgICByZ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AgICAgICAgIHJldHVybiBfdGhpcy5yb3V0ZXIudXJsU2VydmljZS5jb25maWcudHlwZShuYW1lLCBkZWZpbml0aW9uLCBkZWZpbml0aW9uRm4pIHx8IF90aGlzO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICAvKipcbiAgICAgICAgICogQ3JlYXRlcyBhIFtbVXJsTWF0Y2hlcl1dIGZvciB0aGUgc3BlY2lmaWVkIHBhdHRlcm4uXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBwYXR0ZXJuICBUaGUgVVJMIHBhdHRlcm4uXG4gICAgICAgICAqIEBwYXJhbSBjb25maWcgIFRoZSBjb25maWcgb2JqZWN0IGhhc2guXG4gICAgICAgICAqIEByZXR1cm5zIFRoZSBVcmxNYXRjaGVyLlxuICAgICAgICAgKi9cbiAgICAgICAgVXJsTWF0Y2hlckZhY3RvcnkucHJvdG90eXBlLmNvbXBpbGUgPSBmdW5jdGlvbiAocGF0dGVybiwgY29uZmlnKSB7XG4gICAgICAgICAgICB2YXIgdXJsQ29uZmlnID0gdGhpcy5yb3V0ZXIudXJsU2VydmljZS5jb25maWc7XG4gICAgICAgICAgICAvLyBiYWNrd2FyZC1jb21wYXRpYmxlIHN1cHBvcnQgZm9yIGNvbmZpZy5wYXJhbXMgLT4gY29uZmlnLnN0YXRlLnBhcmFtc1xuICAgICAgICAgICAgdmFyIHBhcmFtcyA9IGNvbmZpZyAmJiAhY29uZmlnLnN0YXRlICYmIGNvbmZpZy5wYXJhbXM7XG4gICAgICAgICAgICBjb25maWcgPSBwYXJhbXMgPyBfX2Fzc2lnbih7IHN0YXRlOiB7IHBhcmFtczogcGFyYW1zIH0gfSwgY29uZmlnKSA6IGNvbmZpZztcbiAgICAgICAgICAgIHZhciBnbG9iYWxDb25maWcgPSB7XG4gICAgICAgICAgICAgICAgc3RyaWN0OiB1cmxDb25maWcuX2lzU3RyaWN0TW9kZSxcbiAgICAgICAgICAgICAgICBjYXNlSW5zZW5za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gICAgICAgfVxuICAgICAgICAvKiogSW50ZXJuYWwgQVBJLiAqL1xuICAgICAgICBVcmxSb3V0ZXIucHJvdG90eXBlLnVwZGF0ZSA9IGZ1bmN0aW9uIChyZWFkKSB7XG4gICAgICAgICAgICB2YXIgJHVybCA9IHRoaXMucm91dGVyLmxvY2F0aW9uU2VydmljZTtcbiAgICAgICAgICAgIGlmIChyZWFkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sb2NhdGlvbiA9ICR1cmwudXJsKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCR1cmwudXJsKCkgPT09IHRoaXMubG9jYXRpb24pXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgJHVybC51cmwodGhpcy5sb2NhdGlvbiwgdHJ1ZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBJbnRlcm5hbCBBUEkuXG4gICAgICAgICAqXG4gICAgICAgICAqIFB1c2hlcyBhIG5ldyBsb2NhdGlvbiB0byB0aGUgYnJvd3NlciBoaXN0b3J5LlxuICAgICAgICAgKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICogQHBhcmFtIHVybE1hdGNoZXJcbiAgICAgICAgICogQHBhcmFtIHBhcmFtc1xuICAgICAgICAgKiBAcGFyYW0gb3B0aW9uc1xuICAgICAgICAgKi9cbiAgICAgICAgVXJsUm91dGVyLnByb3RvdHlwZS5wdXNoID0gZnVuY3Rpb24gKHVybE1hdGNoZXIsIHBhcmFtcywgb3B0aW9ucykge1xuICAgICAgICAgICAgdmFyIHJlcGxhY2UgPSBvcHRpb25zICYmICEhb3B0aW9ucy5yZXBsYWNlO1xuICAgICAgICAgICAgdGhpcy5yb3V0ZXIudXJsU2VydmljZS51cmwodXJsTWF0Y2hlci5mb3JtYXQocGFyYW1zIHx8IHt9KSwgcmVwbGFjZSk7XG4gICAgICAgIH07XG4gICAg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h0QW5jaG9yID0gcmVsYXRpdmVWaWV3TmFtZVN1Z2FyWzFdOyAvLyBzZXQgYW5jaG9yIHRvIFwiXi5eLl5cIlxuICAgICAgICAgICAgICAgIHVpVmlld05hbWUgPSByZWxhdGl2ZVZpZXdOYW1lU3VnYXJbMl07IC8vIHNldCB2aWV3LW5hbWUgdG8gXCJmb28uYmFyXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh1aVZpZXdOYW1lLmNoYXJBdCgwKSA9PT0gJyEnKSB7XG4gICAgICAgICAgICAgICAgdWlWaWV3TmFtZSA9IHVpVmlld05hbWUuc3Vic3RyKDEpO1xuICAgICAgICAgICAgICAgIHVpVmlld0NvbnRleHRBbmNob3IgPSAnJzsgLy8gdGFyZ2V0IGFic29sdXRlbHkgZnJvbSByb290XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBoYW5kbGUgcGFyZW50IHJlbGF0aXZlIHRhcmdldGluZyBcIl4uXi5eXCJcbiAgICAgICAgICAgIHZhciByZWxhdGl2ZU1hdGNoID0gL14oXFxeKD86XFwuXFxeKSopJC87XG4gICAgICAgICAgICBpZiAocmVsYXRpdmVNYXRjaC5leGVjKHVpVmlld0NvbnRleHRBbmNob3IpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGFuY2hvclN0YXRlID0gdWlWaWV3Q29udGV4dEFuY2hvci5zcGxpdCgnLicpLnJlZHVjZShmdW5jdGlvbiAoYW5jaG9yLCB4KSB7IHJldHVybiBhbmNob3IucGFyZW50OyB9LCBjb250ZXh0KTtcbiAgICAgICAgICAgICAgICB1aVZpZXdDb250ZXh0QW5jaG9yID0gYW5jaG9yU3RhdGUubmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHVpVmlld0NvbnRleHRBbmNob3IgPT09ICcuJykge1xuICAgICAgICAgICAgICAgIHVpVmlld0NvbnRleHRBbmNob3IgPSBjb250ZXh0Lm5hbWU7XG4gICAgICAgICAgICB9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Znc107XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBEZWFjdGl2YXRlcyBhIFZpZXdDb25maWcuXG4gICAgICAgICAqXG4gICAgICAgICAqIFRoaXMgZnVuY3Rpb24gZGVhY3RpdmF0ZXMgYSBgVmlld0NvbmZpZ2AuXG4gICAgICAgICAqIEFmdGVyIGNhbGxpbmcgW1tzeW5jXV0sIGl0IHdpbGwgdW4tcGFpciBmcm9tIGFueSBgdWktdmlld2Agd2l0aCB3aGljaCBpdCBpcyBjdXJyZW50bHkgcGFpcmVkLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gdmlld0NvbmZpZyBUaGUgVmlld0NvbmZpZyB2aWV3IHRvIGRlcmVnaXN0ZXIuXG4gICAgICAgICAqL1xuICAgICAgICBWaWV3U2VydmljZS5wcm90b3R5cGUuZGVhY3RpdmF0ZVZpZXdDb25maWcgPSBmdW5jdGlvbiAodmlld0NvbmZpZykge1xuICAgICAgICAgICAgdHJhY2UudHJhY2VWaWV3U2VydmljZUV2ZW50KCc8LSBSZW1vdmluZycsIHZpZXdDb25maWcpO1xuICAgICAgICAgICAgcmVtb3ZlRnJvbSh0aGlzLl92aWV3Q29uZmlncywgdmlld0NvbmZpZyk7XG4gICAgICAgIH07XG4gICAgICAgIFZpZXdTZXJ2aWNlLnByb3RvdHlwZS5hY3RpdmF0ZVZpZXdDb25maWcgPSBmdW5jdGlvbiAodmlld0NvbmZpZykge1xuICAgICAgICAgICAgdHJhY2UudHJhY2VWaWV3U2VydmljZUV2ZW50KCctPiBSZWdpc3RlcmluZycsIHZpZXdDb25maWcpO1xuICAgICAgICAgICAgdGhpcy5fdmlld0NvbmZpZ3MucHVzaCh2aWV3Q29uZmlnKTtcbiAgICAgICAgfTtcbiAgICAgICAgVmlld1NlcnZpY2UucHJvdG90eXBlLnN5bmMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAg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gYSBwYXJlbnQgdWktdmlldyB3aGVyZTpcbiAgICAgICAgICogICAgLSB0aGUgcGFyZW50IHVpLXZpZXcncyBuYW1lIG1hdGNoZXMgdGhlIGZpcnN0IHNlZ21lbnQgKGluZGV4IDApIG9mIHRoZSBWaWV3Q29uZmlnJ3MgdGFyZ2V0IG5hbWVcbiAgICAgICAgICogICAgLSB0aGUgcGFyZW50IHVpLXZpZXcncyBjb250ZXh0IG1hdGNoZXMgdGhlIFZpZXdDb25maWcncyBhbmNob3JcbiAgICAgICAgICogLSBBbmQgdGhlIHJlbWFpbmluZyBzZWdtZW50cyAoaW5kZXggMS4ubikgb2YgdGhlIFZpZXdDb25maWcncyB0YXJnZXQgbmFtZSBtYXRjaCB0aGUgdGFpbCBvZiB0aGUgdWktdmlldydzIGZxblxuICAgICAgICAgKlxuICAgICAgICAgKiBFeGFtcGxlOlxuICAgICAgICAgKlxuICAgICAgICAgKiBET006XG4gICAgICAgICAqIDx1aS12aWV3PiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gY3JlYXRlZCBpbiB0aGUgcm9vdCBjb250ZXh0IChuYW1lOiBcIlwiKSAtLT5cbiAgICAgICAgICogICA8dWktdmlldyBuYW1lPVwiZm9vXCI+ICAgICAgICAgICAgICAgIDwhLS0gY3JlYXRlZCBpbiB0aGUgY29udGV4dCBuYW1lZDogXCJBXCIgICAgICAtLT5cbiAgICAgICAgICogICAgIDx1aS12aWV3PiAgICAgICAgICAgICAgICAgICAgPCEtLSBjcmVhdGVkIGluIHRoZSBjb250ZXh0IG5hbWVkOiBcIkEuQlwiICAgIC0tPlxuICAgICAgICAgKiAgICAgICA8dWktdmlldyBuYW1lPVwiYmFyXCI+ICAgICAgICAgICAgPCEtLSBjcmVhdGVkIGluIHRoZSBjb250ZXh0IG5hbWVkOiBcIkEuQi5DXCIgIC0tPlxuICAgICAgICAgKiAgICAgICA8L3VpLXZpZXc+XG4gICAgICAgICAqICAgICA8L3VpLXZpZXc+XG4gICAgICAgICA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hbXMgPSB0cnVlO1xuICAgICAgICAgICAgLyoqIEBpbnRlcm5hbCAqLyB0aGlzLl9pc0Nhc2VJbnNlbnNpdGl2ZSA9IGZhbHNlO1xuICAgICAgICAgICAgLyoqIEBpbnRlcm5hbCAqLyB0aGlzLl9pc1N0cmljdE1vZGUgPSB0cnVlO1xuICAgICAgICAgICAgLyoqIEBpbnRlcm5hbCAqLyB0aGlzLl9kZWZhdWx0U3F1YXNoUG9saWN5ID0gZmFsc2U7XG4gICAgICAgICAgICAvKiogQGludGVybmFsICovIHRoaXMuZGlzcG9zZSA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnBhcmFtVHlwZXMuZGlzcG9zZSgpOyB9O1xuICAgICAgICAgICAgLy8gRGVsZWdhdGUgdGhlc2UgY2FsbHMgdG8gdGhlIGN1cnJlbnQgTG9jYXRpb25Db25maWcgaW1wbGVtZW50YXRpb25cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogR2V0cyB0aGUgYmFzZSBIcmVmLCBlLmcuLCBgaHR0cDovL2xvY2FsaG9zdC9hcHByb290L2BcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBhcHBsaWNhdGlvbidzIGJhc2UgaHJlZlxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmJhc2VIcmVmID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMucm91dGVyLmxvY2F0aW9uQ29uZmlnLmJhc2VIcmVmKCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgb3Igc2V0cyB0aGUgaGFzaFByZWZpeFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFRoaXMgb25seSBhcHBsaWVzIHdoZW4gbm90IHJ1bm5pbmcgaW4gW1todG1sNU1vZGVdXSAocHVzaHN0YXRlIG1vZGUpXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogSWYgdGhlIGN1cnJlbnQgdXJsIGlzIGBodHRwOi8vbG9jYWxob3N0L2FwcCMhL3Vpcm91dGVyL3BhdGgvI2FuY2hvcmAsIGl0IHJldHVybnMgYCFgIHdoaWNoIGlzIHRoZSBwcmVmaXggZm9yIHRoZSBcImhhc2hiYW5nXCIgcG9ydGlvbi5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBoYXNoIHByZWZpeFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmhhc2hQcmVmaXggPSBmdW5jdGlvbiAobmV3cHJlZml4KSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25Db25maWcuaGFzaFByZWZpeChuZXdwcmVmaXgpOyB9O1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBob3N0LCBlLmcuLCBgbG9jYWxob3N0YFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHByb3RvY29sXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuaG9zdCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvbkNvbmZpZy5ob3N0KCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFJldHVybnMgdHJ1ZSB3aGVuIHJ1bm5pbmcgaW4gcHVzaHN0YXRlIG1vZGVcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRydWUgd2hlbiBydW5uaW5nIGluIGh0bWw1IG1vZGUgKHB1c2hzdGF0ZSBtb2RlKS5cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5odG1sNU1vZGUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25Db25maWcuaHRtbDVNb2RlKCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgd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ZWNvZGluZy5cbiAgICAgICAgICpcbiAgICAgICAgICogIyMjIyBOb3RlOiBSZWdpc3RlciBjdXN0b20gdHlwZXMgKmJlZm9yZSB1c2luZyB0aGVtKiBpbiBhIHN0YXRlIGRlZmluaXRpb24uXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLy8gRW5jb2RlIG9iamVjdCBwYXJhbWV0ZXIgYXMgSlNPTiBzdHJpbmdcbiAgICAgICAgICogdXJsU2VydmljZS5jb25maWcudHlwZSgnbXlqc29uJywge1xuICAgICAgICAgKiAgIGVuY29kZTogKG9iaikgPT4gSlNPTi5zdHJpbmdpZnkob2JqKSxcbiAgICAgICAgICogICBkZWNvZGU6IChzdHIpID0+IEpTT04ucGFyc2Uoc3RyKSxcbiAgICAgICAgICogICBpczogKHZhbCkgPT4gdHlwZW9mKHZhbCkgPT09ICdvYmplY3QnLFxuICAgICAgICAgKiAgIHBhdHRlcm46IC9bXi9dKy8sXG4gICAgICAgICAqICAgZXF1YWxzOiAoYSwgYikgPT4gXy5pc0VxdWFsKGEsIGIpLFxuICAgICAgICAgKiB9KTtcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqIFNlZSBbW1BhcmFtVHlwZURlZmluaXRpb25dXSBmb3IgbW9yZSBleGFtcGxlc1xuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gbmFtZSBUaGUgdHlwZSBuYW1lLlxuICAgICAgICAgKiBAcGFyYW0gZGVmaW5pdGlvbiBUaGUgdHlwZSBkZWZpbml0aW9uLiBTZWUgW1tQYXJhbVR5cGVEZWZpbml0aW9uXV0gZm9yIGluZm9ybWF0aW9uIG9uIHRoZSB2YWx1ZXMgYWNjZXB0ZWQuXG4gICAgICAgICAqIEBwYXJhbSBkZWZpbml0aW9uRm4gQSBmdW5jdGlvbiB0aGF0IGlzIGluamVjdGVkIGJlZm9yZSB0aGUgYXBwIHJ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aW50ZXJuYWwgKi8gcm91dGVyKSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAgICAgdGhpcy5yb3V0ZXIgPSByb3V0ZXI7XG4gICAgICAgICAgICAvKiogQGludGVybmFsICovIHRoaXMuaW50ZXJjZXB0RGVmZXJyZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogVGhlIG5lc3RlZCBbW1VybFJ1bGVzXV0gQVBJIGZvciBtYW5hZ2luZyBVUkwgcnVsZXMgYW5kIHJld3JpdGVzXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogU2VlOiBbW1VybFJ1bGVzXV0gZm9yIGRldGFpbHNcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5ydWxlcyA9IG5ldyBVcmxSdWxlcyh0aGlzLnJvdXRlcik7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFRoZSBuZXN0ZWQgW1tVcmxDb25maWddXSBBUEkgdG8gY29uZmlndXJlIHRoZSBVUkwgYW5kIHJldHJpZXZlIFVSTCBpbmZvcm1hdGlvblxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFNlZTogW1tVcmxDb25maWddXSBmb3IgZGV0YWlsc1xuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmNvbmZpZyA9IG5ldyBVcmxDb25maWcodGhpcy5yb3V0ZXIpO1xuICAgICAgICAgICAgLy8gRGVsZWdhdGUgdGhlc2UgY2FsbHMgdG8gdGhlIGN1cnJlbnQgTG9jYXRpb25TZXJ2aWNlcyBpbXBsZW1lbnRhdGlvblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBjdXJyZW50IHVybCwgb3IgdXBkYXRlcyB0aGUgdXJsXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogIyMjIEdldHRpbmcgdGhlIGN1cnJlbnQgVVJMXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogV2hlbiBubyBhcmd1bWVudHMgYXJlIHBhc3NlZCwgcmV0dXJucyB0aGUgY3VycmVudCBVUkwuXG4gICAgICAgICAgICAgKiBUaGUgVVJMIGlzIG5vcm1hbGl6ZWQgdXNpbmcgdGhlIGludGVybmFsIFtbcGF0aF1dL1tbc2VhcmNoXV0vW1toYXNoXV0gdmFsdWVzLlxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEZvciBleGFtcGxlLCB0aGUgVVJMIG1heSBiZSBzdG9yZWQgaW4gdGhlIGhhc2ggKFtbSGFzaExvY2F0aW9uU2VydmljZXNdXSkgb3JcbiAgICAgICAgICAgICAqIGhhdmUgYSBiYXNlIEhSRUYgcHJlcGVuZGVkIChbW1B1c2hTdGF0ZUxvY2F0aW9uU2VydmljZXNdXSkuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogVGhlIHJhdyBVUkwgaW4gdGhlIGJyb3dzZXIgbWlnaHQgYmU6XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKiBodHRwOi8vbXlzaXRlLmNvbS9zb21lcGF0aC9pbmRleC5odG1sIy9pbnRlcm5hbC9wYXRoLzEyMz9wYXJhbTE9Zm9vI2FuY2hvclxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogb3JcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqIGh0dHA6Ly9teXNpdGUuY29tL2Jhc2VwYXRoL2ludGVybmFsL3BhdGgvMTIzP3BhcmFtMT1mb28jYW5jaG9yXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiB0aGVuIHRoaXMgbWV0aG9kIHJldHVybnM6XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKiAvaW50ZXJuYWwvcGF0aC8xMjM/cGFyYW0xPWZvbyNhbmNob3JcbiAgICAgICAgICAgICAqIGBgYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiAjIyMjIEV4YW1wbGU6XG4gICAgICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgICAgICogbG9jYXRpb25TZXJ2aWNlcy51cmwoKTsgLy8gXCIvc29tZS9wYXRoP3F1ZXJ5PXZhbHVlI2FuY2hvclwiXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiAjIyMgVXBkYXRpbmcgdGhlIFVSTFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFdoZW4gYG5ld3VybGAgYXJndW1lbnRzIGlzIHByb3ZpZGVkLCBjaGFuZ2VzIHRoZSBVUkwgdG8gcmVmbGVjdCBgbmV3dXJsYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICAgICAqIGBgYGpzXG4gICAgICAgICAgICAgKiBsb2NhdGlvblNlcnZpY2VzLnVybChcIi9zb21lL3BhdGg/cXVlcnk9dmFsdWUjYW5jaG9yXCIsIHRydWUpO1xuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQHBhcmFtIG5ld3VybCBUaGUgbmV3IHZhbHVlIGZvciB0aGUgVVJMLlxuICAgICAgICAgICAgICogICAgICAgICAgICAgICBUaGlzIHVybCBzaG91bGQgcmVmbGVjdCBvbmx5IHRoZSBuZXcgaW50ZXJuYWwgW1twYXRoXV0sIFtbc2VhcmNoXV0sIGFuZCBbW2hhc2hdXSB2YWx1ZXMuXG4gICAgICAgICAgICAgKiAgICAgICAgICAgICAgIEl0IHNob3VsZCBub3QgaW5jbHVkZSB0aGUgcHJvdG9jb2wsIHNpdGUsIHBvcnQsIG9yIGJhc2UgcGF0aCBvZiBhbiBhYnNvbHV0ZSBIUkVGLlx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NlcnZpY2UucGF0aCgpOyB9O1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBzZWFyY2ggcGFydCBvZiB0aGUgY3VycmVudCB1cmwgYXMgYW4gb2JqZWN0XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogSWYgdGhlIGN1cnJlbnQgVVJMIGlzIGAvc29tZS9wYXRoP3F1ZXJ5PXZhbHVlI2FuY2hvcmAsIHRoaXMgcmV0dXJucyBgeyBxdWVyeTogJ3ZhbHVlJyB9YFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHNlYXJjaCAocXVlcnkpIHBvcnRpb24gb2YgdGhlIHVybCwgYXMgYW4gb2JqZWN0XG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuc2VhcmNoID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMucm91dGVyLmxvY2F0aW9uU2VydmljZS5zZWFyY2goKTsgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogR2V0cyB0aGUgaGFzaCBwYXJ0IG9mIHRoZSBjdXJyZW50IHVybFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIElmIHRoZSBjdXJyZW50IFVSTCBpcyBgL3NvbWUvcGF0aD9xdWVyeT12YWx1ZSNhbmNob3JgLCB0aGlzIHJldHVybnMgYGFuY2hvcmBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBoYXNoIChhbmNob3IpIHBvcnRpb24gb2YgdGhlIHVybFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmhhc2ggPSBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25TZXJ2aWNlLmhhc2goKTsgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogQGludGVybmFsXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICA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gICAgICpcbiAgICAgICAgICogVGhlIHBsdWdpbiBjYW4gdGhlbiBiZSBwdWJsaXNoZWQgYXMgYSBzZXBhcmF0ZSBtb2R1bGUuXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogZXhwb3J0IGNsYXNzIE15QXV0aFBsdWdpbiBpbXBsZW1lbnRzIFVJUm91dGVyUGx1Z2luIHtcbiAgICAgICAgICogICBjb25zdHJ1Y3Rvcihyb3V0ZXI6IFVJUm91dGVyLCBvcHRpb25zOiBhbnkpIHtcbiAgICAgICAgICogICAgIHRoaXMubmFtZSA9IFwiTXlBdXRoUGx1Z2luXCI7XG4gICAgICAgICAqICAgICBsZXQgJHRyYW5zaXRpb25zID0gcm91dGVyLnRyYW5zaXRpb25TZXJ2aWNlO1xuICAgICAgICAgKiAgICAgbGV0ICRzdGF0ZSA9IHJvdXRlci5zdGF0ZVNlcnZpY2U7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICBsZXQgYXV0aENyaXRlcmlhID0ge1xuICAgICAgICAgKiAgICAgICB0bzogKHN0YXRlKSA9PiBzdGF0ZS5kYXRhICYmIHN0YXRlLmRhdGEucmVxdWlyZXNBdXRoXG4gICAgICAgICAqICAgICB9O1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgZnVuY3Rpb24gYXV0aEhvb2sodHJhbnNpdGlvbjogVHJhbnNpdGlvbikge1xuICAgICAgICAgKiAgICAgICBsZXQgYXV0aFNlcnZpY2UgPSB0cmFuc2l0aW9uLmluamVjdG9yKCkuZ2V0KCdBdXRoU2VydmljZScpO1xuICAgICAgICAgKiAgICAgICBpZiAoIWF1dGhTZXJ2aWNlLmlzQXV0aGVudGljYXRlZCgpKSB7XG4gICAgICAgICAqICAgICAgICAgcmV0dXJuICRzdGF0ZS50YXJnZXQoJ2xvZ2luJyk7XG4gICAgICAgICAqICAgICAgIH1cbiAgICAgICAgICogICAgIH1cbiAgIC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4kJHN0YXRlKCkubGF6eUxvYWQ7XG4gICAgICAgIC8vIFN0b3JlL2dldCB0aGUgbGF6eSBsb2FkIHByb21pc2Ugb24vZnJvbSB0aGUgaG9va2ZuIHNvIGl0IGRvZXNuJ3QgZ2V0IHJlLWludm9rZWRcbiAgICAgICAgdmFyIHByb21pc2UgPSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICBpZiAoIXByb21pc2UpIHtcbiAgICAgICAgICAgIHZhciBzdWNjZXNzID0gZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBzdGF0ZS5sYXp5TG9hZDtcbiAgICAgICAgICAgICAgICBkZWxldGUgc3RhdGUuJCRzdGF0ZSgpLmxhenlMb2FkO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGVycm9yID0gZnVuY3Rpb24gKGVycikge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICAgICAgICAgIHJldHVybiBzZXJ2aWNlcy4kcS5yZWplY3QoZXJyKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBwcm9taXNlID0gbGF6eUxvYWRGblsnX3Byb21pc2UnXSA9IHNlcnZpY2VzLiRxXG4gICAgICAgICAgICAgICAgLndoZW4obGF6eUxvYWRGbih0cmFuc2l0aW9uLCBzdGF0ZSkpXG4gICAgICAgICAgICAgICAgLnRoZW4odXBkYXRlU3RhdGVSZWdpc3RyeSlcbiAgICAgICAgICAgICAgICAudGhlbihzdWNjZXNzLCBlcnJvcik7XG4gICAgICAgIH1cbiAgICAgICAgLyoqIFJlZ2lzdGVyIGFueSBsYXp5IGxvYWRlZCBzdGF0ZSBkZWZpbml0aW9ucyAqL1xuICAgICAgICBm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gICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uQmVmb3JlID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uU3RhcnQgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25FeGl0ID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uUmV0YWluID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uRW50ZXIgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25GaW5pc2ggPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25TdWNjZXNzID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uRXJyb3IgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBkaXNwb3NlXG4gICAgICAgICAqIEBpbnRlcm5hbFxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLmRpc3Bvc2UgPSBmdW5jdGlvbiAocm91dGVyKSB7XG4gICAgICAgICAgICB2YWx1ZXModGhpcy5fcmVnaXN0ZXJlZEhvb2tzKS5mb3JFYWNoKGZ1bmN0aW9uIChob29rc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhvb2tzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoaG9vaykge1xuICAgICAgICAgICAgICAgICAgICBob29rLl9kZXJlZ2lzdGVyZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZW1vdmVGcm9tKGhvb2tzQXJyYXksIGhvb2spO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgbmV3IFtbVHJhbnNpdGlvbl1dIG9iamVjdFxuICAgICAgICAgKlxuICAgICAgICAgKiBUaGlzIGlzIGEgZmFjdG9yeSBmdW5jdGlvbiBmb3IgY3JlYXRpbmcg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HJvdXRlcjtcbiAgICAgICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgICAgIHRoaXMuaW52YWxpZENhbGxiYWNrcyA9IFtdO1xuICAgICAgICAgICAgLyoqIEBpbnRlcm5hbCAqL1xuICAgICAgICAgICAgdGhpcy5fZGVmYXVsdEVycm9ySGFuZGxlciA9IGZ1bmN0aW9uICRkZWZhdWx0RXJyb3JIYW5kbGVyKCRlcnJvciQpIHtcbiAgICAgICAgICAgICAgICBpZiAoJGVycm9yJCBpbnN0YW5jZW9mIEVycm9yICYmICRlcnJvciQuc3RhY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkLnN0YWNrKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoJGVycm9yJCBpbnN0YW5jZW9mIFJlamVjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCRlcnJvciQudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgkZXJyb3IkLmRldGFpbCAmJiAkZXJyb3IkLmRldGFpbC5zdGFjaylcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJGVycm9yJC5kZXRhaWwuc3RhY2spO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGdldHRlcnMgPSBbJ2N1cnJlbnQnLCAnJGN1cnJlbnQnLCAncGFyYW1zJywgJ3RyYW5zaXRpb24nXTtcbiAgICAgICAgICAgIHZhciBib3VuZEZucyA9IE9iamVjdC5rZXlzKFN0YXRlU2VydmljZS5wcm90b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bXNdXVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yb3V0ZXIuZ2xvYmFscy5wYXJhbXM7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgICAgfSk7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShTdGF0ZVNlcnZpY2UucHJvdG90eXBlLCBcImN1cnJlbnRcIiwge1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBUaGUgY3VycmVudCBbW1N0YXRlRGVjbGFyYXRpb25dXVxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIFRoaXMgaXMgYSBwYXNzdGhyb3VnaCB0aHJvdWdoIHRvIFtbVUlSb3V0ZXJHbG9iYWxzLmN1cnJlbnRdXVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yb3V0ZXIuZ2xvYmFscy5jdXJyZW50O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoU3RhdGVTZXJ2aWNlLnByb3RvdHlwZSwgXCIkY3VycmVudFwiLCB7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFRoZSBjdXJyZW50IFtbU3RhdGVPYmplY3RdXSAoYW4gaW50ZXJuYWwgQVBJKVxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIFRoaXMgaXMgYSBwYXNzdGhyb3VnaCB0aHJvdWdo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AgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IHJlc3VsdDtcbiAgICAgICAgICAgICAgICAvLyBSZWNyZWF0ZSB0aGUgVGFyZ2V0U3RhdGUsIGluIGNhc2UgdGhlIHN0YXRlIGlzIG5vdyBkZWZpbmVkLlxuICAgICAgICAgICAgICAgIHRhcmdldCA9IF90aGlzLnRhcmdldCh0YXJnZXQuaWRlbnRpZmllcigpLCB0YXJnZXQucGFyYW1zKCksIHRhcmdldC5vcHRpb25zKCkpO1xuICAgICAgICAgICAgICAgIGlmICghdGFyZ2V0LnZhbGlkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJlamVjdGlvbi5pbnZhbGlkKHRhcmdldC5lcnJvcigpKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGxhdGVzdFRoaW5nKCkgIT09IGxhdGVzdCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmVqZWN0aW9uLnN1cGVyc2VkZWQoKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLnRyYW5zaXRpb25Ubyh0YXJnZXQuaWRlbnRpZmllcigpLCB0YXJnZXQucGFyYW1zKCksIHRhcmdldC5vcHRpb25zKCkpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGludm9rZU5leHRDYWxsYmFjaygpIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dENhbGxiYWNrID0gY2FsbGJhY2tRdWV1ZS5kZXF1ZXVlKCk7XG4gICAgICAgICAgICAgICAgaWYgKG5leHRDYWxsYmFjayA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmVqZWN0aW9uLmludmFsaWQodG9TdGF0ZS5lcnJvcigpKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB2YXIgY2FsbGJhY2tSZXN1bHQgPSBzZXJ2aWNlcy4kcS53aGVuKG5leHRDYWxsYmFjayh0b1N0YXRlLCBmcm9tU3RhdGUsIGluamVjdG9yKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrUmVzdWx0LnRoZW4oY2hlY2tGb3JSZWRpcmVjdCkudGhlbihmdW5jdGlvbiAocmVzdWx0KSB7IHJldHVybiByZXN1bHQgfHwgaW52b2tlTmV4dENhbGxiYWNrKCk7IH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGludm9rZU5leHRDYWxsYmFjaygpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmVnaXN0ZXJzIGFuIEludmFsaWQgU3RhdGUgaGFuZGxlclxuICAgICAgICAgKlxuICAgICAgICAgKiBSZWdpc3RlcnMgYSBbW09uSW52YWxpZENhbGxiYWNrXV0gZnVuY3Rpb24gdG8gYmUgaW52b2tlZCB3aGVuIFtbU3RhdGVTZXJ2aWNlLnRyYW5zaXRpb25Ub11dXG4gICAgICAgICAqIGhhcyBiZWVuIGNhbGxlZCB3aXRoIGFuIGludmFsaWQgc3RhdGUgcmVmZXJlbmNlIHBhcmFtZXRlclxuICAgICAgICAgKlxuICAgICAgICAgKiBFeGFtcGxlOlxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiBzdGF0ZVNlcnZpY2Uub25JbnZhbGlkKGZ1bmN0aW9uKHRvLCBmcm9tLCBpbmplY3Rvcikge1xuICAgICAgICAgKiAgIGlmICh0by5uYW1lKCkgPT09ICdmb28nKSB7XG4gICAgICAgICAqICAgICBsZXQgbGF6eUxvYWRlciA9IGluamVjdG9yLmdldCgnTGF6eUxvYWRTZXJ2aWNlJyk7XG4gICAgICAgICAqICAgICByZXR1cm4gbGF6eUxvYWRlci5sb2FkKCdmb28nKVxuICAgICAgICAgKiAgICAgICAgIC50aGVuKCgpID0+IHN0YXRlU2VydmljZS50YXJnZX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hbnNpdGlvbi5ydW4oKSBwcm9taXNlIG1heSBiZSByZWplY3RlZCBiZWNhdXNlIG9mXG4gICAgICAgICAgICAgKiBhIFJlZGlyZWN0LCBidXQgdGhlIHRyYW5zaXRpb25UbygpIHByb21pc2UgaXMgY2hhaW5lZCB0byB0aGUgbmV3IFRyYW5zaXRpb24ncyBwcm9taXNlLlxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB2YXIgcmVqZWN0ZWRUcmFuc2l0aW9uSGFuZGxlciA9IGZ1bmN0aW9uICh0cmFucykgeyByZXR1cm4gZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yIGluc3RhbmNlb2YgUmVqZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpc0xhdGVzdCA9IHJvdXRlci5nbG9iYWxzLmxhc3RTdGFydGVkVHJhbnNpdGlvbklkIDw9IHRyYW5zLiRpZDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yLnR5cGUgPT09IGV4cG9ydHMuUmVqZWN0VHlwZS5JR05PUkVEKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpc0xhdGVzdCAmJiByb3V0ZXIudXJsUm91dGVyLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29uc2lkZXIgaWdub3JlZCBgVHJhbnNpdGlvbi5ydW4oKWAgYXMgYSBzdWNjZXNzZnVsIGB0cmFuc2l0aW9uVG9gXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbihnbG9iYWxzLmN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXRhaWwgPSBlcnJvci5kZXRhaWw7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvci50eXBlID09PSBleHBvcnRzLlJlamVjdFR5cGUuU1VQRVJTRURFRCAmJiBlcnJvci5yZWRpcmVjdGVkICYmIGRldGFpbCBpbnN0YW5jZW9mIFRhcmdldFN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBgVHJhbnNpdGlvbi5ydW4oKWAgd2FzIHJlZGlyZWN0ZWQsIGFsbG93IHRoZSBgdHJhbnNpdGlvblRvKClgIHByb21pc2UgdG8gcmVzb2x2ZSBzdWNjZXNzZnVsbHlcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJ5IHJldHVybmluZyB0aGUgcHJvbWlzZSBmb3IgdGhlIG5ldyAocmVkaXJlY3QpIGBUcmFuc2l0aW9uLnJ1bigpYC5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWRpcmVjdCA9IHRyYW5zLnJlZGlyZWN0KGRldGFpbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVkaXJlY3QucnVuKCkuY2F0Y2gocmVqZWN0ZWRUcmFuc2l0aW9uSGFuZGxlcihyZWRpcmVjdCkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvci50eXBlID09PSBleHBvcnRzLlJlamVjdFR5cGUuQUJPUlRFRCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaXNMYXRlc3QgJiYgcm91dGVyLnVybFJvdXRlci51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXJ2aWNlcy4kcS5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBlcnJvckhhbmRsZXIgPSBfdGhpcy5kZWZhdWx0RXJyb3JIYW5kbGVyKCk7XG4gICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyKGVycm9yKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEucmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgIH07IH07XG4gICAgICAgICAgICB2YXIgdHJhbn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qICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogZXhwZWN0KCRzdGF0ZS5ocmVmKFwiYWJvdXQucGVyc29uXCIsIHsgcGVyc29uOiBcImJvYlwiIH0pKS50b0VxdWFsKFwiL2Fib3V0L2JvYlwiKTtcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBzdGF0ZU9yTmFtZSBUaGUgc3RhdGUgbmFtZSBvciBzdGF0ZSBvYmplY3QgeW91J2QgbGlrZSB0byBnZW5lcmF0ZSBhIHVybCBmcm9tLlxuICAgICAgICAgKiBAcGFyYW0gcGFyYW1zIEFuIG9iamVjdCBvZiBwYXJhbWV0ZXIgdmFsdWVzIHRvIGZpbGwgdGhlIHN0YXRlJ3MgcmVxdWlyZWQgcGFyYW1ldGVycy5cbiAgICAgICAgICogQHBhcmFtIG9wdGlvbnMgT3B0aW9ucyBvYmplY3QuIFRoZSBvcHRpb25zIGFyZTpcbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMge3N0cmluZ30gY29tcGlsZWQgc3RhdGUgdXJsXG4gICAgICAgICAqL1xuICAgICAgICBTdGF0ZVNlcnZpY2UucHJvdG90eXBlLmhyZWYgPSBmdW5jdGlvbiAoc3RhdGVPck5hbWUsIHBhcmFtcywgb3B0aW9ucykge1xuICAgICAgICAgICAgdmFyIGRlZmF1bHRIcmVmT3B0cyA9IHtcbiAgICAgICAgICAgICAgICBsb3NzeTogdHJ1ZSxcbiAgICAgICAgICAgICAgICBpbmhlcml0OiB0cnVlLFxuICAgICAgICAgICAgICAgIGFic29sdXRlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICByZWxhdGl2ZTogdGhpcy4kY3VycmVudCxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBvcHRpb25zID0gZGVmYXVsdHMob3B0aW9ucywgZGVmYXVsdEhyZWZPcHRzKTtcbiAgICAgICAgICAgIHBhcmFtcyA9IHBhcmFtcy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Y3Rpb24gKi9cbiAgICAgICAgcmVqZWN0OiBmdW5jdGlvbiAodmFsKSB7XG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkge1xuICAgICAgICAgICAgICAgIHJlamVjdCh2YWwpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKiBAcmV0dXJucyBhIGRlZmVycmVkIG9iamVjdCwgd2hpY2ggaGFzIGByZXNvbHZlYCBhbmQgYHJlamVjdGAgZnVuY3Rpb25zICovXG4gICAgICAgIGRlZmVyOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZGVmZXJyZWQgPSB7fTtcbiAgICAgICAgICAgIGRlZmVycmVkLnByb21pc2UgPSBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZSA9IHJlc29sdmU7XG4gICAgICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0ID0gcmVqZWN0O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gZGVmZXJyZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKiBMaWtlIFByb21pc2UuYWxsKCksIGJ1dCBhbHNvIHN1cHBvcnRzIG9iamVjdCBrZXkvcHJvbWlzZSBub3RhdGlvbiBsaWtlICRxICovXG4gICAgICAgIGFsbDogZnVuY3Rpb24gKHByb21pc2VzKSB7XG4gICAgICAgICAgICBpZiAoaXNBcnJheShwcm9taXNlcykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5hbGwocHJvbWlzZXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHByb21pc2VzKSkge1xuICAgICAgICAgICAgICAgIC8vIENvbnZlcnQgcHJvbWlzZXMgbWFwIHRvIHByb21pc2VzIGFycmF5LlxuICAgICAgICAgICAgICAgIC8vIFdoZW4gZWFjaCBwcm9taXNlIHJlc29sdmVzLCBtYXAgaXQgdG8gYSB0dXBsZSB7IGtleToga2V5LCB2YWw6IHZhbCB9XG4gICAgICAgICAgICAgICAgdmFyIGNoYWluID0gT2JqZWN0LmtleXMocHJvbWlzZXMpLm1hcChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiBwcm9taXNlc1trZXldLnRoZW4oZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gKHsga2V5OiBrZXksIHZhbDogdmFsIH0pOyB9KTsgfSk7XG4gICAgICAgICAgICAgICAgLy8gVGhlbiB3YWl0IGZvciBhbGwgcHJvbWlzZXMgdG8gcmVzb2x2ZSwgYW5kIGNvbnZlcnQgdGhlbSBiYWNrIHRvIGFuIG9iamVjdFxuICAgICAgICAgICAgICAgIHJldHVybiAkcS5hbGwoY2hhaW4pLnRoZW4oZnVuY3Rpb24gKHZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWVzLnJlZHVjZShmdW5jdGlvbiAoYWNjLCB0dXBsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWNjW3R1cGxlLmtleV0gPSB0dXBsZS52YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgICAgICB9LCB7fSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgfTtcblxuICAgIC8vIGdsb2JhbGx5IGF2YWlsYWJsZSBpbmplY3RhYmxlc1xuICAgIHZhciBnbG9iYWxzID0ge307XG4gICAgdmFyIFNUUklQX0NPTU1FTlRTID0gLygoXFwvXFwvLiokKXwoXFwvXFwqW1xcc1xcU10qP1xcKlxcLykpL2dtO1xuICAgIHZhciBBUkdVTUVOVF9OQU1FUyA9IC8oW15cXHMsXSspL2c7XG4gICAgLyoqXG4gICAgICogQSBiYXNpYyBhbmd1bGFyMS1saW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bGFjZSk7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZmlyZUFmdGVyVXBkYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2xpc3RlbmVycy5mb3JFYWNoKGZ1bmN0aW9uIChjYikgeyByZXR1cm4gY2IoeyB1cmw6IHVybCB9KTsgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGJ1aWxkVXJsKHRoaXMpO1xuICAgICAgICB9O1xuICAgICAgICBCYXNlTG9jYXRpb25TZXJ2aWNlcy5wcm90b3R5cGUub25DaGFuZ2UgPSBmdW5jdGlvbiAoY2IpIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICB0aGlzLl9saXN0ZW5lcnMucHVzaChjYik7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkgeyByZXR1cm4gcmVtb3ZlRnJvbShfdGhpcy5fbGlzdGVuZXJzLCBjYik7IH07XG4gICAgICAgIH07XG4gICAgICAgIEJhc2VMb2NhdGlvblNlcnZpY2VzLnByb3RvdHlwZS5kaXNwb3NlID0gZnVuY3Rpb24gKHJvdXRlcikge1xuICAgICAgICAgICAgZGVyZWdBbGwodGhpcy5fbGlzdGVuZXJzKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIEJhc2VMb2NhdGlvblNlcnZpY2VzO1xuICAgIH0oKSk7XG5cbiAgICB2YXIgX19leHRlbmRzID0gKHVuZGVmaW5lZCAmJiB1bmRlZmluZWQuX19leHRlbmRzKSB8fCAoZnVuY3Rpb24gKCkge1xuICAgICAgICB2YXIgZXh0ZW5kU3RhdGljcyA9IGZ1bmN0aW9uIChkLCBiKSB7XG4gICAgICAgICAgICBleHRlbmRTdGF0aWNzID0gT2JqZWN0LnNldFByb3RvdHlwZU9mIHx8XG4gICAgICAgICAgICAgICAgKHsgX19wcm90b19fOiBbXSB9IGluc3RhbmNlb2Y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HBhaXJzOiBwYWlycyxcbiAgICAgICAgYXJyYXlUdXBsZXM6IGFycmF5VHVwbGVzLFxuICAgICAgICBhcHBseVBhaXJzOiBhcHBseVBhaXJzLFxuICAgICAgICB0YWlsOiB0YWlsLFxuICAgICAgICBjb3B5OiBjb3B5LFxuICAgICAgICBfZXh0ZW5kOiBfZXh0ZW5kLFxuICAgICAgICBzaWxlbmNlVW5jYXVnaHRJblByb21pc2U6IHNpbGVuY2VVbmNhdWdodEluUHJvbWlzZSxcbiAgICAgICAgc2lsZW50UmVqZWN0aW9uOiBzaWxlbnRSZWplY3Rpb24sXG4gICAgICAgIG1ha2VTdHViOiBtYWtlU3R1YixcbiAgICAgICAgc2VydmljZXM6IHNlcnZpY2VzLFxuICAgICAgICBHbG9iOiBHbG9iLFxuICAgICAgICBjdXJyeTogY3VycnksXG4gICAgICAgIGNvbXBvc2U6IGNvbXBvc2UsXG4gICAgICAgIHBpcGU6IHBpcGUsXG4gICAgICAgIHByb3A6IHByb3AsXG4gICAgICAgIHByb3BFcTogcHJvcEVxLFxuICAgICAgICBwYXJzZTogcGFyc2UsXG4gICAgICAgIG5vdDogbm90LFxuICAgICAgICBhbmQ6IGFuZCxcbiAgICAgICAgb3I6IG9yLFxuICAgICAgICBhbGw6IGFsbCxcbiAgICAgICAgYW55OiBhbnksXG4gICAgICAgIGlzOiBpcyxcbiAgICAgICAgZXE6IGVxLFxuICAgICAgICB2YWw6IHZhbCxcbiAgICAgICAgaW52b2tlOiBpbnZva2UsXG4gICAgICAgIHBhdHRlcm46IHBhdHRlcm4sXG4gICAgICAgIGlzVW5kZWZpbmVkOiBpc1VuZGVmaW5lZCxcbiAgICAgICAgaXNEZWZpbmVkOiBpc0RlZmluZWQsXG4gICAgICAgIGlzTnVsbDogaXNOdWxsLFxuICAgICAgICBpc051bGxPclVuZGVmaW5lZDogaXNOdWxsT3JVbmRlZmluZWQsXG4gICAgICAgIGlzRnVuY3Rpb246IGlzRnVuY3Rpb24sXG4gICAgICAg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lzRGVmaW5lZChzdGF0ZVtrZXldKTsgfSkuam9pbignLCAnKSkpO1xuICAgICAgICB9XG4gICAgICAgIHZhciB2aWV3cyA9IHt9LCB2aWV3c09iamVjdCA9IHN0YXRlLnZpZXdzIHx8IHsgJGRlZmF1bHQ6IHBpY2soc3RhdGUsIGFsbFZpZXdLZXlzKSB9O1xuICAgICAgICBmb3JFYWNoKHZpZXdzT2JqZWN0LCBmdW5jdGlvbiAoY29uZmlnLCBuYW1lKSB7XG4gICAgICAgICAgICAvLyBBY2NvdW50IGZvciB2aWV3czogeyBcIlwiOiB7IHRlbXBsYXRlLi4uIH0gfVxuICAgICAgICAgICAgbmFtZSA9IG5hbWUgfHwgJyRkZWZhdWx0JztcbiAgICAgICAgICAgIC8vIEFjY291bnQgZm9yIHZpZXdzOiB7IGhlYWRlcjogXCJoZWFkZXJDb21wb25lbnRcIiB9XG4gICAgICAgICAgICBpZiAoaXNTdHJpbmcoY29uZmlnKSlcbiAgICAgICAgICAgICAgICBjb25maWcgPSB7IGNvbXBvbmVudDogY29uZmlnIH07XG4gICAgICAgICAgICAvLyBNYWtlIGEgc2hhbGxvdyBjb3B5IG9mIHRoZSBjb25maWcgb2JqZWN0XG4gICAgICAgICAgICBjb25maWcgPSBleHRlbmQoe30sIGNvbmZpZyk7XG4gICAgICAgICAgICAvLyBEbyBub3QgYWxsb3cgYSB2aWV3IHRvIG1peCBwcm9wcyBmb3IgY29tcG9uZW50LXN0eWxlIHZpZXcgd2l0aCBwcm9wcyBmb3IgdGVtcGxhdGUvY29udHJvbGxlci1zdHlsZSB2aWV3XG4gICAgICAgICAgICBpZiAoaGFzQW55S2V5KGNvbXBLZXlzLCBjb25maWcpICYmIGhhc0FueUtleShub25Db21wS2V5cywgY29uZmlnKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkNhbm5vdCBjb21iaW5lOiBcIiArIGNvbXBLZXlzLmpvaW4oJ3wnKSArIFwiIHdpdGg6IFwiICsgbm9uQ29tcEtleXMuam9pbignfCcpICsgXCIgaW4gc3RhdGV2aWV3OiAnXCIgKyBuYW1lICsgXCJAXCIgKyBzdGF0ZS5uYW1lICsgXCInXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uZmlnLnJlc29sdmVBcyA9IGNvbmZpZy5yZXNvbHZlQXMgfHwgJyRyZXNvbHZlJztcbiAgICAgICAgICAgIGNvbmZpZy4kdHlwZSA9ICduZzEnO1xuICAgICAgICAgICAgY29uZmlnLiRjb250ZXh0ID0gc3RhdGU7XG4gICAgICAgICAgICBjb25maWcuJG5hbWUgPSBuYW1lO1xuICAgICAgICAgICAgdmFyIG5vcm1hbGl6ZWQgPSBWaWV3U2VydmljZS5ub3JtYWxpemVVSVZpZXdUYXJnZXQoY29uZmlnLiRjb250ZXh0LCBjb25maWcuJG5hbWUpO1xuICAgICAgICAgICAgY29uZmlnLiR1aVZpZXdOYW1lID0gbm9ybWFsaXplZC51aVZpZXdOYW1lO1xuICAgICAgICAgICAgY29uZmlnLiR1aVZpZXdDb250ZXh0QW5jaG9yID0gbm9ybWFsaXplZC51aVZpZXdDb250ZXh0QW5jaG9yO1xuICAgICAgICAgICAgdmlld3NbbmFtZV0gPSBjb25maWc7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdmlld3M7XG4gICAgfVxuICAgIC8qKiBAaGlkZGVuICovXG4gICAgdmFyIGlkJDEgPSAwO1xuICAgIC8qKiBAaW50ZXJuYWxhcGkgKi9cbiAgICB2YXIgTmcxVmlld0NvbmZpZyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZnVuY3Rpb24gTmcxVmlld0NvbmZpZyhwYXRoLCB2aWV3RGVjbCwgZmFjdG9yeSkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHRoaXMucGF0aCA9IHBhdGg7XG4gICAgICAgICAgICB0aGlzLnZpZXdEZWNsID0gdmlld0RlY2w7XG4gICAgICAgICAgICB0aGlzLmZhY3RvcnkgPSBmYWN0b3J5O1xuICAgICAgICAgICAgdGhpcy4kaWQgPSBpZCQxKys7XG4gICAgICAgICAgICB0aGlzLmxvYWRlZCA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5nZXRUZW1wbGF0ZSA9IGZ1bmN0aW9uICh1aVZpZXcsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgID8gX3RoaXMuZmFjdG9yeS5tYWtlQ29tcG9uZW50VGVtcGxhdGUodWlWaWV3LCBjb250ZXh0LCBfdGhpcy5jb21wb25lbnQsIF90aGlzLnZpZXdEZWNsLmJpbmRpbmdzKVxuICAgICAgICAgICAgICAgICAgICA6IF90aGlzLnRlbXBsYXRlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBOZzFWaWV3Q29uZmlnLnByb3RvdHlwZS5sb2FkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHZhciAkcSA9IHNlcnZpY2VzLiRxO1xuICAgICAgICAgICAgdmFyIGNvbnRleHQgPSBuZXcgUmVzb2x2ZUNvbnRleHQodGhpcy5wYXRoKTtcbiAgICAgICAgICAgIHZhciBwYXJhbXMgPSB0aGlzLnBhdGgucmVkdWNlKGZ1bmN0aW9uIChhY2MsIG5vZGUpIHsgcmV0dXJuIGV4dGVuZChhY2MsIG5vZGUucGFyYW1WYWx1ZXMpOyB9LCB7fSk7XG4gICAgICAgICAgICB2YXIgcHJvbWlzZXMgPSB7XG4gICAgICAgICAgICAgICAgdGVtcGxhdGU6ICRxLndoZW4odGhpcy5mYWN0b3J5LmZyb21Db25maWcodGhpcy52aWV3RGVjbCwgcGFyYW1zLCBjb250ZXh0KSksXG4gICAgICAgICAgICAgICAgY29udHJvbGxlcjogJHEud2hlbih0aGlzLmdldENvbnRyb2xsZXIoY29udGV4dCkpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiAkcS5hbGwocHJvbWlzZXMpLnRoZW4oZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVZpZXdTZXJ2aWNlRXZlbnQoJ0xvYWRlZCcsIF90aGlzKTtcbiAgICAgICAgICAgICAgICBfdGhpcy5jb250cm9sbGVyID0gcmVzdWx0cy5jb250cm9sbGVyO1xuICAgICAgICAgICAgICAgIGV4dGVuZChfdGhpcywgcmVzdWx0cy50ZW1wbGF0ZSk7IC8vIEVpdGhlciB7IHRlbXBsYXRlOiBcInRwbFwiIH0gb3IgeyBjb21wb25lbnQ6IFwiY21wTmFtZVwiIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdldHMgdGhlIGNvbnRyb2xsZXIgZm9yIGEgdmlldyBjb25maWd1cmF0aW9uLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb258UHJvbWlzZS48RnVuY3Rpb24+fSBSZXR1cm5zIGEgY29udHJvbGxlciwgb3IgYSBwcm9taXNlIHRoYXQgcmVzb2x2ZXMgdG8gYSBjb250cm9sbGVyLlxuICAgICAgICAgKi9cbiAgICAgICAgTmcxVmlld0NvbmZpZy5wcm90b3R5cGUuZ2V0Q29udHJvbGxlciA9IGZ1bmN0aW9uIChjb250ZXh0KSB7XG4gICAgICAgICAgICB2YXIgcHJvdmlkZXIgPSB0aGlzLnZpZXdEZWNsLmNvbnRyb2xsZXJQcm92aWRlcjtcbiAgICAgICAgICAgIGlmICghaXNJbmplY3RhYmxlKHByb3ZpZGVyKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy52aWV3RGVjbC5jb250cm9sbGVyO1xuICAgICAgICAgICAgdmFyIGRlc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mZpZy50ZW1wbGF0ZVVybClcbiAgICAgICAgICAgICAgICAgICAgPyBhc1RlbXBsYXRlKHRoaXMuZnJvbVVybChjb25maWcudGVtcGxhdGVVcmwsIHBhcmFtcykpXG4gICAgICAgICAgICAgICAgICAgIDogaXNEZWZpbmVkKGNvbmZpZy50ZW1wbGF0ZVByb3ZpZGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBhc1RlbXBsYXRlKHRoaXMuZnJvbVByb3ZpZGVyKGNvbmZpZy50ZW1wbGF0ZVByb3ZpZGVyLCBwYXJhbXMsIGNvbnRleHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBpc0RlZmluZWQoY29uZmlnLmNvbXBvbmVudClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFzQ29tcG9uZW50KGNvbmZpZy5jb21wb25lbnQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBpc0RlZmluZWQoY29uZmlnLmNvbXBvbmVudFByb3ZpZGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFzQ29tcG9uZW50KHRoaXMuZnJvbUNvbXBvbmVudFByb3ZpZGVyKGNvbmZpZy5jb21wb25lbnRQcm92aWRlciwgcGFyYW1zLCBjb250ZXh0KSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBhc1RlbXBsYXRlKGRlZmF1bHRUZW1wbGF0ZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgdGVtcGxhdGUgZnJvbSBhIHN0cmluZyBvciBhIGZ1bmN0aW9uIHJldHVybmluZyBhIHN0cmluZy5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHRlbXBsYXRlIGh0bWwgdGVtcGxhdGUgYXMgYSBzdHJpbmcgb3IgZnVuY3Rpb24gdGhhdCByZXR1cm5zIGFuIGh0bWwgdGVtcGxhdGUgYXMgYSBzdHJpbmcuXG4gICAgICAgICAqIEB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PSBmdW5jdGlvbiAodXJsLCBwYXJhbXMpIHtcbiAgICAgICAgICAgIGlmIChpc0Z1bmN0aW9uKHVybCkpXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsKHBhcmFtcyk7XG4gICAgICAgICAgICBpZiAodXJsID09IG51bGwpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICBpZiAodGhpcy5fdXNlSHR0cCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiRodHRwXG4gICAgICAgICAgICAgICAgICAgIC5nZXQodXJsLCB7IGNhY2hlOiB0aGlzLiR0ZW1wbGF0ZUNhY2hlLCBoZWFkZXJzOiB7IEFjY2VwdDogJ3RleHQvaHRtbCcgfSB9KVxuICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmRhdGE7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy4kdGVtcGxhdGVSZXF1ZXN0KHVybCk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgdGVtcGxhdGUgYnkgaW52b2tpbmcgYW4gaW5qZWN0YWJsZSBwcm92aWRlciBmdW5jdGlvbi5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHByb3ZpZGVyIEZ1bmN0aW9uIHRvIGludm9rZSB2aWEgYGxvY2Fsc2BcbiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaW5qZWN0Rm4gYSBmdW5jdGlvbiB1c2VkIHRvIGludm9rZSB0aGUgdGVtcGxhdGUgcHJvdmlkZXJcbiAgICAgICAgICogQHJldHVybiB7c3RyaW5nfFByb21pc2UuPHN0cmluZz59IFRoZSB0ZW1wbGF0ZSBodG1sIGFzIGEgc3RyaW5nLCBvciBhIHByb21pc2Vcbi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lbnQoc3RhdGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgIGFuZ3VsYXIuZm9yRWFjaCh2aWV3cywgZnVuY3Rpb24gKGNvbmZpZywgbmFtZSkge1xuICAgICAgICAgKiAgICAgbGV0IGF1dG9OYW1lID0gKHN0YXRlLm5hbWUgKyAnLicgKyBuYW1lKS5yZXBsYWNlKCcuJywgJy8nKTtcbiAgICAgICAgICogICAgIGNvbmZpZy50ZW1wbGF0ZVVybCA9IGNvbmZpZy50ZW1wbGF0ZVVybCB8fCAnL3BhcnRpYWxzLycgKyBhdXRvTmFtZSArICcuaHRtbCc7XG4gICAgICAgICAqICAgICByZXN1bHRbbmFtZV0gPSBjb25maWc7XG4gICAgICAgICAqICAgfSk7XG4gICAgICAgICAqICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICogfSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICRzdGF0ZVByb3ZpZGVyLnN0YXRlKCdob21lJywge1xuICAgICAgICAgKiAgIHZpZXdzOiB7XG4gICAgICAgICAqICAgICAnY29udGFjdC5saXN0JzogeyBjb250cm9sbGVyOiAnTGlzdENvbnRyb2xsZXInIH0sXG4gICAgICAgICAqICAgICAnY29udGFjdC5pdGVtJzogeyBjb250cm9sbGVyOiAnSXRlbUNvbnRyb2xsZXInIH1cbiAgICAgICAgICogICB9XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLy8gQXV0by1wb3B1bGF0ZXMgbGlzdCBhbmQgaXRlbSB2aWV3cyB3aXRoIC9wYXJ0aWFscy9ob21lL2NvbnRhY3QvbGlzdC5odG1sLFxuICAgICAgICAgKiAvLyBhbmQgL3BhcnRpYWxzL2hvbWUvY29udGFjdC9pdGVtLmh0bWwsIHJlc3BlY3RpdmVseS5cbiAgICAgICAgICogJHN0YXRlLmdvKCdob21lJyk7XG4gICAgICAgICAqIGBgYFx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tcbiAgICAgICAgICAgIHRoaXMucm91dGVyLnVybFNlcnZpY2UucnVsZXMucnVsZShydWxlKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogRGVmaW5lcyB0aGUgcGF0aCBvciBiZWhhdmlvciB0byB1c2Ugd2hlbiBubyB1cmwgY2FuIGJlIG1hdGNoZWQuXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogdmFyIGFwcCA9IGFuZ3VsYXIubW9kdWxlKCdhcHAnLCBbJ3VpLnJvdXRlci5yb3V0ZXInXSk7XG4gICAgICAgICAqXG4gICAgICAgICAqIGFwcC5jb25maWcoZnVuY3Rpb24gKCR1cmxSb3V0ZXJQcm92aWRlcikge1xuICAgICAgICAgKiAgIC8vIGlmIHRoZSBwYXRoIGRvZXNuJ3QgbWF0Y2ggYW55IG9mIHRoZSB1cmxzIHlvdSBjb25maWd1cmVkXG4gICAgICAgICAqICAgLy8gb3RoZXJ3aXNlIHdpbGwgdGFrZSBjYXJlIG9mIHJvdXRpbmcgdGhlIHVzZXIgdG8gdGhlXG4gICAgICAgICAqICAgLy8gc3BlY2lmaWVkIHVybFxuICAgICAgICAgKiAgICR1cmxSb3V0ZXJQcm92aWRlci5vdGhlcndpc2UoJy9pbmRleCcpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgIC8vIEV4YW1wbGUgb2YgdXNpbmcgZnVuY3Rpb24gcnVsZSBhcyBwYXJhbVxuICAgICAgICAgKiAgICR1cmxSb3V0ZXJQcm92aWRlci5vdGhlcndpc2UoZnVuY3Rpb24gKCRpbmplY3RvciwgJGxvY2F0aW9uKSB7XG4gICAgICAgICAqICAgICByZXR1cm4gJy9hL3ZhbGlkL3VybCc7XG4gICAgICAgICAqICAgfSk7XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbi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9uIGAkdWlSb3V0ZXJQcm92aWRlcmAgdG8gdHJpZ2dlciBpbml0ICh3aGVuIG5nIGVudGVycyBydW50aW1lKVxuICAgIHJ1bkJsb2NrLiRpbmplY3QgPSBbJyRpbmplY3RvcicsICckcScsICckdWlSb3V0ZXInXTtcbiAgICBmdW5jdGlvbiBydW5CbG9jaygkaW5qZWN0b3IsICRxLCAkdWlSb3V0ZXIpIHtcbiAgICAgICAgc2VydmljZXMuJGluamVjdG9yID0gJGluamVjdG9yO1xuICAgICAgICBzZXJ2aWNlcy4kcSA9ICRxO1xuICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci11aS91aS1yb3V0ZXIvaXNzdWVzLzM2NzhcbiAgICAgICAgaWYgKCFPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoJGluamVjdG9yLCAnc3RyaWN0RGknKSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAkaW5qZWN0b3IuaW52b2tlKGZ1bmN0aW9uIChjaGVja1N0cmljdERpKSB7IH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgJGluamVjdG9yLnN0cmljdERpID0gISEvc3RyaWN0IG1vZGUvLmV4ZWMoZXJyb3IgJiYgZXJyb3IudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gVGhlICRpbmplY3RvciBpcyBub3cgYXZhaWxhYmxlLlxuICAgICAgICAvLyBGaW5kIGFueSByZXNvbHZhYmxlcyB0aGF0IGhhZCBkZXBlbmRlbmN5IGFubm90YXRpb24gZGVmZXJyZWRcbiAgICAgICAgJHVpUm91dGVyLnN0YXRlUmVnaXN0cnlcbiAgICAgICAgICAgIC5nZXQoKVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4geC4kJHN0YXRlKCkucmVzb2x2YWJ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oZSBzdGF0ZSBoYXMgbm8gVVJMLCBpZ25vcmUgb25lIHByZXZlbnREZWZhdWx0IGZyb20gdGhlIDxhPiBkaXJlY3RpdmUuXG4gICAgICAgICAgICAgICAgdmFyIGlnbm9yZVByZXZlbnREZWZhdWx0Q291bnRfMSA9IHR5cGUuaXNBbmNob3IgJiYgIXRhcmdldC5ocmVmID8gMSA6IDA7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlnbm9yZVByZXZlbnREZWZhdWx0Q291bnRfMS0tIDw9IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dC5jYW5jZWwodHJhbnNpdGlvbl8xKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH1cbiAgICAvKiogQGhpZGRlbiAqL1xuICAgIGZ1bmN0aW9uIGRlZmF1bHRPcHRzKGVsLCAkc3RhdGUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHJlbGF0aXZlOiBzdGF0ZUNvbnRleHQoZWwpIHx8ICRzdGF0ZS4kY3VycmVudCxcbiAgICAgICAgICAgIGluaGVyaXQ6IHRydWUsXG4gICAgICAgICAgICBzb3VyY2U6ICdzcmVmJyxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiBiaW5kRXZlbnRzKGVsZW1lbnQsIHNjb3BlLCBob29rRm4sIHVpU3RhdGVPcHRzKSB7XG4gICAgICAgIHZhciBldmVudHM7XG4gICAgICAgIGlmICh1aVN0YXRlT3B0cykge1xuICAgICAgICAgICAgZXZlbnRzID0gdWlTdGF0ZU9wdHMuZXZlbnRzO1xuICAgICAgICB9XG4gICAgICAgIGlmICghaXNBcnJheShldmVudHMpKSB7XG4gICAgICAgICAgICBldmVudHMgPSBbJ2NsaWNrJ107XG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gPSBmdW5jdGlvbiAoKSB7IHJldHVybiBwcm9jZXNzZWREZWYoJHN0YXRlLCBlbGVtZW50LCByYXdEZWYpOyB9O1xuICAgICAgICAgICAgICAgICAgICB2YXIgcmVmID0gcGFyc2VTdGF0ZVJlZihhdHRycy51aVNyZWYpO1xuICAgICAgICAgICAgICAgICAgICByYXdEZWYudWlTdGF0ZSA9IHJlZi5zdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgcmF3RGVmLnVpU3RhdGVPcHRzID0gYXR0cnMudWlTcmVmT3B0cyA/IHNjb3BlLiRldmFsKGF0dHJzLnVpU3JlZk9wdHMpIDoge307XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWYgPSBnZXREZWYoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bmxpbmtJbmZvRm4pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5saW5rSW5mb0ZuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aXZlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGlua0luZm9GbiA9IGFjdGl2ZS4kJGFkZFN0YXRlSW5mbyhkZWYudWlTdGF0ZSwgZGVmLnVpU3RhdGVQYXJhbXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlZi5ocmVmICE9IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnMuJHNldCh0eXBlLmF0dHIsIGRlZi5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAocmVmLnBhcmFtRXhwcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuJHdhdGNoKHJlZi5wYXJhbUV4cHIsIGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdEZWYudWlTdGF0ZVBhcmFtcyA9IGV4dGVuZCh7fSwgdmFsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmF3RGVmLnVpU3RhdGVQYXJhbXMgPSBleHRlbmQoe30sIHNjb3BlLiRldmFsKHJlZi5wYXJhbUV4cHIpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuJG9uKCckZGVzdHJveScsICR1aVJvdXRlci5zdGF0ZVJlZ2lzdHJ5Lm9uU3RhdGVzQ2hhbmdlZCh1cGRhdGUpKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuJG9uKCckZGVzdHJveScsICR1aVJvdXRlci50cmFuc2l0aW9uU2VydmljZS5vblN1Y2Nlc3Moe30sIHVwZGF0ZSkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXR5cGUuY2xpY2thYmxlKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaG9va0ZuID0gY2xpY2tIb29rKGVsZW1lbnQsICRzdGF0ZSwgJHRpbWVvdXQsIHR5cGUsIGdldERlZik7XG4gICAgICAgICAgICAgICAgICAgIGJpbmRFdmVudHMoZWxlbWVudCwgc2NvcGUsIGhvb2tGbiwgcmF3RGVmLnVpU3RhdGVPcHRzKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSxcbiAgICBdO1xuICAgIC8qKlxuICAgICAqIGB1aS1zdGF0ZWA6IEEgZnVsbHkgZHluYW1pYyBkaXJlY3RpdmUgZm9yIGxpbmtpbmcgdG8gYSBzdGF0ZVxuICAgICAqXG4gICAgICogQSBkaXJlY3RpdmUgd2hpY2ggbGlua3MgdG8gYSBzdGF0ZSAoYW5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gIGxpbms6IGZ1bmN0aW9uIChzY29wZSwgZWxlbWVudCwgYXR0cnMsIHVpU3JlZkFjdGl2ZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IGdldFR5cGVJbmZvKGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgYWN0aXZlID0gdWlTcmVmQWN0aXZlWzFdIHx8IHVpU3JlZkFjdGl2ZVswXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVubGlua0luZm9GbiA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHZhciBob29rRm47XG4gICAgICAgICAgICAgICAgICAgIHZhciByYXdEZWYgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGdldERlZiA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHByb2Nlc3NlZERlZigkc3RhdGUsIGVsZW1lbnQsIHJhd0RlZik7IH07XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbnB1dEF0dHJzID0gWyd1aVN0YXRlJywgJ3VpU3RhdGVQYXJhbXMnLCAndWlTdGF0ZU9wdHMnXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHdhdGNoRGVyZWdGbnMgPSBpbnB1dEF0dHJzLnJlZHVjZShmdW5jdGlvbiAoYWNjLCBhdHRyKSB7IHJldHVybiAoKGFjY1thdHRyXSA9IG5vb3ApLCBhY2MpOyB9LCB7fSk7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWYgPSBnZXREZWYoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bmxpbmtJbmZvRm4pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5saW5rSW5mb0ZuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aXZlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGlua0luZm9GbiA9IGFjdGl2ZS4kJGFkZFN0YXRlSW5mbyhkZWYudWlTdGF0ZSwgZGVmLnVpU3RhdGVQYXJhbXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlZi5ocmVmICE9IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnMuJHNldCh0eXBlLmF0dHIsIGRlZi5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpbnB1dEF0dHJzLmZvckVhY2goZnVuY3Rpb24gKGZpZWxkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByYXdEZWZbZmllbGRdID0gYXR0cnNbZmllbGRdID8gc2NvcGUuJGV2YWwoYXR0cnNbZmllbGRdKSA6IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRycy4kb2JzZXJ2ZShmaWVsZCwgZnVuY3Rpb24gKGV4cHIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YXRjaERlcmVnRm5zW2ZpZWxkXSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhdGNoRGVyZWdGbnNbZmllbGRdID0gc2NvcGUuJHdhdGNoKGV4cHIsIGZ1bmN0aW9uIChuZXd2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3RGVmW2ZpZWxkXSA9IG5ld3ZhbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS4kb24oJyRkZXN0cm95JywgJHVpUm91dGVyLnN0YXRlUmVnaXN0cnkub25TdGF0ZXNDaGFuZ2VkKHVwZGF0ZSkpO1xuICAgICAgICAgICAgICA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dmVEaXJlY3RpdmUoJHN0YXRlLCAkc3RhdGVQYXJhbXMsICRpbnRlcnBvbGF0ZSwgJHVpUm91dGVyKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnQScsXG4gICAgICAgICAgICAgICAgY29udHJvbGxlcjogW1xuICAgICAgICAgICAgICAgICAgICAnJHNjb3BlJyxcbiAgICAgICAgICAgICAgICAgICAgJyRlbGVtZW50JyxcbiAgICAgICAgICAgICAgICAgICAgJyRhdHRycycsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgkc2NvcGUsICRlbGVtZW50LCAkYXR0cnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0ZXMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3RpdmVFcUNsYXNzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVpU3JlZkFjdGl2ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZXJlIHByb2JhYmx5IGlzbid0IG11Y2ggcG9pbnQgaW4gJG9ic2VydmluZyB0aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1aVNyZWZBY3RpdmUgYW5kIHVpU3JlZkFjdGl2ZUVxIHNoYXJlIHRoZSBzYW1lIGRpcmVjdGl2ZSBvYmplY3Qgd2l0aCBzb21lXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzbGlnaHQgZGlmZmVyZW5jZSBpbiBsb2dpYyByb3V0aW5nXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVFcUNsYXNzID0gJGludGVycG9sYXRlKCRhdHRycy51aVNyZWZBY3RpdmVFcSB8fCAnJywgZmFsc2UpKCRzY29wZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVpU3JlZkFjdGl2ZSA9ICRzY29wZS4kZXZhbCgkYXR0cnMudWlTcmVmQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRG8gbm90aGluZy4gdWlTcmVmQWN0aXZlIGlzIG5vdCBhIHZhbGlkIGV4cHJlc3Npb24uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmFsbCBiYWNrIHRvIHVzaW5nICRpbnRlcnBvbGF0ZSBiZWxvd1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdWlTcmVmQWN0aXZlID0gdWlTcmVmQWN0aXZlIHx8ICRpbnRlcnBvbGF0ZSgkYXR0cnMudWlTcmVmQWN0aXZlIHx8ICcnLCBmYWxzZSkoJHNjb3BlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0YXRlc0Zyb21EZWZpbml0aW9uT2JqZWN0KHVpU3JlZkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBbGxvdyB1aVNyZWYgdG8gY29tbXVuaWNhdGUgd2l0aCB1aVNyZWZBY3RpdmVbRXF1YWxzXVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy4kJGFkZFN0YXRlSW5mbyA9IGZ1bmN0aW9uIChuZXdTdGF0ZSwgbmV3UGFyYW1zKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2UgYWxyZWFkeSBnb3QgYW4gZXhwbGljaXQgc3RhdGUgcHJvdmlkZWQgYnkgdWktc3JlZi1hY3RpdmUsIHNvIHdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hhZG93IHRoZSBvbmUgdGhhdCBjb21lcyBmcm9tIHVpLXNyZWZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNPYmplY3QodWlTcmVmQWN0aXZlKSAmJiBzdGF0ZXMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXJlZ2lzdGVyID0gYWRkU3RhdGUobmV3U3RhdGUsIG5ld1BhcmFtcywgdWlTcmVmQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVyZWdpc3RlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB1cGRhdGVBZnRlclRyYW5zaXRpb24odHJhbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFucy5wcm9taXNlLnRoZW4odXBkYXRlLCBub29wKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICRzY29wZS4kb24oJyRkZXN0cm95Jywgc2V0dXBFdmVudExpc3RlbmVycygpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkdWlSb3V0ZXIuZ2xvYmFscy50cmFuc2l0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlQWZ0ZXJUcmFuc2l0aW9uKCR1aVJvdXRlci5nbG9iYWxzLnRyYW5zaXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0dXBFdmVudExpc3RlbmVycygpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVyZWdpc3RlclN0YXRlc0NoYW5nZWRMaXN0ZW5lciA9ICR1aVJvdXRlci5zdGF0ZVJlZ2lzdHJ5Lm9uU3RhdGVzQ2hhbmdlZChoYW5kbGVTdGF0ZXNDaGFuZ2VkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVyZWdpc3Rlck9uU3RhcnRMaXN0ZW5lciA9ICR1aVJvdXRlci50cmFuc2l0aW9uU2VydmljZS5vblN0YXJ0KHt9LCB1cGRhdGVBZnRlclRyYW5zaXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXJlZ2lzdGVyU3RhdGVDaGFuZ2VTdWNjZXNzTGlzdGVuZXIgPSAkc2NvcGUuJG9uKCckc3RhdGVDaGFuZ2VTdWNjZXNzJywgdXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gY2xlYW5VcCgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVyZWdpc3RlclN0YXRlc0NoYW5nZWRMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXJlZ2lzdGVyT25TdGFydExpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcmVnaXN0ZXJTdGF0ZUNoYW5nZVN1Y2Nlc3NMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBoYW5kbGVTdGF0ZXNDaGFuZ2VkKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0YXRlc0Zyb21EZWZpbml0aW9uT2JqZWN0KHVpU3JlZkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBzZXRTdGF0ZXNGcm9tRGVmaW5pdGlvbk9iamVjdChzdGF0ZXNEZWZpbml0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHN0YXRlc0RlZmluaXRpb24pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JFYWNoKHN0YXRlc0RlZmluaXRpb24sIGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSwgYWN0aXZlQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhlbHBlciBmdW5jdGlvbiB0byBhYnN0cmFjdCBhZGRpbmcgc3RhdGUuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWRkU3RhdGVGb3JDbGFzcyA9IGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSwgYWN0aXZlQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVmID0gcGFyc2VTdGF0ZVJlZihzdGF0ZU9yTmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkU3RhdGUocmVmLnN0YXRlLCAkc2NvcGUuJGV2YWwocmVmLnBhcmFtRXhwciksIGFjdGl2ZUNsYXNzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNTdHJpbmcoc3RhdGVPck5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgc3RhdGUgaXMgc3RyaW5nLCBqdXN0IGFkZCBpdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRTdGF0ZUZvckNsYXNzKHN0YXRlT3JOYW1lLCBhY3RpdmVDbGFzcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChpc0FycmF5KHN0YXRlT3JOYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHN0YXRlIGlzIGFuIGFycmF5LCBpdGVyYXRlIG92ZXIgaXQgYW5kIGFkZCBlYWNoIGFycmF5IGl0ZW0gaW5kaXZpZHVhbGx5LlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvckVhY2goc3RhdGVPck5hbWUsIGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRTdGF0ZUZvckNsYXNzKHN0YXRlT3JOYW1lLCBhY3RpdmVDbGFzcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkZFN0YXRlKHN0YXRlTmFtZSwgc3RhdGVQYXJhbXMsIGFjdGl2ZUNsYXNzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlID0gJHN0YXRlLmdldChzdGF0ZU5hbWUsIHN0YXRlQ29udGV4dCgkZWxlbWVudCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0ZUluZm8gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlOiBzdGF0ZSB8fCB7IG5hbWU6IHN0YXRlTmFtZSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHN0YXRlUGFyYW1zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVDbGFzczogYWN0aXZlQ2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZXMucHVzaChzdGF0ZUluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiByZW1vdmVTdGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlRnJvbShzdGF0ZXMpKHN0YXRlSW5mbyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSByb3V0ZSBzdGF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gdXBkYXRlKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzcGxpdENsYXNzZXMgPSBmdW5jdGlvbiAoc3RyKSB7IHJldHVybiBzdHIuc3BsaXQoL1xccy8pLmZpbHRlcihpZGVudGl0eSk7IH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGdldENsYXNzZXMgPSBmdW5jdGlvbiAoc3RhdGVMaXN0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZUxpc3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHgpIHsgcmV0dXJuIHguYWN0aXZlQ2xhc3M7IH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKHNwbGl0Q2xhc3NlcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFsbENsYXNzZXMgPSBnZXRDbGFzc2VzKHN0YXRlcykuY29uY2F0KHNwbGl0Q2xhc3NlcyhhY3RpdmVFcUNsYXN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iB1aS12aWV3PVwibWFpblwiPjwvZGl2PlxuICAgICAqIGBgYFxuICAgICAqXG4gICAgICogYGBganNcbiAgICAgKiAkc3RhdGVQcm92aWRlci5zdGF0ZShcImhvbWVcIiwge1xuICAgICAqICAgdmlld3M6IHtcbiAgICAgKiAgICAgXCJtYWluXCI6IHtcbiAgICAgKiAgICAgICB0ZW1wbGF0ZTogXCI8aDE+SEVMTE8hPC9oMT5cIlxuICAgICAqICAgICB9XG4gICAgICogICB9XG4gICAgICogfSlcbiAgICAgKiBgYGBcbiAgICAgKlxuICAgICAqIFJlYWxseSB0aG91Z2gsIHlvdSdsbCB1c2Ugdmlld3MgdG8gc2V0IHVwIG11bHRpcGxlIHZpZXdzOlxuICAgICAqXG4gICAgICogYGBgaHRtbFxuICAgICAqIDxkaXYgdWktdmlldz48L2Rpdj5cbiAgICAgKiA8ZGl2IHVpLXZpZXc9XCJjaGFydFwiPjwvZGl2PlxuICAgICAqIDxkaXYgdWktdmlldz1cImRhdGFcIj48L2Rpdj5cbiAgICAgKiBgYGBcbiAgICAgKlxuICAgICAqIGBgYGpzXG4gICAgICogJHN0YXRlUHJvdmlkZXIuc3RhdGUoXCJob21lXCIsIHtcbiAgICAgKiAgIHZpZXdzOiB7XG4gICAgICogICAgIFwiXCI6IHtcbiAgICAgKiAgICAgICB0ZW1wbGF0ZTogXCI8aDE+SEVMTE8hPC9oMT5cIlxuICAgICAqICAgICB9LFxuICAgICAqICAgICBcImNoYXJ0XCI6IHtcbiAgICAgKiAgICAgICB0ZW1wbGF0ZTogXCI8Y2hhcnRfdGhpbmcvPlwiXG4gICAgICogICAgIH0sXG4gICAgICogICAgIFwiZGF0YVwiOiB7XG4gICAgICogICAgICAgdGVtcGxhdGU6IFwiPGRhdGFfdGhpbmcvPlwiXG4gICAgICogICAgIH1cbiAgICAgKiAgIH1cbiAgICAgKiB9KVxuICAgICAqIGBgYFxuICAgICAqXG4gICAgICogIyMjIyBFeGFtcGxlcyBmb3IgYGF1dG9zY3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ICAgICAgaWYgKG5nLnZlcnNpb24ubWlub3IgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGFuaW1hdGUuZW50ZXIoZWxlbWVudCwgbnVsbCwgdGFyZ2V0KS50aGVuKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmVudGVyKGVsZW1lbnQsIG51bGwsIHRhcmdldCwgY2IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBsZWF2ZTogZnVuY3Rpb24gKGVsZW1lbnQsIGNiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmcudmVyc2lvbi5taW5vciA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYW5pbWF0ZS5sZWF2ZShlbGVtZW50KS50aGVuKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmxlYXZlKGVsZW1lbnQsIGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29uZmlnc0VxdWFsKGNvbmZpZzEsIGNvbmZpZzIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnMSA9PT0gY29uZmlnMjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByb290RGF0YSA9IHtcbiAgICAgICAgICAgICAgICAkY2ZnOiB7IHZpZXdEZWNsOiB7ICRjb250ZXh0OiAkdmlldy5fcGx1Z2luYXBpLl9yb290Vmlld0NvbnRleHQoKSB9IH0sXG4gICAgICAgICAgICAgICAgJHVpVmlldzoge30sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGRpcmVjdGl2ZSA9IHtcbiAgICAgICAgICAgICAgICBjb3VudDogMCxcbiAgICAgICAgICAgICAgICByZXN0cmljdDogJ0VDQScsXG4gICAgICAgICAgICAgICAgdGVybWluYWw6IHRydWUsXG4gICAgICAgICAgICAgICAgcHJpb3JpdHk6IDQwMCxcbiAgICAgICAgICAgICAgICB0cmFuc2NsdWRlOiAnZWxlbWVudCcsXG4gICAgICAgICAgICAgICAgY29tcGlsZTogZnVuY3Rpb24gKHRFbGVtZW50LCB0QXR0cnMsICR0cmFuc2NsdWRlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2NvcGUsICRlbGVtZW50LCBhdHRycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9ubG9hZEV4cCA9IGF0dHJzWydvbmxvYWQnXSB8fCAnJywgYXV0b1Njcm9sbEV4cCA9IGF0dHJzWydhdXRvc2Nyb2xsJ10sIHJlbmRlcmVyID0gZ2V0UmVuZGVyZXIoKSwgaW5oZXJpdGVkID0gJGVsZW1lbnQuaW5oZXJpdGVkRGF0YSgnJHVpVmlldycpIHx8IHJvb3REYXRhLCBuYW1lID0gJGludGVycG9sYXRlKGF0dHJzWyd1aVZpZXcnXSB8fCBhdHRyc1snbmFtZSddIHx8ICcnKShzY29wZSkgfHwgJyRkZWZhdWx0JztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwcmV2aW91c0VsLCBjdXJyZW50RWwsIGN1cnJlbnRTY29wZSwgdmlld0NvbmZpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3RpdmVVSVZpZXcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHR5cGU6ICduZzEnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkaXJlY3RpdmUuY291bnQrKyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZxbjogaW5oZXJpdGVkLiR1aVZpZXcuZnFuID8gaW5oZXJpdGVkLiR1aVZpZXcuZnFuICsgJy4nICsgbmFtZSA6IG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ1VwZGF0ZWQ6IGNvbmZpZ1VwZGF0ZWRDYWxsYmFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXQgY3JlYXRpb25Db250ZXh0KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgY29udGV4dCBpbiB3aGljaCB0aGlzIHVpLXZpZXcgXCJ0YWdcIiB3YXMgY3JlYXRlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZnJvbVBhcmVudFRhZ0NvbmZpZyA9IHBhcnNlKCckY2ZnLnZpZXdEZWNsLiRjb250ZXh0JykoaW5oZXJpdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWxsb3cgPHVpLXZpZXcgbmFtZT1cImZvb1wiPjx1aS12aWV3IG5hbWU9XCJiYXJcIj48L3VpLXZpZXc+PC91aS12aWV3PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTZWUgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXItdWkvdWktcm91dGVyL2lzc3Vlcy8zMzU1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmcm9tUGFyZW50VGFnID0gcGFyc2UoJyR1aVZpZXcuY3JlYXRpb25Db250ZXh0JykoaW5oZXJpdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZyb21QYXJlbnRUYWdDb25maWcgfHwgZnJvbVBhcmVudFRhZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RXZlbnQoJ0xpbmtpbmcnLCBhY3RpdmVVSVZpZXcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY29uZmlnVXBkYXRlZENhbGxiYWNrKGNvbmZpZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcgJiYgIShjb25maWcgaW5zdGFuY2VvZiBOZzFWaWV3Q29uZmlnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWdzRXF1YWwodmlld0NvbmZpZywgY29uZmlnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3Q29uZmlnVXBkYXRlZChhY3RpdmVVSVZpZXcsIGNvbmZpZyAmJiBjb25maWcudmlld0RlY2wgJiYgY29uZmlnLnZpZXdEZWNsLiRjb250ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWV3Q29uZmlnID0gY29uZmlnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50LmRhdGEoJyR1aVZpZXcnLCB7ICR1aVZpZXc6IGFjdGl2ZVVJVmlldyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1bnJlZ2lzdGVyID0gJHZpZXcucmVnaXN0ZXJVSVZpZXcoYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLiRvbignJGRlc3Ryb3knLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2UudHJhY2VVSVZpZXdFdmVudCgnRGVzdHJveWluZy9VbnJlZ2lzdGVyaW5nJywgYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnJlZ2lzdGVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsZWFudXBMYXN0VmlldygpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJldmlvdXNFbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVVJVmlld0V2ZW50KCdSZW1vdmluZyAocHJldmlvdXMpIGVsJywgcHJldmlvdXNFbC5kYXRhKCckdWlWaWV3JykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c0VsLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c0VsID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRTY29wZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVVJVmlld0V2ZW50KCdEZXN0cm95aW5nIHNjb3BlJywgYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLiRkZXN0cm95KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50RWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF92aWV3RGF0YV8xID0gY3VycmVudEVsLmRhdGEoJyR1aVZpZXdBbmltJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RXZlbnQoJ0FuaW1hdGUgb3V0JywgX3ZpZXdEYXRhXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJlci5sZWF2ZShjdXJyZW50RWwsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92aWV3RGF0YV8xLiQkYW5pbUxlYXZlLnJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzRWwgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNFbCA9IGN1cnJlbnRFbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudEVsID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB1cGRhdGVWaWV3KGNvbmZpZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuZXdTY29wZSA9IHNjb3BlLiRuZXcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYW5pbUVudGVyID0gJHEuZGVmZXIoKSwgYW5pbUxlYXZlID0gJHEuZGVmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgJHVpVmlld0RhdGEgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRjZmc6IGNvbmZpZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHVpVmlldzogYWN0aXZlVUlWaWV3LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICR1aVZpZXdBbmltID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYW5pbUVudGVyOiBhbmltRW50ZXIucHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGFuaW1MZWF2ZTogYW5pbUxlYXZlLnByb21pc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkYW5pbUxlYXZlOiBhbmltTGVhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmdkb2MgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmFtZSB1aS5yb3V0ZXIuc3RhdGUuZGlyZWN0aXZlOnVpLXZpZXcjJHZpZXdDb250ZW50TG9hZGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBldmVudE9mIHVpLnJvdXRlci5zdGF0ZS5kaXJlY3RpdmU6dWktdmlld1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBldmVudFR5cGUgZW1pdHMgb24gdWktdmlldyBkaXJlY3RpdmUgc2NvcGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAZGVzY3JpcHRpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEZpcmVkIG9uY2UgdGhlIHZpZXcgKipiZWdpbnMgbG9hZGluZyoqLCAqYmVmb3JlKiB0aGUgRE9NIGlzIHJlbmRlcmVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IEV2ZW50IG9iamVjdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gdmlld05hbWUgTmFtZSBvZiB0aGUgdmlldy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdTY29wZS4kZW1pdCgnJHZpZXdDb250ZW50TG9hZGluZycsIG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9uZWQgPSAkdHJhbnNjbHVkZShuZXdTY29wZSwgZnVuY3Rpb24gKGNsb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb25lLmRhdGEoJyR1aVZpZXdBbmltJywgJHVpVmlld0FuaW0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9uZS5kYXRhKCckdWlWaWV3JywgJHVpVmlld0RhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJlci5lbnRlcihjbG9uZSwgJGVsZW1lbnQsIGZ1bmN0aW9uIG9uVUlWaWV3RW50ZXIoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltRW50ZXIucmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRTY29wZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGVtaXQoJyR2aWV3Q29udGVudEFuaW1hdGlvbkVuZGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGlzRGVmaW5lZChhdXRvU2Nyb2xsRXhwKSAmJiAhYXV0b1Njcm9sbEV4cCkgfHwgc2NvcGUuJGV2YWwoYXV0b1Njcm9sbEV4cCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdWlWaWV3U2Nyb2xsKGNsb25lKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFudXBMYXN0VmlldygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRFbCA9IGNsb25lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUgPSBuZXdTY29wZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmdkb2MgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmFtZSB1aS5yb3V0ZXIuc3RhdGUuZGlyZWN0aXZlOnVpLXZpZXcjJHZpZXdDb250ZW50TG9hZGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQGV2ZW50T2YgdWkucm91dGVyLnN0YXRlLmRpcmVjdGl2ZTp1aS12aWV3XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQGV2ZW50VHlwZSBlbWl0cyBvbiB1aS12aWV3IGRpcmVjdGl2ZSBzY29wZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBkZXNjcmlwdGlvbiAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEZpcmVkIG9uY2UgdGhlIHZpZXcgaXMgKipsb2FkZWQqKiwgKmFmdGVyKiB0aGUgRE9NIGlzIHJlbmRlcmVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IEV2ZW50IG9iamVjdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGVtaXQoJyR2aWV3Q29udGVudExvYWRlZCcsIGNvbmZpZyB8fCB2aWV3Q29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGV2YWwob25sb2FkRXhwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBkaXJlY3RpdmU7XG4gICAgICAgIH0sXG4gICAgXTtcbiAgICAkVmlld0RpcmVjdGl2ZUZpbGwuJGluamVjdCA9IFsnJGNvbXBpbGUnLCAnJGNvbnRyb2xsZXInLCAnJHRyYW5zaXRpb25zJywgJyR2aWV3JywgJyRxJ107XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiAkVmlld0RpcmVjdGl2ZUZpbGwoJGNvbXBpbGUsICRjb250cm9sbGVyLCAkdHJhbnNpdGlvbnMsICR2aWV3LCAkcSkge1xuICAgICAgICB2YXIgZ2V0Q29udHJvbGxlckFzID0gcGFyc2UoJ3ZpZXdEZWNsLmNvbnRyb2xsZXJBcycpO1xuICAgICAgICB2YXIgZ2V0UmVzb2x2ZUFzID0gcGFyc2UoJ3ZpZXdEZWNsLnJlc29sdmVBcycpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcmVzdHJpY3Q6ICdFQ0EnLFxuICAgICAgICAgICAgcHJpb3JpdHk6IC00MDAsXG4gICAgICAgICAgICBjb21waWxlOiBmdW5jdGlvbiAodEVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgaW5pdGlhbCA9IHRFbGVtZW50Lmh0bWwoKTtcbiAgICAgICAgICAgICAgICB0RWxlbWVudC5lbXB0eSgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2NvcGUsICRlbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gJGVsZW1lbnQuZGF0YSgnJHVpVmlldycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50Lmh0bWwoaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkY29tcGlsZSgkZWxlbWVudC5jb250ZW50cygpKShzY29wZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGNmZyA9IGRhdGEuJGNmZyB8fCB7IHZpZXdEZWNsOiB7fSwgZ2V0VGVtcGxhdGU6IG5vb3AgfTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVDdHggPSBjZmcucGF0aCAmJiBuZXcgUmVzb2x2ZUNvbnRleHQoY2ZnLnBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5odG1sKGNmZy5nZXRUZW1wbGF0ZSgkZWxlbWVudCwgcmVzb2x2ZUN0eCkgfHwgaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RmlsbChkYXRhLiR1aVZpZXcsICRlbGVtZW50Lmh0bWwoKSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gJGNvbXBpbGUoJGVsZW1lbnQuY29udGVudHMoKSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb250cm9sbGVyID0gY2ZnLmNvbnRyb2xsZXI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb250cm9sbGVyQXMgPSBnZXRDb250cm9sbGVyQXMoY2ZnKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVBcyA9IGdldFJlc29sdmVBcyhjZmcpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbG9jYWxzID0gcmVzb2x2ZUN0eCAmJiBnZXRMb2NhbHMocmVzb2x2ZUN0eCk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlW3Jlc29sdmVBc10gPSBsb2NhbHM7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cm9sbGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29udHJvbGxlckluc3RhbmNlID0gKCRjb250cm9sbGVyKGNvbnRyb2xsZXIsIGV4dGVuZCh7fSwgbG9jYWxzLCB7ICRzY29wZTogc2NvcGUsICRlbGVtZW50OiAkZWxlbWVudCB9KSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2xsZXJBcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlW2NvbnRyb2xsZXJBc10gPSBjb250cm9sbGVySW5zdGFuY2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGVbY29udHJvbGxlckFzXVtyZXNvbHZlQXNdID0gbG9jYWxzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogVXNlICR2aWV3IHNlcnZpY2UgYXMgYSBjZW50cmFsIHBvaW50IGZvciByZWdpc3RlcmluZyBjb21wb25lbnQtbGV2ZWwgaG9va3NcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZW4sIHdoZW4gYSBjb21wb25lbnQgaXMgY3JlYXRlZCwgdGVsbCB0aGUgJHZpZXcgc2VydmljZSwgc28gaXQgY2FuIGludm9rZSBob29rc1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gJHZpZXcuY29tcG9uZW50TG9hZGVkKGNvbnRyb2xsZXJJbnN0YW5jZSwgeyAkc2NvcGU6IHNjb3BlLCAkZWxlbWVudDogJGVsZW1lbnQgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzY29wZS4kb24oJyRkZXN0cm95JywgKCkgPT4gJHZpZXcuY29tcG9uZW50VW5sb2FkZWQoY29udHJvbGxlckluc3RhbmNlLCB7ICRzY29wZTogc2NvcGUsICRlbGVtZW50OiAkZWxlbWVudCB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5kYXRhKCckbmdDb250cm9sbGVyQ29udHJvbGxlcicsIGNvbnRyb2xsZXJJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5jaGlsZHJlbigpLmRhdGEoJyRuZ0NvbnRyb2xsZXJDb250cm9sbGVyJywgY29udHJvbGxlckluc3RhbmNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyQ29udHJvbGxlckNhbGxiYWNrcygkcSwgJHRyYW5zaXRpb25zLCBjb250cm9sbGVySW5zdGFuY2UsIHNjb3BlLCBjZmcpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIFdhaXQgZm9yIHRoZSBjb21wb25lbnQgdG8gYXBwZWFyIGluIHRoZSBET01cbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzU3RyaW5nKGNmZy5jb21wb25lbnQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIga2Vib2JOYW1lID0ga2Vib2JTdHJpbmcoY2ZnLmNvbXBvbmVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnUmVnZXhwXzEgPSBuZXcgUmVnRXhwKFwiXih4LXxkYXRhLSk/XCIgKyBrZWJvYk5hbWUgKyBcIiRcIiwgJ2knKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBnZXRDb21wb25lbnRDb250cm9sbGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkaXJlY3RpdmVFbCA9IFtdLnNsaWNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jYWxsKCRlbGVtZW50WzBdLmNoaWxkcmVuKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChlbCkgeyByZXR1cm4gZWwgJiYgZWwudGFnTmFtZSAmJiB0YWdSZWdleHBfMS5leGVjKGVsLnRhZ05hbWUpOyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGlyZWN0aXZlRWwgJiYgbmcuZWxlbWVudChkaXJlY3RpdmVFbCkuZGF0YShcIiRcIiArIGNmZy5jb21wb25lbnQgKyBcIkNvbnRyb2xsZXJcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRlcmVnaXN0ZXJXYXRjaF8xID0gc2NvcGUuJHdhdGNoKGdldENvbXBvbmVudENvbnRyb2xsZXIsIGZ1bmN0aW9uIChjdHJsSW5zdGFuY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWN0cmxJbnN0YW5jZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyQ29udHJvbGxlckNhbGxiYWNrcygkcSwgJHRyYW5zaXRpb25zLCBjdHJsSW5zdGFuY2UsIHNjb3BlLCBjZmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcmVnaXN0ZXJXYXRjaF8xKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsaW5rKHNjb3BlKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICB2YXIgaGFzQ29tcG9uZW50SW1wbCA9IHR5cGVvZiBuZy5tb2R1bGUoJ3VpLnJvdXRlcicpWydjb21wb25lbnQnXSA9PT0gJ2Z1bmN0aW9uJztcbiAgICAvKiogQGhpZGRlbiBpbmNyZW1lbnRpbmcgaWQgKi9cbi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GRvbid0IGFsc28gYXNrIGZvciB0aGUgbmV3IHJlZGlyZWN0IHRyYW5zaXRpb25cbiAgICAgICAgICAgIHZhciB3cmFwcGVkSG9vayA9IGZ1bmN0aW9uICh0cmFucykge1xuICAgICAgICAgICAgICAgIHZhciBwcm9taXNlO1xuICAgICAgICAgICAgICAgIHZhciBpZHMgPSAodHJhbnNbY2FjaGVQcm9wXzFdID0gdHJhbnNbY2FjaGVQcm9wXzFdIHx8IHt9KTtcbiAgICAgICAgICAgICAgICBpZiAoIXByZXZUcnV0aHlBbnN3ZXJfMSh0cmFucykpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZSA9ICRxLndoZW4oY29udHJvbGxlckluc3RhbmNlLnVpQ2FuRXhpdCh0cmFucykpO1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gKGlkc1tpZF8xXSA9IHZhbCAhPT0gZmFsc2UpOyB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHByb21pc2U7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGNyaXRlcmlhID0geyBleGl0aW5nOiB2aWV3U3RhdGUubmFtZSB9O1xuICAgICAgICAgICAgJHNjb3BlLiRvbignJGRlc3Ryb3knLCAkdHJhbnNpdGlvbnMub25CZWZvcmUoY3JpdGVyaWEsIHdyYXBwZWRIb29rLCBob29rT3B0aW9ucykpO1xuICAgICAgICB9XG4gICAgfVxuICAgIG5nLm1vZHVsZSgndWkucm91dGVyLnN0YXRlJykuZGlyZWN0aXZlKCd1aVZpZXcnLCB1aVZpZXcpO1xuICAgIG5nLm1vZHVsZSgndWkucm91dGVyLnN0YXRlJykuZGlyZWN0aXZlKCd1aVZpZXcnLCAkVmlld0RpcmVjdGl2ZUZpbGwpO1xuXG4gICAgLyoqIEBwdWJsaWNhcGkgQG1vZHVsZSBuZzEgKi8gLyoqICovXG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiAkVmlld1Njcm9sbFByb3ZpZGVyKCkge1xuICAgICAgICB2YXIgdXNlQW5jaG9yU2Nyb2xsID0gZmFsc2U7XG4gICAgICAgIHRoaXMudXNlQW5jaG9yU2Nyb2xsID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdXNlQW5jaG9yU2Nyb2xsID0gdHJ1ZTtcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy4kZ2V0ID0gW1xuICAgICAgICAgICAgJyRhbmNob3JTY3JvbGwnLFxuICAgICAgICAgICAgJyR0aW1lb3V0JyxcbiAgICAgICAgICAgIGZ1bmN0aW9uICgkYW5jaG9yU2Nyb2xsLCAkdGltZW91dCkge1xuICAgICAgICAgICAgICAgIGlmICh1c2VBbmNob3JTY3JvbGwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRhbmNob3JTY3JvbGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoJGVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50WzBdLnNjcm9sbEludG9WaWV3KCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDAsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgXTtcbiAgICB9XG4gICAgbmcubW9kdWxlKCd1aS5yb3V0ZXIuc3RhdGUnKS5wcm92aWRlcignJHVpVmlld1Njcm9sbCcsICRWaWV3U2Nyb2xsUHJvdmlkZXIpO1xuXG4gICAgLyoqXG4gICAgICogTWFpbiBlbnRyeSBwb2ludCBmb3IgYW5ndWxhciAxLnggYnVpbGRcbiAgICAgKiBAcHVibGljYXBpIEBtb2R1bGUgbmcxXG4gICAgICovIC8qKiAqL1xuICAgIHZhci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Il0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../@uirouter+angularjs@1.0.29/node_modules/@uirouter/angularjs/release/angular-ui-router.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/index.js": +/*!*****************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/index.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"../../../../axios@0.21.4/node_modules/axios/lib/axios.js\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2luZGV4LmpzPzExZTQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsaUJBQWlCLG1CQUFPLENBQUMsNkVBQWEiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9pbmRleC5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9saWIvYXhpb3MnKTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/index.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js": +/*!****************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/adapters/xhr.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js\");\nvar cookies = __webpack_require__(/*! ./../helpers/cookies */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\");\nvar buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9hZGFwdGVycy94aHIuanM/NzFjNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsNEVBQVk7QUFDaEMsYUFBYSxtQkFBTyxDQUFDLHdGQUFrQjtBQUN2QyxjQUFjLG1CQUFPLENBQUMsZ0dBQXNCO0FBQzVDLGVBQWUsbUJBQU8sQ0FBQyxrR0FBdUI7QUFDOUMsb0JBQW9CLG1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XN0XG4gICAgcmVxdWVzdC5zZW5kKHJlcXVlc3REYXRhKTtcbiAgfSk7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/axios.js": +/*!*********************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/axios.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\");\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js\");\n\n// Expose isAxiosError\naxios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9heGlvcy5qcz84MDU0Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyx5RUFBUztBQUM3QixXQUFXLG1CQUFPLENBQUMsdUZBQWdCO0FBQ25DLFlBQVksbUJBQU8sQ0FBQyxtRkFBYztBQUNsQyxrQkFBa0IsbUJBQU8sQ0FBQywrRkFBb0I7QUFDOUMsZUFBZSxtQkFBTyxDQUFDLCtFQUFZOztBQUVuQztBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsWUFBWSxNQUFNO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUF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XG4gIHJldHVybiBQcm9taXNlLmFsbChwcm9taXNlcyk7XG59O1xuYXhpb3Muc3ByZWFkID0gcmVxdWlyZSgnLi9oZWxwZXJzL3NwcmVhZCcpO1xuXG4vLyBFeHBvc2UgaXNBeGlvc0Vycm9yXG5heGlvcy5pc0F4aW9zRXJyb3IgPSByZXF1aXJlKCcuL2hlbHBlcnMvaXNBeGlvc0Vycm9yJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gYXhpb3M7XG5cbi8vIEFsbG93IHVzZSBvZiBkZWZhdWx0IGltcG9ydCBzeW50YXggaW4gVHlwZVNjcmlwdFxubW9kdWxlLmV4cG9ydHMuZGVmYXVsdCA9IGF4aW9zO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/axios.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js": +/*!*****************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js ***! + \*****************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jYW5jZWwvQ2FuY2VsLmpzPzNjZWYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWI7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOztBQUVBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NhbmNlbC9DYW5jZWwuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogQSBgQ2FuY2VsYCBpcyBhbiBvYmplY3QgdGhhdCBpcyB0aHJvd24gd2hlbiBhbiBvcGVyYXRpb24gaXMgY2FuY2VsZWQuXG4gKlxuICogQGNsYXNzXG4gKiBAcGFyYW0ge3N0cmluZz19IG1lc3NhZ2UgVGhlIG1lc3NhZ2UuXG4gKi9cbmZ1bmN0aW9uIENhbmNlbChtZXNzYWdlKSB7XG4gIHRoaXMubWVzc2FnZSA9IG1lc3NhZ2U7XG59XG5cbkNhbmNlbC5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgcmV0dXJuICdDYW5jZWwnICsgKHRoaXMubWVzc2FnZSA/ICc6ICcgKyB0aGlzLm1lc3NhZ2UgOiAnJyk7XG59O1xuXG5DYW5jZWwucHJvdG90eXBlLl9fQ0FOQ0VMX18gPSB0cnVlO1xuXG5tb2R1bGUuZXhwb3J0cyA9IENhbmNlbDtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js": +/*!**********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jYW5jZWwvQ2FuY2VsVG9rZW4uanM/MjMzMSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixhQUFhLG1CQUFPLENBQUMsa0ZBQVU7O0FBRS9CO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxTQUFTO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7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FRva2VuO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js": +/*!*******************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jYW5jZWwvaXNDYW5jZWwuanM/YWFjNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0EiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY2FuY2VsL2lzQ2FuY2VsLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQ2FuY2VsKHZhbHVlKSB7XG4gIHJldHVybiAhISh2YWx1ZSAmJiB2YWx1ZS5fX0NBTkNFTF9fKTtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js": +/*!**************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/Axios.js ***! + \**************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar buildURL = __webpack_require__(/*! ../helpers/buildURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js\");\nvar mergeConfig = __webpack_require__(/*! ./mergeConfig */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\");\nvar validator = __webpack_require__(/*! ../helpers/validator */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js\");\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL0F4aW9zLmpzP2ZhNTgiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsWUFBWSxtQkFBTyxDQUFDLDRFQUFZO0FBQ2hDLGVBQWUsbUJBQU8sQ0FBQyxnR0FBcUI7QUFDNUMseUJBQXlCLG1CQUFPLENBQUMsd0dBQXNCO0FBQ3ZELHNCQUFzQixtQkFBTyxDQUFDLGtHQUFtQjtBQUNqRCxrQkFBa0IsbUJBQU8sQ0FBQywwRkFBZTtBQUN6QyxnQkFBZ0IsbUJBQU8sQ0FBQyxrR0FBc0I7O0FBRTlDO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0EsR0FBRztBQUNIO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDs7QUFFQ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AgICAgIHVybDogdXJsLFxuICAgICAgZGF0YTogZGF0YVxuICAgIH0pKTtcbiAgfTtcbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IEF4aW9zO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js": +/*!***************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js ***! + \***************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=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mVnaXN0ZXJlZCBpbnRlcmNlcHRvcnNcbiAqXG4gKiBUaGlzIG1ldGhvZCBpcyBwYXJ0aWN1bGFybHkgdXNlZnVsIGZvciBza2lwcGluZyBvdmVyIGFueVxuICogaW50ZXJjZXB0b3JzIHRoYXQgbWF5IGhhdmUgYmVjb21lIGBudWxsYCBjYWxsaW5nIGBlamVjdGAuXG4gKlxuICogQHBhcmFtIHtGdW5jdGlvbn0gZm4gVGhlIGZ1bmN0aW9uIHRvIGNhbGwgZm9yIGVhY2ggaW50ZXJjZXB0b3JcbiAqL1xuSW50ZXJjZXB0b3JNYW5hZ2VyLnByb3RvdHlwZS5mb3JFYWNoID0gZnVuY3Rpb24gZm9yRWFjaChmbikge1xuICB1dGlscy5mb3JFYWNoKHRoaXMuaGFuZGxlcnMsIGZ1bmN0aW9uIGZvckVhY2hIYW5kbGVyKGgpIHtcbiAgICBpZiAoaCAhPT0gbnVsbCkge1xuICAgICAgZm4oaCk7XG4gICAgfVxuICB9KTtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gSW50ZXJjZXB0b3JNYW5hZ2VyO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js": +/*!**********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js\");\nvar combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js\");\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2J1aWxkRnVsbFBhdGguanM/MzM5OSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixvQkFBb0IsbUJBQU8sQ0FBQywwR0FBMEI7QUFDdEQsa0JBQWtCLG1CQUFPLENBQUMsc0dBQXdCOztBQUVsRDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixhQUFhLE9BQU87QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9idWlsZEZ1bGxQYXRoLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgaXNBYnNvbHV0ZVVSTCA9IHJlcXVpcmUoJy4uL2hlbHBlcnMvaXNBYnNvbHV0ZVVSTCcpO1xudmFyIGNvbWJpbmVVUkxzID0gcmVxdWlyZSgnLi4vaGVscGVycy9jb21iaW5lVVJMcycpO1xuXG4vKipcbiAqIENyZWF0ZXMgYSBuZXcgVVJMIGJ5IGNvbWJpbmluZyB0aGUgYmFzZVVSTCB3aXRoIHRoZSByZXF1ZXN0ZWRVUkwsXG4gKiBvbmx5IHdoZW4gdGhlIHJlcXVlc3RlZFVSTCBpcyBub3QgYWxyZWFkeSBhbiBhYnNvbHV0ZSBVUkwuXG4gKiBJZiB0aGUgcmVxdWVzdFVSTCBpcyBhYnNvbHV0ZSwgdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSByZXF1ZXN0ZWRVUkwgdW50b3VjaGVkLlxuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBiYXNlVVJMIFRoZSBiYXNlIFVSTFxuICogQHBhcmFtIHtzdHJpbmd9IHJlcXVlc3RlZFVSTCBBYnNvbHV0ZSBvciByZWxhdGl2ZSBVUkwgdG8gY29tYmluZVxuICogQHJldHVybnMge3N0cmluZ30gVGhlIGNvbWJpbmVkIGZ1bGwgcGF0aFxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGJ1aWxkRnVsbFBhdGgoYmFzZVVSTCwgcmVxdWVzdGVkVVJMKSB7XG4gIGlmIChiYXNlVVJMICYmICFpc0Fic29sdXRlVVJMKHJlcXVlc3RlZFVSTCkpIHtcbiAgICByZXR1cm4gY29tYmluZVVSTHMoYmFzZVVSTCwgcmVxdWVzdGVkVVJMKTtcbiAgfVxuICByZXR1cm4gcmVxdWVzdGVkVVJMO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js": +/*!********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/createError.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\");\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2NyZWF0ZUVycm9yLmpzPzc0ZmYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsbUJBQW1CLG1CQUFPLENBQUMsNEZBQWdCOztBQUUzQztBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsTUFBTTtBQUNuQjtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvY3JlYXRlRXJyb3IuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBlbmhhbmNlRXJyb3IgPSByZXF1aXJlKCcuL2VuaGFuY2VFcnJvcicpO1xuXG4vKipcbiAqIENyZWF0ZSBhbiBFcnJvciB3aXRoIHRoZSBzcGVjaWZpZWQgbWVzc2FnZSwgY29uZmlnLCBlcnJvciBjb2RlLCByZXF1ZXN0IGFuZCByZXNwb25zZS5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gbWVzc2FnZSBUaGUgZXJyb3IgbWVzc2FnZS5cbiAqIEBwYXJhbSB7T2JqZWN0fSBjb25maWcgVGhlIGNvbmZpZy5cbiAqIEBwYXJhbSB7c3RyaW5nfSBbY29kZV0gVGhlIGVycm9yIGNvZGUgKGZvciBleGFtcGxlLCAnRUNPTk5BQk9SVEVEJykuXG4gKiBAcGFyYW0ge09iamVjdH0gW3JlcXVlc3RdIFRoZSByZXF1ZXN0LlxuICogQHBhcmFtIHtPYmplY3R9IFtyZXNwb25zZV0gVGhlIHJlc3BvbnNlLlxuICogQHJldHVybnMge0Vycm9yfSBUaGUgY3JlYXRlZCBlcnJvci5cbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjcmVhdGVFcnJvcihtZXNzYWdlLCBjb25maWcsIGNvZGUsIHJlcXVlc3QsIHJlc3BvbnNlKSB7XG4gIHZhciBlcnJvciA9IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgcmV0dXJuIGVuaGFuY2VFcnJvcihlcnJvciwgY29uZmlnLCBjb2RlLCByZXF1ZXN0LCByZXNwb25zZSk7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js": +/*!************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js ***! + \************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc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ICAgICB0aHJvd0lmQ2FuY2VsbGF0aW9uUmVxdWVzdGVkKGNvbmZpZyk7XG5cbiAgICAgIC8vIFRyYW5zZm9ybSByZXNwb25zZSBkYXRhXG4gICAgICBpZiAocmVhc29uICYmIHJlYXNvbi5yZXNwb25zZSkge1xuICAgICAgICByZWFzb24ucmVzcG9uc2UuZGF0YSA9IHRyYW5zZm9ybURhdGEuY2FsbChcbiAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgcmVhc29uLnJlc3BvbnNlLmRhdGEsXG4gICAgICAgICAgcmVhc29uLnJlc3BvbnNlLmhlYWRlcnMsXG4gICAgICAgICAgY29uZmlnLnRyYW5zZm9ybVJlc3BvbnNlXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIFByb21pc2UucmVqZWN0KHJlYXNvbik7XG4gIH0pO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js": +/*!*********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/enhanceError.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2VuaGFuY2VFcnJvci5qcz80NDY4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQTtBQUNBLFdBQVcsTUFBTTtBQUNqQixXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsYUFBYSxNQUFNO0FBQ25CO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2VuaGFuY2VFcnJvci5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBVcGRhdGUgYW4gRXJyb3Igd2l0aCB0aGUgc3BlY2lmaWVkIGNvbmZpZywgZXJyb3IgY29kZSwgYW5kIHJlc3BvbnNlLlxuICpcbiAqIEBwYXJhbSB7RXJyb3J9IGVycm9yIFRoZSBlcnJvciB0byB1cGRhdGUuXG4gK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gICAgIHN0YWNrOiB0aGlzLnN0YWNrLFxuICAgICAgLy8gQXhpb3NcbiAgICAgIGNvbmZpZzogdGhpcy5jb25maWcsXG4gICAgICBjb2RlOiB0aGlzLmNvZGVcbiAgICB9O1xuICB9O1xuICByZXR1cm4gZXJyb3I7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js": +/*!********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL21lcmdlQ29uZmlnLmpzP2ZhYmYiXSwibmFtZXMiOltdLCJtYXBwaW5ncy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1xuICAgIC5jb25jYXQobWVyZ2VEZWVwUHJvcGVydGllc0tleXMpXG4gICAgLmNvbmNhdChkZWZhdWx0VG9Db25maWcyS2V5cylcbiAgICAuY29uY2F0KGRpcmVjdE1lcmdlS2V5cyk7XG5cbiAgdmFyIG90aGVyS2V5cyA9IE9iamVjdFxuICAgIC5rZXlzKGNvbmZpZzEpXG4gICAgLmNvbmNhdChPYmplY3Qua2V5cyhjb25maWcyKSlcbiAgICAuZmlsdGVyKGZ1bmN0aW9uIGZpbHRlckF4aW9zS2V5cyhrZXkpIHtcbiAgICAgIHJldHVybiBheGlvc0tleXMuaW5kZXhPZihrZXkpID09PSAtMTtcbiAgICB9KTtcblxuICB1dGlscy5mb3JFYWNoKG90aGVyS2V5cywgbWVyZ2VEZWVwUHJvcGVydGllcyk7XG5cbiAgcmV0dXJuIGNvbmZpZztcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js": +/*!***************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/settle.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\");\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/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0aW9uIHNldHRsZShyZXNvbHZlLCByZWplY3QsIHJlc3BvbnNlKSB7XG4gIHZhciB2YWxpZGF0ZVN0YXR1cyA9IHJlc3BvbnNlLmNvbmZpZy52YWxpZGF0ZVN0YXR1cztcbiAgaWYgKCFyZXNwb25zZS5zdGF0dXMgfHwgIXZhbGlkYXRlU3RhdHVzIHx8IHZhbGlkYXRlU3RhdHVzKHJlc3BvbnNlLnN0YXR1cykpIHtcbiAgICByZXNvbHZlKHJlc3BvbnNlKTtcbiAgfSBlbHNlIHtcbiAgICByZWplY3QoY3JlYXRlRXJyb3IoXG4gICAgICAnUmVxdWVzdCBmYWlsZWQgd2l0aCBzdGF0dXMgY29kZSAnICsgcmVzcG9uc2Uuc3RhdHVzLFxuICAgICAgcmVzcG9uc2UuY29uZmlnLFxuICAgICAgbnVsbCxcbiAgICAgIHJlc3BvbnNlLnJlcXVlc3QsXG4gICAgICByZXNwb25zZVxuICAgICkpO1xuICB9XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js": +/*!**********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/transformData.js ***! + \**********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar defaults = __webpack_require__(/*! ./../defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL3RyYW5zZm9ybURhdGEuanM/MDNjZiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsNEVBQVk7QUFDaEMsZUFBZSxtQkFBTyxDQUFDLGtGQUFlOztBQUV0QztBQUNBO0FBQ0E7QUFDQSxXQUFXLGNBQWM7QUFDekIsV0FBVyxNQUFNO0FBQ2pCLFdBQVcsZUFBZTtBQUMxQixhQUFhLEVBQUU7QUFDZjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHOztBQUVIO0FBQ0EiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS90cmFuc2Zvcm1EYXRhLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgdXRpbHMgPSByZXF1aXJlKCcuLy4uL3V0aWxzJyk7XG52YXIgZGVmYXVsdHMgPSByZXF1aXJlKCcuLy4uL2RlZmF1bHRzJyk7XG5cbi8qKlxuICogVHJhbnNmb3JtIHRoZSBkYXRhIGZvciBhIHJlcXVlc3Qgb3IgYSByZXNwb25zZVxuICpcbiAqIEBwYXJhbSB7T2JqZWN0fFN0cmluZ30gZGF0YSBUaGUgZGF0YSB0byBiZSB0cmFuc2Zvcm1lZFxuICogQHBhcmFtIHtBcnJheX0gaGVhZGVycyBUaGUgaGVhZGVycyBmb3IgdGhlIHJlcXVlc3Qgb3IgcmVzcG9uc2VcbiAqIEBwYXJhbSB7QXJyYXl8RnVuY3Rpb259IGZucyBBIHNpbmdsZSBmdW5jdGlvbiBvciBBcnJheSBvZiBmdW5jdGlvbnNcbiAqIEByZXR1cm5zIHsqfSBUaGUgcmVzdWx0aW5nIHRyYW5zZm9ybWVkIGRhdGFcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiB0cmFuc2Zvcm1EYXRhKGRhdGEsIGhlYWRlcnMsIGZucykge1xuICB2YXIgY29udGV4dCA9IHRoaXMgfHwgZGVmYXVsdHM7XG4gIC8qZXNsaW50IG5vLXBhcmFtLXJlYXNzaWduOjAqL1xuICB1dGlscy5mb3JFYWNoKGZucywgZnVuY3Rpb24gdHJhbnNmb3JtKGZuKSB7XG4gICAgZGF0YSA9IGZuLmNhbGwoY29udGV4dCwgZGF0YSwgaGVhZGVycyk7XG4gIH0pO1xuXG4gIHJldHVybiBkYXRhO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/defaults.js": +/*!************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/defaults.js ***! + \************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js\");\nvar enhanceError = __webpack_require__(/*! ./core/enhanceError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(/*! ./adapters/xhr */ \"../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\");\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = __webpack_require__(/*! ./adapters/http */ \"../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\");\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process@0.11.10/node_modules/process/browser.js */ \"../../../../process@0.11.10/node_modules/process/browser.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9kZWZhdWx0cy5qcz9iZDViIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLCtDQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyx5RUFB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0aW9uIHZhbGlkYXRlU3RhdHVzKHN0YXR1cykge1xuICAgIHJldHVybiBzdGF0dXMgPj0gMjAwICYmIHN0YXR1cyA8IDMwMDtcbiAgfVxufTtcblxuZGVmYXVsdHMuaGVhZGVycyA9IHtcbiAgY29tbW9uOiB7XG4gICAgJ0FjY2VwdCc6ICdhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L3BsYWluLCAqLyonXG4gIH1cbn07XG5cbnV0aWxzLmZvckVhY2goWydkZWxldGUnLCAnZ2V0JywgJ2hlYWQnXSwgZnVuY3Rpb24gZm9yRWFjaE1ldGhvZE5vRGF0YShtZXRob2QpIHtcbiAgZGVmYXVsdHMuaGVhZGVyc1ttZXRob2RdID0ge307XG59KTtcblxudXRpbHMuZm9yRWFjaChbJ3Bvc3QnLCAncHV0JywgJ3BhdGNoJ10sIGZ1bmN0aW9uIGZvckVhY2hNZXRob2RXaXRoRGF0YShtZXRob2QpIHtcbiAgZGVmYXVsdHMuaGVhZGVyc1ttZXRob2RdID0gdXRpbHMubWVyZ2UoREVGQVVMVF9DT05URU5UX1RZUEUpO1xufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gZGVmYXVsdHM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js": +/*!****************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/bind.js ***! + \****************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2JpbmQuanM/NzQyNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQSxtQkFBbUIsaUJBQWlCO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9iaW5kLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGJpbmQoZm4sIHRoaXNBcmcpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHdyYXAoKSB7XG4gICAgdmFyIGFyZ3MgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCk7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmdzLmxlbmd0aDsgaSsrKSB7XG4gICAgICBhcmdzW2ldID0gYXJndW1lbnRzW2ldO1xuICAgIH1cbiAgICByZXR1cm4gZm4uYXBwbHkodGhpc0FyZywgYXJncyk7XG4gIH07XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js": +/*!********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js ***! + \********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2J1aWxkVVJMLmpzP2I0O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gIH0gZWxzZSB7XG4gICAgICAgIHZhbCA9IFt2YWxdO1xuICAgICAgfVxuXG4gICAgICB1dGlscy5mb3JFYWNoKHZhbCwgZnVuY3Rpb24gcGFyc2VWYWx1ZSh2KSB7XG4gICAgICAgIGlmICh1dGlscy5pc0RhdGUodikpIHtcbiAgICAgICAgICB2ID0gdi50b0lTT1N0cmluZygpO1xuICAgICAgICB9IGVsc2UgaWYgKHV0aWxzLmlzT2JqZWN0KHYpKSB7XG4gICAgICAgICAgdiA9IEpTT04uc3RyaW5naWZ5KHYpO1xuICAgICAgICB9XG4gICAgICAgIHBhcnRzLnB1c2goZW5jb2RlKGtleSkgKyAnPScgKyBlbmNvZGUodikpO1xuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBzZXJpYWxpemVkUGFyYW1zID0gcGFydHMuam9pbignJicpO1xuICB9XG5cbiAgaWYgKHNlcmlhbGl6ZWRQYXJhbXMpIHtcbiAgICB2YXIgaGFzaG1hcmtJbmRleCA9IHVybC5pbmRleE9mKCcjJyk7XG4gICAgaWYgKGhhc2htYXJrSW5kZXggIT09IC0xKSB7XG4gICAgICB1cmwgPSB1cmwuc2xpY2UoMCwgaGFzaG1hcmtJbmRleCk7XG4gICAgfVxuXG4gICAgdXJsICs9ICh1cmwuaW5kZXhPZignPycpID09PSAtMSA/ICc/JyA6ICcmJykgKyBzZXJpYWxpemVkUGFyYW1zO1xuICB9XG5cbiAgcmV0dXJuIHVybDtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js": +/*!***********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js ***! + \***********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2NvbWJpbmVVUkxzLmpzPzI5ZjYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWI7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixhQUFhLE9BQU87QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvY29tYmluZVVSTHMuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBVUkwgYnkgY29tYmluaW5nIHRoZSBzcGVjaWZpZWQgVVJMc1xuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBiYXNlVVJMIFRoZSBiYXNlIFVSTFxuICogQHBhcmFtIHtzdHJpbmd9IHJlbGF0aXZlVVJMIFRoZSByZWxhdGl2ZSBVUkxcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBjb21iaW5lZCBVUkxcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjb21iaW5lVVJMcyhiYXNlVVJMLCByZWxhdGl2ZVVSTCkge1xuICByZXR1cm4gcmVsYXRpdmVVUkxcbiAgICA/IGJhc2VVUkwucmVwbGFjZSgvXFwvKyQvLCAnJykgKyAnLycgKyByZWxhdGl2ZVVSTC5yZXBsYWNlKC9eXFwvKy8sICcnKVxuICAgIDogYmFzZVVSTDtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js": +/*!*******************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/cookies.js ***! + \*******************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function rem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nQuY29va2llXG4gICAgKGZ1bmN0aW9uIHN0YW5kYXJkQnJvd3NlckVudigpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZShuYW1lLCB2YWx1ZSwgZXhwaXJlcywgcGF0aCwgZG9tYWluLCBzZWN1cmUpIHtcbiAgICAgICAgICB2YXIgY29va2llID0gW107XG4gICAgICAgICAgY29va2llLnB1c2gobmFtZSArICc9JyArIGVuY29kZVVSSUNvbXBvbmVudCh2YWx1ZSkpO1xuXG4gICAgICAgICAgaWYgKHV0aWxzLmlzTnVtYmVyKGV4cGlyZXMpKSB7XG4gICAgICAgICAgICBjb29raWUucHVzaCgnZXhwaXJlcz0nICsgbmV3IERhdGUoZXhwaXJlcykudG9HTVRTdHJpbmcoKSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHV0aWxzLmlzU3RyaW5nKHBhdGgpKSB7XG4gICAgICAgICAgICBjb29raWUucHVzaCgncGF0aD0nICsgcGF0aCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHV0aWxzLmlzU3RyaW5nKGRvbWFpbikpIHtcbiAgICAgICAgICAgIGNvb2tpZS5wdXNoKCdkb21haW49JyArIGRvbWFpbik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlY3VyZSA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgY29va2llLnB1c2goJ3NlY3VyZScpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGRvY3VtZW50LmNvb2tpZSA9IGNvb2tpZS5qb2luKCc7ICcpO1xuICAgICAgICB9LFxuXG4gICAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQobmFtZSkge1xuICAgICAgICAgIHZhciBtYXRjaCA9IGRvY3VtZW50LmNvb2tpZS5tYXRjaChuZXcgUmVnRXhwKCcoXnw7XFxcXHMqKSgnICsgbmFtZSArICcpPShbXjtdKiknKSk7XG4gICAgICAgICAgcmV0dXJuIChtYXRjaCA/IGRlY29kZVVSSUNvbXBvbmVudChtYXRjaFszXSkgOiBudWxsKTtcbiAgICAgICAgfSxcblxuICAgICAgICByZW1vdmU6IGZ1bmN0aW9uIHJlbW92ZShuYW1lKSB7XG4gICAgICAgICAgdGhpcy53cml0ZShuYW1lLCAnJywgRGF0ZS5ub3coKSAtIDg2NDAwMDAwKTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9KSgpIDpcblxuICAvLyBOb24gc3RhbmRhcmQgYnJvd3NlciBlbnYgKHdlYiB3b3JrZXJzLCByZWFjdC1uYXRpdmUpIGxhY2sgbmVlZGVkIHN1cHBvcnQuXG4gICAgKGZ1bmN0aW9uIG5vblN0YW5kYXJkQnJvd3NlckVudigpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZSgpIHt9LFxuICAgICAgICByZWFkOiBmdW5jdGlvbiByZWFkKCkgeyByZXR1cm4gbnVsbDsgfSxcbiAgICAgICAgcmVtb3ZlOiBmdW5jdGlvbiByZW1vdmUoKSB7fVxuICAgICAgfTtcbiAgICB9KSgpXG4pO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js": +/*!*************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js ***! + \*************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzQWJzb2x1dGVVUkwuanM/Zjc4YSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsYUFBYSxRQUFRO0FBQ3JCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvaXNBYnNvbHV0ZVVSTC5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgdGhlIHNwZWNpZmllZCBVUkwgaXMgYWJzb2x1dGVcbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gdXJsIFRoZSBVUkwgdG8gdGVzdFxuICogQHJldHVybnMge2Jvb2xlYW59IFRydWUgaWYgdGhlIHNwZWNpZmllZCBVUkwgaXMgYWJzb2x1dGUsIG90aGVyd2lzZSBmYWxzZVxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQWJzb2x1dGVVUkwodXJsKSB7XG4gIC8vIEEgVVJMIGlzIGNvbnNpZGVyZWQgYWJzb2x1dGUgaWYgaXQgYmVnaW5zIHdpdGggXCI8c2NoZW1lPjovL1wiIG9yIFwiLy9cIiAocHJvdG9jb2wtcmVsYXRpdmUgVVJMKS5cbiAgLy8gUkZDIDM5ODYgZGVmaW5lcyBzY2hlbWUgbmFtZSBhcyBhIHNlcXVlbmNlIG9mIGNoYXJhY3RlcnMgYmVnaW5uaW5nIHdpdGggYSBsZXR0ZXIgYW5kIGZvbGxvd2VkXG4gIC8vIGJ5IGFueSBjb21iaW5hdGlvbiBvZiBsZXR0ZXJzLCBkaWdpdHMsIHBsdXMsIHBlcmlvZCwgb3IgaHlwaGVuLlxuICByZXR1cm4gL14oW2Etel1bYS16XFxkXFwrXFwtXFwuXSo6KT9cXC9cXC8vaS50ZXN0KHVybCk7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js": +/*!************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js ***! + \************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzQXhpb3NFcnJvci5qcz8wM2ZlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQTtBQUNBLFdBQVcsRUFBRTtBQUNiLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzQXhpb3NFcnJvci5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgdGhlIHBheWxvYWQgaXMgYW4gZXJyb3IgdGhyb3duIGJ5IEF4aW9zXG4gKlxuICogQHBhcmFtIHsqfSBwYXlsb2FkIFRoZSB2YWx1ZSB0byB0ZXN0XG4gKiBAcmV0dXJucyB7Ym9vbGVhbn0gVHJ1ZSBpZiB0aGUgcGF5bG9hZCBpcyBhbiBlcnJvciB0aHJvd24gYnkgQXhpb3MsIG90aGVyd2lzZSBmYWxzZVxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQXhpb3NFcnJvcihwYXlsb2FkKSB7XG4gIHJldHVybiAodHlwZW9mIHBheWxvYWQgPT09ICdvYmplY3QnKSAmJiAocGF5bG9hZC5pc0F4aW9zRXJyb3IgPT09IHRydWUpO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js": +/*!***************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js ***! + \***************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1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Htib29sZWFufSBUcnVlIGlmIFVSTCBzaGFyZXMgdGhlIHNhbWUgb3JpZ2luLCBvdGhlcndpc2UgZmFsc2VcbiAgICAqL1xuICAgICAgcmV0dXJuIGZ1bmN0aW9uIGlzVVJMU2FtZU9yaWdpbihyZXF1ZXN0VVJMKSB7XG4gICAgICAgIHZhciBwYXJzZWQgPSAodXRpbHMuaXNTdHJpbmcocmVxdWVzdFVSTCkpID8gcmVzb2x2ZVVSTChyZXF1ZXN0VVJMKSA6IHJlcXVlc3RVUkw7XG4gICAgICAgIHJldHVybiAocGFyc2VkLnByb3RvY29sID09PSBvcmlnaW5VUkwucHJvdG9jb2wgJiZcbiAgICAgICAgICAgIHBhcnNlZC5ob3N0ID09PSBvcmlnaW5VUkwuaG9zdCk7XG4gICAgICB9O1xuICAgIH0pKCkgOlxuXG4gIC8vIE5vbiBzdGFuZGFyZCBicm93c2VyIGVudnMgKHdlYiB3b3JrZXJzLCByZWFjdC1uYXRpdmUpIGxhY2sgbmVlZGVkIHN1cHBvcnQuXG4gICAgKGZ1bmN0aW9uIG5vblN0YW5kYXJkQnJvd3NlckVudigpIHtcbiAgICAgIHJldHVybiBmdW5jdGlvbiBpc1VSTFNhbWVPcmlnaW4oKSB7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfTtcbiAgICB9KSgpXG4pO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js": +/*!*******************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js ***! + \*******************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL25vcm1hbGl6ZUhlYWRlck5hbWUuanM/NTE5NiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsMEVBQVU7O0FBRTlCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSCIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL25vcm1hbGl6ZUhlYWRlck5hbWUuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciB1dGlscyA9IHJlcXVpcmUoJy4uL3V0aWxzJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gbm9ybWFsaXplSGVhZGVyTmFtZShoZWFkZXJzLCBub3JtYWxpemVkTmFtZSkge1xuICB1dGlscy5mb3JFYWNoKGhlYWRlcnMsIGZ1bmN0aW9uIHByb2Nlc3NIZWFkZXIodmFsdWUsIG5hbWUpIHtcbiAgICBpZiAobmFtZSAhPT0gbm9ybWFsaXplZE5hbWUgJiYgbmFtZS50b1VwcGVyQ2FzZSgpID09PSBub3JtYWxpemVkTmFtZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICBoZWFkZXJzW25vcm1hbGl6ZWROYW1lXSA9IHZhbHVlO1xuICAgICAgZGVsZXRlIGhlYWRlcnNbbmFtZV07XG4gICAgfVxuICB9KTtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js": +/*!************************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js ***! + \************************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL3BhcnNlSGVhZGVycy5qcz82MjYwIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyw0RUFBWTs7QUFFaEM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQixhQUFhLE9BQU87QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLGlCQUFpQixlQUFlOztBQUVoQztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxPQUFPO0FBQ1A7QUFDQTtBQUNBO0FBQ0EsR0FBRzs7QUFFSDtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvcGFyc2VIZWFkZXJzLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgdXRpbHMgPSByZXF1aXJlKCcuLy4uL3V0aWxzJyk7XG5cbi8vIEhlYWRlcnMgd2hvc2UgZHVwbGljYXRlcyBhcmUgaWdub3JlZCBieSBub2RlXG4vLyB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XJzLnNwbGl0KCdcXG4nKSwgZnVuY3Rpb24gcGFyc2VyKGxpbmUpIHtcbiAgICBpID0gbGluZS5pbmRleE9mKCc6Jyk7XG4gICAga2V5ID0gdXRpbHMudHJpbShsaW5lLnN1YnN0cigwLCBpKSkudG9Mb3dlckNhc2UoKTtcbiAgICB2YWwgPSB1dGlscy50cmltKGxpbmUuc3Vic3RyKGkgKyAxKSk7XG5cbiAgICBpZiAoa2V5KSB7XG4gICAgICBpZiAocGFyc2VkW2tleV0gJiYgaWdub3JlRHVwbGljYXRlT2YuaW5kZXhPZihrZXkpID49IDApIHtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgaWYgKGtleSA9PT0gJ3NldC1jb29raWUnKSB7XG4gICAgICAgIHBhcnNlZFtrZXldID0gKHBhcnNlZFtrZXldID8gcGFyc2VkW2tleV0gOiBbXSkuY29uY2F0KFt2YWxdKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBhcnNlZFtrZXldID0gcGFyc2VkW2tleV0gPyBwYXJzZWRba2V5XSArICcsICcgKyB2YWwgOiB2YWw7XG4gICAgICB9XG4gICAgfVxuICB9KTtcblxuICByZXR1cm4gcGFyc2VkO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js": +/*!******************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/spread.js ***! + \******************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL3NwcmVhZC5qcz81NWY3Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwrQkFBK0I7QUFDL0I7QUFDQTtBQUNBLFdBQVcsU0FBUztBQUNwQixhQUFhO0FBQ2I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvc3ByZWFkLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG4vKipcbiAqIFN5bnRhY3RpYyBzdWdhciBmb3IgaW52b2tpbmcgYSBmdW5jdGlvbiBhbmQgZXhwYW5kaW5nIGFuIGFycmF5IGZvciBhcmd1bWVudHMuXG4gKlxuICogQ29tbW9uIHVzZSBjYXNlIHdvdWxkIGJlIHRvIHVzZSBgRnVuY3Rpb24ucHJvdG90eXBlLmFwcGx5YC5cbiAqXG4gKiAgYGBganNcbiAqICBmdW5jdGlvbiBmKHgsIHksIHopIHt9XG4gKiAgdmFyIGFyZ3MgPSBbMSwgMiwgM107XG4gKiAgZi5hcHBseShudWxsLCBhcmdzKTtcbiAqICBgYGBcbiAqXG4gKiBXaXRoIGBzcHJlYWRgIHRoaXMgZXhhbXBsZSBjYW4gYmUgcmUtd3JpdHRlbi5cbiAqXG4gKiAgYGBganNcbiAqICBzcHJlYWQoZnVuY3Rpb24oeCwgeSwgeikge30pKFsxLCAyLCAzXSk7XG4gKiAgYGBgXG4gKlxuICogQHBhcmFtIHtGdW5jdGlvbn0gY2FsbGJhY2tcbiAqIEByZXR1cm5zIHtGdW5jdGlvbn1cbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBzcHJlYWQoY2FsbGJhY2spIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHdyYXAoYXJyKSB7XG4gICAgcmV0dXJuIGNhbGxiYWNrLmFwcGx5KG51bGwsIGFycik7XG4gIH07XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js": +/*!*********************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/validator.js ***! + \*********************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar pkg = __webpack_require__(/*! ./../../package.json */ \"../../../../axios@0.21.4/node_modules/axios/package.json\");\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb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xuICB3aGlsZSAoaS0tID4gMCkge1xuICAgIHZhciBvcHQgPSBrZXlzW2ldO1xuICAgIHZhciB2YWxpZGF0b3IgPSBzY2hlbWFbb3B0XTtcbiAgICBpZiAodmFsaWRhdG9yKSB7XG4gICAgICB2YXIgdmFsdWUgPSBvcHRpb25zW29wdF07XG4gICAgICB2YXIgcmVzdWx0ID0gdmFsdWUgPT09IHVuZGVmaW5lZCB8fCB2YWxpZGF0b3IodmFsdWUsIG9wdCwgb3B0aW9ucyk7XG4gICAgICBpZiAocmVzdWx0ICE9PSB0cnVlKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ29wdGlvbiAnICsgb3B0ICsgJyBtdXN0IGJlICcgKyByZXN1bHQpO1xuICAgICAgfVxuICAgICAgY29udGludWU7XG4gICAgfVxuICAgIGlmIChhbGxvd1Vua25vd24gIT09IHRydWUpIHtcbiAgICAgIHRocm93IEVycm9yKCdVbmtub3duIG9wdGlvbiAnICsgb3B0KTtcbiAgICB9XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIGlzT2xkZXJWZXJzaW9uOiBpc09sZGVyVmVyc2lvbixcbiAgYXNzZXJ0T3B0aW9uczogYXNzZXJ0T3B0aW9ucyxcbiAgdmFsaWRhdG9yczogdmFsaWRhdG9yc1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/lib/utils.js": +/*!*********************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/utils.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\");\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi91dGlscy5qcz83NjJhIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFdBQVcsbUJBQU8sQ0FBQyx1RkFBZ0I7O0FBRW5DOztBQUVBOztBQUV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JlcjogaXNOdW1iZXIsXG4gIGlzT2JqZWN0OiBpc09iamVjdCxcbiAgaXNQbGFpbk9iamVjdDogaXNQbGFpbk9iamVjdCxcbiAgaXNVbmRlZmluZWQ6IGlzVW5kZWZpbmVkLFxuICBpc0RhdGU6IGlzRGF0ZSxcbiAgaXNGaWxlOiBpc0ZpbGUsXG4gIGlzQmxvYjogaXNCbG9iLFxuICBpc0Z1bmN0aW9uOiBpc0Z1bmN0aW9uLFxuICBpc1N0cmVhbTogaXNTdHJlYW0sXG4gIGlzVVJMU2VhcmNoUGFyYW1zOiBpc1VSTFNlYXJjaFBhcmFtcyxcbiAgaXNTdGFuZGFyZEJyb3dzZXJFbnY6IGlzU3RhbmRhcmRCcm93c2VyRW52LFxuICBmb3JFYWNoOiBmb3JFYWNoLFxuICBtZXJnZTogbWVyZ2UsXG4gIGV4dGVuZDogZXh0ZW5kLFxuICB0cmltOiB0cmltLFxuICBzdHJpcEJPTTogc3RyaXBCT01cbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/utils.js\n"); + +/***/ }), + +/***/ "../../../../axios@0.21.4/node_modules/axios/package.json": +/*!*********************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/package.json ***! + \*********************************************************************************************************/ +/*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */ +/***/ (function(module) { + +eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"axios\\\",\\\"version\\\":\\\"0.21.4\\\",\\\"description\\\":\\\"Promise based HTTP client for the browser and node.js\\\",\\\"main\\\":\\\"index.js\\\",\\\"scripts\\\":{\\\"test\\\":\\\"grunt test\\\",\\\"start\\\":\\\"node ./sandbox/server.js\\\",\\\"build\\\":\\\"NODE_ENV=production grunt build\\\",\\\"preversion\\\":\\\"npm test\\\",\\\"version\\\":\\\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\\\",\\\"postversion\\\":\\\"git push && git push --tags\\\",\\\"examples\\\":\\\"node ./examples/server.js\\\",\\\"coveralls\\\":\\\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\\\",\\\"fix\\\":\\\"eslint --fix lib/**/*.js\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/axios/axios.git\\\"},\\\"keywords\\\":[\\\"xhr\\\",\\\"http\\\",\\\"ajax\\\",\\\"promise\\\",\\\"node\\\"],\\\"author\\\":\\\"Matt Zabriskie\\\",\\\"license\\\":\\\"MIT\\\",\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/axios/axios/issues\\\"},\\\"homepage\\\":\\\"https://axios-http.com\\\",\\\"devDependencies\\\":{\\\"coveralls\\\":\\\"^3.0.0\\\",\\\"es6-promise\\\":\\\"^4.2.4\\\",\\\"grunt\\\":\\\"^1.3.0\\\",\\\"grunt-banner\\\":\\\"^0.6.0\\\",\\\"grunt-cli\\\":\\\"^1.2.0\\\",\\\"grunt-contrib-clean\\\":\\\"^1.1.0\\\",\\\"grunt-contrib-watch\\\":\\\"^1.0.0\\\",\\\"grunt-eslint\\\":\\\"^23.0.0\\\",\\\"grunt-karma\\\":\\\"^4.0.0\\\",\\\"grunt-mocha-test\\\":\\\"^0.13.3\\\",\\\"grunt-ts\\\":\\\"^6.0.0-beta.19\\\",\\\"grunt-webpack\\\":\\\"^4.0.2\\\",\\\"istanbul-instrumenter-loader\\\":\\\"^1.0.0\\\",\\\"jasmine-core\\\":\\\"^2.4.1\\\",\\\"karma\\\":\\\"^6.3.2\\\",\\\"karma-chrome-launcher\\\":\\\"^3.1.0\\\",\\\"karma-firefox-launcher\\\":\\\"^2.1.0\\\",\\\"karma-jasmine\\\":\\\"^1.1.1\\\",\\\"karma-jasmine-ajax\\\":\\\"^0.1.13\\\",\\\"karma-safari-launcher\\\":\\\"^1.0.0\\\",\\\"karma-sauce-launcher\\\":\\\"^4.3.6\\\",\\\"karma-sinon\\\":\\\"^1.0.5\\\",\\\"karma-sourcemap-loader\\\":\\\"^0.3.8\\\",\\\"karma-webpack\\\":\\\"^4.0.2\\\",\\\"load-grunt-tasks\\\":\\\"^3.5.2\\\",\\\"minimist\\\":\\\"^1.2.0\\\",\\\"mocha\\\":\\\"^8.2.1\\\",\\\"sinon\\\":\\\"^4.5.0\\\",\\\"terser-webpack-plugin\\\":\\\"^4.2.3\\\",\\\"typescript\\\":\\\"^4.0.5\\\",\\\"url-search-params\\\":\\\"^0.10.0\\\",\\\"webpack\\\":\\\"^4.44.2\\\",\\\"webpack-dev-server\\\":\\\"^3.11.0\\\"},\\\"browser\\\":{\\\"./lib/adapters/http.js\\\":\\\"./lib/adapters/xhr.js\\\"},\\\"jsdelivr\\\":\\\"dist/axios.min.js\\\",\\\"unpkg\\\":\\\"dist/axios.min.js\\\",\\\"typings\\\":\\\"./index.d.ts\\\",\\\"dependencies\\\":{\\\"follow-redirects\\\":\\\"^1.14.0\\\"},\\\"bundlesize\\\":[{\\\"path\\\":\\\"./dist/axios.min.js\\\",\\\"threshold\\\":\\\"5kB\\\"}]}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL3BhY2thZ2UuanNvbi5qcyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/package.json\n"); + +/***/ }), + +/***/ "../../../../brace@0.11.1/node_modules/brace/index.js": +/*!*****************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/index.js ***! + \*****************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("/* ***** BEGIN LICENSE BLOCK *****\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * ***** END LICENSE BLOCK ***** */\n\n/**\n * Define a module along with a payload\n * @param module a name for the payload\n * @param payload a function to call with (acequire, exports, module) params\n */\n\n(function() {\n\nvar ACE_NAMESPACE = \"ace\";\n\nvar global = (function() { return this; })();\nif (!global && typeof window != \"undefined\") global = window; // strict mode\n\n\nif (!ACE_NAMESPACE && typeof acequirejs !== \"undefined\")\n return;\n\n\nvar define = function(module, deps, payload) {\n if (typeof module !== \"string\") {\n if (define.original)\n define.original.apply(this, arguments);\n else {\n console.error(\"dropping module because define wasn\\'t a string.\");\n console.trace();\n }\n return;\n }\n if (arguments.length == 2)\n payload = deps;\n if (!define.modules[module]) {\n define.payloads[module] = payload;\n define.modules[module] = null;\n }\n};\n\ndefine.modules = {};\ndefine.payloads = {};\n\n/**\n * Get at functionality define()ed using the function above\n */\nvar _acequire = function(parentId, module, callback) {\n if (typeof module === \"string\") {\n var payload = lookup(parentId, module);\n if (payload != undefined) {\n callback && callback();\n return payload;\n }\n } else if (Object.prototype.toString.call(module) === \"[object Array]\") {\n var params = [];\n for (var i = 0, l = module.length; i < l; ++i) {\n var dep = lookup(parentId, module[i]);\n if (dep == undefined && acequire.original)\n return;\n params.push(dep);\n }\n return callback && callback.apply(null, params) || true;\n }\n};\n\nvar acequire = function(module, callback) {\n var packagedModule = _acequire(\"\", module, callback);\n if (packagedModule == undefined && acequire.original)\n return acequire.original.apply(this, arguments);\n return packagedModule;\n};\n\nvar normalizeModule = function(parentId, moduleName) {\n // normalize plugin acequires\n if (moduleName.indexOf(\"!\") !== -1) {\n var chunks = moduleName.split(\"!\");\n return normalizeModule(parentId, chunks[0]) + \"!\" + normalizeModule(parentId, chunks[1]);\n }\n // normalize relative acequires\n if (moduleName.charAt(0) == \".\") {\n var base = parentId.split(\"/\").slice(0, -1).join(\"/\");\n moduleName = base + \"/\" + moduleName;\n\n while(moduleName.indexOf(\".\") !== -1 && previous != moduleName) {\n var previous = moduleName;\n moduleName = moduleName.replace(/\\/\\.\\//, \"/\").replace(/[^\\/]+\\/\\.\\.\\//, \"\");\n }\n }\n return moduleName;\n};\n\n/**\n * Internal function to lookup moduleNames and resolve them by calling the\n * definition function if needed.\n */\nvar lookup = function(parentId, moduleName) {\n moduleName = normalizeModule(parentId, moduleName);\n\n var module = define.modules[moduleName];\n if (!module) {\n module = define.payloads[moduleName];\n if (typeof module === 'function') {\n var exports = {};\n var mod = {\n id: moduleName,\n uri: '',\n exports: exports,\n packaged: true\n };\n\n var req = function(module, callback) {\n return _acequire(moduleName, module, callback);\n };\n\n var returnValue = module(req, exports, mod);\n exports = returnValue || mod.exports;\n define.modules[moduleName] = exports;\n delete define.payloads[moduleName];\n }\n module = define.modules[moduleName] = exports || module;\n }\n return module;\n};\n\nfunction exportAce(ns) {\n var root = global;\n if (ns) {\n if (!global[ns])\n global[ns] = {};\n root = global[ns];\n }\n\n if (!root.define || !root.define.packaged) {\n define.original = root.define;\n root.define = define;\n root.define.packaged = true;\n }\n\n if (!root.acequire || !root.acequire.packaged) {\n acequire.original = root.acequire;\n root.acequire = acequire;\n root.acequire.packaged = true;\n }\n}\n\nexportAce(ACE_NAMESPACE);\n\n})();\n\nace.define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\n var real = {\n exec: RegExp.prototype.exec,\n test: RegExp.prototype.test,\n match: String.prototype.match,\n replace: String.prototype.replace,\n split: String.prototype.split\n },\n compliantExecNpcg = real.exec.call(/()??/, \"\")[1] === undefined, // check `exec` handling of nonparticipating capturing groups\n compliantLastIndexIncrement = function () {\n var x = /^/g;\n real.test.call(x, \"\");\n return !x.lastIndex;\n }();\n\n if (compliantLastIndexIncrement && compliantExecNpcg)\n return;\n RegExp.prototype.exec = function (str) {\n var match = real.exec.apply(this, arguments),\n name, r2;\n if ( typeof(str) == 'string' && match) {\n if (!compliantExecNpcg && match.length > 1 && indexOf(match, \"\") > -1) {\n r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), \"g\", \"\"));\n real.replace.call(str.slice(match.index), r2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined)\n match[i] = undefined;\n }\n });\n }\n if (this._xregexp && this._xregexp.captureNames) {\n for (var i = 1; i < match.length; i++) {\n name = this._xregexp.captureNames[i - 1];\n if (name)\n match[name] = match[i];\n }\n }\n if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n }\n return match;\n };\n if (!compliantLastIndexIncrement) {\n RegExp.prototype.test = function (str) {\n var match = real.exec.call(this, str);\n if (match && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n return !!match;\n };\n }\n\n function getNativeFlags (regex) {\n return (regex.global ? \"g\" : \"\") +\n (regex.ignoreCase ? \"i\" : \"\") +\n (regex.multiline ? \"m\" : \"\") +\n (regex.extended ? \"x\" : \"\") + // Proposed for ES4; included in AS3\n (regex.sticky ? \"y\" : \"\");\n }\n\n function indexOf (array, item, from) {\n if (Array.prototype.indexOf) // Use the native array method if available\n return array.indexOf(item, from);\n for (var i = from || 0; i < array.length; i++) {\n if (array[i] === item)\n return i;\n }\n return -1;\n }\n\n});\n\nace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\nfunction Empty() {}\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function bind(that) { // .length is 1\n var target = this;\n if (typeof target != \"function\") {\n throw new TypeError(\"Function.prototype.bind called on incompatible \" + target);\n }\n var args = slice.call(arguments, 1); // for normal call\n var bound = function () {\n\n if (this instanceof bound) {\n\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n\n }\n\n };\n if(target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n return bound;\n };\n}\nvar call = Function.prototype.call;\nvar prototypeOfArray = Array.prototype;\nvar prototypeOfObject = Object.prototype;\nvar slice = prototypeOfArray.slice;\nvar _toString = call.bind(prototypeOfObject.toString);\nvar owns = call.bind(prototypeOfObject.hasOwnProperty);\nvar defineGetter;\nvar defineSetter;\nvar lookupGetter;\nvar lookupSetter;\nvar supportsAccessors;\nif ((supportsAccessors = owns(prototypeOfObject, \"__defineGetter__\"))) {\n defineGetter = call.bind(prototypeOfObject.__defineGetter__);\n defineSetter = call.bind(prototypeOfObject.__defineSetter__);\n lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);\n lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);\n}\nif ([1,2].splice(0).length != 2) {\n if(function() { // test IE < 9 to splice bug - see issue #138\n function makeArray(l) {\n var a = new Array(l+2);\n a[0] = a[1] = 0;\n return a;\n }\n var array = [], lengthBefore;\n \n array.splice.apply(array, makeArray(20));\n array.splice.apply(array, makeArray(26));\n\n lengthBefore = array.length; //46\n array.splice(5, 0, \"XXX\"); // add one element\n\n lengthBefore + 1 == array.length\n\n if (lengthBefore + 1 == array.length) {\n return true;// has right splice implementation without bugs\n }\n }()) {//IE 6/7\n var array_splice = Array.prototype.splice;\n Array.prototype.splice = function(start, deleteCount) {\n if (!arguments.length) {\n return [];\n } else {\n return array_splice.apply(this, [\n start === void 0 ? 0 : start,\n deleteCount === void 0 ? (this.length - start) : deleteCount\n ].concat(slice.call(arguments, 2)))\n }\n };\n } else {//IE8\n Array.prototype.splice = function(pos, removeCount){\n var length = this.length;\n if (pos > 0) {\n if (pos > length)\n pos = length;\n } else if (pos == void 0) {\n pos = 0;\n } else if (pos < 0) {\n pos = Math.max(length + pos, 0);\n }\n\n if (!(pos+removeCount < length))\n removeCount = length - pos;\n\n var removed = this.slice(pos, pos+removeCount);\n var insert = slice.call(arguments, 2);\n var add = insert.length; \n if (pos === length) {\n if (add) {\n this.push.apply(this, insert);\n }\n } else {\n var remove = Math.min(removeCount, length - pos);\n var tailOldPos = pos + remove;\n var tailNewPos = tailOldPos + add - remove;\n var tailCount = length - tailOldPos;\n var lengthAfterRemove = length - remove;\n\n if (tailNewPos < tailOldPos) { // case A\n for (var i = 0; i < tailCount; ++i) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } else if (tailNewPos > tailOldPos) { // case B\n for (i = tailCount; i--; ) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } // else, add == remove (nothing to do)\n\n if (add && pos === lengthAfterRemove) {\n this.length = lengthAfterRemove; // truncate array\n this.push.apply(this, insert);\n } else {\n this.length = lengthAfterRemove + add; // reserves space\n for (i = 0; i < add; ++i) {\n this[pos+i] = insert[i];\n }\n }\n }\n return removed;\n };\n }\n}\nif (!Array.isArray) {\n Array.isArray = function isArray(obj) {\n return _toString(obj) == \"[object Array]\";\n };\n}\nvar boxedString = Object(\"a\"),\n splitString = boxedString[0] != \"a\" || !(0 in boxedString);\n\nif (!Array.prototype.forEach) {\n Array.prototype.forEach = function forEach(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n fun.call(thisp, self[i], i, object);\n }\n }\n };\n}\nif (!Array.prototype.map) {\n Array.prototype.map = function map(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = Array(length),\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self)\n result[i] = fun.call(thisp, self[i], i, object);\n }\n return result;\n };\n}\nif (!Array.prototype.filter) {\n Array.prototype.filter = function filter(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = [],\n value,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) {\n value = self[i];\n if (fun.call(thisp, value, i, object)) {\n result.push(value);\n }\n }\n }\n return result;\n };\n}\nif (!Array.prototype.every) {\n Array.prototype.every = function every(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && !fun.call(thisp, self[i], i, object)) {\n return false;\n }\n }\n return true;\n };\n}\nif (!Array.prototype.some) {\n Array.prototype.some = function some(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && fun.call(thisp, self[i], i, object)) {\n return true;\n }\n }\n return false;\n };\n}\nif (!Array.prototype.reduce) {\n Array.prototype.reduce = function reduce(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n\n var i = 0;\n var result;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i++];\n break;\n }\n if (++i >= length) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n } while (true);\n }\n\n for (; i < length; i++) {\n if (i in self) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n }\n\n return result;\n };\n}\nif (!Array.prototype.reduceRight) {\n Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n\n var result, i = length - 1;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i--];\n break;\n }\n if (--i < 0) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n } while (true);\n }\n\n do {\n if (i in this) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n } while (i--);\n\n return result;\n };\n}\nif (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {\n Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n }\n i = i >= 0 ? i : Math.max(0, length + i);\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {\n Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n var i = length - 1;\n if (arguments.length > 1) {\n i = Math.min(i, toInteger(arguments[1]));\n }\n i = i >= 0 ? i : length - Math.abs(i);\n for (; i >= 0; i--) {\n if (i in self && sought === self[i]) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Object.getPrototypeOf) {\n Object.getPrototypeOf = function getPrototypeOf(object) {\n return object.__proto__ || (\n object.constructor ?\n object.constructor.prototype :\n prototypeOfObject\n );\n };\n}\nif (!Object.getOwnPropertyDescriptor) {\n var ERR_NON_OBJECT = \"Object.getOwnPropertyDescriptor called on a \" +\n \"non-object: \";\n Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT + object);\n if (!owns(object, property))\n return;\n\n var descriptor, getter, setter;\n descriptor = { enumerable: true, configurable: true };\n if (supportsAccessors) {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n\n var getter = lookupGetter(object, property);\n var setter = lookupSetter(object, property);\n object.__proto__ = prototype;\n\n if (getter || setter) {\n if (getter) descriptor.get = getter;\n if (setter) descriptor.set = setter;\n return descriptor;\n }\n }\n descriptor.value = object[property];\n return descriptor;\n };\n}\nif (!Object.getOwnPropertyNames) {\n Object.getOwnPropertyNames = function getOwnPropertyNames(object) {\n return Object.keys(object);\n };\n}\nif (!Object.create) {\n var createEmpty;\n if (Object.prototype.__proto__ === null) {\n createEmpty = function () {\n return { \"__proto__\": null };\n };\n } else {\n createEmpty = function () {\n var empty = {};\n for (var i in empty)\n empty[i] = null;\n empty.constructor =\n empty.hasOwnProperty =\n empty.propertyIsEnumerable =\n empty.isPrototypeOf =\n empty.toLocaleString =\n empty.toString =\n empty.valueOf =\n empty.__proto__ = null;\n return empty;\n }\n }\n\n Object.create = function create(prototype, properties) {\n var object;\n if (prototype === null) {\n object = createEmpty();\n } else {\n if (typeof prototype != \"object\")\n throw new TypeError(\"typeof prototype[\"+(typeof prototype)+\"] != 'object'\");\n var Type = function () {};\n Type.prototype = prototype;\n object = new Type();\n object.__proto__ = prototype;\n }\n if (properties !== void 0)\n Object.defineProperties(object, properties);\n return object;\n };\n}\n\nfunction doesDefinePropertyWork(object) {\n try {\n Object.defineProperty(object, \"sentinel\", {});\n return \"sentinel\" in object;\n } catch (exception) {\n }\n}\nif (Object.defineProperty) {\n var definePropertyWorksOnObject = doesDefinePropertyWork({});\n var definePropertyWorksOnDom = typeof document == \"undefined\" ||\n doesDefinePropertyWork(document.createElement(\"div\"));\n if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {\n var definePropertyFallback = Object.defineProperty;\n }\n}\n\nif (!Object.defineProperty || definePropertyFallback) {\n var ERR_NON_OBJECT_DESCRIPTOR = \"Property description must be an object: \";\n var ERR_NON_OBJECT_TARGET = \"Object.defineProperty called on non-object: \"\n var ERR_ACCESSORS_NOT_SUPPORTED = \"getters & setters can not be defined \" +\n \"on this javascript engine\";\n\n Object.defineProperty = function defineProperty(object, property, descriptor) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT_TARGET + object);\n if ((typeof descriptor != \"object\" && typeof descriptor != \"function\") || descriptor === null)\n throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);\n if (definePropertyFallback) {\n try {\n return definePropertyFallback.call(Object, object, property, descriptor);\n } catch (exception) {\n }\n }\n if (owns(descriptor, \"value\")) {\n\n if (supportsAccessors && (lookupGetter(object, property) ||\n lookupSetter(object, property)))\n {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n delete object[property];\n object[property] = descriptor.value;\n object.__proto__ = prototype;\n } else {\n object[property] = descriptor.value;\n }\n } else {\n if (!supportsAccessors)\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n if (owns(descriptor, \"get\"))\n defineGetter(object, property, descriptor.get);\n if (owns(descriptor, \"set\"))\n defineSetter(object, property, descriptor.set);\n }\n\n return object;\n };\n}\nif (!Object.defineProperties) {\n Object.defineProperties = function defineProperties(object, properties) {\n for (var property in properties) {\n if (owns(properties, property))\n Object.defineProperty(object, property, properties[property]);\n }\n return object;\n };\n}\nif (!Object.seal) {\n Object.seal = function seal(object) {\n return object;\n };\n}\nif (!Object.freeze) {\n Object.freeze = function freeze(object) {\n return object;\n };\n}\ntry {\n Object.freeze(function () {});\n} catch (exception) {\n Object.freeze = (function freeze(freezeObject) {\n return function freeze(object) {\n if (typeof object == \"function\") {\n return object;\n } else {\n return freezeObject(object);\n }\n };\n })(Object.freeze);\n}\nif (!Object.preventExtensions) {\n Object.preventExtensions = function preventExtensions(object) {\n return object;\n };\n}\nif (!Object.isSealed) {\n Object.isSealed = function isSealed(object) {\n return false;\n };\n}\nif (!Object.isFrozen) {\n Object.isFrozen = function isFrozen(object) {\n return false;\n };\n}\nif (!Object.isExtensible) {\n Object.isExtensible = function isExtensible(object) {\n if (Object(object) === object) {\n throw new TypeError(); // TODO message\n }\n var name = '';\n while (owns(object, name)) {\n name += '?';\n }\n object[name] = true;\n var returnValue = owns(object, name);\n delete object[name];\n return returnValue;\n };\n}\nif (!Object.keys) {\n var hasDontEnumBug = true,\n dontEnums = [\n \"toString\",\n \"toLocaleString\",\n \"valueOf\",\n \"hasOwnProperty\",\n \"isPrototypeOf\",\n \"propertyIsEnumerable\",\n \"constructor\"\n ],\n dontEnumsLength = dontEnums.length;\n\n for (var key in {\"toString\": null}) {\n hasDontEnumBug = false;\n }\n\n Object.keys = function keys(object) {\n\n if (\n (typeof object != \"object\" && typeof object != \"function\") ||\n object === null\n ) {\n throw new TypeError(\"Object.keys called on a non-object\");\n }\n\n var keys = [];\n for (var name in object) {\n if (owns(object, name)) {\n keys.push(name);\n }\n }\n\n if (hasDontEnumBug) {\n for (var i = 0, ii = dontEnumsLength; i < ii; i++) {\n var dontEnum = dontEnums[i];\n if (owns(object, dontEnum)) {\n keys.push(dontEnum);\n }\n }\n }\n return keys;\n };\n\n}\nif (!Date.now) {\n Date.now = function now() {\n return new Date().getTime();\n };\n}\nvar ws = \"\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\" +\n \"\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\" +\n \"\\u2029\\uFEFF\";\nif (!String.prototype.trim || ws.trim()) {\n ws = \"[\" + ws + \"]\";\n var trimBeginRegexp = new RegExp(\"^\" + ws + ws + \"*\"),\n trimEndRegexp = new RegExp(ws + ws + \"*$\");\n String.prototype.trim = function trim() {\n return String(this).replace(trimBeginRegexp, \"\").replace(trimEndRegexp, \"\");\n };\n}\n\nfunction toInteger(n) {\n n = +n;\n if (n !== n) { // isNaN\n n = 0;\n } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n return n;\n}\n\nfunction isPrimitive(input) {\n var type = typeof input;\n return (\n input === null ||\n type === \"undefined\" ||\n type === \"boolean\" ||\n type === \"number\" ||\n type === \"string\"\n );\n}\n\nfunction toPrimitive(input) {\n var val, valueOf, toString;\n if (isPrimitive(input)) {\n return input;\n }\n valueOf = input.valueOf;\n if (typeof valueOf === \"function\") {\n val = valueOf.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n toString = input.toString;\n if (typeof toString === \"function\") {\n val = toString.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n throw new TypeError();\n}\nvar toObject = function (o) {\n if (o == null) { // this matches both null and undefined\n throw new TypeError(\"can't convert \"+o+\" to object\");\n }\n return Object(o);\n};\n\n});\n\nace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./regexp\");\nacequire(\"./es5-shim\");\n\n});\n\nace.define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar XHTML_NS = \"http://www.w3.org/1999/xhtml\";\n\nexports.getDocumentHead = function(doc) {\n if (!doc)\n doc = document;\n return doc.head || doc.getElementsByTagName(\"head\")[0] || doc.documentElement;\n};\n\nexports.createElement = function(tag, ns) {\n return document.createElementNS ?\n document.createElementNS(ns || XHTML_NS, tag) :\n document.createElement(tag);\n};\n\nexports.hasCssClass = function(el, name) {\n var classes = (el.className + \"\").split(/\\s+/g);\n return classes.indexOf(name) !== -1;\n};\nexports.addCssClass = function(el, name) {\n if (!exports.hasCssClass(el, name)) {\n el.className += \" \" + name;\n }\n};\nexports.removeCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g);\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n classes.splice(index, 1);\n }\n el.className = classes.join(\" \");\n};\n\nexports.toggleCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g), add = true;\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n add = false;\n classes.splice(index, 1);\n }\n if (add)\n classes.push(name);\n\n el.className = classes.join(\" \");\n return add;\n};\nexports.setCssClass = function(node, className, include) {\n if (include) {\n exports.addCssClass(node, className);\n } else {\n exports.removeCssClass(node, className);\n }\n};\n\nexports.hasCssString = function(id, doc) {\n var index = 0, sheets;\n doc = doc || document;\n\n if (doc.createStyleSheet && (sheets = doc.styleSheets)) {\n while (index < sheets.length)\n if (sheets[index++].owningElement.id === id) return true;\n } else if ((sheets = doc.getElementsByTagName(\"style\"))) {\n while (index < sheets.length)\n if (sheets[index++].id === id) return true;\n }\n\n return false;\n};\n\nexports.importCssString = function importCssString(cssText, id, doc) {\n doc = doc || document;\n if (id && exports.hasCssString(id, doc))\n return null;\n \n var style;\n \n if (id)\n cssText += \"\\n/*# sourceURL=ace/css/\" + id + \" */\";\n \n if (doc.createStyleSheet) {\n style = doc.createStyleSheet();\n style.cssText = cssText;\n if (id)\n style.owningElement.id = id;\n } else {\n style = exports.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n if (id)\n style.id = id;\n\n exports.getDocumentHead(doc).appendChild(style);\n }\n};\n\nexports.importCssStylsheet = function(uri, doc) {\n if (doc.createStyleSheet) {\n doc.createStyleSheet(uri);\n } else {\n var link = exports.createElement('link');\n link.rel = 'stylesheet';\n link.href = uri;\n\n exports.getDocumentHead(doc).appendChild(link);\n }\n};\n\nexports.getInnerWidth = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingLeft\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingRight\"), 10) + \n element.clientWidth\n );\n};\n\nexports.getInnerHeight = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingTop\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingBottom\"), 10) +\n element.clientHeight\n );\n};\n\nexports.scrollbarWidth = function(document) {\n var inner = exports.createElement(\"ace_inner\");\n inner.style.width = \"100%\";\n inner.style.minWidth = \"0px\";\n inner.style.height = \"200px\";\n inner.style.display = \"block\";\n\n var outer = exports.createElement(\"ace_outer\");\n var style = outer.style;\n\n style.position = \"absolute\";\n style.left = \"-10000px\";\n style.overflow = \"hidden\";\n style.width = \"200px\";\n style.minWidth = \"0px\";\n style.height = \"150px\";\n style.display = \"block\";\n\n outer.appendChild(inner);\n\n var body = document.documentElement;\n body.appendChild(outer);\n\n var noScrollbar = inner.offsetWidth;\n\n style.overflow = \"scroll\";\n var withScrollbar = inner.offsetWidth;\n\n if (noScrollbar == withScrollbar) {\n withScrollbar = outer.clientWidth;\n }\n\n body.removeChild(outer);\n\n return noScrollbar-withScrollbar;\n};\n\nif (typeof document == \"undefined\") {\n exports.importCssString = function() {};\n return;\n}\n\nif (window.pageYOffset !== undefined) {\n exports.getPageScrollTop = function() {\n return window.pageYOffset;\n };\n\n exports.getPageScrollLeft = function() {\n return window.pageXOffset;\n };\n}\nelse {\n exports.getPageScrollTop = function() {\n return document.body.scrollTop;\n };\n\n exports.getPageScrollLeft = function() {\n return document.body.scrollLeft;\n };\n}\n\nif (window.getComputedStyle)\n exports.computedStyle = function(element, style) {\n if (style)\n return (window.getComputedStyle(element, \"\") || {})[style] || \"\";\n return window.getComputedStyle(element, \"\") || {};\n };\nelse\n exports.computedStyle = function(element, style) {\n if (style)\n return element.currentStyle[style];\n return element.currentStyle;\n };\nexports.setInnerHtml = function(el, innerHtml) {\n var element = el.cloneNode(false);//document.createElement(\"div\");\n element.innerHTML = innerHtml;\n el.parentNode.replaceChild(element, el);\n return element;\n};\n\nif (\"textContent\" in document.documentElement) {\n exports.setInnerText = function(el, innerText) {\n el.textContent = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.textContent;\n };\n}\nelse {\n exports.setInnerText = function(el, innerText) {\n el.innerText = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.innerText;\n };\n}\n\nexports.getParentWindow = function(document) {\n return document.defaultView || document.parentWindow;\n};\n\n});\n\nace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.inherits = function(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n};\n\nexports.mixin = function(obj, mixin) {\n for (var key in mixin) {\n obj[key] = mixin[key];\n }\n return obj;\n};\n\nexports.implement = function(proto, mixin) {\n exports.mixin(proto, mixin);\n};\n\n});\n\nace.define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./fixoldbrowsers\");\n\nvar oop = acequire(\"./oop\");\nvar Keys = (function() {\n var ret = {\n MODIFIER_KEYS: {\n 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'\n },\n\n KEY_MODS: {\n \"ctrl\": 1, \"alt\": 2, \"option\" : 2, \"shift\": 4,\n \"super\": 8, \"meta\": 8, \"command\": 8, \"cmd\": 8\n },\n\n FUNCTION_KEYS : {\n 8 : \"Backspace\",\n 9 : \"Tab\",\n 13 : \"Return\",\n 19 : \"Pause\",\n 27 : \"Esc\",\n 32 : \"Space\",\n 33 : \"PageUp\",\n 34 : \"PageDown\",\n 35 : \"End\",\n 36 : \"Home\",\n 37 : \"Left\",\n 38 : \"Up\",\n 39 : \"Right\",\n 40 : \"Down\",\n 44 : \"Print\",\n 45 : \"Insert\",\n 46 : \"Delete\",\n 96 : \"Numpad0\",\n 97 : \"Numpad1\",\n 98 : \"Numpad2\",\n 99 : \"Numpad3\",\n 100: \"Numpad4\",\n 101: \"Numpad5\",\n 102: \"Numpad6\",\n 103: \"Numpad7\",\n 104: \"Numpad8\",\n 105: \"Numpad9\",\n '-13': \"NumpadEnter\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"Numlock\",\n 145: \"Scrolllock\"\n },\n\n PRINTABLE_KEYS: {\n 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',\n 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',\n 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',\n 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',\n 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',\n 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',\n 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',\n 219: '[', 220: '\\\\',221: ']', 222: \"'\", 111: '/', 106: '*'\n }\n };\n var name, i;\n for (i in ret.FUNCTION_KEYS) {\n name = ret.FUNCTION_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n for (i in ret.PRINTABLE_KEYS) {\n name = ret.PRINTABLE_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n oop.mixin(ret, ret.MODIFIER_KEYS);\n oop.mixin(ret, ret.PRINTABLE_KEYS);\n oop.mixin(ret, ret.FUNCTION_KEYS);\n ret.enter = ret[\"return\"];\n ret.escape = ret.esc;\n ret.del = ret[\"delete\"];\n ret[173] = '-';\n \n (function() {\n var mods = [\"cmd\", \"ctrl\", \"alt\", \"shift\"];\n for (var i = Math.pow(2, mods.length); i--;) { \n ret.KEY_MODS[i] = mods.filter(function(x) {\n return i & ret.KEY_MODS[x];\n }).join(\"-\") + \"-\";\n }\n })();\n\n ret.KEY_MODS[0] = \"\";\n ret.KEY_MODS[-1] = \"input-\";\n\n return ret;\n})();\noop.mixin(exports, Keys);\n\nexports.keyCodeToString = function(keyCode) {\n var keyString = Keys[keyCode];\n if (typeof keyString != \"string\")\n keyString = String.fromCharCode(keyCode);\n return keyString.toLowerCase();\n};\n\n});\n\nace.define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.OS = {\n LINUX: \"LINUX\",\n MAC: \"MAC\",\n WINDOWS: \"WINDOWS\"\n};\nexports.getOS = function() {\n if (exports.isMac) {\n return exports.OS.MAC;\n } else if (exports.isLinux) {\n return exports.OS.LINUX;\n } else {\n return exports.OS.WINDOWS;\n }\n};\nif (typeof navigator != \"object\")\n return;\n\nvar os = (navigator.platform.match(/mac|win|linux/i) || [\"other\"])[0].toLowerCase();\nvar ua = navigator.userAgent;\nexports.isWin = (os == \"win\");\nexports.isMac = (os == \"mac\");\nexports.isLinux = (os == \"linux\");\nexports.isIE = \n (navigator.appName == \"Microsoft Internet Explorer\" || navigator.appName.indexOf(\"MSAppHost\") >= 0)\n ? parseFloat((ua.match(/(?:MSIE |Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1])\n : parseFloat((ua.match(/(?:Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1]); // for ie\n \nexports.isOldIE = exports.isIE && exports.isIE < 9;\nexports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === \"Gecko\";\nexports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv:(\\d+)/)||[])[1], 10) < 4;\nexports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == \"[object Opera]\";\nexports.isWebKit = parseFloat(ua.split(\"WebKit/\")[1]) || undefined;\n\nexports.isChrome = parseFloat(ua.split(\" Chrome/\")[1]) || undefined;\n\nexports.isAIR = ua.indexOf(\"AdobeAIR\") >= 0;\n\nexports.isIPad = ua.indexOf(\"iPad\") >= 0;\n\nexports.isChromeOS = ua.indexOf(\" CrOS \") >= 0;\n\nexports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream;\n\nif (exports.isIOS) exports.isMac = true;\n\n});\n\nace.define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keys = acequire(\"./keys\");\nvar useragent = acequire(\"./useragent\");\n\nvar pressedKeys = null;\nvar ts = 0;\n\nexports.addListener = function(elem, type, callback) {\n if (elem.addEventListener) {\n return elem.addEventListener(type, callback, false);\n }\n if (elem.attachEvent) {\n var wrapper = function() {\n callback.call(elem, window.event);\n };\n callback._wrapper = wrapper;\n elem.attachEvent(\"on\" + type, wrapper);\n }\n};\n\nexports.removeListener = function(elem, type, callback) {\n if (elem.removeEventListener) {\n return elem.removeEventListener(type, callback, false);\n }\n if (elem.detachEvent) {\n elem.detachEvent(\"on\" + type, callback._wrapper || callback);\n }\n};\nexports.stopEvent = function(e) {\n exports.stopPropagation(e);\n exports.preventDefault(e);\n return false;\n};\n\nexports.stopPropagation = function(e) {\n if (e.stopPropagation)\n e.stopPropagation();\n else\n e.cancelBubble = true;\n};\n\nexports.preventDefault = function(e) {\n if (e.preventDefault)\n e.preventDefault();\n else\n e.returnValue = false;\n};\nexports.getButton = function(e) {\n if (e.type == \"dblclick\")\n return 0;\n if (e.type == \"contextmenu\" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))\n return 2;\n if (e.preventDefault) {\n return e.button;\n }\n else {\n return {1:0, 2:2, 4:1}[e.button];\n }\n};\n\nexports.capture = function(el, eventHandler, releaseCaptureHandler) {\n function onMouseUp(e) {\n eventHandler && eventHandler(e);\n releaseCaptureHandler && releaseCaptureHandler(e);\n\n exports.removeListener(document, \"mousemove\", eventHandler, true);\n exports.removeListener(document, \"mouseup\", onMouseUp, true);\n exports.removeListener(document, \"dragstart\", onMouseUp, true);\n }\n\n exports.addListener(document, \"mousemove\", eventHandler, true);\n exports.addListener(document, \"mouseup\", onMouseUp, true);\n exports.addListener(document, \"dragstart\", onMouseUp, true);\n \n return onMouseUp;\n};\n\nexports.addTouchMoveListener = function (el, callback) {\n var startx, starty;\n exports.addListener(el, \"touchstart\", function (e) {\n var touches = e.touches;\n var touchObj = touches[0];\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n });\n exports.addListener(el, \"touchmove\", function (e) {\n var touches = e.touches;\n if (touches.length > 1) return;\n\n var touchObj = touches[0];\n\n e.wheelX = startx - touchObj.clientX;\n e.wheelY = starty - touchObj.clientY;\n\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n\n callback(e);\n });\n};\n\nexports.addMouseWheelListener = function(el, callback) {\n if (\"onmousewheel\" in el) {\n exports.addListener(el, \"mousewheel\", function(e) {\n var factor = 8;\n if (e.wheelDeltaX !== undefined) {\n e.wheelX = -e.wheelDeltaX / factor;\n e.wheelY = -e.wheelDeltaY / factor;\n } else {\n e.wheelX = 0;\n e.wheelY = -e.wheelDelta / factor;\n }\n callback(e);\n });\n } else if (\"onwheel\" in el) {\n exports.addListener(el, \"wheel\", function(e) {\n var factor = 0.35;\n switch (e.deltaMode) {\n case e.DOM_DELTA_PIXEL:\n e.wheelX = e.deltaX * factor || 0;\n e.wheelY = e.deltaY * factor || 0;\n break;\n case e.DOM_DELTA_LINE:\n case e.DOM_DELTA_PAGE:\n e.wheelX = (e.deltaX || 0) * 5;\n e.wheelY = (e.deltaY || 0) * 5;\n break;\n }\n \n callback(e);\n });\n } else {\n exports.addListener(el, \"DOMMouseScroll\", function(e) {\n if (e.axis && e.axis == e.HORIZONTAL_AXIS) {\n e.wheelX = (e.detail || 0) * 5;\n e.wheelY = 0;\n } else {\n e.wheelX = 0;\n e.wheelY = (e.detail || 0) * 5;\n }\n callback(e);\n });\n }\n};\n\nexports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) {\n var clicks = 0;\n var startX, startY, timer; \n var eventNames = {\n 2: \"dblclick\",\n 3: \"tripleclick\",\n 4: \"quadclick\"\n };\n\n function onMousedown(e) {\n if (exports.getButton(e) !== 0) {\n clicks = 0;\n } else if (e.detail > 1) {\n clicks++;\n if (clicks > 4)\n clicks = 1;\n } else {\n clicks = 1;\n }\n if (useragent.isIE) {\n var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;\n if (!timer || isNewClick)\n clicks = 1;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600);\n\n if (clicks == 1) {\n startX = e.clientX;\n startY = e.clientY;\n }\n }\n \n e._clicks = clicks;\n\n eventHandler[callbackName](\"mousedown\", e);\n\n if (clicks > 4)\n clicks = 0;\n else if (clicks > 1)\n return eventHandler[callbackName](eventNames[clicks], e);\n }\n function onDblclick(e) {\n clicks = 2;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600);\n eventHandler[callbackName](\"mousedown\", e);\n eventHandler[callbackName](eventNames[clicks], e);\n }\n if (!Array.isArray(elements))\n elements = [elements];\n elements.forEach(function(el) {\n exports.addListener(el, \"mousedown\", onMousedown);\n if (useragent.isOldIE)\n exports.addListener(el, \"dblclick\", onDblclick);\n });\n};\n\nvar getModifierHash = useragent.isMac && useragent.isOpera && !(\"KeyboardEvent\" in window)\n ? function(e) {\n return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);\n }\n : function(e) {\n return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);\n };\n\nexports.getModifierString = function(e) {\n return keys.KEY_MODS[getModifierHash(e)];\n};\n\nfunction normalizeCommandKeys(callback, e, keyCode) {\n var hashId = getModifierHash(e);\n\n if (!useragent.isMac && pressedKeys) {\n if (e.getModifierState && (e.getModifierState(\"OS\") || e.getModifierState(\"Win\")))\n hashId |= 8;\n if (pressedKeys.altGr) {\n if ((3 & hashId) != 3)\n pressedKeys.altGr = 0;\n else\n return;\n }\n if (keyCode === 18 || keyCode === 17) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (keyCode === 17 && location === 1) {\n if (pressedKeys[keyCode] == 1)\n ts = e.timeStamp;\n } else if (keyCode === 18 && hashId === 3 && location === 2) {\n var dt = e.timeStamp - ts;\n if (dt < 50)\n pressedKeys.altGr = true;\n }\n }\n }\n \n if (keyCode in keys.MODIFIER_KEYS) {\n keyCode = -1;\n }\n if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {\n keyCode = -1;\n }\n \n if (!hashId && keyCode === 13) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (location === 3) {\n callback(e, hashId, -keyCode);\n if (e.defaultPrevented)\n return;\n }\n }\n \n if (useragent.isChromeOS && hashId & 8) {\n callback(e, hashId, keyCode);\n if (e.defaultPrevented)\n return;\n else\n hashId &= ~8;\n }\n if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {\n return false;\n }\n \n return callback(e, hashId, keyCode);\n}\n\n\nexports.addCommandKeyListener = function(el, callback) {\n var addListener = exports.addListener;\n if (useragent.isOldGecko || (useragent.isOpera && !(\"KeyboardEvent\" in window))) {\n var lastKeyDownKeyCode = null;\n addListener(el, \"keydown\", function(e) {\n lastKeyDownKeyCode = e.keyCode;\n });\n addListener(el, \"keypress\", function(e) {\n return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);\n });\n } else {\n var lastDefaultPrevented = null;\n\n addListener(el, \"keydown\", function(e) {\n pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;\n var result = normalizeCommandKeys(callback, e, e.keyCode);\n lastDefaultPrevented = e.defaultPrevented;\n return result;\n });\n\n addListener(el, \"keypress\", function(e) {\n if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {\n exports.stopEvent(e);\n lastDefaultPrevented = null;\n }\n });\n\n addListener(el, \"keyup\", function(e) {\n pressedKeys[e.keyCode] = null;\n });\n\n if (!pressedKeys) {\n resetPressedKeys();\n addListener(window, \"focus\", resetPressedKeys);\n }\n }\n};\nfunction resetPressedKeys() {\n pressedKeys = Object.create(null);\n}\n\nif (typeof window == \"object\" && window.postMessage && !useragent.isOldIE) {\n var postMessageId = 1;\n exports.nextTick = function(callback, win) {\n win = win || window;\n var messageName = \"zero-timeout-message-\" + postMessageId;\n exports.addListener(win, \"message\", function listener(e) {\n if (e.data == messageName) {\n exports.stopPropagation(e);\n exports.removeListener(win, \"message\", listener);\n callback();\n }\n });\n win.postMessage(messageName, \"*\");\n };\n}\n\n\nexports.nextFrame = typeof window == \"object\" && (window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame\n || window.oRequestAnimationFrame);\n\nif (exports.nextFrame)\n exports.nextFrame = exports.nextFrame.bind(window);\nelse\n exports.nextFrame = function(callback) {\n setTimeout(callback, 17);\n };\n});\n\nace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.last = function(a) {\n return a[a.length - 1];\n};\n\nexports.stringReverse = function(string) {\n return string.split(\"\").reverse().join(\"\");\n};\n\nexports.stringRepeat = function (string, count) {\n var result = '';\n while (count > 0) {\n if (count & 1)\n result += string;\n\n if (count >>= 1)\n string += string;\n }\n return result;\n};\n\nvar trimBeginRegexp = /^\\s\\s*/;\nvar trimEndRegexp = /\\s\\s*$/;\n\nexports.stringTrimLeft = function (string) {\n return string.replace(trimBeginRegexp, '');\n};\n\nexports.stringTrimRight = function (string) {\n return string.replace(trimEndRegexp, '');\n};\n\nexports.copyObject = function(obj) {\n var copy = {};\n for (var key in obj) {\n copy[key] = obj[key];\n }\n return copy;\n};\n\nexports.copyArray = function(array){\n var copy = [];\n for (var i=0, l=array.length; i PLACEHOLDER.length)\n data = data.substr(9);\n else if (data.substr(0, 4) == PLACEHOLDER.substr(0, 4))\n data = data.substr(4, data.length - PLACEHOLDER.length + 1);\n else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n if (data == PLACEHOLDER.charAt(0)) {\n } else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n\n if (data)\n host.onTextInput(data);\n }\n if (copied) {\n copied = false;\n }\n if (afterContextMenu)\n afterContextMenu = false;\n };\n var onInput = function(e) {\n if (inComposition)\n return;\n var data = text.value;\n sendText(data);\n resetValue();\n };\n\n var handleClipboardData = function(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch(e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function(e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n if (useragent.isIOS) {\n cut = isCut;\n text.value = \"\\n aa\" + data + \"a a\\n\";\n text.setSelectionRange(4, 4 + data.length);\n copied = {\n value: data\n };\n }\n isCut ? host.onCut() : host.onCopy();\n if (!useragent.isIOS) event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function(){\n copied = false;\n resetValue();\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n\n var onCut = function(e) {\n doCopy(e, true);\n };\n\n var onCopy = function(e) {\n doCopy(e, false);\n };\n\n var onPaste = function(e) {\n var data = handleClipboardData(e);\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n\n event.addListener(text, \"select\", onSelect);\n\n event.addListener(text, \"input\", onInput);\n\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n var onCompositionStart = function(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly)\n return;\n inComposition = {};\n inComposition.canUndo = host.session.$undoManager;\n host.onCompositionStart();\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", onCompositionEnd);\n if (inComposition.canUndo && !host.selection.isEmpty()) {\n host.insert(\"\");\n host.session.markUndoGroup();\n host.selection.clearSelection();\n }\n host.session.markUndoGroup();\n };\n\n var onCompositionUpdate = function() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n var val = text.value.replace(/\\x01/g, \"\");\n if (inComposition.lastValue === val) return;\n\n host.onCompositionUpdate(val);\n if (inComposition.lastValue)\n host.undo();\n if (inComposition.canUndo)\n inComposition.lastValue = val;\n if (inComposition.lastValue) {\n var r = host.selection.getRange();\n host.insert(inComposition.lastValue);\n host.session.markUndoGroup();\n inComposition.range = host.selection.getRange();\n host.selection.setRange(r);\n host.selection.clearSelection();\n }\n };\n\n var onCompositionEnd = function(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n var c = inComposition;\n inComposition = false;\n var timer = setTimeout(function() {\n timer = null;\n var str = text.value.replace(/\\x01/g, \"\");\n if (inComposition)\n return;\n else if (str == c.lastValue)\n resetValue();\n else if (!c.lastValue && str) {\n resetValue();\n sendText(str);\n }\n });\n inputHandler = function compositionInputHandler(str) {\n if (timer)\n clearTimeout(timer);\n str = str.replace(/\\x01/g, \"\");\n if (str == c.lastValue)\n return \"\";\n if (c.lastValue && timer)\n host.undo();\n return str;\n };\n host.onCompositionEnd();\n host.removeListener(\"mousedown\", onCompositionEnd);\n if (e.type == \"compositionend\" && c.range) {\n host.selection.setRange(c.range);\n }\n var needsOnInput =\n (!!useragent.isChrome && useragent.isChrome >= 53) ||\n (!!useragent.isWebKit && useragent.isWebKit >= 603);\n\n if (needsOnInput) {\n onInput();\n }\n };\n\n\n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50);\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n if (useragent.isGecko) {\n event.addListener(text, \"text\", function(){syncComposition.schedule();});\n } else {\n event.addListener(text, \"keyup\", function(){syncComposition.schedule();});\n event.addListener(text, \"keydown\", function(){syncComposition.schedule();});\n }\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function() {\n return text;\n };\n\n this.setReadOnly = function(readOnly) {\n text.readOnly = readOnly;\n };\n\n this.onContextMenu = function(e) {\n afterContextMenu = true;\n resetSelection(host.selection.isEmpty());\n host._emit(\"nativecontextmenu\", {target: host, domEvent: e});\n this.moveToMouse(e, true);\n };\n\n this.moveToMouse = function(e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + \"height:\" + text.style.height + \";\"\n + (useragent.isIE ? \"opacity:0.1;\" : \"\");\n\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight -2;\n var move = function(e) {\n text.style.left = e.clientX - left - 2 + \"px\";\n text.style.top = Math.min(e.clientY - top - 2, maxTop) + \"px\";\n };\n move(e);\n\n if (e.type != \"mousedown\")\n return;\n\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$keepTextAreaAtCursor = null;\n\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n if (host.renderer.$keepTextAreaAtCursor == null) {\n host.renderer.$keepTextAreaAtCursor = true;\n host.renderer.$moveTextAreaToCursor();\n }\n }, 0);\n }\n\n var onContextMenu = function(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function(e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n\n if (useragent.isIOS) {\n var typingResetTimeout = null;\n var typing = false;\n\n parentNode.addEventListener(\"keydown\", function (e) {\n if (typingResetTimeout) clearTimeout(typingResetTimeout);\n typing = true;\n });\n\n parentNode.addEventListener(\"keyup\", function (e) {\n typingResetTimeout = setTimeout(function () {\n typing = false;\n }, 100);\n });\n var detectArrowKeys = function(e) {\n if (document.activeElement !== text) return;\n if (typing) return;\n\n if (cut) {\n return setTimeout(function () {\n cut = false;\n }, 100);\n }\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n text.setSelectionRange(4, 5);\n if (selectionStart == selectionEnd) {\n switch (selectionStart) {\n case 0: host.onCommandKey(null, 0, KEYS.up); break;\n case 1: host.onCommandKey(null, 0, KEYS.home); break;\n case 2: host.onCommandKey(null, MODS.option, KEYS.left); break;\n case 4: host.onCommandKey(null, 0, KEYS.left); break;\n case 5: host.onCommandKey(null, 0, KEYS.right); break;\n case 7: host.onCommandKey(null, MODS.option, KEYS.right); break;\n case 8: host.onCommandKey(null, 0, KEYS.end); break;\n case 9: host.onCommandKey(null, 0, KEYS.down); break;\n }\n } else {\n switch (selectionEnd) {\n case 6: host.onCommandKey(null, MODS.shift, KEYS.right); break;\n case 7: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.right); break;\n case 8: host.onCommandKey(null, MODS.shift, KEYS.end); break;\n case 9: host.onCommandKey(null, MODS.shift, KEYS.down); break;\n }\n switch (selectionStart) {\n case 0: host.onCommandKey(null, MODS.shift, KEYS.up); break;\n case 1: host.onCommandKey(null, MODS.shift, KEYS.home); break;\n case 2: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.left); break;\n case 3: host.onCommandKey(null, MODS.shift, KEYS.left); break;\n }\n }\n };\n document.addEventListener(\"selectionchange\", detectArrowKeys);\n host.on(\"destroy\", function() {\n document.removeEventListener(\"selectionchange\", detectArrowKeys);\n });\n }\n};\n\nexports.TextInput = TextInput;\n});\n\nace.define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/keyboard/textinput_ios\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar BROKEN_SETDATA = useragent.isChrome < 18;\nvar USE_IE_MIME_TYPE = useragent.isIE;\n\nvar TextInputIOS = acequire(\"./textinput_ios\").TextInput;\nvar TextInput = function(parentNode, host) {\n if (useragent.isIOS)\n return TextInputIOS.call(this, parentNode, host);\n\n var text = dom.createElement(\"textarea\");\n text.className = \"ace_text-input\";\n\n text.setAttribute(\"wrap\", \"off\");\n text.setAttribute(\"autocorrect\", \"off\");\n text.setAttribute(\"autocapitalize\", \"off\");\n text.setAttribute(\"spellcheck\", false);\n\n text.style.opacity = \"0\";\n parentNode.insertBefore(text, parentNode.firstChild);\n\n var PLACEHOLDER = \"\\u2028\\u2028\";\n\n var copied = false;\n var pasted = false;\n var inComposition = false;\n var tempStyle = '';\n var isSelectionEmpty = true;\n try { var isFocused = document.activeElement === text; } catch(e) {}\n \n event.addListener(text, \"blur\", function(e) {\n host.onBlur(e);\n isFocused = false;\n });\n event.addListener(text, \"focus\", function(e) {\n isFocused = true;\n host.onFocus(e);\n resetSelection();\n });\n this.focus = function() {\n if (tempStyle) return text.focus();\n var top = text.style.top;\n text.style.position = \"fixed\";\n text.style.top = \"0px\";\n text.focus();\n setTimeout(function() {\n text.style.position = \"\";\n if (text.style.top == \"0px\")\n text.style.top = top;\n }, 0);\n };\n this.blur = function() {\n text.blur();\n };\n this.isFocused = function() {\n return isFocused;\n };\n var syncSelection = lang.delayedCall(function() {\n isFocused && resetSelection(isSelectionEmpty);\n });\n var syncValue = lang.delayedCall(function() {\n if (!inComposition) {\n text.value = PLACEHOLDER;\n isFocused && resetSelection();\n }\n });\n\n function resetSelection(isEmpty) {\n if (inComposition)\n return;\n inComposition = true;\n \n if (inputHandler) {\n var selectionStart = 0;\n var selectionEnd = isEmpty ? 0 : text.value.length - 1;\n } else {\n var selectionStart = isEmpty ? 2 : 1;\n var selectionEnd = 2;\n }\n try {\n text.setSelectionRange(selectionStart, selectionEnd);\n } catch(e){}\n \n inComposition = false;\n }\n\n function resetValue() {\n if (inComposition)\n return;\n text.value = PLACEHOLDER;\n if (useragent.isWebKit)\n syncValue.schedule();\n }\n\n useragent.isWebKit || host.addEventListener('changeSelection', function() {\n if (host.selection.isEmpty() != isSelectionEmpty) {\n isSelectionEmpty = !isSelectionEmpty;\n syncSelection.schedule();\n }\n });\n\n resetValue();\n if (isFocused)\n host.onFocus();\n\n\n var isAllSelected = function(text) {\n return text.selectionStart === 0 && text.selectionEnd === text.value.length;\n };\n\n var onSelect = function(e) {\n if (copied) {\n copied = false;\n } else if (isAllSelected(text)) {\n host.selectAll();\n resetSelection();\n } else if (inputHandler) {\n resetSelection(host.selection.isEmpty());\n }\n };\n\n var inputHandler = null;\n this.setInputHandler = function(cb) {inputHandler = cb;};\n this.getInputHandler = function() {return inputHandler;};\n var afterContextMenu = false;\n \n var sendText = function(data) {\n if (inputHandler) {\n data = inputHandler(data);\n inputHandler = null;\n }\n if (pasted) {\n resetSelection();\n if (data)\n host.onPaste(data);\n pasted = false;\n } else if (data == PLACEHOLDER.charAt(0)) {\n if (afterContextMenu)\n host.execCommand(\"del\", {source: \"ace\"});\n else // some versions of android do not fire keydown when pressing backspace\n host.execCommand(\"backspace\", {source: \"ace\"});\n } else {\n if (data.substring(0, 2) == PLACEHOLDER)\n data = data.substr(2);\n else if (data.charAt(0) == PLACEHOLDER.charAt(0))\n data = data.substr(1);\n else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n \n if (data)\n host.onTextInput(data);\n }\n if (afterContextMenu)\n afterContextMenu = false;\n };\n var onInput = function(e) {\n if (inComposition)\n return;\n var data = text.value;\n sendText(data);\n resetValue();\n };\n \n var handleClipboardData = function(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch(e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function(e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n isCut ? host.onCut() : host.onCopy();\n event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function(){\n copied = false;\n resetValue();\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n \n var onCut = function(e) {\n doCopy(e, true);\n };\n \n var onCopy = function(e) {\n doCopy(e, false);\n };\n \n var onPaste = function(e) {\n var data = handleClipboardData(e);\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n\n event.addListener(text, \"select\", onSelect);\n\n event.addListener(text, \"input\", onInput);\n\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) {\n event.addListener(parentNode, \"keydown\", function(e) {\n if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)\n return;\n\n switch (e.keyCode) {\n case 67:\n onCopy(e);\n break;\n case 86:\n onPaste(e);\n break;\n case 88:\n onCut(e);\n break;\n }\n });\n }\n var onCompositionStart = function(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly) \n return;\n inComposition = {};\n inComposition.canUndo = host.session.$undoManager;\n host.onCompositionStart();\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", onCompositionEnd);\n if (inComposition.canUndo && !host.selection.isEmpty()) {\n host.insert(\"\");\n host.session.markUndoGroup();\n host.selection.clearSelection();\n }\n host.session.markUndoGroup();\n };\n\n var onCompositionUpdate = function() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n var val = text.value.replace(/\\u2028/g, \"\");\n if (inComposition.lastValue === val) return;\n \n host.onCompositionUpdate(val);\n if (inComposition.lastValue)\n host.undo();\n if (inComposition.canUndo)\n inComposition.lastValue = val;\n if (inComposition.lastValue) {\n var r = host.selection.getRange();\n host.insert(inComposition.lastValue);\n host.session.markUndoGroup();\n inComposition.range = host.selection.getRange();\n host.selection.setRange(r);\n host.selection.clearSelection();\n }\n };\n\n var onCompositionEnd = function(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n var c = inComposition;\n inComposition = false;\n var timer = setTimeout(function() {\n timer = null;\n var str = text.value.replace(/\\u2028/g, \"\");\n if (inComposition)\n return;\n else if (str == c.lastValue)\n resetValue();\n else if (!c.lastValue && str) {\n resetValue();\n sendText(str);\n }\n });\n inputHandler = function compositionInputHandler(str) {\n if (timer)\n clearTimeout(timer);\n str = str.replace(/\\u2028/g, \"\");\n if (str == c.lastValue)\n return \"\";\n if (c.lastValue && timer)\n host.undo();\n return str;\n };\n host.onCompositionEnd();\n host.removeListener(\"mousedown\", onCompositionEnd);\n if (e.type == \"compositionend\" && c.range) {\n host.selection.setRange(c.range);\n }\n var needsOnInput =\n (!!useragent.isChrome && useragent.isChrome >= 53) ||\n (!!useragent.isWebKit && useragent.isWebKit >= 603);\n\n if (needsOnInput) {\n onInput();\n }\n };\n \n \n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50);\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n if (useragent.isGecko) {\n event.addListener(text, \"text\", function(){syncComposition.schedule();});\n } else {\n event.addListener(text, \"keyup\", function(){syncComposition.schedule();});\n event.addListener(text, \"keydown\", function(){syncComposition.schedule();});\n }\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function() {\n return text;\n };\n\n this.setReadOnly = function(readOnly) {\n text.readOnly = readOnly;\n };\n\n this.onContextMenu = function(e) {\n afterContextMenu = true;\n resetSelection(host.selection.isEmpty());\n host._emit(\"nativecontextmenu\", {target: host, domEvent: e});\n this.moveToMouse(e, true);\n };\n \n this.moveToMouse = function(e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + \"height:\" + text.style.height + \";\"\n + (useragent.isIE ? \"opacity:0.1;\" : \"\");\n\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight -2;\n var move = function(e) {\n text.style.left = e.clientX - left - 2 + \"px\";\n text.style.top = Math.min(e.clientY - top - 2, maxTop) + \"px\";\n }; \n move(e);\n\n if (e.type != \"mousedown\")\n return;\n\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$keepTextAreaAtCursor = null;\n\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n if (host.renderer.$keepTextAreaAtCursor == null) {\n host.renderer.$keepTextAreaAtCursor = true;\n host.renderer.$moveTextAreaToCursor();\n }\n }, 0);\n }\n\n var onContextMenu = function(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function(e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n};\n\nexports.TextInput = TextInput;\n});\n\nace.define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar DRAG_OFFSET = 0; // pixels\nvar SCROLL_COOLDOWN_T = 250; // milliseconds\n\nfunction DefaultHandlers(mouseHandler) {\n mouseHandler.$clickSelection = null;\n\n var editor = mouseHandler.editor;\n editor.setDefaultHandler(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n editor.setDefaultHandler(\"dblclick\", this.onDoubleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"tripleclick\", this.onTripleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"quadclick\", this.onQuadClick.bind(mouseHandler));\n editor.setDefaultHandler(\"mousewheel\", this.onMouseWheel.bind(mouseHandler));\n editor.setDefaultHandler(\"touchmove\", this.onTouchMove.bind(mouseHandler));\n\n var exports = [\"select\", \"startSelect\", \"selectEnd\", \"selectAllEnd\", \"selectByWordsEnd\",\n \"selectByLinesEnd\", \"dragWait\", \"dragWaitEnd\", \"focusWait\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n\n mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, \"getLineRange\");\n mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, \"getWordRange\");\n}\n\n(function() {\n\n this.onMouseDown = function(ev) {\n var inSelection = ev.inSelection();\n var pos = ev.getDocumentPosition();\n this.mousedownEvent = ev;\n var editor = this.editor;\n\n var button = ev.getButton();\n if (button !== 0) {\n var selectionRange = editor.getSelectionRange();\n var selectionEmpty = selectionRange.isEmpty();\n editor.$blockScrolling++;\n if (selectionEmpty || button == 1)\n editor.selection.moveToPosition(pos);\n editor.$blockScrolling--;\n if (button == 2) {\n editor.textInput.onContextMenu(ev.domEvent);\n if (!useragent.isMozilla)\n ev.preventDefault();\n }\n return;\n }\n\n this.mousedownEvent.time = Date.now();\n if (inSelection && !editor.isFocused()) {\n editor.focus();\n if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {\n this.setState(\"focusWait\");\n this.captureMouse(ev);\n return;\n }\n }\n\n this.captureMouse(ev);\n this.startSelect(pos, ev.domEvent._clicks > 1);\n return ev.preventDefault();\n };\n\n this.startSelect = function(pos, waitForClickSelection) {\n pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);\n var editor = this.editor;\n editor.$blockScrolling++;\n if (this.mousedownEvent.getShiftKey())\n editor.selection.selectToPosition(pos);\n else if (!waitForClickSelection)\n editor.selection.moveToPosition(pos);\n if (!waitForClickSelection)\n this.select();\n if (editor.renderer.scroller.setCapture) {\n editor.renderer.scroller.setCapture();\n }\n editor.setStyle(\"ace_selecting\");\n this.setState(\"select\");\n editor.$blockScrolling--;\n };\n\n this.select = function() {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmp = this.$clickSelection.comparePoint(cursor);\n\n if (cmp == -1) {\n anchor = this.$clickSelection.end;\n } else if (cmp == 1) {\n anchor = this.$clickSelection.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.extendSelectionBy = function(unitName) {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n var range = editor.selection[unitName](cursor.row, cursor.column);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmpStart = this.$clickSelection.comparePoint(range.start);\n var cmpEnd = this.$clickSelection.comparePoint(range.end);\n\n if (cmpStart == -1 && cmpEnd <= 0) {\n anchor = this.$clickSelection.end;\n if (range.end.row != cursor.row || range.end.column != cursor.column)\n cursor = range.start;\n } else if (cmpEnd == 1 && cmpStart >= 0) {\n anchor = this.$clickSelection.start;\n if (range.start.row != cursor.row || range.start.column != cursor.column)\n cursor = range.end;\n } else if (cmpStart == -1 && cmpEnd == 1) {\n cursor = range.end;\n anchor = range.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.selectEnd =\n this.selectAllEnd =\n this.selectByWordsEnd =\n this.selectByLinesEnd = function() {\n this.$clickSelection = null;\n this.editor.unsetStyle(\"ace_selecting\");\n if (this.editor.renderer.scroller.releaseCapture) {\n this.editor.renderer.scroller.releaseCapture();\n }\n };\n\n this.focusWait = function() {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n var time = Date.now();\n\n if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n };\n\n this.onDoubleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n var session = editor.session;\n\n var range = session.getBracketRange(pos);\n if (range) {\n if (range.isEmpty()) {\n range.start.column--;\n range.end.column++;\n }\n this.setState(\"select\");\n } else {\n range = editor.selection.getWordRange(pos.row, pos.column);\n this.setState(\"selectByWords\");\n }\n this.$clickSelection = range;\n this.select();\n };\n\n this.onTripleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n\n this.setState(\"selectByLines\");\n var range = editor.getSelectionRange();\n if (range.isMultiLine() && range.contains(pos.row, pos.column)) {\n this.$clickSelection = editor.selection.getLineRange(range.start.row);\n this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;\n } else {\n this.$clickSelection = editor.selection.getLineRange(pos.row);\n }\n this.select();\n };\n\n this.onQuadClick = function(ev) {\n var editor = this.editor;\n\n editor.selectAll();\n this.$clickSelection = editor.getSelectionRange();\n this.setState(\"selectAll\");\n };\n\n this.onMouseWheel = function(ev) {\n if (ev.getAccelKey())\n return;\n if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {\n ev.wheelX = ev.wheelY;\n ev.wheelY = 0;\n }\n \n var editor = this.editor;\n\n if (!this.$lastScroll)\n this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 };\n\n var prevScroll = this.$lastScroll;\n var t = ev.domEvent.timeStamp;\n var dt = t - prevScroll.t;\n var vx = ev.wheelX / dt;\n var vy = ev.wheelY / dt;\n if (dt < SCROLL_COOLDOWN_T) {\n vx = (vx + prevScroll.vx) / 2;\n vy = (vy + prevScroll.vy) / 2;\n }\n\n var direction = Math.abs(vx / vy);\n\n var canScroll = false;\n if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0))\n canScroll = true;\n if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed))\n canScroll = true;\n\n if (canScroll) {\n prevScroll.allowed = t;\n } else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) {\n var isSlower = Math.abs(vx) <= 1.1 * Math.abs(prevScroll.vx)\n && Math.abs(vy) <= 1.1 * Math.abs(prevScroll.vy);\n if (isSlower) {\n canScroll = true;\n prevScroll.allowed = t;\n }\n else {\n prevScroll.allowed = 0;\n }\n }\n\n prevScroll.t = t;\n prevScroll.vx = vx;\n prevScroll.vy = vy;\n\n if (canScroll) {\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n\n this.onTouchMove = function(ev) {\n this.editor._emit(\"mousewheel\", ev);\n };\n\n}).call(DefaultHandlers.prototype);\n\nexports.DefaultHandlers = DefaultHandlers;\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nfunction calcRangeOrientation(range, cursor) {\n if (range.start.row == range.end.row)\n var cmp = 2 * cursor.column - range.start.column - range.end.column;\n else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)\n var cmp = cursor.column - 4;\n else\n var cmp = 2 * cursor.row - range.start.row - range.end.row;\n\n if (cmp < 0)\n return {cursor: range.start, anchor: range.end};\n else\n return {cursor: range.end, anchor: range.start};\n}\n\n});\n\nace.define(\"ace/tooltip\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nfunction Tooltip (parentNode) {\n this.isOpen = false;\n this.$element = null;\n this.$parentNode = parentNode;\n}\n\n(function() {\n this.$init = function() {\n this.$element = dom.createElement(\"div\");\n this.$element.className = \"ace_tooltip\";\n this.$element.style.display = \"none\";\n this.$parentNode.appendChild(this.$element);\n return this.$element;\n };\n this.getElement = function() {\n return this.$element || this.$init();\n };\n this.setText = function(text) {\n dom.setInnerText(this.getElement(), text);\n };\n this.setHtml = function(html) {\n this.getElement().innerHTML = html;\n };\n this.setPosition = function(x, y) {\n this.getElement().style.left = x + \"px\";\n this.getElement().style.top = y + \"px\";\n };\n this.setClassName = function(className) {\n dom.addCssClass(this.getElement(), className);\n };\n this.show = function(text, x, y) {\n if (text != null)\n this.setText(text);\n if (x != null && y != null)\n this.setPosition(x, y);\n if (!this.isOpen) {\n this.getElement().style.display = \"block\";\n this.isOpen = true;\n }\n };\n\n this.hide = function() {\n if (this.isOpen) {\n this.getElement().style.display = \"none\";\n this.isOpen = false;\n }\n };\n this.getHeight = function() {\n return this.getElement().offsetHeight;\n };\n this.getWidth = function() {\n return this.getElement().offsetWidth;\n };\n\n this.destroy = function() {\n this.isOpen = false;\n if (this.$element && this.$element.parentNode) {\n this.$element.parentNode.removeChild(this.$element);\n }\n };\n\n}).call(Tooltip.prototype);\n\nexports.Tooltip = Tooltip;\n});\n\nace.define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event\",\"ace/tooltip\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar event = acequire(\"../lib/event\");\nvar Tooltip = acequire(\"../tooltip\").Tooltip;\n\nfunction GutterHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var gutter = editor.renderer.$gutterLayer;\n var tooltip = new GutterTooltip(editor.container);\n\n mouseHandler.editor.setDefaultHandler(\"guttermousedown\", function(e) {\n if (!editor.isFocused() || e.getButton() != 0)\n return;\n var gutterRegion = gutter.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\")\n return;\n\n var row = e.getDocumentPosition().row;\n var selection = editor.session.selection;\n\n if (e.getShiftKey())\n selection.selectTo(row, 0);\n else {\n if (e.domEvent.detail == 2) {\n editor.selectAll();\n return e.preventDefault();\n }\n mouseHandler.$clickSelection = editor.selection.getLineRange(row);\n }\n mouseHandler.setState(\"selectByLines\");\n mouseHandler.captureMouse(e);\n return e.preventDefault();\n });\n\n\n var tooltipTimeout, mouseEvent, tooltipAnnotation;\n\n function showTooltip() {\n var row = mouseEvent.getDocumentPosition().row;\n var annotation = gutter.$annotations[row];\n if (!annotation)\n return hideTooltip();\n\n var maxRow = editor.session.getLength();\n if (row == maxRow) {\n var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;\n var pos = mouseEvent.$pos;\n if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))\n return hideTooltip();\n }\n\n if (tooltipAnnotation == annotation)\n return;\n tooltipAnnotation = annotation.text.join(\"
    \");\n\n tooltip.setHtml(tooltipAnnotation);\n tooltip.show();\n editor._signal(\"showGutterTooltip\", tooltip);\n editor.on(\"mousewheel\", hideTooltip);\n\n if (mouseHandler.$tooltipFollowsMouse) {\n moveTooltip(mouseEvent);\n } else {\n var gutterElement = mouseEvent.domEvent.target;\n var rect = gutterElement.getBoundingClientRect();\n var style = tooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n }\n }\n\n function hideTooltip() {\n if (tooltipTimeout)\n tooltipTimeout = clearTimeout(tooltipTimeout);\n if (tooltipAnnotation) {\n tooltip.hide();\n tooltipAnnotation = null;\n editor._signal(\"hideGutterTooltip\", tooltip);\n editor.removeEventListener(\"mousewheel\", hideTooltip);\n }\n }\n\n function moveTooltip(e) {\n tooltip.setPosition(e.x, e.y);\n }\n\n mouseHandler.editor.setDefaultHandler(\"guttermousemove\", function(e) {\n var target = e.domEvent.target || e.domEvent.srcElement;\n if (dom.hasCssClass(target, \"ace_fold-widget\"))\n return hideTooltip();\n\n if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse)\n moveTooltip(e);\n\n mouseEvent = e;\n if (tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n if (mouseEvent && !mouseHandler.isMousePressed)\n showTooltip();\n else\n hideTooltip();\n }, 50);\n });\n\n event.addListener(editor.renderer.$gutter, \"mouseout\", function(e) {\n mouseEvent = null;\n if (!tooltipAnnotation || tooltipTimeout)\n return;\n\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n hideTooltip();\n }, 50);\n });\n \n editor.on(\"changeSession\", hideTooltip);\n}\n\nfunction GutterTooltip(parentNode) {\n Tooltip.call(this, parentNode);\n}\n\noop.inherits(GutterTooltip, Tooltip);\n\n(function(){\n this.setPosition = function(x, y) {\n var windowWidth = window.innerWidth || document.documentElement.clientWidth;\n var windowHeight = window.innerHeight || document.documentElement.clientHeight;\n var width = this.getWidth();\n var height = this.getHeight();\n x += 15;\n y += 15;\n if (x + width > windowWidth) {\n x -= (x + width) - windowWidth;\n }\n if (y + height > windowHeight) {\n y -= 20 + height;\n }\n Tooltip.prototype.setPosition.call(this, x, y);\n };\n\n}).call(GutterTooltip.prototype);\n\n\n\nexports.GutterHandler = GutterHandler;\n\n});\n\nace.define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar MouseEvent = exports.MouseEvent = function(domEvent, editor) {\n this.domEvent = domEvent;\n this.editor = editor;\n \n this.x = this.clientX = domEvent.clientX;\n this.y = this.clientY = domEvent.clientY;\n\n this.$pos = null;\n this.$inSelection = null;\n \n this.propagationStopped = false;\n this.defaultPrevented = false;\n};\n\n(function() { \n \n this.stopPropagation = function() {\n event.stopPropagation(this.domEvent);\n this.propagationStopped = true;\n };\n \n this.preventDefault = function() {\n event.preventDefault(this.domEvent);\n this.defaultPrevented = true;\n };\n \n this.stop = function() {\n this.stopPropagation();\n this.preventDefault();\n };\n this.getDocumentPosition = function() {\n if (this.$pos)\n return this.$pos;\n \n this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);\n return this.$pos;\n };\n this.inSelection = function() {\n if (this.$inSelection !== null)\n return this.$inSelection;\n \n var editor = this.editor;\n \n\n var selectionRange = editor.getSelectionRange();\n if (selectionRange.isEmpty())\n this.$inSelection = false;\n else {\n var pos = this.getDocumentPosition();\n this.$inSelection = selectionRange.contains(pos.row, pos.column);\n }\n\n return this.$inSelection;\n };\n this.getButton = function() {\n return event.getButton(this.domEvent);\n };\n this.getShiftKey = function() {\n return this.domEvent.shiftKey;\n };\n \n this.getAccelKey = useragent.isMac\n ? function() { return this.domEvent.metaKey; }\n : function() { return this.domEvent.ctrlKey; };\n \n}).call(MouseEvent.prototype);\n\n});\n\nace.define(\"ace/mouse/dragdrop_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar AUTOSCROLL_DELAY = 200;\nvar SCROLL_CURSOR_DELAY = 200;\nvar SCROLL_CURSOR_HYSTERESIS = 5;\n\nfunction DragdropHandler(mouseHandler) {\n\n var editor = mouseHandler.editor;\n\n var blankImage = dom.createElement(\"img\");\n blankImage.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (useragent.isOpera)\n blankImage.style.cssText = \"width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;\";\n\n var exports = [\"dragWait\", \"dragWaitEnd\", \"startDrag\", \"dragReadyEnd\", \"onMouseDrag\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n editor.addEventListener(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n\n\n var mouseTarget = editor.container;\n var dragSelectionMarker, x, y;\n var timerId, range;\n var dragCursor, counter = 0;\n var dragOperation;\n var isInternal;\n var autoScrollStartTime;\n var cursorMovedTime;\n var cursorPointOnCaretMoved;\n\n this.onDragStart = function(e) {\n if (this.cancelDrag || !mouseTarget.draggable) {\n var self = this;\n setTimeout(function(){\n self.startSelect();\n self.captureMouse(e);\n }, 0);\n return e.preventDefault();\n }\n range = editor.getSelectionRange();\n\n var dataTransfer = e.dataTransfer;\n dataTransfer.effectAllowed = editor.getReadOnly() ? \"copy\" : \"copyMove\";\n if (useragent.isOpera) {\n editor.container.appendChild(blankImage);\n blankImage.scrollTop = 0;\n }\n dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);\n if (useragent.isOpera) {\n editor.container.removeChild(blankImage);\n }\n dataTransfer.clearData();\n dataTransfer.setData(\"Text\", editor.session.getTextRange());\n\n isInternal = true;\n this.setState(\"drag\");\n };\n\n this.onDragEnd = function(e) {\n mouseTarget.draggable = false;\n isInternal = false;\n this.setState(null);\n if (!editor.getReadOnly()) {\n var dropEffect = e.dataTransfer.dropEffect;\n if (!dragOperation && dropEffect == \"move\")\n editor.session.remove(editor.getSelectionRange());\n editor.renderer.$cursorLayer.setBlinking(true);\n }\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n };\n\n this.onDragEnter = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker)\n addDragMarker();\n counter++;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragOver = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker) {\n addDragMarker();\n counter++;\n }\n if (onMouseMoveTimer !== null)\n onMouseMoveTimer = null;\n\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragLeave = function(e) {\n counter--;\n if (counter <= 0 && dragSelectionMarker) {\n clearDragMarker();\n dragOperation = null;\n return event.preventDefault(e);\n }\n };\n\n this.onDrop = function(e) {\n if (!dragCursor)\n return;\n var dataTransfer = e.dataTransfer;\n if (isInternal) {\n switch (dragOperation) {\n case \"move\":\n if (range.contains(dragCursor.row, dragCursor.column)) {\n range = {\n start: dragCursor,\n end: dragCursor\n };\n } else {\n range = editor.moveText(range, dragCursor);\n }\n break;\n case \"copy\":\n range = editor.moveText(range, dragCursor, true);\n break;\n }\n } else {\n var dropData = dataTransfer.getData('Text');\n range = {\n start: dragCursor,\n end: editor.session.insert(dragCursor, dropData)\n };\n editor.focus();\n dragOperation = null;\n }\n clearDragMarker();\n return event.preventDefault(e);\n };\n\n event.addListener(mouseTarget, \"dragstart\", this.onDragStart.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragend\", this.onDragEnd.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragenter\", this.onDragEnter.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragover\", this.onDragOver.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragleave\", this.onDragLeave.bind(mouseHandler));\n event.addListener(mouseTarget, \"drop\", this.onDrop.bind(mouseHandler));\n\n function scrollCursorIntoView(cursor, prevCursor) {\n var now = Date.now();\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n var hMovement = !prevCursor || cursor.column != prevCursor.column;\n if (!cursorMovedTime || vMovement || hMovement) {\n editor.$blockScrolling += 1;\n editor.moveCursorToPosition(cursor);\n editor.$blockScrolling -= 1;\n cursorMovedTime = now;\n cursorPointOnCaretMoved = {x: x, y: y};\n } else {\n var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);\n if (distance > SCROLL_CURSOR_HYSTERESIS) {\n cursorMovedTime = null;\n } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {\n editor.renderer.scrollCursorIntoView();\n cursorMovedTime = null;\n }\n }\n }\n\n function autoScroll(cursor, prevCursor) {\n var now = Date.now();\n var lineHeight = editor.renderer.layerConfig.lineHeight;\n var characterWidth = editor.renderer.layerConfig.characterWidth;\n var editorRect = editor.renderer.scroller.getBoundingClientRect();\n var offsets = {\n x: {\n left: x - editorRect.left,\n right: editorRect.right - x\n },\n y: {\n top: y - editorRect.top,\n bottom: editorRect.bottom - y\n }\n };\n var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);\n var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);\n var scrollCursor = {row: cursor.row, column: cursor.column};\n if (nearestXOffset / characterWidth <= 2) {\n scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);\n }\n if (nearestYOffset / lineHeight <= 1) {\n scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);\n }\n var vScroll = cursor.row != scrollCursor.row;\n var hScroll = cursor.column != scrollCursor.column;\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n if (vScroll || (hScroll && !vMovement)) {\n if (!autoScrollStartTime)\n autoScrollStartTime = now;\n else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)\n editor.renderer.scrollCursorIntoView(scrollCursor);\n } else {\n autoScrollStartTime = null;\n }\n }\n\n function onDragInterval() {\n var prevCursor = dragCursor;\n dragCursor = editor.renderer.screenToTextCoordinates(x, y);\n scrollCursorIntoView(dragCursor, prevCursor);\n autoScroll(dragCursor, prevCursor);\n }\n\n function addDragMarker() {\n range = editor.selection.toOrientedRange();\n dragSelectionMarker = editor.session.addMarker(range, \"ace_selection\", editor.getSelectionStyle());\n editor.clearSelection();\n if (editor.isFocused())\n editor.renderer.$cursorLayer.setBlinking(false);\n clearInterval(timerId);\n onDragInterval();\n timerId = setInterval(onDragInterval, 20);\n counter = 0;\n event.addListener(document, \"mousemove\", onMouseMove);\n }\n\n function clearDragMarker() {\n clearInterval(timerId);\n editor.session.removeMarker(dragSelectionMarker);\n dragSelectionMarker = null;\n editor.$blockScrolling += 1;\n editor.selection.fromOrientedRange(range);\n editor.$blockScrolling -= 1;\n if (editor.isFocused() && !isInternal)\n editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());\n range = null;\n dragCursor = null;\n counter = 0;\n autoScrollStartTime = null;\n cursorMovedTime = null;\n event.removeListener(document, \"mousemove\", onMouseMove);\n }\n var onMouseMoveTimer = null;\n function onMouseMove() {\n if (onMouseMoveTimer == null) {\n onMouseMoveTimer = setTimeout(function() {\n if (onMouseMoveTimer != null && dragSelectionMarker)\n clearDragMarker();\n }, 20);\n }\n }\n\n function canAccept(dataTransfer) {\n var types = dataTransfer.types;\n return !types || Array.prototype.some.call(types, function(type) {\n return type == 'text/plain' || type == 'Text';\n });\n }\n\n function getDropEffect(e) {\n var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];\n var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];\n\n var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;\n var effectAllowed = \"uninitialized\";\n try {\n effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();\n } catch (e) {}\n var dropEffect = \"none\";\n\n if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n else if (moveAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"move\";\n else if (copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n\n return dropEffect;\n }\n}\n\n(function() {\n\n this.dragWait = function() {\n var interval = Date.now() - this.mousedownEvent.time;\n if (interval > this.editor.getDragDelay())\n this.startDrag();\n };\n\n this.dragWaitEnd = function() {\n var target = this.editor.container;\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n this.selectEnd();\n };\n\n this.dragReadyEnd = function(e) {\n this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n this.dragWaitEnd();\n };\n\n this.startDrag = function(){\n this.cancelDrag = false;\n var editor = this.editor;\n var target = editor.container;\n target.draggable = true;\n editor.renderer.$cursorLayer.setBlinking(false);\n editor.setStyle(\"ace_dragging\");\n var cursorStyle = useragent.isWin ? \"default\" : \"move\";\n editor.renderer.setCursorStyle(cursorStyle);\n this.setState(\"dragReady\");\n };\n\n this.onMouseDrag = function(e) {\n var target = this.editor.container;\n if (useragent.isIE && this.state == \"dragReady\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 3)\n target.dragDrop();\n }\n if (this.state === \"dragWait\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 0) {\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n }\n }\n };\n\n this.onMouseDown = function(e) {\n if (!this.$dragEnabled)\n return;\n this.mousedownEvent = e;\n var editor = this.editor;\n\n var inSelection = e.inSelection();\n var button = e.getButton();\n var clickCount = e.domEvent.detail || 1;\n if (clickCount === 1 && button === 0 && inSelection) {\n if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))\n return;\n this.mousedownEvent.time = Date.now();\n var eventTarget = e.domEvent.target || e.domEvent.srcElement;\n if (\"unselectable\" in eventTarget)\n eventTarget.unselectable = \"on\";\n if (editor.getDragDelay()) {\n if (useragent.isWebKit) {\n this.cancelDrag = true;\n var mouseTarget = editor.container;\n mouseTarget.draggable = true;\n }\n this.setState(\"dragWait\");\n } else {\n this.startDrag();\n }\n this.captureMouse(e, this.onMouseDrag.bind(this));\n e.defaultPrevented = true;\n }\n };\n\n}).call(DragdropHandler.prototype);\n\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nexports.DragdropHandler = DragdropHandler;\n\n});\n\nace.define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"./dom\");\n\nexports.get = function (url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.responseText);\n }\n };\n xhr.send(null);\n};\n\nexports.loadScript = function(path, callback) {\n var head = dom.getDocumentHead();\n var s = document.createElement('script');\n\n s.src = path;\n head.appendChild(s);\n\n s.onload = s.onreadystatechange = function(_, isAbort) {\n if (isAbort || !s.readyState || s.readyState == \"loaded\" || s.readyState == \"complete\") {\n s = s.onload = s.onreadystatechange = null;\n if (!isAbort)\n callback();\n }\n };\n};\nexports.qualifyURL = function(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n};\n\n});\n\nace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar EventEmitter = {};\nvar stopPropagation = function() { this.propagationStopped = true; };\nvar preventDefault = function() { this.defaultPrevented = true; };\n\nEventEmitter._emit =\nEventEmitter._dispatchEvent = function(eventName, e) {\n this._eventRegistry || (this._eventRegistry = {});\n this._defaultHandlers || (this._defaultHandlers = {});\n\n var listeners = this._eventRegistry[eventName] || [];\n var defaultHandler = this._defaultHandlers[eventName];\n if (!listeners.length && !defaultHandler)\n return;\n\n if (typeof e != \"object\" || !e)\n e = {};\n\n if (!e.type)\n e.type = eventName;\n if (!e.stopPropagation)\n e.stopPropagation = stopPropagation;\n if (!e.preventDefault)\n e.preventDefault = preventDefault;\n\n listeners = listeners.slice();\n for (var i=0; i 1)\n base = parts[parts.length - 2];\n var path = options[component + \"Path\"];\n if (path == null) {\n path = options.basePath;\n } else if (sep == \"/\") {\n component = sep = \"\";\n }\n if (path && path.slice(-1) != \"/\")\n path += \"/\";\n return path + component + sep + base + this.get(\"suffix\");\n};\n\nexports.setModuleUrl = function(name, subst) {\n return options.$moduleUrls[name] = subst;\n};\n\nexports.$loading = {};\nexports.loadModule = function(moduleName, onLoad) {\n var module, moduleType;\n if (Array.isArray(moduleName)) {\n moduleType = moduleName[0];\n moduleName = moduleName[1];\n }\n\n try {\n module = acequire(moduleName);\n } catch (e) {}\n if (module && !exports.$loading[moduleName])\n return onLoad && onLoad(module);\n\n if (!exports.$loading[moduleName])\n exports.$loading[moduleName] = [];\n\n exports.$loading[moduleName].push(onLoad);\n\n if (exports.$loading[moduleName].length > 1)\n return;\n\n var afterLoad = function() {\n acequire([moduleName], function(module) {\n exports._emit(\"load.module\", {name: moduleName, module: module});\n var listeners = exports.$loading[moduleName];\n exports.$loading[moduleName] = null;\n listeners.forEach(function(onLoad) {\n onLoad && onLoad(module);\n });\n });\n };\n\n if (!exports.get(\"packaged\"))\n return afterLoad();\n net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);\n};\ninit(true);function init(packaged) {\n\n if (!global || !global.document)\n return;\n \n options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__(/*! !webpack amd define */ \"../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/amd-define.js\").packaged);\n\n var scriptOptions = {};\n var scriptUrl = \"\";\n var currentScript = (document.currentScript || document._currentScript ); // native or polyfill\n var currentDocument = currentScript && currentScript.ownerDocument || document;\n \n var scripts = currentDocument.getElementsByTagName(\"script\");\n for (var i=0; i 0){\n\t\t\tif (action == 0x10){\n\t\t\t\tfor(i = condPos; i < ix; i++){\n\t\t\t\t\tlevels[i] = 1;\n\t\t\t\t}\n\t\t\t\tcondPos = -1;\n\t\t\t} else {\n\t\t\t\tcondPos = -1;\n\t\t\t}\n\t\t}\n\t\tcond = impTab[newState][6];\n\t\tif (cond){\n\t\t\tif(condPos == -1){\n\t\t\t\tcondPos = ix;\n\t\t\t}\n\t\t}else{\n\t\t\tif (condPos > -1){\n\t\t\t\tfor(i = condPos; i < ix; i++){\n\t\t\t\t\tlevels[i] = newLevel;\n\t\t\t\t}\n\t\t\t\tcondPos = -1;\n\t\t\t}\n\t\t}\n\t\tif (charTypes[ix] == B){\n\t\t\tlevels[ix] = 0;\n\t\t}\n\t\thiLevel |= newLevel;\n\t}\n\tif (hasUBAT_S){\n\t\tfor(i = 0; i < len; i++){\n\t\t\tif(charTypes[i] == S){\n\t\t\t\tlevels[i] = dir;\n\t\t\t\tfor(var j = i - 1; j >= 0; j--){\n\t\t\t\t\tif(charTypes[j] == WS){\n\t\t\t\t\t\tlevels[j] = dir;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction _invertLevel(lev, levels, _array) {\n\tif (hiLevel < lev){\n\t\treturn;\n\t}\n\tif (lev == 1 && dir == RTL && !hasUBAT_B){\n\t\t_array.reverse();\n\t\treturn;\n\t}\n\tvar len = _array.length, start = 0, end, lo, hi, tmp;\n\twhile(start < len){\n\t\tif (levels[start] >= lev){\n\t\t\tend = start + 1;\n\t\twhile(end < len && levels[end] >= lev){\n\t\t\tend++;\n\t\t}\n\t\tfor(lo = start, hi = end - 1 ; lo < hi; lo++, hi--){\n\t\t\ttmp = _array[lo];\n\t\t\t_array[lo] = _array[hi];\n\t\t\t_array[hi] = tmp;\n\t\t}\n\t\tstart = end;\n\t}\n\tstart++;\n\t}\n}\n\nfunction _getCharClass(chars, types, classes, ix) {\n\tvar cType = types[ix], wType, nType, len, i;\n\tswitch(cType){\n\t\tcase L:\n\t\tcase R:\n\t\t\tlastArabic = false;\n\t\tcase ON:\n\t\tcase AN:\n\t\t\treturn cType;\n\t\tcase EN:\n\t\t\treturn lastArabic ? AN : EN;\n\t\tcase AL:\n\t\t\tlastArabic = true;\n\t\t\thasUBAT_AL = true;\n\t\t\treturn R;\n\t\tcase WS:\n\t\t\treturn ON;\n\t\tcase CS:\n\t\t\tif (ix < 1 || (ix + 1) >= types.length ||\n\t\t\t\t((wType = classes[ix - 1]) != EN && wType != AN) ||\n\t\t\t\t((nType = types[ix + 1]) != EN && nType != AN)){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\tif (lastArabic){nType = AN;}\n\t\t\treturn nType == wType ? nType : ON;\n\t\tcase ES:\n\t\t\twType = ix > 0 ? classes[ix - 1] : B;\n\t\t\tif (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\treturn ON;\n\t\tcase ET:\n\t\t\tif (ix > 0 && classes[ix - 1] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\tif (lastArabic){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\ti = ix + 1;\n\t\t\tlen = types.length;\n\t\t\twhile (i < len && types[i] == ET){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i < len && types[i] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\treturn ON;\n\t\tcase NSM:\n\t\t\tlen = types.length;\n\t\t\ti = ix + 1;\n\t\t\twhile (i < len && types[i] == NSM){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i < len){\n\t\t\t\tvar c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E;\n\n\t\t\t\twType = types[i];\n\t\t\t\tif (rtlCandidate && (wType == R || wType == AL)){\n\t\t\t\t\treturn R;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ix < 1 || (wType = types[ix - 1]) == B){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\treturn classes[ix - 1];\n\t\tcase B:\n\t\t\tlastArabic = false;\n\t\t\thasUBAT_B = true;\n\t\t\treturn dir;\n\t\tcase S:\n\t\t\thasUBAT_S = true;\n\t\t\treturn ON;\n\t\tcase LRE:\n\t\tcase RLE:\n\t\tcase LRO:\n\t\tcase RLO:\n\t\tcase PDF:\n\t\t\tlastArabic = false;\n\t\tcase BN:\n\t\t\treturn ON;\n\t}\n}\n\nfunction _getCharacterType( ch ) {\n\tvar uc = ch.charCodeAt(0), hi = uc >> 8;\n\n\tif (hi == 0) {\n\t\treturn ((uc > 0x00BF) ? L : UnicodeTBL00[uc]);\n\t} else if (hi == 5) {\n\t\treturn (/[\\u0591-\\u05f4]/.test(ch) ? R : L);\n\t} else if (hi == 6) {\n\t\tif (/[\\u0610-\\u061a\\u064b-\\u065f\\u06d6-\\u06e4\\u06e7-\\u06ed]/.test(ch))\n\t\t\treturn NSM;\n\t\telse if (/[\\u0660-\\u0669\\u066b-\\u066c]/.test(ch))\n\t\t\treturn AN;\n\t\telse if (uc == 0x066A)\n\t\t\treturn ET;\n\t\telse if (/[\\u06f0-\\u06f9]/.test(ch))\n\t\t\treturn EN;\n\t\telse\n\t\t\treturn AL;\n\t} else if (hi == 0x20 && uc <= 0x205F) {\n\t\treturn UnicodeTBL20[uc & 0xFF];\n\t} else if (hi == 0xFE) {\n\t\treturn (uc >= 0xFE70 ? AL : ON);\n\t}\n\treturn ON;\n}\n\nfunction _isArabicDiacritics( ch ) {\n\treturn (ch >= '\\u064b' && ch <= '\\u0655');\n}\nexports.L = L;\nexports.R = R;\nexports.EN = EN;\nexports.ON_R = 3;\nexports.AN = 4;\nexports.R_H = 5;\nexports.B = 6;\n\nexports.DOT = \"\\xB7\";\nexports.doBidiReorder = function(text, textCharTypes, isRtl) {\n\tif (text.length < 2)\n\t\treturn {};\n\n\tvar chars = text.split(\"\"), logicalFromVisual = new Array(chars.length),\n\t\tbidiLevels = new Array(chars.length), levels = [];\n\n\tdir = isRtl ? RTL : LTR;\n\n\t_computeLevels(chars, levels, chars.length, textCharTypes);\n\n\tfor (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++);\n\n\t_invertLevel(2, levels, logicalFromVisual);\n\t_invertLevel(1, levels, logicalFromVisual);\n\n\tfor (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width\n\t\tif (textCharTypes[i] === AN) {\n\t\t\tlevels[i] = exports.AN;\n\t\t} else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE)\n\t\t\t|| textCharTypes[i] === ON || textCharTypes[i] === BN)) {\n\t\t\tlevels[i] = exports.ON_R;\n\t\t} else if ((i > 0 && chars[i - 1] === '\\u0644') && /\\u0622|\\u0623|\\u0625|\\u0627/.test(chars[i])) {\n\t\t\tlevels[i - 1] = levels[i] = exports.R_H;\n\t\t\ti++;\n\t\t}\n\t}\n\tif (chars[chars.length - 1] === exports.DOT)\n\t\tlevels[chars.length - 1] = exports.B;\n\n\tfor (var i = 0; i < logicalFromVisual.length; i++) {\n\t\tbidiLevels[i] = levels[logicalFromVisual[i]];\n\t}\n\n\treturn {'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels};\n};\nexports.hasBidiCharacters = function(text, textCharTypes){\n\tvar ret = false;\n\tfor (var i = 0; i < text.length; i++){\n\t\ttextCharTypes[i] = _getCharacterType(text.charAt(i));\n\t\tif (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL))\n\t\t\tret = true;\n\t}\n\treturn ret;\n};\nexports.getVisualFromLogicalIdx = function(logIdx, rowMap) {\n\tfor (var i = 0; i < rowMap.logicalFromVisual.length; i++) {\n\t\tif (rowMap.logicalFromVisual[i] == logIdx)\n\t\t\treturn i;\n\t}\n\treturn 0;\n};\n\n});\n\nace.define(\"ace/bidihandler\",[\"require\",\"exports\",\"module\",\"ace/lib/bidiutil\",\"ace/lib/lang\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar bidiUtil = acequire(\"./lib/bidiutil\");\nvar lang = acequire(\"./lib/lang\");\nvar useragent = acequire(\"./lib/useragent\");\nvar bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\nvar BidiHandler = function(session) {\n this.session = session;\n this.bidiMap = {};\n this.currentRow = null;\n this.bidiUtil = bidiUtil;\n this.charWidths = [];\n this.EOL = \"\\xAC\";\n this.showInvisibles = true;\n this.isRtlDir = false;\n this.line = \"\";\n this.wrapIndent = 0;\n this.isLastRow = false;\n this.EOF = \"\\xB6\";\n this.seenBidi = false;\n};\n\n(function() {\n this.isBidiRow = function(screenRow, docRow, splitIndex) {\n if (!this.seenBidi)\n return false;\n if (screenRow !== this.currentRow) {\n this.currentRow = screenRow;\n this.updateRowLine(docRow, splitIndex);\n this.updateBidiMap();\n }\n return this.bidiMap.bidiLevels;\n };\n\n this.onChange = function(delta) {\n if (!this.seenBidi) {\n if (delta.action == \"insert\" && bidiRE.test(delta.lines.join(\"\\n\"))) {\n this.seenBidi = true;\n this.currentRow = null;\n }\n }\n else {\n this.currentRow = null;\n }\n };\n\n this.getDocumentRow = function() {\n var docRow = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var index = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n if (index >= 0)\n docRow = this.session.$docRowCache[index];\n }\n\n return docRow;\n };\n\n this.getSplitIndex = function() {\n var splitIndex = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n while (this.currentRow - splitIndex > 0) {\n currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1);\n if (currentIndex !== prevIndex)\n break;\n\n prevIndex = currentIndex;\n splitIndex++;\n }\n }\n\n return splitIndex;\n };\n\n this.updateRowLine = function(docRow, splitIndex) {\n if (docRow === undefined)\n docRow = this.getDocumentRow();\n\n this.wrapIndent = 0;\n this.isLastRow = (docRow === this.session.getLength() - 1);\n this.line = this.session.getLine(docRow);\n if (this.session.$useWrapMode) {\n var splits = this.session.$wrapData[docRow];\n if (splits) {\n if (splitIndex === undefined)\n splitIndex = this.getSplitIndex();\n\n if(splitIndex > 0 && splits.length) {\n this.wrapIndent = splits.indent;\n this.line = (splitIndex < splits.length) ?\n this.line.substring(splits[splitIndex - 1], splits[splits.length - 1]) :\n this.line.substring(splits[splits.length - 1]);\n } else {\n this.line = this.line.substring(0, splits[splitIndex]);\n }\n }\n }\n var session = this.session, shift = 0, size;\n this.line = this.line.replace(/\\t|[\\u1100-\\u2029, \\u202F-\\uFFE6]/g, function(ch, i){\n if (ch === '\\t' || session.isFullWidth(ch.charCodeAt(0))) {\n size = (ch === '\\t') ? session.getScreenTabSize(i + shift) : 2;\n shift += size - 1;\n return lang.stringRepeat(bidiUtil.DOT, size);\n }\n return ch;\n });\n };\n\n this.updateBidiMap = function() {\n var textCharTypes = [], endOfLine = this.isLastRow ? this.EOF : this.EOL;\n var line = this.line + (this.showInvisibles ? endOfLine : bidiUtil.DOT);\n if (bidiUtil.hasBidiCharacters(line, textCharTypes)) {\n this.bidiMap = bidiUtil.doBidiReorder(line, textCharTypes, this.isRtlDir);\n } else {\n this.bidiMap = {};\n }\n };\n this.markAsDirty = function() {\n this.currentRow = null;\n };\n this.updateCharacterWidths = function(fontMetrics) {\n if (!this.seenBidi)\n return;\n if (this.characterWidth === fontMetrics.$characterSize.width)\n return;\n\n var characterWidth = this.characterWidth = fontMetrics.$characterSize.width;\n var bidiCharWidth = fontMetrics.$measureCharWidth(\"\\u05d4\");\n\n this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth;\n this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth;\n this.charWidths[bidiUtil.R_H] = useragent.isChrome ? bidiCharWidth : bidiCharWidth * 0.45;\n this.charWidths[bidiUtil.B] = 0;\n\n this.currentRow = null;\n };\n\n this.getShowInvisibles = function() {\n return this.showInvisibles;\n };\n\n this.setShowInvisibles = function(showInvisibles) {\n this.showInvisibles = showInvisibles;\n this.currentRow = null;\n };\n\n this.setEolChar = function(eolChar) {\n this.EOL = eolChar;\n };\n\n this.setTextDir = function(isRtlDir) {\n this.isRtlDir = isRtlDir;\n };\n this.getPosLeft = function(col) {\n col -= this.wrapIndent;\n var visualIdx = bidiUtil.getVisualFromLogicalIdx(col > 0 ? col - 1 : 0, this.bidiMap),\n levels = this.bidiMap.bidiLevels, left = 0;\n\n if (col === 0 && levels[visualIdx] % 2 !== 0)\n visualIdx++;\n\n for (var i = 0; i < visualIdx; i++) {\n left += this.charWidths[levels[i]];\n }\n\n if (col !== 0 && levels[visualIdx] % 2 === 0)\n left += this.charWidths[levels[visualIdx]];\n\n if (this.wrapIndent)\n left += this.wrapIndent * this.charWidths[bidiUtil.L];\n\n return left;\n };\n this.getSelections = function(startCol, endCol) {\n var map = this.bidiMap, levels = map.bidiLevels, level, offset = this.wrapIndent * this.charWidths[bidiUtil.L], selections = [],\n selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent,\n isSelected = false, isSelectedPrev = false, selectionStart = 0;\n\n for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {\n logIdx = map.logicalFromVisual[visIdx];\n level = levels[visIdx];\n isSelected = (logIdx >= selColMin) && (logIdx < selColMax);\n if (isSelected && !isSelectedPrev) {\n selectionStart = offset;\n } else if (!isSelected && isSelectedPrev) {\n selections.push({left: selectionStart, width: offset - selectionStart});\n }\n offset += this.charWidths[level];\n isSelectedPrev = isSelected;\n }\n\n if (isSelected && (visIdx === levels.length)) {\n selections.push({left: selectionStart, width: offset - selectionStart});\n }\n\n return selections;\n };\n this.offsetToCol = function(posX) {\n var logicalIdx = 0, posX = Math.max(posX, 0),\n offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels,\n charWidth = this.charWidths[levels[visualIdx]];\n\n if (this.wrapIndent) {\n posX -= this.wrapIndent * this.charWidths[bidiUtil.L];\n }\n\n while(posX > offset + charWidth/2) {\n offset += charWidth;\n if(visualIdx === levels.length - 1) {\n charWidth = 0;\n break;\n }\n charWidth = this.charWidths[levels[++visualIdx]];\n }\n\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)){\n if(posX < offset)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n\n } else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)){\n logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx]\n : this.bidiMap.logicalFromVisual[visualIdx - 1]);\n\n } else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0))\n || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))){\n logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];\n } else {\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n\n return (logicalIdx + this.wrapIndent);\n };\n\n}).call(BidiHandler.prototype);\n\nexports.BidiHandler = BidiHandler;\n});\n\nace.define(\"ace/range\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\nvar Range = function(startRow, startColumn, endRow, endColumn) {\n this.start = {\n row: startRow,\n column: startColumn\n };\n\n this.end = {\n row: endRow,\n column: endColumn\n };\n};\n\n(function() {\n this.isEqual = function(range) {\n return this.start.row === range.start.row &&\n this.end.row === range.end.row &&\n this.start.column === range.start.column &&\n this.end.column === range.end.column;\n };\n this.toString = function() {\n return (\"Range: [\" + this.start.row + \"/\" + this.start.column +\n \"] -> [\" + this.end.row + \"/\" + this.end.column + \"]\");\n };\n\n this.contains = function(row, column) {\n return this.compare(row, column) == 0;\n };\n this.compareRange = function(range) {\n var cmp,\n end = range.end,\n start = range.start;\n\n cmp = this.compare(end.row, end.column);\n if (cmp == 1) {\n cmp = this.compare(start.row, start.column);\n if (cmp == 1) {\n return 2;\n } else if (cmp == 0) {\n return 1;\n } else {\n return 0;\n }\n } else if (cmp == -1) {\n return -2;\n } else {\n cmp = this.compare(start.row, start.column);\n if (cmp == -1) {\n return -1;\n } else if (cmp == 1) {\n return 42;\n } else {\n return 0;\n }\n }\n };\n this.comparePoint = function(p) {\n return this.compare(p.row, p.column);\n };\n this.containsRange = function(range) {\n return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;\n };\n this.intersects = function(range) {\n var cmp = this.compareRange(range);\n return (cmp == -1 || cmp == 0 || cmp == 1);\n };\n this.isEnd = function(row, column) {\n return this.end.row == row && this.end.column == column;\n };\n this.isStart = function(row, column) {\n return this.start.row == row && this.start.column == column;\n };\n this.setStart = function(row, column) {\n if (typeof row == \"object\") {\n this.start.column = row.column;\n this.start.row = row.row;\n } else {\n this.start.row = row;\n this.start.column = column;\n }\n };\n this.setEnd = function(row, column) {\n if (typeof row == \"object\") {\n this.end.column = row.column;\n this.end.row = row.row;\n } else {\n this.end.row = row;\n this.end.column = column;\n }\n };\n this.inside = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column) || this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideStart = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideEnd = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.compare = function(row, column) {\n if (!this.isMultiLine()) {\n if (row === this.start.row) {\n return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);\n }\n }\n\n if (row < this.start.row)\n return -1;\n\n if (row > this.end.row)\n return 1;\n\n if (this.start.row === row)\n return column >= this.start.column ? 0 : -1;\n\n if (this.end.row === row)\n return column <= this.end.column ? 0 : 1;\n\n return 0;\n };\n this.compareStart = function(row, column) {\n if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareEnd = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareInside = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.clipRows = function(firstRow, lastRow) {\n if (this.end.row > lastRow)\n var end = {row: lastRow + 1, column: 0};\n else if (this.end.row < firstRow)\n var end = {row: firstRow, column: 0};\n\n if (this.start.row > lastRow)\n var start = {row: lastRow + 1, column: 0};\n else if (this.start.row < firstRow)\n var start = {row: firstRow, column: 0};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n this.extend = function(row, column) {\n var cmp = this.compare(row, column);\n\n if (cmp == 0)\n return this;\n else if (cmp == -1)\n var start = {row: row, column: column};\n else\n var end = {row: row, column: column};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n\n this.isEmpty = function() {\n return (this.start.row === this.end.row && this.start.column === this.end.column);\n };\n this.isMultiLine = function() {\n return (this.start.row !== this.end.row);\n };\n this.clone = function() {\n return Range.fromPoints(this.start, this.end);\n };\n this.collapseRows = function() {\n if (this.end.column == 0)\n return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);\n else\n return new Range(this.start.row, 0, this.end.row, 0);\n };\n this.toScreenRange = function(session) {\n var screenPosStart = session.documentToScreenPosition(this.start);\n var screenPosEnd = session.documentToScreenPosition(this.end);\n\n return new Range(\n screenPosStart.row, screenPosStart.column,\n screenPosEnd.row, screenPosEnd.column\n );\n };\n this.moveBy = function(row, column) {\n this.start.row += row;\n this.start.column += column;\n this.end.row += row;\n this.end.column += column;\n };\n\n}).call(Range.prototype);\nRange.fromPoints = function(start, end) {\n return new Range(start.row, start.column, end.row, end.column);\n};\nRange.comparePoints = comparePoints;\n\nRange.comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\n\n\nexports.Range = Range;\n});\n\nace.define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Selection = function(session) {\n this.session = session;\n this.doc = session.getDocument();\n\n this.clearSelection();\n this.lead = this.selectionLead = this.doc.createAnchor(0, 0);\n this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);\n\n var self = this;\n this.lead.on(\"change\", function(e) {\n self._emit(\"changeCursor\");\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)\n self.$desiredColumn = null;\n });\n\n this.selectionAnchor.on(\"change\", function() {\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n });\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.isEmpty = function() {\n return (this.$isEmpty || (\n this.anchor.row == this.lead.row &&\n this.anchor.column == this.lead.column\n ));\n };\n this.isMultiLine = function() {\n if (this.isEmpty()) {\n return false;\n }\n\n return this.getRange().isMultiLine();\n };\n this.getCursor = function() {\n return this.lead.getPosition();\n };\n this.setSelectionAnchor = function(row, column) {\n this.anchor.setPosition(row, column);\n\n if (this.$isEmpty) {\n this.$isEmpty = false;\n this._emit(\"changeSelection\");\n }\n };\n this.getSelectionAnchor = function() {\n if (this.$isEmpty)\n return this.getSelectionLead();\n else\n return this.anchor.getPosition();\n };\n this.getSelectionLead = function() {\n return this.lead.getPosition();\n };\n this.shiftSelection = function(columns) {\n if (this.$isEmpty) {\n this.moveCursorTo(this.lead.row, this.lead.column + columns);\n return;\n }\n\n var anchor = this.getSelectionAnchor();\n var lead = this.getSelectionLead();\n\n var isBackwards = this.isBackwards();\n\n if (!isBackwards || anchor.column !== 0)\n this.setSelectionAnchor(anchor.row, anchor.column + columns);\n\n if (isBackwards || lead.column !== 0) {\n this.$moveSelection(function() {\n this.moveCursorTo(lead.row, lead.column + columns);\n });\n }\n };\n this.isBackwards = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));\n };\n this.getRange = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n\n if (this.isEmpty())\n return Range.fromPoints(lead, lead);\n\n if (this.isBackwards()) {\n return Range.fromPoints(lead, anchor);\n }\n else {\n return Range.fromPoints(anchor, lead);\n }\n };\n this.clearSelection = function() {\n if (!this.$isEmpty) {\n this.$isEmpty = true;\n this._emit(\"changeSelection\");\n }\n };\n this.selectAll = function() {\n var lastRow = this.doc.getLength() - 1;\n this.setSelectionAnchor(0, 0);\n this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length);\n };\n this.setRange =\n this.setSelectionRange = function(range, reverse) {\n if (reverse) {\n this.setSelectionAnchor(range.end.row, range.end.column);\n this.selectTo(range.start.row, range.start.column);\n } else {\n this.setSelectionAnchor(range.start.row, range.start.column);\n this.selectTo(range.end.row, range.end.column);\n }\n if (this.getRange().isEmpty())\n this.$isEmpty = true;\n this.$desiredColumn = null;\n };\n\n this.$moveSelection = function(mover) {\n var lead = this.lead;\n if (this.$isEmpty)\n this.setSelectionAnchor(lead.row, lead.column);\n\n mover.call(this);\n };\n this.selectTo = function(row, column) {\n this.$moveSelection(function() {\n this.moveCursorTo(row, column);\n });\n };\n this.selectToPosition = function(pos) {\n this.$moveSelection(function() {\n this.moveCursorToPosition(pos);\n });\n };\n this.moveTo = function(row, column) {\n this.clearSelection();\n this.moveCursorTo(row, column);\n };\n this.moveToPosition = function(pos) {\n this.clearSelection();\n this.moveCursorToPosition(pos);\n };\n this.selectUp = function() {\n this.$moveSelection(this.moveCursorUp);\n };\n this.selectDown = function() {\n this.$moveSelection(this.moveCursorDown);\n };\n this.selectRight = function() {\n this.$moveSelection(this.moveCursorRight);\n };\n this.selectLeft = function() {\n this.$moveSelection(this.moveCursorLeft);\n };\n this.selectLineStart = function() {\n this.$moveSelection(this.moveCursorLineStart);\n };\n this.selectLineEnd = function() {\n this.$moveSelection(this.moveCursorLineEnd);\n };\n this.selectFileEnd = function() {\n this.$moveSelection(this.moveCursorFileEnd);\n };\n this.selectFileStart = function() {\n this.$moveSelection(this.moveCursorFileStart);\n };\n this.selectWordRight = function() {\n this.$moveSelection(this.moveCursorWordRight);\n };\n this.selectWordLeft = function() {\n this.$moveSelection(this.moveCursorWordLeft);\n };\n this.getWordRange = function(row, column) {\n if (typeof column == \"undefined\") {\n var cursor = row || this.lead;\n row = cursor.row;\n column = cursor.column;\n }\n return this.session.getWordRange(row, column);\n };\n this.selectWord = function() {\n this.setSelectionRange(this.getWordRange());\n };\n this.selectAWord = function() {\n var cursor = this.getCursor();\n var range = this.session.getAWordRange(cursor.row, cursor.column);\n this.setSelectionRange(range);\n };\n\n this.getLineRange = function(row, excludeLastChar) {\n var rowStart = typeof row == \"number\" ? row : this.lead.row;\n var rowEnd;\n\n var foldLine = this.session.getFoldLine(rowStart);\n if (foldLine) {\n rowStart = foldLine.start.row;\n rowEnd = foldLine.end.row;\n } else {\n rowEnd = rowStart;\n }\n if (excludeLastChar === true)\n return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);\n else\n return new Range(rowStart, 0, rowEnd + 1, 0);\n };\n this.selectLine = function() {\n this.setSelectionRange(this.getLineRange());\n };\n this.moveCursorUp = function() {\n this.moveCursorBy(-1, 0);\n };\n this.moveCursorDown = function() {\n this.moveCursorBy(1, 0);\n };\n this.wouldMoveIntoSoftTab = function(cursor, tabSize, direction) {\n var start = cursor.column;\n var end = cursor.column + tabSize;\n\n if (direction < 0) {\n start = cursor.column - tabSize;\n end = cursor.column;\n }\n return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(\" \").length-1 == tabSize;\n };\n this.moveCursorLeft = function() {\n var cursor = this.lead.getPosition(),\n fold;\n\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n } else if (cursor.column === 0) {\n if (cursor.row > 0) {\n this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, -tabSize);\n } else {\n this.moveCursorBy(0, -1);\n }\n }\n };\n this.moveCursorRight = function() {\n var cursor = this.lead.getPosition(),\n fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n }\n else if (this.lead.column == this.doc.getLine(this.lead.row).length) {\n if (this.lead.row < this.doc.getLength() - 1) {\n this.moveCursorTo(this.lead.row + 1, 0);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n var cursor = this.lead;\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, tabSize);\n } else {\n this.moveCursorBy(0, 1);\n }\n }\n };\n this.moveCursorLineStart = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var screenRow = this.session.documentToScreenRow(row, column);\n var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);\n var beforeCursor = this.session.getDisplayLine(\n row, null, firstColumnPosition.row,\n firstColumnPosition.column\n );\n\n var leadingSpace = beforeCursor.match(/^\\s*/);\n if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)\n firstColumnPosition.column += leadingSpace[0].length;\n this.moveCursorToPosition(firstColumnPosition);\n };\n this.moveCursorLineEnd = function() {\n var lead = this.lead;\n var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);\n if (this.lead.column == lineEnd.column) {\n var line = this.session.getLine(lineEnd.row);\n if (lineEnd.column == line.length) {\n var textEnd = line.search(/\\s+$/);\n if (textEnd > 0)\n lineEnd.column = textEnd;\n }\n }\n\n this.moveCursorTo(lineEnd.row, lineEnd.column);\n };\n this.moveCursorFileEnd = function() {\n var row = this.doc.getLength() - 1;\n var column = this.doc.getLine(row).length;\n this.moveCursorTo(row, column);\n };\n this.moveCursorFileStart = function() {\n this.moveCursorTo(0, 0);\n };\n this.moveCursorLongWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n return;\n }\n if (match = this.session.nonTokenRe.exec(rightOfCursor)) {\n column += this.session.nonTokenRe.lastIndex;\n this.session.nonTokenRe.lastIndex = 0;\n rightOfCursor = line.substring(column);\n }\n if (column >= line.length) {\n this.moveCursorTo(row, line.length);\n this.moveCursorRight();\n if (row < this.doc.getLength() - 1)\n this.moveCursorWordRight();\n return;\n }\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n column += this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n this.moveCursorLongWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n return;\n }\n\n var str = this.session.getFoldStringAt(row, column, -1);\n if (str == null) {\n str = this.doc.getLine(row).substring(0, column);\n }\n\n var leftOfCursor = lang.stringReverse(str);\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n if (match = this.session.nonTokenRe.exec(leftOfCursor)) {\n column -= this.session.nonTokenRe.lastIndex;\n leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);\n this.session.nonTokenRe.lastIndex = 0;\n }\n if (column <= 0) {\n this.moveCursorTo(row, 0);\n this.moveCursorLeft();\n if (row > 0)\n this.moveCursorWordLeft();\n return;\n }\n if (match = this.session.tokenRe.exec(leftOfCursor)) {\n column -= this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n\n this.$shortWordEndIndex = function(rightOfCursor) {\n var match, index = 0, ch;\n var whitespaceRe = /\\s/;\n var tokenRe = this.session.tokenRe;\n\n tokenRe.lastIndex = 0;\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n index = this.session.tokenRe.lastIndex;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n\n if (index < 1) {\n tokenRe.lastIndex = 0;\n while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {\n tokenRe.lastIndex = 0;\n index ++;\n if (whitespaceRe.test(ch)) {\n if (index > 2) {\n index--;\n break;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n if (index > 2)\n break;\n }\n }\n }\n }\n }\n tokenRe.lastIndex = 0;\n\n return index;\n };\n\n this.moveCursorShortWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold)\n return this.moveCursorTo(fold.end.row, fold.end.column);\n\n if (column == line.length) {\n var l = this.doc.getLength();\n do {\n row++;\n rightOfCursor = this.doc.getLine(row);\n } while (row < l && /^\\s*$/.test(rightOfCursor));\n\n if (!/^\\s+/.test(rightOfCursor))\n rightOfCursor = \"\";\n column = 0;\n }\n\n var index = this.$shortWordEndIndex(rightOfCursor);\n\n this.moveCursorTo(row, column + index);\n };\n\n this.moveCursorShortWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1))\n return this.moveCursorTo(fold.start.row, fold.start.column);\n\n var line = this.session.getLine(row).substring(0, column);\n if (column === 0) {\n do {\n row--;\n line = this.doc.getLine(row);\n } while (row > 0 && /^\\s*$/.test(line));\n\n column = line.length;\n if (!/\\s+$/.test(line))\n line = \"\";\n }\n\n var leftOfCursor = lang.stringReverse(line);\n var index = this.$shortWordEndIndex(leftOfCursor);\n\n return this.moveCursorTo(row, column - index);\n };\n\n this.moveCursorWordRight = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordRight();\n else\n this.moveCursorShortWordRight();\n };\n\n this.moveCursorWordLeft = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordLeft();\n else\n this.moveCursorShortWordLeft();\n };\n this.moveCursorBy = function(rows, chars) {\n var screenPos = this.session.documentToScreenPosition(\n this.lead.row,\n this.lead.column\n );\n\n var offsetX;\n\n if (chars === 0) {\n if (rows !== 0) {\n if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) {\n offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column);\n screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]);\n } else {\n offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];\n }\n }\n\n if (this.$desiredColumn)\n screenPos.column = this.$desiredColumn;\n else\n this.$desiredColumn = screenPos.column;\n }\n\n var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX);\n \n if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {\n if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {\n if (docPos.row > 0 || rows > 0)\n docPos.row++;\n }\n }\n this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);\n };\n this.moveCursorToPosition = function(position) {\n this.moveCursorTo(position.row, position.column);\n };\n this.moveCursorTo = function(row, column, keepDesiredColumn) {\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n row = fold.start.row;\n column = fold.start.column;\n }\n\n this.$keepDesiredColumnOnChange = true;\n var line = this.session.getLine(row);\n if (/[\\uDC00-\\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) {\n if (this.lead.row == row && this.lead.column == column + 1)\n column = column - 1;\n else\n column = column + 1;\n }\n this.lead.setPosition(row, column);\n this.$keepDesiredColumnOnChange = false;\n\n if (!keepDesiredColumn)\n this.$desiredColumn = null;\n };\n this.moveCursorToScreen = function(row, column, keepDesiredColumn) {\n var pos = this.session.screenToDocumentPosition(row, column);\n this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);\n };\n this.detach = function() {\n this.lead.detach();\n this.anchor.detach();\n this.session = this.doc = null;\n };\n\n this.fromOrientedRange = function(range) {\n this.setSelectionRange(range, range.cursor == range.start);\n this.$desiredColumn = range.desiredColumn || this.$desiredColumn;\n };\n\n this.toOrientedRange = function(range) {\n var r = this.getRange();\n if (range) {\n range.start.column = r.start.column;\n range.start.row = r.start.row;\n range.end.column = r.end.column;\n range.end.row = r.end.row;\n } else {\n range = r;\n }\n\n range.cursor = this.isBackwards() ? range.start : range.end;\n range.desiredColumn = this.$desiredColumn;\n return range;\n };\n this.getRangeOfMovements = function(func) {\n var start = this.getCursor();\n try {\n func(this);\n var end = this.getCursor();\n return Range.fromPoints(start,end);\n } catch(e) {\n return Range.fromPoints(start,start);\n } finally {\n this.moveCursorToPosition(start);\n }\n };\n\n this.toJSON = function() {\n if (this.rangeCount) {\n var data = this.ranges.map(function(r) {\n var r1 = r.clone();\n r1.isBackwards = r.cursor == r.start;\n return r1;\n });\n } else {\n var data = this.getRange();\n data.isBackwards = this.isBackwards();\n }\n return data;\n };\n\n this.fromJSON = function(data) {\n if (data.start == undefined) {\n if (this.rangeList) {\n this.toSingleRange(data[0]);\n for (var i = data.length; i--; ) {\n var r = Range.fromPoints(data[i].start, data[i].end);\n if (data[i].isBackwards)\n r.cursor = r.start;\n this.addRange(r, true);\n }\n return;\n } else\n data = data[0];\n }\n if (this.rangeList)\n this.toSingleRange(data);\n this.setSelectionRange(data, data.isBackwards);\n };\n\n this.isEqual = function(data) {\n if ((data.length || this.rangeCount) && data.length != this.rangeCount)\n return false;\n if (!data.length || !this.ranges)\n return this.getRange().isEqual(data);\n\n for (var i = this.ranges.length; i--; ) {\n if (!this.ranges[i].isEqual(data[i]))\n return false;\n }\n return true;\n };\n\n}).call(Selection.prototype);\n\nexports.Selection = Selection;\n});\n\nace.define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar config = acequire(\"./config\");\nvar MAX_TOKEN_COUNT = 2000;\nvar Tokenizer = function(rules) {\n this.states = rules;\n\n this.regExps = {};\n this.matchMappings = {};\n for (var key in this.states) {\n var state = this.states[key];\n var ruleRegExps = [];\n var matchTotal = 0;\n var mapping = this.matchMappings[key] = {defaultToken: \"text\"};\n var flag = \"g\";\n\n var splitterRurles = [];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.defaultToken)\n mapping.defaultToken = rule.defaultToken;\n if (rule.caseInsensitive)\n flag = \"gi\";\n if (rule.regex == null)\n continue;\n\n if (rule.regex instanceof RegExp)\n rule.regex = rule.regex.toString().slice(1, -1);\n var adjustedregex = rule.regex;\n var matchcount = new RegExp(\"(?:(\" + adjustedregex + \")|(.))\").exec(\"a\").length - 2;\n if (Array.isArray(rule.token)) {\n if (rule.token.length == 1 || matchcount == 1) {\n rule.token = rule.token[0];\n } else if (matchcount - 1 != rule.token.length) {\n this.reportError(\"number of classes and regexp groups doesn't match\", { \n rule: rule,\n groupCount: matchcount - 1\n });\n rule.token = rule.token[0];\n } else {\n rule.tokenArray = rule.token;\n rule.token = null;\n rule.onMatch = this.$arrayTokens;\n }\n } else if (typeof rule.token == \"function\" && !rule.onMatch) {\n if (matchcount > 1)\n rule.onMatch = this.$applyToken;\n else\n rule.onMatch = rule.token;\n }\n\n if (matchcount > 1) {\n if (/\\\\\\d/.test(rule.regex)) {\n adjustedregex = rule.regex.replace(/\\\\([0-9]+)/g, function(match, digit) {\n return \"\\\\\" + (parseInt(digit, 10) + matchTotal + 1);\n });\n } else {\n matchcount = 1;\n adjustedregex = this.removeCapturingGroups(rule.regex);\n }\n if (!rule.splitRegex && typeof rule.token != \"string\")\n splitterRurles.push(rule); // flag will be known only at the very end\n }\n\n mapping[matchTotal] = i;\n matchTotal += matchcount;\n\n ruleRegExps.push(adjustedregex);\n if (!rule.onMatch)\n rule.onMatch = null;\n }\n \n if (!ruleRegExps.length) {\n mapping[0] = 0;\n ruleRegExps.push(\"$\");\n }\n \n splitterRurles.forEach(function(rule) {\n rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);\n }, this);\n\n this.regExps[key] = new RegExp(\"(\" + ruleRegExps.join(\")|(\") + \")|($)\", flag);\n }\n};\n\n(function() {\n this.$setMaxTokenCount = function(m) {\n MAX_TOKEN_COUNT = m | 0;\n };\n \n this.$applyToken = function(str) {\n var values = this.splitRegex.exec(str).slice(1);\n var types = this.token.apply(this, values);\n if (typeof types === \"string\")\n return [{type: types, value: str}];\n\n var tokens = [];\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i]\n };\n }\n return tokens;\n };\n\n this.$arrayTokens = function(str) {\n if (!str)\n return [];\n var values = this.splitRegex.exec(str);\n if (!values)\n return \"text\";\n var tokens = [];\n var types = this.tokenArray;\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i + 1])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i + 1]\n };\n }\n return tokens;\n };\n\n this.removeCapturingGroups = function(src) {\n var r = src.replace(\n /\\[(?:\\\\.|[^\\]])*?\\]|\\\\.|\\(\\?[:=!]|(\\()/g,\n function(x, y) {return y ? \"(?:\" : x;}\n );\n return r;\n };\n\n this.createSplitterRegexp = function(src, flag) {\n if (src.indexOf(\"(?=\") != -1) {\n var stack = 0;\n var inChClass = false;\n var lastCapture = {};\n src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g, function(\n m, esc, parenOpen, parenClose, square, index\n ) {\n if (inChClass) {\n inChClass = square != \"]\";\n } else if (square) {\n inChClass = true;\n } else if (parenClose) {\n if (stack == lastCapture.stack) {\n lastCapture.end = index+1;\n lastCapture.stack = -1;\n }\n stack--;\n } else if (parenOpen) {\n stack++;\n if (parenOpen.length != 1) {\n lastCapture.stack = stack;\n lastCapture.start = index;\n }\n }\n return m;\n });\n\n if (lastCapture.end != null && /^\\)*$/.test(src.substr(lastCapture.end)))\n src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);\n }\n if (src.charAt(0) != \"^\") src = \"^\" + src;\n if (src.charAt(src.length - 1) != \"$\") src += \"$\";\n \n return new RegExp(src, (flag||\"\").replace(\"g\", \"\"));\n };\n this.getLineTokens = function(line, startState) {\n if (startState && typeof startState != \"string\") {\n var stack = startState.slice(0);\n startState = stack[0];\n if (startState === \"#tmp\") {\n stack.shift();\n startState = stack.shift();\n }\n } else\n var stack = [];\n\n var currentState = startState || \"start\";\n var state = this.states[currentState];\n if (!state) {\n currentState = \"start\";\n state = this.states[currentState];\n }\n var mapping = this.matchMappings[currentState];\n var re = this.regExps[currentState];\n re.lastIndex = 0;\n\n var match, tokens = [];\n var lastIndex = 0;\n var matchAttempts = 0;\n\n var token = {type: null, value: \"\"};\n\n while (match = re.exec(line)) {\n var type = mapping.defaultToken;\n var rule = null;\n var value = match[0];\n var index = re.lastIndex;\n\n if (index - value.length > lastIndex) {\n var skipped = line.substring(lastIndex, index - value.length);\n if (token.type == type) {\n token.value += skipped;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: skipped};\n }\n }\n\n for (var i = 0; i < match.length-2; i++) {\n if (match[i + 1] === undefined)\n continue;\n\n rule = state[mapping[i]];\n\n if (rule.onMatch)\n type = rule.onMatch(value, currentState, stack, line);\n else\n type = rule.token;\n\n if (rule.next) {\n if (typeof rule.next == \"string\") {\n currentState = rule.next;\n } else {\n currentState = rule.next(currentState, stack);\n }\n \n state = this.states[currentState];\n if (!state) {\n this.reportError(\"state doesn't exist\", currentState);\n currentState = \"start\";\n state = this.states[currentState];\n }\n mapping = this.matchMappings[currentState];\n lastIndex = index;\n re = this.regExps[currentState];\n re.lastIndex = index;\n }\n if (rule.consumeLineEnd)\n lastIndex = index;\n break;\n }\n\n if (value) {\n if (typeof type === \"string\") {\n if ((!rule || rule.merge !== false) && token.type === type) {\n token.value += value;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: value};\n }\n } else if (type) {\n if (token.type)\n tokens.push(token);\n token = {type: null, value: \"\"};\n for (var i = 0; i < type.length; i++)\n tokens.push(type[i]);\n }\n }\n\n if (lastIndex == line.length)\n break;\n\n lastIndex = index;\n\n if (matchAttempts++ > MAX_TOKEN_COUNT) {\n if (matchAttempts > 2 * line.length) {\n this.reportError(\"infinite loop with in ace tokenizer\", {\n startState: startState,\n line: line\n });\n }\n while (lastIndex < line.length) {\n if (token.type)\n tokens.push(token);\n token = {\n value: line.substring(lastIndex, lastIndex += 2000),\n type: \"overflow\"\n };\n }\n currentState = \"start\";\n stack = [];\n break;\n }\n }\n\n if (token.type)\n tokens.push(token);\n \n if (stack.length > 1) {\n if (stack[0] !== currentState)\n stack.unshift(\"#tmp\", currentState);\n }\n return {\n tokens : tokens,\n state : stack.length ? stack : currentState\n };\n };\n \n this.reportError = config.reportError;\n \n}).call(Tokenizer.prototype);\n\nexports.Tokenizer = Tokenizer;\n});\n\nace.define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\n\nvar TextHighlightRules = function() {\n\n this.$rules = {\n \"start\" : [{\n token : \"empty_line\",\n regex : '^$'\n }, {\n defaultToken : \"text\"\n }]\n };\n};\n\n(function() {\n\n this.addRules = function(rules, prefix) {\n if (!prefix) {\n for (var key in rules)\n this.$rules[key] = rules[key];\n return;\n }\n for (var key in rules) {\n var state = rules[key];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.next || rule.onMatch) {\n if (typeof rule.next == \"string\") {\n if (rule.next.indexOf(prefix) !== 0)\n rule.next = prefix + rule.next;\n }\n if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)\n rule.nextState = prefix + rule.nextState;\n }\n }\n this.$rules[prefix + key] = state;\n }\n };\n\n this.getRules = function() {\n return this.$rules;\n };\n\n this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {\n var embedRules = typeof HighlightRules == \"function\"\n ? new HighlightRules().getRules()\n : HighlightRules;\n if (states) {\n for (var i = 0; i < states.length; i++)\n states[i] = prefix + states[i];\n } else {\n states = [];\n for (var key in embedRules)\n states.push(prefix + key);\n }\n\n this.addRules(embedRules, prefix);\n\n if (escapeRules) {\n var addRules = Array.prototype[append ? \"push\" : \"unshift\"];\n for (var i = 0; i < states.length; i++)\n addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));\n }\n\n if (!this.$embeds)\n this.$embeds = [];\n this.$embeds.push(prefix);\n };\n\n this.getEmbeds = function() {\n return this.$embeds;\n };\n\n var pushState = function(currentState, stack) {\n if (currentState != \"start\" || stack.length)\n stack.unshift(this.nextState, currentState);\n return this.nextState;\n };\n var popState = function(currentState, stack) {\n stack.shift();\n return stack.shift() || \"start\";\n };\n\n this.normalizeRules = function() {\n var id = 0;\n var rules = this.$rules;\n function processState(key) {\n var state = rules[key];\n state.processed = true;\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n var toInsert = null;\n if (Array.isArray(rule)) {\n toInsert = rule;\n rule = {};\n }\n if (!rule.regex && rule.start) {\n rule.regex = rule.start;\n if (!rule.next)\n rule.next = [];\n rule.next.push({\n defaultToken: rule.token\n }, {\n token: rule.token + \".end\",\n regex: rule.end || rule.start,\n next: \"pop\"\n });\n rule.token = rule.token + \".start\";\n rule.push = true;\n }\n var next = rule.next || rule.push;\n if (next && Array.isArray(next)) {\n var stateName = rule.stateName;\n if (!stateName) {\n stateName = rule.token;\n if (typeof stateName != \"string\")\n stateName = stateName[0] || \"\";\n if (rules[stateName])\n stateName += id++;\n }\n rules[stateName] = next;\n rule.next = stateName;\n processState(stateName);\n } else if (next == \"pop\") {\n rule.next = popState;\n }\n\n if (rule.push) {\n rule.nextState = rule.next || rule.push;\n rule.next = pushState;\n delete rule.push;\n }\n\n if (rule.rules) {\n for (var r in rule.rules) {\n if (rules[r]) {\n if (rules[r].push)\n rules[r].push.apply(rules[r], rule.rules[r]);\n } else {\n rules[r] = rule.rules[r];\n }\n }\n }\n var includeName = typeof rule == \"string\" ? rule : rule.include;\n if (includeName) {\n if (Array.isArray(includeName))\n toInsert = includeName.map(function(x) { return rules[x]; });\n else\n toInsert = rules[includeName];\n }\n\n if (toInsert) {\n var args = [i, 1].concat(toInsert);\n if (rule.noEscape)\n args = args.filter(function(x) {return !x.next;});\n state.splice.apply(state, args);\n i--;\n }\n \n if (rule.keywordMap) {\n rule.token = this.createKeywordMapper(\n rule.keywordMap, rule.defaultToken || \"text\", rule.caseInsensitive\n );\n delete rule.defaultToken;\n }\n }\n }\n Object.keys(rules).forEach(processState, this);\n };\n\n this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {\n var keywords = Object.create(null);\n Object.keys(map).forEach(function(className) {\n var a = map[className];\n if (ignoreCase)\n a = a.toLowerCase();\n var list = a.split(splitChar || \"|\");\n for (var i = list.length; i--; )\n keywords[list[i]] = className;\n });\n if (Object.getPrototypeOf(keywords)) {\n keywords.__proto__ = null;\n }\n this.$keywordList = Object.keys(keywords);\n map = null;\n return ignoreCase\n ? function(value) {return keywords[value.toLowerCase()] || defaultToken; }\n : function(value) {return keywords[value] || defaultToken; };\n };\n\n this.getKeywords = function() {\n return this.$keywords;\n };\n\n}).call(TextHighlightRules.prototype);\n\nexports.TextHighlightRules = TextHighlightRules;\n});\n\nace.define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Behaviour = function() {\n this.$behaviours = {};\n};\n\n(function () {\n\n this.add = function (name, action, callback) {\n switch (undefined) {\n case this.$behaviours:\n this.$behaviours = {};\n case this.$behaviours[name]:\n this.$behaviours[name] = {};\n }\n this.$behaviours[name][action] = callback;\n };\n \n this.addBehaviours = function (behaviours) {\n for (var key in behaviours) {\n for (var action in behaviours[key]) {\n this.add(key, action, behaviours[key][action]);\n }\n }\n };\n \n this.remove = function (name) {\n if (this.$behaviours && this.$behaviours[name]) {\n delete this.$behaviours[name];\n }\n };\n \n this.inherit = function (mode, filter) {\n if (typeof mode === \"function\") {\n var behaviours = new mode().getBehaviours(filter);\n } else {\n var behaviours = mode.getBehaviours(filter);\n }\n this.addBehaviours(behaviours);\n };\n \n this.getBehaviours = function (filter) {\n if (!filter) {\n return this.$behaviours;\n } else {\n var ret = {};\n for (var i = 0; i < filter.length; i++) {\n if (this.$behaviours[filter[i]]) {\n ret[filter[i]] = this.$behaviours[filter[i]];\n }\n }\n return ret;\n }\n };\n\n}).call(Behaviour.prototype);\n\nexports.Behaviour = Behaviour;\n});\n\nace.define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"./range\").Range;\nvar TokenIterator = function(session, initialRow, initialColumn) {\n this.$session = session;\n this.$row = initialRow;\n this.$rowTokens = session.getTokens(initialRow);\n\n var token = session.getTokenAt(initialRow, initialColumn);\n this.$tokenIndex = token ? token.index : -1;\n};\n\n(function() { \n this.stepBackward = function() {\n this.$tokenIndex -= 1;\n \n while (this.$tokenIndex < 0) {\n this.$row -= 1;\n if (this.$row < 0) {\n this.$row = 0;\n return null;\n }\n \n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = this.$rowTokens.length - 1;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.stepForward = function() {\n this.$tokenIndex += 1;\n var rowCount;\n while (this.$tokenIndex >= this.$rowTokens.length) {\n this.$row += 1;\n if (!rowCount)\n rowCount = this.$session.getLength();\n if (this.$row >= rowCount) {\n this.$row = rowCount - 1;\n return null;\n }\n\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = 0;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentToken = function () {\n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentTokenRow = function () {\n return this.$row;\n }; \n this.getCurrentTokenColumn = function() {\n var rowTokens = this.$rowTokens;\n var tokenIndex = this.$tokenIndex;\n var column = rowTokens[tokenIndex].start;\n if (column !== undefined)\n return column;\n \n column = 0;\n while (tokenIndex > 0) {\n tokenIndex -= 1;\n column += rowTokens[tokenIndex].value.length;\n }\n \n return column; \n };\n this.getCurrentTokenPosition = function() {\n return {row: this.$row, column: this.getCurrentTokenColumn()};\n };\n this.getCurrentTokenRange = function() {\n var token = this.$rowTokens[this.$tokenIndex];\n var column = this.getCurrentTokenColumn();\n return new Range(this.$row, column, this.$row, column + token.value.length);\n };\n\n}).call(TokenIterator.prototype);\n\nexports.TokenIterator = TokenIterator;\n});\n\nace.define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\nvar lang = acequire(\"../../lib/lang\");\n\nvar SAFE_INSERT_IN_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\"];\nvar SAFE_INSERT_BEFORE_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\", \"comment\"];\n\nvar context;\nvar contextCache = {};\nvar defaultQuotes = {'\"' : '\"', \"'\" : \"'\"};\n\nvar initContext = function(editor) {\n var id = -1;\n if (editor.multiSelect) {\n id = editor.selection.index;\n if (contextCache.rangeCount != editor.multiSelect.rangeCount)\n contextCache = {rangeCount: editor.multiSelect.rangeCount};\n }\n if (contextCache[id])\n return context = contextCache[id];\n context = contextCache[id] = {\n autoInsertedBrackets: 0,\n autoInsertedRow: -1,\n autoInsertedLineEnd: \"\",\n maybeInsertedBrackets: 0,\n maybeInsertedRow: -1,\n maybeInsertedLineStart: \"\",\n maybeInsertedLineEnd: \"\"\n };\n};\n\nvar getWrapped = function(selection, selected, opening, closing) {\n var rowDiff = selection.end.row - selection.start.row;\n return {\n text: opening + selected + closing,\n selection: [\n 0,\n selection.start.column + 1,\n rowDiff,\n selection.end.column + (rowDiff ? 0 : 1)\n ]\n };\n};\n\nvar CstyleBehaviour = function(options) {\n this.add(\"braces\", \"insertion\", function(state, action, editor, session, text) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (text == '{') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && selected !== \"{\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '{', '}');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n if (/[\\]\\}\\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options && options.braces) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n } else {\n CstyleBehaviour.recordMaybeInsert(editor, session, \"{\");\n return {\n text: '{',\n selection: [1, 1]\n };\n }\n }\n } else if (text == '}') {\n initContext(editor);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == '}') {\n var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n } else if (text == \"\\n\" || text == \"\\r\\n\") {\n initContext(editor);\n var closing = \"\";\n if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {\n closing = lang.stringRepeat(\"}\", context.maybeInsertedBrackets);\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === '}') {\n var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');\n if (!openBracePos)\n return null;\n var next_indent = this.$getIndent(session.getLine(openBracePos.row));\n } else if (closing) {\n var next_indent = this.$getIndent(line);\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n return;\n }\n var indent = next_indent + session.getTabString();\n\n return {\n text: '\\n' + indent + '\\n' + next_indent + closing,\n selection: [1, indent.length, 1, indent.length]\n };\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n });\n\n this.add(\"braces\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '{') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar == '}') {\n range.end.column++;\n return range;\n } else {\n context.maybeInsertedBrackets--;\n }\n }\n });\n\n this.add(\"parens\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '(') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '(', ')');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \")\");\n return {\n text: '()',\n selection: [1, 1]\n };\n }\n } else if (text == ')') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ')') {\n var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"parens\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '(') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ')') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"brackets\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '[') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '[', ']');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"]\");\n return {\n text: '[]',\n selection: [1, 1]\n };\n }\n } else if (text == ']') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ']') {\n var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"brackets\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '[') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ']') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"string_dquotes\", \"insertion\", function(state, action, editor, session, text) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n if (text.length == 1 && quotes[text]) {\n if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1)\n return;\n initContext(editor);\n var quote = text;\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, quote, quote);\n } else if (!selected) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var leftChar = line.substring(cursor.column-1, cursor.column);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n var token = session.getTokenAt(cursor.row, cursor.column);\n var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);\n if (leftChar == \"\\\\\" && token && /escape/.test(token.type))\n return null;\n\n var stringBefore = token && /string|escape/.test(token.type);\n var stringAfter = !rightToken || /string|escape/.test(rightToken.type);\n\n var pair;\n if (rightChar == quote) {\n pair = stringBefore !== stringAfter;\n if (pair && /string\\.end/.test(rightToken.type))\n pair = false;\n } else {\n if (stringBefore && !stringAfter)\n return null; // wrap string with different quote\n if (stringBefore && stringAfter)\n return null; // do not pair quotes inside strings\n var wordRe = session.$mode.tokenRe;\n wordRe.lastIndex = 0;\n var isWordBefore = wordRe.test(leftChar);\n wordRe.lastIndex = 0;\n var isWordAfter = wordRe.test(leftChar);\n if (isWordBefore || isWordAfter)\n return null; // before or after alphanumeric\n if (rightChar && !/[\\s;,.})\\]\\\\]/.test(rightChar))\n return null; // there is rightChar and it isn't closing\n pair = true;\n }\n return {\n text: pair ? quote + quote : \"\",\n selection: [1,1]\n };\n }\n }\n });\n\n this.add(\"string_dquotes\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n\n};\n\n\nCstyleBehaviour.isSaneInsertion = function(editor, session) {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n if (!this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) {\n var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);\n if (!this.$matchTokenType(iterator2.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS))\n return false;\n }\n iterator.stepForward();\n return iterator.getCurrentTokenRow() !== cursor.row ||\n this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_BEFORE_TOKENS);\n};\n\nCstyleBehaviour.$matchTokenType = function(token, types) {\n return types.indexOf(token.type || token) > -1;\n};\n\nCstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))\n context.autoInsertedBrackets = 0;\n context.autoInsertedRow = cursor.row;\n context.autoInsertedLineEnd = bracket + line.substr(cursor.column);\n context.autoInsertedBrackets++;\n};\n\nCstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isMaybeInsertedClosing(cursor, line))\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = cursor.row;\n context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;\n context.maybeInsertedLineEnd = line.substr(cursor.column);\n context.maybeInsertedBrackets++;\n};\n\nCstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {\n return context.autoInsertedBrackets > 0 &&\n cursor.row === context.autoInsertedRow &&\n bracket === context.autoInsertedLineEnd[0] &&\n line.substr(cursor.column) === context.autoInsertedLineEnd;\n};\n\nCstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {\n return context.maybeInsertedBrackets > 0 &&\n cursor.row === context.maybeInsertedRow &&\n line.substr(cursor.column) === context.maybeInsertedLineEnd &&\n line.substr(0, cursor.column) == context.maybeInsertedLineStart;\n};\n\nCstyleBehaviour.popAutoInsertedClosing = function() {\n context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);\n context.autoInsertedBrackets--;\n};\n\nCstyleBehaviour.clearMaybeInsertedClosing = function() {\n if (context) {\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = -1;\n }\n};\n\n\n\noop.inherits(CstyleBehaviour, Behaviour);\n\nexports.CstyleBehaviour = CstyleBehaviour;\n});\n\nace.define(\"ace/unicode\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.packages = {};\n\naddUnicodePackage({\n 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\",\n 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\",\n 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\",\n Lt: \"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC\",\n Lm: \"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F\",\n 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\",\n 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\",\n 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\",\n 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\",\n Me: \"0488048906DE20DD-20E020E2-20E4A670-A672\",\n 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\",\n 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\",\n Nl: \"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF\",\n No: \"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835\",\n 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\",\n Pd: \"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D\",\n Ps: \"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62\",\n Pe: \"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63\",\n Pi: \"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20\",\n Pf: \"00BB2019201D203A2E032E052E0A2E0D2E1D2E21\",\n Pc: \"005F203F20402054FE33FE34FE4D-FE4FFF3F\",\n 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\",\n 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\",\n 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\",\n Sc: \"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6\",\n Sk: \"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3\",\n 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\",\n Z: \"002000A01680180E2000-200A20282029202F205F3000\",\n Zs: \"002000A01680180E2000-200A202F205F3000\",\n Zl: \"2028\",\n Zp: \"2029\",\n 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\",\n Cc: \"0000-001F007F-009F\",\n Cf: \"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB\",\n Co: \"E000-F8FF\",\n Cs: \"D800-DFFF\",\n 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});\n\nfunction addUnicodePackage (pack) {\n var codePoint = /\\w{4}/g;\n for (var name in pack)\n exports.packages[name] = pack[name].replace(codePoint, \"\\\\u$&\");\n}\n\n});\n\nace.define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour/cstyle\",\"ace/unicode\",\"ace/lib/lang\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Tokenizer = acequire(\"../tokenizer\").Tokenizer;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar unicode = acequire(\"../unicode\");\nvar lang = acequire(\"../lib/lang\");\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\nvar Mode = function() {\n this.HighlightRules = TextHighlightRules;\n};\n\n(function() {\n this.$defaultBehaviour = new CstyleBehaviour();\n\n this.tokenRe = new RegExp(\"^[\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]+\", \"g\"\n );\n\n this.nonTokenRe = new RegExp(\"^(?:[^\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]|\\\\s])+\", \"g\"\n );\n\n this.getTokenizer = function() {\n if (!this.$tokenizer) {\n this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);\n this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());\n }\n return this.$tokenizer;\n };\n\n this.lineCommentStart = \"\";\n this.blockComment = \"\";\n\n this.toggleCommentLines = function(state, session, startRow, endRow) {\n var doc = session.doc;\n\n var ignoreBlankLines = true;\n var shouldRemove = true;\n var minIndent = Infinity;\n var tabSize = session.getTabSize();\n var insertAtTabStop = false;\n\n if (!this.lineCommentStart) {\n if (!this.blockComment)\n return false;\n var lineCommentStart = this.blockComment.start;\n var lineCommentEnd = this.blockComment.end;\n var regexpStart = new RegExp(\"^(\\\\s*)(?:\" + lang.escapeRegExp(lineCommentStart) + \")\");\n var regexpEnd = new RegExp(\"(?:\" + lang.escapeRegExp(lineCommentEnd) + \")\\\\s*$\");\n\n var comment = function(line, i) {\n if (testRemove(line, i))\n return;\n if (!ignoreBlankLines || /\\S/.test(line)) {\n doc.insertInLine({row: i, column: line.length}, lineCommentEnd);\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n\n var uncomment = function(line, i) {\n var m;\n if (m = line.match(regexpEnd))\n doc.removeInLine(i, line.length - m[0].length, line.length);\n if (m = line.match(regexpStart))\n doc.removeInLine(i, m[1].length, m[0].length);\n };\n\n var testRemove = function(line, row) {\n if (regexpStart.test(line))\n return true;\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].type === \"comment\")\n return true;\n }\n };\n } else {\n if (Array.isArray(this.lineCommentStart)) {\n var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join(\"|\");\n var lineCommentStart = this.lineCommentStart[0];\n } else {\n var regexpStart = lang.escapeRegExp(this.lineCommentStart);\n var lineCommentStart = this.lineCommentStart;\n }\n regexpStart = new RegExp(\"^(\\\\s*)(?:\" + regexpStart + \") ?\");\n \n insertAtTabStop = session.getUseSoftTabs();\n\n var uncomment = function(line, i) {\n var m = line.match(regexpStart);\n if (!m) return;\n var start = m[1].length, end = m[0].length;\n if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == \" \")\n end--;\n doc.removeInLine(i, start, end);\n };\n var commentWithSpace = lineCommentStart + \" \";\n var comment = function(line, i) {\n if (!ignoreBlankLines || /\\S/.test(line)) {\n if (shouldInsertSpace(line, minIndent, minIndent))\n doc.insertInLine({row: i, column: minIndent}, commentWithSpace);\n else\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n var testRemove = function(line, i) {\n return regexpStart.test(line);\n };\n \n var shouldInsertSpace = function(line, before, after) {\n var spaces = 0;\n while (before-- && line.charAt(before) == \" \")\n spaces++;\n if (spaces % tabSize != 0)\n return false;\n var spaces = 0;\n while (line.charAt(after++) == \" \")\n spaces++;\n if (tabSize > 2)\n return spaces % tabSize != tabSize - 1;\n else\n return spaces % tabSize == 0;\n return true;\n };\n }\n\n function iter(fun) {\n for (var i = startRow; i <= endRow; i++)\n fun(doc.getLine(i), i);\n }\n\n\n var minEmptyLength = Infinity;\n iter(function(line, i) {\n var indent = line.search(/\\S/);\n if (indent !== -1) {\n if (indent < minIndent)\n minIndent = indent;\n if (shouldRemove && !testRemove(line, i))\n shouldRemove = false;\n } else if (minEmptyLength > line.length) {\n minEmptyLength = line.length;\n }\n });\n\n if (minIndent == Infinity) {\n minIndent = minEmptyLength;\n ignoreBlankLines = false;\n shouldRemove = false;\n }\n\n if (insertAtTabStop && minIndent % tabSize != 0)\n minIndent = Math.floor(minIndent / tabSize) * tabSize;\n\n iter(shouldRemove ? uncomment : comment);\n };\n\n this.toggleBlockComment = function(state, session, range, cursor) {\n var comment = this.blockComment;\n if (!comment)\n return;\n if (!comment.start && comment[0])\n comment = comment[0];\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n var sel = session.selection;\n var initialRange = session.selection.toOrientedRange();\n var startRow, colDiff;\n\n if (token && /comment/.test(token.type)) {\n var startRange, endRange;\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.start);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n startRange = new Range(row, column, row, column + comment.start.length);\n break;\n }\n token = iterator.stepBackward();\n }\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.end);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n endRange = new Range(row, column, row, column + comment.end.length);\n break;\n }\n token = iterator.stepForward();\n }\n if (endRange)\n session.remove(endRange);\n if (startRange) {\n session.remove(startRange);\n startRow = startRange.start.row;\n colDiff = -comment.start.length;\n }\n } else {\n colDiff = comment.start.length;\n startRow = range.start.row;\n session.insert(range.end, comment.end);\n session.insert(range.start, comment.start);\n }\n if (initialRange.start.row == startRow)\n initialRange.start.column += colDiff;\n if (initialRange.end.row == startRow)\n initialRange.end.column += colDiff;\n session.selection.fromOrientedRange(initialRange);\n };\n\n this.getNextLineIndent = function(state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function(state, line, input) {\n return false;\n };\n\n this.autoOutdent = function(state, doc, row) {\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n this.createWorker = function(session) {\n return null;\n };\n\n this.createModeDelegates = function (mapping) {\n this.$embeds = [];\n this.$modes = {};\n for (var i in mapping) {\n if (mapping[i]) {\n this.$embeds.push(i);\n this.$modes[i] = new mapping[i]();\n }\n }\n\n var delegations = [\"toggleBlockComment\", \"toggleCommentLines\", \"getNextLineIndent\", \n \"checkOutdent\", \"autoOutdent\", \"transformAction\", \"getCompletions\"];\n\n for (var i = 0; i < delegations.length; i++) {\n (function(scope) {\n var functionName = delegations[i];\n var defaultHandler = scope[functionName];\n scope[delegations[i]] = function() {\n return this.$delegator(functionName, arguments, defaultHandler);\n };\n }(this));\n }\n };\n\n this.$delegator = function(method, args, defaultHandler) {\n var state = args[0];\n if (typeof state != \"string\")\n state = state[0];\n for (var i = 0; i < this.$embeds.length; i++) {\n if (!this.$modes[this.$embeds[i]]) continue;\n\n var split = state.split(this.$embeds[i]);\n if (!split[0] && split[1]) {\n args[0] = split[1];\n var mode = this.$modes[this.$embeds[i]];\n return mode[method].apply(mode, args);\n }\n }\n var ret = defaultHandler.apply(this, args);\n return defaultHandler ? ret : undefined;\n };\n\n this.transformAction = function(state, action, editor, session, param) {\n if (this.$behaviour) {\n var behaviours = this.$behaviour.getBehaviours();\n for (var key in behaviours) {\n if (behaviours[key][action]) {\n var ret = behaviours[key][action].apply(this, arguments);\n if (ret) {\n return ret;\n }\n }\n }\n }\n };\n \n this.getKeywords = function(append) {\n if (!this.completionKeywords) {\n var rules = this.$tokenizer.rules;\n var completionKeywords = [];\n for (var rule in rules) {\n var ruleItr = rules[rule];\n for (var r = 0, l = ruleItr.length; r < l; r++) {\n if (typeof ruleItr[r].token === \"string\") {\n if (/keyword|support|storage/.test(ruleItr[r].token))\n completionKeywords.push(ruleItr[r].regex);\n }\n else if (typeof ruleItr[r].token === \"object\") {\n for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { \n if (/keyword|support|storage/.test(ruleItr[r].token[a])) {\n var rule = ruleItr[r].regex.match(/\\(.+?\\)/g)[a];\n completionKeywords.push(rule.substr(1, rule.length - 2));\n }\n }\n }\n }\n }\n this.completionKeywords = completionKeywords;\n }\n if (!append)\n return this.$keywordList;\n return completionKeywords.concat(this.$keywordList || []);\n };\n \n this.$createKeywordList = function() {\n if (!this.$highlightRules)\n this.getTokenizer();\n return this.$keywordList = this.$highlightRules.$keywordList || [];\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n var keywords = this.$keywordList || this.$createKeywordList();\n return keywords.map(function(word) {\n return {\n name: word,\n value: word,\n score: 0,\n meta: \"keyword\"\n };\n });\n };\n\n this.$id = \"ace/mode/text\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n\nace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nfunction throwDeltaError(delta, errorText){\n console.log(\"Invalid Delta:\", delta);\n throw \"Invalid Delta: \" + errorText;\n}\n\nfunction positionInDocument(docLines, position) {\n return position.row >= 0 && position.row < docLines.length &&\n position.column >= 0 && position.column <= docLines[position.row].length;\n}\n\nfunction validateDelta(docLines, delta) {\n if (delta.action != \"insert\" && delta.action != \"remove\")\n throwDeltaError(delta, \"delta.action must be 'insert' or 'remove'\");\n if (!(delta.lines instanceof Array))\n throwDeltaError(delta, \"delta.lines must be an Array\");\n if (!delta.start || !delta.end)\n throwDeltaError(delta, \"delta.start/end must be an present\");\n var start = delta.start;\n if (!positionInDocument(docLines, delta.start))\n throwDeltaError(delta, \"delta.start must be contained in document\");\n var end = delta.end;\n if (delta.action == \"remove\" && !positionInDocument(docLines, end))\n throwDeltaError(delta, \"delta.end must contained in document for 'remove' actions\");\n var numRangeRows = end.row - start.row;\n var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));\n if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)\n throwDeltaError(delta, \"delta.range must match delta lines\");\n}\n\nexports.applyDelta = function(docLines, delta, doNotValidate) {\n \n var row = delta.start.row;\n var startColumn = delta.start.column;\n var line = docLines[row] || \"\";\n switch (delta.action) {\n case \"insert\":\n var lines = delta.lines;\n if (lines.length === 1) {\n docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);\n } else {\n var args = [row, 1].concat(delta.lines);\n docLines.splice.apply(docLines, args);\n docLines[row] = line.substring(0, startColumn) + docLines[row];\n docLines[row + delta.lines.length - 1] += line.substring(startColumn);\n }\n break;\n case \"remove\":\n var endColumn = delta.end.column;\n var endRow = delta.end.row;\n if (row === endRow) {\n docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);\n } else {\n docLines.splice(\n row, endRow - row + 1,\n line.substring(0, startColumn) + docLines[endRow].substring(endColumn)\n );\n }\n break;\n }\n};\n});\n\nace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar Anchor = exports.Anchor = function(doc, row, column) {\n this.$onChange = this.onChange.bind(this);\n this.attach(doc);\n \n if (typeof column == \"undefined\")\n this.setPosition(row.row, row.column);\n else\n this.setPosition(row, column);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.getPosition = function() {\n return this.$clipPositionToDocument(this.row, this.column);\n };\n this.getDocument = function() {\n return this.document;\n };\n this.$insertRight = false;\n this.onChange = function(delta) {\n if (delta.start.row == delta.end.row && delta.start.row != this.row)\n return;\n\n if (delta.start.row > this.row)\n return;\n \n var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);\n this.setPosition(point.row, point.column, true);\n };\n \n function $pointsInOrder(point1, point2, equalPointsInOrder) {\n var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;\n return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);\n }\n \n function $getTransformedPoint(delta, point, moveIfEqual) {\n var deltaIsInsert = delta.action == \"insert\";\n var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);\n var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);\n var deltaStart = delta.start;\n var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.\n if ($pointsInOrder(point, deltaStart, moveIfEqual)) {\n return {\n row: point.row,\n column: point.column\n };\n }\n if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {\n return {\n row: point.row + deltaRowShift,\n column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)\n };\n }\n \n return {\n row: deltaStart.row,\n column: deltaStart.column\n };\n }\n this.setPosition = function(row, column, noClip) {\n var pos;\n if (noClip) {\n pos = {\n row: row,\n column: column\n };\n } else {\n pos = this.$clipPositionToDocument(row, column);\n }\n\n if (this.row == pos.row && this.column == pos.column)\n return;\n\n var old = {\n row: this.row,\n column: this.column\n };\n\n this.row = pos.row;\n this.column = pos.column;\n this._signal(\"change\", {\n old: old,\n value: pos\n });\n };\n this.detach = function() {\n this.document.removeEventListener(\"change\", this.$onChange);\n };\n this.attach = function(doc) {\n this.document = doc || this.document;\n this.document.on(\"change\", this.$onChange);\n };\n this.$clipPositionToDocument = function(row, column) {\n var pos = {};\n\n if (row >= this.document.getLength()) {\n pos.row = Math.max(0, this.document.getLength() - 1);\n pos.column = this.document.getLine(pos.row).length;\n }\n else if (row < 0) {\n pos.row = 0;\n pos.column = 0;\n }\n else {\n pos.row = row;\n pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));\n }\n\n if (column < 0)\n pos.column = 0;\n\n return pos;\n };\n\n}).call(Anchor.prototype);\n\n});\n\nace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar applyDelta = acequire(\"./apply_delta\").applyDelta;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Anchor = acequire(\"./anchor\").Anchor;\n\nvar Document = function(textOrLines) {\n this.$lines = [\"\"];\n if (textOrLines.length === 0) {\n this.$lines = [\"\"];\n } else if (Array.isArray(textOrLines)) {\n this.insertMergedLines({row: 0, column: 0}, textOrLines);\n } else {\n this.insert({row: 0, column:0}, textOrLines);\n }\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setValue = function(text) {\n var len = this.getLength() - 1;\n this.remove(new Range(0, 0, len, this.getLine(len).length));\n this.insert({row: 0, column: 0}, text);\n };\n this.getValue = function() {\n return this.getAllLines().join(this.getNewLineCharacter());\n };\n this.createAnchor = function(row, column) {\n return new Anchor(this, row, column);\n };\n if (\"aaa\".split(/a/).length === 0) {\n this.$split = function(text) {\n return text.replace(/\\r\\n|\\r/g, \"\\n\").split(\"\\n\");\n };\n } else {\n this.$split = function(text) {\n return text.split(/\\r\\n|\\r|\\n/);\n };\n }\n\n\n this.$detectNewLine = function(text) {\n var match = text.match(/^.*?(\\r\\n|\\r|\\n)/m);\n this.$autoNewLine = match ? match[1] : \"\\n\";\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineCharacter = function() {\n switch (this.$newLineMode) {\n case \"windows\":\n return \"\\r\\n\";\n case \"unix\":\n return \"\\n\";\n default:\n return this.$autoNewLine || \"\\n\";\n }\n };\n\n this.$autoNewLine = \"\";\n this.$newLineMode = \"auto\";\n this.setNewLineMode = function(newLineMode) {\n if (this.$newLineMode === newLineMode)\n return;\n\n this.$newLineMode = newLineMode;\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineMode = function() {\n return this.$newLineMode;\n };\n this.isNewLine = function(text) {\n return (text == \"\\r\\n\" || text == \"\\r\" || text == \"\\n\");\n };\n this.getLine = function(row) {\n return this.$lines[row] || \"\";\n };\n this.getLines = function(firstRow, lastRow) {\n return this.$lines.slice(firstRow, lastRow + 1);\n };\n this.getAllLines = function() {\n return this.getLines(0, this.getLength());\n };\n this.getLength = function() {\n return this.$lines.length;\n };\n this.getTextRange = function(range) {\n return this.getLinesForRange(range).join(this.getNewLineCharacter());\n };\n this.getLinesForRange = function(range) {\n var lines;\n if (range.start.row === range.end.row) {\n lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];\n } else {\n lines = this.getLines(range.start.row, range.end.row);\n lines[0] = (lines[0] || \"\").substring(range.start.column);\n var l = lines.length - 1;\n if (range.end.row - range.start.row == l)\n lines[l] = lines[l].substring(0, range.end.column);\n }\n return lines;\n };\n this.insertLines = function(row, lines) {\n console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\");\n return this.insertFullLines(row, lines);\n };\n this.removeLines = function(firstRow, lastRow) {\n console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\");\n return this.removeFullLines(firstRow, lastRow);\n };\n this.insertNewLine = function(position) {\n console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\");\n return this.insertMergedLines(position, [\"\", \"\"]);\n };\n this.insert = function(position, text) {\n if (this.getLength() <= 1)\n this.$detectNewLine(text);\n \n return this.insertMergedLines(position, this.$split(text));\n };\n this.insertInLine = function(position, text) {\n var start = this.clippedPos(position.row, position.column);\n var end = this.pos(position.row, position.column + text.length);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: [text]\n }, true);\n \n return this.clonePos(end);\n };\n \n this.clippedPos = function(row, column) {\n var length = this.getLength();\n if (row === undefined) {\n row = length;\n } else if (row < 0) {\n row = 0;\n } else if (row >= length) {\n row = length - 1;\n column = undefined;\n }\n var line = this.getLine(row);\n if (column == undefined)\n column = line.length;\n column = Math.min(Math.max(column, 0), line.length);\n return {row: row, column: column};\n };\n \n this.clonePos = function(pos) {\n return {row: pos.row, column: pos.column};\n };\n \n this.pos = function(row, column) {\n return {row: row, column: column};\n };\n \n this.$clipPosition = function(position) {\n var length = this.getLength();\n if (position.row >= length) {\n position.row = Math.max(0, length - 1);\n position.column = this.getLine(length - 1).length;\n } else {\n position.row = Math.max(0, position.row);\n position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);\n }\n return position;\n };\n this.insertFullLines = function(row, lines) {\n row = Math.min(Math.max(row, 0), this.getLength());\n var column = 0;\n if (row < this.getLength()) {\n lines = lines.concat([\"\"]);\n column = 0;\n } else {\n lines = [\"\"].concat(lines);\n row--;\n column = this.$lines[row].length;\n }\n this.insertMergedLines({row: row, column: column}, lines);\n }; \n this.insertMergedLines = function(position, lines) {\n var start = this.clippedPos(position.row, position.column);\n var end = {\n row: start.row + lines.length - 1,\n column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length\n };\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: lines\n });\n \n return this.clonePos(end);\n };\n this.remove = function(range) {\n var start = this.clippedPos(range.start.row, range.start.column);\n var end = this.clippedPos(range.end.row, range.end.column);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n });\n return this.clonePos(start);\n };\n this.removeInLine = function(row, startColumn, endColumn) {\n var start = this.clippedPos(row, startColumn);\n var end = this.clippedPos(row, endColumn);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n }, true);\n \n return this.clonePos(start);\n };\n this.removeFullLines = function(firstRow, lastRow) {\n firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);\n lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);\n var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;\n var deleteLastNewLine = lastRow < this.getLength() - 1;\n var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );\n var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );\n var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );\n var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); \n var range = new Range(startRow, startCol, endRow, endCol);\n var deletedLines = this.$lines.slice(firstRow, lastRow + 1);\n \n this.applyDelta({\n start: range.start,\n end: range.end,\n action: \"remove\",\n lines: this.getLinesForRange(range)\n });\n return deletedLines;\n };\n this.removeNewLine = function(row) {\n if (row < this.getLength() - 1 && row >= 0) {\n this.applyDelta({\n start: this.pos(row, this.getLine(row).length),\n end: this.pos(row + 1, 0),\n action: \"remove\",\n lines: [\"\", \"\"]\n });\n }\n };\n this.replace = function(range, text) {\n if (!(range instanceof Range))\n range = Range.fromPoints(range.start, range.end);\n if (text.length === 0 && range.isEmpty())\n return range.start;\n if (text == this.getTextRange(range))\n return range.end;\n\n this.remove(range);\n var end;\n if (text) {\n end = this.insert(range.start, text);\n }\n else {\n end = range.start;\n }\n \n return end;\n };\n this.applyDeltas = function(deltas) {\n for (var i=0; i=0; i--) {\n this.revertDelta(deltas[i]);\n }\n };\n this.applyDelta = function(delta, doNotValidate) {\n var isInsert = delta.action == \"insert\";\n if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]\n : !Range.comparePoints(delta.start, delta.end)) {\n return;\n }\n \n if (isInsert && delta.lines.length > 20000)\n this.$splitAndapplyLargeDelta(delta, 20000);\n applyDelta(this.$lines, delta, doNotValidate);\n this._signal(\"change\", delta);\n };\n \n this.$splitAndapplyLargeDelta = function(delta, MAX) {\n var lines = delta.lines;\n var l = lines.length;\n var row = delta.start.row; \n var column = delta.start.column;\n var from = 0, to = 0;\n do {\n from = to;\n to += MAX - 1;\n var chunk = lines.slice(from, to);\n if (to > l) {\n delta.lines = chunk;\n delta.start.row = row + from;\n delta.start.column = column;\n break;\n }\n chunk.push(\"\");\n this.applyDelta({\n start: this.pos(row + from, column),\n end: this.pos(row + to, column = 0),\n action: delta.action,\n lines: chunk\n }, true);\n } while(true);\n };\n this.revertDelta = function(delta) {\n this.applyDelta({\n start: this.clonePos(delta.start),\n end: this.clonePos(delta.end),\n action: (delta.action == \"insert\" ? \"remove\" : \"insert\"),\n lines: delta.lines.slice()\n });\n };\n this.indexToPosition = function(index, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n for (var i = startRow || 0, l = lines.length; i < l; i++) {\n index -= lines[i].length + newlineLength;\n if (index < 0)\n return {row: i, column: index + lines[i].length + newlineLength};\n }\n return {row: l-1, column: lines[l-1].length};\n };\n this.positionToIndex = function(pos, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n var index = 0;\n var row = Math.min(pos.row, lines.length);\n for (var i = startRow || 0; i < row; ++i)\n index += lines[i].length + newlineLength;\n\n return index + pos.column;\n };\n\n}).call(Document.prototype);\n\nexports.Document = Document;\n});\n\nace.define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar BackgroundTokenizer = function(tokenizer, editor) {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.tokenizer = tokenizer;\n\n var self = this;\n\n this.$worker = function() {\n if (!self.running) { return; }\n\n var workerStart = new Date();\n var currentLine = self.currentLine;\n var endLine = -1;\n var doc = self.doc;\n\n var startLine = currentLine;\n while (self.lines[currentLine])\n currentLine++;\n \n var len = doc.getLength();\n var processedLines = 0;\n self.running = false;\n while (currentLine < len) {\n self.$tokenizeRow(currentLine);\n endLine = currentLine;\n do {\n currentLine++;\n } while (self.lines[currentLine]);\n processedLines ++;\n if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { \n self.running = setTimeout(self.$worker, 20);\n break;\n }\n }\n self.currentLine = currentLine;\n \n if (endLine == -1)\n endLine = currentLine;\n\n if (startLine <= endLine)\n self.fireUpdateEvent(startLine, endLine);\n };\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n this.setTokenizer = function(tokenizer) {\n this.tokenizer = tokenizer;\n this.lines = [];\n this.states = [];\n\n this.start(0);\n };\n this.setDocument = function(doc) {\n this.doc = doc;\n this.lines = [];\n this.states = [];\n\n this.stop();\n };\n this.fireUpdateEvent = function(firstRow, lastRow) {\n var data = {\n first: firstRow,\n last: lastRow\n };\n this._signal(\"update\", {data: data});\n };\n this.start = function(startRow) {\n this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());\n this.lines.splice(this.currentLine, this.lines.length);\n this.states.splice(this.currentLine, this.states.length);\n\n this.stop();\n this.running = setTimeout(this.$worker, 700);\n };\n \n this.scheduleStart = function() {\n if (!this.running)\n this.running = setTimeout(this.$worker, 700);\n };\n\n this.$updateOnChange = function(delta) {\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n this.lines[startRow] = null;\n } else if (delta.action == \"remove\") {\n this.lines.splice(startRow, len + 1, null);\n this.states.splice(startRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(startRow, 1);\n this.lines.splice.apply(this.lines, args);\n this.states.splice.apply(this.states, args);\n }\n\n this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());\n\n this.stop();\n };\n this.stop = function() {\n if (this.running)\n clearTimeout(this.running);\n this.running = false;\n };\n this.getTokens = function(row) {\n return this.lines[row] || this.$tokenizeRow(row);\n };\n this.getState = function(row) {\n if (this.currentLine == row)\n this.$tokenizeRow(row);\n return this.states[row] || \"start\";\n };\n\n this.$tokenizeRow = function(row) {\n var line = this.doc.getLine(row);\n var state = this.states[row - 1];\n\n var data = this.tokenizer.getLineTokens(line, state, row);\n\n if (this.states[row] + \"\" !== data.state + \"\") {\n this.states[row] = data.state;\n this.lines[row + 1] = null;\n if (this.currentLine > row + 1)\n this.currentLine = row + 1;\n } else if (this.currentLine == row) {\n this.currentLine = row + 1;\n }\n\n return this.lines[row] = data.tokens;\n };\n\n}).call(BackgroundTokenizer.prototype);\n\nexports.BackgroundTokenizer = BackgroundTokenizer;\n});\n\nace.define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar SearchHighlight = function(regExp, clazz, type) {\n this.setRegexp(regExp);\n this.clazz = clazz;\n this.type = type || \"text\";\n};\n\n(function() {\n this.MAX_RANGES = 500;\n \n this.setRegexp = function(regExp) {\n if (this.regExp+\"\" == regExp+\"\")\n return;\n this.regExp = regExp;\n this.cache = [];\n };\n\n this.update = function(html, markerLayer, session, config) {\n if (!this.regExp)\n return;\n var start = config.firstRow, end = config.lastRow;\n\n for (var i = start; i <= end; i++) {\n var ranges = this.cache[i];\n if (ranges == null) {\n ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);\n if (ranges.length > this.MAX_RANGES)\n ranges = ranges.slice(0, this.MAX_RANGES);\n ranges = ranges.map(function(match) {\n return new Range(i, match.offset, i, match.offset + match.length);\n });\n this.cache[i] = ranges.length ? ranges : \"\";\n }\n\n for (var j = ranges.length; j --; ) {\n markerLayer.drawSingleLineMarker(\n html, ranges[j].toScreenRange(session), this.clazz, config);\n }\n }\n };\n\n}).call(SearchHighlight.prototype);\n\nexports.SearchHighlight = SearchHighlight;\n});\n\nace.define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nfunction FoldLine(foldData, folds) {\n this.foldData = foldData;\n if (Array.isArray(folds)) {\n this.folds = folds;\n } else {\n folds = this.folds = [ folds ];\n }\n\n var last = folds[folds.length - 1];\n this.range = new Range(folds[0].start.row, folds[0].start.column,\n last.end.row, last.end.column);\n this.start = this.range.start;\n this.end = this.range.end;\n\n this.folds.forEach(function(fold) {\n fold.setFoldLine(this);\n }, this);\n}\n\n(function() {\n this.shiftRow = function(shift) {\n this.start.row += shift;\n this.end.row += shift;\n this.folds.forEach(function(fold) {\n fold.start.row += shift;\n fold.end.row += shift;\n });\n };\n\n this.addFold = function(fold) {\n if (fold.sameRow) {\n if (fold.start.row < this.startRow || fold.endRow > this.endRow) {\n throw new Error(\"Can't add a fold to this FoldLine as it has no connection\");\n }\n this.folds.push(fold);\n this.folds.sort(function(a, b) {\n return -a.range.compareEnd(b.start.row, b.start.column);\n });\n if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n } else if (fold.start.row == this.end.row) {\n this.folds.push(fold);\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (fold.end.row == this.start.row) {\n this.folds.unshift(fold);\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n } else {\n throw new Error(\"Trying to add fold to FoldRow that doesn't have a matching row\");\n }\n fold.foldLine = this;\n };\n\n this.containsRow = function(row) {\n return row >= this.start.row && row <= this.end.row;\n };\n\n this.walk = function(callback, endRow, endColumn) {\n var lastEnd = 0,\n folds = this.folds,\n fold,\n cmp, stop, isNewRow = true;\n\n if (endRow == null) {\n endRow = this.end.row;\n endColumn = this.end.column;\n }\n\n for (var i = 0; i < folds.length; i++) {\n fold = folds[i];\n\n cmp = fold.range.compareStart(endRow, endColumn);\n if (cmp == -1) {\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n return;\n }\n\n stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);\n stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);\n if (stop || cmp === 0) {\n return;\n }\n isNewRow = !fold.sameRow;\n lastEnd = fold.end.column;\n }\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n };\n\n this.getNextFoldTo = function(row, column) {\n var fold, cmp;\n for (var i = 0; i < this.folds.length; i++) {\n fold = this.folds[i];\n cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n return {\n fold: fold,\n kind: \"after\"\n };\n } else if (cmp === 0) {\n return {\n fold: fold,\n kind: \"inside\"\n };\n }\n }\n return null;\n };\n\n this.addRemoveChars = function(row, column, len) {\n var ret = this.getNextFoldTo(row, column),\n fold, folds;\n if (ret) {\n fold = ret.fold;\n if (ret.kind == \"inside\"\n && fold.start.column != column\n && fold.start.row != row)\n {\n window.console && window.console.log(row, column, fold);\n } else if (fold.start.row == row) {\n folds = this.folds;\n var i = folds.indexOf(fold);\n if (i === 0) {\n this.start.column += len;\n }\n for (i; i < folds.length; i++) {\n fold = folds[i];\n fold.start.column += len;\n if (!fold.sameRow) {\n return;\n }\n fold.end.column += len;\n }\n this.end.column += len;\n }\n }\n };\n\n this.split = function(row, column) {\n var pos = this.getNextFoldTo(row, column);\n \n if (!pos || pos.kind == \"inside\")\n return null;\n \n var fold = pos.fold;\n var folds = this.folds;\n var foldData = this.foldData;\n \n var i = folds.indexOf(fold);\n var foldBefore = folds[i - 1];\n this.end.row = foldBefore.end.row;\n this.end.column = foldBefore.end.column;\n folds = folds.splice(i, folds.length - i);\n\n var newFoldLine = new FoldLine(foldData, folds);\n foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);\n return newFoldLine;\n };\n\n this.merge = function(foldLineNext) {\n var folds = foldLineNext.folds;\n for (var i = 0; i < folds.length; i++) {\n this.addFold(folds[i]);\n }\n var foldData = this.foldData;\n foldData.splice(foldData.indexOf(foldLineNext), 1);\n };\n\n this.toString = function() {\n var ret = [this.range.toString() + \": [\" ];\n\n this.folds.forEach(function(fold) {\n ret.push(\" \" + fold.toString());\n });\n ret.push(\"]\");\n return ret.join(\"\\n\");\n };\n\n this.idxToPosition = function(idx) {\n var lastFoldEndColumn = 0;\n\n for (var i = 0; i < this.folds.length; i++) {\n var fold = this.folds[i];\n\n idx -= fold.start.column - lastFoldEndColumn;\n if (idx < 0) {\n return {\n row: fold.start.row,\n column: fold.start.column + idx\n };\n }\n\n idx -= fold.placeholder.length;\n if (idx < 0) {\n return fold.start;\n }\n\n lastFoldEndColumn = fold.end.column;\n }\n\n return {\n row: this.end.row,\n column: this.end.column + idx\n };\n };\n}).call(FoldLine.prototype);\n\nexports.FoldLine = FoldLine;\n});\n\nace.define(\"ace/range_list\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar Range = acequire(\"./range\").Range;\nvar comparePoints = Range.comparePoints;\n\nvar RangeList = function() {\n this.ranges = [];\n};\n\n(function() {\n this.comparePoints = comparePoints;\n\n this.pointIndex = function(pos, excludeEdges, startIndex) {\n var list = this.ranges;\n\n for (var i = startIndex || 0; i < list.length; i++) {\n var range = list[i];\n var cmpEnd = comparePoints(pos, range.end);\n if (cmpEnd > 0)\n continue;\n var cmpStart = comparePoints(pos, range.start);\n if (cmpEnd === 0)\n return excludeEdges && cmpStart !== 0 ? -i-2 : i;\n if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))\n return i;\n\n return -i-1;\n }\n return -i - 1;\n };\n\n this.add = function(range) {\n var excludeEdges = !range.isEmpty();\n var startIndex = this.pointIndex(range.start, excludeEdges);\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n\n var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);\n\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n else\n endIndex++;\n return this.ranges.splice(startIndex, endIndex - startIndex, range);\n };\n\n this.addList = function(list) {\n var removed = [];\n for (var i = list.length; i--; ) {\n removed.push.apply(removed, this.add(list[i]));\n }\n return removed;\n };\n\n this.substractPoint = function(pos) {\n var i = this.pointIndex(pos);\n\n if (i >= 0)\n return this.ranges.splice(i, 1);\n };\n this.merge = function() {\n var removed = [];\n var list = this.ranges;\n \n list = list.sort(function(a, b) {\n return comparePoints(a.start, b.start);\n });\n \n var next = list[0], range;\n for (var i = 1; i < list.length; i++) {\n range = next;\n next = list[i];\n var cmp = comparePoints(range.end, next.start);\n if (cmp < 0)\n continue;\n\n if (cmp == 0 && !range.isEmpty() && !next.isEmpty())\n continue;\n\n if (comparePoints(range.end, next.end) < 0) {\n range.end.row = next.end.row;\n range.end.column = next.end.column;\n }\n\n list.splice(i, 1);\n removed.push(next);\n next = range;\n i--;\n }\n \n this.ranges = list;\n\n return removed;\n };\n\n this.contains = function(row, column) {\n return this.pointIndex({row: row, column: column}) >= 0;\n };\n\n this.containsPoint = function(pos) {\n return this.pointIndex(pos) >= 0;\n };\n\n this.rangeAtPoint = function(pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges[i];\n };\n\n\n this.clipRows = function(startRow, endRow) {\n var list = this.ranges;\n if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)\n return [];\n\n var startIndex = this.pointIndex({row: startRow, column: 0});\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n\n var clipped = [];\n for (var i = startIndex; i < endIndex; i++) {\n clipped.push(list[i]);\n }\n return clipped;\n };\n\n this.removeAll = function() {\n return this.ranges.splice(0, this.ranges.length);\n };\n\n this.attach = function(session) {\n if (this.session)\n this.detach();\n\n this.session = session;\n this.onChange = this.$onChange.bind(this);\n\n this.session.on('change', this.onChange);\n };\n\n this.detach = function() {\n if (!this.session)\n return;\n this.session.removeListener('change', this.onChange);\n this.session = null;\n };\n\n this.$onChange = function(delta) {\n if (delta.action == \"insert\"){\n var start = delta.start;\n var end = delta.end;\n } else {\n var end = delta.start;\n var start = delta.end;\n }\n var startRow = start.row;\n var endRow = end.row;\n var lineDif = endRow - startRow;\n\n var colDiff = -start.column + end.column;\n var ranges = this.ranges;\n\n for (var i = 0, n = ranges.length; i < n; i++) {\n var r = ranges[i];\n if (r.end.row < startRow)\n continue;\n if (r.start.row > startRow)\n break;\n\n if (r.start.row == startRow && r.start.column >= start.column ) {\n if (r.start.column == start.column && this.$insertRight) {\n } else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n if (r.end.row == startRow && r.end.column >= start.column) {\n if (r.end.column == start.column && this.$insertRight) {\n continue;\n }\n if (r.end.column == start.column && colDiff > 0 && i < n - 1) { \n if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)\n r.end.column -= colDiff;\n }\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n\n if (lineDif != 0 && i < n) {\n for (; i < n; i++) {\n var r = ranges[i];\n r.start.row += lineDif;\n r.end.row += lineDif;\n }\n }\n };\n\n}).call(RangeList.prototype);\n\nexports.RangeList = RangeList;\n});\n\nace.define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/range_list\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar RangeList = acequire(\"../range_list\").RangeList;\nvar oop = acequire(\"../lib/oop\");\nvar Fold = exports.Fold = function(range, placeholder) {\n this.foldLine = null;\n this.placeholder = placeholder;\n this.range = range;\n this.start = range.start;\n this.end = range.end;\n\n this.sameRow = range.start.row == range.end.row;\n this.subFolds = this.ranges = [];\n};\n\noop.inherits(Fold, RangeList);\n\n(function() {\n\n this.toString = function() {\n return '\"' + this.placeholder + '\" ' + this.range.toString();\n };\n\n this.setFoldLine = function(foldLine) {\n this.foldLine = foldLine;\n this.subFolds.forEach(function(fold) {\n fold.setFoldLine(foldLine);\n });\n };\n\n this.clone = function() {\n var range = this.range.clone();\n var fold = new Fold(range, this.placeholder);\n this.subFolds.forEach(function(subFold) {\n fold.subFolds.push(subFold.clone());\n });\n fold.collapseChildren = this.collapseChildren;\n return fold;\n };\n\n this.addSubFold = function(fold) {\n if (this.range.isEqual(fold))\n return;\n\n if (!this.range.containsRange(fold))\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n consumeRange(fold, this.start);\n\n var row = fold.start.row, column = fold.start.column;\n for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {\n cmp = this.subFolds[i].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterStart = this.subFolds[i];\n\n if (cmp == 0)\n return afterStart.addSubFold(fold);\n var row = fold.range.end.row, column = fold.range.end.column;\n for (var j = i, cmp = -1; j < this.subFolds.length; j++) {\n cmp = this.subFolds[j].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterEnd = this.subFolds[j];\n\n if (cmp == 0)\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n\n var consumedFolds = this.subFolds.splice(i, j - i, fold);\n fold.setFoldLine(this.foldLine);\n\n return fold;\n };\n \n this.restoreRange = function(range) {\n return restoreRange(range, this.start);\n };\n\n}).call(Fold.prototype);\n\nfunction consumePoint(point, anchor) {\n point.row -= anchor.row;\n if (point.row == 0)\n point.column -= anchor.column;\n}\nfunction consumeRange(range, anchor) {\n consumePoint(range.start, anchor);\n consumePoint(range.end, anchor);\n}\nfunction restorePoint(point, anchor) {\n if (point.row == 0)\n point.column += anchor.column;\n point.row += anchor.row;\n}\nfunction restoreRange(range, anchor) {\n restorePoint(range.start, anchor);\n restorePoint(range.end, anchor);\n}\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar FoldLine = acequire(\"./fold_line\").FoldLine;\nvar Fold = acequire(\"./fold\").Fold;\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\n\nfunction Folding() {\n this.getFoldAt = function(row, column, side) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var folds = foldLine.folds;\n for (var i = 0; i < folds.length; i++) {\n var fold = folds[i];\n if (fold.range.contains(row, column)) {\n if (side == 1 && fold.range.isEnd(row, column)) {\n continue;\n } else if (side == -1 && fold.range.isStart(row, column)) {\n continue;\n }\n return fold;\n }\n }\n };\n this.getFoldsInRange = function(range) {\n var start = range.start;\n var end = range.end;\n var foldLines = this.$foldData;\n var foundFolds = [];\n\n start.column += 1;\n end.column -= 1;\n\n for (var i = 0; i < foldLines.length; i++) {\n var cmp = foldLines[i].range.compareRange(range);\n if (cmp == 2) {\n continue;\n }\n else if (cmp == -2) {\n break;\n }\n\n var folds = foldLines[i].folds;\n for (var j = 0; j < folds.length; j++) {\n var fold = folds[j];\n cmp = fold.range.compareRange(range);\n if (cmp == -2) {\n break;\n } else if (cmp == 2) {\n continue;\n } else\n if (cmp == 42) {\n break;\n }\n foundFolds.push(fold);\n }\n }\n start.column -= 1;\n end.column += 1;\n\n return foundFolds;\n };\n\n this.getFoldsInRangeList = function(ranges) {\n if (Array.isArray(ranges)) {\n var folds = [];\n ranges.forEach(function(range) {\n folds = folds.concat(this.getFoldsInRange(range));\n }, this);\n } else {\n var folds = this.getFoldsInRange(ranges);\n }\n return folds;\n };\n this.getAllFolds = function() {\n var folds = [];\n var foldLines = this.$foldData;\n \n for (var i = 0; i < foldLines.length; i++)\n for (var j = 0; j < foldLines[i].folds.length; j++)\n folds.push(foldLines[i].folds[j]);\n\n return folds;\n };\n this.getFoldStringAt = function(row, column, trim, foldLine) {\n foldLine = foldLine || this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var lastFold = {\n end: { column: 0 }\n };\n var str, fold;\n for (var i = 0; i < foldLine.folds.length; i++) {\n fold = foldLine.folds[i];\n var cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n str = this\n .getLine(fold.start.row)\n .substring(lastFold.end.column, fold.start.column);\n break;\n }\n else if (cmp === 0) {\n return null;\n }\n lastFold = fold;\n }\n if (!str)\n str = this.getLine(fold.start.row).substring(lastFold.end.column);\n\n if (trim == -1)\n return str.substring(0, column - lastFold.end.column);\n else if (trim == 1)\n return str.substring(column - lastFold.end.column);\n else\n return str;\n };\n\n this.getFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {\n return foldLine;\n } else if (foldLine.end.row > docRow) {\n return null;\n }\n }\n return null;\n };\n this.getNextFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.end.row >= docRow) {\n return foldLine;\n }\n }\n return null;\n };\n\n this.getFoldedRowCount = function(first, last) {\n var foldData = this.$foldData, rowCount = last-first+1;\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i],\n end = foldLine.end.row,\n start = foldLine.start.row;\n if (end >= last) {\n if (start < last) {\n if (start >= first)\n rowCount -= last-start;\n else\n rowCount = 0; // in one fold\n }\n break;\n } else if (end >= first){\n if (start >= first) // fold inside range\n rowCount -= end-start;\n else\n rowCount -= end-first+1;\n }\n }\n return rowCount;\n };\n\n this.$addFoldLine = function(foldLine) {\n this.$foldData.push(foldLine);\n this.$foldData.sort(function(a, b) {\n return a.start.row - b.start.row;\n });\n return foldLine;\n };\n this.addFold = function(placeholder, range) {\n var foldData = this.$foldData;\n var added = false;\n var fold;\n \n if (placeholder instanceof Fold)\n fold = placeholder;\n else {\n fold = new Fold(range, placeholder);\n fold.collapseChildren = range.collapseChildren;\n }\n this.$clipRangeToDocument(fold.range);\n\n var startRow = fold.start.row;\n var startColumn = fold.start.column;\n var endRow = fold.end.row;\n var endColumn = fold.end.column;\n if (!(startRow < endRow || \n startRow == endRow && startColumn <= endColumn - 2))\n throw new Error(\"The range has to be at least 2 characters width\");\n\n var startFold = this.getFoldAt(startRow, startColumn, 1);\n var endFold = this.getFoldAt(endRow, endColumn, -1);\n if (startFold && endFold == startFold)\n return startFold.addSubFold(fold);\n\n if (startFold && !startFold.range.isStart(startRow, startColumn))\n this.removeFold(startFold);\n \n if (endFold && !endFold.range.isEnd(endRow, endColumn))\n this.removeFold(endFold);\n var folds = this.getFoldsInRange(fold.range);\n if (folds.length > 0) {\n this.removeFolds(folds);\n folds.forEach(function(subFold) {\n fold.addSubFold(subFold);\n });\n }\n\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (endRow == foldLine.start.row) {\n foldLine.addFold(fold);\n added = true;\n break;\n } else if (startRow == foldLine.end.row) {\n foldLine.addFold(fold);\n added = true;\n if (!fold.sameRow) {\n var foldLineNext = foldData[i + 1];\n if (foldLineNext && foldLineNext.start.row == endRow) {\n foldLine.merge(foldLineNext);\n break;\n }\n }\n break;\n } else if (endRow <= foldLine.start.row) {\n break;\n }\n }\n\n if (!added)\n foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));\n\n if (this.$useWrapMode)\n this.$updateWrapData(foldLine.start.row, foldLine.start.row);\n else\n this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"add\" });\n\n return fold;\n };\n\n this.addFolds = function(folds) {\n folds.forEach(function(fold) {\n this.addFold(fold);\n }, this);\n };\n\n this.removeFold = function(fold) {\n var foldLine = fold.foldLine;\n var startRow = foldLine.start.row;\n var endRow = foldLine.end.row;\n\n var foldLines = this.$foldData;\n var folds = foldLine.folds;\n if (folds.length == 1) {\n foldLines.splice(foldLines.indexOf(foldLine), 1);\n } else\n if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {\n folds.pop();\n foldLine.end.row = folds[folds.length - 1].end.row;\n foldLine.end.column = folds[folds.length - 1].end.column;\n } else\n if (foldLine.range.isStart(fold.start.row, fold.start.column)) {\n folds.shift();\n foldLine.start.row = folds[0].start.row;\n foldLine.start.column = folds[0].start.column;\n } else\n if (fold.sameRow) {\n folds.splice(folds.indexOf(fold), 1);\n } else\n {\n var newFoldLine = foldLine.split(fold.start.row, fold.start.column);\n folds = newFoldLine.folds;\n folds.shift();\n newFoldLine.start.row = folds[0].start.row;\n newFoldLine.start.column = folds[0].start.column;\n }\n\n if (!this.$updating) {\n if (this.$useWrapMode)\n this.$updateWrapData(startRow, endRow);\n else\n this.$updateRowLengthCache(startRow, endRow);\n }\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"remove\" });\n };\n\n this.removeFolds = function(folds) {\n var cloneFolds = [];\n for (var i = 0; i < folds.length; i++) {\n cloneFolds.push(folds[i]);\n }\n\n cloneFolds.forEach(function(fold) {\n this.removeFold(fold);\n }, this);\n this.$modified = true;\n };\n\n this.expandFold = function(fold) {\n this.removeFold(fold);\n fold.subFolds.forEach(function(subFold) {\n fold.restoreRange(subFold);\n this.addFold(subFold);\n }, this);\n if (fold.collapseChildren > 0) {\n this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1);\n }\n fold.subFolds = [];\n };\n\n this.expandFolds = function(folds) {\n folds.forEach(function(fold) {\n this.expandFold(fold);\n }, this);\n };\n\n this.unfold = function(location, expandInner) {\n var range, folds;\n if (location == null) {\n range = new Range(0, 0, this.getLength(), 0);\n expandInner = true;\n } else if (typeof location == \"number\")\n range = new Range(location, 0, location, this.getLine(location).length);\n else if (\"row\" in location)\n range = Range.fromPoints(location, location);\n else\n range = location;\n \n folds = this.getFoldsInRangeList(range);\n if (expandInner) {\n this.removeFolds(folds);\n } else {\n var subFolds = folds;\n while (subFolds.length) {\n this.expandFolds(subFolds);\n subFolds = this.getFoldsInRangeList(range);\n }\n }\n if (folds.length)\n return folds;\n };\n this.isRowFolded = function(docRow, startFoldRow) {\n return !!this.getFoldLine(docRow, startFoldRow);\n };\n\n this.getRowFoldEnd = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.end.row : docRow;\n };\n\n this.getRowFoldStart = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.start.row : docRow;\n };\n\n this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {\n if (startRow == null)\n startRow = foldLine.start.row;\n if (startColumn == null)\n startColumn = 0;\n if (endRow == null)\n endRow = foldLine.end.row;\n if (endColumn == null)\n endColumn = this.getLine(endRow).length;\n var doc = this.doc;\n var textLine = \"\";\n\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n if (row < startRow)\n return;\n if (row == startRow) {\n if (column < startColumn)\n return;\n lastColumn = Math.max(startColumn, lastColumn);\n }\n\n if (placeholder != null) {\n textLine += placeholder;\n } else {\n textLine += doc.getLine(row).substring(lastColumn, column);\n }\n }, endRow, endColumn);\n return textLine;\n };\n\n this.getDisplayLine = function(row, endColumn, startRow, startColumn) {\n var foldLine = this.getFoldLine(row);\n\n if (!foldLine) {\n var line;\n line = this.doc.getLine(row);\n return line.substring(startColumn || 0, endColumn || line.length);\n } else {\n return this.getFoldDisplayLine(\n foldLine, row, endColumn, startRow, startColumn);\n }\n };\n\n this.$cloneFoldData = function() {\n var fd = [];\n fd = this.$foldData.map(function(foldLine) {\n var folds = foldLine.folds.map(function(fold) {\n return fold.clone();\n });\n return new FoldLine(fd, folds);\n });\n\n return fd;\n };\n\n this.toggleFold = function(tryToUnfold) {\n var selection = this.selection;\n var range = selection.getRange();\n var fold;\n var bracketPos;\n\n if (range.isEmpty()) {\n var cursor = range.start;\n fold = this.getFoldAt(cursor.row, cursor.column);\n\n if (fold) {\n this.expandFold(fold);\n return;\n } else if (bracketPos = this.findMatchingBracket(cursor)) {\n if (range.comparePoint(bracketPos) == 1) {\n range.end = bracketPos;\n } else {\n range.start = bracketPos;\n range.start.column++;\n range.end.column--;\n }\n } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {\n if (range.comparePoint(bracketPos) == 1)\n range.end = bracketPos;\n else\n range.start = bracketPos;\n\n range.start.column++;\n } else {\n range = this.getCommentFoldRange(cursor.row, cursor.column) || range;\n }\n } else {\n var folds = this.getFoldsInRange(range);\n if (tryToUnfold && folds.length) {\n this.expandFolds(folds);\n return;\n } else if (folds.length == 1 ) {\n fold = folds[0];\n }\n }\n\n if (!fold)\n fold = this.getFoldAt(range.start.row, range.start.column);\n\n if (fold && fold.range.toString() == range.toString()) {\n this.expandFold(fold);\n return;\n }\n\n var placeholder = \"...\";\n if (!range.isMultiLine()) {\n placeholder = this.getTextRange(range);\n if (placeholder.length < 4)\n return;\n placeholder = placeholder.trim().substring(0, 2) + \"..\";\n }\n\n this.addFold(placeholder, range);\n };\n\n this.getCommentFoldRange = function(row, column, dir) {\n var iterator = new TokenIterator(this, row, column);\n var token = iterator.getCurrentToken();\n var type = token.type;\n if (token && /^comment|string/.test(type)) {\n type = type.match(/comment|string/)[0];\n if (type == \"comment\")\n type += \"|doc-start\";\n var re = new RegExp(type);\n var range = new Range();\n if (dir != 1) {\n do {\n token = iterator.stepBackward();\n } while (token && re.test(token.type));\n iterator.stepForward();\n }\n \n range.start.row = iterator.getCurrentTokenRow();\n range.start.column = iterator.getCurrentTokenColumn() + 2;\n\n iterator = new TokenIterator(this, row, column);\n \n if (dir != -1) {\n var lastRow = -1;\n do {\n token = iterator.stepForward();\n if (lastRow == -1) {\n var state = this.getState(iterator.$row);\n if (!re.test(state))\n lastRow = iterator.$row;\n } else if (iterator.$row > lastRow) {\n break;\n }\n } while (token && re.test(token.type));\n token = iterator.stepBackward();\n } else\n token = iterator.getCurrentToken();\n\n range.end.row = iterator.getCurrentTokenRow();\n range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;\n return range;\n }\n };\n\n this.foldAll = function(startRow, endRow, depth) {\n if (depth == undefined)\n depth = 100000; // JSON.stringify doesn't hanle Infinity\n var foldWidgets = this.foldWidgets;\n if (!foldWidgets)\n return; // mode doesn't support folding\n endRow = endRow || this.getLength();\n startRow = startRow || 0;\n for (var row = startRow; row < endRow; row++) {\n if (foldWidgets[row] == null)\n foldWidgets[row] = this.getFoldWidget(row);\n if (foldWidgets[row] != \"start\")\n continue;\n\n var range = this.getFoldWidgetRange(row);\n if (range && range.isMultiLine()\n && range.end.row <= endRow\n && range.start.row >= startRow\n ) {\n row = range.end.row;\n try {\n var fold = this.addFold(\"...\", range);\n if (fold)\n fold.collapseChildren = depth;\n } catch(e) {}\n }\n }\n };\n this.$foldStyles = {\n \"manual\": 1,\n \"markbegin\": 1,\n \"markbeginend\": 1\n };\n this.$foldStyle = \"markbegin\";\n this.setFoldStyle = function(style) {\n if (!this.$foldStyles[style])\n throw new Error(\"invalid fold style: \" + style + \"[\" + Object.keys(this.$foldStyles).join(\", \") + \"]\");\n \n if (this.$foldStyle == style)\n return;\n\n this.$foldStyle = style;\n \n if (style == \"manual\")\n this.unfold();\n var mode = this.$foldMode;\n this.$setFolding(null);\n this.$setFolding(mode);\n };\n\n this.$setFolding = function(foldMode) {\n if (this.$foldMode == foldMode)\n return;\n \n this.$foldMode = foldMode;\n \n this.off('change', this.$updateFoldWidgets);\n this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n this._signal(\"changeAnnotation\");\n \n if (!foldMode || this.$foldStyle == \"manual\") {\n this.foldWidgets = null;\n return;\n }\n \n this.foldWidgets = [];\n this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);\n this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);\n \n this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);\n this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);\n this.on('change', this.$updateFoldWidgets);\n this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n };\n\n this.getParentFoldRangeData = function (row, ignoreCurrent) {\n var fw = this.foldWidgets;\n if (!fw || (ignoreCurrent && fw[row]))\n return {};\n\n var i = row - 1, firstRange;\n while (i >= 0) {\n var c = fw[i];\n if (c == null)\n c = fw[i] = this.getFoldWidget(i);\n\n if (c == \"start\") {\n var range = this.getFoldWidgetRange(i);\n if (!firstRange)\n firstRange = range;\n if (range && range.end.row >= row)\n break;\n }\n i--;\n }\n\n return {\n range: i !== -1 && range,\n firstRange: firstRange\n };\n };\n\n this.onFoldWidgetClick = function(row, e) {\n e = e.domEvent;\n var options = {\n children: e.shiftKey,\n all: e.ctrlKey || e.metaKey,\n siblings: e.altKey\n };\n \n var range = this.$toggleFoldWidget(row, options);\n if (!range) {\n var el = (e.target || e.srcElement);\n if (el && /ace_fold-widget/.test(el.className))\n el.className += \" ace_invalid\";\n }\n };\n \n this.$toggleFoldWidget = function(row, options) {\n if (!this.getFoldWidget)\n return;\n var type = this.getFoldWidget(row);\n var line = this.getLine(row);\n\n var dir = type === \"end\" ? -1 : 1;\n var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);\n\n if (fold) {\n if (options.children || options.all)\n this.removeFold(fold);\n else\n this.expandFold(fold);\n return fold;\n }\n\n var range = this.getFoldWidgetRange(row, true);\n if (range && !range.isMultiLine()) {\n fold = this.getFoldAt(range.start.row, range.start.column, 1);\n if (fold && range.isEqual(fold.range)) {\n this.removeFold(fold);\n return fold;\n }\n }\n \n if (options.siblings) {\n var data = this.getParentFoldRangeData(row);\n if (data.range) {\n var startRow = data.range.start.row + 1;\n var endRow = data.range.end.row;\n }\n this.foldAll(startRow, endRow, options.all ? 10000 : 0);\n } else if (options.children) {\n endRow = range ? range.end.row : this.getLength();\n this.foldAll(row + 1, endRow, options.all ? 10000 : 0);\n } else if (range) {\n if (options.all) \n range.collapseChildren = 10000;\n this.addFold(\"...\", range);\n }\n \n return range;\n };\n \n \n \n this.toggleFoldWidget = function(toggleParent) {\n var row = this.selection.getCursor().row;\n row = this.getRowFoldStart(row);\n var range = this.$toggleFoldWidget(row, {});\n \n if (range)\n return;\n var data = this.getParentFoldRangeData(row, true);\n range = data.range || data.firstRange;\n \n if (range) {\n row = range.start.row;\n var fold = this.getFoldAt(row, this.getLine(row).length, 1);\n\n if (fold) {\n this.removeFold(fold);\n } else {\n this.addFold(\"...\", range);\n }\n }\n };\n\n this.updateFoldWidgets = function(delta) {\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n\n if (len === 0) {\n this.foldWidgets[firstRow] = null;\n } else if (delta.action == 'remove') {\n this.foldWidgets.splice(firstRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(firstRow, 1);\n this.foldWidgets.splice.apply(this.foldWidgets, args);\n }\n };\n this.tokenizerUpdateFoldWidgets = function(e) {\n var rows = e.data;\n if (rows.first != rows.last) {\n if (this.foldWidgets.length > rows.first)\n this.foldWidgets.splice(rows.first, this.foldWidgets.length);\n }\n };\n}\n\nexports.Folding = Folding;\n\n});\n\nace.define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\n\nfunction BracketMatch() {\n\n this.findMatchingBracket = function(position, chr) {\n if (position.column == 0) return null;\n\n var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1);\n if (charBeforeCursor == \"\") return null;\n\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match)\n return null;\n\n if (match[1])\n return this.$findClosingBracket(match[1], position);\n else\n return this.$findOpeningBracket(match[2], position);\n };\n \n this.getBracketRange = function(pos) {\n var line = this.getLine(pos.row);\n var before = true, range;\n\n var chr = line.charAt(pos.column-1);\n var match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) {\n chr = line.charAt(pos.column);\n pos = {row: pos.row, column: pos.column + 1};\n match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n before = false;\n }\n if (!match)\n return null;\n\n if (match[1]) {\n var bracketPos = this.$findClosingBracket(match[1], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(pos, bracketPos);\n if (!before) {\n range.end.column++;\n range.start.column--;\n }\n range.cursor = range.end;\n } else {\n var bracketPos = this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(bracketPos, pos);\n if (!before) {\n range.start.column++;\n range.end.column--;\n }\n range.cursor = range.start;\n }\n \n return range;\n };\n\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\"\n };\n\n this.$findOpeningBracket = function(bracket, position, typeRe) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n \n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"rparen\", \".paren\")\n .replace(/\\b(?:end)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n \n while (true) {\n \n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n if (chr == openBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex -= 1;\n }\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n \n value = token.value;\n valueIndex = value.length - 1;\n }\n \n return null;\n };\n\n this.$findClosingBracket = function(bracket, position, typeRe) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n\n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"lparen\", \".paren\")\n .replace(/\\b(?:start|begin)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n\n while (true) {\n\n var value = token.value;\n var valueLength = value.length;\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n if (chr == closingBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex += 1;\n }\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n\n valueIndex = 0;\n }\n \n return null;\n };\n}\nexports.BracketMatch = BracketMatch;\n\n});\n\nace.define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/bidihandler\",\"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, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar BidiHandler = acequire(\"./bidihandler\").BidiHandler;\nvar config = acequire(\"./config\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Selection = acequire(\"./selection\").Selection;\nvar TextMode = acequire(\"./mode/text\").Mode;\nvar Range = acequire(\"./range\").Range;\nvar Document = acequire(\"./document\").Document;\nvar BackgroundTokenizer = acequire(\"./background_tokenizer\").BackgroundTokenizer;\nvar SearchHighlight = acequire(\"./search_highlight\").SearchHighlight;\n\nvar EditSession = function(text, mode) {\n this.$breakpoints = [];\n this.$decorations = [];\n this.$frontMarkers = {};\n this.$backMarkers = {};\n this.$markerId = 1;\n this.$undoSelect = true;\n\n this.$foldData = [];\n this.id = \"session\" + (++EditSession.$uid);\n this.$foldData.toString = function() {\n return this.join(\"\\n\");\n };\n this.on(\"changeFold\", this.onChangeFold.bind(this));\n this.$onChange = this.onChange.bind(this);\n\n if (typeof text != \"object\" || !text.getLine)\n text = new Document(text);\n\n this.$bidiHandler = new BidiHandler(this);\n this.setDocument(text);\n this.selection = new Selection(this);\n\n config.resetOptions(this);\n this.setMode(mode);\n config._signal(\"session\", this);\n};\n\n\nEditSession.$uid = 0;\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setDocument = function(doc) {\n if (this.doc)\n this.doc.removeListener(\"change\", this.$onChange);\n\n this.doc = doc;\n doc.on(\"change\", this.$onChange);\n\n if (this.bgTokenizer)\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.resetCaches();\n };\n this.getDocument = function() {\n return this.doc;\n };\n this.$resetRowCache = function(docRow) {\n if (!docRow) {\n this.$docRowCache = [];\n this.$screenRowCache = [];\n return;\n }\n var l = this.$docRowCache.length;\n var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;\n if (l > i) {\n this.$docRowCache.splice(i, l);\n this.$screenRowCache.splice(i, l);\n }\n };\n\n this.$getRowCacheIndex = function(cacheArray, val) {\n var low = 0;\n var hi = cacheArray.length - 1;\n\n while (low <= hi) {\n var mid = (low + hi) >> 1;\n var c = cacheArray[mid];\n\n if (val > c)\n low = mid + 1;\n else if (val < c)\n hi = mid - 1;\n else\n return mid;\n }\n\n return low -1;\n };\n\n this.resetCaches = function() {\n this.$modified = true;\n this.$wrapData = [];\n this.$rowLengthCache = [];\n this.$resetRowCache(0);\n if (this.bgTokenizer)\n this.bgTokenizer.start(0);\n };\n\n this.onChangeFold = function(e) {\n var fold = e.data;\n this.$resetRowCache(fold.start.row);\n };\n\n this.onChange = function(delta) {\n this.$modified = true;\n this.$bidiHandler.onChange(delta);\n this.$resetRowCache(delta.start.row);\n\n var removedFolds = this.$updateInternalDataOnChange(delta);\n if (!this.$fromUndo && this.$undoManager && !delta.ignore) {\n this.$deltasDoc.push(delta);\n if (removedFolds && removedFolds.length != 0) {\n this.$deltasFold.push({\n action: \"removeFolds\",\n folds: removedFolds\n });\n }\n\n this.$informUndoManager.schedule();\n }\n\n this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta);\n this._signal(\"change\", delta);\n };\n this.setValue = function(text) {\n this.doc.setValue(text);\n this.selection.moveTo(0, 0);\n\n this.$resetRowCache(0);\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n this.setUndoManager(this.$undoManager);\n this.getUndoManager().reset();\n };\n this.getValue =\n this.toString = function() {\n return this.doc.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.getState = function(row) {\n return this.bgTokenizer.getState(row);\n };\n this.getTokens = function(row) {\n return this.bgTokenizer.getTokens(row);\n };\n this.getTokenAt = function(row, column) {\n var tokens = this.bgTokenizer.getTokens(row);\n var token, c = 0;\n if (column == null) {\n var i = tokens.length - 1;\n c = this.getLine(row).length;\n } else {\n for (var i = 0; i < tokens.length; i++) {\n c += tokens[i].value.length;\n if (c >= column)\n break;\n }\n }\n token = tokens[i];\n if (!token)\n return null;\n token.index = i;\n token.start = c - token.value.length;\n return token;\n };\n this.setUndoManager = function(undoManager) {\n this.$undoManager = undoManager;\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n\n if (this.$informUndoManager)\n this.$informUndoManager.cancel();\n\n if (undoManager) {\n var self = this;\n\n this.$syncInformUndoManager = function() {\n self.$informUndoManager.cancel();\n\n if (self.$deltasFold.length) {\n self.$deltas.push({\n group: \"fold\",\n deltas: self.$deltasFold\n });\n self.$deltasFold = [];\n }\n\n if (self.$deltasDoc.length) {\n self.$deltas.push({\n group: \"doc\",\n deltas: self.$deltasDoc\n });\n self.$deltasDoc = [];\n }\n\n if (self.$deltas.length > 0) {\n undoManager.execute({\n action: \"aceupdate\",\n args: [self.$deltas, self],\n merge: self.mergeUndoDeltas\n });\n }\n self.mergeUndoDeltas = false;\n self.$deltas = [];\n };\n this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);\n }\n };\n this.markUndoGroup = function() {\n if (this.$syncInformUndoManager)\n this.$syncInformUndoManager();\n };\n \n this.$defaultUndoManager = {\n undo: function() {},\n redo: function() {},\n reset: function() {}\n };\n this.getUndoManager = function() {\n return this.$undoManager || this.$defaultUndoManager;\n };\n this.getTabString = function() {\n if (this.getUseSoftTabs()) {\n return lang.stringRepeat(\" \", this.getTabSize());\n } else {\n return \"\\t\";\n }\n };\n this.setUseSoftTabs = function(val) {\n this.setOption(\"useSoftTabs\", val);\n };\n this.getUseSoftTabs = function() {\n return this.$useSoftTabs && !this.$mode.$indentWithTabs;\n };\n this.setTabSize = function(tabSize) {\n this.setOption(\"tabSize\", tabSize);\n };\n this.getTabSize = function() {\n return this.$tabSize;\n };\n this.isTabStop = function(position) {\n return this.$useSoftTabs && (position.column % this.$tabSize === 0);\n };\n this.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) {\n this.setOption(\"navigateWithinSoftTabs\", navigateWithinSoftTabs);\n };\n this.getNavigateWithinSoftTabs = function() {\n return this.$navigateWithinSoftTabs;\n };\n\n this.$overwrite = false;\n this.setOverwrite = function(overwrite) {\n this.setOption(\"overwrite\", overwrite);\n };\n this.getOverwrite = function() {\n return this.$overwrite;\n };\n this.toggleOverwrite = function() {\n this.setOverwrite(!this.$overwrite);\n };\n this.addGutterDecoration = function(row, className) {\n if (!this.$decorations[row])\n this.$decorations[row] = \"\";\n this.$decorations[row] += \" \" + className;\n this._signal(\"changeBreakpoint\", {});\n };\n this.removeGutterDecoration = function(row, className) {\n this.$decorations[row] = (this.$decorations[row] || \"\").replace(\" \" + className, \"\");\n this._signal(\"changeBreakpoint\", {});\n };\n this.getBreakpoints = function() {\n return this.$breakpoints;\n };\n this.setBreakpoints = function(rows) {\n this.$breakpoints = [];\n for (var i=0; i 0)\n inToken = !!line.charAt(column - 1).match(this.tokenRe);\n\n if (!inToken)\n inToken = !!line.charAt(column).match(this.tokenRe);\n\n if (inToken)\n var re = this.tokenRe;\n else if (/^\\s+$/.test(line.slice(column-1, column+1)))\n var re = /\\s/;\n else\n var re = this.nonTokenRe;\n\n var start = column;\n if (start > 0) {\n do {\n start--;\n }\n while (start >= 0 && line.charAt(start).match(re));\n start++;\n }\n\n var end = column;\n while (end < line.length && line.charAt(end).match(re)) {\n end++;\n }\n\n return new Range(row, start, row, end);\n };\n this.getAWordRange = function(row, column) {\n var wordRange = this.getWordRange(row, column);\n var line = this.getLine(wordRange.end.row);\n\n while (line.charAt(wordRange.end.column).match(/[ \\t]/)) {\n wordRange.end.column += 1;\n }\n return wordRange;\n };\n this.setNewLineMode = function(newLineMode) {\n this.doc.setNewLineMode(newLineMode);\n };\n this.getNewLineMode = function() {\n return this.doc.getNewLineMode();\n };\n this.setUseWorker = function(useWorker) { this.setOption(\"useWorker\", useWorker); };\n this.getUseWorker = function() { return this.$useWorker; };\n this.onReloadTokenizer = function(e) {\n var rows = e.data;\n this.bgTokenizer.start(rows.first);\n this._signal(\"tokenizerUpdate\", e);\n };\n\n this.$modes = {};\n this.$mode = null;\n this.$modeId = null;\n this.setMode = function(mode, cb) {\n if (mode && typeof mode === \"object\") {\n if (mode.getTokenizer)\n return this.$onChangeMode(mode);\n var options = mode;\n var path = options.path;\n } else {\n path = mode || \"ace/mode/text\";\n }\n if (!this.$modes[\"ace/mode/text\"])\n this.$modes[\"ace/mode/text\"] = new TextMode();\n\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n cb && cb();\n return;\n }\n this.$modeId = path;\n config.loadModule([\"mode\", path], function(m) {\n if (this.$modeId !== path)\n return cb && cb();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n } else if (m && m.Mode) {\n m = new m.Mode(options);\n if (!options) {\n this.$modes[path] = m;\n m.$id = path;\n }\n this.$onChangeMode(m);\n }\n cb && cb();\n }.bind(this));\n if (!this.$mode)\n this.$onChangeMode(this.$modes[\"ace/mode/text\"], true);\n };\n\n this.$onChangeMode = function(mode, $isPlaceholder) {\n if (!$isPlaceholder)\n this.$modeId = mode.$id;\n if (this.$mode === mode) \n return;\n\n this.$mode = mode;\n\n this.$stopWorker();\n\n if (this.$useWorker)\n this.$startWorker();\n\n var tokenizer = mode.getTokenizer();\n\n if(tokenizer.addEventListener !== undefined) {\n var onReloadTokenizer = this.onReloadTokenizer.bind(this);\n tokenizer.addEventListener(\"update\", onReloadTokenizer);\n }\n\n if (!this.bgTokenizer) {\n this.bgTokenizer = new BackgroundTokenizer(tokenizer);\n var _self = this;\n this.bgTokenizer.addEventListener(\"update\", function(e) {\n _self._signal(\"tokenizerUpdate\", e);\n });\n } else {\n this.bgTokenizer.setTokenizer(tokenizer);\n }\n\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.tokenRe = mode.tokenRe;\n this.nonTokenRe = mode.nonTokenRe;\n\n \n if (!$isPlaceholder) {\n if (mode.attachToSession)\n mode.attachToSession(this);\n this.$options.wrapMethod.set.call(this, this.$wrapMethod);\n this.$setFolding(mode.foldingRules);\n this.bgTokenizer.start(0);\n this._emit(\"changeMode\");\n }\n };\n\n this.$stopWorker = function() {\n if (this.$worker) {\n this.$worker.terminate();\n this.$worker = null;\n }\n };\n\n this.$startWorker = function() {\n try {\n this.$worker = this.$mode.createWorker(this);\n } catch (e) {\n config.warn(\"Could not load worker\", e);\n this.$worker = null;\n }\n };\n this.getMode = function() {\n return this.$mode;\n };\n\n this.$scrollTop = 0;\n this.setScrollTop = function(scrollTop) {\n if (this.$scrollTop === scrollTop || isNaN(scrollTop))\n return;\n\n this.$scrollTop = scrollTop;\n this._signal(\"changeScrollTop\", scrollTop);\n };\n this.getScrollTop = function() {\n return this.$scrollTop;\n };\n\n this.$scrollLeft = 0;\n this.setScrollLeft = function(scrollLeft) {\n if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))\n return;\n\n this.$scrollLeft = scrollLeft;\n this._signal(\"changeScrollLeft\", scrollLeft);\n };\n this.getScrollLeft = function() {\n return this.$scrollLeft;\n };\n this.getScreenWidth = function() {\n this.$computeWidth();\n if (this.lineWidgets) \n return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);\n return this.screenWidth;\n };\n \n this.getLineWidgetMaxWidth = function() {\n if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;\n var width = 0;\n this.lineWidgets.forEach(function(w) {\n if (w && w.screenWidth > width)\n width = w.screenWidth;\n });\n return this.lineWidgetWidth = width;\n };\n\n this.$computeWidth = function(force) {\n if (this.$modified || force) {\n this.$modified = false;\n\n if (this.$useWrapMode)\n return this.screenWidth = this.$wrapLimit;\n\n var lines = this.doc.getAllLines();\n var cache = this.$rowLengthCache;\n var longestScreenLine = 0;\n var foldIndex = 0;\n var foldLine = this.$foldData[foldIndex];\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n var len = lines.length;\n\n for (var i = 0; i < len; i++) {\n if (i > foldStart) {\n i = foldLine.end.row + 1;\n if (i >= len)\n break;\n foldLine = this.$foldData[foldIndex++];\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (cache[i] == null)\n cache[i] = this.$getStringScreenWidth(lines[i])[0];\n\n if (cache[i] > longestScreenLine)\n longestScreenLine = cache[i];\n }\n this.screenWidth = longestScreenLine;\n }\n };\n this.getLine = function(row) {\n return this.doc.getLine(row);\n };\n this.getLines = function(firstRow, lastRow) {\n return this.doc.getLines(firstRow, lastRow);\n };\n this.getLength = function() {\n return this.doc.getLength();\n };\n this.getTextRange = function(range) {\n return this.doc.getTextRange(range || this.selection.getRange());\n };\n this.insert = function(position, text) {\n return this.doc.insert(position, text);\n };\n this.remove = function(range) {\n return this.doc.remove(range);\n };\n this.removeFullLines = function(firstRow, lastRow){\n return this.doc.removeFullLines(firstRow, lastRow);\n };\n this.undoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = deltas.length - 1; i != -1; i--) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.revertDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, true, lastUndoRange);\n } else {\n delta.deltas.forEach(function(foldDelta) {\n this.addFolds(foldDelta.folds);\n }, this);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.redoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.applyDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, false, lastUndoRange);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.setUndoSelect = function(enable) {\n this.$undoSelect = enable;\n };\n\n this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {\n function isInsert(delta) {\n return isUndo ? delta.action !== \"insert\" : delta.action === \"insert\";\n }\n\n var delta = deltas[0];\n var range, point;\n var lastDeltaIsInsert = false;\n if (isInsert(delta)) {\n range = Range.fromPoints(delta.start, delta.end);\n lastDeltaIsInsert = true;\n } else {\n range = Range.fromPoints(delta.start, delta.start);\n lastDeltaIsInsert = false;\n }\n\n for (var i = 1; i < deltas.length; i++) {\n delta = deltas[i];\n if (isInsert(delta)) {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range.setStart(point);\n }\n point = delta.end;\n if (range.compare(point.row, point.column) == 1) {\n range.setEnd(point);\n }\n lastDeltaIsInsert = true;\n } else {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range = Range.fromPoints(delta.start, delta.start);\n }\n lastDeltaIsInsert = false;\n }\n }\n if (lastUndoRange != null) {\n if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {\n lastUndoRange.start.column += range.end.column - range.start.column;\n lastUndoRange.end.column += range.end.column - range.start.column;\n }\n\n var cmp = lastUndoRange.compareRange(range);\n if (cmp == 1) {\n range.setStart(lastUndoRange.start);\n } else if (cmp == -1) {\n range.setEnd(lastUndoRange.end);\n }\n }\n\n return range;\n };\n this.replace = function(range, text) {\n return this.doc.replace(range, text);\n };\n this.moveText = function(fromRange, toPosition, copy) {\n var text = this.getTextRange(fromRange);\n var folds = this.getFoldsInRange(fromRange);\n\n var toRange = Range.fromPoints(toPosition, toPosition);\n if (!copy) {\n this.remove(fromRange);\n var rowDiff = fromRange.start.row - fromRange.end.row;\n var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;\n if (collDiff) {\n if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)\n toRange.start.column += collDiff;\n if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)\n toRange.end.column += collDiff;\n }\n if (rowDiff && toRange.start.row >= fromRange.end.row) {\n toRange.start.row += rowDiff;\n toRange.end.row += rowDiff;\n }\n }\n\n toRange.end = this.insert(toRange.start, text);\n if (folds.length) {\n var oldStart = fromRange.start;\n var newStart = toRange.start;\n var rowDiff = newStart.row - oldStart.row;\n var collDiff = newStart.column - oldStart.column;\n this.addFolds(folds.map(function(x) {\n x = x.clone();\n if (x.start.row == oldStart.row)\n x.start.column += collDiff;\n if (x.end.row == oldStart.row)\n x.end.column += collDiff;\n x.start.row += rowDiff;\n x.end.row += rowDiff;\n return x;\n }));\n }\n\n return toRange;\n };\n this.indentRows = function(startRow, endRow, indentString) {\n indentString = indentString.replace(/\\t/g, this.getTabString());\n for (var row=startRow; row<=endRow; row++)\n this.doc.insertInLine({row: row, column: 0}, indentString);\n };\n this.outdentRows = function (range) {\n var rowRange = range.collapseRows();\n var deleteRange = new Range(0, 0, 0, 0);\n var size = this.getTabSize();\n\n for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {\n var line = this.getLine(i);\n\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n for (var j = 0; j < size; ++j)\n if (line.charAt(j) != ' ')\n break;\n if (j < size && line.charAt(j) == '\\t') {\n deleteRange.start.column = j;\n deleteRange.end.column = j + 1;\n } else {\n deleteRange.start.column = 0;\n deleteRange.end.column = j;\n }\n this.remove(deleteRange);\n }\n };\n\n this.$moveLines = function(firstRow, lastRow, dir) {\n firstRow = this.getRowFoldStart(firstRow);\n lastRow = this.getRowFoldEnd(lastRow);\n if (dir < 0) {\n var row = this.getRowFoldStart(firstRow + dir);\n if (row < 0) return 0;\n var diff = row-firstRow;\n } else if (dir > 0) {\n var row = this.getRowFoldEnd(lastRow + dir);\n if (row > this.doc.getLength()-1) return 0;\n var diff = row-lastRow;\n } else {\n firstRow = this.$clipRowToDocument(firstRow);\n lastRow = this.$clipRowToDocument(lastRow);\n var diff = lastRow - firstRow + 1;\n }\n\n var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);\n var folds = this.getFoldsInRange(range).map(function(x){\n x = x.clone();\n x.start.row += diff;\n x.end.row += diff;\n return x;\n });\n \n var lines = dir == 0\n ? this.doc.getLines(firstRow, lastRow)\n : this.doc.removeFullLines(firstRow, lastRow);\n this.doc.insertFullLines(firstRow+diff, lines);\n folds.length && this.addFolds(folds);\n return diff;\n };\n this.moveLinesUp = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, -1);\n };\n this.moveLinesDown = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 1);\n };\n this.duplicateLines = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 0);\n };\n\n\n this.$clipRowToDocument = function(row) {\n return Math.max(0, Math.min(row, this.doc.getLength()-1));\n };\n\n this.$clipColumnToRow = function(row, column) {\n if (column < 0)\n return 0;\n return Math.min(this.doc.getLine(row).length, column);\n };\n\n\n this.$clipPositionToDocument = function(row, column) {\n column = Math.max(0, column);\n\n if (row < 0) {\n row = 0;\n column = 0;\n } else {\n var len = this.doc.getLength();\n if (row >= len) {\n row = len - 1;\n column = this.doc.getLine(len-1).length;\n } else {\n column = Math.min(this.doc.getLine(row).length, column);\n }\n }\n\n return {\n row: row,\n column: column\n };\n };\n\n this.$clipRangeToDocument = function(range) {\n if (range.start.row < 0) {\n range.start.row = 0;\n range.start.column = 0;\n } else {\n range.start.column = this.$clipColumnToRow(\n range.start.row,\n range.start.column\n );\n }\n\n var len = this.doc.getLength() - 1;\n if (range.end.row > len) {\n range.end.row = len;\n range.end.column = this.doc.getLine(len).length;\n } else {\n range.end.column = this.$clipColumnToRow(\n range.end.row,\n range.end.column\n );\n }\n return range;\n };\n this.$wrapLimit = 80;\n this.$useWrapMode = false;\n this.$wrapLimitRange = {\n min : null,\n max : null\n };\n this.setUseWrapMode = function(useWrapMode) {\n if (useWrapMode != this.$useWrapMode) {\n this.$useWrapMode = useWrapMode;\n this.$modified = true;\n this.$resetRowCache(0);\n if (useWrapMode) {\n var len = this.getLength();\n this.$wrapData = Array(len);\n this.$updateWrapData(0, len - 1);\n }\n\n this._signal(\"changeWrapMode\");\n }\n };\n this.getUseWrapMode = function() {\n return this.$useWrapMode;\n };\n this.setWrapLimitRange = function(min, max) {\n if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {\n this.$wrapLimitRange = { min: min, max: max };\n this.$modified = true;\n this.$bidiHandler.markAsDirty();\n if (this.$useWrapMode)\n this._signal(\"changeWrapMode\");\n }\n };\n this.adjustWrapLimit = function(desiredLimit, $printMargin) {\n var limits = this.$wrapLimitRange;\n if (limits.max < 0)\n limits = {min: $printMargin, max: $printMargin};\n var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);\n if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {\n this.$wrapLimit = wrapLimit;\n this.$modified = true;\n if (this.$useWrapMode) {\n this.$updateWrapData(0, this.getLength() - 1);\n this.$resetRowCache(0);\n this._signal(\"changeWrapLimit\");\n }\n return true;\n }\n return false;\n };\n\n this.$constrainWrapLimit = function(wrapLimit, min, max) {\n if (min)\n wrapLimit = Math.max(min, wrapLimit);\n\n if (max)\n wrapLimit = Math.min(max, wrapLimit);\n\n return wrapLimit;\n };\n this.getWrapLimit = function() {\n return this.$wrapLimit;\n };\n this.setWrapLimit = function (limit) {\n this.setWrapLimitRange(limit, limit);\n };\n this.getWrapLimitRange = function() {\n return {\n min : this.$wrapLimitRange.min,\n max : this.$wrapLimitRange.max\n };\n };\n\n this.$updateInternalDataOnChange = function(delta) {\n var useWrapMode = this.$useWrapMode;\n var action = delta.action;\n var start = delta.start;\n var end = delta.end;\n var firstRow = start.row;\n var lastRow = end.row;\n var len = lastRow - firstRow;\n var removedFolds = null;\n \n this.$updating = true;\n if (len != 0) {\n if (action === \"remove\") {\n this[useWrapMode ? \"$wrapData\" : \"$rowLengthCache\"].splice(firstRow, len);\n\n var foldLines = this.$foldData;\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n var foldLine = this.getFoldLine(end.row);\n var idx = 0;\n if (foldLine) {\n foldLine.addRemoveChars(end.row, end.column, start.column - end.column);\n foldLine.shiftRow(-len);\n\n var foldLineBefore = this.getFoldLine(firstRow);\n if (foldLineBefore && foldLineBefore !== foldLine) {\n foldLineBefore.merge(foldLine);\n foldLine = foldLineBefore;\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= end.row) {\n foldLine.shiftRow(-len);\n }\n }\n\n lastRow = firstRow;\n } else {\n var args = Array(len);\n args.unshift(firstRow, 0);\n var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache;\n arr.splice.apply(arr, args);\n var foldLines = this.$foldData;\n var foldLine = this.getFoldLine(firstRow);\n var idx = 0;\n if (foldLine) {\n var cmp = foldLine.range.compareInside(start.row, start.column);\n if (cmp == 0) {\n foldLine = foldLine.split(start.row, start.column);\n if (foldLine) {\n foldLine.shiftRow(len);\n foldLine.addRemoveChars(lastRow, 0, end.column - start.column);\n }\n } else\n if (cmp == -1) {\n foldLine.addRemoveChars(firstRow, 0, end.column - start.column);\n foldLine.shiftRow(len);\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= firstRow) {\n foldLine.shiftRow(len);\n }\n }\n }\n } else {\n len = Math.abs(delta.start.column - delta.end.column);\n if (action === \"remove\") {\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n len = -len;\n }\n var foldLine = this.getFoldLine(firstRow);\n if (foldLine) {\n foldLine.addRemoveChars(firstRow, start.column, len);\n }\n }\n\n if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {\n console.error(\"doc.getLength() and $wrapData.length have to be the same!\");\n }\n this.$updating = false;\n\n if (useWrapMode)\n this.$updateWrapData(firstRow, lastRow);\n else\n this.$updateRowLengthCache(firstRow, lastRow);\n\n return removedFolds;\n };\n\n this.$updateRowLengthCache = function(firstRow, lastRow, b) {\n this.$rowLengthCache[firstRow] = null;\n this.$rowLengthCache[lastRow] = null;\n };\n\n this.$updateWrapData = function(firstRow, lastRow) {\n var lines = this.doc.getAllLines();\n var tabSize = this.getTabSize();\n var wrapData = this.$wrapData;\n var wrapLimit = this.$wrapLimit;\n var tokens;\n var foldLine;\n\n var row = firstRow;\n lastRow = Math.min(lastRow, lines.length - 1);\n while (row <= lastRow) {\n foldLine = this.getFoldLine(row, foldLine);\n if (!foldLine) {\n tokens = this.$getDisplayTokens(lines[row]);\n wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row ++;\n } else {\n tokens = [];\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n var walkTokens;\n if (placeholder != null) {\n walkTokens = this.$getDisplayTokens(\n placeholder, tokens.length);\n walkTokens[0] = PLACEHOLDER_START;\n for (var i = 1; i < walkTokens.length; i++) {\n walkTokens[i] = PLACEHOLDER_BODY;\n }\n } else {\n walkTokens = this.$getDisplayTokens(\n lines[row].substring(lastColumn, column),\n tokens.length);\n }\n tokens = tokens.concat(walkTokens);\n }.bind(this),\n foldLine.end.row,\n lines[foldLine.end.row].length + 1\n );\n\n wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row = foldLine.end.row + 1;\n }\n }\n };\n var CHAR = 1,\n CHAR_EXT = 2,\n PLACEHOLDER_START = 3,\n PLACEHOLDER_BODY = 4,\n PUNCTUATION = 9,\n SPACE = 10,\n TAB = 11,\n TAB_SPACE = 12;\n\n\n this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {\n if (tokens.length == 0) {\n return [];\n }\n\n var splits = [];\n var displayLength = tokens.length;\n var lastSplit = 0, lastDocSplit = 0;\n\n var isCode = this.$wrapAsCode;\n\n var indentedSoftWrap = this.$indentedSoftWrap;\n var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)\n || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);\n\n function getWrapIndent() {\n var indentation = 0;\n if (maxIndent === 0)\n return indentation;\n if (indentedSoftWrap) {\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token == SPACE)\n indentation += 1;\n else if (token == TAB)\n indentation += tabSize;\n else if (token == TAB_SPACE)\n continue;\n else\n break;\n }\n }\n if (isCode && indentedSoftWrap !== false)\n indentation += tabSize;\n return Math.min(indentation, maxIndent);\n }\n function addSplit(screenPos) {\n var displayed = tokens.slice(lastSplit, screenPos);\n var len = displayed.length;\n displayed.join(\"\")\n .replace(/12/g, function() {\n len -= 1;\n })\n .replace(/2/g, function() {\n len -= 1;\n });\n\n if (!splits.length) {\n indent = getWrapIndent();\n splits.indent = indent;\n }\n lastDocSplit += len;\n splits.push(lastDocSplit);\n lastSplit = screenPos;\n }\n var indent = 0;\n while (displayLength - lastSplit > wrapLimit - indent) {\n var split = lastSplit + wrapLimit - indent;\n if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {\n addSplit(split);\n continue;\n }\n if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {\n for (split; split != lastSplit - 1; split--) {\n if (tokens[split] == PLACEHOLDER_START) {\n break;\n }\n }\n if (split > lastSplit) {\n addSplit(split);\n continue;\n }\n split = lastSplit + wrapLimit;\n for (split; split < tokens.length; split++) {\n if (tokens[split] != PLACEHOLDER_BODY) {\n break;\n }\n }\n if (split == tokens.length) {\n break; // Breaks the while-loop.\n }\n addSplit(split);\n continue;\n }\n var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1);\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n if (isCode) {\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n while (split > minSplit && tokens[split] == PUNCTUATION) {\n split --;\n }\n } else {\n while (split > minSplit && tokens[split] < SPACE) {\n split --;\n }\n }\n if (split > minSplit) {\n addSplit(++split);\n continue;\n }\n split = lastSplit + wrapLimit;\n if (tokens[split] == CHAR_EXT)\n split--;\n addSplit(split - indent);\n }\n return splits;\n };\n this.$getDisplayTokens = function(str, offset) {\n var arr = [];\n var tabSize;\n offset = offset || 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c == 9) {\n tabSize = this.getScreenTabSize(arr.length + offset);\n arr.push(TAB);\n for (var n = 1; n < tabSize; n++) {\n arr.push(TAB_SPACE);\n }\n }\n else if (c == 32) {\n arr.push(SPACE);\n } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {\n arr.push(PUNCTUATION);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n arr.push(CHAR, CHAR_EXT);\n } else {\n arr.push(CHAR);\n }\n }\n return arr;\n };\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn == 0)\n return [0, 0];\n if (maxScreenColumn == null)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charCodeAt(column);\n if (c == 9) {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n screenColumn += 2;\n } else {\n screenColumn += 1;\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n\n return [screenColumn, column];\n };\n\n this.lineWidgets = null;\n this.getRowLength = function(row) {\n if (this.lineWidgets)\n var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0;\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n this.getRowLineCount = function(row) {\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1;\n } else {\n return this.$wrapData[row].length + 1;\n }\n };\n\n this.getRowWrapIndent = function(screenRow) {\n if (this.$useWrapMode) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n var splits = this.$wrapData[pos.row];\n return splits.length && splits[0] < pos.column ? splits.indent : 0;\n } else {\n return 0;\n }\n };\n this.getScreenLastRowColumn = function(screenRow) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n return this.documentToScreenColumn(pos.row, pos.column);\n };\n this.getDocumentLastRowColumn = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.getScreenLastRowColumn(screenRow);\n };\n this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);\n };\n this.getRowSplitData = function(row) {\n if (!this.$useWrapMode) {\n return undefined;\n } else {\n return this.$wrapData[row];\n }\n };\n this.getScreenTabSize = function(screenColumn) {\n return this.$tabSize - screenColumn % this.$tabSize;\n };\n\n\n this.screenToDocumentRow = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).row;\n };\n\n\n this.screenToDocumentColumn = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).column;\n };\n this.screenToDocumentPosition = function(screenRow, screenColumn, offsetX) {\n if (screenRow < 0)\n return {row: 0, column: 0};\n\n var line;\n var docRow = 0;\n var docColumn = 0;\n var column;\n var row = 0;\n var rowLength = 0;\n\n var rowCache = this.$screenRowCache;\n var i = this.$getRowCacheIndex(rowCache, screenRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var docRow = this.$docRowCache[i];\n var doCache = screenRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var maxRow = this.getLength() - 1;\n var foldLine = this.getNextFoldLine(docRow);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (row <= screenRow) {\n rowLength = this.getRowLength(docRow);\n if (row + rowLength > screenRow || docRow >= maxRow) {\n break;\n } else {\n row += rowLength;\n docRow++;\n if (docRow > foldStart) {\n docRow = foldLine.end.row+1;\n foldLine = this.getNextFoldLine(docRow, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n }\n\n if (doCache) {\n this.$docRowCache.push(docRow);\n this.$screenRowCache.push(row);\n }\n }\n\n if (foldLine && foldLine.start.row <= docRow) {\n line = this.getFoldDisplayLine(foldLine);\n docRow = foldLine.start.row;\n } else if (row + rowLength <= screenRow || docRow > maxRow) {\n return {\n row: maxRow,\n column: this.getLine(maxRow).length\n };\n } else {\n line = this.getLine(docRow);\n foldLine = null;\n }\n var wrapIndent = 0, splitIndex = Math.floor(screenRow - row);\n if (this.$useWrapMode) {\n var splits = this.$wrapData[docRow];\n if (splits) {\n column = splits[splitIndex];\n if(splitIndex > 0 && splits.length) {\n wrapIndent = splits.indent;\n docColumn = splits[splitIndex - 1] || splits[splits.length - 1];\n line = line.substring(docColumn);\n }\n }\n }\n\n if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex))\n screenColumn = this.$bidiHandler.offsetToCol(offsetX);\n\n docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];\n if (this.$useWrapMode && docColumn >= column)\n docColumn = column - 1;\n\n if (foldLine)\n return foldLine.idxToPosition(docColumn);\n\n return {row: docRow, column: docColumn};\n };\n this.documentToScreenPosition = function(docRow, docColumn) {\n if (typeof docColumn === \"undefined\")\n var pos = this.$clipPositionToDocument(docRow.row, docRow.column);\n else\n pos = this.$clipPositionToDocument(docRow, docColumn);\n\n docRow = pos.row;\n docColumn = pos.column;\n\n var screenRow = 0;\n var foldStartRow = null;\n var fold = null;\n fold = this.getFoldAt(docRow, docColumn, 1);\n if (fold) {\n docRow = fold.start.row;\n docColumn = fold.start.column;\n }\n\n var rowEnd, row = 0;\n\n\n var rowCache = this.$docRowCache;\n var i = this.$getRowCacheIndex(rowCache, docRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var screenRow = this.$screenRowCache[i];\n var doCache = docRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var foldLine = this.getNextFoldLine(row);\n var foldStart = foldLine ?foldLine.start.row :Infinity;\n\n while (row < docRow) {\n if (row >= foldStart) {\n rowEnd = foldLine.end.row + 1;\n if (rowEnd > docRow)\n break;\n foldLine = this.getNextFoldLine(rowEnd, foldLine);\n foldStart = foldLine ?foldLine.start.row :Infinity;\n }\n else {\n rowEnd = row + 1;\n }\n\n screenRow += this.getRowLength(row);\n row = rowEnd;\n\n if (doCache) {\n this.$docRowCache.push(row);\n this.$screenRowCache.push(screenRow);\n }\n }\n var textLine = \"\";\n if (foldLine && row >= foldStart) {\n textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);\n foldStartRow = foldLine.start.row;\n } else {\n textLine = this.getLine(docRow).substring(0, docColumn);\n foldStartRow = docRow;\n }\n var wrapIndent = 0;\n if (this.$useWrapMode) {\n var wrapRow = this.$wrapData[foldStartRow];\n if (wrapRow) {\n var screenRowOffset = 0;\n while (textLine.length >= wrapRow[screenRowOffset]) {\n screenRow ++;\n screenRowOffset++;\n }\n textLine = textLine.substring(\n wrapRow[screenRowOffset - 1] || 0, textLine.length\n );\n wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;\n }\n }\n\n return {\n row: screenRow,\n column: wrapIndent + this.$getStringScreenWidth(textLine)[0]\n };\n };\n this.documentToScreenColumn = function(row, docColumn) {\n return this.documentToScreenPosition(row, docColumn).column;\n };\n this.documentToScreenRow = function(docRow, docColumn) {\n return this.documentToScreenPosition(docRow, docColumn).row;\n };\n this.getScreenLength = function() {\n var screenRows = 0;\n var fold = null;\n if (!this.$useWrapMode) {\n screenRows = this.getLength();\n var foldData = this.$foldData;\n for (var i = 0; i < foldData.length; i++) {\n fold = foldData[i];\n screenRows -= fold.end.row - fold.start.row;\n }\n } else {\n var lastRow = this.$wrapData.length;\n var row = 0, i = 0;\n var fold = this.$foldData[i++];\n var foldStart = fold ? fold.start.row :Infinity;\n\n while (row < lastRow) {\n var splits = this.$wrapData[row];\n screenRows += splits ? splits.length + 1 : 1;\n row ++;\n if (row > foldStart) {\n row = fold.end.row+1;\n fold = this.$foldData[i++];\n foldStart = fold ?fold.start.row :Infinity;\n }\n }\n }\n if (this.lineWidgets)\n screenRows += this.$getWidgetScreenLength();\n\n return screenRows;\n };\n this.$setFontMetrics = function(fm) {\n if (!this.$enableVarChar) return;\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn === 0)\n return [0, 0];\n if (!maxScreenColumn)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n \n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charAt(column);\n if (c === \"\\t\") {\n screenColumn += this.getScreenTabSize(screenColumn);\n } else {\n screenColumn += fm.getCharacterWidth(c);\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n \n return [screenColumn, column];\n };\n };\n \n this.destroy = function() {\n if (this.bgTokenizer) {\n this.bgTokenizer.setDocument(null);\n this.bgTokenizer = null;\n }\n this.$stopWorker();\n };\n\n this.isFullWidth = isFullWidth;\n function isFullWidth(c) {\n if (c < 0x1100)\n return false;\n return c >= 0x1100 && c <= 0x115F ||\n c >= 0x11A3 && c <= 0x11A7 ||\n c >= 0x11FA && c <= 0x11FF ||\n c >= 0x2329 && c <= 0x232A ||\n c >= 0x2E80 && c <= 0x2E99 ||\n c >= 0x2E9B && c <= 0x2EF3 ||\n c >= 0x2F00 && c <= 0x2FD5 ||\n c >= 0x2FF0 && c <= 0x2FFB ||\n c >= 0x3000 && c <= 0x303E ||\n c >= 0x3041 && c <= 0x3096 ||\n c >= 0x3099 && c <= 0x30FF ||\n c >= 0x3105 && c <= 0x312D ||\n c >= 0x3131 && c <= 0x318E ||\n c >= 0x3190 && c <= 0x31BA ||\n c >= 0x31C0 && c <= 0x31E3 ||\n c >= 0x31F0 && c <= 0x321E ||\n c >= 0x3220 && c <= 0x3247 ||\n c >= 0x3250 && c <= 0x32FE ||\n c >= 0x3300 && c <= 0x4DBF ||\n c >= 0x4E00 && c <= 0xA48C ||\n c >= 0xA490 && c <= 0xA4C6 ||\n c >= 0xA960 && c <= 0xA97C ||\n c >= 0xAC00 && c <= 0xD7A3 ||\n c >= 0xD7B0 && c <= 0xD7C6 ||\n c >= 0xD7CB && c <= 0xD7FB ||\n c >= 0xF900 && c <= 0xFAFF ||\n c >= 0xFE10 && c <= 0xFE19 ||\n c >= 0xFE30 && c <= 0xFE52 ||\n c >= 0xFE54 && c <= 0xFE66 ||\n c >= 0xFE68 && c <= 0xFE6B ||\n c >= 0xFF01 && c <= 0xFF60 ||\n c >= 0xFFE0 && c <= 0xFFE6;\n }\n\n}).call(EditSession.prototype);\n\nacequire(\"./edit_session/folding\").Folding.call(EditSession.prototype);\nacequire(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype);\n\n\nconfig.defineOptions(EditSession.prototype, \"session\", {\n wrap: {\n set: function(value) {\n if (!value || value == \"off\")\n value = false;\n else if (value == \"free\")\n value = true;\n else if (value == \"printMargin\")\n value = -1;\n else if (typeof value == \"string\")\n value = parseInt(value, 10) || false;\n\n if (this.$wrap == value)\n return;\n this.$wrap = value;\n if (!value) {\n this.setUseWrapMode(false);\n } else {\n var col = typeof value == \"number\" ? value : null;\n this.setWrapLimitRange(col, col);\n this.setUseWrapMode(true);\n }\n },\n get: function() {\n if (this.getUseWrapMode()) {\n if (this.$wrap == -1)\n return \"printMargin\";\n if (!this.getWrapLimitRange().min)\n return \"free\";\n return this.$wrap;\n }\n return \"off\";\n },\n handlesSet: true\n }, \n wrapMethod: {\n set: function(val) {\n val = val == \"auto\"\n ? this.$mode.type != \"text\"\n : val != \"text\";\n if (val != this.$wrapAsCode) {\n this.$wrapAsCode = val;\n if (this.$useWrapMode) {\n this.$modified = true;\n this.$resetRowCache(0);\n this.$updateWrapData(0, this.getLength() - 1);\n }\n }\n },\n initialValue: \"auto\"\n },\n indentedSoftWrap: { initialValue: true },\n firstLineNumber: {\n set: function() {this._signal(\"changeBreakpoint\");},\n initialValue: 1\n },\n useWorker: {\n set: function(useWorker) {\n this.$useWorker = useWorker;\n\n this.$stopWorker();\n if (useWorker)\n this.$startWorker();\n },\n initialValue: true\n },\n useSoftTabs: {initialValue: true},\n tabSize: {\n set: function(tabSize) {\n if (isNaN(tabSize) || this.$tabSize === tabSize) return;\n\n this.$modified = true;\n this.$rowLengthCache = [];\n this.$tabSize = tabSize;\n this._signal(\"changeTabSize\");\n },\n initialValue: 4,\n handlesSet: true\n },\n navigateWithinSoftTabs: {initialValue: false},\n overwrite: {\n set: function(val) {this._signal(\"changeOverwrite\");},\n initialValue: false\n },\n newLineMode: {\n set: function(val) {this.doc.setNewLineMode(val);},\n get: function() {return this.doc.getNewLineMode();},\n handlesSet: true\n },\n mode: {\n set: function(val) { this.setMode(val); },\n get: function() { return this.$modeId; }\n }\n});\n\nexports.EditSession = EditSession;\n});\n\nace.define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar Search = function() {\n this.$options = {};\n};\n\n(function() {\n this.set = function(options) {\n oop.mixin(this.$options, options);\n return this;\n };\n this.getOptions = function() {\n return lang.copyObject(this.$options);\n };\n this.setOptions = function(options) {\n this.$options = options;\n };\n this.find = function(session) {\n var options = this.$options;\n var iterator = this.$matchIterator(session, options);\n if (!iterator)\n return false;\n\n var firstRange = null;\n iterator.forEach(function(sr, sc, er, ec) {\n firstRange = new Range(sr, sc, er, ec);\n if (sc == ec && options.start && options.start.start\n && options.skipCurrent != false && firstRange.isEqual(options.start)\n ) {\n firstRange = null;\n return false;\n }\n\n return true;\n });\n\n return firstRange;\n };\n this.findAll = function(session) {\n var options = this.$options;\n if (!options.needle)\n return [];\n this.$assembleRegExp(options);\n\n var range = options.range;\n var lines = range\n ? session.getLines(range.start.row, range.end.row)\n : session.doc.getAllLines();\n\n var ranges = [];\n var re = options.re;\n if (options.$isMultiLine) {\n var len = re.length;\n var maxRow = lines.length - len;\n var prevRange;\n outer: for (var row = re.offset || 0; row <= maxRow; row++) {\n for (var j = 0; j < len; j++)\n if (lines[row + j].search(re[j]) == -1)\n continue outer;\n \n var startLine = lines[row];\n var line = lines[row + len - 1];\n var startIndex = startLine.length - startLine.match(re[0])[0].length;\n var endIndex = line.match(re[len - 1])[0].length;\n \n if (prevRange && prevRange.end.row === row &&\n prevRange.end.column > startIndex\n ) {\n continue;\n }\n ranges.push(prevRange = new Range(\n row, startIndex, row + len - 1, endIndex\n ));\n if (len > 2)\n row = row + len - 2;\n }\n } else {\n for (var i = 0; i < lines.length; i++) {\n var matches = lang.getMatchOffsets(lines[i], re);\n for (var j = 0; j < matches.length; j++) {\n var match = matches[j];\n ranges.push(new Range(i, match.offset, i, match.offset + match.length));\n }\n }\n }\n\n if (range) {\n var startColumn = range.start.column;\n var endColumn = range.start.column;\n var i = 0, j = ranges.length - 1;\n while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row)\n i++;\n\n while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row)\n j--;\n \n ranges = ranges.slice(i, j + 1);\n for (i = 0, j = ranges.length; i < j; i++) {\n ranges[i].start.row += range.start.row;\n ranges[i].end.row += range.start.row;\n }\n }\n\n return ranges;\n };\n this.replace = function(input, replacement) {\n var options = this.$options;\n\n var re = this.$assembleRegExp(options);\n if (options.$isMultiLine)\n return replacement;\n\n if (!re)\n return;\n\n var match = re.exec(input);\n if (!match || match[0].length != input.length)\n return null;\n \n replacement = input.replace(re, replacement);\n if (options.preserveCase) {\n replacement = replacement.split(\"\");\n for (var i = Math.min(input.length, input.length); i--; ) {\n var ch = input[i];\n if (ch && ch.toLowerCase() != ch)\n replacement[i] = replacement[i].toUpperCase();\n else\n replacement[i] = replacement[i].toLowerCase();\n }\n replacement = replacement.join(\"\");\n }\n \n return replacement;\n };\n\n this.$assembleRegExp = function(options, $disableFakeMultiline) {\n if (options.needle instanceof RegExp)\n return options.re = options.needle;\n\n var needle = options.needle;\n\n if (!options.needle)\n return options.re = false;\n\n if (!options.regExp)\n needle = lang.escapeRegExp(needle);\n\n if (options.wholeWord)\n needle = addWordBoundary(needle, options);\n\n var modifier = options.caseSensitive ? \"gm\" : \"gmi\";\n\n options.$isMultiLine = !$disableFakeMultiline && /[\\n\\r]/.test(needle);\n if (options.$isMultiLine)\n return options.re = this.$assembleMultilineRegExp(needle, modifier);\n\n try {\n var re = new RegExp(needle, modifier);\n } catch(e) {\n re = false;\n }\n return options.re = re;\n };\n\n this.$assembleMultilineRegExp = function(needle, modifier) {\n var parts = needle.replace(/\\r\\n|\\r|\\n/g, \"$\\n^\").split(\"\\n\");\n var re = [];\n for (var i = 0; i < parts.length; i++) try {\n re.push(new RegExp(parts[i], modifier));\n } catch(e) {\n return false;\n }\n return re;\n };\n\n this.$matchIterator = function(session, options) {\n var re = this.$assembleRegExp(options);\n if (!re)\n return false;\n var backwards = options.backwards == true;\n var skipCurrent = options.skipCurrent != false;\n\n var range = options.range;\n var start = options.start;\n if (!start)\n start = range ? range[backwards ? \"end\" : \"start\"] : session.selection.getRange();\n \n if (start.start)\n start = start[skipCurrent != backwards ? \"end\" : \"start\"];\n\n var firstRow = range ? range.start.row : 0;\n var lastRow = range ? range.end.row : session.getLength() - 1;\n\n if (backwards) {\n var forEach = function(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row--; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = lastRow, firstRow = start.row; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n };\n }\n else {\n var forEach = function(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row = row + 1; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = firstRow, lastRow = start.row; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n };\n }\n \n if (options.$isMultiLine) {\n var len = re.length;\n var forEachInLine = function(row, offset, callback) {\n var startRow = backwards ? row - len + 1 : row;\n if (startRow < 0) return;\n var line = session.getLine(startRow);\n var startIndex = line.search(re[0]);\n if (!backwards && startIndex < offset || startIndex === -1) return;\n for (var i = 1; i < len; i++) {\n line = session.getLine(startRow + i);\n if (line.search(re[i]) == -1)\n return;\n }\n var endIndex = line.match(re[len - 1])[0].length;\n if (backwards && endIndex > offset) return;\n if (callback(startRow, startIndex, startRow + len - 1, endIndex))\n return true;\n };\n }\n else if (backwards) {\n var forEachInLine = function(row, endIndex, callback) {\n var line = session.getLine(row);\n var matches = [];\n var m, last = 0;\n re.lastIndex = 0;\n while((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (!length) {\n if (last >= line.length) break;\n re.lastIndex = last += 1;\n }\n if (m.index + length > endIndex)\n break;\n matches.push(m.index, length);\n }\n for (var i = matches.length - 1; i >= 0; i -= 2) {\n var column = matches[i - 1];\n var length = matches[i];\n if (callback(row, column, row, column + length))\n return true;\n }\n };\n }\n else {\n var forEachInLine = function(row, startIndex, callback) {\n var line = session.getLine(row);\n var m;\n var last = startIndex;\n re.lastIndex = startIndex;\n while((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (callback(row, last, row,last + length))\n return true;\n if (!length) {\n re.lastIndex = last += 1;\n if (last >= line.length) return false;\n }\n }\n };\n }\n return {forEach: forEach};\n };\n\n}).call(Search.prototype);\n\nfunction addWordBoundary(needle, options) {\n function wordBoundary(c) {\n if (/\\w/.test(c) || options.regExp) return \"\\\\b\";\n return \"\";\n }\n return wordBoundary(needle[0]) + needle\n + wordBoundary(needle[needle.length - 1]);\n}\n\nexports.Search = Search;\n});\n\nace.define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keyUtil = acequire(\"../lib/keys\");\nvar useragent = acequire(\"../lib/useragent\");\nvar KEY_MODS = keyUtil.KEY_MODS;\n\nfunction HashHandler(config, platform) {\n this.platform = platform || (useragent.isMac ? \"mac\" : \"win\");\n this.commands = {};\n this.commandKeyBinding = {};\n this.addCommands(config);\n this.$singleCommand = true;\n}\n\nfunction MultiHashHandler(config, platform) {\n HashHandler.call(this, config, platform);\n this.$singleCommand = false;\n}\n\nMultiHashHandler.prototype = HashHandler.prototype;\n\n(function() {\n \n\n this.addCommand = function(command) {\n if (this.commands[command.name])\n this.removeCommand(command);\n\n this.commands[command.name] = command;\n\n if (command.bindKey)\n this._buildKeyHash(command);\n };\n\n this.removeCommand = function(command, keepCommand) {\n var name = command && (typeof command === 'string' ? command : command.name);\n command = this.commands[name];\n if (!keepCommand)\n delete this.commands[name];\n var ckb = this.commandKeyBinding;\n for (var keyId in ckb) {\n var cmdGroup = ckb[keyId];\n if (cmdGroup == command) {\n delete ckb[keyId];\n } else if (Array.isArray(cmdGroup)) {\n var i = cmdGroup.indexOf(command);\n if (i != -1) {\n cmdGroup.splice(i, 1);\n if (cmdGroup.length == 1)\n ckb[keyId] = cmdGroup[0];\n }\n }\n }\n };\n\n this.bindKey = function(key, command, position) {\n if (typeof key == \"object\" && key) {\n if (position == undefined)\n position = key.position;\n key = key[this.platform];\n }\n if (!key)\n return;\n if (typeof command == \"function\")\n return this.addCommand({exec: command, bindKey: key, name: command.name || key});\n \n key.split(\"|\").forEach(function(keyPart) {\n var chain = \"\";\n if (keyPart.indexOf(\" \") != -1) {\n var parts = keyPart.split(/\\s+/);\n keyPart = parts.pop();\n parts.forEach(function(keyPart) {\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n chain += (chain ? \" \" : \"\") + id;\n this._addCommandToBinding(chain, \"chainKeys\");\n }, this);\n chain += \" \";\n }\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n this._addCommandToBinding(chain + id, command, position);\n }, this);\n };\n \n function getPosition(command) {\n return typeof command == \"object\" && command.bindKey\n && command.bindKey.position\n || (command.isDefault ? -100 : 0);\n }\n this._addCommandToBinding = function(keyId, command, position) {\n var ckb = this.commandKeyBinding, i;\n if (!command) {\n delete ckb[keyId];\n } else if (!ckb[keyId] || this.$singleCommand) {\n ckb[keyId] = command;\n } else {\n if (!Array.isArray(ckb[keyId])) {\n ckb[keyId] = [ckb[keyId]];\n } else if ((i = ckb[keyId].indexOf(command)) != -1) {\n ckb[keyId].splice(i, 1);\n }\n\n if (typeof position != \"number\") {\n position = getPosition(command);\n }\n\n var commands = ckb[keyId];\n for (i = 0; i < commands.length; i++) {\n var other = commands[i];\n var otherPos = getPosition(other);\n if (otherPos > position)\n break;\n }\n commands.splice(i, 0, command);\n }\n };\n\n this.addCommands = function(commands) {\n commands && Object.keys(commands).forEach(function(name) {\n var command = commands[name];\n if (!command)\n return;\n \n if (typeof command === \"string\")\n return this.bindKey(command, name);\n\n if (typeof command === \"function\")\n command = { exec: command };\n\n if (typeof command !== \"object\")\n return;\n\n if (!command.name)\n command.name = name;\n\n this.addCommand(command);\n }, this);\n };\n\n this.removeCommands = function(commands) {\n Object.keys(commands).forEach(function(name) {\n this.removeCommand(commands[name]);\n }, this);\n };\n\n this.bindKeys = function(keyList) {\n Object.keys(keyList).forEach(function(key) {\n this.bindKey(key, keyList[key]);\n }, this);\n };\n\n this._buildKeyHash = function(command) {\n this.bindKey(command.bindKey, command);\n };\n this.parseKeys = function(keys) {\n var parts = keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function(x){return x;});\n var key = parts.pop();\n\n var keyCode = keyUtil[key];\n if (keyUtil.FUNCTION_KEYS[keyCode])\n key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();\n else if (!parts.length)\n return {key: key, hashId: -1};\n else if (parts.length == 1 && parts[0] == \"shift\")\n return {key: key.toUpperCase(), hashId: -1};\n\n var hashId = 0;\n for (var i = parts.length; i--;) {\n var modifier = keyUtil.KEY_MODS[parts[i]];\n if (modifier == null) {\n if (typeof console != \"undefined\")\n console.error(\"invalid modifier \" + parts[i] + \" in \" + keys);\n return false;\n }\n hashId |= modifier;\n }\n return {key: key, hashId: hashId};\n };\n\n this.findKeyCommand = function findKeyCommand(hashId, keyString) {\n var key = KEY_MODS[hashId] + keyString;\n return this.commandKeyBinding[key];\n };\n\n this.handleKeyboard = function(data, hashId, keyString, keyCode) {\n if (keyCode < 0) return;\n var key = KEY_MODS[hashId] + keyString;\n var command = this.commandKeyBinding[key];\n if (data.$keyChain) {\n data.$keyChain += \" \" + key;\n command = this.commandKeyBinding[data.$keyChain] || command;\n }\n \n if (command) {\n if (command == \"chainKeys\" || command[command.length - 1] == \"chainKeys\") {\n data.$keyChain = data.$keyChain || key;\n return {command: \"null\"};\n }\n }\n \n if (data.$keyChain) {\n if ((!hashId || hashId == 4) && keyString.length == 1)\n data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input\n else if (hashId == -1 || keyCode > 0)\n data.$keyChain = \"\"; // reset keyChain\n }\n return {command: command};\n };\n \n this.getStatusText = function(editor, data) {\n return data.$keyChain || \"\";\n };\n\n}).call(HashHandler.prototype);\n\nexports.HashHandler = HashHandler;\nexports.MultiHashHandler = MultiHashHandler;\n});\n\nace.define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar MultiHashHandler = acequire(\"../keyboard/hash_handler\").MultiHashHandler;\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CommandManager = function(platform, commands) {\n MultiHashHandler.call(this, commands, platform);\n this.byName = this.commands;\n this.setDefaultHandler(\"exec\", function(e) {\n return e.command.exec(e.editor, e.args || {});\n });\n};\n\noop.inherits(CommandManager, MultiHashHandler);\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.exec = function(command, editor, args) {\n if (Array.isArray(command)) {\n for (var i = command.length; i--; ) {\n if (this.exec(command[i], editor, args)) return true;\n }\n return false;\n }\n\n if (typeof command === \"string\")\n command = this.commands[command];\n\n if (!command)\n return false;\n\n if (editor && editor.$readOnly && !command.readOnly)\n return false;\n\n if (command.isAvailable && !command.isAvailable(editor))\n return false;\n\n var e = {editor: editor, command: command, args: args};\n e.returnValue = this._emit(\"exec\", e);\n this._signal(\"afterExec\", e);\n\n return e.returnValue === false ? false : true;\n };\n\n this.toggleRecording = function(editor) {\n if (this.$inReplay)\n return;\n\n editor && editor._emit(\"changeStatus\");\n if (this.recording) {\n this.macro.pop();\n this.removeEventListener(\"exec\", this.$addCommandToMacro);\n\n if (!this.macro.length)\n this.macro = this.oldMacro;\n\n return this.recording = false;\n }\n if (!this.$addCommandToMacro) {\n this.$addCommandToMacro = function(e) {\n this.macro.push([e.command, e.args]);\n }.bind(this);\n }\n\n this.oldMacro = this.macro;\n this.macro = [];\n this.on(\"exec\", this.$addCommandToMacro);\n return this.recording = true;\n };\n\n this.replay = function(editor) {\n if (this.$inReplay || !this.macro)\n return;\n\n if (this.recording)\n return this.toggleRecording(editor);\n\n try {\n this.$inReplay = true;\n this.macro.forEach(function(x) {\n if (typeof x == \"string\")\n this.exec(x, editor);\n else\n this.exec(x[0], editor, x[1]);\n }, this);\n } finally {\n this.$inReplay = false;\n }\n };\n\n this.trimMacro = function(m) {\n return m.map(function(x){\n if (typeof x[0] != \"string\")\n x[0] = x[0].name;\n if (!x[1])\n x = x[0];\n return x;\n });\n };\n\n}).call(CommandManager.prototype);\n\nexports.CommandManager = CommandManager;\n\n});\n\nace.define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\nvar config = acequire(\"../config\");\nvar Range = acequire(\"../range\").Range;\n\nfunction bindKey(win, mac) {\n return {win: win, mac: mac};\n}\nexports.commands = [{\n name: \"showSettingsMenu\",\n bindKey: bindKey(\"Ctrl-,\", \"Command-,\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/settings_menu\", function(module) {\n module.init(editor);\n editor.showSettingsMenu();\n });\n },\n readOnly: true\n}, {\n name: \"goToNextError\",\n bindKey: bindKey(\"Alt-E\", \"F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, 1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"goToPreviousError\",\n bindKey: bindKey(\"Alt-Shift-E\", \"Shift-F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, -1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selectall\",\n bindKey: bindKey(\"Ctrl-A\", \"Command-A\"),\n exec: function(editor) { editor.selectAll(); },\n readOnly: true\n}, {\n name: \"centerselection\",\n bindKey: bindKey(null, \"Ctrl-L\"),\n exec: function(editor) { editor.centerSelection(); },\n readOnly: true\n}, {\n name: \"gotoline\",\n bindKey: bindKey(\"Ctrl-L\", \"Command-L\"),\n exec: function(editor) {\n var line = parseInt(prompt(\"Enter line number:\"), 10);\n if (!isNaN(line)) {\n editor.gotoLine(line);\n }\n },\n readOnly: true\n}, {\n name: \"fold\",\n bindKey: bindKey(\"Alt-L|Ctrl-F1\", \"Command-Alt-L|Command-F1\"),\n exec: function(editor) { editor.session.toggleFold(false); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfold\",\n bindKey: bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\", \"Command-Alt-Shift-L|Command-Shift-F1\"),\n exec: function(editor) { editor.session.toggleFold(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleFoldWidget\",\n bindKey: bindKey(\"F2\", \"F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleParentFoldWidget\",\n bindKey: bindKey(\"Alt-F2\", \"Alt-F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldall\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function(editor) { editor.session.foldAll(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldOther\",\n bindKey: bindKey(\"Alt-0\", \"Command-Option-0\"),\n exec: function(editor) { \n editor.session.foldAll();\n editor.session.unfold(editor.selection.getAllRanges());\n },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfoldall\",\n bindKey: bindKey(\"Alt-Shift-0\", \"Command-Option-Shift-0\"),\n exec: function(editor) { editor.session.unfold(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findnext\",\n bindKey: bindKey(\"Ctrl-K\", \"Command-G\"),\n exec: function(editor) { editor.findNext(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findprevious\",\n bindKey: bindKey(\"Ctrl-Shift-K\", \"Command-Shift-G\"),\n exec: function(editor) { editor.findPrevious(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"selectOrFindNext\",\n bindKey: bindKey(\"Alt-K\", \"Ctrl-G\"),\n exec: function(editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findNext(); \n },\n readOnly: true\n}, {\n name: \"selectOrFindPrevious\",\n bindKey: bindKey(\"Alt-Shift-K\", \"Ctrl-Shift-G\"),\n exec: function(editor) { \n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findPrevious();\n },\n readOnly: true\n}, {\n name: \"find\",\n bindKey: bindKey(\"Ctrl-F\", \"Command-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor);});\n },\n readOnly: true\n}, {\n name: \"overwrite\",\n bindKey: \"Insert\",\n exec: function(editor) { editor.toggleOverwrite(); },\n readOnly: true\n}, {\n name: \"selecttostart\",\n bindKey: bindKey(\"Ctrl-Shift-Home\", \"Command-Shift-Home|Command-Shift-Up\"),\n exec: function(editor) { editor.getSelection().selectFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotostart\",\n bindKey: bindKey(\"Ctrl-Home\", \"Command-Home|Command-Up\"),\n exec: function(editor) { editor.navigateFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectup\",\n bindKey: bindKey(\"Shift-Up\", \"Shift-Up|Ctrl-Shift-P\"),\n exec: function(editor) { editor.getSelection().selectUp(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golineup\",\n bindKey: bindKey(\"Up\", \"Up|Ctrl-P\"),\n exec: function(editor, args) { editor.navigateUp(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttoend\",\n bindKey: bindKey(\"Ctrl-Shift-End\", \"Command-Shift-End|Command-Shift-Down\"),\n exec: function(editor) { editor.getSelection().selectFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotoend\",\n bindKey: bindKey(\"Ctrl-End\", \"Command-End|Command-Down\"),\n exec: function(editor) { editor.navigateFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectdown\",\n bindKey: bindKey(\"Shift-Down\", \"Shift-Down|Ctrl-Shift-N\"),\n exec: function(editor) { editor.getSelection().selectDown(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golinedown\",\n bindKey: bindKey(\"Down\", \"Down|Ctrl-N\"),\n exec: function(editor, args) { editor.navigateDown(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordleft\",\n bindKey: bindKey(\"Ctrl-Shift-Left\", \"Option-Shift-Left\"),\n exec: function(editor) { editor.getSelection().selectWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordleft\",\n bindKey: bindKey(\"Ctrl-Left\", \"Option-Left\"),\n exec: function(editor) { editor.navigateWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolinestart\",\n bindKey: bindKey(\"Alt-Shift-Left\", \"Command-Shift-Left|Ctrl-Shift-A\"),\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolinestart\",\n bindKey: bindKey(\"Alt-Left|Home\", \"Command-Left|Home|Ctrl-A\"),\n exec: function(editor) { editor.navigateLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectleft\",\n bindKey: bindKey(\"Shift-Left\", \"Shift-Left|Ctrl-Shift-B\"),\n exec: function(editor) { editor.getSelection().selectLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoleft\",\n bindKey: bindKey(\"Left\", \"Left|Ctrl-B\"),\n exec: function(editor, args) { editor.navigateLeft(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordright\",\n bindKey: bindKey(\"Ctrl-Shift-Right\", \"Option-Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordright\",\n bindKey: bindKey(\"Ctrl-Right\", \"Option-Right\"),\n exec: function(editor) { editor.navigateWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolineend\",\n bindKey: bindKey(\"Alt-Shift-Right\", \"Command-Shift-Right|Shift-End|Ctrl-Shift-E\"),\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolineend\",\n bindKey: bindKey(\"Alt-Right|End\", \"Command-Right|End|Ctrl-E\"),\n exec: function(editor) { editor.navigateLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectright\",\n bindKey: bindKey(\"Shift-Right\", \"Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoright\",\n bindKey: bindKey(\"Right\", \"Right|Ctrl-F\"),\n exec: function(editor, args) { editor.navigateRight(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectpagedown\",\n bindKey: \"Shift-PageDown\",\n exec: function(editor) { editor.selectPageDown(); },\n readOnly: true\n}, {\n name: \"pagedown\",\n bindKey: bindKey(null, \"Option-PageDown\"),\n exec: function(editor) { editor.scrollPageDown(); },\n readOnly: true\n}, {\n name: \"gotopagedown\",\n bindKey: bindKey(\"PageDown\", \"PageDown|Ctrl-V\"),\n exec: function(editor) { editor.gotoPageDown(); },\n readOnly: true\n}, {\n name: \"selectpageup\",\n bindKey: \"Shift-PageUp\",\n exec: function(editor) { editor.selectPageUp(); },\n readOnly: true\n}, {\n name: \"pageup\",\n bindKey: bindKey(null, \"Option-PageUp\"),\n exec: function(editor) { editor.scrollPageUp(); },\n readOnly: true\n}, {\n name: \"gotopageup\",\n bindKey: \"PageUp\",\n exec: function(editor) { editor.gotoPageUp(); },\n readOnly: true\n}, {\n name: \"scrollup\",\n bindKey: bindKey(\"Ctrl-Up\", null),\n exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"scrolldown\",\n bindKey: bindKey(\"Ctrl-Down\", null),\n exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"selectlinestart\",\n bindKey: \"Shift-Home\",\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectlineend\",\n bindKey: \"Shift-End\",\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"togglerecording\",\n bindKey: bindKey(\"Ctrl-Alt-E\", \"Command-Option-E\"),\n exec: function(editor) { editor.commands.toggleRecording(editor); },\n readOnly: true\n}, {\n name: \"replaymacro\",\n bindKey: bindKey(\"Ctrl-Shift-E\", \"Command-Shift-E\"),\n exec: function(editor) { editor.commands.replay(editor); },\n readOnly: true\n}, {\n name: \"jumptomatching\",\n bindKey: bindKey(\"Ctrl-P\", \"Ctrl-P\"),\n exec: function(editor) { editor.jumpToMatching(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selecttomatching\",\n bindKey: bindKey(\"Ctrl-Shift-P\", \"Ctrl-Shift-P\"),\n exec: function(editor) { editor.jumpToMatching(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"expandToMatching\",\n bindKey: bindKey(\"Ctrl-Shift-M\", \"Ctrl-Shift-M\"),\n exec: function(editor) { editor.jumpToMatching(true, true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"passKeysToBrowser\",\n bindKey: bindKey(null, null),\n exec: function() {},\n passEvent: true,\n readOnly: true\n}, {\n name: \"copy\",\n exec: function(editor) {\n },\n readOnly: true\n},\n{\n name: \"cut\",\n exec: function(editor) {\n var range = editor.getSelectionRange();\n editor._emit(\"cut\", range);\n\n if (!editor.selection.isEmpty()) {\n editor.session.remove(range);\n editor.clearSelection();\n }\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"paste\",\n exec: function(editor, args) {\n editor.$handlePaste(args);\n },\n scrollIntoView: \"cursor\"\n}, {\n name: \"removeline\",\n bindKey: bindKey(\"Ctrl-D\", \"Command-D\"),\n exec: function(editor) { editor.removeLines(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"duplicateSelection\",\n bindKey: bindKey(\"Ctrl-Shift-D\", \"Command-Shift-D\"),\n exec: function(editor) { editor.duplicateSelection(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"sortlines\",\n bindKey: bindKey(\"Ctrl-Alt-S\", \"Command-Alt-S\"),\n exec: function(editor) { editor.sortLines(); },\n scrollIntoView: \"selection\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"togglecomment\",\n bindKey: bindKey(\"Ctrl-/\", \"Command-/\"),\n exec: function(editor) { editor.toggleCommentLines(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"toggleBlockComment\",\n bindKey: bindKey(\"Ctrl-Shift-/\", \"Command-Shift-/\"),\n exec: function(editor) { editor.toggleBlockComment(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"modifyNumberUp\",\n bindKey: bindKey(\"Ctrl-Shift-Up\", \"Alt-Shift-Up\"),\n exec: function(editor) { editor.modifyNumber(1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"modifyNumberDown\",\n bindKey: bindKey(\"Ctrl-Shift-Down\", \"Alt-Shift-Down\"),\n exec: function(editor) { editor.modifyNumber(-1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"replace\",\n bindKey: bindKey(\"Ctrl-H\", \"Command-Option-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor, true);});\n }\n}, {\n name: \"undo\",\n bindKey: bindKey(\"Ctrl-Z\", \"Command-Z\"),\n exec: function(editor) { editor.undo(); }\n}, {\n name: \"redo\",\n bindKey: bindKey(\"Ctrl-Shift-Z|Ctrl-Y\", \"Command-Shift-Z|Command-Y\"),\n exec: function(editor) { editor.redo(); }\n}, {\n name: \"copylinesup\",\n bindKey: bindKey(\"Alt-Shift-Up\", \"Command-Option-Up\"),\n exec: function(editor) { editor.copyLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesup\",\n bindKey: bindKey(\"Alt-Up\", \"Option-Up\"),\n exec: function(editor) { editor.moveLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"copylinesdown\",\n bindKey: bindKey(\"Alt-Shift-Down\", \"Command-Option-Down\"),\n exec: function(editor) { editor.copyLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesdown\",\n bindKey: bindKey(\"Alt-Down\", \"Option-Down\"),\n exec: function(editor) { editor.moveLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"del\",\n bindKey: bindKey(\"Delete\", \"Delete|Ctrl-D|Shift-Delete\"),\n exec: function(editor) { editor.remove(\"right\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"backspace\",\n bindKey: bindKey(\n \"Shift-Backspace|Backspace\",\n \"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H\"\n ),\n exec: function(editor) { editor.remove(\"left\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"cut_or_delete\",\n bindKey: bindKey(\"Shift-Delete\", null),\n exec: function(editor) { \n if (editor.selection.isEmpty()) {\n editor.remove(\"left\");\n } else {\n return false;\n }\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolinestart\",\n bindKey: bindKey(\"Alt-Backspace\", \"Command-Backspace\"),\n exec: function(editor) { editor.removeToLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolineend\",\n bindKey: bindKey(\"Alt-Delete\", \"Ctrl-K|Command-Delete\"),\n exec: function(editor) { editor.removeToLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolinestarthard\",\n bindKey: bindKey(\"Ctrl-Shift-Backspace\", null),\n exec: function(editor) {\n var range = editor.selection.getRange();\n range.start.column = 0;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolineendhard\",\n bindKey: bindKey(\"Ctrl-Shift-Delete\", null),\n exec: function(editor) {\n var range = editor.selection.getRange();\n range.end.column = Number.MAX_VALUE;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordleft\",\n bindKey: bindKey(\"Ctrl-Backspace\", \"Alt-Backspace|Ctrl-Alt-Backspace\"),\n exec: function(editor) { editor.removeWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordright\",\n bindKey: bindKey(\"Ctrl-Delete\", \"Alt-Delete\"),\n exec: function(editor) { editor.removeWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"outdent\",\n bindKey: bindKey(\"Shift-Tab\", \"Shift-Tab\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"indent\",\n bindKey: bindKey(\"Tab\", \"Tab\"),\n exec: function(editor) { editor.indent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockoutdent\",\n bindKey: bindKey(\"Ctrl-[\", \"Ctrl-[\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockindent\",\n bindKey: bindKey(\"Ctrl-]\", \"Ctrl-]\"),\n exec: function(editor) { editor.blockIndent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"insertstring\",\n exec: function(editor, str) { editor.insert(str); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"inserttext\",\n exec: function(editor, args) {\n editor.insert(lang.stringRepeat(args.text || \"\", args.times || 1));\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"splitline\",\n bindKey: bindKey(null, \"Ctrl-O\"),\n exec: function(editor) { editor.splitLine(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"transposeletters\",\n bindKey: bindKey(\"Alt-Shift-X\", \"Ctrl-T\"),\n exec: function(editor) { editor.transposeLetters(); },\n multiSelectAction: function(editor) {editor.transposeSelections(1); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"touppercase\",\n bindKey: bindKey(\"Ctrl-U\", \"Ctrl-U\"),\n exec: function(editor) { editor.toUpperCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"tolowercase\",\n bindKey: bindKey(\"Ctrl-Shift-U\", \"Ctrl-Shift-U\"),\n exec: function(editor) { editor.toLowerCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"expandtoline\",\n bindKey: bindKey(\"Ctrl-Shift-L\", \"Command-Shift-L\"),\n exec: function(editor) {\n var range = editor.selection.getRange();\n\n range.start.column = range.end.column = 0;\n range.end.row++;\n editor.selection.setRange(range, false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"joinlines\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var isBackwards = editor.selection.isBackwards();\n var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();\n var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();\n var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;\n var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());\n var selectedCount = selectedText.replace(/\\n\\s*/, \" \").length;\n var insertLine = editor.session.doc.getLine(selectionStart.row);\n\n for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {\n var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));\n if (curLine.length !== 0) {\n curLine = \" \" + curLine;\n }\n insertLine += curLine;\n }\n\n if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {\n insertLine += editor.session.doc.getNewLineCharacter();\n }\n\n editor.clearSelection();\n editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);\n\n if (selectedCount > 0) {\n editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);\n editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);\n } else {\n firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;\n editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);\n }\n },\n multiSelectAction: \"forEach\",\n readOnly: true\n}, {\n name: \"invertSelection\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var endRow = editor.session.doc.getLength() - 1;\n var endCol = editor.session.doc.getLine(endRow).length;\n var ranges = editor.selection.rangeList.ranges;\n var newRanges = [];\n if (ranges.length < 1) {\n ranges = [editor.selection.getRange()];\n }\n\n for (var i = 0; i < ranges.length; i++) {\n if (i == (ranges.length - 1)) {\n if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {\n newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));\n }\n }\n\n if (i === 0) {\n if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {\n newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));\n }\n } else {\n newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column));\n }\n }\n\n editor.exitMultiSelectMode();\n editor.clearSelection();\n\n for(var i = 0; i < newRanges.length; i++) {\n editor.selection.addRange(newRanges[i], false);\n }\n },\n readOnly: true,\n scrollIntoView: \"none\"\n}];\n\n});\n\nace.define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\",\"ace/lib/dom\",\"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\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar lang = acequire(\"./lib/lang\");\nvar useragent = acequire(\"./lib/useragent\");\nvar TextInput = acequire(\"./keyboard/textinput\").TextInput;\nvar MouseHandler = acequire(\"./mouse/mouse_handler\").MouseHandler;\nvar FoldHandler = acequire(\"./mouse/fold_handler\").FoldHandler;\nvar KeyBinding = acequire(\"./keyboard/keybinding\").KeyBinding;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar Search = acequire(\"./search\").Search;\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar CommandManager = acequire(\"./commands/command_manager\").CommandManager;\nvar defaultCommands = acequire(\"./commands/default_commands\").commands;\nvar config = acequire(\"./config\");\nvar TokenIterator = acequire(\"./token_iterator\").TokenIterator;\nvar Editor = function(renderer, session) {\n var container = renderer.getContainerElement();\n this.container = container;\n this.renderer = renderer;\n this.id = \"editor\" + (++Editor.$uid);\n\n this.commands = new CommandManager(useragent.isMac ? \"mac\" : \"win\", defaultCommands);\n if (typeof document == \"object\") {\n this.textInput = new TextInput(renderer.getTextAreaContainer(), this);\n this.renderer.textarea = this.textInput.getElement();\n this.$mouseHandler = new MouseHandler(this);\n new FoldHandler(this);\n }\n\n this.keyBinding = new KeyBinding(this);\n\n this.$blockScrolling = 0;\n this.$search = new Search().set({\n wrap: true\n });\n\n this.$historyTracker = this.$historyTracker.bind(this);\n this.commands.on(\"exec\", this.$historyTracker);\n\n this.$initOperationListeners();\n \n this._$emitInputEvent = lang.delayedCall(function() {\n this._signal(\"input\", {});\n if (this.session && this.session.bgTokenizer)\n this.session.bgTokenizer.scheduleStart();\n }.bind(this));\n \n this.on(\"change\", function(_, _self) {\n _self._$emitInputEvent.schedule(31);\n });\n\n this.setSession(session || new EditSession(\"\"));\n config.resetOptions(this);\n config._signal(\"editor\", this);\n};\n\nEditor.$uid = 0;\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$initOperationListeners = function() {\n function last(a) {return a[a.length - 1];}\n\n this.selections = [];\n this.commands.on(\"exec\", this.startOperation.bind(this), true);\n this.commands.on(\"afterExec\", this.endOperation.bind(this), true);\n\n this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));\n\n this.on(\"change\", function() {\n this.curOp || this.startOperation();\n this.curOp.docChanged = true;\n }.bind(this), true);\n\n this.on(\"changeSelection\", function() {\n this.curOp || this.startOperation();\n this.curOp.selectionChanged = true;\n }.bind(this), true);\n };\n\n this.curOp = null;\n this.prevOp = {};\n this.startOperation = function(commadEvent) {\n if (this.curOp) {\n if (!commadEvent || this.curOp.command)\n return;\n this.prevOp = this.curOp;\n }\n if (!commadEvent) {\n this.previousCommand = null;\n commadEvent = {};\n }\n\n this.$opResetTimer.schedule();\n this.curOp = {\n command: commadEvent.command || {},\n args: commadEvent.args,\n scrollTop: this.renderer.scrollTop\n };\n if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)\n this.$blockScrolling++;\n };\n\n this.endOperation = function(e) {\n if (this.curOp) {\n if (e && e.returnValue === false)\n return this.curOp = null;\n this._signal(\"beforeEndOperation\");\n var command = this.curOp.command;\n if (command.name && this.$blockScrolling > 0)\n this.$blockScrolling--;\n var scrollIntoView = command && command.scrollIntoView;\n if (scrollIntoView) {\n switch (scrollIntoView) {\n case \"center-animate\":\n scrollIntoView = \"animate\";\n case \"center\":\n this.renderer.scrollCursorIntoView(null, 0.5);\n break;\n case \"animate\":\n case \"cursor\":\n this.renderer.scrollCursorIntoView();\n break;\n case \"selectionPart\":\n var range = this.selection.getRange();\n var config = this.renderer.layerConfig;\n if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {\n this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);\n }\n break;\n default:\n break;\n }\n if (scrollIntoView == \"animate\")\n this.renderer.animateScrolling(this.curOp.scrollTop);\n }\n \n this.prevOp = this.curOp;\n this.curOp = null;\n }\n };\n this.$mergeableCommands = [\"backspace\", \"del\", \"insertstring\"];\n this.$historyTracker = function(e) {\n if (!this.$mergeUndoDeltas)\n return;\n\n var prev = this.prevOp;\n var mergeableCommands = this.$mergeableCommands;\n var shouldMerge = prev.command && (e.command.name == prev.command.name);\n if (e.command.name == \"insertstring\") {\n var text = e.args;\n if (this.mergeNextCommand === undefined)\n this.mergeNextCommand = true;\n\n shouldMerge = shouldMerge\n && this.mergeNextCommand // previous command allows to coalesce with\n && (!/\\s/.test(text) || /\\s/.test(prev.args)); // previous insertion was of same type\n\n this.mergeNextCommand = true;\n } else {\n shouldMerge = shouldMerge\n && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable\n }\n\n if (\n this.$mergeUndoDeltas != \"always\"\n && Date.now() - this.sequenceStartTime > 2000\n ) {\n shouldMerge = false; // the sequence is too long\n }\n\n if (shouldMerge)\n this.session.mergeUndoDeltas = true;\n else if (mergeableCommands.indexOf(e.command.name) !== -1)\n this.sequenceStartTime = Date.now();\n };\n this.setKeyboardHandler = function(keyboardHandler, cb) {\n if (keyboardHandler && typeof keyboardHandler === \"string\") {\n this.$keybindingId = keyboardHandler;\n var _self = this;\n config.loadModule([\"keybinding\", keyboardHandler], function(module) {\n if (_self.$keybindingId == keyboardHandler)\n _self.keyBinding.setKeyboardHandler(module && module.handler);\n cb && cb();\n });\n } else {\n this.$keybindingId = null;\n this.keyBinding.setKeyboardHandler(keyboardHandler);\n cb && cb();\n }\n };\n this.getKeyboardHandler = function() {\n return this.keyBinding.getKeyboardHandler();\n };\n this.setSession = function(session) {\n if (this.session == session)\n return;\n if (this.curOp) this.endOperation();\n this.curOp = {};\n\n var oldSession = this.session;\n if (oldSession) {\n this.session.off(\"change\", this.$onDocumentChange);\n this.session.off(\"changeMode\", this.$onChangeMode);\n this.session.off(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.session.off(\"changeTabSize\", this.$onChangeTabSize);\n this.session.off(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.session.off(\"changeWrapMode\", this.$onChangeWrapMode);\n this.session.off(\"changeFold\", this.$onChangeFold);\n this.session.off(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.session.off(\"changeBackMarker\", this.$onChangeBackMarker);\n this.session.off(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.session.off(\"changeAnnotation\", this.$onChangeAnnotation);\n this.session.off(\"changeOverwrite\", this.$onCursorChange);\n this.session.off(\"changeScrollTop\", this.$onScrollTopChange);\n this.session.off(\"changeScrollLeft\", this.$onScrollLeftChange);\n\n var selection = this.session.getSelection();\n selection.off(\"changeCursor\", this.$onCursorChange);\n selection.off(\"changeSelection\", this.$onSelectionChange);\n }\n\n this.session = session;\n if (session) {\n this.$onDocumentChange = this.onDocumentChange.bind(this);\n session.on(\"change\", this.$onDocumentChange);\n this.renderer.setSession(session);\n \n this.$onChangeMode = this.onChangeMode.bind(this);\n session.on(\"changeMode\", this.$onChangeMode);\n \n this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);\n session.on(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n \n this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);\n session.on(\"changeTabSize\", this.$onChangeTabSize);\n \n this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);\n session.on(\"changeWrapLimit\", this.$onChangeWrapLimit);\n \n this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);\n session.on(\"changeWrapMode\", this.$onChangeWrapMode);\n \n this.$onChangeFold = this.onChangeFold.bind(this);\n session.on(\"changeFold\", this.$onChangeFold);\n \n this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);\n this.session.on(\"changeFrontMarker\", this.$onChangeFrontMarker);\n \n this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);\n this.session.on(\"changeBackMarker\", this.$onChangeBackMarker);\n \n this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);\n this.session.on(\"changeBreakpoint\", this.$onChangeBreakpoint);\n \n this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);\n this.session.on(\"changeAnnotation\", this.$onChangeAnnotation);\n \n this.$onCursorChange = this.onCursorChange.bind(this);\n this.session.on(\"changeOverwrite\", this.$onCursorChange);\n \n this.$onScrollTopChange = this.onScrollTopChange.bind(this);\n this.session.on(\"changeScrollTop\", this.$onScrollTopChange);\n \n this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);\n this.session.on(\"changeScrollLeft\", this.$onScrollLeftChange);\n \n this.selection = session.getSelection();\n this.selection.on(\"changeCursor\", this.$onCursorChange);\n \n this.$onSelectionChange = this.onSelectionChange.bind(this);\n this.selection.on(\"changeSelection\", this.$onSelectionChange);\n \n this.onChangeMode();\n \n this.$blockScrolling += 1;\n this.onCursorChange();\n this.$blockScrolling -= 1;\n \n this.onScrollTopChange();\n this.onScrollLeftChange();\n this.onSelectionChange();\n this.onChangeFrontMarker();\n this.onChangeBackMarker();\n this.onChangeBreakpoint();\n this.onChangeAnnotation();\n this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();\n this.renderer.updateFull();\n } else {\n this.selection = null;\n this.renderer.setSession(session);\n }\n\n this._signal(\"changeSession\", {\n session: session,\n oldSession: oldSession\n });\n \n this.curOp = null;\n \n oldSession && oldSession._signal(\"changeEditor\", {oldEditor: this});\n session && session._signal(\"changeEditor\", {editor: this});\n\n if (session && session.bgTokenizer)\n session.bgTokenizer.scheduleStart();\n };\n this.getSession = function() {\n return this.session;\n };\n this.setValue = function(val, cursorPos) {\n this.session.doc.setValue(val);\n\n if (!cursorPos)\n this.selectAll();\n else if (cursorPos == 1)\n this.navigateFileEnd();\n else if (cursorPos == -1)\n this.navigateFileStart();\n\n return val;\n };\n this.getValue = function() {\n return this.session.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.resize = function(force) {\n this.renderer.onResize(force);\n };\n this.setTheme = function(theme, cb) {\n this.renderer.setTheme(theme, cb);\n };\n this.getTheme = function() {\n return this.renderer.getTheme();\n };\n this.setStyle = function(style) {\n this.renderer.setStyle(style);\n };\n this.unsetStyle = function(style) {\n this.renderer.unsetStyle(style);\n };\n this.getFontSize = function () {\n return this.getOption(\"fontSize\") ||\n dom.computedStyle(this.container, \"fontSize\");\n };\n this.setFontSize = function(size) {\n this.setOption(\"fontSize\", size);\n };\n\n this.$highlightBrackets = function() {\n if (this.session.$bracketHighlight) {\n this.session.removeMarker(this.session.$bracketHighlight);\n this.session.$bracketHighlight = null;\n }\n\n if (this.$highlightPending) {\n return;\n }\n var self = this;\n this.$highlightPending = true;\n setTimeout(function() {\n self.$highlightPending = false;\n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n var pos = session.findMatchingBracket(self.getCursorPosition());\n if (pos) {\n var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);\n } else if (session.$mode.getMatching) {\n var range = session.$mode.getMatching(self.session);\n }\n if (range)\n session.$bracketHighlight = session.addMarker(range, \"ace_bracket\", \"text\");\n }, 50);\n };\n this.$highlightTags = function() {\n if (this.$highlightTagPending)\n return;\n var self = this;\n this.$highlightTagPending = true;\n setTimeout(function() {\n self.$highlightTagPending = false;\n \n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n \n var pos = self.getCursorPosition();\n var iterator = new TokenIterator(self.session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n \n if (!token || !/\\b(?:tag-open|tag-name)/.test(token.type)) {\n session.removeMarker(session.$tagHighlight);\n session.$tagHighlight = null;\n return;\n }\n \n if (token.type.indexOf(\"tag-open\") != -1) {\n token = iterator.stepForward();\n if (!token)\n return;\n }\n \n var tag = token.value;\n var depth = 0;\n var prevToken = iterator.stepBackward();\n \n if (prevToken.value == '<'){\n do {\n prevToken = token;\n token = iterator.stepForward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<'){\n depth++;\n } else if (prevToken.value === '= 0);\n } else {\n do {\n token = prevToken;\n prevToken = iterator.stepBackward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<') {\n depth++;\n } else if (prevToken.value === ' 1))\n highlight = false;\n }\n\n if (session.$highlightLineMarker && !highlight) {\n session.removeMarker(session.$highlightLineMarker.id);\n session.$highlightLineMarker = null;\n } else if (!session.$highlightLineMarker && highlight) {\n var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);\n range.id = session.addMarker(range, \"ace_active-line\", \"screenLine\");\n session.$highlightLineMarker = range;\n } else if (highlight) {\n session.$highlightLineMarker.start.row = highlight.row;\n session.$highlightLineMarker.end.row = highlight.row;\n session.$highlightLineMarker.start.column = highlight.column;\n session._signal(\"changeBackMarker\");\n }\n };\n\n this.onSelectionChange = function(e) {\n var session = this.session;\n\n if (session.$selectionMarker) {\n session.removeMarker(session.$selectionMarker);\n }\n session.$selectionMarker = null;\n\n if (!this.selection.isEmpty()) {\n var range = this.selection.getRange();\n var style = this.getSelectionStyle();\n session.$selectionMarker = session.addMarker(range, \"ace_selection\", style);\n } else {\n this.$updateHighlightActiveLine();\n }\n\n var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();\n this.session.highlight(re);\n\n this._signal(\"changeSelection\");\n };\n\n this.$getSelectionHighLightRegexp = function() {\n var session = this.session;\n\n var selection = this.getSelectionRange();\n if (selection.isEmpty() || selection.isMultiLine())\n return;\n\n var startOuter = selection.start.column - 1;\n var endOuter = selection.end.column + 1;\n var line = session.getLine(selection.start.row);\n var lineCols = line.length;\n var needle = line.substring(Math.max(startOuter, 0),\n Math.min(endOuter, lineCols));\n if ((startOuter >= 0 && /^[\\w\\d]/.test(needle)) ||\n (endOuter <= lineCols && /[\\w\\d]$/.test(needle)))\n return;\n\n needle = line.substring(selection.start.column, selection.end.column);\n if (!/^[\\w\\d]+$/.test(needle))\n return;\n\n var re = this.$search.$assembleRegExp({\n wholeWord: true,\n caseSensitive: true,\n needle: needle\n });\n\n return re;\n };\n\n\n this.onChangeFrontMarker = function() {\n this.renderer.updateFrontMarkers();\n };\n\n this.onChangeBackMarker = function() {\n this.renderer.updateBackMarkers();\n };\n\n\n this.onChangeBreakpoint = function() {\n this.renderer.updateBreakpoints();\n };\n\n this.onChangeAnnotation = function() {\n this.renderer.setAnnotations(this.session.getAnnotations());\n };\n\n\n this.onChangeMode = function(e) {\n this.renderer.updateText();\n this._emit(\"changeMode\", e);\n };\n\n\n this.onChangeWrapLimit = function() {\n this.renderer.updateFull();\n };\n\n this.onChangeWrapMode = function() {\n this.renderer.onResize(true);\n };\n\n\n this.onChangeFold = function() {\n this.$updateHighlightActiveLine();\n this.renderer.updateFull();\n };\n this.getSelectedText = function() {\n return this.session.getTextRange(this.getSelectionRange());\n };\n this.getCopyText = function() {\n var text = this.getSelectedText();\n this._signal(\"copy\", text);\n return text;\n };\n this.onCopy = function() {\n this.commands.exec(\"copy\", this);\n };\n this.onCut = function() {\n this.commands.exec(\"cut\", this);\n };\n this.onPaste = function(text, event) {\n var e = {text: text, event: event};\n this.commands.exec(\"paste\", this, e);\n };\n \n this.$handlePaste = function(e) {\n if (typeof e == \"string\") \n e = {text: e};\n this._signal(\"paste\", e);\n var text = e.text;\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {\n this.insert(text);\n } else {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var ranges = this.selection.rangeList.ranges;\n \n if (lines.length > ranges.length || lines.length < 2 || !lines[1])\n return this.commands.exec(\"insertstring\", this, text);\n \n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.isEmpty())\n this.session.remove(range);\n \n this.session.insert(range.start, lines[i]);\n }\n }\n };\n\n this.execCommand = function(command, args) {\n return this.commands.exec(command, this, args);\n };\n this.insert = function(text, pasted) {\n var session = this.session;\n var mode = session.getMode();\n var cursor = this.getCursorPosition();\n\n if (this.getBehavioursEnabled() && !pasted) {\n var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);\n if (transform) {\n if (text !== transform.text) {\n this.session.mergeUndoDeltas = false;\n this.$mergeNextCommand = false;\n }\n text = transform.text;\n\n }\n }\n \n if (text == \"\\t\")\n text = this.session.getTabString();\n if (!this.selection.isEmpty()) {\n var range = this.getSelectionRange();\n cursor = this.session.remove(range);\n this.clearSelection();\n }\n else if (this.session.getOverwrite() && text.indexOf(\"\\n\") == -1) {\n var range = new Range.fromPoints(cursor, cursor);\n range.end.column += text.length;\n this.session.remove(range);\n }\n\n if (text == \"\\n\" || text == \"\\r\\n\") {\n var line = session.getLine(cursor.row);\n if (cursor.column > line.search(/\\S|$/)) {\n var d = line.substr(cursor.column).search(/\\S|$/);\n session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);\n }\n }\n this.clearSelection();\n\n var start = cursor.column;\n var lineState = session.getState(cursor.row);\n var line = session.getLine(cursor.row);\n var shouldOutdent = mode.checkOutdent(lineState, line, text);\n var end = session.insert(cursor, text);\n\n if (transform && transform.selection) {\n if (transform.selection.length == 2) { // Transform relative to the current column\n this.selection.setSelectionRange(\n new Range(cursor.row, start + transform.selection[0],\n cursor.row, start + transform.selection[1]));\n } else { // Transform relative to the current row.\n this.selection.setSelectionRange(\n new Range(cursor.row + transform.selection[0],\n transform.selection[1],\n cursor.row + transform.selection[2],\n transform.selection[3]));\n }\n }\n\n if (session.getDocument().isNewLine(text)) {\n var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());\n\n session.insert({row: cursor.row+1, column: 0}, lineIndent);\n }\n if (shouldOutdent)\n mode.autoOutdent(lineState, session, cursor.row);\n };\n\n this.onTextInput = function(text) {\n this.keyBinding.onTextInput(text);\n };\n\n this.onCommandKey = function(e, hashId, keyCode) {\n this.keyBinding.onCommandKey(e, hashId, keyCode);\n };\n this.setOverwrite = function(overwrite) {\n this.session.setOverwrite(overwrite);\n };\n this.getOverwrite = function() {\n return this.session.getOverwrite();\n };\n this.toggleOverwrite = function() {\n this.session.toggleOverwrite();\n };\n this.setScrollSpeed = function(speed) {\n this.setOption(\"scrollSpeed\", speed);\n };\n this.getScrollSpeed = function() {\n return this.getOption(\"scrollSpeed\");\n };\n this.setDragDelay = function(dragDelay) {\n this.setOption(\"dragDelay\", dragDelay);\n };\n this.getDragDelay = function() {\n return this.getOption(\"dragDelay\");\n };\n this.setSelectionStyle = function(val) {\n this.setOption(\"selectionStyle\", val);\n };\n this.getSelectionStyle = function() {\n return this.getOption(\"selectionStyle\");\n };\n this.setHighlightActiveLine = function(shouldHighlight) {\n this.setOption(\"highlightActiveLine\", shouldHighlight);\n };\n this.getHighlightActiveLine = function() {\n return this.getOption(\"highlightActiveLine\");\n };\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n this.setHighlightSelectedWord = function(shouldHighlight) {\n this.setOption(\"highlightSelectedWord\", shouldHighlight);\n };\n this.getHighlightSelectedWord = function() {\n return this.$highlightSelectedWord;\n };\n\n this.setAnimatedScroll = function(shouldAnimate){\n this.renderer.setAnimatedScroll(shouldAnimate);\n };\n\n this.getAnimatedScroll = function(){\n return this.renderer.getAnimatedScroll();\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.renderer.setShowInvisibles(showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.renderer.getShowInvisibles();\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.renderer.setDisplayIndentGuides(display);\n };\n\n this.getDisplayIndentGuides = function() {\n return this.renderer.getDisplayIndentGuides();\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.renderer.setShowPrintMargin(showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.renderer.getShowPrintMargin();\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.renderer.setPrintMarginColumn(showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.renderer.getPrintMarginColumn();\n };\n this.setReadOnly = function(readOnly) {\n this.setOption(\"readOnly\", readOnly);\n };\n this.getReadOnly = function() {\n return this.getOption(\"readOnly\");\n };\n this.setBehavioursEnabled = function (enabled) {\n this.setOption(\"behavioursEnabled\", enabled);\n };\n this.getBehavioursEnabled = function () {\n return this.getOption(\"behavioursEnabled\");\n };\n this.setWrapBehavioursEnabled = function (enabled) {\n this.setOption(\"wrapBehavioursEnabled\", enabled);\n };\n this.getWrapBehavioursEnabled = function () {\n return this.getOption(\"wrapBehavioursEnabled\");\n };\n this.setShowFoldWidgets = function(show) {\n this.setOption(\"showFoldWidgets\", show);\n\n };\n this.getShowFoldWidgets = function() {\n return this.getOption(\"showFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function(fade) {\n this.setOption(\"fadeFoldWidgets\", fade);\n };\n\n this.getFadeFoldWidgets = function() {\n return this.getOption(\"fadeFoldWidgets\");\n };\n this.remove = function(dir) {\n if (this.selection.isEmpty()){\n if (dir == \"left\")\n this.selection.selectLeft();\n else\n this.selection.selectRight();\n }\n\n var range = this.getSelectionRange();\n if (this.getBehavioursEnabled()) {\n var session = this.session;\n var state = session.getState(range.start.row);\n var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);\n\n if (range.end.column === 0) {\n var text = session.getTextRange(range);\n if (text[text.length - 1] == \"\\n\") {\n var line = session.getLine(range.end.row);\n if (/^\\s+$/.test(line)) {\n range.end.column = line.length;\n }\n }\n }\n if (new_range)\n range = new_range;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.removeWordRight = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordRight();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeWordLeft = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordLeft();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineStart = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineStart();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineEnd = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineEnd();\n\n var range = this.getSelectionRange();\n if (range.start.column == range.end.column && range.start.row == range.end.row) {\n range.end.column = 0;\n range.end.row++;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.splitLine = function() {\n if (!this.selection.isEmpty()) {\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n }\n\n var cursor = this.getCursorPosition();\n this.insert(\"\\n\");\n this.moveCursorToPosition(cursor);\n };\n this.transposeLetters = function() {\n if (!this.selection.isEmpty()) {\n return;\n }\n\n var cursor = this.getCursorPosition();\n var column = cursor.column;\n if (column === 0)\n return;\n\n var line = this.session.getLine(cursor.row);\n var swap, range;\n if (column < line.length) {\n swap = line.charAt(column) + line.charAt(column-1);\n range = new Range(cursor.row, column-1, cursor.row, column+1);\n }\n else {\n swap = line.charAt(column-1) + line.charAt(column-2);\n range = new Range(cursor.row, column-2, cursor.row, column);\n }\n this.session.replace(range, swap);\n this.session.selection.moveToPosition(range.end);\n };\n this.toLowerCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toLowerCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.toUpperCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toUpperCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.indent = function() {\n var session = this.session;\n var range = this.getSelectionRange();\n\n if (range.start.row < range.end.row) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n } else if (range.start.column < range.end.column) {\n var text = session.getTextRange(range);\n if (!/^\\s+$/.test(text)) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n }\n \n var line = session.getLine(range.start.row);\n var position = range.start;\n var size = session.getTabSize();\n var column = session.documentToScreenColumn(position.row, position.column);\n\n if (this.session.getUseSoftTabs()) {\n var count = (size - column % size);\n var indentString = lang.stringRepeat(\" \", count);\n } else {\n var count = column % size;\n while (line[range.start.column - 1] == \" \" && count) {\n range.start.column--;\n count--;\n }\n this.selection.setSelectionRange(range);\n indentString = \"\\t\";\n }\n return this.insert(indentString);\n };\n this.blockIndent = function() {\n var rows = this.$getSelectedRows();\n this.session.indentRows(rows.first, rows.last, \"\\t\");\n };\n this.blockOutdent = function() {\n var selection = this.session.getSelection();\n this.session.outdentRows(selection.getRange());\n };\n this.sortLines = function() {\n var rows = this.$getSelectedRows();\n var session = this.session;\n\n var lines = [];\n for (var i = rows.first; i <= rows.last; i++)\n lines.push(session.getLine(i));\n\n lines.sort(function(a, b) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n if (a.toLowerCase() > b.toLowerCase()) return 1;\n return 0;\n });\n\n var deleteRange = new Range(0, 0, 0, 0);\n for (var i = rows.first; i <= rows.last; i++) {\n var line = session.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n deleteRange.end.column = line.length;\n session.replace(deleteRange, lines[i-rows.first]);\n }\n };\n this.toggleCommentLines = function() {\n var state = this.session.getState(this.getCursorPosition().row);\n var rows = this.$getSelectedRows();\n this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);\n };\n\n this.toggleBlockComment = function() {\n var cursor = this.getCursorPosition();\n var state = this.session.getState(cursor.row);\n var range = this.getSelectionRange();\n this.session.getMode().toggleBlockComment(state, this.session, range, cursor);\n };\n this.getNumberAt = function(row, column) {\n var _numberRx = /[\\-]?[0-9]+(?:\\.[0-9]+)?/g;\n _numberRx.lastIndex = 0;\n\n var s = this.session.getLine(row);\n while (_numberRx.lastIndex < column) {\n var m = _numberRx.exec(s);\n if(m.index <= column && m.index+m[0].length >= column){\n var number = {\n value: m[0],\n start: m.index,\n end: m.index+m[0].length\n };\n return number;\n }\n }\n return null;\n };\n this.modifyNumber = function(amount) {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n var charRange = new Range(row, column-1, row, column);\n\n var c = this.session.getTextRange(charRange);\n if (!isNaN(parseFloat(c)) && isFinite(c)) {\n var nr = this.getNumberAt(row, column);\n if (nr) {\n var fp = nr.value.indexOf(\".\") >= 0 ? nr.start + nr.value.indexOf(\".\") + 1 : nr.end;\n var decimals = nr.start + nr.value.length - fp;\n\n var t = parseFloat(nr.value);\n t *= Math.pow(10, decimals);\n\n\n if(fp !== nr.end && column < fp){\n amount *= Math.pow(10, nr.end - column - 1);\n } else {\n amount *= Math.pow(10, nr.end - column);\n }\n\n t += amount;\n t /= Math.pow(10, decimals);\n var nnr = t.toFixed(decimals);\n var replaceRange = new Range(row, nr.start, row, nr.end);\n this.session.replace(replaceRange, nnr);\n this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));\n\n }\n }\n };\n this.removeLines = function() {\n var rows = this.$getSelectedRows();\n this.session.removeFullLines(rows.first, rows.last);\n this.clearSelection();\n };\n\n this.duplicateSelection = function() {\n var sel = this.selection;\n var doc = this.session;\n var range = sel.getRange();\n var reverse = sel.isBackwards();\n if (range.isEmpty()) {\n var row = range.start.row;\n doc.duplicateLines(row, row);\n } else {\n var point = reverse ? range.start : range.end;\n var endPoint = doc.insert(point, doc.getTextRange(range), false);\n range.start = point;\n range.end = endPoint;\n\n sel.setSelectionRange(range, reverse);\n }\n };\n this.moveLinesDown = function() {\n this.$moveLines(1, false);\n };\n this.moveLinesUp = function() {\n this.$moveLines(-1, false);\n };\n this.moveText = function(range, toPosition, copy) {\n return this.session.moveText(range, toPosition, copy);\n };\n this.copyLinesUp = function() {\n this.$moveLines(-1, true);\n };\n this.copyLinesDown = function() {\n this.$moveLines(1, true);\n };\n this.$moveLines = function(dir, copy) {\n var rows, moved;\n var selection = this.selection;\n if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {\n var range = selection.toOrientedRange();\n rows = this.$getSelectedRows(range);\n moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);\n if (copy && dir == -1) moved = 0;\n range.moveBy(moved, 0);\n selection.fromOrientedRange(range);\n } else {\n var ranges = selection.rangeList.ranges;\n selection.rangeList.detach(this.session);\n this.inVirtualSelectionMode = true;\n \n var diff = 0;\n var totalDiff = 0;\n var l = ranges.length;\n for (var i = 0; i < l; i++) {\n var rangeIndex = i;\n ranges[i].moveBy(diff, 0);\n rows = this.$getSelectedRows(ranges[i]);\n var first = rows.first;\n var last = rows.last;\n while (++i < l) {\n if (totalDiff) ranges[i].moveBy(totalDiff, 0);\n var subRows = this.$getSelectedRows(ranges[i]);\n if (copy && subRows.first != last)\n break;\n else if (!copy && subRows.first > last + 1)\n break;\n last = subRows.last;\n }\n i--;\n diff = this.session.$moveLines(first, last, copy ? 0 : dir);\n if (copy && dir == -1) rangeIndex = i + 1;\n while (rangeIndex <= i) {\n ranges[rangeIndex].moveBy(diff, 0);\n rangeIndex++;\n }\n if (!copy) diff = 0;\n totalDiff += diff;\n }\n \n selection.fromOrientedRange(selection.ranges[0]);\n selection.rangeList.attach(this.session);\n this.inVirtualSelectionMode = false;\n }\n };\n this.$getSelectedRows = function(range) {\n range = (range || this.getSelectionRange()).collapseRows();\n\n return {\n first: this.session.getRowFoldStart(range.start.row),\n last: this.session.getRowFoldEnd(range.end.row)\n };\n };\n\n this.onCompositionStart = function(text) {\n this.renderer.showComposition(this.getCursorPosition());\n };\n\n this.onCompositionUpdate = function(text) {\n this.renderer.setCompositionText(text);\n };\n\n this.onCompositionEnd = function() {\n this.renderer.hideComposition();\n };\n this.getFirstVisibleRow = function() {\n return this.renderer.getFirstVisibleRow();\n };\n this.getLastVisibleRow = function() {\n return this.renderer.getLastVisibleRow();\n };\n this.isRowVisible = function(row) {\n return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());\n };\n this.isRowFullyVisible = function(row) {\n return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());\n };\n this.$getVisibleRowCount = function() {\n return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;\n };\n\n this.$moveByPage = function(dir, select) {\n var renderer = this.renderer;\n var config = this.renderer.layerConfig;\n var rows = dir * Math.floor(config.height / config.lineHeight);\n\n this.$blockScrolling++;\n if (select === true) {\n this.selection.$moveSelection(function(){\n this.moveCursorBy(rows, 0);\n });\n } else if (select === false) {\n this.selection.moveCursorBy(rows, 0);\n this.selection.clearSelection();\n }\n this.$blockScrolling--;\n\n var scrollTop = renderer.scrollTop;\n\n renderer.scrollBy(0, rows * config.lineHeight);\n if (select != null)\n renderer.scrollCursorIntoView(null, 0.5);\n\n renderer.animateScrolling(scrollTop);\n };\n this.selectPageDown = function() {\n this.$moveByPage(1, true);\n };\n this.selectPageUp = function() {\n this.$moveByPage(-1, true);\n };\n this.gotoPageDown = function() {\n this.$moveByPage(1, false);\n };\n this.gotoPageUp = function() {\n this.$moveByPage(-1, false);\n };\n this.scrollPageDown = function() {\n this.$moveByPage(1);\n };\n this.scrollPageUp = function() {\n this.$moveByPage(-1);\n };\n this.scrollToRow = function(row) {\n this.renderer.scrollToRow(row);\n };\n this.scrollToLine = function(line, center, animate, callback) {\n this.renderer.scrollToLine(line, center, animate, callback);\n };\n this.centerSelection = function() {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n };\n this.getCursorPosition = function() {\n return this.selection.getCursor();\n };\n this.getCursorPositionScreen = function() {\n return this.session.documentToScreenPosition(this.getCursorPosition());\n };\n this.getSelectionRange = function() {\n return this.selection.getRange();\n };\n this.selectAll = function() {\n this.$blockScrolling += 1;\n this.selection.selectAll();\n this.$blockScrolling -= 1;\n };\n this.clearSelection = function() {\n this.selection.clearSelection();\n };\n this.moveCursorTo = function(row, column) {\n this.selection.moveCursorTo(row, column);\n };\n this.moveCursorToPosition = function(pos) {\n this.selection.moveCursorToPosition(pos);\n };\n this.jumpToMatching = function(select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var token = prevToken || iterator.stepForward();\n\n if (!token) return;\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n \n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n break;\n }\n }\n }\n else if (token && token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n \n if (prevToken.value === '<') {\n depth[token.value]++;\n }\n else if (prevToken.value === '= 0; --i) {\n if(this.$tryReplace(ranges[i], replacement)) {\n replaced++;\n }\n }\n\n this.selection.setSelectionRange(selection);\n this.$blockScrolling -= 1;\n\n return replaced;\n };\n\n this.$tryReplace = function(range, replacement) {\n var input = this.session.getTextRange(range);\n replacement = this.$search.replace(input, replacement);\n if (replacement !== null) {\n range.end = this.session.replace(range, replacement);\n return range;\n } else {\n return null;\n }\n };\n this.getLastSearchOptions = function() {\n return this.$search.getOptions();\n };\n this.find = function(needle, options, animate) {\n if (!options)\n options = {};\n\n if (typeof needle == \"string\" || needle instanceof RegExp)\n options.needle = needle;\n else if (typeof needle == \"object\")\n oop.mixin(options, needle);\n\n var range = this.selection.getRange();\n if (options.needle == null) {\n needle = this.session.getTextRange(range)\n || this.$search.$options.needle;\n if (!needle) {\n range = this.session.getWordRange(range.start.row, range.start.column);\n needle = this.session.getTextRange(range);\n }\n this.$search.set({needle: needle});\n }\n\n this.$search.set(options);\n if (!options.start)\n this.$search.set({start: range});\n\n var newRange = this.$search.find(this.session);\n if (options.preventScroll)\n return newRange;\n if (newRange) {\n this.revealRange(newRange, animate);\n return newRange;\n }\n if (options.backwards)\n range.start = range.end;\n else\n range.end = range.start;\n this.selection.setRange(range);\n };\n this.findNext = function(options, animate) {\n this.find({skipCurrent: true, backwards: false}, options, animate);\n };\n this.findPrevious = function(options, animate) {\n this.find(options, {skipCurrent: true, backwards: true}, animate);\n };\n\n this.revealRange = function(range, animate) {\n this.$blockScrolling += 1;\n this.session.unfold(range);\n this.selection.setSelectionRange(range);\n this.$blockScrolling -= 1;\n\n var scrollTop = this.renderer.scrollTop;\n this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);\n if (animate !== false)\n this.renderer.animateScrolling(scrollTop);\n };\n this.undo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().undo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.redo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().redo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.destroy = function() {\n this.renderer.destroy();\n this._signal(\"destroy\", this);\n if (this.session) {\n this.session.destroy();\n }\n };\n this.setAutoScrollEditorIntoView = function(enable) {\n if (!enable)\n return;\n var rect;\n var self = this;\n var shouldScroll = false;\n if (!this.$scrollAnchor)\n this.$scrollAnchor = document.createElement(\"div\");\n var scrollAnchor = this.$scrollAnchor;\n scrollAnchor.style.cssText = \"position:absolute\";\n this.container.insertBefore(scrollAnchor, this.container.firstChild);\n var onChangeSelection = this.on(\"changeSelection\", function() {\n shouldScroll = true;\n });\n var onBeforeRender = this.renderer.on(\"beforeRender\", function() {\n if (shouldScroll)\n rect = self.renderer.container.getBoundingClientRect();\n });\n var onAfterRender = this.renderer.on(\"afterRender\", function() {\n if (shouldScroll && rect && (self.isFocused()\n || self.searchBox && self.searchBox.isFocused())\n ) {\n var renderer = self.renderer;\n var pos = renderer.$cursorLayer.$pixelPos;\n var config = renderer.layerConfig;\n var top = pos.top - config.offset;\n if (pos.top >= 0 && top + rect.top < 0) {\n shouldScroll = true;\n } else if (pos.top < config.height &&\n pos.top + rect.top + config.lineHeight > window.innerHeight) {\n shouldScroll = false;\n } else {\n shouldScroll = null;\n }\n if (shouldScroll != null) {\n scrollAnchor.style.top = top + \"px\";\n scrollAnchor.style.left = pos.left + \"px\";\n scrollAnchor.style.height = config.lineHeight + \"px\";\n scrollAnchor.scrollIntoView(shouldScroll);\n }\n shouldScroll = rect = null;\n }\n });\n this.setAutoScrollEditorIntoView = function(enable) {\n if (enable)\n return;\n delete this.setAutoScrollEditorIntoView;\n this.off(\"changeSelection\", onChangeSelection);\n this.renderer.off(\"afterRender\", onAfterRender);\n this.renderer.off(\"beforeRender\", onBeforeRender);\n };\n };\n\n\n this.$resetCursorStyle = function() {\n var style = this.$cursorStyle || \"ace\";\n var cursorLayer = this.renderer.$cursorLayer;\n if (!cursorLayer)\n return;\n cursorLayer.setSmoothBlinking(/smooth/.test(style));\n cursorLayer.isBlinking = !this.$readOnly && style != \"wide\";\n dom.setCssClass(cursorLayer.element, \"ace_slim-cursors\", /slim/.test(style));\n };\n\n}).call(Editor.prototype);\n\n\n\nconfig.defineOptions(Editor.prototype, \"editor\", {\n selectionStyle: {\n set: function(style) {\n this.onSelectionChange();\n this._signal(\"changeSelectionStyle\", {data: style});\n },\n initialValue: \"line\"\n },\n highlightActiveLine: {\n set: function() {this.$updateHighlightActiveLine();},\n initialValue: true\n },\n highlightSelectedWord: {\n set: function(shouldHighlight) {this.$onSelectionChange();},\n initialValue: true\n },\n readOnly: {\n set: function(readOnly) {\n this.$resetCursorStyle(); \n },\n initialValue: false\n },\n cursorStyle: {\n set: function(val) { this.$resetCursorStyle(); },\n values: [\"ace\", \"slim\", \"smooth\", \"wide\"],\n initialValue: \"ace\"\n },\n mergeUndoDeltas: {\n values: [false, true, \"always\"],\n initialValue: true\n },\n behavioursEnabled: {initialValue: true},\n wrapBehavioursEnabled: {initialValue: true},\n autoScrollEditorIntoView: {\n set: function(val) {this.setAutoScrollEditorIntoView(val);}\n },\n keyboardHandler: {\n set: function(val) { this.setKeyboardHandler(val); },\n get: function() { return this.keybindingId; },\n handlesSet: true\n },\n\n hScrollBarAlwaysVisible: \"renderer\",\n vScrollBarAlwaysVisible: \"renderer\",\n highlightGutterLine: \"renderer\",\n animatedScroll: \"renderer\",\n showInvisibles: \"renderer\",\n showPrintMargin: \"renderer\",\n printMarginColumn: \"renderer\",\n printMargin: \"renderer\",\n fadeFoldWidgets: \"renderer\",\n showFoldWidgets: \"renderer\",\n showLineNumbers: \"renderer\",\n showGutter: \"renderer\",\n displayIndentGuides: \"renderer\",\n fontSize: \"renderer\",\n fontFamily: \"renderer\",\n maxLines: \"renderer\",\n minLines: \"renderer\",\n scrollPastEnd: \"renderer\",\n fixedWidthGutter: \"renderer\",\n theme: \"renderer\",\n\n scrollSpeed: \"$mouseHandler\",\n dragDelay: \"$mouseHandler\",\n dragEnabled: \"$mouseHandler\",\n focusTimout: \"$mouseHandler\",\n tooltipFollowsMouse: \"$mouseHandler\",\n\n firstLineNumber: \"session\",\n overwrite: \"session\",\n newLineMode: \"session\",\n useWorker: \"session\",\n useSoftTabs: \"session\",\n tabSize: \"session\",\n wrap: \"session\",\n indentedSoftWrap: \"session\",\n foldStyle: \"session\",\n mode: \"session\"\n});\n\nexports.Editor = Editor;\n});\n\nace.define(\"ace/undomanager\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar UndoManager = function() {\n this.reset();\n};\n\n(function() {\n this.execute = function(options) {\n var deltaSets = options.args[0];\n this.$doc = options.args[1];\n if (options.merge && this.hasUndo()){\n this.dirtyCounter--;\n deltaSets = this.$undoStack.pop().concat(deltaSets);\n }\n this.$undoStack.push(deltaSets);\n this.$redoStack = [];\n if (this.dirtyCounter < 0) {\n this.dirtyCounter = NaN;\n }\n this.dirtyCounter++;\n };\n this.undo = function(dontSelect) {\n var deltaSets = this.$undoStack.pop();\n var undoSelectionRange = null;\n if (deltaSets) {\n undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect);\n this.$redoStack.push(deltaSets);\n this.dirtyCounter--;\n }\n\n return undoSelectionRange;\n };\n this.redo = function(dontSelect) {\n var deltaSets = this.$redoStack.pop();\n var redoSelectionRange = null;\n if (deltaSets) {\n redoSelectionRange =\n this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect);\n this.$undoStack.push(deltaSets);\n this.dirtyCounter++;\n }\n return redoSelectionRange;\n };\n this.reset = function() {\n this.$undoStack = [];\n this.$redoStack = [];\n this.dirtyCounter = 0;\n };\n this.hasUndo = function() {\n return this.$undoStack.length > 0;\n };\n this.hasRedo = function() {\n return this.$redoStack.length > 0;\n };\n this.markClean = function() {\n this.dirtyCounter = 0;\n };\n this.isClean = function() {\n return this.dirtyCounter === 0;\n };\n this.$serializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $serializeDelta);\n };\n this.$deserializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $deserializeDelta);\n };\n \n function $serializeDelta(delta){\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines.length == 1 ? null : delta.lines,\n text: delta.lines.length == 1 ? delta.lines[0] : null\n };\n }\n \n function $deserializeDelta(delta) {\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines || [delta.text]\n };\n }\n \n function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) {\n var deltaSets_new = new Array(deltaSets_old.length);\n for (var i = 0; i < deltaSets_old.length; i++) {\n var deltaSet_old = deltaSets_old[i];\n var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)};\n \n for (var j = 0; j < deltaSet_old.deltas.length; j++) {\n var delta_old = deltaSet_old.deltas[j];\n deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old);\n }\n \n deltaSets_new[i] = deltaSet_new;\n }\n return deltaSets_new;\n }\n \n}).call(UndoManager.prototype);\n\nexports.UndoManager = UndoManager;\n});\n\nace.define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Gutter = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_gutter-layer\";\n parentEl.appendChild(this.element);\n this.setShowFoldWidgets(this.$showFoldWidgets);\n \n this.gutterWidth = 0;\n\n this.$annotations = [];\n this.$updateAnnotations = this.$updateAnnotations.bind(this);\n\n this.$cells = [];\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.setSession = function(session) {\n if (this.session)\n this.session.removeEventListener(\"change\", this.$updateAnnotations);\n this.session = session;\n if (session)\n session.on(\"change\", this.$updateAnnotations);\n };\n\n this.addGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.addGutterDecoration\");\n this.session.addGutterDecoration(row, className);\n };\n\n this.removeGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.removeGutterDecoration\");\n this.session.removeGutterDecoration(row, className);\n };\n\n this.setAnnotations = function(annotations) {\n this.$annotations = [];\n for (var i = 0; i < annotations.length; i++) {\n var annotation = annotations[i];\n var row = annotation.row;\n var rowInfo = this.$annotations[row];\n if (!rowInfo)\n rowInfo = this.$annotations[row] = {text: []};\n \n var annoText = annotation.text;\n annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || \"\";\n\n if (rowInfo.text.indexOf(annoText) === -1)\n rowInfo.text.push(annoText);\n\n var type = annotation.type;\n if (type == \"error\")\n rowInfo.className = \" ace_error\";\n else if (type == \"warning\" && rowInfo.className != \" ace_error\")\n rowInfo.className = \" ace_warning\";\n else if (type == \"info\" && (!rowInfo.className))\n rowInfo.className = \" ace_info\";\n }\n };\n\n this.$updateAnnotations = function (delta) {\n if (!this.$annotations.length)\n return;\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n } else if (delta.action == 'remove') {\n this.$annotations.splice(firstRow, len + 1, null);\n } else {\n var args = new Array(len + 1);\n args.unshift(firstRow, 1);\n this.$annotations.splice.apply(this.$annotations, args);\n }\n };\n\n this.update = function(config) {\n var session = this.session;\n var firstRow = config.firstRow;\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n session.getLength() - 1);\n var fold = session.getNextFoldLine(firstRow);\n var foldStart = fold ? fold.start.row : Infinity;\n var foldWidgets = this.$showFoldWidgets && session.foldWidgets;\n var breakpoints = session.$breakpoints;\n var decorations = session.$decorations;\n var firstLineNumber = session.$firstLineNumber;\n var lastLineNumber = 0;\n \n var gutterRenderer = session.gutterRenderer || this.$renderer;\n\n var cell = null;\n var index = -1;\n var row = firstRow;\n while (true) {\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = session.getNextFoldLine(row, fold);\n foldStart = fold ? fold.start.row : Infinity;\n }\n if (row > lastRow) {\n while (this.$cells.length > index + 1) {\n cell = this.$cells.pop();\n this.element.removeChild(cell.element);\n }\n break;\n }\n\n cell = this.$cells[++index];\n if (!cell) {\n cell = {element: null, textNode: null, foldWidget: null};\n cell.element = dom.createElement(\"div\");\n cell.textNode = document.createTextNode('');\n cell.element.appendChild(cell.textNode);\n this.element.appendChild(cell.element);\n this.$cells[index] = cell;\n }\n\n var className = \"ace_gutter-cell \";\n if (breakpoints[row])\n className += breakpoints[row];\n if (decorations[row])\n className += decorations[row];\n if (this.$annotations[row])\n className += this.$annotations[row].className;\n if (cell.element.className != className)\n cell.element.className = className;\n\n var height = session.getRowLength(row) * config.lineHeight + \"px\";\n if (height != cell.element.style.height)\n cell.element.style.height = height;\n\n if (foldWidgets) {\n var c = foldWidgets[row];\n if (c == null)\n c = foldWidgets[row] = session.getFoldWidget(row);\n }\n\n if (c) {\n if (!cell.foldWidget) {\n cell.foldWidget = dom.createElement(\"span\");\n cell.element.appendChild(cell.foldWidget);\n }\n var className = \"ace_fold-widget ace_\" + c;\n if (c == \"start\" && row == foldStart && row < fold.end.row)\n className += \" ace_closed\";\n else\n className += \" ace_open\";\n if (cell.foldWidget.className != className)\n cell.foldWidget.className = className;\n\n var height = config.lineHeight + \"px\";\n if (cell.foldWidget.style.height != height)\n cell.foldWidget.style.height = height;\n } else {\n if (cell.foldWidget) {\n cell.element.removeChild(cell.foldWidget);\n cell.foldWidget = null;\n }\n }\n \n var text = lastLineNumber = gutterRenderer\n ? gutterRenderer.getText(session, row)\n : row + firstLineNumber;\n if (text !== cell.textNode.data)\n cell.textNode.data = text;\n\n row++;\n }\n\n this.element.style.height = config.minHeight + \"px\";\n\n if (this.$fixedWidth || session.$useWrapMode)\n lastLineNumber = session.getLength() + firstLineNumber;\n\n var gutterWidth = gutterRenderer \n ? gutterRenderer.getWidth(session, lastLineNumber, config)\n : lastLineNumber.toString().length * config.characterWidth;\n \n var padding = this.$padding || this.$computePadding();\n gutterWidth += padding.left + padding.right;\n if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {\n this.gutterWidth = gutterWidth;\n this.element.style.width = Math.ceil(this.gutterWidth) + \"px\";\n this._emit(\"changeGutterWidth\", gutterWidth);\n }\n };\n\n this.$fixedWidth = false;\n \n this.$showLineNumbers = true;\n this.$renderer = \"\";\n this.setShowLineNumbers = function(show) {\n this.$renderer = !show && {\n getWidth: function() {return \"\";},\n getText: function() {return \"\";}\n };\n };\n \n this.getShowLineNumbers = function() {\n return this.$showLineNumbers;\n };\n \n this.$showFoldWidgets = true;\n this.setShowFoldWidgets = function(show) {\n if (show)\n dom.addCssClass(this.element, \"ace_folding-enabled\");\n else\n dom.removeCssClass(this.element, \"ace_folding-enabled\");\n\n this.$showFoldWidgets = show;\n this.$padding = null;\n };\n \n this.getShowFoldWidgets = function() {\n return this.$showFoldWidgets;\n };\n\n this.$computePadding = function() {\n if (!this.element.firstChild)\n return {left: 0, right: 0};\n var style = dom.computedStyle(this.element.firstChild);\n this.$padding = {};\n this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;\n this.$padding.right = parseInt(style.paddingRight) || 0;\n return this.$padding;\n };\n\n this.getRegion = function(point) {\n var padding = this.$padding || this.$computePadding();\n var rect = this.element.getBoundingClientRect();\n if (point.x < padding.left + rect.left)\n return \"markers\";\n if (this.$showFoldWidgets && point.x > rect.right - padding.right)\n return \"foldWidgets\";\n };\n\n}).call(Gutter.prototype);\n\nexports.Gutter = Gutter;\n\n});\n\nace.define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar dom = acequire(\"../lib/dom\");\n\nvar Marker = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_marker-layer\";\n parentEl.appendChild(this.element);\n};\n\n(function() {\n\n this.$padding = 0;\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n this.setSession = function(session) {\n this.session = session;\n };\n \n this.setMarkers = function(markers) {\n this.markers = markers;\n };\n\n this.update = function(config) {\n if (!config) return;\n\n this.config = config;\n\n\n var html = [];\n for (var key in this.markers) {\n var marker = this.markers[key];\n\n if (!marker.range) {\n marker.update(html, this, this.session, config);\n continue;\n }\n\n var range = marker.range.clipRows(config.firstRow, config.lastRow);\n if (range.isEmpty()) continue;\n\n range = range.toScreenRange(this.session);\n if (marker.renderer) {\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + (this.session.$bidiHandler.isBidiRow(range.start.row)\n ? this.session.$bidiHandler.getPosLeft(range.start.column)\n : range.start.column * config.characterWidth);\n marker.renderer(html, range, left, top, config);\n } else if (marker.type == \"fullLine\") {\n this.drawFullLineMarker(html, range, marker.clazz, config);\n } else if (marker.type == \"screenLine\") {\n this.drawScreenLineMarker(html, range, marker.clazz, config);\n } else if (range.isMultiLine()) {\n if (marker.type == \"text\")\n this.drawTextMarker(html, range, marker.clazz, config);\n else\n this.drawMultiLineMarker(html, range, marker.clazz, config);\n } else {\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n this.drawBidiSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n } else {\n this.drawSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n }\n }\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$getTop = function(row, layerConfig) {\n return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;\n };\n\n function getBorderClass(tl, tr, br, bl) {\n return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);\n }\n this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {\n var session = this.session;\n var start = range.start.row;\n var end = range.end.row;\n var row = start;\n var prev = 0; \n var curr = 0;\n var next = session.getScreenLastRowColumn(row);\n var clazzModified = null;\n var lineRange = new Range(row, range.start.column, row, curr);\n for (; row <= end; row++) {\n lineRange.start.row = lineRange.end.row = row;\n lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);\n lineRange.end.column = next;\n prev = curr;\n curr = next;\n next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;\n clazzModified = clazz + (row == start ? \" ace_start\" : \"\") + \" ace_br\"\n + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end);\n\n if (this.session.$bidiHandler.isBidiRow(row)) {\n this.drawBidiSingleLineMarker(stringBuilder, lineRange, clazzModified,\n layerConfig, row == end ? 0 : 1, extraStyle);\n } else {\n this.drawSingleLineMarker(stringBuilder, lineRange, clazzModified,\n layerConfig, row == end ? 0 : 1, extraStyle);\n }\n }\n };\n this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var padding = this.$padding;\n var height, top, left;\n extraStyle = extraStyle || \"\";\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n var range1 = range.clone();\n range1.end.row = range1.start.row;\n range1.end.column = this.session.getLine(range1.start.row).length;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br1 ace_start\", config, null, extraStyle);\n } else {\n height = config.lineHeight;\n top = this.$getTop(range.start.row, config);\n left = padding + range.start.column * config.characterWidth;\n stringBuilder.push(\n \"
    \"\n );\n }\n if (this.session.$bidiHandler.isBidiRow(range.end.row)) {\n var range1 = range.clone();\n range1.start.row = range1.end.row;\n range1.start.column = 0;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br12\", config, null, extraStyle);\n } else {\n var width = range.end.column * config.characterWidth;\n height = config.lineHeight;\n top = this.$getTop(range.end.row, config);\n stringBuilder.push(\n \"
    \"\n );\n }\n height = (range.end.row - range.start.row - 1) * config.lineHeight;\n if (height <= 0)\n return;\n top = this.$getTop(range.start.row + 1, config);\n \n var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);\n\n stringBuilder.push(\n \"
    \"\n );\n };\n this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight;\n var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;\n\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n this.drawBidiSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding;\n var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column);\n\n selections.forEach(function(selection) {\n stringBuilder.push(\n \"
    \"\n );\n });\n };\n\n this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n if (range.start.row != range.end.row)\n height += this.$getTop(range.end.row, config) - top;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n \n this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n\n}).call(Marker.prototype);\n\nexports.Marker = Marker;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Text = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_text-layer\";\n parentEl.appendChild(this.element);\n this.$updateEolChar = this.$updateEolChar.bind(this);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.EOF_CHAR = \"\\xB6\";\n this.EOL_CHAR_LF = \"\\xAC\";\n this.EOL_CHAR_CRLF = \"\\xa4\";\n this.EOL_CHAR = this.EOL_CHAR_LF;\n this.TAB_CHAR = \"\\u2014\"; //\"\\u21E5\";\n this.SPACE_CHAR = \"\\xB7\";\n this.$padding = 0;\n\n this.$updateEolChar = function() {\n var EOL_CHAR = this.session.doc.getNewLineCharacter() == \"\\n\"\n ? this.EOL_CHAR_LF\n : this.EOL_CHAR_CRLF;\n if (this.EOL_CHAR != EOL_CHAR) {\n this.EOL_CHAR = EOL_CHAR;\n return true;\n }\n };\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.element.style.padding = \"0 \" + padding + \"px\";\n };\n\n this.getLineHeight = function() {\n return this.$fontMetrics.$characterSize.height || 0;\n };\n\n this.getCharacterWidth = function() {\n return this.$fontMetrics.$characterSize.width || 0;\n };\n \n this.$setFontMetrics = function(measure) {\n this.$fontMetrics = measure;\n this.$fontMetrics.on(\"changeCharacterSize\", function(e) {\n this._signal(\"changeCharacterSize\", e);\n }.bind(this));\n this.$pollSizeChanges();\n };\n\n this.checkForSizeChanges = function() {\n this.$fontMetrics.checkForSizeChanges();\n };\n this.$pollSizeChanges = function() {\n return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();\n };\n this.setSession = function(session) {\n this.session = session;\n if (session)\n this.$computeTabString();\n };\n\n this.showInvisibles = false;\n this.setShowInvisibles = function(showInvisibles) {\n if (this.showInvisibles == showInvisibles)\n return false;\n\n this.showInvisibles = showInvisibles;\n this.$computeTabString();\n return true;\n };\n\n this.displayIndentGuides = true;\n this.setDisplayIndentGuides = function(display) {\n if (this.displayIndentGuides == display)\n return false;\n\n this.displayIndentGuides = display;\n this.$computeTabString();\n return true;\n };\n\n this.$tabStrings = [];\n this.onChangeTabSize =\n this.$computeTabString = function() {\n var tabSize = this.session.getTabSize();\n this.tabSize = tabSize;\n var tabStr = this.$tabStrings = [0];\n for (var i = 1; i < tabSize + 1; i++) {\n if (this.showInvisibles) {\n tabStr.push(\"\"\n + lang.stringRepeat(this.TAB_CHAR, i)\n + \"\");\n } else {\n tabStr.push(lang.stringRepeat(\" \", i));\n }\n }\n if (this.displayIndentGuides) {\n this.$indentGuideRe = /\\s\\S| \\t|\\t |\\s$/;\n var className = \"ace_indent-guide\";\n var spaceClass = \"\";\n var tabClass = \"\";\n if (this.showInvisibles) {\n className += \" ace_invisible\";\n spaceClass = \" ace_invisible_space\";\n tabClass = \" ace_invisible_tab\";\n var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);\n var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize);\n } else{\n var spaceContent = lang.stringRepeat(\" \", this.tabSize);\n var tabContent = spaceContent;\n }\n\n this.$tabStrings[\" \"] = \"\" + spaceContent + \"\";\n this.$tabStrings[\"\\t\"] = \"\" + tabContent + \"\";\n }\n };\n\n this.updateLines = function(config, firstRow, lastRow) {\n if (this.config.lastRow != config.lastRow ||\n this.config.firstRow != config.firstRow) {\n this.scrollLines(config);\n }\n this.config = config;\n\n var first = Math.max(firstRow, config.firstRow);\n var last = Math.min(lastRow, config.lastRow);\n\n var lineElements = this.element.childNodes;\n var lineElementsIdx = 0;\n\n for (var row = config.firstRow; row < first; row++) {\n var foldLine = this.session.getFoldLine(row);\n if (foldLine) {\n if (foldLine.containsRow(first)) {\n first = foldLine.start.row;\n break;\n } else {\n row = foldLine.end.row;\n }\n }\n lineElementsIdx ++;\n }\n\n var row = first;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > last)\n break;\n\n var lineElement = lineElements[lineElementsIdx++];\n if (lineElement) {\n var html = [];\n this.$renderLine(\n html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false\n );\n lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n lineElement.innerHTML = html.join(\"\");\n }\n row++;\n }\n };\n\n this.scrollLines = function(config) {\n var oldConfig = this.config;\n this.config = config;\n\n if (!oldConfig || oldConfig.lastRow < config.firstRow)\n return this.update(config);\n\n if (config.lastRow < oldConfig.firstRow)\n return this.update(config);\n\n var el = this.element;\n if (oldConfig.firstRow < config.firstRow)\n for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)\n el.removeChild(el.firstChild);\n\n if (oldConfig.lastRow > config.lastRow)\n for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)\n el.removeChild(el.lastChild);\n\n if (config.firstRow < oldConfig.firstRow) {\n var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);\n if (el.firstChild)\n el.insertBefore(fragment, el.firstChild);\n else\n el.appendChild(fragment);\n }\n\n if (config.lastRow > oldConfig.lastRow) {\n var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);\n el.appendChild(fragment);\n }\n };\n\n this.$renderLinesFragment = function(config, firstRow, lastRow) {\n var fragment = this.element.ownerDocument.createDocumentFragment();\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n\n var container = dom.createElement(\"div\");\n\n var html = [];\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n container.innerHTML = html.join(\"\");\n if (this.$useLineGroups()) {\n container.className = 'ace_line_group';\n fragment.appendChild(container);\n container.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n\n } else {\n while(container.firstChild)\n fragment.appendChild(container.firstChild);\n }\n\n row++;\n }\n return fragment;\n };\n\n this.update = function(config) {\n this.config = config;\n\n var html = [];\n var firstRow = config.firstRow, lastRow = config.lastRow;\n\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > lastRow)\n break;\n\n if (this.$useLineGroups())\n html.push(\"
    \");\n\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n\n if (this.$useLineGroups())\n html.push(\"
    \"); // end the line group\n\n row++;\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$textToken = {\n \"text\": true,\n \"rparen\": true,\n \"lparen\": true\n };\n\n this.$renderToken = function(stringBuilder, screenColumn, token, value) {\n var self = this;\n var replaceReg = /\\t|&|<|>|( +)|([\\x00-\\x1f\\x80-\\xa0\\xad\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\\uFFF9-\\uFFFC])|[\\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]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n var replaceFunc = function(c, a, b, tabIdx, idx4) {\n if (a) {\n return self.showInvisibles\n ? \"\" + lang.stringRepeat(self.SPACE_CHAR, c.length) + \"\"\n : c;\n } else if (c == \"&\") {\n return \"&\";\n } else if (c == \"<\") {\n return \"<\";\n } else if (c == \">\") {\n return \">\";\n } else if (c == \"\\t\") {\n var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);\n screenColumn += tabSize - 1;\n return self.$tabStrings[tabSize];\n } else if (c == \"\\u3000\") {\n var classToUse = self.showInvisibles ? \"ace_cjk ace_invisible ace_invisible_space\" : \"ace_cjk\";\n var space = self.showInvisibles ? self.SPACE_CHAR : \"\";\n screenColumn += 1;\n return \"\" + space + \"\";\n } else if (b) {\n return \"\" + self.SPACE_CHAR + \"\";\n } else {\n screenColumn += 1;\n return \"\" + c + \"\";\n }\n };\n\n var output = value.replace(replaceReg, replaceFunc);\n\n if (!this.$textToken[token.type]) {\n var classes = \"ace_\" + token.type.replace(/\\./g, \" ace_\");\n var style = \"\";\n if (token.type == \"fold\")\n style = \" style='width:\" + (token.value.length * this.config.characterWidth) + \"px;' \";\n stringBuilder.push(\"\", output, \"\");\n }\n else {\n stringBuilder.push(output);\n }\n return screenColumn + value.length;\n };\n\n this.renderIndentGuide = function(stringBuilder, value, max) {\n var cols = value.search(this.$indentGuideRe);\n if (cols <= 0 || cols >= max)\n return value;\n if (value[0] == \" \") {\n cols -= cols % this.tabSize;\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\" \"], cols/this.tabSize));\n return value.substr(cols);\n } else if (value[0] == \"\\t\") {\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\"\\t\"], cols));\n return value.substr(cols);\n }\n return value;\n };\n\n this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {\n var chars = 0;\n var split = 0;\n var splitChars = splits[0];\n var screenColumn = 0;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n chars = value.length;\n value = this.renderIndentGuide(stringBuilder, value, splitChars);\n if (!value)\n continue;\n chars -= value.length;\n }\n\n if (chars + value.length < splitChars) {\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n chars += value.length;\n } else {\n while (chars + value.length >= splitChars) {\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn,\n token, value.substring(0, splitChars - chars)\n );\n value = value.substring(splitChars - chars);\n chars = splitChars;\n\n if (!onlyContents) {\n stringBuilder.push(\"
    \",\n \"
    \"\n );\n }\n\n stringBuilder.push(lang.stringRepeat(\"\\xa0\", splits.indent));\n\n split ++;\n screenColumn = 0;\n splitChars = splits[split] || Number.MAX_VALUE;\n }\n if (value.length != 0) {\n chars += value.length;\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn, token, value\n );\n }\n }\n }\n };\n\n this.$renderSimpleLine = function(stringBuilder, tokens) {\n var screenColumn = 0;\n var token = tokens[0];\n var value = token.value;\n if (this.displayIndentGuides)\n value = this.renderIndentGuide(stringBuilder, value);\n if (value)\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n for (var i = 1; i < tokens.length; i++) {\n token = tokens[i];\n value = token.value;\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n }\n };\n this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {\n if (!foldLine && foldLine != false)\n foldLine = this.session.getFoldLine(row);\n\n if (foldLine)\n var tokens = this.$getFoldLineTokens(row, foldLine);\n else\n var tokens = this.session.getTokens(row);\n\n\n if (!onlyContents) {\n stringBuilder.push(\n \"
    \"\n );\n }\n\n if (tokens.length) {\n var splits = this.session.getRowSplitData(row);\n if (splits && splits.length)\n this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);\n else\n this.$renderSimpleLine(stringBuilder, tokens);\n }\n\n if (this.showInvisibles) {\n if (foldLine)\n row = foldLine.end.row;\n\n stringBuilder.push(\n \"\",\n row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,\n \"\"\n );\n }\n if (!onlyContents)\n stringBuilder.push(\"
    \");\n };\n\n this.$getFoldLineTokens = function(row, foldLine) {\n var session = this.session;\n var renderTokens = [];\n\n function addTokens(tokens, from, to) {\n var idx = 0, col = 0;\n while ((col + tokens[idx].value.length) < from) {\n col += tokens[idx].value.length;\n idx++;\n\n if (idx == tokens.length)\n return;\n }\n if (col != from) {\n var value = tokens[idx].value.substring(from - col);\n if (value.length > (to - from))\n value = value.substring(0, to - from);\n\n renderTokens.push({\n type: tokens[idx].type,\n value: value\n });\n\n col = from + value.length;\n idx += 1;\n }\n\n while (col < to && idx < tokens.length) {\n var value = tokens[idx].value;\n if (value.length + col > to) {\n renderTokens.push({\n type: tokens[idx].type,\n value: value.substring(0, to - col)\n });\n } else\n renderTokens.push(tokens[idx]);\n col += value.length;\n idx += 1;\n }\n }\n\n var tokens = session.getTokens(row);\n foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {\n if (placeholder != null) {\n renderTokens.push({\n type: \"fold\",\n value: placeholder\n });\n } else {\n if (isNewRow)\n tokens = session.getTokens(row);\n\n if (tokens.length)\n addTokens(tokens, lastColumn, column);\n }\n }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);\n\n return renderTokens;\n };\n\n this.$useLineGroups = function() {\n return this.session.getUseWrapMode();\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.$measureNode)\n this.$measureNode.parentNode.removeChild(this.$measureNode);\n delete this.$measureNode;\n };\n\n}).call(Text.prototype);\n\nexports.Text = Text;\n\n});\n\nace.define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar isIE8;\n\nvar Cursor = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_cursor-layer\";\n parentEl.appendChild(this.element);\n \n if (isIE8 === undefined)\n isIE8 = !(\"opacity\" in this.element.style);\n\n this.isVisible = false;\n this.isBlinking = true;\n this.blinkInterval = 1000;\n this.smoothBlinking = false;\n\n this.cursors = [];\n this.cursor = this.addCursor();\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.$updateCursors = (isIE8\n ? this.$updateVisibility\n : this.$updateOpacity).bind(this);\n};\n\n(function() {\n \n this.$updateVisibility = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.visibility = val ? \"\" : \"hidden\";\n };\n this.$updateOpacity = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.opacity = val ? \"\" : \"0\";\n };\n \n\n this.$padding = 0;\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n\n this.setSession = function(session) {\n this.session = session;\n };\n\n this.setBlinking = function(blinking) {\n if (blinking != this.isBlinking){\n this.isBlinking = blinking;\n this.restartTimer();\n }\n };\n\n this.setBlinkInterval = function(blinkInterval) {\n if (blinkInterval != this.blinkInterval){\n this.blinkInterval = blinkInterval;\n this.restartTimer();\n }\n };\n\n this.setSmoothBlinking = function(smoothBlinking) {\n if (smoothBlinking != this.smoothBlinking && !isIE8) {\n this.smoothBlinking = smoothBlinking;\n dom.setCssClass(this.element, \"ace_smooth-blinking\", smoothBlinking);\n this.$updateCursors(true);\n this.$updateCursors = (this.$updateOpacity).bind(this);\n this.restartTimer();\n }\n };\n\n this.addCursor = function() {\n var el = dom.createElement(\"div\");\n el.className = \"ace_cursor\";\n this.element.appendChild(el);\n this.cursors.push(el);\n return el;\n };\n\n this.removeCursor = function() {\n if (this.cursors.length > 1) {\n var el = this.cursors.pop();\n el.parentNode.removeChild(el);\n return el;\n }\n };\n\n this.hideCursor = function() {\n this.isVisible = false;\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.showCursor = function() {\n this.isVisible = true;\n dom.removeCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.restartTimer = function() {\n var update = this.$updateCursors;\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n if (this.smoothBlinking) {\n dom.removeCssClass(this.element, \"ace_smooth-blinking\");\n }\n \n update(true);\n\n if (!this.isBlinking || !this.blinkInterval || !this.isVisible)\n return;\n\n if (this.smoothBlinking) {\n setTimeout(function(){\n dom.addCssClass(this.element, \"ace_smooth-blinking\");\n }.bind(this));\n }\n \n var blink = function(){\n this.timeoutId = setTimeout(function() {\n update(false);\n }, 0.6 * this.blinkInterval);\n }.bind(this);\n\n this.intervalId = setInterval(function() {\n update(true);\n blink();\n }, this.blinkInterval);\n\n blink();\n };\n\n this.getPixelPosition = function(position, onScreen) {\n if (!this.config || !this.session)\n return {left : 0, top : 0};\n\n if (!position)\n position = this.session.selection.getCursor();\n var pos = this.session.documentToScreenPosition(position);\n var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : pos.column * this.config.characterWidth);\n\n var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *\n this.config.lineHeight;\n\n return {left : cursorLeft, top : cursorTop};\n };\n\n this.update = function(config) {\n this.config = config;\n\n var selections = this.session.$selectionMarkers;\n var i = 0, cursorIndex = 0;\n\n if (selections === undefined || selections.length === 0){\n selections = [{cursor: null}];\n }\n\n for (var i = 0, n = selections.length; i < n; i++) {\n var pixelPos = this.getPixelPosition(selections[i].cursor, true);\n if ((pixelPos.top > config.height + config.offset ||\n pixelPos.top < 0) && i > 1) {\n continue;\n }\n\n var style = (this.cursors[cursorIndex++] || this.addCursor()).style;\n \n if (!this.drawCursor) {\n style.left = pixelPos.left + \"px\";\n style.top = pixelPos.top + \"px\";\n style.width = config.characterWidth + \"px\";\n style.height = config.lineHeight + \"px\";\n } else {\n this.drawCursor(style, pixelPos, config, selections[i], this.session);\n }\n }\n while (this.cursors.length > cursorIndex)\n this.removeCursor();\n\n var overwrite = this.session.getOverwrite();\n this.$setOverwrite(overwrite);\n this.$pixelPos = pixelPos;\n this.restartTimer();\n };\n \n this.drawCursor = null;\n\n this.$setOverwrite = function(overwrite) {\n if (overwrite != this.overwrite) {\n this.overwrite = overwrite;\n if (overwrite)\n dom.addCssClass(this.element, \"ace_overwrite-cursors\");\n else\n dom.removeCssClass(this.element, \"ace_overwrite-cursors\");\n }\n };\n\n this.destroy = function() {\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n };\n\n}).call(Cursor.prototype);\n\nexports.Cursor = Cursor;\n\n});\n\nace.define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar MAX_SCROLL_H = 0x8000;\nvar ScrollBar = function(parent) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_scrollbar ace_scrollbar\" + this.classSuffix;\n\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"ace_scrollbar-inner\";\n this.element.appendChild(this.inner);\n\n parent.appendChild(this.element);\n\n this.setVisible(false);\n this.skipEvent = false;\n\n event.addListener(this.element, \"scroll\", this.onScroll.bind(this));\n event.addListener(this.element, \"mousedown\", event.preventDefault);\n};\n\n(function() {\n oop.implement(this, EventEmitter);\n\n this.setVisible = function(isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n}).call(ScrollBar.prototype);\nvar VScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollTop = 0;\n this.scrollHeight = 0;\n renderer.$scrollbarWidth = \n this.width = dom.scrollbarWidth(parent.ownerDocument);\n this.inner.style.width =\n this.element.style.width = (this.width || 15) + 5 + \"px\";\n this.$minWidth = 0;\n};\n\noop.inherits(VScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-v';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollTop = this.element.scrollTop;\n if (this.coeff != 1) {\n var h = this.element.clientHeight / this.scrollHeight;\n this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);\n }\n this._emit(\"scroll\", {data: this.scrollTop});\n }\n this.skipEvent = false;\n };\n this.getWidth = function() {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n this.setHeight = function(height) {\n this.element.style.height = height + \"px\";\n };\n this.setInnerHeight =\n this.setScrollHeight = function(height) {\n this.scrollHeight = height;\n if (height > MAX_SCROLL_H) {\n this.coeff = MAX_SCROLL_H / height;\n height = MAX_SCROLL_H;\n } else if (this.coeff != 1) {\n this.coeff = 1;\n }\n this.inner.style.height = height + \"px\";\n };\n this.setScrollTop = function(scrollTop) {\n if (this.scrollTop != scrollTop) {\n this.skipEvent = true;\n this.scrollTop = scrollTop;\n this.element.scrollTop = scrollTop * this.coeff;\n }\n };\n\n}).call(VScrollBar.prototype);\nvar HScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollLeft = 0;\n this.height = renderer.$scrollbarWidth;\n this.inner.style.height =\n this.element.style.height = (this.height || 15) + 5 + \"px\";\n};\n\noop.inherits(HScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-h';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollLeft = this.element.scrollLeft;\n this._emit(\"scroll\", {data: this.scrollLeft});\n }\n this.skipEvent = false;\n };\n this.getHeight = function() {\n return this.isVisible ? this.height : 0;\n };\n this.setWidth = function(width) {\n this.element.style.width = width + \"px\";\n };\n this.setInnerWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollLeft = function(scrollLeft) {\n if (this.scrollLeft != scrollLeft) {\n this.skipEvent = true;\n this.scrollLeft = this.element.scrollLeft = scrollLeft;\n }\n };\n\n}).call(HScrollBar.prototype);\n\n\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\n\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n});\n\nace.define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"./lib/event\");\n\n\nvar RenderLoop = function(onRender, win) {\n this.onRender = onRender;\n this.pending = false;\n this.changes = 0;\n this.window = win || window;\n};\n\n(function() {\n\n\n this.schedule = function(change) {\n this.changes = this.changes | change;\n if (!this.pending && this.changes) {\n this.pending = true;\n var _self = this;\n event.nextFrame(function() {\n _self.pending = false;\n var changes;\n while (changes = _self.changes) {\n _self.changes = 0;\n _self.onRender(changes);\n }\n }, this.window);\n }\n };\n\n}).call(RenderLoop.prototype);\n\nexports.RenderLoop = RenderLoop;\n});\n\nace.define(\"ace/layer/font_metrics\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CHAR_COUNT = 0;\n\nvar FontMetrics = exports.FontMetrics = function(parentEl) {\n this.el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.el.style, true);\n \n this.$main = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$main.style);\n \n this.$measureNode = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$measureNode.style);\n \n \n this.el.appendChild(this.$main);\n this.el.appendChild(this.$measureNode);\n parentEl.appendChild(this.el);\n \n if (!CHAR_COUNT)\n this.$testFractionalRect();\n this.$measureNode.innerHTML = lang.stringRepeat(\"X\", CHAR_COUNT);\n \n this.$characterSize = {width: 0, height: 0};\n this.checkForSizeChanges();\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n \n this.$characterSize = {width: 0, height: 0};\n \n this.$testFractionalRect = function() {\n var el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(el.style);\n el.style.width = \"0.2px\";\n document.documentElement.appendChild(el);\n var w = el.getBoundingClientRect().width;\n if (w > 0 && w < 1)\n CHAR_COUNT = 50;\n else\n CHAR_COUNT = 100;\n el.parentNode.removeChild(el);\n };\n \n this.$setMeasureNodeStyles = function(style, isRoot) {\n style.width = style.height = \"auto\";\n style.left = style.top = \"0px\";\n style.visibility = \"hidden\";\n style.position = \"absolute\";\n style.whiteSpace = \"pre\";\n\n if (useragent.isIE < 8) {\n style[\"font-family\"] = \"inherit\";\n } else {\n style.font = \"inherit\";\n }\n style.overflow = isRoot ? \"hidden\" : \"visible\";\n };\n\n this.checkForSizeChanges = function() {\n var size = this.$measureSizes();\n if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {\n this.$measureNode.style.fontWeight = \"bold\";\n var boldSize = this.$measureSizes();\n this.$measureNode.style.fontWeight = \"\";\n this.$characterSize = size;\n this.charSizes = Object.create(null);\n this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;\n this._emit(\"changeCharacterSize\", {data: size});\n }\n };\n\n this.$pollSizeChanges = function() {\n if (this.$pollSizeChangesTimer)\n return this.$pollSizeChangesTimer;\n var self = this;\n return this.$pollSizeChangesTimer = setInterval(function() {\n self.checkForSizeChanges();\n }, 500);\n };\n \n this.setPolling = function(val) {\n if (val) {\n this.$pollSizeChanges();\n } else if (this.$pollSizeChangesTimer) {\n clearInterval(this.$pollSizeChangesTimer);\n this.$pollSizeChangesTimer = 0;\n }\n };\n\n this.$measureSizes = function() {\n if (CHAR_COUNT === 50) {\n var rect = null;\n try { \n rect = this.$measureNode.getBoundingClientRect();\n } catch(e) {\n rect = {width: 0, height:0 };\n }\n var size = {\n height: rect.height,\n width: rect.width / CHAR_COUNT\n };\n } else {\n var size = {\n height: this.$measureNode.clientHeight,\n width: this.$measureNode.clientWidth / CHAR_COUNT\n };\n }\n if (size.width === 0 || size.height === 0)\n return null;\n return size;\n };\n\n this.$measureCharWidth = function(ch) {\n this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);\n var rect = this.$main.getBoundingClientRect();\n return rect.width / CHAR_COUNT;\n };\n \n this.getCharacterWidth = function(ch) {\n var w = this.charSizes[ch];\n if (w === undefined) {\n w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;\n }\n return w;\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.el && this.el.parentNode)\n this.el.parentNode.removeChild(this.el);\n };\n\n}).call(FontMetrics.prototype);\n\n});\n\nace.define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/config\",\"ace/lib/useragent\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/scrollbar\",\"ace/renderloop\",\"ace/layer/font_metrics\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar config = acequire(\"./config\");\nvar useragent = acequire(\"./lib/useragent\");\nvar GutterLayer = acequire(\"./layer/gutter\").Gutter;\nvar MarkerLayer = acequire(\"./layer/marker\").Marker;\nvar TextLayer = acequire(\"./layer/text\").Text;\nvar CursorLayer = acequire(\"./layer/cursor\").Cursor;\nvar HScrollBar = acequire(\"./scrollbar\").HScrollBar;\nvar VScrollBar = acequire(\"./scrollbar\").VScrollBar;\nvar RenderLoop = acequire(\"./renderloop\").RenderLoop;\nvar FontMetrics = acequire(\"./layer/font_metrics\").FontMetrics;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar editorCss = \".ace_editor {\\\nposition: relative;\\\noverflow: hidden;\\\nfont: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\\\ndirection: ltr;\\\ntext-align: left;\\\n-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\\n}\\\n.ace_scroller {\\\nposition: absolute;\\\noverflow: hidden;\\\ntop: 0;\\\nbottom: 0;\\\nbackground-color: inherit;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\ncursor: text;\\\n}\\\n.ace_content {\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmin-width: 100%;\\\n}\\\n.ace_dragging .ace_scroller:before{\\\nposition: absolute;\\\ntop: 0;\\\nleft: 0;\\\nright: 0;\\\nbottom: 0;\\\ncontent: '';\\\nbackground: rgba(250, 250, 250, 0.01);\\\nz-index: 1000;\\\n}\\\n.ace_dragging.ace_dark .ace_scroller:before{\\\nbackground: rgba(0, 0, 0, 0.01);\\\n}\\\n.ace_selecting, .ace_selecting * {\\\ncursor: text !important;\\\n}\\\n.ace_gutter {\\\nposition: absolute;\\\noverflow : hidden;\\\nwidth: auto;\\\ntop: 0;\\\nbottom: 0;\\\nleft: 0;\\\ncursor: default;\\\nz-index: 4;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\n}\\\n.ace_gutter-active-line {\\\nposition: absolute;\\\nleft: 0;\\\nright: 0;\\\n}\\\n.ace_scroller.ace_scroll-left {\\\nbox-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\\\n}\\\n.ace_gutter-cell {\\\npadding-left: 19px;\\\npadding-right: 6px;\\\nbackground-repeat: no-repeat;\\\n}\\\n.ace_gutter-cell.ace_error {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_warning {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_dark .ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_scrollbar {\\\nposition: absolute;\\\nright: 0;\\\nbottom: 0;\\\nz-index: 6;\\\n}\\\n.ace_scrollbar-inner {\\\nposition: absolute;\\\ncursor: text;\\\nleft: 0;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-v{\\\noverflow-x: hidden;\\\noverflow-y: scroll;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-h {\\\noverflow-x: scroll;\\\noverflow-y: hidden;\\\nleft: 0;\\\n}\\\n.ace_print-margin {\\\nposition: absolute;\\\nheight: 100%;\\\n}\\\n.ace_text-input {\\\nposition: absolute;\\\nz-index: 0;\\\nwidth: 0.5em;\\\nheight: 1em;\\\nopacity: 0;\\\nbackground: transparent;\\\n-moz-appearance: none;\\\nappearance: none;\\\nborder: none;\\\nresize: none;\\\noutline: none;\\\noverflow: hidden;\\\nfont: inherit;\\\npadding: 0 1px;\\\nmargin: 0 -1px;\\\ntext-indent: -1em;\\\n-ms-user-select: text;\\\n-moz-user-select: text;\\\n-webkit-user-select: text;\\\nuser-select: text;\\\nwhite-space: pre!important;\\\n}\\\n.ace_text-input.ace_composition {\\\nbackground: inherit;\\\ncolor: inherit;\\\nz-index: 1000;\\\nopacity: 1;\\\ntext-indent: 0;\\\n}\\\n.ace_layer {\\\nz-index: 1;\\\nposition: absolute;\\\noverflow: hidden;\\\nword-wrap: normal;\\\nwhite-space: pre;\\\nheight: 100%;\\\nwidth: 100%;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\npointer-events: none;\\\n}\\\n.ace_gutter-layer {\\\nposition: relative;\\\nwidth: auto;\\\ntext-align: right;\\\npointer-events: auto;\\\n}\\\n.ace_text-layer {\\\nfont: inherit !important;\\\n}\\\n.ace_cjk {\\\ndisplay: inline-block;\\\ntext-align: center;\\\n}\\\n.ace_cursor-layer {\\\nz-index: 4;\\\n}\\\n.ace_cursor {\\\nz-index: 4;\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nborder-left: 2px solid;\\\ntransform: translatez(0);\\\n}\\\n.ace_multiselect .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_slim-cursors .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_overwrite-cursors .ace_cursor {\\\nborder-left-width: 0;\\\nborder-bottom: 1px solid;\\\n}\\\n.ace_hidden-cursors .ace_cursor {\\\nopacity: 0.2;\\\n}\\\n.ace_smooth-blinking .ace_cursor {\\\n-webkit-transition: opacity 0.18s;\\\ntransition: opacity 0.18s;\\\n}\\\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\\\nposition: absolute;\\\nz-index: 3;\\\n}\\\n.ace_marker-layer .ace_selection {\\\nposition: absolute;\\\nz-index: 5;\\\n}\\\n.ace_marker-layer .ace_bracket {\\\nposition: absolute;\\\nz-index: 6;\\\n}\\\n.ace_marker-layer .ace_active-line {\\\nposition: absolute;\\\nz-index: 2;\\\n}\\\n.ace_marker-layer .ace_selected-word {\\\nposition: absolute;\\\nz-index: 4;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\n}\\\n.ace_line .ace_fold {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ndisplay: inline-block;\\\nheight: 11px;\\\nmargin-top: -2px;\\\nvertical-align: middle;\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\\\");\\\nbackground-repeat: no-repeat, repeat-x;\\\nbackground-position: center center, top left;\\\ncolor: transparent;\\\nborder: 1px solid black;\\\nborder-radius: 2px;\\\ncursor: pointer;\\\npointer-events: auto;\\\n}\\\n.ace_dark .ace_fold {\\\n}\\\n.ace_fold:hover{\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_tooltip {\\\nbackground-color: #FFF;\\\nbackground-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\\\nbackground-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\\\nborder: 1px solid gray;\\\nborder-radius: 1px;\\\nbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\\\ncolor: black;\\\nmax-width: 100%;\\\npadding: 3px 4px;\\\nposition: fixed;\\\nz-index: 999999;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ncursor: default;\\\nwhite-space: pre;\\\nword-wrap: break-word;\\\nline-height: normal;\\\nfont-style: normal;\\\nfont-weight: normal;\\\nletter-spacing: normal;\\\npointer-events: none;\\\n}\\\n.ace_folding-enabled > .ace_gutter-cell {\\\npadding-right: 13px;\\\n}\\\n.ace_fold-widget {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmargin: 0 -12px 0 1px;\\\ndisplay: none;\\\nwidth: 11px;\\\nvertical-align: top;\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: center;\\\nborder-radius: 3px;\\\nborder: 1px solid transparent;\\\ncursor: pointer;\\\n}\\\n.ace_folding-enabled .ace_fold-widget {\\\ndisplay: inline-block; \\\n}\\\n.ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\\\");\\\n}\\\n.ace_fold-widget:hover {\\\nborder: 1px solid rgba(0, 0, 0, 0.3);\\\nbackground-color: rgba(255, 255, 255, 0.2);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\\\n}\\\n.ace_fold-widget:active {\\\nborder: 1px solid rgba(0, 0, 0, 0.4);\\\nbackground-color: rgba(0, 0, 0, 0.05);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\\\n}\\\n.ace_dark .ace_fold-widget {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget:hover {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\nbackground-color: rgba(255, 255, 255, 0.1);\\\n}\\\n.ace_dark .ace_fold-widget:active {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\n}\\\n.ace_fold-widget.ace_invalid {\\\nbackground-color: #FFB4B4;\\\nborder-color: #DE5555;\\\n}\\\n.ace_fade-fold-widgets .ace_fold-widget {\\\n-webkit-transition: opacity 0.4s ease 0.05s;\\\ntransition: opacity 0.4s ease 0.05s;\\\nopacity: 0;\\\n}\\\n.ace_fade-fold-widgets:hover .ace_fold-widget {\\\n-webkit-transition: opacity 0.05s ease 0.05s;\\\ntransition: opacity 0.05s ease 0.05s;\\\nopacity:1;\\\n}\\\n.ace_underline {\\\ntext-decoration: underline;\\\n}\\\n.ace_bold {\\\nfont-weight: bold;\\\n}\\\n.ace_nobold .ace_bold {\\\nfont-weight: normal;\\\n}\\\n.ace_italic {\\\nfont-style: italic;\\\n}\\\n.ace_error-marker {\\\nbackground-color: rgba(255, 0, 0,0.2);\\\nposition: absolute;\\\nz-index: 9;\\\n}\\\n.ace_highlight-marker {\\\nbackground-color: rgba(255, 255, 0,0.2);\\\nposition: absolute;\\\nz-index: 8;\\\n}\\\n.ace_br1 {border-top-left-radius : 3px;}\\\n.ace_br2 {border-top-right-radius : 3px;}\\\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\\\n.ace_br4 {border-bottom-right-radius: 3px;}\\\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\\\n.ace_br8 {border-bottom-left-radius : 3px;}\\\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_text-input-ios {\\\nposition: absolute !important;\\\ntop: -100000px !important;\\\nleft: -100000px !important;\\\n}\\\n\";\n\ndom.importCssString(editorCss, \"ace_editor.css\");\n\nvar VirtualRenderer = function(container, theme) {\n var _self = this;\n\n this.container = container || dom.createElement(\"div\");\n this.$keepTextAreaAtCursor = !useragent.isOldIE;\n\n dom.addCssClass(this.container, \"ace_editor\");\n\n this.setTheme(theme);\n\n this.$gutter = dom.createElement(\"div\");\n this.$gutter.className = \"ace_gutter\";\n this.container.appendChild(this.$gutter);\n this.$gutter.setAttribute(\"aria-hidden\", true);\n\n this.scroller = dom.createElement(\"div\");\n this.scroller.className = \"ace_scroller\";\n this.container.appendChild(this.scroller);\n\n this.content = dom.createElement(\"div\");\n this.content.className = \"ace_content\";\n this.scroller.appendChild(this.content);\n\n this.$gutterLayer = new GutterLayer(this.$gutter);\n this.$gutterLayer.on(\"changeGutterWidth\", this.onGutterResize.bind(this));\n\n this.$markerBack = new MarkerLayer(this.content);\n\n var textLayer = this.$textLayer = new TextLayer(this.content);\n this.canvas = textLayer.element;\n\n this.$markerFront = new MarkerLayer(this.content);\n\n this.$cursorLayer = new CursorLayer(this.content);\n this.$horizScroll = false;\n this.$vScroll = false;\n\n this.scrollBar = \n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n\n this.scrollTop = 0;\n this.scrollLeft = 0;\n\n this.cursorPos = {\n row : 0,\n column : 0\n };\n\n this.$fontMetrics = new FontMetrics(this.container);\n this.$textLayer.$setFontMetrics(this.$fontMetrics);\n this.$textLayer.addEventListener(\"changeCharacterSize\", function(e) {\n _self.updateCharacterSize();\n _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);\n _self._signal(\"changeCharacterSize\", e);\n });\n\n this.$size = {\n width: 0,\n height: 0,\n scrollerHeight: 0,\n scrollerWidth: 0,\n $dirty: true\n };\n\n this.layerConfig = {\n width : 1,\n padding : 0,\n firstRow : 0,\n firstRowScreen: 0,\n lastRow : 0,\n lineHeight : 0,\n characterWidth : 0,\n minHeight : 1,\n maxHeight : 1,\n offset : 0,\n height : 1,\n gutterOffset: 1\n };\n \n this.scrollMargin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n\n this.$loop = new RenderLoop(\n this.$renderChanges.bind(this),\n this.container.ownerDocument.defaultView\n );\n this.$loop.schedule(this.CHANGE_FULL);\n\n this.updateCharacterSize();\n this.setPadding(4);\n config.resetOptions(this);\n config._emit(\"renderer\", this);\n};\n\n(function() {\n\n this.CHANGE_CURSOR = 1;\n this.CHANGE_MARKER = 2;\n this.CHANGE_GUTTER = 4;\n this.CHANGE_SCROLL = 8;\n this.CHANGE_LINES = 16;\n this.CHANGE_TEXT = 32;\n this.CHANGE_SIZE = 64;\n this.CHANGE_MARKER_BACK = 128;\n this.CHANGE_MARKER_FRONT = 256;\n this.CHANGE_FULL = 512;\n this.CHANGE_H_SCROLL = 1024;\n\n oop.implement(this, EventEmitter);\n\n this.updateCharacterSize = function() {\n if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {\n this.$allowBoldFonts = this.$textLayer.allowBoldFonts;\n this.setStyle(\"ace_nobold\", !this.$allowBoldFonts);\n }\n\n this.layerConfig.characterWidth =\n this.characterWidth = this.$textLayer.getCharacterWidth();\n this.layerConfig.lineHeight =\n this.lineHeight = this.$textLayer.getLineHeight();\n this.$updatePrintMargin();\n };\n this.setSession = function(session) {\n if (this.session)\n this.session.doc.off(\"changeNewLineMode\", this.onChangeNewLineMode);\n \n this.session = session;\n if (session && this.scrollMargin.top && session.getScrollTop() <= 0)\n session.setScrollTop(-this.scrollMargin.top);\n\n this.$cursorLayer.setSession(session);\n this.$markerBack.setSession(session);\n this.$markerFront.setSession(session);\n this.$gutterLayer.setSession(session);\n this.$textLayer.setSession(session);\n if (!session)\n return;\n \n this.$loop.schedule(this.CHANGE_FULL);\n this.session.$setFontMetrics(this.$fontMetrics);\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n \n this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);\n this.onChangeNewLineMode();\n this.session.doc.on(\"changeNewLineMode\", this.onChangeNewLineMode);\n };\n this.updateLines = function(firstRow, lastRow, force) {\n if (lastRow === undefined)\n lastRow = Infinity;\n\n if (!this.$changedLines) {\n this.$changedLines = {\n firstRow: firstRow,\n lastRow: lastRow\n };\n }\n else {\n if (this.$changedLines.firstRow > firstRow)\n this.$changedLines.firstRow = firstRow;\n\n if (this.$changedLines.lastRow < lastRow)\n this.$changedLines.lastRow = lastRow;\n }\n if (this.$changedLines.lastRow < this.layerConfig.firstRow) {\n if (force)\n this.$changedLines.lastRow = this.layerConfig.lastRow;\n else\n return;\n }\n if (this.$changedLines.firstRow > this.layerConfig.lastRow)\n return;\n this.$loop.schedule(this.CHANGE_LINES);\n };\n\n this.onChangeNewLineMode = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n this.$textLayer.$updateEolChar();\n this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);\n };\n \n this.onChangeTabSize = function() {\n this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);\n this.$textLayer.onChangeTabSize();\n };\n this.updateText = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n };\n this.updateFull = function(force) {\n if (force)\n this.$renderChanges(this.CHANGE_FULL, true);\n else\n this.$loop.schedule(this.CHANGE_FULL);\n };\n this.updateFontSize = function() {\n this.$textLayer.checkForSizeChanges();\n };\n\n this.$changes = 0;\n this.$updateSizeAsync = function() {\n if (this.$loop.pending)\n this.$size.$dirty = true;\n else\n this.onResize();\n };\n this.onResize = function(force, gutterWidth, width, height) {\n if (this.resizing > 2)\n return;\n else if (this.resizing > 0)\n this.resizing++;\n else\n this.resizing = force ? 1 : 0;\n var el = this.container;\n if (!height)\n height = el.clientHeight || el.scrollHeight;\n if (!width)\n width = el.clientWidth || el.scrollWidth;\n var changes = this.$updateCachedSize(force, gutterWidth, width, height);\n\n \n if (!this.$size.scrollerHeight || (!width && !height))\n return this.resizing = 0;\n\n if (force)\n this.$gutterLayer.$padding = null;\n\n if (force)\n this.$renderChanges(changes | this.$changes, true);\n else\n this.$loop.schedule(changes | this.$changes);\n\n if (this.resizing)\n this.resizing = 0;\n this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;\n };\n \n this.$updateCachedSize = function(force, gutterWidth, width, height) {\n height -= (this.$extraHeight || 0);\n var changes = 0;\n var size = this.$size;\n var oldSize = {\n width: size.width,\n height: size.height,\n scrollerHeight: size.scrollerHeight,\n scrollerWidth: size.scrollerWidth\n };\n if (height && (force || size.height != height)) {\n size.height = height;\n changes |= this.CHANGE_SIZE;\n\n size.scrollerHeight = size.height;\n if (this.$horizScroll)\n size.scrollerHeight -= this.scrollBarH.getHeight();\n this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n changes = changes | this.CHANGE_SCROLL;\n }\n\n if (width && (force || size.width != width)) {\n changes |= this.CHANGE_SIZE;\n size.width = width;\n \n if (gutterWidth == null)\n gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n \n this.gutterWidth = gutterWidth;\n \n this.scrollBarH.element.style.left = \n this.scroller.style.left = gutterWidth + \"px\";\n size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); \n \n this.scrollBarH.element.style.right = \n this.scroller.style.right = this.scrollBarV.getWidth() + \"px\";\n this.scroller.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)\n changes |= this.CHANGE_FULL;\n }\n \n size.$dirty = !width || !height;\n\n if (changes)\n this._signal(\"resize\", oldSize);\n\n return changes;\n };\n\n this.onGutterResize = function() {\n var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n if (gutterWidth != this.gutterWidth)\n this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);\n\n if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else if (this.$size.$dirty) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else {\n this.$computeLayerConfig();\n this.$loop.schedule(this.CHANGE_MARKER);\n }\n };\n this.adjustWrapLimit = function() {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth);\n return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);\n };\n this.setAnimatedScroll = function(shouldAnimate){\n this.setOption(\"animatedScroll\", shouldAnimate);\n };\n this.getAnimatedScroll = function() {\n return this.$animatedScroll;\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.setOption(\"showInvisibles\", showInvisibles);\n this.session.$bidiHandler.setShowInvisibles(showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.getOption(\"showInvisibles\");\n };\n this.getDisplayIndentGuides = function() {\n return this.getOption(\"displayIndentGuides\");\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.setOption(\"displayIndentGuides\", display);\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.setOption(\"showPrintMargin\", showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.getOption(\"showPrintMargin\");\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.setOption(\"printMarginColumn\", showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.getOption(\"printMarginColumn\");\n };\n this.getShowGutter = function(){\n return this.getOption(\"showGutter\");\n };\n this.setShowGutter = function(show){\n return this.setOption(\"showGutter\", show);\n };\n\n this.getFadeFoldWidgets = function(){\n return this.getOption(\"fadeFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function(show) {\n this.setOption(\"fadeFoldWidgets\", show);\n };\n\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n\n this.$updateGutterLineHighlight = function() {\n var pos = this.$cursorLayer.$pixelPos;\n var height = this.layerConfig.lineHeight;\n if (this.session.getUseWrapMode()) {\n var cursor = this.session.selection.getCursor();\n cursor.column = 0;\n pos = this.$cursorLayer.getPixelPosition(cursor, true);\n height *= this.session.getRowLength(cursor.row);\n }\n this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + \"px\";\n this.$gutterLineHighlight.style.height = height + \"px\";\n };\n\n this.$updatePrintMargin = function() {\n if (!this.$showPrintMargin && !this.$printMarginEl)\n return;\n\n if (!this.$printMarginEl) {\n var containerEl = dom.createElement(\"div\");\n containerEl.className = \"ace_layer ace_print-margin-layer\";\n this.$printMarginEl = dom.createElement(\"div\");\n this.$printMarginEl.className = \"ace_print-margin\";\n containerEl.appendChild(this.$printMarginEl);\n this.content.insertBefore(containerEl, this.content.firstChild);\n }\n\n var style = this.$printMarginEl.style;\n style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + \"px\";\n style.visibility = this.$showPrintMargin ? \"visible\" : \"hidden\";\n \n if (this.session && this.session.$wrap == -1)\n this.adjustWrapLimit();\n };\n this.getContainerElement = function() {\n return this.container;\n };\n this.getMouseEventTarget = function() {\n return this.scroller;\n };\n this.getTextAreaContainer = function() {\n return this.container;\n };\n this.$moveTextAreaToCursor = function() {\n if (!this.$keepTextAreaAtCursor)\n return;\n var config = this.layerConfig;\n var posTop = this.$cursorLayer.$pixelPos.top;\n var posLeft = this.$cursorLayer.$pixelPos.left;\n posTop -= config.offset;\n\n var style = this.textarea.style;\n var h = this.lineHeight;\n if (posTop < 0 || posTop > config.height - h) {\n style.top = style.left = \"0\";\n return;\n }\n\n var w = this.characterWidth;\n if (this.$composition) {\n var val = this.textarea.value.replace(/^\\x01+/, \"\");\n w *= (this.session.$getStringScreenWidth(val)[0]+2);\n h += 2;\n }\n posLeft -= this.scrollLeft;\n if (posLeft > this.$size.scrollerWidth - w)\n posLeft = this.$size.scrollerWidth - w;\n\n posLeft += this.gutterWidth;\n style.height = h + \"px\";\n style.width = w + \"px\";\n style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + \"px\";\n style.top = Math.min(posTop, this.$size.height - h) + \"px\";\n };\n this.getFirstVisibleRow = function() {\n return this.layerConfig.firstRow;\n };\n this.getFirstFullyVisibleRow = function() {\n return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);\n };\n this.getLastFullyVisibleRow = function() {\n var config = this.layerConfig;\n var lastRow = config.lastRow;\n var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;\n if (top - this.session.getScrollTop() > config.height - config.lineHeight)\n return lastRow - 1;\n return lastRow;\n };\n this.getLastVisibleRow = function() {\n return this.layerConfig.lastRow;\n };\n\n this.$padding = null;\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.$textLayer.setPadding(padding);\n this.$cursorLayer.setPadding(padding);\n this.$markerFront.setPadding(padding);\n this.$markerBack.setPadding(padding);\n this.$loop.schedule(this.CHANGE_FULL);\n this.$updatePrintMargin();\n };\n \n this.setScrollMargin = function(top, bottom, left, right) {\n var sm = this.scrollMargin;\n sm.top = top|0;\n sm.bottom = bottom|0;\n sm.right = right|0;\n sm.left = left|0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n if (sm.top && this.scrollTop <= 0 && this.session)\n this.session.setScrollTop(-sm.top);\n this.updateFull();\n };\n this.getHScrollBarAlwaysVisible = function() {\n return this.$hScrollBarAlwaysVisible;\n };\n this.setHScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"hScrollBarAlwaysVisible\", alwaysVisible);\n };\n this.getVScrollBarAlwaysVisible = function() {\n return this.$vScrollBarAlwaysVisible;\n };\n this.setVScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"vScrollBarAlwaysVisible\", alwaysVisible);\n };\n\n this.$updateScrollBarV = function() {\n var scrollHeight = this.layerConfig.maxHeight;\n var scrollerHeight = this.$size.scrollerHeight;\n if (!this.$maxLines && this.$scrollPastEnd) {\n scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;\n if (this.scrollTop > scrollHeight - scrollerHeight) {\n scrollHeight = this.scrollTop + scrollerHeight;\n this.scrollBarV.scrollTop = null;\n }\n }\n this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);\n this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);\n };\n this.$updateScrollBarH = function() {\n this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);\n this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);\n };\n \n this.$frozen = false;\n this.freeze = function() {\n this.$frozen = true;\n };\n \n this.unfreeze = function() {\n this.$frozen = false;\n };\n\n this.$renderChanges = function(changes, force) {\n if (this.$changes) {\n changes |= this.$changes;\n this.$changes = 0;\n }\n if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {\n this.$changes |= changes;\n return; \n } \n if (this.$size.$dirty) {\n this.$changes |= changes;\n return this.onResize(true);\n }\n if (!this.lineHeight) {\n this.$textLayer.checkForSizeChanges();\n }\n \n this._signal(\"beforeRender\");\n\n if (this.session && this.session.$bidiHandler)\n this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);\n\n var config = this.layerConfig;\n if (changes & this.CHANGE_FULL ||\n changes & this.CHANGE_SIZE ||\n changes & this.CHANGE_TEXT ||\n changes & this.CHANGE_LINES ||\n changes & this.CHANGE_SCROLL ||\n changes & this.CHANGE_H_SCROLL\n ) {\n changes |= this.$computeLayerConfig();\n if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {\n var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;\n if (st > 0) {\n this.scrollTop = st;\n changes = changes | this.CHANGE_SCROLL;\n changes |= this.$computeLayerConfig();\n }\n }\n config = this.layerConfig;\n this.$updateScrollBarV();\n if (changes & this.CHANGE_H_SCROLL)\n this.$updateScrollBarH();\n this.$gutterLayer.element.style.marginTop = (-config.offset) + \"px\";\n this.content.style.marginTop = (-config.offset) + \"px\";\n this.content.style.width = config.width + 2 * this.$padding + \"px\";\n this.content.style.height = config.minHeight + \"px\";\n }\n if (changes & this.CHANGE_H_SCROLL) {\n this.content.style.marginLeft = -this.scrollLeft + \"px\";\n this.scroller.className = this.scrollLeft <= 0 ? \"ace_scroller\" : \"ace_scroller ace_scroll-left\";\n }\n if (changes & this.CHANGE_FULL) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this._signal(\"afterRender\");\n return;\n }\n if (changes & this.CHANGE_SCROLL) {\n if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)\n this.$textLayer.update(config);\n else\n this.$textLayer.scrollLines(config);\n\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\");\n return;\n }\n\n if (changes & this.CHANGE_TEXT) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_LINES) {\n if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n\n if (changes & this.CHANGE_CURSOR) {\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {\n this.$markerFront.update(config);\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {\n this.$markerBack.update(config);\n }\n\n this._signal(\"afterRender\");\n };\n\n \n this.$autosize = function() {\n var height = this.session.getScreenLength() * this.lineHeight;\n var maxHeight = this.$maxLines * this.lineHeight;\n var desiredHeight = Math.min(maxHeight,\n Math.max((this.$minLines || 1) * this.lineHeight, height)\n ) + this.scrollMargin.v + (this.$extraHeight || 0);\n if (this.$horizScroll)\n desiredHeight += this.scrollBarH.getHeight();\n if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)\n desiredHeight = this.$maxPixelHeight;\n var vScroll = height > maxHeight;\n \n if (desiredHeight != this.desiredHeight ||\n this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {\n if (vScroll != this.$vScroll) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n \n var w = this.container.clientWidth;\n this.container.style.height = desiredHeight + \"px\";\n this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);\n this.desiredHeight = desiredHeight;\n \n this._signal(\"autosize\");\n }\n };\n \n this.$computeLayerConfig = function() {\n var session = this.session;\n var size = this.$size;\n \n var hideScrollbars = size.height <= 2 * this.lineHeight;\n var screenLines = this.session.getScreenLength();\n var maxHeight = screenLines * this.lineHeight;\n\n var longestLine = this.$getLongestLine();\n \n var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||\n size.scrollerWidth - longestLine - 2 * this.$padding < 0);\n\n var hScrollChanged = this.$horizScroll !== horizScroll;\n if (hScrollChanged) {\n this.$horizScroll = horizScroll;\n this.scrollBarH.setVisible(horizScroll);\n }\n var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine\n if (this.$maxLines && this.lineHeight > 1)\n this.$autosize();\n\n var offset = this.scrollTop % this.lineHeight;\n var minHeight = size.scrollerHeight + this.lineHeight;\n \n var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd\n ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd\n : 0;\n maxHeight += scrollPastEnd;\n \n var sm = this.scrollMargin;\n this.session.setScrollTop(Math.max(-sm.top,\n Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));\n\n this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, \n longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));\n \n var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||\n size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);\n var vScrollChanged = vScrollBefore !== vScroll;\n if (vScrollChanged) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n\n var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;\n var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));\n var lastRow = firstRow + lineCount;\n var firstRowScreen, firstRowHeight;\n var lineHeight = this.lineHeight;\n firstRow = session.screenToDocumentRow(firstRow, 0);\n var foldLine = session.getFoldLine(firstRow);\n if (foldLine) {\n firstRow = foldLine.start.row;\n }\n\n firstRowScreen = session.documentToScreenRow(firstRow, 0);\n firstRowHeight = session.getRowLength(firstRow) * lineHeight;\n\n lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);\n minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +\n firstRowHeight;\n\n offset = this.scrollTop - firstRowScreen * lineHeight;\n\n var changes = 0;\n if (this.layerConfig.width != longestLine) \n changes = this.CHANGE_H_SCROLL;\n if (hScrollChanged || vScrollChanged) {\n changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);\n this._signal(\"scrollbarVisibilityChanged\");\n if (vScrollChanged)\n longestLine = this.$getLongestLine();\n }\n \n this.layerConfig = {\n width : longestLine,\n padding : this.$padding,\n firstRow : firstRow,\n firstRowScreen: firstRowScreen,\n lastRow : lastRow,\n lineHeight : lineHeight,\n characterWidth : this.characterWidth,\n minHeight : minHeight,\n maxHeight : maxHeight,\n offset : offset,\n gutterOffset : lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,\n height : this.$size.scrollerHeight\n };\n\n return changes;\n };\n\n this.$updateLines = function() {\n if (!this.$changedLines) return;\n var firstRow = this.$changedLines.firstRow;\n var lastRow = this.$changedLines.lastRow;\n this.$changedLines = null;\n\n var layerConfig = this.layerConfig;\n\n if (firstRow > layerConfig.lastRow + 1) { return; }\n if (lastRow < layerConfig.firstRow) { return; }\n if (lastRow === Infinity) {\n if (this.$showGutter)\n this.$gutterLayer.update(layerConfig);\n this.$textLayer.update(layerConfig);\n return;\n }\n this.$textLayer.updateLines(layerConfig, firstRow, lastRow);\n return true;\n };\n\n this.$getLongestLine = function() {\n var charCount = this.session.getScreenWidth();\n if (this.showInvisibles && !this.session.$useWrapMode)\n charCount += 1;\n\n return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));\n };\n this.updateFrontMarkers = function() {\n this.$markerFront.setMarkers(this.session.getMarkers(true));\n this.$loop.schedule(this.CHANGE_MARKER_FRONT);\n };\n this.updateBackMarkers = function() {\n this.$markerBack.setMarkers(this.session.getMarkers());\n this.$loop.schedule(this.CHANGE_MARKER_BACK);\n };\n this.addGutterDecoration = function(row, className){\n this.$gutterLayer.addGutterDecoration(row, className);\n };\n this.removeGutterDecoration = function(row, className){\n this.$gutterLayer.removeGutterDecoration(row, className);\n };\n this.updateBreakpoints = function(rows) {\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.setAnnotations = function(annotations) {\n this.$gutterLayer.setAnnotations(annotations);\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.updateCursor = function() {\n this.$loop.schedule(this.CHANGE_CURSOR);\n };\n this.hideCursor = function() {\n this.$cursorLayer.hideCursor();\n };\n this.showCursor = function() {\n this.$cursorLayer.showCursor();\n };\n\n this.scrollSelectionIntoView = function(anchor, lead, offset) {\n this.scrollCursorIntoView(anchor, offset);\n this.scrollCursorIntoView(lead, offset);\n };\n this.scrollCursorIntoView = function(cursor, offset, $viewMargin) {\n if (this.$size.scrollerHeight === 0)\n return;\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n\n var left = pos.left;\n var top = pos.top;\n \n var topMargin = $viewMargin && $viewMargin.top || 0;\n var bottomMargin = $viewMargin && $viewMargin.bottom || 0;\n \n var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;\n \n if (scrollTop + topMargin > top) {\n if (offset && scrollTop + topMargin > top + this.lineHeight)\n top -= offset * this.$size.scrollerHeight;\n if (top === 0)\n top = -this.scrollMargin.top;\n this.session.setScrollTop(top);\n } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {\n if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight)\n top += offset * this.$size.scrollerHeight;\n this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);\n }\n\n var scrollLeft = this.scrollLeft;\n\n if (scrollLeft > left) {\n if (left < this.$padding + 2 * this.layerConfig.characterWidth)\n left = -this.scrollMargin.left;\n this.session.setScrollLeft(left);\n } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {\n this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));\n } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {\n this.session.setScrollLeft(0);\n }\n };\n this.getScrollTop = function() {\n return this.session.getScrollTop();\n };\n this.getScrollLeft = function() {\n return this.session.getScrollLeft();\n };\n this.getScrollTopRow = function() {\n return this.scrollTop / this.lineHeight;\n };\n this.getScrollBottomRow = function() {\n return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);\n };\n this.scrollToRow = function(row) {\n this.session.setScrollTop(row * this.lineHeight);\n };\n\n this.alignCursor = function(cursor, alignment) {\n if (typeof cursor == \"number\")\n cursor = {row: cursor, column: 0};\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var h = this.$size.scrollerHeight - this.lineHeight;\n var offset = pos.top - h * (alignment || 0);\n\n this.session.setScrollTop(offset);\n return offset;\n };\n\n this.STEPS = 8;\n this.$calcSteps = function(fromValue, toValue){\n var i = 0;\n var l = this.STEPS;\n var steps = [];\n\n var func = function(t, x_min, dx) {\n return dx * (Math.pow(t - 1, 3) + 1) + x_min;\n };\n\n for (i = 0; i < l; ++i)\n steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));\n\n return steps;\n };\n this.scrollToLine = function(line, center, animate, callback) {\n var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});\n var offset = pos.top;\n if (center)\n offset -= this.$size.scrollerHeight / 2;\n\n var initialScroll = this.scrollTop;\n this.session.setScrollTop(offset);\n if (animate !== false)\n this.animateScrolling(initialScroll, callback);\n };\n\n this.animateScrolling = function(fromValue, callback) {\n var toValue = this.scrollTop;\n if (!this.$animatedScroll)\n return;\n var _self = this;\n \n if (fromValue == toValue)\n return;\n \n if (this.$scrollAnimation) {\n var oldSteps = this.$scrollAnimation.steps;\n if (oldSteps.length) {\n fromValue = oldSteps[0];\n if (fromValue == toValue)\n return;\n }\n }\n \n var steps = _self.$calcSteps(fromValue, toValue);\n this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};\n\n clearInterval(this.$timer);\n\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n this.$timer = setInterval(function() {\n if (steps.length) {\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n } else if (toValue != null) {\n _self.session.$scrollTop = -1;\n _self.session.setScrollTop(toValue);\n toValue = null;\n } else {\n _self.$timer = clearInterval(_self.$timer);\n _self.$scrollAnimation = null;\n callback && callback();\n }\n }, 10);\n };\n this.scrollToY = function(scrollTop) {\n if (this.scrollTop !== scrollTop) {\n this.$loop.schedule(this.CHANGE_SCROLL);\n this.scrollTop = scrollTop;\n }\n };\n this.scrollToX = function(scrollLeft) {\n if (this.scrollLeft !== scrollLeft)\n this.scrollLeft = scrollLeft;\n this.$loop.schedule(this.CHANGE_H_SCROLL);\n };\n this.scrollTo = function(x, y) {\n this.session.setScrollTop(y);\n this.session.setScrollLeft(y);\n };\n this.scrollBy = function(deltaX, deltaY) {\n deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);\n deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);\n };\n this.isScrollableBy = function(deltaX, deltaY) {\n if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)\n return true;\n if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight\n - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)\n return true;\n if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)\n return true;\n if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth\n - this.layerConfig.width < -1 + this.scrollMargin.right)\n return true;\n };\n\n this.pixelToScreenCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n var col = Math.round(offset);\n\n return {row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX};\n };\n\n this.screenToTextCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n\n var col = Math.round(offsetX / this.characterWidth);\n\n var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;\n\n return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);\n };\n this.textToScreenCoordinates = function(row, column) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var pos = this.session.documentToScreenPosition(row, column);\n\n var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : Math.round(pos.column * this.characterWidth));\n\n var y = pos.row * this.lineHeight;\n\n return {\n pageX: canvasPos.left + x - this.scrollLeft,\n pageY: canvasPos.top + y - this.scrollTop\n };\n };\n this.visualizeFocus = function() {\n dom.addCssClass(this.container, \"ace_focus\");\n };\n this.visualizeBlur = function() {\n dom.removeCssClass(this.container, \"ace_focus\");\n };\n this.showComposition = function(position) {\n if (!this.$composition)\n this.$composition = {\n keepTextAreaAtCursor: this.$keepTextAreaAtCursor,\n cssText: this.textarea.style.cssText\n };\n\n this.$keepTextAreaAtCursor = true;\n dom.addCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = \"\";\n this.$moveTextAreaToCursor();\n };\n this.setCompositionText = function(text) {\n this.$moveTextAreaToCursor();\n };\n this.hideComposition = function() {\n if (!this.$composition)\n return;\n\n dom.removeCssClass(this.textarea, \"ace_composition\");\n this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;\n this.textarea.style.cssText = this.$composition.cssText;\n this.$composition = null;\n };\n this.setTheme = function(theme, cb) {\n var _self = this;\n this.$themeId = theme;\n _self._dispatchEvent('themeChange',{theme:theme});\n\n if (!theme || typeof theme == \"string\") {\n var moduleName = theme || this.$options.theme.initialValue;\n config.loadModule([\"theme\", moduleName], afterLoad);\n } else {\n afterLoad(theme);\n }\n\n function afterLoad(module) {\n if (_self.$themeId != theme)\n return cb && cb();\n if (!module || !module.cssClass)\n throw new Error(\"couldn't load module \" + theme + \" or it didn't call define\");\n dom.importCssString(\n module.cssText,\n module.cssClass,\n _self.container.ownerDocument\n );\n\n if (_self.theme)\n dom.removeCssClass(_self.container, _self.theme.cssClass);\n\n var padding = \"padding\" in module ? module.padding \n : \"padding\" in (_self.theme || {}) ? 4 : _self.$padding;\n if (_self.$padding && padding != _self.$padding)\n _self.setPadding(padding);\n _self.$theme = module.cssClass;\n\n _self.theme = module;\n dom.addCssClass(_self.container, module.cssClass);\n dom.setCssClass(_self.container, \"ace_dark\", module.isDark);\n if (_self.$size) {\n _self.$size.width = 0;\n _self.$updateSizeAsync();\n }\n\n _self._dispatchEvent('themeLoaded', {theme:module});\n cb && cb();\n }\n };\n this.getTheme = function() {\n return this.$themeId;\n };\n this.setStyle = function(style, include) {\n dom.setCssClass(this.container, style, include !== false);\n };\n this.unsetStyle = function(style) {\n dom.removeCssClass(this.container, style);\n };\n \n this.setCursorStyle = function(style) {\n if (this.scroller.style.cursor != style)\n this.scroller.style.cursor = style;\n };\n this.setMouseCursor = function(cursorStyle) {\n this.scroller.style.cursor = cursorStyle;\n };\n this.destroy = function() {\n this.$textLayer.destroy();\n this.$cursorLayer.destroy();\n };\n\n}).call(VirtualRenderer.prototype);\n\n\nconfig.defineOptions(VirtualRenderer.prototype, \"renderer\", {\n animatedScroll: {initialValue: false},\n showInvisibles: {\n set: function(value) {\n if (this.$textLayer.setShowInvisibles(value))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: false\n },\n showPrintMargin: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: true\n },\n printMarginColumn: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: 80\n },\n printMargin: {\n set: function(val) {\n if (typeof val == \"number\")\n this.$printMarginColumn = val;\n this.$showPrintMargin = !!val;\n this.$updatePrintMargin();\n },\n get: function() {\n return this.$showPrintMargin && this.$printMarginColumn; \n }\n },\n showGutter: {\n set: function(show){\n this.$gutter.style.display = show ? \"block\" : \"none\";\n this.$loop.schedule(this.CHANGE_FULL);\n this.onGutterResize();\n },\n initialValue: true\n },\n fadeFoldWidgets: {\n set: function(show) {\n dom.setCssClass(this.$gutter, \"ace_fade-fold-widgets\", show);\n },\n initialValue: false\n },\n showFoldWidgets: {\n set: function(show) {this.$gutterLayer.setShowFoldWidgets(show);},\n initialValue: true\n },\n showLineNumbers: {\n set: function(show) {\n this.$gutterLayer.setShowLineNumbers(show);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n displayIndentGuides: {\n set: function(show) {\n if (this.$textLayer.setDisplayIndentGuides(show))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: true\n },\n highlightGutterLine: {\n set: function(shouldHighlight) {\n if (!this.$gutterLineHighlight) {\n this.$gutterLineHighlight = dom.createElement(\"div\");\n this.$gutterLineHighlight.className = \"ace_gutter-active-line\";\n this.$gutter.appendChild(this.$gutterLineHighlight);\n return;\n }\n\n this.$gutterLineHighlight.style.display = shouldHighlight ? \"\" : \"none\";\n if (this.$cursorLayer.$pixelPos)\n this.$updateGutterLineHighlight();\n },\n initialValue: false,\n value: true\n },\n hScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n vScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n fontSize: {\n set: function(size) {\n if (typeof size == \"number\")\n size = size + \"px\";\n this.container.style.fontSize = size;\n this.updateFontSize();\n },\n initialValue: 12\n },\n fontFamily: {\n set: function(name) {\n this.container.style.fontFamily = name;\n this.updateFontSize();\n }\n },\n maxLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n minLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n maxPixelHeight: {\n set: function(val) {\n this.updateFull();\n },\n initialValue: 0\n },\n scrollPastEnd: {\n set: function(val) {\n val = +val || 0;\n if (this.$scrollPastEnd == val)\n return;\n this.$scrollPastEnd = val;\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: 0,\n handlesSet: true\n },\n fixedWidthGutter: {\n set: function(val) {\n this.$gutterLayer.$fixedWidth = !!val;\n this.$loop.schedule(this.CHANGE_GUTTER);\n }\n },\n theme: {\n set: function(val) { this.setTheme(val); },\n get: function() { return this.$themeId || this.theme; },\n initialValue: \"./theme/textmate\",\n handlesSet: true\n }\n});\n\nexports.VirtualRenderer = VirtualRenderer;\n});\n\nace.define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar net = acequire(\"../lib/net\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\nvar config = acequire(\"../config\");\n\nfunction $workerBlob(workerUrl, mod) {\n var script = mod.src;\"importScripts('\" + net.qualifyURL(workerUrl) + \"');\";\n try {\n return new Blob([script], {\"type\": \"application/javascript\"});\n } catch (e) { // Backwards-compatibility\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;\n var blobBuilder = new BlobBuilder();\n blobBuilder.append(script);\n return blobBuilder.getBlob(\"application/javascript\");\n }\n}\n\nfunction createWorker(workerUrl, mod) {\n var blob = $workerBlob(workerUrl, mod);\n var URL = window.URL || window.webkitURL;\n var blobURL = URL.createObjectURL(blob);\n return new Worker(blobURL);\n}\n\nvar WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.onMessage = this.onMessage.bind(this);\n if (acequire.nameToUrl && !acequire.toUrl)\n acequire.toUrl = acequire.nameToUrl;\n \n if (config.get(\"packaged\") || !acequire.toUrl) {\n workerUrl = workerUrl || config.moduleUrl(mod.id, \"worker\");\n } else {\n var normalizePath = this.$normalizePath;\n workerUrl = workerUrl || normalizePath(acequire.toUrl(\"ace/worker/worker.js\", null, \"_\"));\n\n var tlns = {};\n topLevelNamespaces.forEach(function(ns) {\n tlns[ns] = normalizePath(acequire.toUrl(ns, null, \"_\").replace(/(\\.js)?(\\?.*)?$/, \"\"));\n });\n }\n\n this.$worker = createWorker(workerUrl, mod);\n if (importScripts) {\n this.send(\"importScripts\", importScripts);\n }\n this.$worker.postMessage({\n init : true,\n tlns : tlns,\n module : mod.id,\n classname : classname\n });\n\n this.callbackId = 1;\n this.callbacks = {};\n\n this.$worker.onmessage = this.onMessage;\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.onMessage = function(e) {\n var msg = e.data;\n switch (msg.type) {\n case \"event\":\n this._signal(msg.name, {data: msg.data});\n break;\n case \"call\":\n var callback = this.callbacks[msg.id];\n if (callback) {\n callback(msg.data);\n delete this.callbacks[msg.id];\n }\n break;\n case \"error\":\n this.reportError(msg.data);\n break;\n case \"log\":\n window.console && console.log && console.log.apply(console, msg.data);\n break;\n }\n };\n \n this.reportError = function(err) {\n window.console && console.error && console.error(err);\n };\n\n this.$normalizePath = function(path) {\n return net.qualifyURL(path);\n };\n\n this.terminate = function() {\n this._signal(\"terminate\", {});\n this.deltaQueue = null;\n this.$worker.terminate();\n this.$worker = null;\n if (this.$doc)\n this.$doc.off(\"change\", this.changeListener);\n this.$doc = null;\n };\n\n this.send = function(cmd, args) {\n this.$worker.postMessage({command: cmd, args: args});\n };\n\n this.call = function(cmd, args, callback) {\n if (callback) {\n var id = this.callbackId++;\n this.callbacks[id] = callback;\n args.push(id);\n }\n this.send(cmd, args);\n };\n\n this.emit = function(event, data) {\n try {\n this.$worker.postMessage({event: event, data: {data: data.data}});\n }\n catch(ex) {\n console.error(ex.stack);\n }\n };\n\n this.attachToDocument = function(doc) {\n if (this.$doc)\n this.terminate();\n\n this.$doc = doc;\n this.call(\"setValue\", [doc.getValue()]);\n doc.on(\"change\", this.changeListener);\n };\n\n this.changeListener = function(delta) {\n if (!this.deltaQueue) {\n this.deltaQueue = [];\n setTimeout(this.$sendDeltaQueue, 0);\n }\n if (delta.action == \"insert\")\n this.deltaQueue.push(delta.start, delta.lines);\n else\n this.deltaQueue.push(delta.start, delta.end);\n };\n\n this.$sendDeltaQueue = function() {\n var q = this.deltaQueue;\n if (!q) return;\n this.deltaQueue = null;\n if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {\n this.call(\"setValue\", [this.$doc.getValue()]);\n } else\n this.emit(\"change\", {data: q});\n };\n\n}).call(WorkerClient.prototype);\n\n\nvar UIWorkerClient = function(topLevelNamespaces, mod, classname) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.callbackId = 1;\n this.callbacks = {};\n this.messageBuffer = [];\n\n var main = null;\n var emitSync = false;\n var sender = Object.create(EventEmitter);\n var _self = this;\n\n this.$worker = {};\n this.$worker.terminate = function() {};\n this.$worker.postMessage = function(e) {\n _self.messageBuffer.push(e);\n if (main) {\n if (emitSync)\n setTimeout(processNext);\n else\n processNext();\n }\n };\n this.setEmitSync = function(val) { emitSync = val; };\n\n var processNext = function() {\n var msg = _self.messageBuffer.shift();\n if (msg.command)\n main[msg.command].apply(main, msg.args);\n else if (msg.event)\n sender._signal(msg.event, msg.data);\n };\n\n sender.postMessage = function(msg) {\n _self.onMessage({data: msg});\n };\n sender.callback = function(data, callbackId) {\n this.postMessage({type: \"call\", id: callbackId, data: data});\n };\n sender.emit = function(name, data) {\n this.postMessage({type: \"event\", name: name, data: data});\n };\n\n config.loadModule([\"worker\", mod], function(Main) {\n main = new Main[classname](sender);\n while (_self.messageBuffer.length)\n processNext();\n });\n};\n\nUIWorkerClient.prototype = WorkerClient.prototype;\n\nexports.UIWorkerClient = UIWorkerClient;\nexports.WorkerClient = WorkerClient;\nexports.createWorker = createWorker;\n\n\n});\n\nace.define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar oop = acequire(\"./lib/oop\");\n\nvar PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {\n var _self = this;\n this.length = length;\n this.session = session;\n this.doc = session.getDocument();\n this.mainClass = mainClass;\n this.othersClass = othersClass;\n this.$onUpdate = this.onUpdate.bind(this);\n this.doc.on(\"change\", this.$onUpdate);\n this.$others = others;\n \n this.$onCursorChange = function() {\n setTimeout(function() {\n _self.onCursorChange();\n });\n };\n \n this.$pos = pos;\n var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};\n this.$undoStackDepth = undoStack.length;\n this.setup();\n\n session.selection.on(\"changeCursor\", this.$onCursorChange);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setup = function() {\n var _self = this;\n var doc = this.doc;\n var session = this.session;\n \n this.selectionBefore = session.selection.toJSON();\n if (session.selection.inMultiSelectMode)\n session.selection.toSingleRange();\n\n this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);\n var pos = this.pos;\n pos.$insertRight = true;\n pos.detach();\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);\n this.others = [];\n this.$others.forEach(function(other) {\n var anchor = doc.createAnchor(other.row, other.column);\n anchor.$insertRight = true;\n anchor.detach();\n _self.others.push(anchor);\n });\n session.setUndoSelect(false);\n };\n this.showOtherMarkers = function() {\n if (this.othersActive) return;\n var session = this.session;\n var _self = this;\n this.othersActive = true;\n this.others.forEach(function(anchor) {\n anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);\n });\n };\n this.hideOtherMarkers = function() {\n if (!this.othersActive) return;\n this.othersActive = false;\n for (var i = 0; i < this.others.length; i++) {\n this.session.removeMarker(this.others[i].markerId);\n }\n };\n this.onUpdate = function(delta) {\n if (this.$updating)\n return this.updateAnchors(delta);\n \n var range = delta;\n if (range.start.row !== range.end.row) return;\n if (range.start.row !== this.pos.row) return;\n this.$updating = true;\n var lengthDiff = delta.action === \"insert\" ? range.end.column - range.start.column : range.start.column - range.end.column;\n var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;\n var distanceFromStart = range.start.column - this.pos.column;\n \n this.updateAnchors(delta);\n \n if (inMainRange)\n this.length += lengthDiff;\n\n if (inMainRange && !this.session.$fromUndo) {\n if (delta.action === 'insert') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.insertMergedLines(newPos, delta.lines);\n }\n } else if (delta.action === 'remove') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));\n }\n }\n }\n \n this.$updating = false;\n this.updateMarkers();\n };\n \n this.updateAnchors = function(delta) {\n this.pos.onChange(delta);\n for (var i = this.others.length; i--;)\n this.others[i].onChange(delta);\n this.updateMarkers();\n };\n \n this.updateMarkers = function() {\n if (this.$updating)\n return;\n var _self = this;\n var session = this.session;\n var updateMarker = function(pos, className) {\n session.removeMarker(pos.markerId);\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false);\n };\n updateMarker(this.pos, this.mainClass);\n for (var i = this.others.length; i--;)\n updateMarker(this.others[i], this.othersClass);\n };\n\n this.onCursorChange = function(event) {\n if (this.$updating || !this.session) return;\n var pos = this.session.selection.getCursor();\n if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {\n this.showOtherMarkers();\n this._emit(\"cursorEnter\", event);\n } else {\n this.hideOtherMarkers();\n this._emit(\"cursorLeave\", event);\n }\n }; \n this.detach = function() {\n this.session.removeMarker(this.pos && this.pos.markerId);\n this.hideOtherMarkers();\n this.doc.removeEventListener(\"change\", this.$onUpdate);\n this.session.selection.removeEventListener(\"changeCursor\", this.$onCursorChange);\n this.session.setUndoSelect(true);\n this.session = null;\n };\n this.cancel = function() {\n if (this.$undoStackDepth === -1)\n return;\n var undoManager = this.session.getUndoManager();\n var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;\n for (var i = 0; i < undosRequired; i++) {\n undoManager.undo(true);\n }\n if (this.selectionBefore)\n this.session.selection.fromJSON(this.selectionBefore);\n };\n}).call(PlaceHolder.prototype);\n\n\nexports.PlaceHolder = PlaceHolder;\n});\n\nace.define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\n\nfunction onMouseDown(e) {\n var ev = e.domEvent;\n var alt = ev.altKey;\n var shift = ev.shiftKey;\n var ctrl = ev.ctrlKey;\n var accel = e.getAccelKey();\n var button = e.getButton();\n \n if (ctrl && useragent.isMac)\n button = ev.button;\n\n if (e.editor.inMultiSelectMode && button == 2) {\n e.editor.textInput.onContextMenu(e.domEvent);\n return;\n }\n \n if (!ctrl && !alt && !accel) {\n if (button === 0 && e.editor.inMultiSelectMode)\n e.editor.exitMultiSelectMode();\n return;\n }\n \n if (button !== 0)\n return;\n\n var editor = e.editor;\n var selection = editor.selection;\n var isMultiSelect = editor.inMultiSelectMode;\n var pos = e.getDocumentPosition();\n var cursor = selection.getCursor();\n var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));\n\n var mouseX = e.x, mouseY = e.y;\n var onMouseSelection = function(e) {\n mouseX = e.clientX;\n mouseY = e.clientY;\n };\n \n var session = editor.session;\n var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var screenCursor = screenAnchor;\n \n var selectionMode;\n if (editor.$mouseHandler.$enableJumpToDef) {\n if (ctrl && alt || accel && alt)\n selectionMode = shift ? \"block\" : \"add\";\n else if (alt && editor.$blockSelectEnabled)\n selectionMode = \"block\";\n } else {\n if (accel && !alt) {\n selectionMode = \"add\";\n if (!isMultiSelect && shift)\n return;\n } else if (alt && editor.$blockSelectEnabled) {\n selectionMode = \"block\";\n }\n }\n \n if (selectionMode && useragent.isMac && ev.ctrlKey) {\n editor.$mouseHandler.cancelContextMenu();\n }\n\n if (selectionMode == \"add\") {\n if (!isMultiSelect && inSelection)\n return; // dragging\n\n if (!isMultiSelect) {\n var range = selection.toOrientedRange();\n editor.addSelectionMarker(range);\n }\n\n var oldRange = selection.rangeList.rangeAtPoint(pos);\n \n \n editor.$blockScrolling++;\n editor.inVirtualSelectionMode = true;\n \n if (shift) {\n oldRange = null;\n range = selection.ranges[0] || range;\n editor.removeSelectionMarker(range);\n }\n editor.once(\"mouseup\", function() {\n var tmpSel = selection.toOrientedRange();\n\n if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))\n selection.substractPoint(tmpSel.cursor);\n else {\n if (shift) {\n selection.substractPoint(range.cursor);\n } else if (range) {\n editor.removeSelectionMarker(range);\n selection.addRange(range);\n }\n selection.addRange(tmpSel);\n }\n editor.$blockScrolling--;\n editor.inVirtualSelectionMode = false;\n });\n\n } else if (selectionMode == \"block\") {\n e.stop();\n editor.inVirtualSelectionMode = true; \n var initialRange;\n var rectSel = [];\n var blockSelect = function() {\n var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX);\n\n if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))\n return;\n screenCursor = newCursor;\n \n editor.$blockScrolling++;\n editor.selection.moveToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n\n editor.removeSelectionMarkers(rectSel);\n rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);\n if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())\n rectSel[0] = editor.$mouseHandler.$clickSelection.clone();\n rectSel.forEach(editor.addSelectionMarker, editor);\n editor.updateSelectionMarkers();\n editor.$blockScrolling--;\n };\n editor.$blockScrolling++;\n if (isMultiSelect && !accel) {\n selection.toSingleRange();\n } else if (!isMultiSelect && accel) {\n initialRange = selection.toOrientedRange();\n editor.addSelectionMarker(initialRange);\n }\n \n if (shift)\n screenAnchor = session.documentToScreenPosition(selection.lead); \n else\n selection.moveToPosition(pos);\n editor.$blockScrolling--;\n \n screenCursor = {row: -1, column: -1};\n\n var onMouseSelectionEnd = function(e) {\n clearInterval(timerId);\n editor.removeSelectionMarkers(rectSel);\n if (!rectSel.length)\n rectSel = [selection.toOrientedRange()];\n editor.$blockScrolling++;\n if (initialRange) {\n editor.removeSelectionMarker(initialRange);\n selection.toSingleRange(initialRange);\n }\n for (var i = 0; i < rectSel.length; i++)\n selection.addRange(rectSel[i]);\n editor.inVirtualSelectionMode = false;\n editor.$mouseHandler.$clickSelection = null;\n editor.$blockScrolling--;\n };\n\n var onSelectionInterval = blockSelect;\n\n event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);\n var timerId = setInterval(function() {onSelectionInterval();}, 20);\n\n return e.preventDefault();\n }\n}\n\n\nexports.onMouseDown = onMouseDown;\n\n});\n\nace.define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"], function(acequire, exports, module) {\nexports.defaultCommands = [{\n name: \"addCursorAbove\",\n exec: function(editor) { editor.selectMoreLines(-1); },\n bindKey: {win: \"Ctrl-Alt-Up\", mac: \"Ctrl-Alt-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelow\",\n exec: function(editor) { editor.selectMoreLines(1); },\n bindKey: {win: \"Ctrl-Alt-Down\", mac: \"Ctrl-Alt-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorAboveSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Up\", mac: \"Ctrl-Alt-Shift-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelowSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Down\", mac: \"Ctrl-Alt-Shift-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreBefore\",\n exec: function(editor) { editor.selectMore(-1); },\n bindKey: {win: \"Ctrl-Alt-Left\", mac: \"Ctrl-Alt-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreAfter\",\n exec: function(editor) { editor.selectMore(1); },\n bindKey: {win: \"Ctrl-Alt-Right\", mac: \"Ctrl-Alt-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextBefore\",\n exec: function(editor) { editor.selectMore(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Left\", mac: \"Ctrl-Alt-Shift-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextAfter\",\n exec: function(editor) { editor.selectMore(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Right\", mac: \"Ctrl-Alt-Shift-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"splitIntoLines\",\n exec: function(editor) { editor.multiSelect.splitIntoLines(); },\n bindKey: {win: \"Ctrl-Alt-L\", mac: \"Ctrl-Alt-L\"},\n readOnly: true\n}, {\n name: \"alignCursors\",\n exec: function(editor) { editor.alignCursors(); },\n bindKey: {win: \"Ctrl-Alt-A\", mac: \"Ctrl-Alt-A\"},\n scrollIntoView: \"cursor\"\n}, {\n name: \"findAll\",\n exec: function(editor) { editor.findAll(); },\n bindKey: {win: \"Ctrl-Alt-K\", mac: \"Ctrl-Alt-G\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}];\nexports.multiSelectCommands = [{\n name: \"singleSelection\",\n bindKey: \"esc\",\n exec: function(editor) { editor.exitMultiSelectMode(); },\n scrollIntoView: \"cursor\",\n readOnly: true,\n isAvailable: function(editor) {return editor && editor.inMultiSelectMode;}\n}];\n\nvar HashHandler = acequire(\"../keyboard/hash_handler\").HashHandler;\nexports.keyboardHandler = new HashHandler(exports.multiSelectCommands);\n\n});\n\nace.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\",\"ace/config\"], function(acequire, exports, module) {\n\nvar RangeList = acequire(\"./range_list\").RangeList;\nvar Range = acequire(\"./range\").Range;\nvar Selection = acequire(\"./selection\").Selection;\nvar onMouseDown = acequire(\"./mouse/multi_select_handler\").onMouseDown;\nvar event = acequire(\"./lib/event\");\nvar lang = acequire(\"./lib/lang\");\nvar commands = acequire(\"./commands/multi_select_commands\");\nexports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);\nvar Search = acequire(\"./search\").Search;\nvar search = new Search();\n\nfunction find(session, needle, dir) {\n search.$options.wrap = true;\n search.$options.needle = needle;\n search.$options.backwards = dir == -1;\n return search.find(session);\n}\nvar EditSession = acequire(\"./edit_session\").EditSession;\n(function() {\n this.getSelectionMarkers = function() {\n return this.$selectionMarkers;\n };\n}).call(EditSession.prototype);\n(function() {\n this.ranges = null;\n this.rangeList = null;\n this.addRange = function(range, $blockChangeEvents) {\n if (!range)\n return;\n\n if (!this.inMultiSelectMode && this.rangeCount === 0) {\n var oldRange = this.toOrientedRange();\n this.rangeList.add(oldRange);\n this.rangeList.add(range);\n if (this.rangeList.ranges.length != 2) {\n this.rangeList.removeAll();\n return $blockChangeEvents || this.fromOrientedRange(range);\n }\n this.rangeList.removeAll();\n this.rangeList.add(oldRange);\n this.$onAddRange(oldRange);\n }\n\n if (!range.cursor)\n range.cursor = range.end;\n\n var removed = this.rangeList.add(range);\n\n this.$onAddRange(range);\n\n if (removed.length)\n this.$onRemoveRange(removed);\n\n if (this.rangeCount > 1 && !this.inMultiSelectMode) {\n this._signal(\"multiSelect\");\n this.inMultiSelectMode = true;\n this.session.$undoSelect = false;\n this.rangeList.attach(this.session);\n }\n\n return $blockChangeEvents || this.fromOrientedRange(range);\n };\n\n this.toSingleRange = function(range) {\n range = range || this.ranges[0];\n var removed = this.rangeList.removeAll();\n if (removed.length)\n this.$onRemoveRange(removed);\n\n range && this.fromOrientedRange(range);\n };\n this.substractPoint = function(pos) {\n var removed = this.rangeList.substractPoint(pos);\n if (removed) {\n this.$onRemoveRange(removed);\n return removed[0];\n }\n };\n this.mergeOverlappingRanges = function() {\n var removed = this.rangeList.merge();\n if (removed.length)\n this.$onRemoveRange(removed);\n else if(this.ranges[0])\n this.fromOrientedRange(this.ranges[0]);\n };\n\n this.$onAddRange = function(range) {\n this.rangeCount = this.rangeList.ranges.length;\n this.ranges.unshift(range);\n this._signal(\"addRange\", {range: range});\n };\n\n this.$onRemoveRange = function(removed) {\n this.rangeCount = this.rangeList.ranges.length;\n if (this.rangeCount == 1 && this.inMultiSelectMode) {\n var lastRange = this.rangeList.ranges.pop();\n removed.push(lastRange);\n this.rangeCount = 0;\n }\n\n for (var i = removed.length; i--; ) {\n var index = this.ranges.indexOf(removed[i]);\n this.ranges.splice(index, 1);\n }\n\n this._signal(\"removeRange\", {ranges: removed});\n\n if (this.rangeCount === 0 && this.inMultiSelectMode) {\n this.inMultiSelectMode = false;\n this._signal(\"singleSelect\");\n this.session.$undoSelect = true;\n this.rangeList.detach(this.session);\n }\n\n lastRange = lastRange || this.ranges[0];\n if (lastRange && !lastRange.isEqual(this.getRange()))\n this.fromOrientedRange(lastRange);\n };\n this.$initRangeList = function() {\n if (this.rangeList)\n return;\n\n this.rangeList = new RangeList();\n this.ranges = [];\n this.rangeCount = 0;\n };\n this.getAllRanges = function() {\n return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];\n };\n\n this.splitIntoLines = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var range = this.getRange();\n var isBackwards = this.isBackwards();\n var startRow = range.start.row;\n var endRow = range.end.row;\n if (startRow == endRow) {\n if (isBackwards)\n var start = range.end, end = range.start;\n else\n var start = range.start, end = range.end;\n \n this.addRange(Range.fromPoints(end, end));\n this.addRange(Range.fromPoints(start, start));\n return;\n }\n\n var rectSel = [];\n var r = this.getLineRange(startRow, true);\n r.start.column = range.start.column;\n rectSel.push(r);\n\n for (var i = startRow + 1; i < endRow; i++)\n rectSel.push(this.getLineRange(i, true));\n\n r = this.getLineRange(endRow, true);\n r.end.column = range.end.column;\n rectSel.push(r);\n\n rectSel.forEach(this.addRange, this);\n }\n };\n this.toggleBlockSelection = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var cursor = this.session.documentToScreenPosition(this.selectionLead);\n var anchor = this.session.documentToScreenPosition(this.selectionAnchor);\n\n var rectSel = this.rectangularRangeBlock(cursor, anchor);\n rectSel.forEach(this.addRange, this);\n }\n };\n this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {\n var rectSel = [];\n\n var xBackwards = screenCursor.column < screenAnchor.column;\n if (xBackwards) {\n var startColumn = screenCursor.column;\n var endColumn = screenAnchor.column;\n var startOffsetX = screenCursor.offsetX;\n var endOffsetX = screenAnchor.offsetX;\n } else {\n var startColumn = screenAnchor.column;\n var endColumn = screenCursor.column;\n var startOffsetX = screenAnchor.offsetX;\n var endOffsetX = screenCursor.offsetX;\n }\n\n var yBackwards = screenCursor.row < screenAnchor.row;\n if (yBackwards) {\n var startRow = screenCursor.row;\n var endRow = screenAnchor.row;\n } else {\n var startRow = screenAnchor.row;\n var endRow = screenCursor.row;\n }\n\n if (startColumn < 0)\n startColumn = 0;\n if (startRow < 0)\n startRow = 0;\n\n if (startRow == endRow)\n includeEmptyLines = true;\n\n for (var row = startRow; row <= endRow; row++) {\n var range = Range.fromPoints(\n this.session.screenToDocumentPosition(row, startColumn, startOffsetX),\n this.session.screenToDocumentPosition(row, endColumn, endOffsetX)\n );\n if (range.isEmpty()) {\n if (docEnd && isSamePoint(range.end, docEnd))\n break;\n var docEnd = range.end;\n }\n range.cursor = xBackwards ? range.start : range.end;\n rectSel.push(range);\n }\n\n if (yBackwards)\n rectSel.reverse();\n\n if (!includeEmptyLines) {\n var end = rectSel.length - 1;\n while (rectSel[end].isEmpty() && end > 0)\n end--;\n if (end > 0) {\n var start = 0;\n while (rectSel[start].isEmpty())\n start++;\n }\n for (var i = end; i >= start; i--) {\n if (rectSel[i].isEmpty())\n rectSel.splice(i, 1);\n }\n }\n\n return rectSel;\n };\n}).call(Selection.prototype);\nvar Editor = acequire(\"./editor\").Editor;\n(function() {\n this.updateSelectionMarkers = function() {\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.addSelectionMarker = function(orientedRange) {\n if (!orientedRange.cursor)\n orientedRange.cursor = orientedRange.end;\n\n var style = this.getSelectionStyle();\n orientedRange.marker = this.session.addMarker(orientedRange, \"ace_selection\", style);\n\n this.session.$selectionMarkers.push(orientedRange);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n return orientedRange;\n };\n this.removeSelectionMarker = function(range) {\n if (!range.marker)\n return;\n this.session.removeMarker(range.marker);\n var index = this.session.$selectionMarkers.indexOf(range);\n if (index != -1)\n this.session.$selectionMarkers.splice(index, 1);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n };\n\n this.removeSelectionMarkers = function(ranges) {\n var markerList = this.session.$selectionMarkers;\n for (var i = ranges.length; i--; ) {\n var range = ranges[i];\n if (!range.marker)\n continue;\n this.session.removeMarker(range.marker);\n var index = markerList.indexOf(range);\n if (index != -1)\n markerList.splice(index, 1);\n }\n this.session.selectionMarkerCount = markerList.length;\n };\n\n this.$onAddRange = function(e) {\n this.addSelectionMarker(e.range);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onRemoveRange = function(e) {\n this.removeSelectionMarkers(e.ranges);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onMultiSelect = function(e) {\n if (this.inMultiSelectMode)\n return;\n this.inMultiSelectMode = true;\n\n this.setStyle(\"ace_multiselect\");\n this.keyBinding.addKeyboardHandler(commands.keyboardHandler);\n this.commands.setDefaultHandler(\"exec\", this.$onMultiSelectExec);\n\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onSingleSelect = function(e) {\n if (this.session.multiSelect.inVirtualMode)\n return;\n this.inMultiSelectMode = false;\n\n this.unsetStyle(\"ace_multiselect\");\n this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);\n\n this.commands.removeDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n this._emit(\"changeSelection\");\n };\n\n this.$onMultiSelectExec = function(e) {\n var command = e.command;\n var editor = e.editor;\n if (!editor.multiSelect)\n return;\n if (!command.multiSelectAction) {\n var result = command.exec(editor, e.args || {});\n editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());\n editor.multiSelect.mergeOverlappingRanges();\n } else if (command.multiSelectAction == \"forEach\") {\n result = editor.forEachSelection(command, e.args);\n } else if (command.multiSelectAction == \"forEachLine\") {\n result = editor.forEachSelection(command, e.args, true);\n } else if (command.multiSelectAction == \"single\") {\n editor.exitMultiSelectMode();\n result = command.exec(editor, e.args || {});\n } else {\n result = command.multiSelectAction(editor, e.args || {});\n }\n return result;\n }; \n this.forEachSelection = function(cmd, args, options) {\n if (this.inVirtualSelectionMode)\n return;\n var keepOrder = options && options.keepOrder;\n var $byLines = options == true || options && options.$byLines;\n var session = this.session;\n var selection = this.selection;\n var rangeList = selection.rangeList;\n var ranges = (keepOrder ? selection : rangeList).ranges;\n var result;\n \n if (!ranges.length)\n return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n \n var reg = selection._eventRegistry;\n selection._eventRegistry = {};\n\n var tmpSel = new Selection(session);\n this.inVirtualSelectionMode = true;\n for (var i = ranges.length; i--;) {\n if ($byLines) {\n while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)\n i--;\n }\n tmpSel.fromOrientedRange(ranges[i]);\n tmpSel.index = i;\n this.selection = session.selection = tmpSel;\n var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n if (!result && cmdResult !== undefined)\n result = cmdResult;\n tmpSel.toOrientedRange(ranges[i]);\n }\n tmpSel.detach();\n\n this.selection = session.selection = selection;\n this.inVirtualSelectionMode = false;\n selection._eventRegistry = reg;\n selection.mergeOverlappingRanges();\n \n var anim = this.renderer.$scrollAnimation;\n this.onCursorChange();\n this.onSelectionChange();\n if (anim && anim.from == anim.to)\n this.renderer.animateScrolling(anim.from);\n \n return result;\n };\n this.exitMultiSelectMode = function() {\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode)\n return;\n this.multiSelect.toSingleRange();\n };\n\n this.getSelectedText = function() {\n var text = \"\";\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var ranges = this.multiSelect.rangeList.ranges;\n var buf = [];\n for (var i = 0; i < ranges.length; i++) {\n buf.push(this.session.getTextRange(ranges[i]));\n }\n var nl = this.session.getDocument().getNewLineCharacter();\n text = buf.join(nl);\n if (text.length == (buf.length - 1) * nl.length)\n text = \"\";\n } else if (!this.selection.isEmpty()) {\n text = this.session.getTextRange(this.getSelectionRange());\n }\n return text;\n };\n \n this.$checkMultiselectChange = function(e, anchor) {\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var range = this.multiSelect.ranges[0];\n if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)\n return;\n var pos = anchor == this.multiSelect.anchor\n ? range.cursor == range.start ? range.end : range.start\n : range.cursor;\n if (pos.row != anchor.row \n || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)\n this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());\n }\n };\n this.findAll = function(needle, options, additive) {\n options = options || {};\n options.needle = needle || options.needle;\n if (options.needle == undefined) {\n var range = this.selection.isEmpty()\n ? this.selection.getWordRange()\n : this.selection.getRange();\n options.needle = this.session.getTextRange(range);\n } \n this.$search.set(options);\n \n var ranges = this.$search.findAll(this.session);\n if (!ranges.length)\n return 0;\n\n this.$blockScrolling += 1;\n var selection = this.multiSelect;\n\n if (!additive)\n selection.toSingleRange(ranges[0]);\n\n for (var i = ranges.length; i--; )\n selection.addRange(ranges[i], true);\n if (range && selection.rangeList.rangeAtPoint(range.start))\n selection.addRange(range, true);\n \n this.$blockScrolling -= 1;\n\n return ranges.length;\n };\n this.selectMoreLines = function(dir, skip) {\n var range = this.selection.toOrientedRange();\n var isBackwards = range.cursor == range.end;\n\n var screenLead = this.session.documentToScreenPosition(range.cursor);\n if (this.selection.$desiredColumn)\n screenLead.column = this.selection.$desiredColumn;\n\n var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);\n\n if (!range.isEmpty()) {\n var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);\n var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);\n } else {\n var anchor = lead;\n }\n\n if (isBackwards) {\n var newRange = Range.fromPoints(lead, anchor);\n newRange.cursor = newRange.start;\n } else {\n var newRange = Range.fromPoints(anchor, lead);\n newRange.cursor = newRange.end;\n }\n\n newRange.desiredColumn = screenLead.column;\n if (!this.selection.inMultiSelectMode) {\n this.selection.addRange(range);\n } else {\n if (skip)\n var toRemove = range.cursor;\n }\n\n this.selection.addRange(newRange);\n if (toRemove)\n this.selection.substractPoint(toRemove);\n };\n this.transposeSelections = function(dir) {\n var session = this.session;\n var sel = session.multiSelect;\n var all = sel.ranges;\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n if (range.isEmpty()) {\n var tmp = session.getWordRange(range.start.row, range.start.column);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n range.end.row = tmp.end.row;\n range.end.column = tmp.end.column;\n }\n }\n sel.mergeOverlappingRanges();\n\n var words = [];\n for (var i = all.length; i--; ) {\n var range = all[i];\n words.unshift(session.getTextRange(range));\n }\n\n if (dir < 0)\n words.unshift(words.pop());\n else\n words.push(words.shift());\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n var tmp = range.clone();\n session.replace(range, words[i]);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n }\n };\n this.selectMore = function(dir, skip, stopAtFirst) {\n var session = this.session;\n var sel = session.multiSelect;\n\n var range = sel.toOrientedRange();\n if (range.isEmpty()) {\n range = session.getWordRange(range.start.row, range.start.column);\n range.cursor = dir == -1 ? range.start : range.end;\n this.multiSelect.addRange(range);\n if (stopAtFirst)\n return;\n }\n var needle = session.getTextRange(range);\n\n var newRange = find(session, needle, dir);\n if (newRange) {\n newRange.cursor = dir == -1 ? newRange.start : newRange.end;\n this.$blockScrolling += 1;\n this.session.unfold(newRange);\n this.multiSelect.addRange(newRange);\n this.$blockScrolling -= 1;\n this.renderer.scrollCursorIntoView(null, 0.5);\n }\n if (skip)\n this.multiSelect.substractPoint(range.cursor);\n };\n this.alignCursors = function() {\n var session = this.session;\n var sel = session.multiSelect;\n var ranges = sel.ranges;\n var row = -1;\n var sameRowRanges = ranges.filter(function(r) {\n if (r.cursor.row == row)\n return true;\n row = r.cursor.row;\n });\n \n if (!ranges.length || sameRowRanges.length == ranges.length - 1) {\n var range = this.selection.getRange();\n var fr = range.start.row, lr = range.end.row;\n var guessRange = fr == lr;\n if (guessRange) {\n var max = this.session.getLength();\n var line;\n do {\n line = this.session.getLine(lr);\n } while (/[=:]/.test(line) && ++lr < max);\n do {\n line = this.session.getLine(fr);\n } while (/[=:]/.test(line) && --fr > 0);\n \n if (fr < 0) fr = 0;\n if (lr >= max) lr = max - 1;\n }\n var lines = this.session.removeFullLines(fr, lr);\n lines = this.$reAlignText(lines, guessRange);\n this.session.insert({row: fr, column: 0}, lines.join(\"\\n\") + \"\\n\");\n if (!guessRange) {\n range.start.column = 0;\n range.end.column = lines[lines.length - 1].length;\n }\n this.selection.setRange(range);\n } else {\n sameRowRanges.forEach(function(r) {\n sel.substractPoint(r.cursor);\n });\n\n var maxCol = 0;\n var minSpace = Infinity;\n var spaceOffsets = ranges.map(function(r) {\n var p = r.cursor;\n var line = session.getLine(p.row);\n var spaceOffset = line.substr(p.column).search(/\\S/g);\n if (spaceOffset == -1)\n spaceOffset = 0;\n\n if (p.column > maxCol)\n maxCol = p.column;\n if (spaceOffset < minSpace)\n minSpace = spaceOffset;\n return spaceOffset;\n });\n ranges.forEach(function(r, i) {\n var p = r.cursor;\n var l = maxCol - p.column;\n var d = spaceOffsets[i] - minSpace;\n if (l > d)\n session.insert(p, lang.stringRepeat(\" \", l - d));\n else\n session.remove(new Range(p.row, p.column, p.row, p.column - l + d));\n\n r.start.column = r.end.column = maxCol;\n r.start.row = r.end.row = p.row;\n r.cursor = r.end;\n });\n sel.fromOrientedRange(ranges[0]);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n }\n };\n\n this.$reAlignText = function(lines, forceLeft) {\n var isLeftAligned = true, isRightAligned = true;\n var startW, textW, endW;\n\n return lines.map(function(line) {\n var m = line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);\n if (!m)\n return [line];\n\n if (startW == null) {\n startW = m[1].length;\n textW = m[2].length;\n endW = m[3].length;\n return m;\n }\n\n if (startW + textW + endW != m[1].length + m[2].length + m[3].length)\n isRightAligned = false;\n if (startW != m[1].length)\n isLeftAligned = false;\n\n if (startW > m[1].length)\n startW = m[1].length;\n if (textW < m[2].length)\n textW = m[2].length;\n if (endW > m[3].length)\n endW = m[3].length;\n\n return m;\n }).map(forceLeft ? alignLeft :\n isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);\n\n function spaces(n) {\n return lang.stringRepeat(\" \", n);\n }\n\n function alignLeft(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(textW - m[2].length + endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function alignRight(m) {\n return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]\n + spaces(endW, \" \")\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function unAlign(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n };\n}).call(Editor.prototype);\n\n\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nexports.onSessionChange = function(e) {\n var session = e.session;\n if (session && !session.multiSelect) {\n session.$selectionMarkers = [];\n session.selection.$initRangeList();\n session.multiSelect = session.selection;\n }\n this.multiSelect = session && session.multiSelect;\n\n var oldSession = e.oldSession;\n if (oldSession) {\n oldSession.multiSelect.off(\"addRange\", this.$onAddRange);\n oldSession.multiSelect.off(\"removeRange\", this.$onRemoveRange);\n oldSession.multiSelect.off(\"multiSelect\", this.$onMultiSelect);\n oldSession.multiSelect.off(\"singleSelect\", this.$onSingleSelect);\n oldSession.multiSelect.lead.off(\"change\", this.$checkMultiselectChange);\n oldSession.multiSelect.anchor.off(\"change\", this.$checkMultiselectChange);\n }\n\n if (session) {\n session.multiSelect.on(\"addRange\", this.$onAddRange);\n session.multiSelect.on(\"removeRange\", this.$onRemoveRange);\n session.multiSelect.on(\"multiSelect\", this.$onMultiSelect);\n session.multiSelect.on(\"singleSelect\", this.$onSingleSelect);\n session.multiSelect.lead.on(\"change\", this.$checkMultiselectChange);\n session.multiSelect.anchor.on(\"change\", this.$checkMultiselectChange);\n }\n\n if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {\n if (session.selection.inMultiSelectMode)\n this.$onMultiSelect();\n else\n this.$onSingleSelect();\n }\n};\nfunction MultiSelect(editor) {\n if (editor.$multiselectOnSessionChange)\n return;\n editor.$onAddRange = editor.$onAddRange.bind(editor);\n editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);\n editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);\n editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);\n editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);\n editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);\n\n editor.$multiselectOnSessionChange(editor);\n editor.on(\"changeSession\", editor.$multiselectOnSessionChange);\n\n editor.on(\"mousedown\", onMouseDown);\n editor.commands.addCommands(commands.defaultCommands);\n\n addAltCursorListeners(editor);\n}\n\nfunction addAltCursorListeners(editor){\n var el = editor.textInput.getElement();\n var altCursor = false;\n event.addListener(el, \"keydown\", function(e) {\n var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);\n if (editor.$blockSelectEnabled && altDown) {\n if (!altCursor) {\n editor.renderer.setMouseCursor(\"crosshair\");\n altCursor = true;\n }\n } else if (altCursor) {\n reset();\n }\n });\n\n event.addListener(el, \"keyup\", reset);\n event.addListener(el, \"blur\", reset);\n function reset(e) {\n if (altCursor) {\n editor.renderer.setMouseCursor(\"\");\n altCursor = false;\n }\n }\n}\n\nexports.MultiSelect = MultiSelect;\n\n\nacequire(\"./config\").defineOptions(Editor.prototype, \"editor\", {\n enableMultiselect: {\n set: function(val) {\n MultiSelect(this);\n if (val) {\n this.on(\"changeSession\", this.$multiselectOnSessionChange);\n this.on(\"mousedown\", onMouseDown);\n } else {\n this.off(\"changeSession\", this.$multiselectOnSessionChange);\n this.off(\"mousedown\", onMouseDown);\n }\n },\n value: true\n },\n enableBlockSelect: {\n set: function(val) {\n this.$blockSelectEnabled = val;\n },\n value: true\n }\n});\n\n\n\n});\n\nace.define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../../range\").Range;\n\nvar FoldMode = exports.FoldMode = function() {};\n\n(function() {\n\n this.foldingStartMarker = null;\n this.foldingStopMarker = null;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.foldingStartMarker.test(line))\n return \"start\";\n if (foldStyle == \"markbeginend\"\n && this.foldingStopMarker\n && this.foldingStopMarker.test(line))\n return \"end\";\n return \"\";\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row) {\n return null;\n };\n\n this.indentationBlock = function(session, row, column) {\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1)\n return;\n\n var startColumn = column || line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n\n while (++row < maxRow) {\n var level = session.getLine(row).search(re);\n\n if (level == -1)\n continue;\n\n if (level <= startLevel)\n break;\n\n endRow = row;\n }\n\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n\n this.openingBracketBlock = function(session, bracket, row, column, typeRe) {\n var start = {row: row, column: column + 1};\n var end = session.$findClosingBracket(bracket, start, typeRe);\n if (!end)\n return;\n\n var fw = session.foldWidgets[end.row];\n if (fw == null)\n fw = session.getFoldWidget(end.row);\n\n if (fw == \"start\" && end.row > start.row) {\n end.row --;\n end.column = session.getLine(end.row).length;\n }\n return Range.fromPoints(start, end);\n };\n\n this.closingBracketBlock = function(session, bracket, row, column, typeRe) {\n var end = {row: row, column: column};\n var start = session.$findOpeningBracket(bracket, end);\n\n if (!start)\n return;\n\n start.column++;\n end.column--;\n\n return Range.fromPoints(start, end);\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.isDark = false;\nexports.cssClass = \"ace-tm\";\nexports.cssText = \".ace-tm .ace_gutter {\\\nbackground: #f0f0f0;\\\ncolor: #333;\\\n}\\\n.ace-tm .ace_print-margin {\\\nwidth: 1px;\\\nbackground: #e8e8e8;\\\n}\\\n.ace-tm .ace_fold {\\\nbackground-color: #6B72E6;\\\n}\\\n.ace-tm {\\\nbackground-color: #FFFFFF;\\\ncolor: black;\\\n}\\\n.ace-tm .ace_cursor {\\\ncolor: black;\\\n}\\\n.ace-tm .ace_invisible {\\\ncolor: rgb(191, 191, 191);\\\n}\\\n.ace-tm .ace_storage,\\\n.ace-tm .ace_keyword {\\\ncolor: blue;\\\n}\\\n.ace-tm .ace_constant {\\\ncolor: rgb(197, 6, 11);\\\n}\\\n.ace-tm .ace_constant.ace_buildin {\\\ncolor: rgb(88, 72, 246);\\\n}\\\n.ace-tm .ace_constant.ace_language {\\\ncolor: rgb(88, 92, 246);\\\n}\\\n.ace-tm .ace_constant.ace_library {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_invalid {\\\nbackground-color: rgba(255, 0, 0, 0.1);\\\ncolor: red;\\\n}\\\n.ace-tm .ace_support.ace_function {\\\ncolor: rgb(60, 76, 114);\\\n}\\\n.ace-tm .ace_support.ace_constant {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_support.ace_type,\\\n.ace-tm .ace_support.ace_class {\\\ncolor: rgb(109, 121, 222);\\\n}\\\n.ace-tm .ace_keyword.ace_operator {\\\ncolor: rgb(104, 118, 135);\\\n}\\\n.ace-tm .ace_string {\\\ncolor: rgb(3, 106, 7);\\\n}\\\n.ace-tm .ace_comment {\\\ncolor: rgb(76, 136, 107);\\\n}\\\n.ace-tm .ace_comment.ace_doc {\\\ncolor: rgb(0, 102, 255);\\\n}\\\n.ace-tm .ace_comment.ace_doc.ace_tag {\\\ncolor: rgb(128, 159, 191);\\\n}\\\n.ace-tm .ace_constant.ace_numeric {\\\ncolor: rgb(0, 0, 205);\\\n}\\\n.ace-tm .ace_variable {\\\ncolor: rgb(49, 132, 149);\\\n}\\\n.ace-tm .ace_xml-pe {\\\ncolor: rgb(104, 104, 91);\\\n}\\\n.ace-tm .ace_entity.ace_name.ace_function {\\\ncolor: #0000A2;\\\n}\\\n.ace-tm .ace_heading {\\\ncolor: rgb(12, 7, 255);\\\n}\\\n.ace-tm .ace_list {\\\ncolor:rgb(185, 6, 144);\\\n}\\\n.ace-tm .ace_meta.ace_tag {\\\ncolor:rgb(0, 22, 142);\\\n}\\\n.ace-tm .ace_string.ace_regex {\\\ncolor: rgb(255, 0, 0)\\\n}\\\n.ace-tm .ace_marker-layer .ace_selection {\\\nbackground: rgb(181, 213, 255);\\\n}\\\n.ace-tm.ace_multiselect .ace_selection.ace_start {\\\nbox-shadow: 0 0 3px 0px white;\\\n}\\\n.ace-tm .ace_marker-layer .ace_step {\\\nbackground: rgb(252, 255, 0);\\\n}\\\n.ace-tm .ace_marker-layer .ace_stack {\\\nbackground: rgb(164, 229, 101);\\\n}\\\n.ace-tm .ace_marker-layer .ace_bracket {\\\nmargin: -1px 0 0 -1px;\\\nborder: 1px solid rgb(192, 192, 192);\\\n}\\\n.ace-tm .ace_marker-layer .ace_active-line {\\\nbackground: rgba(0, 0, 0, 0.07);\\\n}\\\n.ace-tm .ace_gutter-active-line {\\\nbackground-color : #dcdcdc;\\\n}\\\n.ace-tm .ace_marker-layer .ace_selected-word {\\\nbackground: rgb(250, 250, 255);\\\nborder: 1px solid rgb(200, 200, 250);\\\n}\\\n.ace-tm .ace_indent-guide {\\\nbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\\\") right repeat-y;\\\n}\\\n\";\n\nvar dom = acequire(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass);\n});\n\nace.define(\"ace/line_widgets\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar Range = acequire(\"./range\").Range;\n\n\nfunction LineWidgets(session) {\n this.session = session;\n this.session.widgetManager = this;\n this.session.getRowLength = this.getRowLength;\n this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;\n this.updateOnChange = this.updateOnChange.bind(this);\n this.renderWidgets = this.renderWidgets.bind(this);\n this.measureWidgets = this.measureWidgets.bind(this);\n this.session._changedWidgets = [];\n this.$onChangeEditor = this.$onChangeEditor.bind(this);\n \n this.session.on(\"change\", this.updateOnChange);\n this.session.on(\"changeFold\", this.updateOnFold);\n this.session.on(\"changeEditor\", this.$onChangeEditor);\n}\n\n(function() {\n this.getRowLength = function(row) {\n var h;\n if (this.lineWidgets)\n h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0;\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n\n this.$getWidgetScreenLength = function() {\n var screenRows = 0;\n this.lineWidgets.forEach(function(w){\n if (w && w.rowCount && !w.hidden)\n screenRows += w.rowCount;\n });\n return screenRows;\n }; \n \n this.$onChangeEditor = function(e) {\n this.attach(e.editor);\n };\n \n this.attach = function(editor) {\n if (editor && editor.widgetManager && editor.widgetManager != this)\n editor.widgetManager.detach();\n\n if (this.editor == editor)\n return;\n\n this.detach();\n this.editor = editor;\n \n if (editor) {\n editor.widgetManager = this;\n editor.renderer.on(\"beforeRender\", this.measureWidgets);\n editor.renderer.on(\"afterRender\", this.renderWidgets);\n }\n };\n this.detach = function(e) {\n var editor = this.editor;\n if (!editor)\n return;\n \n this.editor = null;\n editor.widgetManager = null;\n \n editor.renderer.off(\"beforeRender\", this.measureWidgets);\n editor.renderer.off(\"afterRender\", this.renderWidgets);\n var lineWidgets = this.session.lineWidgets;\n lineWidgets && lineWidgets.forEach(function(w) {\n if (w && w.el && w.el.parentNode) {\n w._inDocument = false;\n w.el.parentNode.removeChild(w.el);\n }\n });\n };\n\n this.updateOnFold = function(e, session) {\n var lineWidgets = session.lineWidgets;\n if (!lineWidgets || !e.action)\n return;\n var fold = e.data;\n var start = fold.start.row;\n var end = fold.end.row;\n var hide = e.action == \"add\";\n for (var i = start + 1; i < end; i++) {\n if (lineWidgets[i])\n lineWidgets[i].hidden = hide;\n }\n if (lineWidgets[end]) {\n if (hide) {\n if (!lineWidgets[start])\n lineWidgets[start] = lineWidgets[end];\n else\n lineWidgets[end].hidden = hide;\n } else {\n if (lineWidgets[start] == lineWidgets[end])\n lineWidgets[start] = undefined;\n lineWidgets[end].hidden = hide;\n }\n }\n };\n \n this.updateOnChange = function(delta) {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n \n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n } else if (delta.action == 'remove') {\n var removed = lineWidgets.splice(startRow + 1, len);\n removed.forEach(function(w) {\n w && this.removeLineWidget(w);\n }, this);\n this.$updateRows();\n } else {\n var args = new Array(len);\n args.unshift(startRow, 0);\n lineWidgets.splice.apply(lineWidgets, args);\n this.$updateRows();\n }\n };\n \n this.$updateRows = function() {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n var noWidgets = true;\n lineWidgets.forEach(function(w, i) {\n if (w) {\n noWidgets = false;\n w.row = i;\n while (w.$oldWidget) {\n w.$oldWidget.row = i;\n w = w.$oldWidget;\n }\n }\n });\n if (noWidgets)\n this.session.lineWidgets = null;\n };\n\n this.addLineWidget = function(w) {\n if (!this.session.lineWidgets)\n this.session.lineWidgets = new Array(this.session.getLength());\n \n var old = this.session.lineWidgets[w.row];\n if (old) {\n w.$oldWidget = old;\n if (old.el && old.el.parentNode) {\n old.el.parentNode.removeChild(old.el);\n old._inDocument = false;\n }\n }\n \n this.session.lineWidgets[w.row] = w;\n \n w.session = this.session;\n \n var renderer = this.editor.renderer;\n if (w.html && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.innerHTML = w.html;\n }\n if (w.el) {\n dom.addCssClass(w.el, \"ace_lineWidgetContainer\");\n w.el.style.position = \"absolute\";\n w.el.style.zIndex = 5;\n renderer.container.appendChild(w.el);\n w._inDocument = true;\n }\n \n if (!w.coverGutter) {\n w.el.style.zIndex = 3;\n }\n if (w.pixelHeight == null) {\n w.pixelHeight = w.el.offsetHeight;\n }\n if (w.rowCount == null) {\n w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;\n }\n \n var fold = this.session.getFoldAt(w.row, 0);\n w.$fold = fold;\n if (fold) {\n var lineWidgets = this.session.lineWidgets;\n if (w.row == fold.end.row && !lineWidgets[fold.start.row])\n lineWidgets[fold.start.row] = w;\n else\n w.hidden = true;\n }\n \n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n \n this.$updateRows();\n this.renderWidgets(null, renderer);\n this.onWidgetChanged(w);\n return w;\n };\n \n this.removeLineWidget = function(w) {\n w._inDocument = false;\n w.session = null;\n if (w.el && w.el.parentNode)\n w.el.parentNode.removeChild(w.el);\n if (w.editor && w.editor.destroy) try {\n w.editor.destroy();\n } catch(e){}\n if (this.session.lineWidgets) {\n var w1 = this.session.lineWidgets[w.row];\n if (w1 == w) {\n this.session.lineWidgets[w.row] = w.$oldWidget;\n if (w.$oldWidget)\n this.onWidgetChanged(w.$oldWidget);\n } else {\n while (w1) {\n if (w1.$oldWidget == w) {\n w1.$oldWidget = w.$oldWidget;\n break;\n }\n w1 = w1.$oldWidget;\n }\n }\n }\n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n this.$updateRows();\n };\n \n this.getWidgetsAtRow = function(row) {\n var lineWidgets = this.session.lineWidgets;\n var w = lineWidgets && lineWidgets[row];\n var list = [];\n while (w) {\n list.push(w);\n w = w.$oldWidget;\n }\n return list;\n };\n \n this.onWidgetChanged = function(w) {\n this.session._changedWidgets.push(w);\n this.editor && this.editor.renderer.updateFull();\n };\n \n this.measureWidgets = function(e, renderer) {\n var changedWidgets = this.session._changedWidgets;\n var config = renderer.layerConfig;\n \n if (!changedWidgets || !changedWidgets.length) return;\n var min = Infinity;\n for (var i = 0; i < changedWidgets.length; i++) {\n var w = changedWidgets[i];\n if (!w || !w.el) continue;\n if (w.session != this.session) continue;\n if (!w._inDocument) {\n if (this.session.lineWidgets[w.row] != w)\n continue;\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n \n w.h = w.el.offsetHeight;\n \n if (!w.fixedWidth) {\n w.w = w.el.offsetWidth;\n w.screenWidth = Math.ceil(w.w / config.characterWidth);\n }\n \n var rowCount = w.h / config.lineHeight;\n if (w.coverLine) {\n rowCount -= this.session.getRowLineCount(w.row);\n if (rowCount < 0)\n rowCount = 0;\n }\n if (w.rowCount != rowCount) {\n w.rowCount = rowCount;\n if (w.row < min)\n min = w.row;\n }\n }\n if (min != Infinity) {\n this.session._emit(\"changeFold\", {data:{start:{row: min}}});\n this.session.lineWidgetWidth = null;\n }\n this.session._changedWidgets = [];\n };\n \n this.renderWidgets = function(e, renderer) {\n var config = renderer.layerConfig;\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var first = Math.min(this.firstRow, config.firstRow);\n var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);\n \n while (first > 0 && !lineWidgets[first])\n first--;\n \n this.firstRow = config.firstRow;\n this.lastRow = config.lastRow;\n\n renderer.$cursorLayer.config = config;\n for (var i = first; i <= last; i++) {\n var w = lineWidgets[i];\n if (!w || !w.el) continue;\n if (w.hidden) {\n w.el.style.top = -100 - (w.pixelHeight || 0) + \"px\";\n continue;\n }\n if (!w._inDocument) {\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top;\n if (!w.coverLine)\n top += config.lineHeight * this.session.getRowLineCount(w.row);\n w.el.style.top = top - config.offset + \"px\";\n \n var left = w.coverGutter ? 0 : renderer.gutterWidth;\n if (!w.fixedWidth)\n left -= renderer.scrollLeft;\n w.el.style.left = left + \"px\";\n \n if (w.fullWidth && w.screenWidth) {\n w.el.style.minWidth = config.width + 2 * config.padding + \"px\";\n }\n \n if (w.fixedWidth) {\n w.el.style.right = renderer.scrollBar.getWidth() + \"px\";\n } else {\n w.el.style.right = \"\";\n }\n }\n };\n \n}).call(LineWidgets.prototype);\n\n\nexports.LineWidgets = LineWidgets;\n\n});\n\nace.define(\"ace/ext/error_marker\",[\"require\",\"exports\",\"module\",\"ace/line_widgets\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar LineWidgets = acequire(\"../line_widgets\").LineWidgets;\nvar dom = acequire(\"../lib/dom\");\nvar Range = acequire(\"../range\").Range;\n\nfunction binarySearch(array, needle, comparator) {\n var first = 0;\n var last = array.length - 1;\n\n while (first <= last) {\n var mid = (first + last) >> 1;\n var c = comparator(needle, array[mid]);\n if (c > 0)\n first = mid + 1;\n else if (c < 0)\n last = mid - 1;\n else\n return mid;\n }\n return -(first + 1);\n}\n\nfunction findAnnotations(session, row, dir) {\n var annotations = session.getAnnotations().sort(Range.comparePoints);\n if (!annotations.length)\n return;\n \n var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints);\n if (i < 0)\n i = -i - 1;\n \n if (i >= annotations.length)\n i = dir > 0 ? 0 : annotations.length - 1;\n else if (i === 0 && dir < 0)\n i = annotations.length - 1;\n \n var annotation = annotations[i];\n if (!annotation || !dir)\n return;\n\n if (annotation.row === row) {\n do {\n annotation = annotations[i += dir];\n } while (annotation && annotation.row === row);\n if (!annotation)\n return annotations.slice();\n }\n \n \n var matched = [];\n row = annotation.row;\n do {\n matched[dir < 0 ? \"unshift\" : \"push\"](annotation);\n annotation = annotations[i += dir];\n } while (annotation && annotation.row == row);\n return matched.length && matched;\n}\n\nexports.showErrorMarker = function(editor, dir) {\n var session = editor.session;\n if (!session.widgetManager) {\n session.widgetManager = new LineWidgets(session);\n session.widgetManager.attach(editor);\n }\n \n var pos = editor.getCursorPosition();\n var row = pos.row;\n var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) {\n return w.type == \"errorMarker\";\n })[0];\n if (oldWidget) {\n oldWidget.destroy();\n } else {\n row -= dir;\n }\n var annotations = findAnnotations(session, row, dir);\n var gutterAnno;\n if (annotations) {\n var annotation = annotations[0];\n pos.column = (annotation.pos && typeof annotation.column != \"number\"\n ? annotation.pos.sc\n : annotation.column) || 0;\n pos.row = annotation.row;\n gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];\n } else if (oldWidget) {\n return;\n } else {\n gutterAnno = {\n text: [\"Looks good!\"],\n className: \"ace_ok\"\n };\n }\n editor.session.unfold(pos.row);\n editor.selection.moveToPosition(pos);\n \n var w = {\n row: pos.row, \n fixedWidth: true,\n coverGutter: true,\n el: dom.createElement(\"div\"),\n type: \"errorMarker\"\n };\n var el = w.el.appendChild(dom.createElement(\"div\"));\n var arrow = w.el.appendChild(dom.createElement(\"div\"));\n arrow.className = \"error_widget_arrow \" + gutterAnno.className;\n \n var left = editor.renderer.$cursorLayer\n .getPixelPosition(pos).left;\n arrow.style.left = left + editor.renderer.gutterWidth - 5 + \"px\";\n \n w.el.className = \"error_widget_wrapper\";\n el.className = \"error_widget \" + gutterAnno.className;\n el.innerHTML = gutterAnno.text.join(\"
    \");\n \n el.appendChild(dom.createElement(\"div\"));\n \n var kb = function(_, hashId, keyString) {\n if (hashId === 0 && (keyString === \"esc\" || keyString === \"return\")) {\n w.destroy();\n return {command: \"null\"};\n }\n };\n \n w.destroy = function() {\n if (editor.$mouseHandler.isMousePressed)\n return;\n editor.keyBinding.removeKeyboardHandler(kb);\n session.widgetManager.removeLineWidget(w);\n editor.off(\"changeSelection\", w.destroy);\n editor.off(\"changeSession\", w.destroy);\n editor.off(\"mouseup\", w.destroy);\n editor.off(\"change\", w.destroy);\n };\n \n editor.keyBinding.addKeyboardHandler(kb);\n editor.on(\"changeSelection\", w.destroy);\n editor.on(\"changeSession\", w.destroy);\n editor.on(\"mouseup\", w.destroy);\n editor.on(\"change\", w.destroy);\n \n editor.session.widgetManager.addLineWidget(w);\n \n w.el.onmousedown = editor.focus.bind(editor);\n \n editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight});\n};\n\n\ndom.importCssString(\"\\\n .error_widget_wrapper {\\\n background: inherit;\\\n color: inherit;\\\n border:none\\\n }\\\n .error_widget {\\\n border-top: solid 2px;\\\n border-bottom: solid 2px;\\\n margin: 5px 0;\\\n padding: 10px 40px;\\\n white-space: pre-wrap;\\\n }\\\n .error_widget.ace_error, .error_widget_arrow.ace_error{\\\n border-color: #ff5a5a\\\n }\\\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\\\n border-color: #F1D817\\\n }\\\n .error_widget.ace_info, .error_widget_arrow.ace_info{\\\n border-color: #5a5a5a\\\n }\\\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\\\n border-color: #5aaa5a\\\n }\\\n .error_widget_arrow {\\\n position: absolute;\\\n border: solid 5px;\\\n border-top-color: transparent!important;\\\n border-right-color: transparent!important;\\\n border-left-color: transparent!important;\\\n top: -5px;\\\n }\\\n\", \"\");\n\n});\n\nace.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/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/multi_select\",\"ace/mode/folding/fold_mode\",\"ace/theme/textmate\",\"ace/ext/error_marker\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\n\nvar Editor = acequire(\"./editor\").Editor;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar UndoManager = acequire(\"./undomanager\").UndoManager;\nvar Renderer = acequire(\"./virtual_renderer\").VirtualRenderer;\nacequire(\"./worker/worker_client\");\nacequire(\"./keyboard/hash_handler\");\nacequire(\"./placeholder\");\nacequire(\"./multi_select\");\nacequire(\"./mode/folding/fold_mode\");\nacequire(\"./theme/textmate\");\nacequire(\"./ext/error_marker\");\n\nexports.config = acequire(\"./config\");\nexports.acequire = acequire;\n\nif (true)\n exports.define = __webpack_require__(/*! !webpack amd define */ \"../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/amd-define.js\");\nexports.edit = function(el) {\n if (typeof el == \"string\") {\n var _id = el;\n el = document.getElementById(_id);\n if (!el)\n throw new Error(\"ace.edit can't find div #\" + _id);\n }\n\n if (el && el.env && el.env.editor instanceof Editor)\n return el.env.editor;\n\n var value = \"\";\n if (el && /input|textarea/i.test(el.tagName)) {\n var oldNode = el;\n value = oldNode.value;\n el = dom.createElement(\"pre\");\n oldNode.parentNode.replaceChild(el, oldNode);\n } else if (el) {\n value = dom.getInnerText(el);\n el.innerHTML = \"\";\n }\n\n var doc = exports.createEditSession(value);\n\n var editor = new Editor(new Renderer(el));\n editor.setSession(doc);\n\n var env = {\n document: doc,\n editor: editor,\n onResize: editor.resize.bind(editor, null)\n };\n if (oldNode) env.textarea = oldNode;\n event.addListener(window, \"resize\", env.onResize);\n editor.on(\"destroy\", function() {\n event.removeListener(window, \"resize\", env.onResize);\n env.editor.container.env = null; // prevent memory leak on old ie\n });\n editor.container.env = editor.env = env;\n return editor;\n};\nexports.createEditSession = function(text, mode) {\n var doc = new EditSession(text, mode);\n doc.setUndoManager(new UndoManager());\n return doc;\n};\nexports.EditSession = EditSession;\nexports.UndoManager = UndoManager;\nexports.version = \"1.2.9\";\n});\n (function() {\n ace.acequire([\"ace/ace\"], function(a) {\n if (a) {\n a.config.init(true);\n a.define = ace.define;\n }\n if (!window.ace)\n window.ace = a;\n for (var key in a) if (a.hasOwnProperty(key))\n window.ace[key] = a[key];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iKTtcbiAgICAgICAgICAgIHJldHVybiAheC5sYXN0SW5kZXg7XG4gICAgICAgIH0oKTtcblxuICAgIGlmIChjb21wbGlhbnRMYXN0SW5kZXhJbmNyZW1lbnQgJiYgY29tcGxpYW50RXhlY05wY2cpXG4gICAgICAgIHJldHVybjtcbiAgICBSZWdFeHAucHJvdG90eXBlLmV4ZWMgPSBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgIHZhciBtYXRjaCA9IHJlYWwuZXhlYy5hcHBseSh0aGlzLCBhcmd1bWVudHMpLFxuICAgICAgICAgICAgbmFtZSwgcjI7XG4gICAgICAgIGlmICggdHlwZW9mKHN0cikgPT0gJ3N0cmluZycgJiYgbWF0Y2gpIHtcbiAgICAgICAgICAgIGlmICghY29tcGxpYW50RXhlY05wY2cgJiYgbWF0Y2gubGVuZ3RoID4gMSAmJiBpbmRleE9mKG1hdGNoLCBcIlwiKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgcjIgPSBSZWdFeHAodGhpcy5zb3VyY2UsIHJlYWwucmVwbGFjZS5jYWxsKGdldE5hdGl2ZUZsYWdzKHRoaXMpLCBcImdcIiwgXCJcIikpO1xuICAgICAgICAgICAgICAgIHJlYWwucmVwbGFjZS5jYWxsKHN0ci5zbGljZShtYXRjaC5pbmRleCksIHIyLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgYXJndW1lbnRzLmxlbmd0aCAtIDI7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ3VtZW50c1tpXSA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoW2ldID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5feHJlZ2V4cCAmJiB0aGlzLl94cmVnZXhwLmNhcHR1cmVOYW1lcykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgbWF0Y2gubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZSA9IHRoaXMuX3hyZWdleHAuY2FwdHVyZU5hbWVzW2kgLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5hbWUpXG4gICAgICAgICAgICAgICAgICAgICAgIG1hdGNoW25hbWVdID0gbWF0Y2hbaV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFjb21wbGlhbnRMYXN0SW5kZXhJbmNyZW1lbnQgJiYgdGhpcy5nbG9iYWwgJiYgIW1hdGNoWzBdLmxlbmd0aCAmJiAodGhpcy5sYXN0SW5kZXggPiBtYXRjaC5pbmRleCkpXG4gICAgICAgICAgICAgICAgdGhpcy5sYXN0SW5kZXgtLTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWF0Y2g7XG4gICAgfTtcbiAgICBpZiAoIWNvbXBsaWFudExhc3RJbmRleEluY3JlbWVudCkge1xuICAgICAgICBSZWdFeHAucHJvdG90eXBlLnRlc3QgPSBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgICAgICB2YXIgbWF0Y2ggPSByZWFsLmV4ZWMuY2FsbCh0aGlzLCBzdHIpO1xuICAgICAgICAgICAgaWYgKG1hdGNoICYmIHRoaXMuZ2xvYmFsICYmICFtYXRjaFswXS5sZW5ndGggJiYgKHRoaXMubGFzdEluZGV4ID4gbWF0Y2guaW5kZXgpKVxuICAgICAgICAgICAgICAgIHRoaXMubGFzdEluZGV4LS07XG4gICAgICAgICAgICByZXR1cm4gISFtYXRjaDtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBnZXROYXRpdmVGbGFncyAocmVnZXgpIHtcbiAgICAgICAgcmV0dXJuIChyZWdleC5nbG9iYWwgICAgID8gXCJnXCIgOiBcIlwiKSArX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AgICAgdmFyIHRhcmdldCA9IHRoaXM7XG4gICAgICAgIGlmICh0eXBlb2YgdGFyZ2V0ICE9IFwiZnVuY3Rpb25cIikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkZ1bmN0aW9uLnByb3RvdHlwZS5iaW5kIGNhbGxlZCBvbiBpbmNvbXBhdGlibGUgXCIgKyB0YXJnZXQpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBhcmdzID0gc2xpY2UuY2FsbChhcmd1bWVudHMsIDEpOyAvLyBmb3Igbm9ybWFsIGNhbGxcbiAgICAgICAgdmFyIGJvdW5kID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICBpZiAodGhpcyBpbnN0YW5jZW9mIGJvdW5kKSB7XG5cbiAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gdGFyZ2V0LmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICBhcmdzLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cykpXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0KHJlc3VsdCkgPT09IHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcblxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGFyZ2V0LmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICB0aGF0LFxuICAgICAgICAgICAgICAgICAgICBhcmdzLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cykpXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH07XG4gICAgICAgIGlmKHRhcmdldC5wcm90b3R5cGUpIHtcbiAgICAgICAgICAgIEVtcHR5LnByb3RvdHlwZSA9IHRhc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ZUNvdW50KSB7XG4gICAgICAgICAgICBpZiAoIWFyZ3VtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBhcnJheV9zcGxpY2UuYXBwbHkodGhpcywgW1xuICAgICAgICAgICAgICAgICAgICBzdGFydCA9PT0gdm9pZCAwID8gMCA6IHN0YXJ0LFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVDb3VudCA9PT0gdm9pZCAwID8gKHRoaXMubGVuZ3RoIC0gc3RhcnQpIDogZGVsZXRlQ291bnRcbiAgICAgICAgICAgICAgICBdLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cywgMikpKVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0gZWxzZSB7Ly9JRThcbiAgICAgICAgQXJyYXkucHJvdG90eXBlLnNwbGljZSA9IGZ1bmN0aW9uKHBvcywgcmVtb3ZlQ291bnQpe1xuICAgICAgICAgICAgdmFyIGxlbmd0aCA9IHRoaXMubGVuZ3RoO1xuICAgICAgICAgICAgaWYgKHBvcyA+IDApIHtcbiAgICAgICAgICAgICAgICBpZiAocG9zID4gbGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICBwb3MgPSBsZW5ndGg7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBvcyA9PSB2b2lkIDApIHtcbiAgICAgICAgICAgICAgICBwb3MgPSAwO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChwb3MgPCAwKSB7XG4gICAgICAgICAgICAgICAgcG9zID0gTWF0aC5tYXgobGVuZ3RoICsgcG9zLCAwKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCEocG9zK3JlbW92ZUNvdW50IDwgbGVuZ3RoKSlcbiAgICAgICAgICAgICAgICByZW1vdmVDb3VudCA9IGxlbmd0aCAtIHBvcztcblxuICAgICAgICAgICAgdmFyIHJlbW92ZWQgPSB0aGlzLnNsaWNlKHBvcywgcG9zK3JlbW92ZUNvdW50KTtcbiAgICAgICAgICAgIHZhciBpbnNlcnQgPSBzbGljZS5jYWxsKGFyZ3VtZW50cywgMik7XG4gICAgICAgICAgICB2YXIgYWRkID0gaW5zZXJ0Lmxlbmd0aDsgICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChwb3MgPT09IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGlmIChhZGQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wdXNoLmFwcGx5KHRoaXMsIGluc2VydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVtb3ZlID0gTWF0aC5taW4ocmVtb3ZlQ291bnQsIGxlbmd0aCAtIHBvcyk7XG4gICAgICAgICAgICAgICAgdmFyIHRhaWxPbGRQb3MgPSBwb3MgKyByZW1vdmU7XG4gICAgICAgICAgICAgICAgdmFyIHRhaWxOZXdQb3MgPSB0YWlsT2xkUG9zICsgYWRkIC0gcmVtb3ZlO1xuICAgICAgICAgICAgICAgIHZhciB0YWlsQ291bnQgPSBsZW5ndGggLSB0YWlsT2xkUG9zO1xuICAgICAgICAgICAgICAgIHZhciBsZW5ndGhBZnRlclJlbW92ZSA9IGxlbmd0aCAtIHJlbW92ZTtcblxuICAgICAgICAgICAgICAgIGlmICh0YWlsTmV3UG9zIDwgdGFpbE9sZFBvcykgeyAvLyBjYXNlIEFcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0YWlsQ291bnQ7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1t0YWlsTmV3UG9zK2ldID0gdGhpc1t0YWlsT2xkUG9zK2ldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0YWlsTmV3UG9zID4gdGFpbE9sZFBvcykgeyAvLyBjYXNlIEJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gdGFpbENvdW50OyBpLS07ICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1t0YWlsTmV3UG9zK2ldID0gdGhpc1t0YWlsT2xkUG9zK2ldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSAvLyBlbHNlLCBhZGQgPT0gcmVtb3ZlIChub3RoaW5nIHRvIGRvKVxuXG4gICAgICAgICAgICAgICAgaWYgKGFkZCAmJiBwb3MgPT09IGxlbmd0aEFmdGVyUmVtb3ZlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGVuZ3RoID0gbGVuZ3RoQWZ0ZXJSZW1vdmU7IC8vIHRydW5jYXRlIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHVzaC5hcHBseSh0aGlzLCBpbnNlcnQpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGVuZ3RoID0gbGVuZ3RoQWZ0ZXJSZW1vdmUgKyBhZGQ7IC8vIHJlc2VydmVzIHNwYWNlXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBhZGQ7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1twb3MraV0gPSBpbnNlcnRbaV07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVtb3ZlZDtcbiAgICAgICAgfTtcbiAgICB9XG59XG5pZiAoIUFycmF5LmlzQXJyYXkpIHtcbiAgICBBcnJheS5pc0FycmF5ID0gZnVuY3Rpb24gaXNBcnJheShvYmopIHtcbiAgICAgICAgcmV0dXJuIF90b1N0cmluZyhvYmopID09IFwiW29iamVjdCBBcnJheV1cIjtcbiAgICB9O1xufVxudmFyIGJveGVkU3RyaW5nID0gT2JqZWN0KFwiYVwiKSxcbiAgICBzcGxpdFN0cmluZyA9IGJveGVkU3RyaW5nWzBdICE9IFwiYVwiIHx8ICEoMCBpbiBib3hlZFN0cmluZyk7XG5cbmlmICghQXJyYXkucHJvdG90eXBlLmZvckVhY2gpIHtcbiAgICBBcnJheS5wcm90b3R5cGUuZm9yRWFjaCA9IGZ1bmN0aW9uIGZvckVhY2goZnVuIC8qLCB0aGlzcCovKSB7XG4gICAgICAgIHZhciBvYmplY3QgPSB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgb2JqZWN0LFxuICAgICAgICAgICAgdGhpc3AgPSBhcmd1bWVudHNbMV0sXG4gICAgICAgICAgICBpID0gLTEsXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMDtcbiAgICAgICAgaWYgKF90b1N0cmluZyhmdW4pICE9IFwiW29iamVjdCBGdW5jdGlvbl1cIikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpOyAvLyBUT0RPIG1lc3NhZ2VcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlICgrK2kgPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICBmdW4uY2FsbCh0aGlzcCwgc2VsZltpXSwgaSwgb2JqZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5tYXApIHtcbiAgICBBcnJheS5wcm90b3R5cGUubWFwID0gZnVuY3Rpb24gbWFwKGZ1biAvKiwgdGhpc3AqLykge1xuICAgICAgICB2YXIgb2JqZWN0ID0gdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBzZWxmID0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RoID0gc2VsZi5sZW5ndGggPj4+IDAsXG4gICAgICAgICAgICByZXN1bHQgPSBbXSxcbiAgICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgICAgdGhpc3AgPSBhcmd1bWVudHNbMV07XG4gICAgICAgIGlmIChfdG9TdHJpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoZnVuICsgXCIgaXMgbm90IGEgZnVuY3Rpb25cIik7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBzZWxmW2ldO1xuICAgICAgICAgICAgICAgIGlmIChmdW4uY2FsbCh0aGlzcCwgdmFsdWUsIGksIG9iamVjdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5ldmVyeSkge1xuICAgIEFycmF5LnByb3RvdHlwZS5ldmVyeSA9IGZ1bmN0aW9uIGV2ZXJ5KGZ1biAvKiwgdGhpc3AgKi8pIHtcbiAgICAgICAgdmFyIG9iamVjdCA9IHRvT2JqZWN0KHRoaXMpLFxuICAgICAgICAgICAgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICBvYmplY3QsXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMCxcbiAgICAgICAgICAgIHRoaXNwID0gYXJndW1lbnRzWzFdO1xuICAgICAgICBpZiAoX3RvU3RyaW5nKGZ1bikgIT0gXCJbb2JqZWN0IEZ1bmN0aW9uXVwiKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGZ1biArIFwiIGlzIG5vdCBhIGZ1bmN0aW9uXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgaW4gc2VsZiAmJiAhZnVuLmNhbGwodGhpc3AsIHNlbGZbaV0sIGksIG9iamVjdCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfTtcbn1cbmlmICghQXJyYXkucHJvdG90eXBlLnNvbWUpIHtcbiAgICBBcnJheS5wcm90b3R5cGUuc29tZSA9IGZ1bmN0aW9uIHNvbWUoZnVuIC8qLCB0aGlzcCAqLykge1xuICAgICAgICB2YXIgb2JqZWN0ID0gdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBzZWxmID0gc3BsaXRTdHJpbmcgJiYgX3RvU3RyaW5nKHRoaXMpID09IFwiW29iamVjdCBTdHJpbmddXCIgP1xuICAgICAgICAgICAgICAgIHRoaXMuc3BsaXQoXCJcIikgOlxuICAgICAgICAgICAgICAgIG9iamVjdCxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwLFxuICAgICAgICAgICAgdGhpc3AgPSBhcmd1bWVudHNbMV07XG4gICAgICAgIGlmIChfdG9TdHJpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoZnVuICsgXCIgaXMgbm90IGEgZnVuY3Rpb25cIik7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhci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y5sZW5ndGggPj0gMikge1xuICAgICAgICAgICAgcmVzdWx0ID0gYXJndW1lbnRzWzFdO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gc2VsZltpKytdO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCsraSA+PSBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcInJlZHVjZSBvZiBlbXB0eSBhcnJheSB3aXRoIG5vIGluaXRpYWwgdmFsdWVcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gZnVuLmNhbGwodm9pZCAwLCByZXN1bHQsIHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5yZWR1Y2VSaWdodCkge1xuICAgIEFycmF5LnByb3RvdHlwZS5yZWR1Y2VSaWdodCA9IGZ1bmN0aW9uIHJlZHVjZVJpZ2h0KGZ1biAvKiwgaW5pdGlhbCovKSB7XG4gICAgICAgIHZhciBvYmplY3QgPSB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgb2JqZWN0LFxuICAgICAgICAgICAgbGVuZ3RoID0gc2VsZi5sZW5ndGggPj4+IDA7XG4gICAgICAgIGlmIChfdG9TdHJpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoZnVuICsgXCIgaXMgbm90IGEgZnVuY3Rpb25cIik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsZW5ndGggJiYgYXJndW1lbnRzLmxlbmd0aCA9PSAxKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwicmVkdWNlUmlnaHQgb2YgZW1wdHkgYXJyYXkgd2l0aCBubyBpbml0aWFsIHZhbHVlXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJlc3VsdCwgaSA9IGxlbmd0aCAtIDE7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID49IDIpIHtcbiAgICAgICAgICAgIHJlc3VsdCA9IGFyZ3VtZW50c1sxXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHNlbGZbaS0tXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgtLWkgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJyZWR1Y2VSaWdodCBvZiBlbXB0eSBhcnJheSB3aXRoIG5vIGluaXRpYWwgdmFsdWVcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkbyB7XG4gICAgICAgICAgICBpZiAoaSBpbiB0aGlzKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gZnVuLmNhbGwodm9pZCAwLCByZXN1bHQsIHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gd2hpbGUgKGktLSk7XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9O1xufVxuaWYgKCFBcnJheS5wcm90b3R5cGUuaW5kZXhPZiB8fCAoWzAsIDFdLmluZGV4T2YoMSwgMikgIT0gLTEpKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLmluZGV4T2YgPSBmdW5jdGlvbiBpbmRleE9mKHNvdWdodCAvKiwgZnJvbUluZGV4ICovICkge1xuICAgICAgICB2YXIgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwO1xuXG4gICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgaSA9IHRvSW50ZWdlcihhcmd1bWVudHNbMV0pO1xuICAgICAgICB9XG4gICAgICAgIGkgPSBpID49IDAgPyBpIDogTWF0aC5tYXgoMCwgbGVuZ3RoICsgaSk7XG4gICAgICAgIGZvciAoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmIChpIGluIHNlbGYgJiYgc2VsZltpXSA9PT0gc291Z2h0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIC0xO1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5sYXN0SW5kZXhPZiB8fCAoWzAsIDFdLmxhc3RJbmRleE9mKDAsIC0zKSAhPSAtMSkpIHtcbiAgICBBcnJheS5wcm90b3R5cGUubGFzdEluZGV4T2YgPSBmdW5jdGlvbiBsYXN0SW5kZXhPZihzb3VnaHQgLyosIGZyb21JbmRleCAqLykge1xuICAgICAgICB2YXIgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwO1xuXG4gICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGkgPSBsZW5ndGggLSAxO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgIGkgPSBNYXRoLm1pbihpLCB0b0ludGVnZXIoYXJndW1lbnRzWzFdKSk7XG4gICAgICAgIH1cbiAgICAgICAgaSA9IGkgPj0gMCA/IGkgOiBsZW5ndGggLSBNYXRoLmFicyhpKTtcbiAgICAgICAgZm9yICg7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmICYmIHNvdWdodCA9PT0gc2VsZltpXSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9O1xufVxuaWYgKCFPYmplY3QuZ2V0UHJvdG90eXBlT2YpIHtcbiAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YgPSBmdW5jdGlvbiBnZXRQcm90b3R5cGVPZih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vdG9fXztcbiAgICAgICAgICAgIG9iamVjdC5fX3Byb3RvX18gPSBwcm90b3R5cGVPZk9iamVjdDtcblxuICAgICAgICAgICAgdmFyIGdldHRlciA9IGxvb2t1cEdldHRlcihvYmplY3QsIHByb3BlcnR5KTtcbiAgICAgICAgICAgIHZhciBzZXR0ZXIgPSBsb29rdXBTZXR0ZXIob2JqZWN0LCBwcm9wZXJ0eSk7XG4gICAgICAgICAgICBvYmplY3QuX19wcm90b19fID0gcHJvdG90eXBlO1xuXG4gICAgICAgICAgICBpZiAoZ2V0dGVyIHx8IHNldHRlcikge1xuICAgICAgICAgICAgICAgIGlmIChnZXR0ZXIpIGRlc2NyaXB0b3IuZ2V0ID0gZ2V0dGVyO1xuICAgICAgICAgICAgICAgIGlmIChzZXR0ZXIpIGRlc2NyaXB0b3Iuc2V0ID0gc2V0dGVyO1xuICAgICAgICAgICAgICAgIHJldHVybiBkZXNjcmlwdG9yO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGRlc2NyaXB0b3IudmFsdWUgPSBvYmplY3RbcHJvcGVydHldO1xuICAgICAgICByZXR1cm4gZGVzY3JpcHRvcjtcbiAgICB9O1xufVxuaWYgKCFPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcykge1xuICAgIE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzID0gZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlOYW1lcyhvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKG9iamVjdCk7XG4gICAgfTtcbn1cbmlmICghT2JqZWN0LmNyZWF0ZSkge1xuICAgIHZhciBjcmVhdGVFbXB0eTtcbiAgICBpZiAoT2JqZWN0LnByb3RvdHlwZS5fX3Byb3RvX18gPT09IG51bGwpIHtcbiAgICAgICAgY3JlYXRlRW1wdHkgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4geyBcIl9fcHJvdG9fX1wiOiBudWxsIH07XG4gICAgICAgIH07XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY3JlYXRlRW1wdHkgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZW1wdHkgPSB7fTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gZW1wdHkpXG4gICAgICAgICAgICAgICAgZW1wdHlbaV0gPSBudWxsO1xuICAgICAgICAgICAgZW1wdHkuY29uc3RydWN0b3IgPVxuICAgICAgICAgICAgZW1wdHkuaGFzT3duUHJvcGVydHkgPVxuICAgICAgICAgICAgZW1wdHkucHJvcGVydHlJc0VudW1lcmFibGUgPVxuICAgICAgICAgICAgZW1wdHkuaXNQcm90b3R5cGVPZiA9XG4gICAgICAgICAgICBlbXB0eS50b0xvY2FsZVN0cmluZyA9XG4gICAgICAgICAgICBlbXB0eS50b1N0cmluZyA9XG4gICAgICAgICAgICBlbXB0eS52YWx1ZU9mID1cbiAgICAgICAgICAgIGVtcHR5Ll9fcHJvdG9fXyA9IG51bGw7XG4gICAgICAgICAgICByZXR1cm4gZW1wdHk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBPYmplY3QuY3JlYXRlID0gZnVuY3Rpb24gY3JlYXRlKHByb3RvdHlwZSwgcHJvcGVydGllcykge1xuICAgICAgICB2YXIgb2JqZWN0O1xuICAgICAgICBpZiAocHJvdG90eXBlID09PSBudWxsKSB7XG4gICAgICAgICAgICBvYmplY3QgPSBjcmVhdGVFbXB0eSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBwcm90b3R5cGUgIT0gXCJvYmplY3RcIilcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwidHlwZW9mIHByb3RvdHlwZVtcIisodHlwZW9mIHByb3RvdHlwZSkrXCJdICE9ICdvYmplY3QnXCIpO1xuICAgICAgICAgICAgdmFyIFR5cGUgPSBmdW5jdGlvbiAoKSB7fTtcbiAgICAgICAgICAgIFR5cGUucHJ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AgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiBkZWZpbmVQcm9wZXJ0eUZhbGxiYWNrLmNhbGwoT2JqZWN0LCBvYmplY3QsIHByb3BlcnR5LCBkZXNjcmlwdG9yKTtcbiAgICAgICAgICAgIH0gY2F0Y2ggKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChvd25zKGRlc2NyaXB0b3IsIFwidmFsdWVcIikpIHtcblxuICAgICAgICAgICAgaWYgKHN1cHBvcnRzQWNjZXNzb3JzICYmIChsb29rdXBHZXR0ZXIob2JqZWN0LCBwcm9wZXJ0eSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9va3VwU2V0dGVyKG9iamVjdCwgcHJvcGVydHkpKSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvdG90eXBlID0gb2JqZWN0Ll9fcHJvdG9fXztcbiAgICAgICAgICAgICAgICBvYmplY3QuX19wcm90b19fID0gcHJvdG90eXBlT2ZPYmplY3Q7XG4gICAgICAgICAgICAgICAgZGVsZXRlIG9iamVjdFtwcm9wZXJ0eV07XG4gICAgICAgICAgICAgICAgb2JqZWN0W3Byb3BlcnR5XSA9IGRlc2NyaXB0b3IudmFsdWU7XG4gICAgICAgICAgICAgICAgb2JqZWN0Ll9fcHJvdG9fXyA9IHByb3RvdHlwZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgb2JqZWN0W3Byb3BlcnR5XSA9IGRlc2NyaXB0b3IudmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoIXN1cHBvcnRzQWNjZXNzb3JzKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRVJSX0FDQ0VTU09SU19OT1RfU1VQUE9SVEVEKTtcbiAgICAgICAgICAgIGlmIChvd25zKGRlc2N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ICB9XG4gICAgICAgIHZhciBuYW1lID0gJyc7XG4gICAgICAgIHdoaWxlIChvd25zKG9iamVjdCwgbmFtZSkpIHtcbiAgICAgICAgICAgIG5hbWUgKz0gJz8nO1xuICAgICAgICB9XG4gICAgICAgIG9iamVjdFtuYW1lXSA9IHRydWU7XG4gICAgICAgIHZhciByZXR1cm5WYWx1ZSA9IG93bnMob2JqZWN0LCBuYW1lKTtcbiAgICAgICAgZGVsZXRlIG9iamVjdFtuYW1lXTtcbiAgICAgICAgcmV0dXJuIHJldHVyblZhbHVlO1xuICAgIH07XG59XG5pZiAoIU9iamVjdC5rZXlzKSB7XG4gICAgdmFyIGhhc0RvbnRFbnVtQnVnID0gdHJ1ZSxcbiAgICAgICAgZG9udEVudW1zID0gW1xuICAgICAgICAgICAgXCJ0b1N0cmluZ1wiLFxuICAgICAgICAgICAgXCJ0b0xvY2FsZVN0cmluZ1wiLFxuICAgICAgICAgICAgXCJ2YWx1ZU9mXCIsXG4gICAgICAgICAgICBcImhhc093blByb3BlcnR5XCIsXG4gICAgICAgICAgICBcImlzUHJvdG90eXBlT2ZcIixcbiAgICAgICAgICAgIFwicHJvcGVydHlJc0VudW1lcmFibGVcIixcbiAgICAgICAgICAgIFwiY29uc3RydWN0b3JcIlxuICAgICAgICBdLFxuICAgICAgICBkb250RW51bXNMZW5ndGggPSBkb250RW51bXMubGVuZ3RoO1xuXG4gICAgZm9yICh2YXIga2V5IGluIHtcInRvU3RyaW5nXCI6IG51bGx9KSB7XG4gICAgICAgIGhhc0RvbnRFbnVtQnVnID0gZmFsc2U7XG4gICAgfVxuXG4gICAgT2JqZWN0LmtleXMgPSBmdW5jdGlvbiBrZXlzKG9iamVjdCkge1xuXG4gICAgICAgIGlmIChcbiAgICAgICAgICAgICh0eXBlb2Ygb2JqZWN0ICE9IFwib2JqZWN0XCIgJiYgdHlwZW9mIG9iamVjdCAhPSBcImZ1bmN0aW9uXCIpIHx8XG4gICAgICAgICAgICBvYmplY3QgPT09IG51bGxcbiAgICAgICAgKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiT2JqZWN0LmtleXMgY2FsbGVkIG9uIGEgbm9uLW9iamVjdFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBrZXlzID0gW107XG4gICAgICAgIGZvciAodmFyIG5hbWUgaW4gb2JqZWN0KSB7XG4gICAgICAgICAgICBpZiAob3ducyhvYmplY3QsIG5hbWUpKSB7XG4gICAgICAgICAgICAgICAga2V5cy5wdXNoKG5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGhhc0RvbnRFbnVtQnVnKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgaWkgPSBkb250RW51bXNMZW5ndGg7IGkgPCBpaTsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRvbnRFbnVtID0gZG9udEVudW1zW2ldO1xuICAgICAgICAgICAgICAgIGlmIChvd25zKG9iamVjdCwgZG9udEVudW0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGtleXMucHVzaChkb250RW51bSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBrZXlzO1xuICAgIH07XG5cbn1cbmlmICghRGF0ZS5ub3cpIHtcbiAgICBEYXRlLm5vdyA9IGZ1bmN0aW9uIG5vdygpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xuICAgIH07XG59XG52YXIgd3MgPSBcIlxceDA5XFx4MEFcXHgwQlxceDBDXFx4MERcXHgyMFxceEEwXFx1MTY4MFxcdTE4MEVcXHUyMDAwXFx1MjAwMVxcdTIwMDJcXHUyMDAzXCIgK1xuICAgIFwiXFx1MjAwNFxcdTIwMDVcXHUyMDA2XFx1MjAwN1xcdTIwMDhcXHUyMDA5XFx1MjAwQVxcdTIwMkZcXHUyMDVGXFx1MzAwMFxcdTIwMjhc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hY2VxdWlyZShcIi4vZml4b2xkYnJvd3NlcnNcIik7XG5cbnZhciBvb3AgPSBhY2VxdWlyZShcIi4vb29wXCIpO1xudmFyIEtleXMgPSAoZnVuY3Rpb24oKSB7XG4gICAgdmFyIHJldCA9IHtcbiAgICAgICAgTU9ESUZJRVJfS0VZUzoge1xuICAgICAgICAgICAgMTY6ICdTaGlmdCcsIDE3OiAnQ3RybCcsIDE4OiAnQWx0JywgMjI0OiAnTWV0YSdcbiAgICAgICAgfSxcblxuICAgICAgICBLRVlfTU9EUzoge1xuICAgICAgICAgICAgXCJjdHJsXCI6IDEsIFwiYWx0XCI6IDIsIFwib3B0aW9uXCIgOiAyLCBcInNoaWZ0XCI6IDQsXG4gICAgICAgICAgICBcInN1cGVyXCI6IDgsIFwibWV0YVwiOiA4LCBcImNvbW1hbmRcIjogOCwgXCJjbWRcIjogOFxuICAgICAgICB9LFxuXG4gICAgICAgIEZVTkNUSU9OX0tFWVMgOiB7XG4gICAgICAgICAgICA4ICA6IFwiQmFja3NwYWNlXCIsXG4gICAgICAgICAgICA5ICA6IFwiVGFiXCIsXG4gICAgICAgICAgICAxMyA6IFwiUmV0dXJuXCIsXG4gICAgICAgICAgICAxOSA6IFwiUGF1c2VcIixcbiAgICAgICAgICAgIDI3IDogXCJFc2NcIixcbiAgICAgICAgICAgIDMyIDogXCJTcGFjZVwiLFxuICAgICAgICAgICAgMzMgOiBcIlBhZ2VVcFwiLFxuICAgICAgICAgICAgMzQgOiBcIlBhZ2VEb3duXCIsXG4gICAgICAgICAgICAzNSA6IFwiRW5kXCIsXG4gICAgICAgICAgICAzNiA6IFwiSG9tZVwiLFxuICAgICAgICAgICAgMzcgOiBcIkxlZnRcIixcbiAgICAgICAgICAgIDM4IDogXCJVcFwiLFxuICAgICAgICAgICAgMzkgOiBcIlJpZ2h0XCIsXG4gICAgICAgICAgICA0MCA6IFwiRG93blwiLFxuICAgICAgICAgICAgNDQgOiBcIlByaW50XCIsXG4gICAgICAgICAgICA0NSA6IFwiSW5zZXJ0XCIsXG4gICAgICAgICAgICA0NiA6IFwiRGVsZXRlXCIsXG4gICAgICAgICAgICA5NiA6IFwiTnVtcGFkMFwiLFxuICAgICAgICAgICAgOTcgOiBcIk51bXBhZDFcIixcbiAgICAgICAgICAgIDk4IDogXCJOdW1wYWQyXCIsXG4gICAgICAgICAgICA5OSA6IFwiTnVtcGFkM1wiLFxuICAgICAgICAgICAgMTAwOiBcIk51bXBhZDRcIixcbiAgICAgICAgICAgIDEwMTogXCJOdW1wYWQ1XCIsXG4gICAgICAgICAgICAxMDI6IFwiTnVtcGFkNlwiLFxuICAgICAgICAgICAgMTAzOiBcIk51bXBhZDdcIixcbiAgICAgICAgICAgIDEwNDogXCJOdW1wYWQ4XCIsXG4gICAgICAgICAgICAxMDU6IFwiTnVtcGFkOVwiLFxuICAgICAgICAgICAgJy0xMyc6IFwiTnVtcGFkRW50ZXJcIixcbiAgICAgICAgICAgIDExMjogXCJGMVwiLFxuICAgICAgICAgICAgMTEzOiBcIkYyXCIsXG4gICAgICAgICAgICAxMTQ6IFwiRjNcIixcbiAgICAgICAgICAgIDExNTogXCJGNFwiLFxuICAgICAgICAgICAgMTE2OiBcIkY1XCIsXG4gICAgICAgICAgICAxMTc6IFwiRjZcIixcbiAgICAgICAgICAgIDExODogXCJGN1wiLFxuICAgICAgICAgICAgMTE5OiBcIkY4XCIsXG4gICAgICAgICAgICAxMjA6IFwiRjlcIixcbiAgICAgICAgICAgIDEyMTogXCJGMTBcIixcbiAgICAgICAgICAgIDEyMjogXCJGMTFcIixcbiAgICAgICAgICAgIDEyMzogXCJGMTJcIixcbiAgICAgICAgICAgIDE0NDogXCJOdW1sb2NrXCIsXG4gICAgICAgICAgICAxNDU6IFwiU2Nyb2xsbG9ja1wiXG4gICAgICAgIH0sXG5cbiAgICAgICAgUFJJTlRBQkxFX0tFWVM6IHtcbiAgICAgICAgICAgMzI6ICcgJywgIDQ4OiAnMCcsICA0OTogJzEnLCAgNTA6ICcyJywgIDUxOiAnMycsICA1MjogJzQnLCA1MzogICc1JyxcbiAgICAgICAgICAgNTQ6ICc2JywgIDU1OiAnNycsICA1NjogJzgnLCAgNTc6ICc5JywgIDU5OiAnOycsICA2MTogJz0nLCA2NTogICdhJyxcbiAgICAgICAgICAgNjY6ICdiJywgIDY3OiAnYycsICA2ODogJ2QnLCAgNjk6ICdlJywgIDcwOiAnZicsICA3MTogJ2cnLCA3MjogICdoJyxcbiAgICAgICAgICAgNzM6ICdpJywgIDc0OiAnaicsICA3NTogJ2snLCAgNzY6ICdsJywgIDc3OiAnbScsICA3ODogJ24nLCA3OTogICdvJyxcbiAgICAgICAgICAgODA6ICdwJywgIDgxOiAncScsICA4MjogJ3InLCAgODM6ICdzJywgIDg0OiAndCcsICA4NTogJ3UnLCA4NjogICd2JyxcbiAgICAgICAgICAgODc6ICd3JywgIDg4OiAneCcsICA4OTogJ3knLCAgOTA6ICd6JywgMTA3OiAnKycsIDEwOTogJy0nLCAxMTA6ICcuJyxcbiAgICAgICAgICAxODY6ICc7JywgMTg3OiAnPScsIDE4ODogJywnLCAxODk6ICctJywgMTkwOiAnLicsIDE5MTogJy8nLCAxOTI6ICdgJyxcbiAgICAgICAgICAyMTk6ICdbJywgMjIwOiAnXFxcXCcsMjIxOiAnXScsIDIyMjogXCInXCIsIDExMTogJy8nLCAxMDY6ICcqJ1xuICAgICAgICB9XG4gICAgfTtcbiAgICB2YXIgbmFtZSwgaTtcbiAgICBmb3IgKGkgaW4gcmV0LkZVTkNUSU9OX0tFWVMpIHtcbiAgICAgICAgbmFtZSA9IHJldC5GVU5DVElPTl9LRVlTW2ldLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIHJldFtuYW1lXSA9IHBhcnNlSW50KGksIDEwKTtcbiAgICB9XG4gICAgZm9yIChpIGluIHJldC5QUklOVEFCTEVfS0VZUykge1xuICAgICAgICBuYW1lID0gcmV0LlBSSU5UQUJMRV9LRVlTW2ldLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIHJldFtuYW1lXSA9IHBhcnNlSW50KGksIDEwKTtcbiAgICB9XG4gICAgb29wLm1peGluKHJldCwgcmV0Lk1PRElGSUVSX0tFWVMpO1xuICAgIG9vcC5taXhpbihyZXQsIHJldC5QUklOVEFCTEVfS0VZUyk7XG4gICAgb29wLm1peGluKHJldCwgcmV0LkZVTkNUSU9OX0tFWVMpO1xuICAgIHJldC5lbnRlciA9IHJldFtcInJldHVyblwiXTtcbiAgICByZXQuZXNjYXBlID0gcmV0LmVzYztcbiAgICByZXQuZGVsID0gcmV0W1wiZGVsZXRlXCJdO1xuICAgIHJldFsxNzNdID0gJy0nO1xuICAgIFxuICAgIChmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIG1vZHMgPSBbXCJjbWRcIiwgXCJjdHJsXCIsIFwiYWx0XCIsIFwic2hpZnRcIl07XG4gICAgICAgIGZvciAodmFyIGkgPSBNYXRoLnBvdygyLCBtb2RzLmxlbmd0aCk7IGktLTspIHsgICAgICAgICAgICBcbiAgICAgICAgICAgIHJldC5LRVlfTU9EU1tpXSA9IG1vZHMuZmlsdGVyKGZ1bmN0aW9uKHgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaSAmIHJldC5LRVlfTU9EU1t4XTtcbiAgICAgICAgICAgIH0pLmpvaW4oXCItXCIpICsgXCItXCI7XG4gICAgICAgIH1cbiAgICB9KSgpO1xuXG4gICAgcmV0LktFWV9NT0RTWzBdID0gXCJcIjtcbiAgICByZXQuS0VZX01PRFNbLTFdID0gXCJpbnB1dC1cIjtcblxuICAgIHJldHVybiByZXQ7XG59KSgpO1xub29wLm1peGluKGV4cG9ydHMsIEtleXMpO1xuXG5leHBvcnRzLmtleUNvZGVUb1N0cmluZyA9IGZ1bmN0aW9uKGtleUNvZGUpIHtcbiAgICB2YXIga2V5U3RyaW5nID0gS2V5c1trZXlDb2RlXTtcbiAgICBpZiAodHlwZW9mIGtleVN0cmluZyAhPSBcInN0cmluZ1wiKVxuICAgICAgICBrZX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bGllbnRYO1xuICAgICAgICBzdGFydHkgPSB0b3VjaE9iai5jbGllbnRZO1xuXG4gICAgICAgIGNhbGxiYWNrKGUpO1xuICAgIH0pO1xufTtcblxuZXhwb3J0cy5hZGRNb3VzZVdoZWVsTGlzdGVuZXIgPSBmdW5jdGlvbihlbCwgY2FsbGJhY2spIHtcbiAgICBpZiAoXCJvbm1vdXNld2hlZWxcIiBpbiBlbCkge1xuICAgICAgICBleHBvcnRzLmFkZExpc3RlbmVyKGVsLCBcIm1vdXNld2hlZWxcIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgdmFyIGZhY3RvciA9IDg7XG4gICAgICAgICAgICBpZiAoZS53aGVlbERlbHRhWCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgZS53aGVlbFggPSAtZS53aGVlbERlbHRhWCAvIGZhY3RvcjtcbiAgICAgICAgICAgICAgICBlLndoZWVsWSA9IC1lLndoZWVsRGVsdGFZIC8gZmFjdG9yO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlLndoZWVsWCA9IDA7XG4gICAgICAgICAgICAgICAgZS53aGVlbFkgPSAtZS53aGVlbERlbHRhIC8gZmFjdG9yO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FsbGJhY2soZSk7XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSBpZiAoXCJvbndoZWVsXCIgaW4gZWwpIHtcbiAgICAgICAgZXhwb3J0cy5hZGRMaXN0ZW5lcihlbCwgXCJ3aGVlbFwiLCAgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgdmFyIGZhY3RvciA9IDAuMzU7XG4gICAgICAgICAgICBzd2l0Y2ggKGUuZGVsdGFNb2RlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSBlLkRPTV9ERUxUQV9QSVhFTDpcbiAgICAgICAgICAgICAgICAgICAgZS53aGVlbFggPSBlLmRlbHRhWCAqIGZhY3RvciB8fCAwO1xuICAgICAgICAgICAgICAgICAgICBlLndoZWVsWSA9IGUuZGVsdGFZICogZmFjdG9yIHx8IDA7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgZS5ET01fREVMVEFfTElORTpcbiAgICAgICAgICAgICAgICBjYXNlIGUuRE9NX0RFTFRBX1BBR0U6XG4gICAgICAgICAgICAgICAgICAgIGUud2hlZWxYID0gKGUuZGVsdGFYIHx8IDApICogNTtcbiAgICAgICAgICAgICAgICAgICAgZS53aGVlbFkgPSAoZS5kZWx0YVkgfHwgMCkgKiA1O1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgY2FsbGJhY2soZSk7XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGV4cG9ydHMuYWRkTGlzdGVuZXIoZWwsIFwiRE9NTW91c2VTY3JvbGxcIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgaWYgKGUuYXhpcyAmJiBlLmF4aXMgPT0gZS5IT1JJWk9OVEFMX0FYSVMpIHtcbiAgICAgICAgICAgICAgICBlLndoZWVsWCA9IChlLmRldGFpbCB8fCAwKSAqIDU7XG4gICAgICAgICAgICAgICAgZS53aGVlbFkgPSAwO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlLndoZWVsWCA9IDA7XG4gICAgICAgICAgICAgICAgZS53aGVlbFkgPSAoZS5kZXRhaWwgfHwgMCkgKiA1O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FsbGJhY2soZSk7XG4gICAgICAgIH0pO1xuICAgIH1cbn07XG5cbmV4cG9ydHMuYWRkTXVsdGlNb3VzZURvd25MaXN0ZW5lciA9IGZ1bmN0aW9uKGVsZW1lbnRzLCB0aW1lb3V0cywgZXZlbnRIYW5kbGVyLCBjYWxsYmFja05hbWUpIHtcbiAgICB2YXIgY2xpY2tzID0gMDtcbiAgICB2YXIgc3RhcnRYLCBzdGFydFksIHRpbWVyOyBcbiAgICB2YXIgZXZlbnROYW1lcyA9IHtcbiAgICAgICAgMjogXCJkYmxjbGlja1wiLFxuICAgICAgICAzOiBcInRyaXBsZWNsaWNrXCIsXG4gICAgICAgIDQ6IFwicXVhZGNsaWNrXCJcbiAgICB9O1xuXG4gICAgZnVuY3Rpb24gb25Nb3VzZWRvd24oZSkge1xuICAgICAgICBpZiAoZXhwb3J0cy5nZXRCdXR0b24oZSkgIT09IDApIHtcbiAgICAgICAgICAgIGNsaWNrcyA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAoZS5kZXRhaWwgPiAxKSB7XG4gICAgICAgICAgICBjbGlja3MrKztcbiAgICAgICAgICAgIGlmIChjbGlja3MgPiA0KVxuICAgICAgICAgICAgICAgIGNsaWNrcyA9IDE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjbGlja3MgPSAxO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1c2VyYWdlbnQuaXNJRSkge1xuICAgICAgICAgICAgdmFyIGlzTmV3Q2xpY2sgPSBNYXRoLmFicyhlLmNsaWVudFggLSBzdGFydFgpID4gNSB8fCBNYXRoLmFicyhlLmNsaWVudFkgLSBzdGFydFkpID4gNTtcbiAgICAgICAgICAgIGlmICghdGltZXIgfHwgaXNOZXdDbGljaylcbiAgICAgICAgICAgICAgICBjbGlja3MgPSAxO1xuICAgICAgICAgICAgaWYgKHRpbWVyKVxuICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcik7XG4gICAgICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7dGltZXIgPSBudWxsO30sIHRpbWVvdXRzW2NsaWNrcyAtIDFdIHx8IDYwMCk7XG5cbiAgICAgICAgICAgIGlmIChjbGlja3MgPT0gMSkge1xuICAgICAgICAgICAgICAgIHN0YXJ0WCA9IGUuY2xpZW50WDtcbiAgICAgICAgICAgICAgICBzd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VxuICAgICAgICAgICAgICAgIHByZXNzZWRLZXlzLmFsdEdyID0gMDtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGtleUNvZGUgPT09IDE4IHx8IGtleUNvZGUgPT09IDE3KSB7XG4gICAgICAgICAgICB2YXIgbG9jYXRpb24gPSBcImxvY2F0aW9uXCIgaW4gZSA/IGUubG9jYXRpb24gOiBlLmtleUxvY2F0aW9uO1xuICAgICAgICAgICAgaWYgKGtleUNvZGUgPT09IDE3ICYmIGxvY2F0aW9uID09PSAxKSB7XG4gICAgICAgICAgICAgICAgaWYgKHByZXNzZWRLZXlzW2tleUNvZGVdID09IDEpXG4gICAgICAgICAgICAgICAgICAgIHRzID0gZS50aW1lU3RhbXA7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGtleUNvZGUgPT09IDE4ICYmIGhhc2hJZCA9PT0gMyAmJiBsb2NhdGlvbiA9PT0gMikge1xuICAgICAgICAgICAgICAgIHZhciBkdCA9IGUudGltZVN0YW1wIC0gdHM7XG4gICAgICAgICAgICAgICAgaWYgKGR0IDwgNTApXG4gICAgICAgICAgICAgICAgICAgIHByZXNzZWRLZXlzLmFsdEdyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBcbiAgICBpZiAoa2V5Q29kZSBpbiBrZXlzLk1PRElGSUVSX0tFWVMpIHtcbiAgICAgICAga2V5Q29kZSA9IC0xO1xuICAgIH1cbiAgICBpZiAoaGFzaElkICYgOCAmJiAoa2V5Q29kZSA+PSA5MSAmJiBrZXlDb2RlIDw9IDkzKSkge1xuICAgICAgICBrZXlDb2RlID0gLTE7XG4gICAgfVxuICAgIFxuICAgIGlmICghaGFzaElkICYmIGtleUNvZGUgPT09IDEzKSB7XG4gICAgICAgIHZhciBsb2NhdGlvbiA9IFwibG9jYXRpb25cIiBpbiBlID8gZS5sb2NhdGlvbiA6IGUua2V5TG9jYXRpb247XG4gICAgICAgIGlmIChsb2NhdGlvbiA9PT0gMykge1xuICAgICAgICAgICAgY2FsbGJhY2soZSwgaGFzaElkLCAta2V5Q29kZSk7XG4gICAgICAgICAgICBpZiAoZS5kZWZhdWx0UHJldmVudGVkKVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgIH1cbiAgICBcbiAgICBpZiAodXNlcmFnZW50LmlzQ2hyb21lT1MgJiYgaGFzaElkICYgOCkge1xuICAgICAgICBjYWxsYmFjayhlLCBoYXNoSWQsIGtleUNvZGUpO1xuICAgICAgICBpZiAoZS5kZWZhdWx0UHJldmVudGVkKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICBoYXNoSWQgJj0gfjg7XG4gICAgfVxuICAgIGlmICghaGFzaElkICYmICEoa2V5Q29kZSBpbiBrZXlzLkZVTkNUSU9OX0tFWVMpICYmICEoa2V5Q29kZSBpbiBrZXlzLlBSSU5UQUJMRV9LRVlTKSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICAgIFxuICAgIHJldHVybiBjYWxsYmFjayhlLCBoYXNoSWQsIGtleUNvZGUpO1xufVxuXG5cbmV4cG9ydHMuYWRkQ29tbWFuZEtleUxpc3RlbmVyID0gZnVuY3Rpb24oZWwsIGNhbGxiYWNrKSB7XG4gICAgdmFyIGFkZExpc3RlbmVyID0gZXhwb3J0cy5hZGRMaXN0ZW5lcjtcbiAgICBpZiAodXNlcmFnZW50LmlzT2xkR2Vja28gfHwgKHVzZXJhZ2VudC5pc09wZXJhICYmICEoXCJLZXlib2FyZEV2ZW50XCIgaW4gd2luZG93KSkpIHtcbiAgICAgICAgdmFyIGxhc3RLZXlEb3duS2V5Q29kZSA9IG51bGw7XG4gICAgICAgIGFkZExpc3RlbmVyKGVsLCBcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgbGFzdEtleURvd25LZXlDb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AgZWxzZSBcbiAgICAgICAgICAgIGNvcHlbaV0gPSBhcnJheVtpXTtcbiAgICB9XG4gICAgcmV0dXJuIGNvcHk7XG59O1xuXG5leHBvcnRzLmRlZXBDb3B5ID0gZnVuY3Rpb24gZGVlcENvcHkob2JqKSB7XG4gICAgaWYgKHR5cGVvZiBvYmogIT09IFwib2JqZWN0XCIgfHwgIW9iailcbiAgICAgICAgcmV0dXJuIG9iajtcbiAgICB2YXIgY29weTtcbiAgICBpZiAoQXJyYXkuaXNBcnJheShvYmopKSB7XG4gICAgICAgIGNvcHkgPSBbXTtcbiAgICAgICAgZm9yICh2YXIga2V5ID0gMDsga2V5IDwgb2JqLmxlbmd0aDsga2V5KyspIHtcbiAgICAgICAgICAgIGNvcHlba2V5XSA9IGRlZXBDb3B5KG9ialtrZXldKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY29weTtcbiAgICB9XG4gICAgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvYmopICE9PSBcIltvYmplY3QgT2JqZWN0XVwiKVxuICAgICAgICByZXR1cm4gb2JqO1xuICAgIFxuICAgIGNvcHkgPSB7fTtcbiAgICBmb3IgKHZhciBrZXkgaW4gb2JqKVxuICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7XG4gICAgcmV0dXJuIGNvcHk7XG59O1xuXG5leHBvcnRzLmFycmF5VG9NYXAgPSBmdW5jdGlvbihhcnIpIHtcbiAgICB2YXIgbWFwID0ge307XG4gICAgZm9yICh2YXIgaT0wOyBpPGFyci5sZW5ndGg7IGkrKykge1xuICAgICAgICBtYXBbYXJyW2ldXSA9IDE7XG4gICAgfVxuICAgIHJldHVybiBtYXA7XG5cbn07XG5cbmV4cG9ydHMuY3JlYXRlTWFwID0gZnVuY3Rpb24ocHJvcHMpIHtcbiAgICB2YXIgbWFwID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICBmb3IgKHZhciBpIGluIHByb3BzKS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AgICAgICBpZiAoZGF0YSlcbiAgICAgICAgICAgICAgICBob3N0Lm9uVGV4dElucHV0KGRhdGEpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb3BpZWQpIHtcbiAgICAgICAgICBjb3BpZWQgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoYWZ0ZXJDb250ZXh0TWVudSlcbiAgICAgICAgICAgIGFmdGVyQ29udGV4dE1lbnUgPSBmYWxzZTtcbiAgICB9O1xuICAgIHZhciBvbklucHV0ID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBpZiAoaW5Db21wb3NpdGlvbilcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdmFyIGRhdGEgPSB0ZXh0LnZhbHVlO1xuICAgICAgICBzZW5kVGV4dChkYXRhKTtcbiAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgIH07XG5cbiAgICB2YXIgaGFuZGxlQ2xpcGJvYXJkRGF0YSA9IGZ1bmN0aW9uKGUsIGRhdGEsIGZvcmNlSUVNaW1lKSB7XG4gICAgICAgIHZhciBjbGlwYm9hcmREYXRhID0gZS5jbGlwYm9hcmREYXRhIHx8IHdpbmRvdy5jbGlwYm9hcmREYXRhO1xuICAgICAgICBpZiAoIWNsaXBib2FyZERhdGEgfHwgQlJPS0VOX1NFVERBVEEpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBtaW1lID0gVVNFX0lFX01JTUVfVFlQRSB8fCBmb3JjZUlFTWltZSA/IFwiVGV4dFwiIDogXCJ0ZXh0L3BsYWluXCI7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjbGlwYm9hcmREYXRhLnNldERhdGEobWltZSwgZGF0YSkgIT09IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY2xpcGJvYXJkRGF0YS5nZXREYXRhKG1pbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoKGUpIHtcbiAgICAgICAgICAgIGlmICghZm9yY2VJRU1pbWUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZUNsaXBib2FyZERhdGEoZSwgZGF0YSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdmFyIGRvQ29weSA9IGZ1bmN0aW9uKGUsIGlzQ3V0KSB7XG4gICAgICAgIHZhciBkYXRhID0gaG9zdC5nZXRDb3B5VGV4dCgpO1xuICAgICAgICBpZiAoIWRhdGEpXG4gICAgICAgICAgICByZXR1cm4gZXZlbnQucHJldmVudERlZmF1bHQoZSk7XG5cbiAgICAgICAgaWYgKGhhbmRsZUNsaXBib2FyZERhdGEoZSwgZGF0YSkpIHtcbiAgICAgICAgICAgIGlmICh1c2VyYWdlbnQuaXNJT1MpIHtcbiAgICAgICAgICAgICAgICBjdXQgPSBpc0N1dDtcbiAgICAgICAgICAgICAgICB0ZXh0LnZhbHVlID0gXCJcXG4gYWFcIiArIGRhdGEgKyBcImEgYVxcblwiO1xuICAgICAgICAgICAgICAgIHRleHQuc2V0U2VsZWN0aW9uUmFuZ2UoNCwgNCArIGRhdGEubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBjb3BpZWQgPSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBkYXRhXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlzQ3V0ID8gaG9zdC5vbkN1dCgpIDogaG9zdC5vbkNvcHkoKTtcbiAgICAgICAgICAgIGlmICghdXNlcmFnZW50LmlzSU9TKSBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvcGllZCA9IHRydWU7XG4gICAgICAgICAgICB0ZXh0LnZhbHVlID0gZGF0YTtcbiAgICAgICAgICAgIHRleHQuc2VsZWN0KCk7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICAgICAgY29waWVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgIHJlc2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgICAgaXNDdXQgPyBob3N0Lm9uQ3V0KCkgOiBob3N0Lm9uQ29weSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdmFyIG9uQ3V0ID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBkb0NvcHkoZSwgdHJ1ZSk7XG4gICAgfTtcblxuICAgIHZhciBvbkNvcHkgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGRvQ29weShlLCBmYWxzZSk7XG4gICAgfTtcblxuICAgIHZhciBvblBhc3RlID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB2YXIgZGF0YSA9IGhhbmRsZUNsaXBib2FyZERhdGEoZSk7XG4gICAgICAgIGlmICh0eXBlb2YgZGF0YSA9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICBpZiAoZGF0YSlcbiAgICAgICAgICAgICAgICBob3N0Lm9uUGFzdGUoZGF0YSwgZSk7XG4gICAgICAgICAgICBpZiAodXNlcmFnZW50LmlzSUUpXG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChyZXNldFNlbGVjdGlvbik7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRleHQudmFsdWUgPSBcIlwiO1xuICAgICAgICAgICAgcGFzdGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBldmVudC5hZGRDb21tYW5kS2V5TGlzdGVuZXIodGV4dCwgaG9zdC5vbkNvbW1hbmRLZXkuYmluZChob3N0KSk7XG5cbiAgICBldmVudC5hZGRMaXN0ZW5lcih0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ICAgICBpZiAoIWhvc3Qub25Db21wb3NpdGlvbkVuZCB8fCBob3N0LiRyZWFkT25seSkgcmV0dXJuO1xuICAgICAgICB2YXIgYyA9IGluQ29tcG9zaXRpb247XG4gICAgICAgIGluQ29tcG9zaXRpb24gPSBmYWxzZTtcbiAgICAgICAgdmFyIHRpbWVyID0gc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHRpbWVyID0gbnVsbDtcbiAgICAgICAgICAgIHZhciBzdHIgPSB0ZXh0LnZhbHVlLnJlcGxhY2UoL1xceDAxL2csIFwiXCIpO1xuICAgICAgICAgICAgaWYgKGluQ29tcG9zaXRpb24pXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgZWxzZSBpZiAoc3RyID09IGMubGFzdFZhbHVlKVxuICAgICAgICAgICAgICAgIHJlc2V0VmFsdWUoKTtcbiAgICAgICAgICAgIGVsc2UgaWYgKCFjLmxhc3RWYWx1ZSAmJiBzdHIpIHtcbiAgICAgICAgICAgICAgICByZXNldFZhbHVlKCk7XG4gICAgICAgICAgICAgICAgc2VuZFRleHQoc3RyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlucHV0SGFuZGxlciA9IGZ1bmN0aW9uIGNvbXBvc2l0aW9uSW5wdXRIYW5kbGVyKHN0cikge1xuICAgICAgICAgICAgaWYgKHRpbWVyKVxuICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcik7XG4gICAgICAgICAgICBzdHIgPSBzdHIucmVwbGFjZSgvXFx4MDEvZywgXCJcIik7XG4gICAgICAgICAgICBpZiAoc3RyID09IGMubGFzdFZhbHVlKVxuICAgICAgICAgICAgICAgIHJldHVybiBcIlwiO1xuICAgICAgICAgICAgaWYgKGMubGFzdFZhbHVlICYmIHRpbWVyKVxuICAgICAgICAgICAgICAgIGhvc3QudW5kbygpO1xuICAgICAgICAgICAgcmV0dXJuIHN0cjtcbiAgICAgICAgfTtcb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gICAgICAgICAgIHJldHVybiBzZXRUaW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgY3V0ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSwgMTAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb25TdGFydCA9IHRleHQuc2VsZWN0aW9uU3RhcnQ7XG4gICAgICAgICAgICB2YXIgc2VsZWN0aW9uRW5kID0gdGV4dC5zZWxlY3Rpb25FbmQ7XG4gICAgICAgICAgICB0ZXh0LnNldFNlbGVjdGlvblJhbmdlKDQsIDUpO1xuICAgICAgICAgICAgaWYgKHNlbGVjdGlvblN0YXJ0ID09IHNlbGVjdGlvbkVuZCkge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoc2VsZWN0aW9uU3RhcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCAwLCBLRVlTLnVwKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgMCwgS0VZUy5ob21lKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgTU9EUy5vcHRpb24sIEtFWVMubGVmdCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMubGVmdCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDU6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMucmlnaHQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA3OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCBNT0RTLm9wdGlvbiwgS0VZUy5yaWdodCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDg6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMuZW5kKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgOTogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgMCwgS0VZUy5kb3duKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHNlbGVjdGlvbkVuZCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDY6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIE1PRFMuc2hpZnQsIEtFWVMucmlnaHQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA3OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCBNT0RTLnNoaWZ0IHwgTU9EUy5vcHRpb24sIEtFWVMucmlnaHQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA4OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCBNT0RTLnNoaWZ0LCBLRVlTLmVuZCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDk6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIE1PRFMuc2hpZnQsIEtFWVMuZG93bik7IGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHNlbGVjdGlvblN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgTU9EUy5zaGlmdCwgS0VZUy51cCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIE1PRFMuc2hpZnQsIEtFWVMuaG9tZSk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIE1PRFMuc2hp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vdXJjZTogXCJhY2VcIn0pO1xuICAgICAgICAgICAgZWxzZSAvLyBzb21lIHZlcnNpb25zIG9mIGFuZHJvaWQgZG8gbm90IGZpcmUga2V5ZG93biB3aGVuIHByZXNzaW5nIGJhY2tzcGFjZVxuICAgICAgICAgICAgICAgIGhvc3QuZXhlY0NvbW1hbmQoXCJiYWNrc3BhY2VcIiwge3NvdXJjZTogXCJhY2VcIn0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRhdGEuc3Vic3RyaW5nKDAsIDIpID09IFBMQUNFSE9MREVSKVxuICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnN1YnN0cigyKTtcbiAgICAgICAgICAgIGVsc2UgaWYgKGRhdGEuY2hhckF0KDApID09IFBMQUNFSE9MREVSLmNoYXJBdCgwKSlcbiAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zdWJzdHIoMSk7XG4gICAgICAgICAgICBlbHNlIGlmIChkYXRhLmNoYXJBdChkYXRhLmxlbmd0aCAtIDEpID09IFBMQUNFSE9MREVSLmNoYXJBdCgwKSlcbiAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zbGljZSgwLCAtMSk7XG4gICAgICAgICAgICBpZiAoZGF0YS5jaGFyQXQoZGF0YS5sZW5ndGggLSAxKSA9PSBQTEFDRUhPTERFUi5jaGFyQXQoMCkpXG4gICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc2xpY2UoMCwgLTEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoZGF0YSlcbiAgICAgICAgICAgICAgICBob3N0Lm9uVGV4dElucHV0KGRhdGEpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChhZnRlckNvbnRleHRNZW51KVxuICAgICAgICAgICAgYWZ0ZXJDb250ZXh0TWVudSA9IGZhbHNlO1xuICAgIH07XG4gICAgdmFyIG9uSW5wdXQgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGlmIChpbkNvbXBvc2l0aW9uKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgZGF0YSA9IHRleHQudmFsdWU7XG4gICAgICAgIHNlbmRUZXh0KGRhdGEpO1xuICAgICAgICByZXNldFZhbHVlKCk7XG4gICAgfTtcbiAgICBcbiAgICB2YXIgaGFuZGxlQ2xpcGJvYXJkRGF0YSA9IGZ1bmN0aW9uKGUsIGRhdGEsIGZvcmNlSUVNaW1lKSB7XG4gICAgICAgIHZhciBjbGlwYm9hcmREYXRhID0gZS5jbGlwYm9hcmREYXRhIHx8IHdpbmRvdy5jbGlwYm9hcmREYXRhO1xuICAgICAgICBpZiAoIWNsaXBib2FyZERhdGEgfHwgQlJPS0VOX1NFVERBVEEpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBtaW1lID0gVVNFX0lFX01JTUVfVFlQRSB8fCBmb3JjZUlFTWltZSA/IFwiVGV4dFwiIDogXCJ0ZXh0L3BsYWluXCI7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjbGlwYm9hcmREYXRhLnNldERhdGEobWltZSwgZGF0YSkgIT09IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY2xpcGJvYXJkRGF0YS5nZXREYXRhKG1pbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoKGUpIHtcbiAgICAgICAgICAgIGlmICghZm9yY2VJRU1pbWUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZUNsaXBib2FyZERhdGEoZSwgZGF0YSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdmFyIGRvQ29weSA9IGZ1bmN0aW9uKGUsIGlzQ3V0KSB7XG4gICAgICAgIHZhciBkYXRhID0gaG9zdC5nZXRDb3B5VGV4dCgpO1xuICAgICAgICBpZiAoIWRhdGEpXG4gICAgICAgICAgICByZXR1cm4gZXZlbnQucHJldmVudERlZmF1bHQoZSk7XG5cbiAgICAgICAgaWYgKGhhbmRsZUNsaXBib2FyZERhdGEoZSwgZGF0YSkpIHtcbiAgICAgICAgICAgIGlzQ3V0ID8gaG9zdC5vbkN1dCgpIDogaG9zdC5vbkNvcHkoKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KGUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29waWVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHRleHQudmFsdWUgPSBkYXRhO1xuICAgICAgICAgICAgdGV4dC5zZWxlY3QoKTtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXtcbiAgICAgICAgICAgICAgICBjb3BpZWQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICByZXNldFZhbHVlKCk7XG4gICAgICAgICAgICAgICAgcmVzZXRTZWxlY3Rpb24oKTtcbiAgICAgICAgICAgICAgICBpc0N1dCA/IGhvc3Qub25DdXQoKSA6IGhvc3Qub25Db3B5KCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdmFyIG9uQ3V0ID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBkb0NvcHkoZSwgdHJ1ZSk7XG4gICAgfTtcbiAgICBcbiAgICB2YXIgb25Db3B5ID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBkb0NvcHkoZSwgZmFsc2UpO1xuICAgIH07XG4gICAgXG4gICAgdmFyIG9uUGFzdGUgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIHZhciBkYXRhID0gaGFuZGxlQ2xpcGJvYXJkRGF0YShlKTtcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgIGlmIChkYXRhKVxuICAgICAgICAgICAgICAgIGhvc3Qub25QYXN0ZShkYXRhLCBlKTtcbiAgICAgICAgICAgIGlmIC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gICAgICAgICAgICAgIG9uQ29weShlKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSA4NjpcbiAgICAgICAgICAgICAgICAgICAgb25QYXN0ZShlKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSA4ODpcbiAgICAgICAgICAgICAgICAgICAgb25DdXQoZSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG4gICAgdmFyIG9uQ29tcG9zaXRpb25TdGFydCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKGluQ29tcG9zaXRpb24gfHwgIWhvc3Qub25Db21wb3NpdGlvblN0YXJ0IHx8IGhvc3QuJHJlYWRPbmx5KSBcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgaW5Db21wb3NpdGlvbiA9IHt9O1xuICAgICAgICBpbkNvbXBvc2l0aW9uLmNhblVuZG8gPSBob3N0LnNlc3Npb24uJHVuZG9NYW5hZ2VyO1xuICAgICAgICBob3N0Lm9uQ29tcG9zaXRpb25TdGFydCgpO1xuICAgICAgICBzZXRUaW1lb3V0KG9uQ29tcG9zaXRpb25VcGRhdGUsIDApO1xuICAgICAgICBob3N0Lm9uKFwibW91c2Vkb3duXCIsIG9uQ29tcG9zaXRpb25FbmQpO1xuICAgICAgICBpZiAoaW5Db21wb3NpdGlvbi5jYW5VbmRvICYmICFob3N0LnNlbGVjdGlvbi5pc0VtcHR5KCkpIHtcbiAgICAgICAgICAgIGhvc3QuaW5zZXJ0KFwiXCIpO1xuICAgICAgICAgICAgaG9zdC5zZXNzaW9uLm1hcmtVbmRvR3JvdXAoKTtcbiAgICAgICAgICAgIGhvc3Quc2VsZWN0aW9uLmNsZWFyU2VsZWN0aW9uKCk7XG4gICAgICAgIH1cbiAgICAgICAgaG9zdC5zZXNzaW9uLm1hcmtVbmRvR3Jv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Rpb25FbmQgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGlmICghaG9zdC5vbkNvbXBvc2l0aW9uRW5kIHx8IGhvc3QuJHJlYWRPbmx5KSByZXR1cm47XG4gICAgICAgIHZhciBjID0gaW5Db21wb3NpdGlvbjtcbiAgICAgICAgaW5Db21wb3NpdGlvbiA9IGZhbHNlO1xuICAgICAgICB2YXIgdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdGltZXIgPSBudWxsO1xuICAgICAgICAgICAgdmFyIHN0ciA9IHRleHQudmFsdWUucmVwbGFjZSgvXFx1MjAyOC9nLCBcIlwiKTtcbiAgICAgICAgICAgIGlmIChpbkNvbXBvc2l0aW9uKVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIGVsc2UgaWYgKHN0ciA9PSBjLmxhc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICByZXNldFZhbHVlKCk7XG4gICAgICAgICAgICBlbHNlIGlmICghYy5sYXN0VmFsdWUgJiYgc3RyKSB7XG4gICAgICAgICAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgIHNlbmRUZXh0KHN0cik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBpbnB1dEhhbmRsZXIgPSBmdW5jdGlvbiBjb21wb3NpdGlvbklucHV0SGFuZGxlcihzdHIpIHtcbiAgICAgICAgICAgIGlmICh0aW1lcilcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpO1xuICAgICAgICAgICAgc3RyID0gc3RyLnJlcGxhY2UoL1xcdTIwMjgvZywgXCJcIik7XG4gICAgICAgICAgICBpZiAoc3RyID09IGMubGFzdFZhbHVlKVxuICAgICAgICAgICAgICAgIHJldHVybiBcIlwiO1xuICAgICAgICAgICAgaWYgKGMubGFzdFZhbHVlICYmIHRpbWVyKVxuICAgICAgICAgICAgICAgIGhvc3QudW5kbygpO1xuICAg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VudShldi5kb21FdmVudCk7XG4gICAgICAgICAgICAgICAgaWYgKCF1c2VyYWdlbnQuaXNNb3ppbGxhKVxuICAgICAgICAgICAgICAgICAgICBldi5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5tb3VzZWRvd25FdmVudC50aW1lID0gRGF0ZS5ub3coKTtcbiAgICAgICAgaWYgKGluU2VsZWN0aW9uICYmICFlZGl0b3IuaXNGb2N1c2VkKCkpIHtcbiAgICAgICAgICAgIGVkaXRvci5mb2N1cygpO1xuICAgICAgICAgICAgaWYgKHRoaXMuJGZvY3VzVGltb3V0ICYmICF0aGlzLiRjbGlja1NlbGVjdGlvbiAmJiAhZWRpdG9yLmluTXVsdGlTZWxlY3RNb2RlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShcImZvY3VzV2FpdFwiKTtcbiAgICAgICAgICAgICAgICB0aGlzLmNhcHR1cmVNb3VzZShldik7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5jYXB0dXJlTW91c2UoZXYpO1xuICAgICAgICB0aGlzLnN0YXJ0U2VsZWN0KHBvcywgZXYuZG9tRXZlbnQuX2NsaWNrcyA+IDEpO1xuICAgICAgICByZXR1cm4gZXYucHJldmVudERlZmF1bHQoKTtcbiAgICB9O1xuXG4gICAgdGhpcy5zdGFydFNlbGVjdCA9IGZ1bmN0aW9uKHBvcywgd2FpdEZvckNsaWNrU2VsZWN0aW9uKSB7XG4gICAgICAgIHBvcyA9IHBvcyB8fCB0aGlzLmVkaXRvci5yZW5kZXJlci5zY3JlZW5Ub1RleHRDb29yZGluYXRlcyh0aGlzLngsIHRoaXMueSk7XG4gICAgICAgIHZhciBlZGl0b3IgPSB0aGlzLmVkaXRvcjtcbiAgICAgICAgZWRpdG9yLiRibG9ja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Lm9uRHJhZ0xlYXZlID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBjb3VudGVyLS07XG4gICAgICAgIGlmIChjb3VudGVyIDw9IDAgJiYgZHJhZ1NlbGVjdGlvbk1hcmtlcikge1xuICAgICAgICAgICAgY2xlYXJEcmFnTWFya2VyKCk7XG4gICAgICAgICAgICBkcmFnT3BlcmF0aW9uID0gbnVsbDtcbiAgICAgICAgICAgIHJldHVybiBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLm9uRHJvcCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKCFkcmFnQ3Vyc29yKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgZGF0YVRyYW5zZmVyID0gZS5kYXRhVHJhbnNmZXI7XG4gICAgICAgIGlmIChpc0ludGVybmFsKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGRyYWdPcGVyYXRpb24pIHtcbiAgICAgICAgICAgICAgICBjYXNlIFwibW92ZVwiOlxuICAgICAgICAgICAgICAgICAgICBpZiAocmFuZ2UuY29udGFpbnMoZHJhZ0N1cnNvci5yb3csIGRyYWdDdXJzb3IuY29sdW1uKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQ6IGRyYWdDdXJzb3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kOiBkcmFnQ3Vyc29yXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSBlZGl0b3IubW92ZVRleHQocmFuZ2UsIGRyYWdDdXJzb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJjb3B5XC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CwgeSk7XG4gICAgICAgICAgICBpZiAoZGlzdGFuY2UgPiBTQ1JPTExfQ1VSU09SX0hZU1RFUkVTSVMpIHtcbiAgICAgICAgICAgICAgICBjdXJzb3JNb3ZlZFRpbWUgPSBudWxsO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChub3cgLSBjdXJzb3JNb3ZlZFRpbWUgPj0gU0NST0xMX0NVUlNPUl9ERUxBWSkge1xuICAgICAgICAgICAgICAgIGVkaXRvci5yZW5kZXJlci5zY3JvbGxDdXJzb3JJbnRvVmlldygpO1xuICAgICAgICAgICAgICAgIGN1cnNvck1vdmVkVGltZSA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiBhdXRvU2Nyb2xsKGN1cnNvciwgcHJldkN1cnNvcikge1xuICAgICAgICB2YXIgbm93ID0gRGF0ZS5ub3coKTtcbiAgICAgICAgdmFyIGxpbmVIZWlnaHQgPSBlZGl0b3IucmVuZGVyZXIubGF5ZXJDb25maWcubGluZUhlaWdodDtcbiAgICAgICAgdmFyIGNoYXJhY3RlcldpZHRoID0gZWRpdG9yLnJlbmRlcmVyLmxheWVyQ29uZmlnLmNoYXJhY3RlcldpZHRoO1xuICAgICAgICB2YXIgZWRpdG9yUmVjdCA9IGVkaXRvci5yZW5kZXJlci5zY3JvbGxlci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcbiAgICAgICAgdmFyIG9mZnNldHMgPSB7XG4gICAgICAgICAgIHg6IHtcbiAgICAgICAgICAgICAgIGxlZnQ6IHggLSBlZGl0b3JSZWN0LmxlZnQsXG4gICAgICAgICAgICAgICByaWdodDogZWRpdG9yUmVjdC5yaWdodCAtIHhcbiAgICAgICAgICAgfSxcbiAgICAgICAgICAgeToge1xuICAgICAgICAgICAgICAgdG9wOiB5IC0gZWRpdG9yUmVjdC50b3AsXG4gICAgICAgICAgICAgICBib3R0b206IGVkaXRvclJlY3QuYm90dG9tIC0geVxuICA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uZWRpdG9yO1xuXG4gICAgICAgIHZhciBpblNlbGVjdGlvbiA9IGUuaW5TZWxlY3Rpb24oKTtcbiAgICAgICAgdmFyIGJ1dHRvbiA9IGUuZ2V0QnV0dG9uKCk7XG4gICAgICAgIHZhciBjbGlja0NvdW50ID0gZS5kb21FdmVudC5kZXRhaWwgfHwgMTtcbiAgICAgICAgaWYgKGNsaWNrQ291bnQgPT09IDEgJiYgYnV0dG9uID09PSAwICYmIGluU2VsZWN0aW9uKSB7XG4gICAgICAgICAgICBpZiAoZS5lZGl0b3IuaW5NdWx0aVNlbGVjdE1vZGUgJiYgKGUuZ2V0QWNjZWxLZXkoKSB8fCBlLmdldFNoaWZ0S2V5KCkpKVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIHRoaXMubW91c2Vkb3duRXZlbnQudGltZSA9IERhdGUubm93KCk7XG4gICAgICAgICAgICB2YXIgZXZlbnRUYXJnZXQgPSBlLmRvbUV2ZW50LnRhcmdldCB8fCBlLmRvbUV2ZW50LnNyY0VsZW1lbnQ7XG4gICAgICAgICAgICBpZiAoXCJ1bnNlbGVjdGFibGVcIiBpbiBldmVudFRhcmdldClcbiAgICAgICAgICAgICAgICBldmVudFRhcmdldC51bnNlbGVjdGFibGUgPSBcIm9uXCI7XG4gICAgICAgICAgICBpZiAoZWRpdG9yLmdldERyYWdEZWxheSgpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHVzZXJhZ2VudC5pc1dlYktpdCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbERyYWcgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbW91c2VUYXJnZXQgPSBlZGl0b3IuY29udGFpbmVyO1xuICAgICAgICAgICAgICAgICAgICBtb3VzZVRhcmdldC5kcmFnZ2FibGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKFwiZHJhZ1dhaXRcIik7XG4gICAg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gICAgICAgdmFyIHJlbmRlcmVyID0gdGhpcy5lZGl0b3IucmVuZGVyZXI7XG4gICAgICAgIGlmIChyZW5kZXJlci4ka2VlcFRleHRBcmVhQXRDdXJzb3IpXG4gICAgICAgICAgICByZW5kZXJlci4ka2VlcFRleHRBcmVhQXRDdXJzb3IgPSBudWxsO1xuXG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcbiAgICAgICAgdmFyIG9uTW91c2VNb3ZlID0gZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgaWYgKCFlKSByZXR1cm47XG4gICAgICAgICAgICBpZiAodXNlcmFnZW50LmlzV2ViS2l0ICYmICFlLndoaWNoICYmIHNlbGYucmVsZWFzZU1vdXNlKVxuICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLnJlbGVhc2VNb3VzZSgpO1xuXG4gICAgICAgICAgICBzZWxmLnggPSBlLmNsaWVudFg7XG4gICAgICAgICAgICBzZWxmLnkgPSBlLmNsaWVudFk7XG4gICAgICAgICAgICBtb3VzZU1vdmVIYW5kbGVyICYmIG1vdXNlTW92ZUhhbmRsZXIoZSk7XG4gICAgICAgICAgICBzZWxmLm1vdXNlRXZlbnQgPSBuZXcgTW91c2VFdmVudChlLCBzZWxmLmVkaXRvcik7XG4gICAgICAgICAgICBzZWxmLiRtb3VzZU1vdmVkID0gdHJ1ZTtcbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgb25DYXB0dXJlRW5kID0gZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcklkKTtcbiAgICAgICAgICAgIG9uQ2FwdHVyZUludGVydmFsKCk7XG4gICAgICAgICAgICBzZWxmW3NlbGYuc3RhdGUgKyBcIkVuZFwiXSAmJiBzZWxmW3NlbGYuc3RhdGUgKyBcIkVuZFwiXShlKTtcbiAgICAgICAgICAgIHNlbGYuc3RhdGUgPSBcIlwiO1xuICAgICAgICAgICAgaWYgKHJlbmRlcmVyLiRrZWVwVGV4dEFyZW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bmRleCA9IHRoaXMuc2Vzc2lvbi4kZ2V0Um93Q2FjaGVJbmRleChyb3dDYWNoZSwgdGhpcy5jdXJyZW50Um93IC0gc3BsaXRJbmRleCAtIDEpO1xuICAgICAgICAgICAgICAgIGlmIChjdXJyZW50SW5kZXggIT09IHByZXZJbmRleClcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBwcmV2SW5kZXggPSBjdXJyZW50SW5kZXg7XG4gICAgICAgICAgICAgICAgc3BsaXRJbmRleCsrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHNwbGl0SW5kZXg7XG4gICAgfTtcblxuICAgIHRoaXMudXBkYXRlUm93TGluZSA9IGZ1bmN0aW9uKGRvY1Jvdywgc3BsaXRJbmRleCkge1xuICAgICAgICBpZiAoZG9jUm93ID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICBkb2NSb3cgPSB0aGlzLmdldERvY3VtZW50Um93KCk7XG5cbiAgICAgICAgdGhpcy53cmFwSW5kZW50ID0gMDtcbiAgICAgICAgdGhpcy5pc0xhc3RSb3cgPSAoZG9jUm93ID09PSB0aGlzLnNlc3Npb24uZ2V0TGVuZ3RoKCkgLSAxKTtcbiAgICAgICAgdGhpcy5saW5lID0gdGhpcy5zZXNzaW9uLmdldExpbmUoZG9jUm93KTtcbiAgICAgICAgaWYgKHRoaXMuc2Vzc2lvbi4kdXNlV3JhcE1vZGUpIHtcbiAgICAgICAgICAgIHZhciBzcGxpdHMgPSB0aGlzLnNlc3Npb24uJHdyYXBEYXRhW2RvY1Jvd107XG4gICAgICAgICAgICBpZiAoc3BsaXRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNwbGl0SW5kZXggPT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICAgICAgc3BsaXRJbmRleCA9IHRoaXMuZ2V0U3BsaXRJbmRleCgpO1xuXG4gICAgICAgICAgICAgICAgaWYoc3BsaXRJbm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EpIHtcbiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICBpZiAoY21wID09IDEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gMjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY21wID09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4gLTI7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoc3RhcnQucm93LCBzdGFydC5jb2x1bW4pO1xuICAgICAgICAgICAgaWYgKGNtcCA9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY21wID09IDEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gNDI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmNvbXBhcmVQb2ludCA9IGZ1bmN0aW9uKHApIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShwLnJvdywgcC5jb2x1bW4pO1xuICAgIH07XG4gICAgdGhpcy5jb250YWluc1JhbmdlID0gZnVuY3Rpb24ocmFuZ2UpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLnN0YXJ0KSA9PSAwICYmIHRoaXMuY29tcGFyZVBvaW50KHJhbmdlLmVuZCkgPT0gMDtcbiAgICB9O1xuICAgIHRoaXMuaW50ZXJzZWN0cyA9IGZ1bmN0aW9uKHJhbmdlKSB7XG4gICAgICAgIHZhciBjbXAgPSB0aGlzLmNvbXBhcmVSYW5nZShyYW5nZSk7XG4gICAgICAgIHJldHVybiAoY21wID09IC0xIHx8IGNtcCA9PSAwIHx8IGNtcCA9PSAxKTtcbiAgICB9O1xuICAgIHRoaXMuaXNFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICByZXR1cm4gdGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uO1xuICAgIH07XG4gICAgdGhpcy5pc1N0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW47XG4gICAgfTtcbiAgICB0aGlzLnNldFN0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHR5cGVvZiByb3cgPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gPSByb3cuY29sdW1uO1xuICAgICAgICAgICAgdGhpcy5zdGFydC5yb3cgPSByb3cucm93O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zdGFydC5yb3cgPSByb3c7XG4gICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5zZXRFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSByb3cuY29sdW1uO1xuICAgICAgICAgICAgdGhpcy5lbmQucm93ID0gcm93LnJvdztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdztcbiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5pbnNpZGUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc0VuZChyb3csIGNvbHVtbikgfHwgdGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG4gICAgdGhpcy5pbnNpZGVTdGFydCA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmlzRW5kKHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG4gICAgdGhpcy5pbnNpZGVFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG4gICAgdGhpcy5jb21wYXJlID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKCF0aGlzLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgIGlmIChyb3cgPT09IHRoaXMuc3RhcnQucm93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8IHRoaXMuc3RhcnQuY29sdW1uID8gLTEgOiAoY29sdW1uID4gdGhpcy5lbmQuY29sdW1uID8gMSA6IDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHJvdyA8IHRoaXMuc3RhcnQucm93KVxuICAgICAgICAgICAgcmV0dXJuIC0xO1xuXG4gICAgICAgIGlmIChyb3cgPiB0aGlzLmVuZC5yb3cpXG4gICAgICAgICAgICByZXR1cm4gMTtcblxuICAgICAgICBpZiAodGhpcy5zdGFydC5yb3cgPT09IHJvdylcbiAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPj0gdGhpcy5zdGFydC5jb2x1bW4gPyAwIDogLTE7XG5cbiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PT0gcm93KVxuICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8PSB0aGlzLmVuZC5jb2x1bW4gPyAwIDogMTtcblxuICAgICAgICByZXR1cm4gMDtcbiAgICB9O1xuICAgIHRoaXMuY29tcGFyZVN0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHtcbiAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmNvbXBhcmVFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uKSB7XG4gICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmNvbXBhcmVJbnNpZGUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uKSB7XG4gICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uKSB7XG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5jbGlwUm93cyA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93KSB7XG4gICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgdmFyIGVuZCA9IHtyb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDB9O1xuICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdylcbiAgICAgICAgICAgIHZhciBlbmQgPSB7cm93OiBmaXJzdFJvdywgY29sdW1uOiAwfTtcblxuICAgICAgICBpZiAodGhpcy5zdGFydC5yb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgdmFyIHN0YXJ0ID0ge3JvdzogbGFzdFJvdyArIDEsIGNvbHVtbjogMH07XG4gICAgICAgIGVsc2UgaWYgKHRoaXMuc3RhcnQucm93IDwgZmlyc3RSb3cpXG4gICAgICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiBmaXJzdFJvdywgY29sdW1uOiAwfTtcblxuICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyhzdGFydCB8fCB0aGlzLnN0YXJ0LCBlbmQgfHwgdGhpcy5lbmQpO1xuICAgIH07XG4gICAgdGhpcy5leHRlbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICB2YXIgY21wID0gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTtcblxuICAgICAgICBpZiAoY21wID09IDApXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgZWxzZSBpZiAoY21wID09IC0xKVxuICAgICAgICAgICAgdmFyIHN0YXJ0ID0ge3Jvdzogcm93LCBjb2x1bW46IGNvbHVtbn07XG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIHZhciBlbmQgPSB7cm93OiByb3csIGNvbHVtbjogY29sdW1ufTtcblxuICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyhzdGFydCB8fCB0aGlzLnN0YXJ0LCBlbmQgfHwgdGhpcy5lbmQpO1xuICAgIH07XG5cbiAgICB0aGlzLmlzRW1wdHkgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuICh0aGlzLnN0YXJ0LnJvdyA9PT0gdGhpcy5lbmQucm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09PSB0aGlzLmVuZC5jb2x1bW4pO1xuICAgIH07XG4gICAgdGhpcy5pc011bHRpTGluZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gKHRoaXMuc3RhcnQucm93ICE9PSB0aGlzLmVuZC5yb3cpO1xuICAgIH07XG4gICAgdGhpcy5jbG9uZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR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W5kZXggPSAwLCBjaDtcbiAgICAgICAgdmFyIHdoaXRlc3BhY2VSZSA9IC9cXHMvO1xuICAgICAgICB2YXIgdG9rZW5SZSA9IHRoaXMuc2Vzc2lvbi50b2tlblJlO1xuXG4gICAgICAgIHRva2VuUmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgaWYgKG1hdGNoID0gdGhpcy5zZXNzaW9uLnRva2VuUmUuZXhlYyhyaWdodE9mQ3Vyc29yKSkge1xuICAgICAgICAgICAgaW5kZXggPSB0aGlzLnNlc3Npb24udG9rZW5SZS5sYXN0SW5kZXg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB3aGlsZSAoKGNoID0gcmlnaHRPZkN1cnNvcltpbmRleF0pICYmIHdoaXRlc3BhY2VSZS50ZXN0KGNoKSlcbiAgICAgICAgICAgICAgICBpbmRleCArKztcblxuICAgICAgICAgICAgaWYgKGluZGV4IDwgMSkge1xuICAgICAgICAgICAgICAgIHRva2VuUmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICAgd2hpbGUgKChjaCA9IHJpZ2h0T2ZDdXJzb3JbaW5kZXhdKSAmJiAhdG9rZW5SZS50ZXN0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2tlblJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4ICsrO1xuICAgICAgICAgICAgICAgICAgICBpZiAod2hpdGVzcGFjZVJlLnRlc3QoY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXgtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChjaCA9IHJpZ2h0T2ZDdXJzb3JbaW5kZXhdKSAmJiB3aGl0ZXNwYWNlUmUudGVzdChjaCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ICsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IDIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRva2VuUmUubGFzdEluZGV4ID0gMDtcblxuICAgICAgICByZXR1cm4gaW5kZXg7XG4gICAgfTtcblxuICAgIHRoaXMubW92ZUN1cnNvclNob3J0V29yZFJpZ2h0ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciByb3cgPSB0aGlzLmxlYWQucm93O1xuICAgICAgICB2YXIgY29sdW1uID0gdGhpcy5sZWFkLmNvbHVtbjtcbiAgICAgICAgdmFyIGxpbmUgPSB0aGlzLmRvYy5nZXRMaW5lKHJvdyk7XG4gICAgICAgIHZhciByaWdodE9mQ3Vyc29yID0gbGluZS5zdWJzdHJpbmcoY29sdW1uKTtcblxuICAgICAgICB2YXIgZm9sZCA9IHRoaXMuc2Vzc2lvbi5nZXRGb2xkQXQocm93LCBjb2x1bW4sIDEpO1xuICAgICAgICBpZiAoZm9sZClcbiAgICAgICAgICAgIHJldHVybiB0aGlzLm1vdmVDdXJzb3JUbyhmb2xkLmVuZC5yb3csIGZvbGQuZW5kLmNvbHVtbik7XG5cbiAgICAgICAgaWYgKGNvbHVtbiA9PSBsaW5lLmxlbmd0aCkge1xuICAgICAgICAgICAgdmFyIGwgPSB0aGlzLmRvYy5nZXRMZW5ndGgoKTtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICByb3crKztcbiAgICAgICAgICAgICAgICByaWdodE9mQ3Vyc29yID0gdGhpcy5kb2MuZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgfSB3aGlsZ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oaXMubGVhZC5jb2x1bW5cbiAgICAgICAgKTtcblxuICAgICAgICB2YXIgb2Zmc2V0WDtcblxuICAgICAgICBpZiAoY2hhcnMgPT09IDApIHtcbiAgICAgICAgICAgIGlmIChyb3dzICE9PSAwKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2Vzc2lvbi4kYmlkaUhhbmRsZXIuaXNCaWRpUm93KHNjcmVlblBvcy5yb3csIHRoaXMubGVhZC5yb3cpKSB7XG4gICAgICAgICAgICAgICAgICAgIG9mZnNldFggPSB0aGlzLnNlc3Npb24uJGJpZGlIYW5kbGVyLmdldFBvc0xlZnQoc2NyZWVuUG9zLmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgIHNjcmVlblBvcy5jb2x1bW4gPSBNYXRoLnJvdW5kKG9mZnNldFggLyB0aGlzLnNlc3Npb24uJGJpZGlIYW5kbGVyLmNoYXJXaWR0aHNbMF0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG9mZnNldFggPSBzY3JlZW5Qb3MuY29sdW1uICogdGhpcy5zZXNzaW9uLiRiaWRpSGFuZGxlci5jaGFyV2lkdGhzWzBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuJGRlc2lyZWRDb2x1bW4pXG4gICAgICAgICAgICAgICAgc2NyZWVuUG9zLmNvbHVtbiA9IHRoaXMuJGRlc2lyZWRDb2x1bW47XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgdGhpcy4kZGVzaXJlZENvbHVtbiA9IHNjcmVlblBvcy5jb2x1bW47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZG9jUG9zID0gdGhpcy5zZXNzaW9uLnNjcmVlblRvRG9jdW1lbnRQb3NpdGlvbihzY3JlZW5Qb3Mucm93ICsgcm93cywgc2NyZWVuUG9zLmNvbHVtbiwgb2Zmc2V0WCk7XG4gICAgICAg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AgICAgICAgIHZhciBlbmQgPSB0aGlzLmdldEN1cnNvcigpO1xuICAgICAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHMoc3RhcnQsZW5kKTtcbiAgICAgICAgfSBjYXRjaChlKSB7XG4gICAgICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyhzdGFydCxzdGFydCk7XG4gICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICB0aGlzLm1vdmVDdXJzb3JUb1Bvc2l0aW9uKHN0YXJ0KTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLnRvSlNPTiA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAodGhpcy5yYW5nZUNvdW50KSB7XG4gICAgICAgICAgICB2YXIgZGF0YSA9IHRoaXMucmFuZ2VzLm1hcChmdW5jdGlvbihyKSB7XG4gICAgICAgICAgICAgICAgdmFyIHIxID0gci5jbG9uZSgpO1xuICAgICAgICAgICAgICAgIHIxLmlzQmFja3dhcmRzID0gci5jdXJzb3IgPT0gci5zdGFydDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcjE7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgZGF0YS5pc0JhY2t3YXJkcyA9IHRoaXMuaXNCYWNrd2FyZHMoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZGF0YTtcbiAgICB9O1xuXG4gICAgdGhpcy5mcm9tSlNPTiA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgaWYgKGRhdGEuc3RhcnQgPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5yYW5nZUxpc3QpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRvU2luZ2xlUmFuZ2UoZGF0YVswXSk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IGRhdGEubGVuZ3RoOyBpLS07ICkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgciA9IFJhbmdlLmZyb21Qb2ludHMoZGF0YVtpXS5zdGFydCwgZGF0YVtpXS5lbmQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YVtpXS5pc0JhY2t3YXJkcylcbiAgICAgICAgICAgICAgICAgICAgICAgIHIuY3Vyc29yID0gci5zdGFydDtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hZGRSYW5nZShyLCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgZGF0YSA9IGRhdGFbMF07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMucmFuZ2VMaXN0KVxuICAgICAgICAgICAgdGhpcy50b1NpbmdsZVJhbmdlKGRhdGEpO1xuICAgICAgICB0aGlzLnNldFNlbGVjdGlvblJhbmdlKGRhdGEsIGRhdGEuaXNCYWNrd2FyZHMpO1xuICAgIH07XG5cbiAgICB0aGlzLmlzRXF1YWwgPSBmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgIGlmICgoZGF0YS5sZW5ndGggfHwgdGhpcy5yYW5nZUNvdW50KSAmJiBkYXRhLmxlbmd0aCAhPSB0aGlzLnJhbmdlQ291bnQpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIGlmICghZGF0YS5sZW5ndGggfHwgIXRoaXMucmFuZ2VzKVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0UmFuZ2UoKS5pc0VxdWFsKGRhdGEpO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSB0aGlzLnJhbmdlcy5sZW5ndGg7IGktLTsgKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMucmFuZ2VzW2ldLmlzRXF1YWwoZGF0YVtpXSkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1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RlZmF1bHRUb2tlbilcbiAgICAgICAgICAgICAgICBtYXBwaW5nLmRlZmF1bHRUb2tlbiA9IHJ1bGUuZGVmYXVsdFRva2VuO1xuICAgICAgICAgICAgaWYgKHJ1bGUuY2FzZUluc2Vuc2l0aXZlKVxuICAgICAgICAgICAgICAgIGZsYWcgPSBcImdpXCI7XG4gICAgICAgICAgICBpZiAocnVsZS5yZWdleCA9PSBudWxsKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICBpZiAocnVsZS5yZWdleCBpbnN0YW5jZW9mIFJlZ0V4cClcbiAgICAgICAgICAgICAgICBydWxlLnJlZ2V4ID0gcnVsZS5yZWdleC50b1N0cmluZygpLnNsaWNlKDEsIC0xKTtcbiAgICAgICAgICAgIHZhciBhZGp1c3RlZHJlZ2V4ID0gcnVsZS5yZWdleDtcbiAgICAgICAgICAgIHZhciBtYXRjaGNvdW50ID0gbmV3IFJlZ0V4cChcIig/OihcIiArIGFkanVzdGVkcmVnZXggKyBcIil8KC4pKVwiKS5leGVjKFwiYVwiKS5sZW5ndGggLSAyO1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocnVsZS50b2tlbikpIHtcbiAgICAgICAgICAgICAgICBpZiAocnVsZS50b2tlbi5sZW5ndGggPT0gMSB8fCBtYXRjaGNvdW50ID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS50b2tlbiA9IHJ1bGUudG9rZW5bMF07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaGNvdW50IC0gMSAhPSBydWxlLnRva2VuLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcG9ydEVycm9yKFwibnVtYmVyIG9mIGNsYXNzZXMgYW5kIHJlZ2V4cCBncm91cHMgZG9lc24ndCBtYXRjaFwiLCB7IFxuICAgICAgICAgICAgICAgICAgICAgICAgcnVsZTogcnVsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwQ291bnQ6IG1hdGNoY291bnQgLSAxXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBydWxlLnRva2VuID0gcnVsZS50b2tlblswXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBydWxlLnRva2VuQXJyYXkgPSBydWxlLnRva2VuO1xuICAgICAgICAgICAgICAgICAgICBydWxlLnRva2VuID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5vbk1hdGNoID0gdGhpcy4kYXJyYXlUb2tlbnM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgcnVsZS50b2tlbiA9PSBcImZ1bmN0aW9uXCIgJiYgIXJ1bGUub25NYXRjaCkge1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaGNvdW50ID4gMSlcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5vbk1hdGNoID0gdGhpcy4kYXBwbHlUb2tlbjtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHJ1bGUub25NYXRjaCA9IHJ1bGUudG9rZW47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChtYXRjaGNvdW50ID4gMSkge1xuICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcZC8udGVzdChydWxlLnJlZ2V4KSkge1xuICAgICAgICAgICAgICAgICAgICBhZGp1c3RlZHJlZ2V4ID0gcnVsZS5yZWdleC5yZXBsYWNlKC9cXFxcKFswLTldKykvZywgZnVuY3Rpb24obWF0Y2gsIGRpZ2l0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJcXFxcXCIgKyAocGFyc2VJbnQoZGlnaXQsIDEwKSArIG1hdGNoVG90YWwgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICA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YWx1ZXMpXG4gICAgICAgICAgICByZXR1cm4gXCJ0ZXh0XCI7XG4gICAgICAgIHZhciB0b2tlbnMgPSBbXTtcbiAgICAgICAgdmFyIHR5cGVzID0gdGhpcy50b2tlbkFycmF5O1xuICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IHR5cGVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgaWYgKHZhbHVlc1tpICsgMV0pXG4gICAgICAgICAgICAgICAgdG9rZW5zW3Rva2Vucy5sZW5ndGhdID0ge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiB0eXBlc1tpXSxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlc1tpICsgMV1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0b2tlbnM7XG4gICAgfTtcblxuICAgIHRoaXMucmVtb3ZlQ2FwdHVyaW5nR3JvdXBzID0gZnVuY3Rpb24oc3JjKSB7XG4gICAgICAgIHZhciByID0gc3JjLnJlcGxhY2UoXG4gICAgICAgICAgICAvXFxbKD86XFxcXC58W15cXF1dKSo/XFxdfFxcXFwufFxcKFxcP1s6PSFdfChcXCgpL2csXG4gICAgICAgICAgICBmdW5jdGlvbih4LCB5KSB7cmV0dXJuIHkgPyBcIig/OlwiIDogeDt9XG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiByO1xuICAgIH07XG5cbiAgICB0aGlzLmNyZWF0ZVNwbGl0dGVyUmVnZXhwID0gZnVuY3Rpb24oc3JjLCBmbGFnKSB7XG4gICAgICAgIGlmIChzcmMuaW5kZXhPZihcIig/PVwiKSAhPSAtMSkge1xuICAgICAgICAgICAgdmFyIHN0YWNrID0gMDtcbiAgICAgICAgICAgIHZhciBpbkNoQ2xhc3MgPSBmYWxzZTtcbiAgICAgICAgICAgIHZhciBsYXN0Q2FwdHVyZSA9IHt9O1xuICAgICAgICAgICAgc3JjLnJlcGxhY2UoLyhcXFxcLil8KFxcKCg/OlxcP1s9IV0pPyl8KFxcKSl8KFtcXFtcXF1dKS9nLCBmdW5jdGlvbihcbiAgICAgICAgICAgICAgICBtLCBlc2MsIHBhcmVuT3BlbiwgcGFyZW5DbG9zZSwgc3F1YXJlLCBpbmRleFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluQ2hDbGFzcykge1xuICAgICAgICAgICAgICAgICAgICBpbkNoQ2xhc3MgPSBzcXVhcmUgIT0gXCJdXCI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzcXVhcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5DaENsYXNzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmVuQ2xvc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YWNrID09IGxhc3RDYXB0dXJlLnN0YWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0Q2FwdHVyZS5lbmQgPSBpbmRleCsxO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENhcHR1cmUuc3RhY2sgPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdGFjay0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFyZW5PcGVuKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrKys7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJlbk9wZW4ubGVuZ3RoICE9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RDYXB0dXJlLnN0YWNrID0gc3RhY2s7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0Q2FwdHVyZS5zdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBtO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGlmIChsYXN0Q2FwdH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7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUpXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0ge3R5cGU6IHR5cGUsIHZhbHVlOiBza2lwcGVkfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbWF0Y2gubGVuZ3RoLTI7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaFtpICsgMV0gPT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG5cbiAgICAgICAgICAgICAgICBydWxlID0gc3RhdGVbbWFwcGluZ1tpXV07XG5cbiAgICAgICAgICAgICAgICBpZiAocnVsZS5vbk1hdGNoKVxuICAgICAgICAgICAgICAgICAgICB0eXBlID0gcnVsZS5vbk1hdGNoKHZhbHVlLCBjdXJyZW50U3RhdGUsIHN0YWNrLCBsaW5lKTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHR5cGUgPSBydWxlLnRva2VuO1xuXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUubmV4dCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGUubmV4dCA9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U3RhdGUgPSBydWxlLm5leHQ7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U3RhdGUgPSBydWxlLm5leHQoY3VycmVudFN0YXRlLCBzdGFjayk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHN0YXRlID0gdGhpcy5zdGF0ZXNbY3VycmVudFN0YXRlXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXBvcnRFcnJvcihcInN0YXRlIGRvZXNuJ3QgZXhpc3RcIiwgY3VycmVudFN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTdGF0ZSA9IFwic3RhcnRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlID0gdGhpcy5zdGF0ZXNbY3VycmVudFN0YXRlXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtYXBwaW5nID0gdGhpcy5tYXRjaE1hcHBpbmdzW2N1cnJlbnRTdGF0ZV07XG4gICAgICAgICAgICAgICAgICAgIGxhc3RJbmRleCA9IGluZGV4O1xuICAgICAgICAgICAgICAgICAgICByZSA9IHRoaXMucmVnRXhwc1tjdXJyZW50U3RhdGVdO1xuICAgICAgICAgICAgICAgICAgICByZS5sYXN0SW5kZXggPSBpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUuY29uc3VtZUxpbmVFbmQpXG4gICAgICAgICAgICAgICAgICAgIGxhc3RJbmRleCA9IGluZGV4O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHR5cGUgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCghcnVsZSB8fCBydWxlLm1lcmdlICE9PSBmYWxzZSkgJiYgdG9rZW4udHlwZSA9PT0gdHlwZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4udmFsdWUgKz0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udHlwZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHt0eXBlOiB0eXBlLCB2YWx1ZTogdmFsdWV9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbi50eXBlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2godG9rZW4pO1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHt0eXBlOiBudWxsLCB2YWx1ZTogXCJcIn07XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdHlwZS5sZW5ndGg7IGkrKylcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKHR5cGVbaV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGxhc3RJbmRleCA9PSBsaW5lLmxlbmd0aClcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgbGFzdEluZGV4ID0gaW5kZXg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaEF0dGVtcHRzKysgPiBNQVhfVE9LRU5fQ09VTlQpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hBdHRlbXB0cyA+IDIgKiBsaW5lLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcG9ydEVycm9yKFwiaW5maW5pdGUgbG9vcCB3aXRoIGluIGFjZSB0b2tlbml6ZXJcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRTdGF0ZTogc3RhcnRTdGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHdoaWxlIChsYXN0SW5kZXggPCBsaW5lLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udHlwZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogbGluZS5zdWJzdHJpbmcobGFzdEluZGV4LCBsYXN0SW5kZXggKz0gMjAwMCksXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcIm92ZXJmbG93XCJcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY3VycmVudFN0YXRlID0gXCJzdGFydFwiO1xuICAgICAgICAgICAgICAgIHN0YWNrID0gW107XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodG9rZW4udHlwZSlcbiAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgXG4gICAgICAgIGlmIChzdGFjay5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBpZiAoc3RhY2tbMF0gIT09IGN1cnJlbnRTdGF0ZSlcbiAgICAgICAgICAgICAgICBzdGFjay51bnNoaWZ0KFwiI3RtcFwiLCBjdXJyZW50U3RhdGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0b2tlbnMgOiB0b2tlbnMsXG4gICAgICAgICAgICBzdGF0ZSA6IHN0YWNrLmxlbmd0aCA/IHN0YWNrIDogY3VycmVudFN0YXRlXG4gICAgICAgIH07XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLnJlcG9ydEVycm9yID0gY29uZmlnLnJlcG9ydEVycm9yO1xuICAgIFxufSkuY2FsbChUb2tlbml6ZXIucHJvdG90eXBlKTtcblxuZXhwb3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mIChydWxlLm5leHQgfHwgcnVsZS5vbk1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcnVsZS5uZXh0ID09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChydWxlLm5leHQuaW5kZXhPZihwcmVmaXgpICE9PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dCA9IHByZWZpeCArIHJ1bGUubmV4dDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAocnVsZS5uZXh0U3RhdGUgJiYgcnVsZS5uZXh0U3RhdGUuaW5kZXhPZihwcmVmaXgpICE9PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgcnVsZS5uZXh0U3RhdGUgPSBwcmVmaXggKyBydWxlLm5leHRTdGF0ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLiRydWxlc1twcmVmaXggKyBrZXldID0gc3RhdGU7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy5nZXRSdWxlcyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kcnVsZXM7XG4gICAgfTtcblxuICAgIHRoaXMuZW1iZWRSdWxlcyA9IGZ1bmN0aW9uIChIaWdobGlnaHRSdWxlcywgcHJlZml4LCBlc2NhcGVSdWxlcywgc3RhdGVzLCBhcHBlbmQpIHtcbiAgICAgICAgdmFyIGVtYmVkUnVsZXMgPSB0eXBlb2YgSGlnaGxpZ2h0UnVsZXMgPT0gXCJmdW5jdGlvblwiXG4gICAgICAgICAgICA/IG5ldyBIaWdobGlnaHRSdWxlcygpLmdldFJ1bGVzKClcbiAgICAgICAgICAgIDogSGlnaGxpZ2h0UnVsZXM7XG4gICAgICAgIGlmIChzdGF0ZXMpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3RhdGVz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UsIGN1cnJlbnRTdGF0ZSk7XG4gICAgICAgIHJldHVybiB0aGlzLm5leHRTdGF0ZTtcbiAgICB9O1xuICAgIHZhciBwb3BTdGF0ZSA9IGZ1bmN0aW9uKGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgcmV0dXJuIHN0YWNrLnNoaWZ0KCkgfHwgXCJzdGFydFwiO1xuICAgIH07XG5cbiAgICB0aGlzLm5vcm1hbGl6ZVJ1bGVzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciBpZCA9IDA7XG4gICAgICAgIHZhciBydWxlcyA9IHRoaXMuJHJ1bGVzO1xuICAgICAgICBmdW5jdGlvbiBwcm9jZXNzU3RhdGUoa2V5KSB7XG4gICAgICAgICAgICB2YXIgc3RhdGUgPSBydWxlc1trZXldO1xuICAgICAgICAgICAgc3RhdGUucHJvY2Vzc2VkID0gdHJ1ZTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3RhdGUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgcnVsZSA9IHN0YXRlW2ldO1xuICAgICAgICAgICAgICAgIHZhciB0b0luc2VydCA9IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocnVsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9JbnNlcnQgPSBydWxlO1xuICAgICAgICAgICAgICAgICAgICBydWxlID0ge307XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghcnVsZS5yZWdleCAmJiBydWxlLnN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUucmVnZXggPSBydWxlLnN0YXJ0O1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXJ1bGUubmV4dClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dCA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBydWxlLm5leHQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IHJ1bGUudG9rZW5cbiAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW46IHJ1bGUudG9rZW4gKyBcIi5lbmRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2V4OiBydWxlLmVuZCB8fCBydWxlLnN0YXJ0LFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dDogXCJwb3BcIlxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS50b2tlbiA9IHJ1bGUudG9rZW4gKyBcIi5zdGFydFwiO1xuICAgICAgICAgICAgICAgICAgICBydWxlLnB1c2ggPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgbmV4dCA9IHJ1bGUubmV4dCB8fCBydWxlLnB1c2g7XG4gICAgICAgICAgICAgICAgaWYgKG5leHQgJiYgQXJyYXkuaXNBcnJheShuZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3RhdGVOYW1lID0gcnVsZS5zdGF0ZU5hbWU7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3RhdGVOYW1lKSAge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVOYW1lID0gcnVsZS50b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3RhdGVOYW1lICE9IFwic3RyaW5nXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVOYW1lID0gc3RhdGVOYW1lWzBdIHx8IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocnVsZXNbc3RhdGVOYW1lXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZU5hbWUgKz0gaWQrKztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBydWxlc1tzdGF0ZU5hbWVdID0gbmV4dDtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5uZXh0ID0gc3RhdGVOYW1lO1xuICAgICAgICAgICAgICAgICAgICBwcm9jZXNzU3RhdGUoc3RhdGVOYW1lKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5leHQgPT0gXCJwb3BcIikge1xuICAgICAgICAgICAgICAgICAgICBydWxlLm5leHQgPSBwb3BTdGF0ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAocnVsZS5wdXNoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dFN0YXRlID0gcnVsZS5uZXh0IHx8IHJ1bGUucHVzaDtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5uZXh0ID0gcHVzaFN0YXRlO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZS5wdXNoO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChydWxlLnJ1bGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIHIgaW4gcnVsZS5ydWxlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bGVzW3JdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bGVzW3JdLnB1c2gpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGVzW3JdLnB1c2guYXBwbHkocnVsZXNbcl0sIHJ1bGUucnVsZXNbcl0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlc1tyXSA9IHJ1bGUucnVsZXNbcl07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGluY2x1ZGVOYW1lID0gdHlwZW9mIHJ1bGUgPT0gXCJzdHJpbmdcIiA/IHJ1bGUgOiBydWxlLmluY2x1ZGU7XG4gICAgICAgICAgICAgICAgaWYgKGluY2x1ZGVOYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGluY2x1ZGVOYW1lKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvSW5zZXJ0ID0gaW5jbHVkZU5hbWUubWFwKGZ1bmN0aW9uKHgpIHsgcmV0dXJuIHJ1bGVzW3hdOyB9KTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgdG9JbnNlcnQgPSBydWxlc1tpbmNsdWRlTmFtZV07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRvSW5zZXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBhcmdzID0gW2ksIDFdLmNvbmNhdCh0b0luc2VydCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChydWxlLm5vRXNjYXBlKVxuICAgICAgICAgICAgICAgICAgICAgICAgYXJncyA9IGFyZ3MuZmlsdGVyKGZ1bmN0aW9uKHgpIHtyZXR1cm4gIXgubmV4dDt9KTtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUuc3BsaWNlLmFwcGx5KHN0YXRlLCBhcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAocnVsZS5rZXl3b3JkTWFwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUudG9rZW4gPSB0aGlzLmNyZWF0ZUtleXdvcmRNYXBwZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBydWxlLmtleXdvcmRNYXAsIHJ1bGUuZGVmYXVsdFRva2VuIHx8IFwidGV4dFwiLCBydWxlLmNhc2VJbnNlbnNpdGl2ZVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZS5kZWZhdWx0VG9rZW47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIE9iamVjdC5rZXlzKHJ1bGVzKS5mb3JFYWNoKHByb2Nlc3NTdGF0ZSwgdGhpcyk7XG4gICAgfTtcblxuICAgIHRoaXMuY3JlYXRlS2V5d29yZE1hcHBlciA9IGZ1bmN0aW9uKG1hcCwgZGVmYXVsdFRva2VuLCBpZ25vcmVDYXNlLCBzcGxpdENoYXIpIHtcbiAgICAgICAgdmFyIGtleXdvcmRzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICAgICAgT2JqZWN0LmtleXMobWFwKS5mb3JFYWNoKGZ1bmN0aW9uKGNsYXNzTmFtZSkge1xuICAgICAgICAgICAgdmFyIGEgPSBtYXBbY2xhc3NOYW1lXTtcbiAgICAgICAgICAgIGlmIChpZ25vcmVDYXNlKVxuICAgICAgICAgICAgICAgIGEgPSBhLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICB2YXIgbGlzdCA9IGEuc3BsaXQoc3BsaXRDaGFyIHx8IFwifFwiKTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBsaXN0Lmxlbmd0aDsgaS0tOyApXG4gICAgICAgICAgICAgICAga2V5d29yZHNbbGlzdFtpXV0gPSBjbGFzc05hbWU7XG4gICAgICAgIH0pO1xuICAgICAgICBpZiAoT2JqZWN0LmdldFByb3RvdHlwZU9mKGtleXdvcmRzKSkge1xuICAgICAgICAgICAga2V5d29yZHMuX19wcm90b19fID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLiRrZXl3b3JkTGlzdCA9IE9iamVjdC5rZXlzKGtleXdvcmRzKTtcbiAgICAgICAgbWFwID0gbnVsbDtcbiAgICAgICAgcmV0dXJuIGlnbm9yZUNhc2VcbiAgICAgICAgICAgID8gZnVuY3Rpb24odmFsdWUpIHtyZXR1cm4ga2V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B0b2tlbi5pbmRleCA6IC0xO1xufTtcblxuKGZ1bmN0aW9uKCkgeyBcbiAgICB0aGlzLnN0ZXBCYWNrd2FyZCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB0aGlzLiR0b2tlbkluZGV4IC09IDE7XG4gICAgICAgIFxuICAgICAgICB3aGlsZSAodGhpcy4kdG9rZW5JbmRleCA8IDApIHtcbiAgICAgICAgICAgIHRoaXMuJHJvdyAtPSAxO1xuICAgICAgICAgICAgaWYgKHRoaXMuJHJvdyA8IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLiRyb3cgPSAwO1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdGhpcy4kcm93VG9rZW5zID0gdGhpcy4kc2Vzc2lvbi5nZXRUb2tlbnModGhpcy4kcm93KTtcbiAgICAgICAgICAgIHRoaXMuJHRva2VuSW5kZXggPSB0aGlzLiRyb3dUb2tlbnMubGVuZ3RoIC0gMTtcbiAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgIHJldHVybiB0aGlzLiRyb3dUb2tlbnNbdGhpcy4kdG9rZW5JbmRleF07XG4gICAgfTsgICBcbiAgICB0aGlzLnN0ZXBGb3J3YXJkID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHRoaXMuJHRva2VuSW5kZXggKz0gMTtcbiAgICAgICAgdmFyIHJvd0NvdW50O1xuICAgICAgICB3aGlsZSAodGhpcy4kdG9rZW5JbmRleCA+PSB0aGlzLiRyb3dUb2tlbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICB0aGlzLiRyb3cgKz0gMTtcbiAgICAgICAgICAgIGlmICghcm93Q291bnQpXG4gICAgICAgICAgICAgICAgcm93Q291bnQgPSB0aGlzLiRzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICAgICAgaWYgKHRoaXMuJHJvdyA+PSByb3dDb3VudCkge1xuICAgICAgICAgICAgICA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3Npb24uZG9jLmdldExpbmUoY3Vyc29yLnJvdyk7XG4gICAgICAgIGlmICh0ZXh0ID09ICd7Jykge1xuICAgICAgICAgICAgaW5pdENvbnRleHQoZWRpdG9yKTtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb24gPSBlZGl0b3IuZ2V0U2VsZWN0aW9uUmFuZ2UoKTtcbiAgICAgICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShzZWxlY3Rpb24pO1xuICAgICAgICAgICAgaWYgKHNlbGVjdGVkICE9PSBcIlwiICYmIHNlbGVjdGVkICE9PSBcIntcIiAmJiBlZGl0b3IuZ2V0V3JhcEJlaGF2aW91cnNFbmFibGVkKCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0V3JhcHBlZChzZWxlY3Rpb24sIHNlbGVjdGVkLCAneycsICd9Jyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKENzdHlsZUJlaGF2aW91ci5pc1NhbmVJbnNlcnRpb24oZWRpdG9yLCBzZXNzaW9uKSkge1xuICAgICAgICAgICAgICAgIGlmICgvW1xcXVxcfVxcKV0vLnRlc3QobGluZVtjdXJzb3IuY29sdW1uXSkgfHwgZWRpdG9yLmluTXVsdGlTZWxlY3RNb2RlIHx8IG9wdGlvbnMgJiYgb3B0aW9ucy5icmFjZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnJlY29yZEF1dG9JbnNlcnQoZWRpdG9yLCBzZXNzaW9uLCBcIn1cIik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAne30nLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBDc3R5bGVCZWhhdmlvdXIucmVjb3JkTWF5YmVJbnNlcnQoZWRpdG9yLCBzZXNzaW9uLCBcIntcIik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAneycsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICh0ZXh0ID09ICd9Jykge1xuICAgICAgICAgICAgaW5pdENvbnRleHQoZWRpdG9yKTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09ICd9Jykge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGluZyA9IHNlc3Npb24uJGZpbmRPcGVuaW5nQnJhY2tldCgnfScsIHtjb2x1bW46IGN1cnNvci5jb2x1bW4gKyAxLCByb3c6IGN1cnNvci5yb3d9KTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hpbmcgIT09IG51bGwgJiYgQ3N0eWxlQmVoYXZpb3VyLmlzQXV0b0luc2VydGVkQ2xvc2luZyhjdXJzb3IsIGxpbmUsIHRleHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5wb3BBdXRvSW5zZXJ0ZWRDbG9zaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRleHQgPT0gXCJcXG5cIiB8fCB0ZXh0ID09IFwiXFxyXFxuXCIpIHtcbiAgICAgICAgICAgIGluaXRDb250ZXh0KGVkaXRvcik7XG4gICAgICAgICAgICB2YXIgY2xvc2luZyA9IFwiXCI7XG4gICAgICAgICAgICBpZiAoQ3N0eWxlQmVoYXZpb3VyLmlzTWF5YmVJbnNlcnRlZENsb3NpbmcoY3Vyc29yLCBsaW5lKSkge1xuICAgICAgICAgICAgICAgIGNsb3NpbmcgPSBsYW5nLnN0cmluZ1JlcGVhdChcIn1cIiwgY29udGV4dC5tYXliZUluc2VydGVkQnJhY2tldHMpO1xuICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5jbGVhck1heWJlSW5zZXJ0ZWRDbG9zaW5nKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbiwgY3Vyc29yLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgdmFyIG9wZW5CcmFjZVBvcyA9IHNlc3Npb24uZmluZE1hdGNoaW5nQnJhY2tldCh7cm93OiBjdXJzb3Iucm93LCBjb2x1bW46IGN1cnNvci5jb2x1bW4rMX0sICd9Jyk7XG4gICAgICAgICAgICAgICAgaWYgKCFvcGVuQnJhY2VQb3MpXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dF9pbmRlbnQgPSB0aGlzLiRnZXRJbmRlbnQoc2Vzc2lvbi5nZXRMaW5lKG9wZW5CcmFjZVBvcy5yb3cpKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2xvc2luZykge1xuICAgICAgICAgICAgICAgIHZhciBuZXh0X2luZGVudCA9IHRoaXMuJGdldEluZGVudChsaW5lKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICA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T0gJ30nKSB7XG4gICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbisrO1xuICAgICAgICAgICAgICAgIHJldHVybiByYW5nZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29udGV4dC5tYXliZUluc2VydGVkQnJhY2tldHMtLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJwYXJlbnNcIiwgXCJpbnNlcnRpb25cIiwgZnVuY3Rpb24oc3RhdGUsIGFjdGlvbiwgZWRpdG9yLCBzZXNzaW9uLCB0ZXh0KSB7XG4gICAgICAgIGlmICh0ZXh0ID09ICcoJykge1xuICAgICAgICAgICAgaW5pdENvbnRleHQoZWRpdG9yKTtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb24gPSBlZGl0b3IuZ2V0U2VsZWN0aW9uUmFuZ2UoKTtcbiAgICAgICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShzZWxlY3Rpb24pO1xuICAgICAgICAgICAgaWYgKHNlbGVjdGVkICE9PSBcIlwiICYmIGVkaXRvci5nZXRXcmFwQmVoYXZpb3Vyc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBnZXRXcmFwcGVkKHNlbGVjdGlvbiwgc2VsZWN0ZWQsICcoJywgJyknKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoQ3N0eWxlQmVoYXZpb3VyLmlzU2FuZUluc2VydGlvbihlZGl0b3IsIHNlc3Npb24pKSB7XG4gICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnJlY29yZEF1dG9JbnNlcnQoZWRpdG9yLCBzZXNzaW9uLCBcIilcIik7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dDogJygpJyxcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRleHQgPT0gJyknKSB7XG4gICAgICAgICAgICBpbml0Q29udGV4dChlZGl0b3IpO1xuICAgICAgICAgICAgdmFyIGN1cnNvciA9IGVkaXRvci5nZXRDdXJzb3JQb3NpdGlvbigpO1xuICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmRvYy5nZXRMaW5lKGN1cnNvci5yb3cpO1xuICAgICAgICAgICAgdmFyIHJpZ2h0Q2hhciA9IGxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4sIGN1cnNvci5jb2x1bW4gKyAxKTtcbiAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT0gJyknKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoaW5nID0gc2Vzc2lvbi4kZmluZE9wZW5pbmdCcmFja2V0KCcpJywge2NvbHVtbjogY3Vyc29yLmNvbHVtbiArIDEsIHJvdzogY3Vyc29yLnJvd30pO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZyAhPT0gbnVsbCAmJiBDc3R5bGVCZWhhdmlvdXIuaXNBdXRvSW5zZXJ0ZWRDbG9zaW5nKGN1cnNvciwgbGluZSwgdGV4dCkpIHtcbiAgICAgICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnBvcEF1dG9JbnNlcnRlZENsb3NpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHRoaXMuYWRkKFwicGFyZW5zXCIsIFwiZGVsZXRpb25cIiwgZnVuY3Rpb24oc3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nKGN1cnNvciwgbGluZSwgdGV4dCkpIHtcbiAgICAgICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnBvcEF1dG9JbnNlcnRlZENsb3NpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHRoaXMuYWRkKFwiYnJhY2tldHNcIiwgXCJkZWxldGlvblwiLCBmdW5jdGlvbihzdGF0ZSwgYWN0aW9uLCBlZGl0b3IsIHNlc3Npb24sIHJhbmdlKSB7XG4gICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShyYW5nZSk7XG4gICAgICAgIGlmICghcmFuZ2UuaXNNdWx0aUxpbmUoKSAmJiBzZWxlY3RlZCA9PSAnWycpIHtcbiAgICAgICAgICAgIGluaXRDb250ZXh0KGVkaXRvcik7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZG9jLmdldExpbmUocmFuZ2Uuc3RhcnQucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhyYW5nZS5zdGFydC5jb2x1bW4gKyAxLCByYW5nZS5zdGFydC5jb2x1bW4gKyAyKTtcbiAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT0gJ10nKSB7XG4gICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbisrO1xuICAgICAgICAgICAgICAgIHJldHVybiByYW5nZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJzdHJpbmdfZHF1b3Rlc1wiLCBcImluc2VydGlvbl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gdmFyIGxlZnRDaGFyID0gbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbi0xLCBjdXJzb3IuY29sdW1uKTtcbiAgICAgICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbiwgY3Vyc29yLmNvbHVtbiArIDEpO1xuXG4gICAgICAgICAgICAgICAgdmFyIHRva2VuID0gc2Vzc2lvbi5nZXRUb2tlbkF0KGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuICAgICAgICAgICAgICAgIHZhciByaWdodFRva2VuID0gc2Vzc2lvbi5nZXRUb2tlbkF0KGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4gKyAxKTtcbiAgICAgICAgICAgICAgICBpZiAobGVmdENoYXIgPT0gXCJcXFxcXCIgJiYgdG9rZW4gJiYgL2VzY2FwZS8udGVzdCh0b2tlbi50eXBlKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG5cbiAgICAgICAgICAgICAgICB2YXIgc3RyaW5nQmVmb3JlID0gdG9rZW4gJiYgL3N0cmluZ3xlc2NhcGUvLnRlc3QodG9rZW4udHlwZSk7XG4gICAgICAgICAgICAgICAgdmFyIHN0cmluZ0FmdGVyID0gIXJpZ2h0VG9rZW4gfHwgL3N0cmluZ3xlc2NhcGUvLnRlc3QocmlnaHRUb2tlbi50eXBlKTtcblxuICAgICAgICAgICAgICAgIHZhciBwYWlyO1xuICAgICAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT0gcXVvdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFpciA9IHN0cmluZ0JlZm9yZSAhPT0gc3RyaW5nQWZ0ZXI7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYWlyICYmIC9zdHJpbmdcXC5lbmQvLnRlc3QocmlnaHRUb2tlbi50eXBlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhaXIgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RyaW5nQmVmb3JlICYmICFzdHJpbmdBZnRlcilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyB3cmFwIHN0cmluZyB3aXRoIGRpZmZlcmVudCBxdW90ZVxuICAgICAgICAgICAgICAgICAgICBpZiAoc3RyaW5nQmVmb3JlICYmIHN0cmluZ0FmdGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7IC8vIGRvIG5vdCBwYWlyIHF1b3RlcyBpbnNpZGUgc3RyaW5nc1xuICAgICAgICAgICAgICAgICAgICB2YXIgd29yZFJlID0gc2Vzc2lvbi4kbW9kZS50b2tlblJlO1xuICAgICAgICAgICAgICAgICAgICB3b3JkUmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGlzV29yZEJlZm9yZSA9IHdvcmRSZS50ZXN0KGxlZnRDaGFyKTtcbiAgICAgICAgICAgICAgICAgICAgd29yZFJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpc1dvcmRBZnRlciA9IHdvcmRSZS50ZXN0KGxlZnRDaGFyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzV29yZEJlZm9yZSB8fCBpc1dvcmRBZnRlcilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyBiZWZvcmUgb3IgYWZ0ZXIgYWxwaGFudW1lcmljXG4gICAgICAgICAgICAgICAgICAgIGlmIChyaWdodENoYXIgJiYgIS9bXFxzOywufSlcXF1cXFxcXS8udGVzdChyaWdodENoYXIpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7IC8vIHRoZXJlIGlzIHJpZ2h0Q2hhciBhbmQgaXQgaXNuJ3QgY2xvc2luZ1xuICAgICAgICAgICAgICAgICAgICBwYWlyID0gdHJ1ZTtcbiAgICAgICAgIC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sIGkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGVzdFJlbW92ZShsaW5lLCBpKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmICghaWdub3JlQmxhbmtMaW5lcyB8fCAvXFxTLy50ZXN0KGxpbmUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvYy5pbnNlcnRJbkxpbmUoe3JvdzogaSwgY29sdW1uOiBsaW5lLmxlbmd0aH0sIGxpbmVDb21tZW50RW5kKTtcbiAgICAgICAgICAgICAgICAgICAgZG9jLmluc2VydEluTGluZSh7cm93OiBpLCBjb2x1bW46IG1pbkluZGVudH0sIGxpbmVDb21tZW50U3RhcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHZhciB1bmNvbW1lbnQgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgdmFyIG07XG4gICAgICAgICAgICAgICAgaWYgKG0gPSBsaW5lLm1hdGNoKHJlZ2V4cEVuZCkpXG4gICAgICAgICAgICAgICAgICAgIGRvYy5yZW1vdmVJbkxpbmUoaSwgbGluZS5sZW5ndGggLSBtWzBdLmxlbmd0aCwgbGluZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIGlmIChtID0gbGluZS5tYXRjaChyZWdleHBTdGFydCkpXG4gICAgICAgICAgICAgICAgICAgIGRvYy5yZW1vdmVJbkxpbmUoaSwgbVsxXS5sZW5ndGgsIG1bMF0ubGVuZ3RoKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHZhciB0ZXN0UmVtb3ZlID0gZnVuY3Rpb24obGluZSwgcm93KSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlZ2V4cFN0YXJ0LnRlc3QobGluZSkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIHZhciB0b2tlbnMgPSBzZXNzaW9uLmdldFRva2Vucyhyb3cpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdG9rZW5zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbnNbaV0udHlwZSA9PT0gXCJjb21tZW50XCIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodGhpcy5saW5lQ29tbWVudFN0YXJ0KSkge1xuICAgICAgICAgICAgICAgIHZhciByZWdleHBTdGFydCA9IHRoaXMubGluZUNvbW1lbnRTdGFydC5tYXAobGFuZy5lc2NhcGVSZWdFeHApLmpvaW4oXCJ8XCIpO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lQ29tbWVudFN0YXJ0ID0gdGhpcy5saW5lQ29tbWVudFN0YXJ0WzBdO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVnZXhwU3RhcnQgPSBsYW5nLmVzY2FwZVJlZ0V4cCh0aGlzLmxpbmVDb21tZW50U3RhcnQpO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lQ29tbWVudFN0YXJ0ID0gdGhpcy5saW5lQ29tbWVudFN0YXJ0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVnZXhwU3RhcnQgPSBuZXcgUmVnRXhwKFwiXihcXFxccyopKD86XCIgKyByZWdleHBTdGFydCArIFwiKSA/XCIpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpbnNlcnRBdFRhYlN0b3AgPSBzZXNzaW9uLmdldFVzZVNvZnRUYWJzKCk7XG5cbiAgICAgICAgICAgIHZhciB1bmNvbW1lbnQgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgdmFyIG0gPSBsaW5lLm1hdGNoKHJlZ2V4cFN0YXJ0KTtcbiAgICAgICAgICAgICAgICBpZiAoIW0pIHJldHVybjtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnQgPSBtWzFdLmxlbmd0aCwgZW5kID0gbVswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWYgKCFzaG91bGRJbnNlcnRTcGFjZShsaW5lLCBzdGFydCwgZW5kKSAmJiBtWzBdW2VuZCAtIDFdID09IFwiIFwiKVxuICAgICAgICAgICAgICAgICAgICBlbmQtLTtcbiAgICAgICAgICAgICAgICBkb2MucmVtb3ZlSW5MaW5lKGksIHN0YXJ0LCBlbmQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHZhciBjb21tZW50V2l0aFNwYWNlID0gbGluZUNvbW1lbnRTdGFydCArIFwiIFwiO1xuICAgICAgICAgICAgdmFyIGNvbW1lbnQgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFpZ25vcmVCbGFua0xpbmVzIHx8IC9cXFMvLnRlc3QobGluZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNob3VsZEluc2VydFNwYWNlKGxpbmUsIG1pbkluZGVudCwgbWluSW5kZW50KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvYy5pbnNlcnRJbkxpbmUoe3JvdzogaSwgY29sdW1uOiBtaW5JbmRlbnR9LCBjb21tZW50V2l0aFNwYWNlKTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgZG9jLmluc2VydEluTGluZSh7cm93OiBpLCBjb2x1bW46IG1pbkluZGVudH0sIGxpbmVDb21tZW50U3RhcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgdGVzdFJlbW92ZSA9IGZ1bmN0aW9uKGxpbmUsIGkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVnZXhwU3RhcnQudGVzdChsaW5lKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBzaG91bGRJbnNlcnRTcGFjZSA9IGZ1bmN0aW9uKGxpbmUsIGJlZm9yZSwgYWZ0ZXIpIHtcbiAgICAgICAgICAgICAgICB2YXIgc3BhY2VzID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoYmVmb3JlLS0gJiYgbGluZS5jaGFyQXQoYmVmb3JlKSA9PSBcIiBcIilcbiAgICAgICAgICAgICAgICAgICAgc3BhY2VzKys7XG4gICAgICAgICAgICAgICAgaWYgKHNwYWNlcyAlIHRhYlNpemUgIT0gMClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIHZhciBzcGFjZXMgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlIChsaW5lLmNoYXJBdChhZnRlcisrKSA9PSBcIiBcIilcbiAgICAgICAgICAgICAgICAgICAgc3BhY2VzKys7XG4gICAgICAgICAgICAgICAgaWYgKHRhYlNpemUgPiAyKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BhY2VzICUgdGFiU2l6ZSAhPSB0YWJTaXplIC0gMTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGFjZXMgJSB0YWJTaXplID09IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaXRlcihmdW4pIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdzsgaSA8PSBlbmRSb3c7IGkrKylcbiAgICAgICAgICAgICAgICBmdW4oZG9jLmdldExpbmUoaSksIGkpO1xuICAgICAgICB9XG5cblxuICAgICAgICB2YXIgbWluRW1wdHlMZW5ndGggPSBJbmZpbml0eTtcbiAgICAgICAgaXRlcihmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICB2YXIgaW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICAgICAgaWYgKGluZGVudCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5kZW50IDwgbWluSW5kZW50KVxuICAgICAgICAgICAgICAgICAgICBtaW5JbmRlbnQgPSBpbmRlbnQ7XG4gICAgICAgICAgICAgICAgaWYgKHNob3VsZFJlbW92ZSAmJiAhdGVzdFJlbW92ZShsaW5lLCBpKSlcbiAgICAgICAgICAgICAgICAgICAgc2hvdWxkUmVtb3ZlID0gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1pbkVtcHR5TGVuZ3RoID4gbGluZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBtaW5FbXB0eUxlbmd0aCA9IGxpbmUubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAobWluSW5kZW50ID09IEluZmluaXR5KSB7XG4gICAgICAgICAgICBtaW5JbmRlbnQgPSBtaW5FbXB0eUxlbmd0aDtcbiAgICAgICAgICAgIGlnbm9yZUJsYW5rTGluZXMgPSBmYWxzZTtcbiAgICAgICAgICAgIHNob3VsZFJlbW92ZSA9IGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGluc2VydEF0VGFiU3RvcCAmJiBtaW5JbmRlbnQgJSB0YWJTaXplICE9IDApXG4gICAgICAgICAgICBtaW5JbmRlbnQgPSBNYXRoLmZsb29yKG1pbkluZGVudCAvIHRhYlNpemUpICogdGFiU2l6ZTtcblxuICAgICAgICBpdGVyKHNob3VsZFJlbW92ZSA/IHVuY29tbWVudCA6IGNvbW1lbnQpO1xuICAgIH07XG5cbiAgICB0aGlzLnRvZ2dsZUJsb2NrQ29tbWVudCA9IGZ1bmN0aW9uKHN0YXRlLCBzZXNzaW9uLCByYW5nZSwgY3Vyc29yKSB7XG4gICAgICAgIHZhciBjb21tZW50ID0gdGhpcy5ibG9ja0NvbW1lbnQ7XG4gICAgICAgIGlmICghY29tbWVudClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgaWYgKCFjb21tZW50LnN0YXJ0ICYmIGNvbW1lbnRbMF0pXG4gICAgICAgICAgICBjb21tZW50ID0gY29tbWVudFswXTtcblxuICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCBjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKTtcbiAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG5cbiAgICAgICAgdmFyIHNlbCA9IHNlc3Npb24uc2VsZWN0aW9uO1xuICAgICAgICB2YXIgaW5pdGlhbFJhbmdlID0gc2Vzc2lvbi5zZWxlY3Rpb24udG9PcmllbnRlZFJhbmdlKCk7XG4gICAgICAgIHZhciBzdGFydFJvdywgY29sRGlmZjtcblxuICAgICAgICBpZiAodG9rZW4gJiYgL2NvbW1lbnQvLnRlc3QodG9rZW4udHlwZSkpIHtcbiAgICAgICAgICAgIHZhciBzdGFydFJhbmdlLCBlbmRSYW5nZTtcbiAgICAgICAgICAgIHdoaWxlICh0b2tlbiAmJiAvY29tbWVudC8udGVzdCh0b2tlbi50eXBlKSkge1xuICAgICAgICAgICAgICAgIHZhciBpID0gdG9rZW4udmFsdWUuaW5kZXhPZihjb21tZW50LnN0YXJ0KTtcbiAgICAgICAgICAgICAgICBpZiAoaSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIGk7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0UmFuZ2UgPSBuZXcgUmFuZ2Uocm93LCBjb2x1bW4sIHJvdywgY29sdW1uICsgY29tbWVudC5zdGFydC5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3Ioc2Vzc2lvbiwgY3Vyc29yLnJvdywgY3Vyc29yLmNvbHVtbik7XG4gICAgICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcbiAgICAgICAgICAgIHdoaWxlICh0b2tlbiAmJiAvY29tbWVudC8udGVzdCh0b2tlbi50eXBlKSkge1xuICAgICAgICAgICAgICAgIHZhciBpID0gdG9rZW4udmFsdWUuaW5kZXhPZihjb21tZW50LmVuZCk7XG4gICAgICAgICAgICAgICAgaWYgKGkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyBpO1xuICAgICAgICAgICAgICAgICAgICBlbmRSYW5nZSA9IG5ldyBSYW5nZShyb3csIGNvbHVtbiwgcm93LCBjb2x1bW4gKyBjb21tZW50LmVuZC5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGVuZFJhbmdlKVxuICAgICAgICAgICAgICAgIHNlc3Npb24ucmVtb3ZlKGVuZFJhbmdlKTtcbiAgICAgICAgICAgIGlmIChzdGFydFJhbmdlKSB7XG4gICAgICAgICAgICAgICAgc2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WZhdWx0SGFuZGxlci5hcHBseSh0aGlzLCBhcmdzKTtcbiAgICAgICAgcmV0dXJuIGRlZmF1bHRIYW5kbGVyID8gcmV0IDogdW5kZWZpbmVkO1xuICAgIH07XG5cbiAgICB0aGlzLnRyYW5zZm9ybUFjdGlvbiA9IGZ1bmN0aW9uKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgcGFyYW0pIHtcbiAgICAgICAgaWYgKHRoaXMuJGJlaGF2aW91cikge1xuICAgICAgICAgICAgdmFyIGJlaGF2aW91cnMgPSB0aGlzLiRiZWhhdmlvdXIuZ2V0QmVoYXZpb3VycygpO1xuICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIGJlaGF2aW91cnMpIHtcbiAgICAgICAgICAgICAgICBpZiAoYmVoYXZpb3Vyc1trZXldW2FjdGlvbl0pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJldCA9IGJlaGF2aW91cnNba2V5XVthY3Rpb25dLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHRoaXMuZ2V0S2V5d29yZHMgPSBmdW5jdGlvbihhcHBlbmQpIHtcbiAgICAgICAgaWYgKCF0aGlzLmNvbXBsZXRpb25LZXl3b3Jkcykge1xuICAgICAgICAgICAgdmFyIHJ1bGVzID0gdGhpcy4kdG9rZW5pemVyLnJ1bGVzO1xuICAgICAgICAgICAgdmFyIGNvbXBsZXRpb25LZXl3b3JkcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgcnVsZSBpbiBydWxlcykge1xuICAgICAgICAgICAgICAgIHZhciBydWxlSXRyID0gcnVsZXNbcnVsZV07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgciA9IDAsIGwgPSBydWxlSXRyLmxlbmd0aDsgciA8IGw7IHIrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGVJdHJbcl0udG9rZW4gPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgva2V5d29yZHxzdXBwb3J0fHN0b3JhZ2UvLnRlc3QocnVsZUl0cltyXS50b2tlbikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGlvbktleXdvcmRzLnB1c2gocnVsZUl0cltyXS5yZWdleCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIHJ1bGVJdHJbcl0udG9rZW4gPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGEgPSAwLCBhTGVuZ3RoID0gcnVsZUl0cltyXS50b2tlbi5sZW5ndGg7IGEgPCBhTGVuZ3RoOyBhKyspIHsgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9rZXl3b3JkfHN1cHBvcnR8c3RvcmFnZS8udGVzdChydWxlSXRyW3JdLnRva2VuW2FdKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcnVsZSA9IHJ1bGVJdHJbcl0ucmVnZXgubWF0Y2goL1xcKC4rP1xcKS9nKVthXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGlvbktleXdvcmRzLnB1c2gocnVsZS5zdWJzdHIoMSwgcnVsZS5sZW5ndGggLSAyKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jb21wbGV0aW9uS2V5d29yZ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gICB9O1xuICAgICAgICB9XG4gICAgICAgIGlmICgkcG9pbnRzSW5PcmRlcihkZWx0YUVuZCwgcG9pbnQsICFtb3ZlSWZFcXVhbCkpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgcm93OiBwb2ludC5yb3cgKyBkZWx0YVJvd1NoaWZ0LFxuICAgICAgICAgICAgICAgIGNvbHVtbjogcG9pbnQuY29sdW1uICsgKHBvaW50LnJvdyA9PSBkZWx0YUVuZC5yb3cgPyBkZWx0YUNvbFNoaWZ0IDogMClcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByb3c6IGRlbHRhU3RhcnQucm93LFxuICAgICAgICAgICAgY29sdW1uOiBkZWx0YVN0YXJ0LmNvbHVtblxuICAgICAgICB9O1xuICAgIH1cbiAgICB0aGlzLnNldFBvc2l0aW9uID0gZnVuY3Rpb24ocm93LCBjb2x1bW4sIG5vQ2xpcCkge1xuICAgICAgICB2YXIgcG9zO1xuICAgICAgICBpZiAobm9DbGlwKSB7XG4gICAgICAgICAgICBwb3MgPSB7XG4gICAgICAgICAgICAgICAgcm93OiByb3csXG4gICAgICAgICAgICAgICAgY29sdW1uOiBjb2x1bW5cbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwb3MgPSB0aGlzLiRjbGlwUG9zaXRpb25Ub0RvY3VtZW50KHJvdywgY29sdW1uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLnJvdyA9PSBwb3Mucm93ICYmIHRoaXMuY29sdW1uID09IHBvcy5jb2x1bW4pXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIG9sZCA9IHtcbiAgICAgICAgICAgIHJvdzogdGhpcy5yb3csXG4gICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5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pY2UoZmlyc3RSb3csIGxhc3RSb3cgKyAxKTtcbiAgICAgICAgXG4gICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7XG4gICAgICAgICAgICBzdGFydDogcmFuZ2Uuc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IHJhbmdlLmVuZCxcbiAgICAgICAgICAgIGFjdGlvbjogXCJyZW1vdmVcIixcbiAgICAgICAgICAgIGxpbmVzOiB0aGlzLmdldExpbmVzRm9yUmFuZ2UocmFuZ2UpXG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gZGVsZXRlZExpbmVzO1xuICAgIH07XG4gICAgdGhpcy5yZW1vdmVOZXdMaW5lID0gZnVuY3Rpb24ocm93KSB7XG4gICAgICAgIGlmIChyb3cgPCB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiByb3cgPj0gMCkge1xuICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKHtcbiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93LCB0aGlzLmdldExpbmUocm93KS5sZW5ndGgpLFxuICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgMSwgMCksXG4gICAgICAgICAgICAgICAgYWN0aW9uOiBcInJlbW92ZVwiLFxuICAgICAgICAgICAgICAgIGxpbmVzOiBbXCJcIiwgXCJcIl1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLnJlcGxhY2UgPSBmdW5jdGlvbihyYW5nZSwgdGV4dCkge1xuICAgICAgICBpZiAoIShyYW5nZSBpbnN0YW5jZW9mIFJhbmdlKSlcbiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhyYW5nZS5zdGFydCwgcmFuZ2UuZW5kKTtcbiAgICAgICAgaWYgKHRleHQubGVuZ3RoID09PSAwICYmIHJhbmdlLmlzRW1wdHkoKSlcbiAgICAgICAgICAgIHJldHVybiByYW5nZS5zdGFydDtcbiAgICAgICAgaWYgK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KSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBpZiAoaXNJbnNlcnQgJiYgZGVsdGEubGluZXMubGVuZ3RoID4gMjAwMDApXG4gICAgICAgICAgICB0aGlzLiRzcGxpdEFuZGFwcGx5TGFyZ2VEZWx0YShkZWx0YSwgMjAwMDApO1xuICAgICAgICBhcHBseURlbHRhKHRoaXMuJGxpbmVzLCBkZWx0YSwgZG9Ob3RWYWxpZGF0ZSk7XG4gICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZVwiLCBkZWx0YSk7XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLiRzcGxpdEFuZGFwcGx5TGFyZ2VEZWx0YSA9IGZ1bmN0aW9uKGRlbHRhLCBNQVgpIHtcbiAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7XG4gICAgICAgIHZhciBsID0gbGluZXMubGVuZ3RoO1xuICAgICAgICB2YXIgcm93ID0gZGVsdGEuc3RhcnQucm93OyBcbiAgICAgICAgdmFyIGNvbHVtbiA9IGRlbHRhLnN0YXJ0LmNvbHVtbjtcbiAgICAgICAgdmFyIGZyb20gPSAwLCB0byA9IDA7XG4gICAgICAgIGRvIHtcbiAgICAgICAgICAgIGZyb20gPSB0bztcbiAgICAgICAgICAgIHRvICs9IE1BWCAtIDE7XG4gICAgICAgICAgICB2YXIgY2h1bmsgPSBsaW5lcy5zbGljZShmcm9tLCB0byk7XG4gICAgICAgICAgICBpZiAodG8gPiBsKSB7XG4gICAgICAgICAgICAgICAgZGVsdGEubGluZXMgPSBjaHVuaztcbiAgICAgICAgICAgICAgICBkZWx0YS5zdGFydC5yb3cgPSByb3cgKyBmcm9tO1xuICAgICAgICAgICAgICAgIGRlbHRhLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNodW5rLnB1c2goXCJcIik7XG4gIC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R0b2tlbml6ZVJvdyhjdXJyZW50TGluZSk7XG4gICAgICAgICAgICBlbmRMaW5lID0gY3VycmVudExpbmU7XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgY3VycmVudExpbmUrKztcbiAgICAgICAgICAgIH0gd2hpbGUgKHNlbGYubGluZXNbY3VycmVudExpbmVdKTtcbiAgICAgICAgICAgIHByb2Nlc3NlZExpbmVzICsrO1xuICAgICAgICAgICAgaWYgKChwcm9jZXNzZWRMaW5lcyAlIDUgPT09IDApICYmIChuZXcgRGF0ZSgpIC0gd29ya2VyU3RhcnQpID4gMjApIHsgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgc2VsZi5ydW5uaW5nID0gc2V0VGltZW91dChzZWxmLiR3b3JrZXIsIDIwKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzZWxmLmN1cnJlbnRMaW5lID0gY3VycmVudExpbmU7XG4gICAgICAgIFxuICAgICAgICBpZiAoZW5kTGluZSA9PSAtMSlcbiAgICAgICAgICAgIGVuZExpbmUgPSBjdXJyZW50TGluZTtcblxuICAgICAgICBpZiAoc3RhcnRMaW5lIDw9IGVuZExpbmUpXG4gICAgICAgICAgICBzZWxmLmZpcmVVcGRhdGVFdmVudChzdGFydExpbmUsIGVuZExpbmUpO1xuICAgIH07XG59O1xuXG4oZnVuY3Rpb24oKXtcblxuICAgIG9vcC5pbXBsZW1lbnQodGhpcywgRXZlbnRFbWl0dGVyKTtcbiAgICB0aGlzLnNldFRva2VuaXplciA9IGZ1bmN0aW9uKHRva2VuaXplcikge1xuICAgICAgICB0aGlzLnRva2VuaXplciA9IHRva2VuaXplcjtcbiAgICAgICAgdGhpcy5saW5lcyA9IFtdO1xuICAgICAgICB0aGlzLnN0YXRlcyA9IFtdO1xuXG4gICAgICAgIHRoaXMuc3RhcnQoMCk7XG4gICAgfTtcbiAgICB0aGlzLnNldERvY3VtZW50ID0g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4gICAgfTtcbiAgICB0aGlzLmdldFRva2VucyA9IGZ1bmN0aW9uKHJvdykge1xuICAgICAgICByZXR1cm4gdGhpcy5saW5lc1tyb3ddIHx8IHRoaXMuJHRva2VuaXplUm93KHJvdyk7XG4gICAgfTtcbiAgICB0aGlzLmdldFN0YXRlID0gZnVuY3Rpb24ocm93KSB7XG4gICAgICAgIGlmICh0aGlzLmN1cnJlbnRMaW5lID09IHJvdylcbiAgICAgICAgICAgIHRoaXMuJHRva2VuaXplUm93KHJvdyk7XG4gICAgICAgIHJldHVybiB0aGlzLnN0YXRlc1tyb3ddIHx8IFwic3RhcnRcIjtcbiAgICB9O1xuXG4gICAgdGhpcy4kdG9rZW5pemVSb3cgPSBmdW5jdGlvbihyb3cpIHtcbiAgICAgICAgdmFyIGxpbmUgPSB0aGlzLmRvYy5nZXRMaW5lKHJvdyk7XG4gICAgICAgIHZhciBzdGF0ZSA9IHRoaXMuc3RhdGVzW3JvdyAtIDFdO1xuXG4gICAgICAgIHZhciBkYXRhID0gdGhpcy50b2tlbml6ZXIuZ2V0TGluZVRva2VucyhsaW5lLCBzdGF0ZSwgcm93KTtcblxuICAgICAgICBpZiAodGhpcy5zdGF0ZXNbcm93XSArIFwiXCIgIT09IGRhdGEuc3RhdGUgKyBcIlwiKSB7XG4gICAgICAgICAgICB0aGlzLnN0YXRlc1tyb3ddID0gZGF0YS5zdGF0ZTtcbiAgICAgICAgICAgIHRoaXMubGluZXNbcm93ICsgMV0gPSBudWxsO1xuICAgICAgICAgICAgaWYgKHRoaXMuY3VycmVudExpbmUgPiByb3cgKyAxKVxuICAgICAgICAgICAgICAgIHRoaXMuY3VycmVudExpbmUgPSByb3cgKyAxO1xuICAgICAgICB9IGVsc2UgaWYgKHRoaXMuY3VycmVudExpbmUgPT0gcm93KSB7XG4gICAgICAgICAgICB0aGlzLmN1cnJlbnRMaW5lID0gcm93ICsgMTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aGlzLmxpbmVzW3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5kLCBpc05ld1Jvdyk7XG4gICAgICAgICAgICBzdG9wID0gIXN0b3AgJiYgY2FsbGJhY2soZm9sZC5wbGFjZWhvbGRlciwgZm9sZC5zdGFydC5yb3csIGZvbGQuc3RhcnQuY29sdW1uLCBsYXN0RW5kKTtcbiAgICAgICAgICAgIGlmIChzdG9wIHx8IGNtcCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlzTmV3Um93ID0gIWZvbGQuc2FtZVJvdztcbiAgICAgICAgICAgIGxhc3RFbmQgPSBmb2xkLmVuZC5jb2x1bW47XG4gICAgICAgIH1cbiAgICAgICAgY2FsbGJhY2sobnVsbCwgZW5kUm93LCBlbmRDb2x1bW4sIGxhc3RFbmQsIGlzTmV3Um93KTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXROZXh0Rm9sZFRvID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgdmFyIGZvbGQsIGNtcDtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmZvbGRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBmb2xkID0gdGhpcy5mb2xkc1tpXTtcbiAgICAgICAgICAgIGNtcCA9IGZvbGQucmFuZ2UuY29tcGFyZUVuZChyb3csIGNvbHVtbik7XG4gICAgICAgICAgICBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZm9sZDogZm9sZCxcbiAgICAgICAgICAgICAgICAgICAga2luZDogXCJhZnRlclwiXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY21wID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZm9sZDogZm9sZCxcbiAgICAgICAgICAgICAgICAgICAga2luZDogXCJpbnNpZGVcIlxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcblxuICAgIHRoaXMuYWRkUmVtb3ZlQ2hhcnMgPSBmdW5jdGlvbihyb3csIGNvbHVtbiwgbGVuKSB7XG4gICAgICAgIHZhciByZXQgPSB0aGlzLmdldE5leHRGb2xkVG8ocm93LCBjb2x1bW4pLFxuICAgICAgICAgICAgZm9sZCwgZm9sZHM7XG4gICAgICAgIGlmIChyZXQpIHtcbiAgICAgICAgICAgIGZvbGQgPSByZXQuZm9sZDtcbiAgICAgICAgICAgIGlmIChyZXQua2luZCA9PSBcImluc2lkZVwiXG4gICAgICAgICAgICAgICAgJiYgZm9sZC5zdGFydC5jb2x1bW4gIT0gY29sdW1uXG4gICAgICAgICAgICAgICAgJiYgZm9sZC5zdGFydC5yb3cgIT0gcm93KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHdpbmRvdy5jb25zb2xlICYmIHdpbmRvdy5jb25zb2xlLmxvZyhyb3csIGNvbHVtbiwgZm9sZCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGZvbGQuc3RhcnQucm93ID09IHJvdykge1xuICAgICAgICAgICAgICAgIGZvbGRzID0gdGhpcy5mb2xkcztcbiAgICAgICAgICAgICAgICB2YXIgaSA9IGZvbGRzLmluZGV4T2YoZm9sZCk7XG4gICAgICAgICAgICAgICAgaWYgKGkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gKz0gbGVuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKGk7IGkgPCBmb2xkcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBmb2xkID0gZm9sZHNbaV07XG4gICAgICAgICAgICAgICAgICAgIGZvbGQuc3RhcnQuY29sdW1uICs9IGxlbjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFmb2xkLnNhbWVSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmb2xkLmVuZC5jb2x1bW4gKz0gbGVuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gKz0gbGVuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuc3BsaXQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICB2YXIgcG9zID0gdGhpcy5nZXROZXh0Rm9sZFRvKHJvdywgY29sdW1uKTtcbiAgICAgICAgXG4gICAgICAgIGlmICghcG9zIHx8IHBvcy5raW5kID09IFwiaW5zaWRlXCIpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIFxuICAgICAgICB2YXIgZm9sZCA9IHBvcy5mb2xkO1xuICAgICAgICB2YXIgZm9sZHMgPSB0aGlzLmZvbGRzO1xuICAgICAgICB2YXIgZm9sZERhdGEgPSB0aGlzLmZvbGREYXRhO1xuICAgICAgICBcbiAgICAgICAgdmFyIGkgPSBmb2xkcy5pbmRleE9mKGZvbGQpO1xuICAgICAgICB2YXIgZm9sZEJlZm9yZSA9IGZvbGRzW2kgLSAxXTtcbiAgICAgICAgdGhpcy5lbmQucm93ID0gZm9sZEJlZm9yZS5lbmQucm93O1xuICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSBmb2xkQmVmb3JlLmVuZC5jb2x1bW47XG4gICAgICAgIGZvbGRzID0gZm9sZHMuc3BsaWNlKGksIGZvbGRzLmxlbmd0aCAtIGkpO1xuXG4gICAgICAgIHZhciBuZXdGb2xkTGluZSA9IG5ldyBGb2xkTGluZShmb2xkRGF0YSwgZm9sZHMpO1xuICAgICAgICBmb2xkRGF0YS5zcGxpY2UoZm9sZERhdGEuaW5kZXhPZih0aGlzKSArIDEsIDAsIG5ld0ZvbG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bW47XG4gICAgICAgICAgICBpZiAoaWR4IDwgMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJvdzogZm9sZC5zdGFydC5yb3csXG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbjogZm9sZC5zdGFydC5jb2x1bW4gKyBpZHhcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZHggLT0gZm9sZC5wbGFjZWhvbGRlci5sZW5ndGg7XG4gICAgICAgICAgICBpZiAoaWR4IDwgMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmb2xkLnN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsYXN0Rm9sZEVuZENvbHVtbiA9IGZvbGQuZW5kLmNvbHVtbjtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByb3c6IHRoaXMuZW5kLnJvdyxcbiAgICAgICAgICAgIGNvbHVtbjogdGhpcy5lbmQuY29sdW1uICsgaWR4XG4gICAgICAgIH07XG4gICAgfTtcbn0pLmNhbGwoRm9sZExpbmUucHJvdG90eXBlKTtcblxuZXhwb3J0cy5Gb2xkTGluZSA9IEZvbGRMaW5lO1xufSk7XG5cbmFjZS5kZWZpbmUoXCJhY2UvcmFuZ2VfbGlzdFwiLFtcInJlcXVpcmVcIixcImV4cG9ydHNcIixcIm1vZHVsZVwiLFwiYWNlL3JhbmdlXCJdLCBmdW5jdGlvbihhY2VxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7XG5cInVzZSBzdHJpY3RcIjtcbnZhciBSYW5nZSA9IGFjZXF1aXJlKFwiLi9yYW5nZVwiKS5SYW5nZTtcbnZhciBjb21wYXJlUG9pbnRzID0gUmFuZ2UuY29tcGFyZVBvaW50cztcblxudmFyIFJhbmdlTGlzdCA9IGZ1bmN0aW9uKCkge1xuICAgIHRoaXMucmFuZ2VzID0gW107XG59O1xuXG4oZnVuY3Rpb24oKSB7XG4gICAgdGhpcy5jb21wYXJlUG9pbnRzID0gY29tcGFyZVBvaW50cztcblxuICAgIHRoaXMucG9pbnRJbmRleCA9IGZ1bmN0aW9uKHBvcywgZXhjbHVkZUVkZ2VzLCBzdGFydEluZGV4KSB7XG4gICAgICAgIHZhciBsaXN0ID0gdGhpcy5yYW5nZXM7XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IHN0YXJ0SW5kZXggfHwgMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciByYW5nZSA9IGxpc3RbaV07XG4gICAgICAgICAgICB2YXIgY21wRW5kID0gY29tcGFyZVBvaW50cyhwb3MsIHJhbmdlLmVuZCk7XG4gICAgICAgICAgICBpZiAoY21wRW5kID4gMClcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIHZhciBjbXBTdGFydCA9IGNvbXBhcmVQb2ludHMocG9zLCByYW5nZS5zdGFydCk7XG4gICAgICAgICAgICBpZiAoY21wRW5kID09PSAwKVxuICAgICAgICAgICAgICAgIHJldHVybiBleGNsdWRlRWRnZXMgJiYgY21wU3RhcnQgIT09IDAgPyAtaS0yIDogaTtcbiAgICAgICAgICAgIGlmIChjbXBTdGFydCA+IDAgfHwgKGNtcFN0YXJ0ID09PSAwICYmICFleGNsdWRlRWRnZXMpKVxuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuXG4gICAgICAgICAgICByZXR1cm4gLWktMTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gLWkgLSAxO1xuICAgIH07XG5cbiAgICB0aGlzLmFkZCA9IGZ1bmN0aW9uKHJhbmdlKSB7XG4gICAgICAgIHZhciBleGNsdWRlRWRnZXMgPSAhcmFuZ2UuaXNFbXB0eSgpO1xuICAgICAgICB2YXIgc3RhcnRJbmRleCA9IHRoaXMucG9pbnRJbmRleChyYW5nZS5zdGFydCwgZXhjbHVkZUVkZ2VzKTtcbiAgICAgICAgaWYgKHN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jdGlvbihhLCBiKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcGFyZVBvaW50cyhhLnN0YXJ0LCBiLnN0YXJ0KTtcbiAgICAgICAgfSk7XG4gICAgICAgIFxuICAgICAgICB2YXIgbmV4dCA9IGxpc3RbMF0sIHJhbmdlO1xuICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHJhbmdlID0gbmV4dDtcbiAgICAgICAgICAgIG5leHQgPSBsaXN0W2ldO1xuICAgICAgICAgICAgdmFyIGNtcCA9IGNvbXBhcmVQb2ludHMocmFuZ2UuZW5kLCBuZXh0LnN0YXJ0KTtcbiAgICAgICAgICAgIGlmIChjbXAgPCAwKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICBpZiAoY21wID09IDAgJiYgIXJhbmdlLmlzRW1wdHkoKSAmJiAhbmV4dC5pc0VtcHR5KCkpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG5cbiAgICAgICAgICAgIGlmIChjb21wYXJlUG9pbnRzKHJhbmdlLmVuZCwgbmV4dC5lbmQpIDwgMCkge1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5yb3cgPSBuZXh0LmVuZC5yb3c7XG4gICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbiA9IG5leHQuZW5kLmNvbHVtbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGlzdC5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICByZW1vdmVkLnB1c2gobmV4dCk7XG4gICAgICAgICAgICBuZXh0ID0gcmFuZ2U7XG4gICAgICAgICAgICBpLS07XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHRoaXMucmFuZ2VzID0gbGlzdDtcblxuICAgICAgICByZXR1cm4gcmVtb3ZlZDtcbiAgICB9O1xuXG4gICAgdGhpcy5jb250YWlucyA9IGZ1bmN0aW9uKHJvdywgY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7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZW5kID0gZGVsdGEuc3RhcnQ7XG4gICAgICAgICAgICB2YXIgc3RhcnQgPSBkZWx0YS5lbmQ7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gc3RhcnQucm93O1xuICAgICAgICB2YXIgZW5kUm93ID0gZW5kLnJvdztcbiAgICAgICAgdmFyIGxpbmVEaWYgPSBlbmRSb3cgLSBzdGFydFJvdztcblxuICAgICAgICB2YXIgY29sRGlmZiA9IC1zdGFydC5jb2x1bW4gKyBlbmQuY29sdW1uO1xuICAgICAgICB2YXIgcmFuZ2VzID0gdGhpcy5yYW5nZXM7XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDAsIG4gPSByYW5nZXMubGVuZ3RoOyBpIDwgbjsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgciA9IHJhbmdlc1tpXTtcbiAgICAgICAgICAgIGlmIChyLmVuZC5yb3cgPCBzdGFydFJvdylcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChyLnN0YXJ0LnJvdyA+IHN0YXJ0Um93KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBpZiAoci5zdGFydC5yb3cgPT0gc3RhcnRSb3cgJiYgci5zdGFydC5jb2x1bW4gPj0gc3RhcnQuY29sdW1uICkge1xuICAgICAgICAgICAgICAgIGlmIChyLnN0YXJ0LmNvbHVtbiA9PSBzdGFydC5jb2x1bW4gJiYgdGhpcy4kaW5zZXJ0UmlnaHQpIHtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByLnN0YXJ0LmNvbHVtbiArPSBjb2xEaWZmO1xuICAgICAgICAgICAgICAgICAgICByLnN0YXJ0LnJvdyArPSBsaW5lRGlmO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyLmVuZC5yb3cgPT0gc3RhcnRSb3cgJiYgci5lbmQuY29sdW1uID49IHN0YXJ0LmNvbHVtbikge1xuICAgICAgICAgICAgICAgIGlmIChyLmVuZC5jb2x1bW4gPT0gc3RhcnQuY29sdW1uICYmIHRoaXMuJGluc2VydFJpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoci5lbmQuY29sdW1uID09IHN0YXJ0LmNvbHVtbiAmJiBjb2xEaWZmID4gMCAmJiBpIDwgbiAtIDEpIHsgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGlmIChyLmVuZC5jb2x1bW4gPiByLnN0YXJ0LmNvbHVtbiAmJiByLmVuZC5jb2x1bW4gPT0gcmFuZ2VzW2krMV0uc3RhcnQuY29sdW1uKVxuICAgICAgICAgICAgICAgICAgICAgICAgci5lbmQuY29sdW1uIC09IGNvbERpZmY7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHIuZW5kLmNvbHVtbiArPSBjb2xEaWZmO1xuICAgICAgICAgICAgICAgIHIuZW5kLnJvdyArPSBsaW5lRGlmO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGxpbmVEaWYgIT0gMCAmJiBpIDwgbikge1xuICAgICAgICAgICAgZm9yICg7IGkgPCBuOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgciA9IHJhbmdlc1tpXTtcbiAgICAgICAgICAgICAgICByLnN0YXJ0LnJvdyArPSBsaW5lRGlmO1xuICAgICAgICAgICAgICAgIHIuZW5kLnJvdyArPSBsaW5lRGlmO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxufSkuY2FsbChSYW5nZUxpc3QucHJvdG90eXBlKTtcblxuZXhwb3J0cy5SYW5nZUxpc3QgPSBSYW5nZUxpc3Q7XG59KTtcblxuYWNlLmRlZmluZShcImFjZS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gKHNpZGUgPT0gLTEgJiYgZm9sZC5yYW5nZS5pc1N0YXJ0KHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZvbGQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuZ2V0Rm9sZHNJblJhbmdlID0gZnVuY3Rpb24ocmFuZ2UpIHtcbiAgICAgICAgdmFyIHN0YXJ0ID0gcmFuZ2Uuc3RhcnQ7XG4gICAgICAgIHZhciBlbmQgPSByYW5nZS5lbmQ7XG4gICAgICAgIHZhciBmb2xkTGluZXMgPSB0aGlzLiRmb2xkRGF0YTtcbiAgICAgICAgdmFyIGZvdW5kRm9sZHMgPSBbXTtcblxuICAgICAgICBzdGFydC5jb2x1bW4gKz0gMTtcbiAgICAgICAgZW5kLmNvbHVtbiAtPSAxO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm9sZExpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgY21wID0gZm9sZExpbmVzW2ldLnJhbmdlLmNvbXBhcmVSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICBpZiAoY21wID09IDIpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNtcCA9PSAtMikge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgZm9sZHMgPSBmb2xkTGluZXNbaV0uZm9sZHM7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGZvbGRzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvbGQgPSBmb2xkc1tqXTtcbiAgICAgICAgICAgICAgICBjbXAgPSBmb2xkLnJhbmdlLmNvbXBhcmVSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICAgICAgaWYgKGNtcCA9PSAtMikge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNtcCA9PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgIGlmIChjbXAgPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZvdW5kRm9sZHMucHVzaChmb2xkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdGFydC5jb2x1bW4gLT0gMTtcbiAgICAgICAgZW5kLmNvbHVtbiArPSAxO1xuXG4gICAgICAgIHJldHVybiBmb3VuZEZvbGRzO1xuICAgIH07XG5cbiAgICB0aGlzLmdldEZvbGRzSW5SYW5nZUxpc3QgPSBmdW5jdGlvbihyYW5nZXMpIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocmFuZ2VzKSkge1xuICAgICAgICAgICAgdmFyIGZvbGRzID0gW107XG4gICAgICAgICAgICByYW5nZXMuZm9yRWFjaChmdW5jdGlvbihyYW5nZSkge1xuICAgICAgICAgICAgICAgIGZvbGRzID0gZm9sZHMuY29uY2F0KHRoaXMuZ2V0Rm9sZHNJblJhbmdlKHJhbmdlKSk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBmb2xkcyA9IHRoaXMuZ2V0Rm9sZHNJblJhbmdlKHJhbmdlcyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZvbGRzO1xuICAgIH07XG4gICAgdGhpcy5nZXRBbGxGb2xkcyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgZm9sZHMgPSBbXTtcbiAgICAgICAgdmFyIGZvbGRMaW5lcyA9IHRoaXMuJGZvbGREYXRhO1xuICAgICAgICBcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBmb2xkTGluZXMubGVuZ3RoOyBpKyspXG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGZvbGRMaW5lc1tpXS5mb2xkcy5sZW5ndGg7IGorKylcbiAgICAgICAgICAgICAgICBmb2xkcy5wdXNoKGZvbGRMaW5lc1tpXS5mb2xkc1tqXSk7XG5cbiAgICAgICAgcmV0dXJuIGZvbGRzO1xuICAgIH07XG4gICAgdGhpcy5nZXRGb2xkU3RyaW5nQXQgPSBmdW5jdGlvbihyb3csIGNvbHVtbiwgdHJpbSwgZm9sZExpbmUpIHtcbiAgICAgICAgZm9sZExpbmUgPSBmb2xkTGluZSB8fCB0aGlzLmdldEZvbGRMaW5lKHJvdyk7XG4gICAgICAgIGlmICghZm9sZExpbmUpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICB2YXIgbGFzdEZvbGQgPSB7XG4gICAgICAgICAgICBlbmQ6IHsgY29sdW1uOiAwIH1cbiAgICAgICAgfTtcbiAgICAgICAgdmFyIHN0ciwgZm9sZDtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBmb2xkTGluZS5mb2xkcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgZm9sZCA9IGZvbGRMaW5lLmZvbGRzW2ldO1xuICAgICAgICAgICAgdmFyIGNtcCA9IGZvbGQucmFuZ2UuY29tcGFyZUVuZChyb3csIGNvbHVtbik7XG4gICAgICAgICAgICBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICAgICAgc3RyID0gdGhpc1xuICAgICAgICAgICAgICAgICAgICAuZ2V0TGluZShmb2xkLnN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICAgICAgLnN1YnN0cmluZyhsYXN0Rm9sZC5lbmQuY29sdW1uLCBmb2xkLnN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjbXAgPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RGb2xkID0gZm9sZDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIXN0cilcbiAgICAgICAgICAgIHN0ciA9IHRoaXMuZ2V0TGluZShmb2xkLnN0YXJ0LnJvdykuc3Vic3RyaW5nKGxhc3RGb2xkLmVuZC5jb2x1bW4pO1xuXG4gICAgICAgIGlmICh0cmltID09IC0xKVxuICAgICAgICAgICAgcmV0dXJuIHN0ci5zdWJzdHJpbmcoMCwgY29sdW1uIC0gbGFzdEZvbGQuZW5kLmNvbHVtbik7XG4gICAgICAgIGVsc2UgaWYgKHRyaW0gPT0gMSlcbiAgICAgICAgICAgIHJldHVybiBzdHIuc3Vic3RyaW5nKGNvbHVtbiAtIGxhc3RGb2xkLmVuZC5jb2x1bW4pO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICByZXR1cm4gc3RyO1xuICAgIH07XG5cbiAgICB0aGlzLmdldEZvbGRMaW5lID0gZnVuY3Rpb24oZG9jUm93LCBzdGFydEZvbGRMaW5lKSB7XG4gICAgICAgIHZhciBmb2xkRGF0YSA9IHRoaXMuJGZvbGREYXRhO1xuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIGlmIChzdGFydEZvbGRMaW5lKVxuICAgICAgICAgICAgaSA9IGZvbGREYXRhLmluZGV4T2Yoc3RhcnRGb2xkTGluZSk7XG4gICAgICAgIGlmIChpID09IC0xKVxuICAgICAgICAgICAgaSA9IDA7XG4gICAgICAgIGZvciAoaTsgaSA8IGZvbGREYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSBmb2xkRGF0YVtpXTtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZS5zdGFydC5yb3cgPD0gZG9jUm93ICYmIGZvbGRMaW5lLmVuZC5yb3cgPj0gZG9jUm93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZvbGRMaW5lO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChmb2xkTGluZS5lbmQucm93ID4gZG9jUm93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcbiAgICB0aGlzLmdldE5leHRGb2xkTGluZSA9IGZ1bmN0aW9uKGRvY1Jvdywgc3RhcnRGb2xkTGluZSkge1xuICAgICAgICB2YXIgZm9sZERhdGEgPSB0aGlzLiRmb2xkRGF0YTtcbiAgICAgICAgdmFyIGkgPSAwO1xuICAgICAgICBpZiAoc3RhcnRGb2xkTGluZSlcbiAgICAgICAgICAgIGkgPSBmb2xkRGF0YS5pbmRleE9mKHN0YXJ0Rm9sZExpbmUpO1xuICAgICAgICBpZiAoaSA9PSAtMSlcbiAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICBmb3IgKGk7IGkgPCBmb2xkRGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gZm9sZERhdGFbaV07XG4gICAgICAgICAgICBpZiAoZm9sZExpbmUuZW5kLnJvdyA+PSBkb2NSb3cpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm9sZExpbmU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Rm9sZGVkUm93Q291bnQgPSBmdW5jdGlvbihmaXJzdCwgbGFzdCkge1xuICAgICAgICB2YXIgZm9sZERhdGEgPSB0aGlzLiRmb2xkRGF0YSwgcm93Q291bnQgPSBsYXN0LWZpcnN0KzE7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm9sZERhdGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGREYXRhW2ldLFxuICAgICAgICAgICAgICAgIGVuZCA9IGZvbGRMaW5lLmVuZC5yb3csXG4gICAgICAgICAgICAgICAgc3RhcnQgPSBmb2xkTGluZS5zdGFydC5yb3c7XG4gICAgICAgICAgICBpZiAoZW5kID49IGxhc3QpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhcnQgPCBsYXN0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGFydCA+PSBmaXJzdClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvd0NvdW50IC09IGxhc3Qtc3RhcnQ7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvd0NvdW50ID0gMDsgLy8gaW4gb25lIGZvbGRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGVuZCA+PSBmaXJzdCl7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXJ0ID49IGZpcnN0KSAvLyBmb2xkIGluc2lkZSByYW5nZVxuICAgICAgICAgICAgICAgICAgICByb3dDb3VudCAtPSAgZW5kLXN0YXJ0O1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcm93Q291bnQgLT0gIGVuZC1maXJzdCsxO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByb3dDb3VudDtcbiAgICB9O1xuXG4gICAgdGhpcy4kYWRkRm9sZExpbmUgPSBmdW5jdGlvbihmb2xkTGluZSkge1xuICAgICAgICB0aGlzLiRmb2xkRGF0YS5wdXNoKGZvbGRMaW5lKTtcbiAgICAgICAgdGhpcy4kZm9sZERhdGEuc29ydChmdW5jdGlvbihhLCBiKSB7XG4gICAgICAgICAgICByZXR1cm4gYS5zdGFydC5yb3cgLSBiLnN0YXJ0LnJvdztcbiAgICAgICAgf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AgICAgICBmb2xkTGluZS5hZGRGb2xkKGZvbGQpO1xuICAgICAgICAgICAgICAgIGFkZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRSb3cgPT0gZm9sZExpbmUuZW5kLnJvdykge1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lLmFkZEZvbGQoZm9sZCk7XG4gICAgICAgICAgICAgICAgYWRkZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGlmICghZm9sZC5zYW1lUm93KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZU5leHQgPSBmb2xkRGF0YVtpICsgMV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChmb2xkTGluZU5leHQgJiYgZm9sZExpbmVOZXh0LnN0YXJ0LnJvdyA9PSBlbmRSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLm1lcmdlKGZvbGRMaW5lTmV4dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZW5kUm93IDw9IGZvbGRMaW5lLnN0YXJ0LnJvdykge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFhZGRlZClcbiAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy4kYWRkRm9sZExpbmUobmV3IEZvbGRMaW5lKHRoaXMuJGZvbGREYXRhLCBmb2xkKSk7XG5cbiAgICAgICAgaWYgKHRoaXMuJHVzZVdyYXBNb2RlKVxuICAgICAgICAgICAgdGhpcy4kdXBkYXRlV3JhcERhdGEoZm9sZExpbmUuc3RhcnQucm93LCBmb2xkTGluZS5zdGFydC5yb3cpO1xuICAgICAgICBlbHNlX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GFydC5yb3cgOiBkb2NSb3c7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Rm9sZERpc3BsYXlMaW5lID0gZnVuY3Rpb24oZm9sZExpbmUsIGVuZFJvdywgZW5kQ29sdW1uLCBzdGFydFJvdywgc3RhcnRDb2x1bW4pIHtcbiAgICAgICAgaWYgKHN0YXJ0Um93ID09IG51bGwpXG4gICAgICAgICAgICBzdGFydFJvdyA9IGZvbGRMaW5lLnN0YXJ0LnJvdztcbiAgICAgICAgaWYgKHN0YXJ0Q29sdW1uID09IG51bGwpXG4gICAgICAgICAgICBzdGFydENvbHVtbiA9IDA7XG4gICAgICAgIGlmIChlbmRSb3cgPT0gbnVsbClcbiAgICAgICAgICAgIGVuZFJvdyA9IGZvbGRMaW5lLmVuZC5yb3c7XG4gICAgICAgIGlmIChlbmRDb2x1bW4gPT0gbnVsbClcbiAgICAgICAgICAgIGVuZENvbHVtbiA9IHRoaXMuZ2V0TGluZShlbmRSb3cpLmxlbmd0aDtcbiAgICAgICAgdmFyIGRvYyA9IHRoaXMuZG9jO1xuICAgICAgICB2YXIgdGV4dExpbmUgPSBcIlwiO1xuXG4gICAgICAgIGZvbGRMaW5lLndhbGsoZnVuY3Rpb24ocGxhY2Vob2xkZXIsIHJvdywgY29sdW1uLCBsYXN0Q29sdW1uKSB7XG4gICAgICAgICAgICBpZiAocm93IDwgc3RhcnRSb3cpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgaWYgKHJvdyA9PSBzdGFydFJvdykge1xuICAgICAgICAgICAgICAgIGlmIChjb2x1bW4gPCBzdGFydENvbHVtbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGxhc3RDb2x1bW4gPSBNYXRoLm1heChzdGFydENvbHVtbiwgbGFzdENvbHVtbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwbGFjZWhvbGRlciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgIC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ICAgICAgIHJldHVybiBmb2xkLmNsb25lKCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBuZXcgRm9sZExpbmUoZmQsIGZvbGRzKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIGZkO1xuICAgIH07XG5cbiAgICB0aGlzLnRvZ2dsZUZvbGQgPSBmdW5jdGlvbih0cnlUb1VuZm9sZCkge1xuICAgICAgICB2YXIgc2VsZWN0aW9uID0gdGhpcy5zZWxlY3Rpb247XG4gICAgICAgIHZhciByYW5nZSA9IHNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICB2YXIgZm9sZDtcbiAgICAgICAgdmFyIGJyYWNrZXRQb3M7XG5cbiAgICAgICAgaWYgKHJhbmdlLmlzRW1wdHkoKSkge1xuICAgICAgICAgICAgdmFyIGN1cnNvciA9IHJhbmdlLnN0YXJ0O1xuICAgICAgICAgICAgZm9sZCA9IHRoaXMuZ2V0Rm9sZEF0KGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuXG4gICAgICAgICAgICBpZiAoZm9sZCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwYW5kRm9sZChmb2xkKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGJyYWNrZXRQb3MgPSB0aGlzLmZpbmRNYXRjaGluZ0JyYWNrZXQoY3Vyc29yKSkge1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZS5jb21wYXJlUG9pbnQoYnJhY2tldFBvcykgPT0gMSkge1xuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQgPSBicmFja2V0UG9zO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0ID0gYnJhY2tldFBvcztcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQuY29sdW1uKys7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4tLTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGJyYWNrZXRQb3MgPSB0aGlzLmZpbmRNYXRjaGluZ0JyYWNrZXQoe3JvdzogY3Vyc29yLnJvdywgY29sdW1uOiBjdXJzb3IuY29sdW1uICsgMX0pKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbXBhcmVQb2ludChicmFja2V0UG9zKSA9PSAxKVxuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQgPSBicmFja2V0UG9zO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQgPSBicmFja2V0UG9zO1xuXG4gICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQuY29sdW1uKys7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJhbmdlID0gdGhpcy5nZXRDb21tZW50Rm9sZFJhbmdlKGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pIHx8IHJhbmdlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGZvbGRzID0gdGhpcy5nZXRGb2xkc0luUmFuZ2UocmFuZ2UpO1xuICAgICAgICAgICAgaWYgKHRyeVRvVW5mb2xkICYmIGZvbGRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwYW5kRm9sZHMoZm9sZHMpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZHMubGVuZ3RoID09IDEgKSB7XG4gICAgICAgICAgICAgICAgZm9sZCA9IGZvbGRzWzBdO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFmb2xkKVxuICAgICAgICAgICAgZm9sZCA9IHRoaXMuZ2V0Rm9sZEF0KHJhbmdlLnN0YXJ0LnJvdywgcm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ICAgICAgICAgICAgICAgdHlwZSArPSBcInxkb2Mtc3RhcnRcIjtcbiAgICAgICAgICAgIHZhciByZSA9IG5ldyBSZWdFeHAodHlwZSk7XG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBuZXcgUmFuZ2UoKTtcbiAgICAgICAgICAgIGlmIChkaXIgIT0gMSkge1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICB9IHdoaWxlICh0b2tlbiAmJiByZS50ZXN0KHRva2VuLnR5cGUpKTtcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICByYW5nZS5zdGFydC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgIHJhbmdlLnN0YXJ0LmNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgMjtcblxuICAgICAgICAgICAgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcih0aGlzLCByb3csIGNvbHVtbik7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChkaXIgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGFzdFJvdyA9IC0xO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFJvdyA9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlID0gdGhpcy5nZXRTdGF0ZShpdGVyYXRvci4kcm93KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcmUudGVzdChzdGF0ZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdFJvdyA9IGl0ZXJhdG9yLiRyb3c7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlcmF0b3IuJHJvdyA+IGxhc3RSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgcmUudGVzdCh0b2tlbi50eXBlKSk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG5cbiAgICAgICAgICAgIHJhbmdlLmVuZC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIHRva2VuLnZhbHVlLmxlbmd0aCAtIDI7XG4gICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy5mb2xkQWxsID0gZnVuY3Rpb24oc3RhcnRSb3csIGVuZFJvdywgZGVwdGgpIHtcbiAgICAgICAgaWYgKGRlcHRoID09IHVuZGVmaW5lZClcbiAgICAgICAgICAgIGRlcHRoID0gMTAwMDAwOyAvLyBKU09OLnN0cmluZ2lmeSBkb2Vzbid0IGhhbmxlIEluZmluaXR5XG4gICAgICAgIHZhciBmb2xkV2lkZ2V0cyA9IHRoaXMuZm9sZFdpZGdldHM7XG4gICAgICAgIGlmICghZm9sZFdpZGdldHMpXG4gICAgICAgICAgICByZXR1cm47IC8vIG1vZGUgZG9lc24ndCBzdXBwb3J0IGZvbGRpbmdcbiAgICAgICAgZW5kUm93ID0gZW5kUm93IHx8IHRoaXMuZ2V0TGVuZ3RoKCk7XG4gICAgICAgIHN0YXJ0Um93ID0gc3RhcnRSb3cgfHwgMDtcbiAgICAgICAgZm9yICh2YXIgcm93ID0gc3RhcnRSb3c7IHJvdyA8IGVuZFJvdzsgcm93KyspIHtcbiAgICAgICAgICAgIGlmIChmb2xkV2lkZ2V0c1tyb3ddID09IG51bGwpXG4gICAgICAgICAgICAgICAgZm9sZFdpZGdldHNbcm93XSA9IHRoaXMuZ2V0Rm9sZFdpZGdldChyb3cpO1xuICAgICAgICAgICAgaWYgKGZvbGRXaWRnZXRzW3Jvd10gIT0gXCJzdGFydFwiKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShyb3cpO1xuICAgICAgICAgICAgaWYgKHJhbmdlICYmIHJhbmdlLmlzTXVsdGlMaW5lKClcbiAgICAgICAgICAgICAgICAmJiByYW5nZS5lbmQucm93IDw9IGVuZFJvd1xuICAgICAgICAgICAgICAgICYmIHJhbmdlLnN0YXJ0LnJvdyA+PSBzdGFydFJvd1xuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgcm93ID0gcmFuZ2UuZW5kLnJvdztcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZCA9IHRoaXMuYWRkRm9sZChcIi4uLlwiLCByYW5nZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChmb2xkKVxuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZC5jb2xsYXBzZUNoaWxkcmVuID0gZGVwdGg7XG4gICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7fVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLiRmb2xkU3R5bGVzID0ge1xuICAgICAgICBcIm1hbnVhbFwiOiAxLFxuICAgICAgICBcIm1hcmtiZWdpblwiOiAxLFxu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1cnJlbnQpIHtcbiAgICAgICAgdmFyIGZ3ID0gdGhpcy5mb2xkV2lkZ2V0cztcbiAgICAgICAgaWYgKCFmdyB8fCAoaWdub3JlQ3VycmVudCAmJiBmd1tyb3ddKSlcbiAgICAgICAgICAgIHJldHVybiB7fTtcblxuICAgICAgICB2YXIgaSA9IHJvdyAtIDEsIGZpcnN0UmFuZ2U7XG4gICAgICAgIHdoaWxlIChpID49IDApIHtcbiAgICAgICAgICAgIHZhciBjID0gZndbaV07XG4gICAgICAgICAgICBpZiAoYyA9PSBudWxsKVxuICAgICAgICAgICAgICAgIGMgPSBmd1tpXSA9IHRoaXMuZ2V0Rm9sZFdpZGdldChpKTtcblxuICAgICAgICAgICAgaWYgKGMgPT0gXCJzdGFydFwiKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2UoaSk7XG4gICAgICAgICAgICAgICAgaWYgKCFmaXJzdFJhbmdlKVxuICAgICAgICAgICAgICAgICAgICBmaXJzdFJhbmdlID0gcmFuZ2U7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlICYmIHJhbmdlLmVuZC5yb3cgPj0gcm93KVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGktLTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByYW5nZTogaSAhPT0gLTEgJiYgcmFuZ2UsXG4gICAgICAgICAgICBmaXJzdFJhbmdlOiBmaXJzdFJhbmdlXG4gICAgICAgIH07XG4gICAgfTtcblxuICAgIHRoaXMub25Gb2xkV2lkZ2V0Q2xpY2sgPSBmdW5jdGlvbihyb3csIGUpIHtcbiAgICAgICAgZSA9IGUuZG9tRXZlbnQ7XG4gICAgICAgIHZhciBvcHRpb25zID0ge1xuICAgICAgICAgICAgY2hpbGRyZW46IGUuc2hpZnRLZXksXG4gICAgICAgICAgICBhbGw6IGUuY3RybEtleSB8fCBlLm1ldGFLZXksXG4gICAgICAgICAgICBzaWJsaW5nczogZS5hbHRLZXlcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHZhciByYW5nZSA9IHRoaXMuJHRvZ2dsZUZvbGRXaWRnZXQocm93LCBvcHRpb25zKTtcbiAgICAgICAgaWYgKCFyYW5nZSkge1xuICAgICAgICAgICAgdmFyIGVsID0gKGUudGFyZ2V0IHx8IGUuc3JjRWxlbWVudCk7XG4gICAgICAgICAgICBpZiAoZWwgJiYgL2FjZV9mb2xkLXdpZGdldC8udGVzdChlbC5jbGFzc05hbWUpKVxuICAgICAgICAgICAgICAgIGVsLmNsYXNzTmFtZSArPSBcIiBhY2VfaW52YWxpZFwiO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLiR0b2dnbGVGb2xkV2lkZ2V0ID0gZnVuY3Rpb24ocm93LCBvcHRpb25zKSB7XG4gICAgICAgIGlmICghdGhpcy5nZXRGb2xkV2lkZ2V0KVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgdHlwZSA9IHRoaXMuZ2V0Rm9sZFdpZGdldChyb3cpO1xuICAgICAgICB2YXIgbGluZSA9IHRoaXMuZ2V0TGluZShyb3cpO1xuXG4gICAgICAgIHZhciBkaXIgPSB0eXBlID09PSBcImVuZFwiID8gLTEgOiAxO1xuICAgICAgICB2YXIgZm9sZCA9IHRoaXMuZ2V0Rm9sZEF0KHJvdywgZGlyID09PSAtMSA/IDAgOiBsaW5lLmxlbmd0aCwgZGlyKTtcblxuICAgICAgICBpZiAoZm9sZCkge1xuICAgICAgICAgICAgaWYgKG9wdGlvbnMuY2hpbGRyZW4gfHwgb3B0aW9ucy5hbGwpXG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVGb2xkKGZvbGQpO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHRoaXMuZXhwYW5kRm9sZChmb2xkKTtcbiAgICAgICAgICAgIHJldHVybiBmb2xkO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2Uocm93LCB0cnVlKTtcbiAgICAgICAgaWYgKHJhbmdlICYmICFyYW5nZS5pc011bHRpTGluZSgpKSB7XG4gICAgICAgICAgICBmb2xkID0gdGhpcy5nZXRGb2xkQXQocmFuZ2Uuc3RhcnQucm93LCByYW5nZS5zdGFydC5jb2x1bW4sIDEpO1xuICAgICAgICAgICAgaWYgKGZvbGQgJiYgcmFuZ2UuaXNFcXVhbChmb2xkLnJhbmdlKSkge1xuICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlRm9sZChmb2xkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm9sZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgaWYgKG9wdGlvbnMuc2libGluZ3MpIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5nZXRQYXJlbnRGb2xkUmFuZ2VEYXRhKHJvdyk7XG4gICAgICAgICAgICBpZiAoZGF0YS5yYW5nZSkge1xuICAgICAgICAgICAgICAgIHZhciBzdGFydFJvdyA9IGRhdGEucmFuZ2Uuc3RhcnQucm93ICsgMTtcbiAgICAgICAgICAgICAgICB2YXIgZW5kUm93ID0gZGF0YS5yYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5mb2xkQWxsKHN0YXJ0Um93LCBlbmRSb3csIG9wdGlvbnMuYWxsID8gMTAwMDAgOiAwKTtcbiAgICAgICAgfSBlbHNlIGlmIChvcHRpb25zLmNoaWxkcmVuKSB7XG4gICAgICAgICAgICBlbmRSb3cgPSByYW5nZSA/IHJhbmdlLmVuZC5yb3cgOiB0aGlzLmdldExlbmd0aCgpO1xuICAgICAgICAgICAgdGhpcy5mb2xkQWxsKHJvdyArIDEsIGVuZFJvdywgb3B0aW9ucy5hbGwgPyAxMDAw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bnRzKHBvcywgYnJhY2tldFBvcyk7XG4gICAgICAgICAgICBpZiAoIWJlZm9yZSkge1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4rKztcbiAgICAgICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4tLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJhbmdlLmN1cnNvciA9IHJhbmdlLmVuZDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBicmFja2V0UG9zID0gdGhpcy4kZmluZE9wZW5pbmdCcmFja2V0KG1hdGNoWzJdLCBwb3MpO1xuICAgICAgICAgICAgaWYgKCFicmFja2V0UG9zKVxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgcmFuZ2UgPSBSYW5nZS5mcm9tUG9pbnRzKGJyYWNrZXRQb3MsIHBvcyk7XG4gICAgICAgICAgICBpZiAoIWJlZm9yZSkge1xuICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0LmNvbHVtbisrO1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4tLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJhbmdlLmN1cnNvciA9IHJhbmdlLnN0YXJ0O1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgfTtcblxuICAgIHRoaXMuJGJyYWNrZXRzID0ge1xuICAgICAgICBcIilcIjogXCIoXCIsXG4gICAgICAgIFwiKFwiOiBcIilcIixcbiAgICAgICAgXCJdXCI6IFwiW1wiLFxuICAgICAgICBcIltcIjogXCJdXCIsXG4gICAgICAgIFwie1wiOiBcIn1cIixcbiAgICAgICAgXCJ9XCI6IFwie1wiXG4gICAgfTtcblxuICAgIHRoaXMuJGZpbmRPcGVuaW5nQnJhY2tldCA9IGZ1bmN0aW9uKGJyYWNrZXQsIHBvc2l0aW9uLCB0eXBlUmUpIHtcbiAgICAgICAgdmFyIG9wZW5CcmFja2V0ID0gdGhpcy4kYnJhY2tldHNbYnJhY2tldF07XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG5cbiAgICAgICAgdmFyIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3IodGhpcywgcG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4pO1xuICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgXG4gICAgICAgICBpZiAoIXR5cGVSZSl7XG4gICAgICAgICAgICB0eXBlUmUgPSBuZXcgUmVnRXhwKFxuICAgICAgICAgICAgICAgIFwiKFxcXFwuP1wiICtcbiAgICAgICAgICAgICAgICB0b2tlbi50eXBlLnJlcGxhY2UoXCIuXCIsIFwiXFxcXC5cIikucmVwbGFjZShcInJwYXJlblwiLCBcIi5wYXJlblwiKVxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFxiKD86ZW5kKVxcYi8sIFwiKD86c3RhcnR8YmVnaW58ZW5kKVwiKVxuICAgICAgICAgICAgICAgICsgXCIpK1wiXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHZhciB2YWx1ZUluZGV4ID0gcG9zaXRpb24uY29sdW1uIC0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgLSAyO1xuICAgICAgICB2YXIgdmFsdWUgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgIFxuICAgICAgICAgICAgd2hpbGUgKHZhbHVlSW5kZXggPj0gMCkge1xuICAgICAgICAgICAgICAgIHZhciBjaHIgPSB2YWx1ZS5jaGFyQXQodmFsdWVJbmRleCk7XG4gICAgICAgICAgICAgICAgaWYgKGNociA9PSBvcGVuQnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCAtPSAxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVwdGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtyb3c6IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbjogdmFsdWVJbmRleCArIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChjaHIgPT0gYnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCArPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWx1ZUluZGV4IC09IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIH0gd2hpbGUgKHRva2VuICYmICF0eXBlUmUudGVzdCh0b2tlbi50eXBlKSk7XG5cbiAgICAgICAgICAgIGlmICh0b2tlbiA9PSBudWxsKVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFsdWUgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgIHZhbHVlSW5kZXggPSB2YWx1ZS5sZW5ndGggLSAxO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xuXG4gICAgdGhpcy4kZmluZENsb3NpbmdCcmFja2V0ID0gZnVuY3Rpb24oYnJhY2tldCwgcG9zaXRpb24sIHR5cGVSZSkge1xuICAgICAgICB2YXIgY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bmd0aCkge1xuICAgICAgICAgICAgICAgIHZhciBjaHIgPSB2YWx1ZS5jaGFyQXQodmFsdWVJbmRleCk7XG4gICAgICAgICAgICAgICAgaWYgKGNociA9PSBjbG9zaW5nQnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCAtPSAxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVwdGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtyb3c6IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbjogdmFsdWVJbmRleCArIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChjaHIgPT0gYnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCArPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWx1ZUluZGV4ICs9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgIXR5cGVSZS50ZXN0KHRva2VuLnR5cGUpKTtcblxuICAgICAgICAgICAgaWYgKHRva2VuID09IG51bGwpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIHZhbHVlSW5kZXggPSAwO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xufVxuZXhwb3J0cy5CcmFja2V0TWF0Y2ggPSBCcmFja2V0TWF0Y2g7XG5cbn0pO1xuXG5hY2UuZGVmaW5lKFwiYWNlL2VkaXRfc2Vzc2lvblwiLFtcInJlcXV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tdO1xuXG4gICAgICAgIGlmICh0aGlzLiRpbmZvcm1VbmRvTWFuYWdlcilcbiAgICAgICAgICAgIHRoaXMuJGluZm9ybVVuZG9NYW5hZ2VyLmNhbmNlbCgpO1xuXG4gICAgICAgIGlmICh1bmRvTWFuYWdlcikge1xuICAgICAgICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuXG4gICAgICAgICAgICB0aGlzLiRzeW5jSW5mb3JtVW5kb01hbmFnZXIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBzZWxmLiRpbmZvcm1VbmRvTWFuYWdlci5jYW5jZWwoKTtcblxuICAgICAgICAgICAgICAgIGlmIChzZWxmLiRkZWx0YXNGb2xkLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLiRkZWx0YXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBncm91cDogXCJmb2xkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWx0YXM6IHNlbGYuJGRlbHRhc0ZvbGRcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuJGRlbHRhc0ZvbGQgPSBbXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VsZi4kZGVsdGFzRG9jLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLiRkZWx0YXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBncm91cDogXCJkb2NcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbHRhczogc2VsZi4kZGVsdGFzRG9jXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLiRkZWx0YXNEb2MgPSBbXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VsZi4kZGVsdGFzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdW5kb01hbm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ShcIiBcIiArIGNsYXNzTmFtZSwgXCJcIik7XG4gICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZUJyZWFrcG9pbnRcIiwge30pO1xuICAgIH07XG4gICAgdGhpcy5nZXRCcmVha3BvaW50cyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kYnJlYWtwb2ludHM7XG4gICAgfTtcbiAgICB0aGlzLnNldEJyZWFrcG9pbnRzID0gZnVuY3Rpb24ocm93cykge1xuICAgICAgICB0aGlzLiRicmVha3BvaW50cyA9IFtdO1xuICAgICAgICBmb3IgKHZhciBpPTA7IGk8cm93cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdGhpcy4kYnJlYWtwb2ludHNbcm93c1tpXV0gPSBcImFjZV9icmVha3BvaW50XCI7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fc2lnbmFsKFwiY2hhbmdlQnJlYWtwb2ludFwiLCB7fSk7XG4gICAgfTtcbiAgICB0aGlzLmNsZWFyQnJlYWtwb2ludHMgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdGhpcy4kYnJlYWtwb2ludHMgPSBbXTtcbiAgICAgICAgdGhpcy5fc2lnbmFsKFwiY2hhbmdlQnJlYWtwb2ludFwiLCB7fSk7XG4gICAgfTtcbiAgICB0aGlzLnNldEJyZWFrcG9pbnQgPSBmdW5jdGlvbihyb3csIGNsYXNzTmFtZSkge1xuICAgICAgICBpZiAoY2xhc3NOYW1lID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICBjbGFzc05hbWUgPSBcImFjZV9icmVha3BvaW50XCI7XG4gICAgICAgIGlmIChjbGFzc05hbWUpXG4gICAgICAgICAgICB0aGlzLiRicmVha3BvaW50c1tyb3ddID0gY2xhc3NOYW1lO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICBkZWxldGUgdGhpcy4kYnJlYWtwb2ludHNbcm93XTtcbiAgICAgICAgdGhpcy5fc2lnbmFsKFwiY2hhbmdlQn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nJvbnQpIHtcbiAgICAgICAgaWYgKCFtYXJrZXIudXBkYXRlKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgaWQgPSB0aGlzLiRtYXJrZXJJZCsrO1xuICAgICAgICBtYXJrZXIuaWQgPSBpZDtcbiAgICAgICAgbWFya2VyLmluRnJvbnQgPSAhIWluRnJvbnQ7XG5cbiAgICAgICAgaWYgKGluRnJvbnQpIHtcbiAgICAgICAgICAgIHRoaXMuJGZyb250TWFya2Vyc1tpZF0gPSBtYXJrZXI7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwoXCJjaGFuZ2VGcm9udE1hcmtlclwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuJGJhY2tNYXJrZXJzW2lkXSA9IG1hcmtlcjtcbiAgICAgICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZUJhY2tNYXJrZXJcIik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbWFya2VyO1xuICAgIH07XG4gICAgdGhpcy5yZW1vdmVNYXJrZXIgPSBmdW5jdGlvbihtYXJrZXJJZCkge1xuICAgICAgICB2YXIgbWFya2VyID0gdGhpcy4kZnJvbnRNYXJrZXJzW21hcmtlcklkXSB8fCB0aGlzLiRiYWNrTWFya2Vyc1ttYXJrZXJJZF07XG4gICAgICAgIGlmICghbWFya2VyKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBtYXJrZXJzID0gbWFya2VyLmluRnJvbnQgPyB0aGlzLiRmcm9udE1hcmtlcnMgOiB0aGlzLiRiYWNrTWFya2VycztcbiAgICAgICAgaWYgKG1hcmtlcikge1xuICAgICAgICAgICAgZGVsZXRlIChtYXJrZXJzW21hcmtlcklkXSk7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwobWFya2VyLmluRnJvbnQgPyBcImNoYW5nZUZyb250TWFya2VyXCIgOiBcImNoYW5nZUJhY2tNYXJrZXJcIik7XG4gICAgIC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iA9ICEhbGluZS5jaGFyQXQoY29sdW1uKS5tYXRjaCh0aGlzLnRva2VuUmUpO1xuXG4gICAgICAgIGlmIChpblRva2VuKVxuICAgICAgICAgICAgdmFyIHJlID0gdGhpcy50b2tlblJlO1xuICAgICAgICBlbHNlIGlmICgvXlxccyskLy50ZXN0KGxpbmUuc2xpY2UoY29sdW1uLTEsIGNvbHVtbisxKSkpXG4gICAgICAgICAgICB2YXIgcmUgPSAvXFxzLztcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgdmFyIHJlID0gdGhpcy5ub25Ub2tlblJlO1xuXG4gICAgICAgIHZhciBzdGFydCA9IGNvbHVtbjtcbiAgICAgICAgaWYgKHN0YXJ0ID4gMCkge1xuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIHN0YXJ0LS07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB3aGlsZSAoc3RhcnQgPj0gMCAmJiBsaW5lLmNoYXJBdChzdGFydCkubWF0Y2gocmUpKTtcbiAgICAgICAgICAgIHN0YXJ0Kys7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZW5kID0gY29sdW1uO1xuICAgICAgICB3aGlsZSAoZW5kIDwgbGluZS5sZW5ndGggJiYgbGluZS5jaGFyQXQoZW5kKS5tYXRjaChyZSkpIHtcbiAgICAgICAgICAgIGVuZCsrO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShyb3csIHN0YXJ0LCByb3csIGVuZCk7XG4gICAgfTtcbiAgICB0aGlzLmdldEFXb3JkUmFuZ2UgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICB2YXIgd29yZFJhbmdlID0gdGhpcy5nZXRXb3JkUmFuZ2Uocm93LCBjb2x1bW4pO1xuICAgICAgICB2YXIgbGluZSA9IHRoaXMuZ2V0TGluZSh3b3JkUmFuZ2UuZW5kLnJvdyk7XG5cbiAgICAgICAgd2hpbGUgKGxpbmUuY2hhckF0KHdvcmRS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aWYgKG1vZGUuZ2V0VG9rZW5pemVyKVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiRvbkNoYW5nZU1vZGUobW9kZSk7XG4gICAgICAgICAgICB2YXIgb3B0aW9ucyA9IG1vZGU7XG4gICAgICAgICAgICB2YXIgcGF0aCA9IG9wdGlvbnMucGF0aDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHBhdGggPSBtb2RlIHx8IFwiYWNlL21vZGUvdGV4dFwiO1xuICAgICAgICB9XG4gICAgICAgIGlmICghdGhpcy4kbW9kZXNbXCJhY2UvbW9kZS90ZXh0XCJdKVxuICAgICAgICAgICAgdGhpcy4kbW9kZXNbXCJhY2UvbW9kZS90ZXh0XCJdID0gbmV3IFRleHRNb2RlKCk7XG5cbiAgICAgICAgaWYgKHRoaXMuJG1vZGVzW3BhdGhdICYmICFvcHRpb25zKSB7XG4gICAgICAgICAgICB0aGlzLiRvbkNoYW5nZU1vZGUodGhpcy4kbW9kZXNbcGF0aF0pO1xuICAgICAgICAgICAgY2IgJiYgY2IoKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLiRtb2RlSWQgPSBwYXRoO1xuICAgICAgICBjb25maWcubG9hZE1vZHVsZShbXCJtb2RlXCIsIHBhdGhdLCBmdW5jdGlvbihtKSB7XG4gICAgICAgICAgICBpZiAodGhpcy4kbW9kZUlkICE9PSBwYXRoKVxuICAgICAgICAgICAgICAgIHJldHVybiBjYiAmJiBjYigpO1xuICAgICAgICAgICAgaWYgKHRoaXMuJG1vZGVzW3BhdGhdICYmICFvcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kb25DaGFuZ2VNb2RlKHRoaXMuJG1vZGVzW3BhdGhdKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobSAmJiBtLk1vZGUpIHtcbiAgICAgICAgICAgICAgICBtID0gbmV3IG0uTW9kZShvcHRpb25zKTtcbiAgICAgICAgICAgICAgICBpZiAoIW9wdGlvbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kbW9kZXNbcGF0aF0gPSBtO1xuICAgICAgICAgICAgICAgICAgICBtLiRpZCA9IHBhdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuJG9uQ2hhbmdlTW9kZShtKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNiICYmIGNiKCk7XG4gICAgICAgIH0uYmluZCh0aGlzKSk7XG4gICAgICAgIGlmICghdGhpcy4kbW9kZSlcbiAgICAgICAgICAgIHRoaXMuJG9uQ2hhbmdlTW9kZSh0aGlzLiRtb2Rlc1tcImFjZS9tb2RlL3RleHRcIl0sIHRydWUpO1xuICAgIH07XG5cbiAgICB0aGlzLiRvbkNoYW5nZU1vZGUgPSBmdW5jdGlvbihtb2RlLCAkaXNQbGFjZWhvbGRlcikge1xuICAgICAgICBpZiAoISRpc1BsYWNlaG9sZGVyKVxuICAgICAgICAgICAgdGhpcy4kbW9kZUlkID0gbW9kZS4kaWQ7XG4gICAgICAgIGlmICh0aGlzLiRtb2RlID09PSBtb2RlKSBcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB0aGlzLiRtb2RlID0gbW9kZTtcblxuICAgICAgICB0aGlzLiRzdG9wV29ya2VyKCk7XG5cbiAgICAgICAgaWYgKHRoaXMuJHVzZVdvcmtlcilcbiAgICAgICAgICAgIHRoaXMuJHN0YXJ0V29ya2VyKCk7XG5cbiAgICAgICAgdmFyIHRva2VuaXplciA9IG1vZGUuZ2V0VG9rZW5pemVyKCk7XG5cbiAgICAgICAgaWYodG9rZW5pemVyLmFkZEV2ZW50TGlzdGVuZXIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdmFyIG9uUmVsb2FkVG9rZW5pemVyID0gdGhpcy5vblJlbG9hZFRva2VuaXplci5iaW5kKHRoaXMpO1xuICAgICAgICAgICAgdG9rZW5pemVyLmFkZEV2ZW50TGl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nJvdyArIDE7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpID49IGxlbilcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuJGZvbGREYXRhW2ZvbGRJbmRleCsrXTtcbiAgICAgICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOiBJbmZpbml0eTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoY2FjaGVbaV0gPT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgY2FjaGVbaV0gPSB0aGlzLiRnZXRTdHJpbmdTY3JlZW5XaWR0aChsaW5lc1tpXSlbMF07XG5cbiAgICAgICAgICAgICAgICBpZiAoY2FjaGVbaV0gPiBsb25nZXN0U2NyZWVuTGluZSlcbiAgICAgICAgICAgICAgICAgICAgbG9uZ2VzdFNjcmVlbkxpbmUgPSBjYWNoZVtpXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuc2NyZWVuV2lkdGggPSBsb25nZXN0U2NyZWVuTGluZTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5nZXRMaW5lID0gZnVuY3Rpb24ocm93KSB7XG4gICAgICAgIHJldHVybiB0aGlzLmRvYy5nZXRMaW5lKHJvdyk7XG4gICAgfTtcbiAgICB0aGlzLmdldExpbmVzID0gZnVuY3Rpb24oZmlyc3RSb3csIGxhc3RSb3cpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZG9jLmdldExpbmVzKGZpcnN0Um93LCBsYXN0Um93KTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0TGVuZ3RoID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmRvYy5nZXRMZW5ndGgoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0VGV4dFJhbmdlID0gZnVuY3Rpb24ocmF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kZWx0YS5lbmQpO1xuICAgICAgICAgICAgbGFzdERlbHRhSXNJbnNlcnQgPSB0cnVlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmFuZ2UgPSBSYW5nZS5mcm9tUG9pbnRzKGRlbHRhLnN0YXJ0LCBkZWx0YS5zdGFydCk7XG4gICAgICAgICAgICBsYXN0RGVsdGFJc0luc2VydCA9IGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBkZWx0YXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGRlbHRhID0gZGVsdGFzW2ldO1xuICAgICAgICAgICAgaWYgKGlzSW5zZXJ0KGRlbHRhKSkge1xuICAgICAgICAgICAgICAgIHBvaW50ID0gZGVsdGEuc3RhcnQ7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbXBhcmUocG9pbnQucm93LCBwb2ludC5jb2x1bW4pID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLnNldFN0YXJ0KHBvaW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcG9pbnQgPSBkZWx0YS5lbmQ7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbXBhcmUocG9pbnQucm93LCBwb2ludC5jb2x1bW4pID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc2V0RW5kKHBvaW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGFzdERlbHRhSXNJbnNlcnQgPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwb2ludCA9IGRlbHRhLnN0YXJ0O1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZS5jb21wYXJlKHBvaW50LnJvdywgcG9pbnQuY29sdW1uKSA9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IFJhbmdlLmZyb21Qb2ludHM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b1JhbmdlLnN0YXJ0LnJvdyA+PSBmcm9tUmFuZ2UuZW5kLnJvdykge1xuICAgICAgICAgICAgICAgIHRvUmFuZ2Uuc3RhcnQucm93ICs9IHJvd0RpZmY7XG4gICAgICAgICAgICAgICAgdG9SYW5nZS5lbmQucm93ICs9IHJvd0RpZmY7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0b1JhbmdlLmVuZCA9IHRoaXMuaW5zZXJ0KHRvUmFuZ2Uuc3RhcnQsIHRleHQpO1xuICAgICAgICBpZiAoZm9sZHMubGVuZ3RoKSB7XG4gICAgICAgICAgICB2YXIgb2xkU3RhcnQgPSBmcm9tUmFuZ2Uuc3RhcnQ7XG4gICAgICAgICAgICB2YXIgbmV3U3RhcnQgPSB0b1JhbmdlLnN0YXJ0O1xuICAgICAgICAgICAgdmFyIHJvd0RpZmYgPSBuZXdTdGFydC5yb3cgLSBvbGRTdGFydC5yb3c7XG4gICAgICAgICAgICB2YXIgY29sbERpZmYgPSBuZXdTdGFydC5jb2x1bW4gLSBvbGRTdGFydC5jb2x1bW47XG4gICAgICAgICAgICB0aGlzLmFkZEZvbGRzKGZvbGRzLm1hcChmdW5jdGlvbih4KSB7XG4gICAgICAgICAgICAgICAgeCA9IHguY2xvbmUoKTtcbiAgICAgICAgICAgICAgICBpZiAoeC5zdGFydC5yb3cgPT0gb2xkU3RhcnQucm93KVxuICAgICAgICAgICAgICAgICAgICB4LnN0YXJ0LmNvbHVtbiArPSBjb2xsRGlmZjtcbiAgICAgICAgICAgICAgICBpZiAoeC5lbmQucm93ID09IG9sZFN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICAgICAgeC5lbmQuY29sdW1uICs9IGNvbGxEaWZmO1xuICAgICAgICAgICAgICAgIHguc3RhcnQucm93ICs9IHJvd0RpZmY7XG4gICAgICAgICAgICAgICAgeC5lbmQucm93ICs9IHJvd0RpZmY7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgICAgICB9KSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdG9SYW5nZTtcbiAgICB9O1xuICAgIHRoaXMuaW5kZW50Um93cyA9IGZ1bmN0aW9uKHN0YXJ0Um93LCBlbmRSb3csIGluZGVudFN0cmluZykge1xuICAgICAgICBpbmRlbnRTdHJpbmcgPSBpbmRlbnRTdHJpbmcucmVwbGFjZSgvXFx0L2csIHRoaXMuZ2V0VGFiU3RyaW5nKCkpO1xuICAgICAgICBmb3IgKHZhciByb3c9c3RhcnRSb3c7IHJvdzw9ZW5kUm93OyByb3crKylcbiAgICAgICAgICAgIHRoaXMuZG9jLmluc2VydEluTGluZSh7cm93OiByb3csIGNvbHVtbjogMH0sIGluZGVudFN0cmluZyk7XG4gICAgfTtcbiAgICB0aGlzLm91dGRlbnRSb3dzID0gZnVuY3Rpb24gKHJhbmdlKSB7XG4gICAgICAgIHZhciByb3dSYW5nZSA9IHJhbmdlLmNvbGxhcHNlUm93cygpO1xuICAgICAgICB2YXIgZGVsZXRlUmFuZ2UgPSBuZXcgUmFuZ2UoMCwgMCwgMCwgMCk7XG4gICAgICAgIHZhciBzaXplID0gdGhpcy5nZXRUYWJTaXplKCk7XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IHJvd1JhbmdlLnN0YXJ0LnJvdzsgaSA8PSByb3dSYW5nZS5lbmQucm93OyArK2kpIHtcbiAgICAgICAgICAgIHZhciBsaW5lID0gdGhpcy5nZXRMaW5lKGkpO1xuXG4gICAgICAgICAgICBkZWxldGVSYW5nZS5zdGFydC5yb3cgPSBpO1xuICAgICAgICAgICAgZGVsZXRlUmFuZ2UuZW5kLnJvdyA9IGk7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHNpemU7ICsrailcbiAgICAgICAgICAgICAgICBpZiAobGluZS5jaGFyQXQoaikgIT0gJyAnKVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGlmIChqIDwgc2l6ZSAmJiBsaW5lL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gICB9O1xuICAgIH07XG5cbiAgICB0aGlzLiR1cGRhdGVJbnRlcm5hbERhdGFPbkNoYW5nZSA9IGZ1bmN0aW9uKGRlbHRhKSB7XG4gICAgICAgIHZhciB1c2VXcmFwTW9kZSA9IHRoaXMuJHVzZVdyYXBNb2RlO1xuICAgICAgICB2YXIgYWN0aW9uID0gZGVsdGEuYWN0aW9uO1xuICAgICAgICB2YXIgc3RhcnQgPSBkZWx0YS5zdGFydDtcbiAgICAgICAgdmFyIGVuZCA9IGRlbHRhLmVuZDtcbiAgICAgICAgdmFyIGZpcnN0Um93ID0gc3RhcnQucm93O1xuICAgICAgICB2YXIgbGFzdFJvdyA9IGVuZC5yb3c7XG4gICAgICAgIHZhciBsZW4gPSBsYXN0Um93IC0gZmlyc3RSb3c7XG4gICAgICAgIHZhciByZW1vdmVkRm9sZHMgPSBudWxsO1xuICAgICAgICBcbiAgICAgICAgdGhpcy4kdXBkYXRpbmcgPSB0cnVlO1xuICAgICAgICBpZiAobGVuICE9IDApIHtcbiAgICAgICAgICAgIGlmIChhY3Rpb24gPT09IFwicmVtb3ZlXCIpIHtcbiAgICAgICAgICAgICAgICB0aGlzW3VzZVdyYXBNb2RlID8gXCIkd3JhcERhdGFcIiA6IFwiJHJvd0xlbmd0aENhY2hlXCJdLnNwbGljZShmaXJzdFJvdywgbGVuKTtcblxuICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZXMgPSB0aGlzLiRmb2xkRGF0YTtcbiAgICAgICAgICAgICAgICByZW1vdmVkRm9sZHMgPSB0aGlzLmdldEZvbGRzSW5SYW5nZShkZWx0YSk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVGb2xkcyhyZW1vdmVkRm9sZHMpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5nZXRGb2xkTGluZShlbmQucm93KTtcbiAgICAgICAgICAgICAgICB2YXIgaWR4ID0gMDtcbiAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUuYWRkUmVtb3ZlQ2hhcnMoZW5kLnJvdywgZW5kLmNvbHVtbiwgc3RhcnQuY29sdW1uIC0gZW5kLmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLnNoaWZ0Um93KC1sZW4pO1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZUJlZm9yZSA9IHRoaXMuZ2V0Rm9sZExpbmUoZmlyc3RSb3cpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmVCZWZvcmUgJiYgZm9sZExpbmVCZWZvcmUgIT09IGZvbGRMaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZUJlZm9yZS5tZXJnZShmb2xkTGluZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZSA9IGZvbGRMaW5lQmVmb3JlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlkeCA9IGZvbGRMaW5lcy5pbmRleE9mKGZvbGRMaW5lKSArIDE7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZm9yIChpZHg7IGlkeCA8IGZvbGRMaW5lcy5sZW5ndGg7IGlkeCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGRMaW5lc1tpZHhdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUuc3RhcnQucm93ID49IGVuZC5yb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLnNoaWZ0Um93KC1sZW4pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGFzdFJvdyA9IGZpcnN0Um93O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IEFycmF5KGxlbik7XG4gICAgICAgICAgICAgICAgYXJncy51bnNoaWZ0KGZpcnN0Um93LCAwKTtcbiAgICAgICAgICAgICAgICB2YXIgYXJyID0gdXNlV3JhcE1vZGUgPyB0aGlzLiR3cmFwRGF0YSA6IHRoaXMuJHJvd0xlbmd0aENhY2hlO1xuICAgICAgICAgICAgICAgIGFyci5zcGxpY2UuYXBwbHkoYXJyLCBhcmdzKTtcbiAgICAgICAgICAgICAgICB2YXIgZm9sZExpbmVzID0gdGhpcy4kZm9sZERhdGE7XG4gICAgICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5nZXRGb2xkTGluZShmaXJzdFJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIGlkeCA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKGZvbGRMaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjbXAgPSBmb2xkTGluZS5yYW5nZS5jb21wYXJlSW5zaWRlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNtcCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZSA9IGZvbGRMaW5lLnNwbGl0KHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLnNoaWZ0Um93KGxlbik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUuYWRkUmVtb3ZlQ2hhcnMobGFzdFJvdywgMCwgZW5kLmNvbHVtbiAtIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgICAgICBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5hZGRSZW1vdmVDaGFycyhmaXJzdFJvdywgMCwgZW5kLmNvbHVtbiAtIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5zaGlmdFJvdyhsZW4pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlkeCA9IGZvbGRMaW5lcy5pbmRleE9mKGZvbGRMaW5lKSArIDE7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZm9yIChpZHg7IGlkeCA8IGZvbGRMaW5lcy5sZW5ndGg7IGlkeCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGRMaW5lc1tpZHhdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUuc3RhcnQucm93ID49IGZpcnN0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5zaGlmdFJvdyhsZW4pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbGVuID0gTWF0aC5hYnMoZGVsdGEuc3RhcnQuY29sdW1uIC0gZGVsdGEuZW5kLmNvbHVtbik7XG4gICAgICAgICAgICBpZiAoYWN0aW9uID09PSBcInJlbW92ZVwiKSB7XG4gICAgICAgICAgICAgICAgcmVtb3ZlZEZvbGRzID0gdGhpcy5nZXRGb2xkc0luUmFuZ2UoZGVsdGEpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlRm9sZHMocmVtb3ZlZEZvbGRzKTtcblxuICAgICAgICAgICAgICAgIGxlbiA9IC1sZW47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLmdldEZvbGRMaW5lKGZpcnN0Um93KTtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lLmFkZFJl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GE7XG4gICAgICAgIHZhciB3cmFwTGltaXQgPSB0aGlzLiR3cmFwTGltaXQ7XG4gICAgICAgIHZhciB0b2tlbnM7XG4gICAgICAgIHZhciBmb2xkTGluZTtcblxuICAgICAgICB2YXIgcm93ID0gZmlyc3RSb3c7XG4gICAgICAgIGxhc3RSb3cgPSBNYXRoLm1pbihsYXN0Um93LCBsaW5lcy5sZW5ndGggLSAxKTtcbiAgICAgICAgd2hpbGUgKHJvdyA8PSBsYXN0Um93KSB7XG4gICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuZ2V0Rm9sZExpbmUocm93LCBmb2xkTGluZSk7XG4gICAgICAgICAgICBpZiAoIWZvbGRMaW5lKSB7XG4gICAgICAgICAgICAgICAgdG9rZW5zID0gdGhpcy4kZ2V0RGlzcGxheVRva2VucyhsaW5lc1tyb3ddKTtcbiAgICAgICAgICAgICAgICB3cmFwRGF0YVtyb3ddID0gdGhpcy4kY29tcHV0ZVdyYXBTcGxpdHModG9rZW5zLCB3cmFwTGltaXQsIHRhYlNpemUpO1xuICAgICAgICAgICAgICAgIHJvdyArKztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdG9rZW5zID0gW107XG4gICAgICAgICAgICAgICAgZm9sZExpbmUud2FsayhmdW5jdGlvbihwbGFjZWhvbGRlciwgcm93LCBjb2x1bW4sIGxhc3RDb2x1bW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB3YWxrVG9rZW5zO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBsYWNlaG9sZGVyICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YWxrVG9rZW5zID0gdGhpcy4kZ2V0RGlzcGxheVRva2VucyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXIsIHRva2Vucy5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhbGtUb2tlbnNbMF0gPSBQTEFDRUhPTERFUl9TVEFSVDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IHdhbGtUb2tlbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2Fsa1Rva2Vuc1tpXSA9IFBMQUNFSE9MREVSX0JPRFk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YWxrVG9rZW5zID0gdGhpcy4kZ2V0RGlzcGxheVRva2VucyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZXNbcm93XS5zdWJzdHJpbmcobGFzdENvbHVtbiwgY29sdW1uKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMgPSB0b2tlbnMuY29uY2F0KHdhbGtUb2tlbnMpO1xuICAgICAgICAgICAgICAgICAgICB9LmJpbmQodGhpcyksXG4gICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLmVuZC5yb3csXG4gICAgICAgICAgICAgICAgICAgIGxpbmVzW2ZvbGRMaW5lLmVuZC5yb3ddLmxlbmd0aCArIDFcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgd3JhcERhdGFbZm9sZExpbmUuc3RhcnQucm93XSA9IHRoaXMuJGNvbXB1dGVXcmFwU3BsaXRzKHRva2Vucywgd3JhcExpbWl0LCB0YWJTaXplKTtcbiAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93ICsgMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG4gICAgdmFyIENIQVIgPSAxLFxuICAgICAgICBDSEFSX0VYVCA9IDIsXG4gICAgICAgIFBMQUNFSE9MREVSX1NUQVJUID0gMyxcbiAgICAgICAgUExBQ0VIT0xERVJfQk9EWSA9ICA0LFxuICAgICAgICBQVU5DVFVBVElPTiA9IDksXG4gICAgICAgIFNQQUNFID0gMTAsXG4gICAgICAgIFRBQiA9IDExLFxuICAgICAgICBUQUJfU1BBQ0UgPSAxMjtcblxuXG4gICAgdGhpcy4kY29tcHV0ZVdyYXBTcGxpdHMgPSBmdW5jdGlvbih0b2tlbnMsIHdyYXBMaW1pdCwgdGFiU2l6ZSkge1xuICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc3BsaXRzID0gW107XG4gICAgICAgIHZhciBkaXNwbGF5TGVuZ3RoID0gdG9rZW5zLmxlbmd0aDtcbiAgICAgICAgdmFyIGxhc3RTcGxpdCA9IDAsIGxhc3REb2NTcGxpdCA9IDA7XG5cbiAgICAgICAgdmFyIGlzQ29kZSA9IHRoaXMuJHdyYXBBc0NvZGU7XG5cbiAgICAgICAgdmFyIGluZGVudGVkU29mdFdyYXAgPSB0aGlzLiRpbmRlbnRlZFNvZnRXcmFwO1xuICAgICAgICB2YXIgbWF4SW5kZW50ID0gd3JhcExpbWl0IDw9IE1hdGgubWF4KDIgKiB0YWJTaXplLCA4KVxuICAgICAgICAgICAgfHwgaW5kZW50ZWRTb2Z0V3JhcCA9PT0gZmFsc2UgPyAwIDogTWF0aC5mbG9vcih3cmFwTGltaXQgLyAyKTtcblxuICAgICAgICBmdW5jdGlvbiBnZXRXcmFwSW5kZW50KCkge1xuICAgICAgICAgICAgdmFyIGluZGVudGF0aW9uID0gMDtcbiAgICAgICAgICAgIGlmIChtYXhJbmRlbnQgPT09IDApXG4gICAgICAgICAgICAgICAgcmV0dXJuIGluZGVudGF0aW9uO1xuICAgICAgICAgICAgaWYgKGluZGVudGVkU29mdFdyYXApIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdG9rZW4gPSB0b2tlbnNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbiA9PSBTUEFDRSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGVudGF0aW9uICs9IDE7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRva2VuID09IFRBQilcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGVudGF0aW9uICs9IHRhYlNpemU7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRva2VuID09IFRBQl9TUEFDRSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaXNDb2RlICYmIGluZGVudGVkU29mdFdyYXAgIT09IGZhbHNlKVxuICAgICAgICAgICAgICAgIGluZGVudGF0aW9uICs9IHRhYlNpemU7XG4gICAgICAgICAgICByZXR1cm4gTWF0aC5taW4oaW5kZW50YXRpb24sIG1heEluZGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gYWRkU3BsaXQoc2NyZWVuUG9zKSB7XG4gICAgICAgICAgICB2YXIgZGlzcGxheWVkID0gdG9rZW5zLnNsaWNlKGxhc3RTcGxpdCwgc2NyZWVuUG9zKTtcbiAgICAgICAgICAgIHZhciBsZW4gPSBkaXNwbGF5ZWQubGVuZ3RoO1xuICAgICAgICAgICAgZGlzcGxheWVkLmpvaW4oXCJcIilcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvMTIvZywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGxlbiAtPSAxO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnJlcGxhY2UoLzIvZywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGxlbiAtPSAxO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBpZiAoIXNwbGl0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpbmRlbnQgPSBnZXRXcmFwSW5kZW50KCk7XG4gICAgICAgICAgICAgICAgc3BsaXRzLmluZGVudCA9IGluZGVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3REb2NTcGxpdCArPSBsZW47XG4gICAgICAgICAgICBzcGxpdHMucHVzaChsYXN0RG9jU3BsaXQpO1xuICAgICAgICAgICAgbGFzdFNwbGl0ID0gc2NyZWVuUG9zO1xuICAgICAgICB9XG4gICAgICAgIHZhciBpbmRlbnQgPSAwO1xuICAgICAgICB3aGlsZSAoZGlzcGxheUxlbmd0aCAtIGxhc3RTcGxpdCA+IHdyYXBMaW1pdCAtIGluZGVudCkge1xuICAgICAgICAgICAgdmFyIHNwbGl0ID0gbGFzdFNwbGl0ICsgd3JhcExpbWl0IC0gaW5kZW50O1xuICAgICAgICAgICAgaWYgKHRva2Vuc1tzcGxpdCAtIDFdID49IFNQQUNFICYmIHRva2Vuc1tzcGxpdF0gPj0gU1BBQ0UpIHtcbiAgICAgICAgICAgICAgICBhZGRTcGxpdChzcGxpdCk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodG9rZW5zW3NwbGl0XSA9PSBQTEFDRUhPTERFUl9TVEFSVCB8fCB0b2tlbnNbc3BsaXRdID09IFBMQUNFSE9MREVSX0JPRFkpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHNwbGl0OyBzcGxpdCAhPSBsYXN0U3BsaXQgLSAxOyBzcGxpdC0tKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbnNbc3BsaXRdID09IFBMQUNFSE9MREVSX1NUQVJUKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc3BsaXQgPiBsYXN0U3BsaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkU3BsaXQoc3BsaXQpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3BsaXQgPSBsYXN0U3BsaXQgKyB3cmFwTGltaXQ7XG4gICAgICAgICAgICAgICAgZm9yIChzcGxpdDsgc3BsaXQgPCB0b2tlbnMubGVuZ3RoOyBzcGxpdCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbnNbc3BsaXRdICE9IFBMQUNFSE9MREVSX0JPRFkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzcGxpdCA9PSB0b2tlbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrOyAgLy8gQnJlYWtzIHRoZSB3aGlsZS1sb29wLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhZGRTcGxpdChzcGxpdCk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgbWluU3BsaXQgPSBNYXRoLm1heChzcGxpdCAtICh3cmFwTGltaXQgLSh3cmFwTGltaXQ+PjIpKSwgbGFzdFNwbGl0IC0gMSk7XG4gICAgICAgICAgICB3aGlsZSAoc3BsaXQgPiBtaW5TcGxpdCAmJiB0b2tlbnNbc3BsaXRdIDwgUExBQ0VIT0xERVJfU1RBUlQpIHtcbiAgICAgICAgICAgICAgICBzcGxpdCAtLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc0NvZGUpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoc3BsaXQgPiBtaW5TcGxpdCAmJiB0b2tlbnNbc3BsaXRdIDwgUExBQ0VIT0xERVJfU1RBUlQpIHtcbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHdoaWxlIChzcGxpdCA+IG1pblNwbGl0ICYmIHRva2Vuc1tzcGxpdF0gPT0gUFVOQ1RVQVRJT04pIHtcbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoc3BsaXQgPiBtaW5TcGxpdCAmJiB0b2tlbnNbc3BsaXRdIDwgU1BBQ0UpIHtcbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHNwbGl0ID4gbWluU3BsaXQpIHtcbiAgICAgICAgICAgICAgICBhZGRTcGxpdCgrK3NwbGl0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNwbGl0ID0gbGFzdFNwbGl0ICsgd3JhcExpbWl0O1xuICAgICAgICAgICAgaWYgKHRva2Vuc1tzcGxpdF0gPT0gQ0hBUl9FWFQpXG4gICAgICAgICAgICAgICAgc3BsaXQtLTtcbiAgICAgICAgICAgIGFkZFNwbGl0KHNwbGl0IC0gaW5kZW50KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3BsaXRzO1xuICAgIH07XG4gICAgdGhpcy4kZ2V0RGlzcGxheVRva2VucyA9IGZ1bmN0aW9uKHN0ciwgb2Zmc2V0KSB7XG4gICAgICAgIHZhciBhcnIgPSBbXTtcbiAgICAgICAgdmFyIHRhYlNpemU7XG4gICAgICAgIG9mZnNldCA9IG9mZnNldCB8fCAwO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3RyLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgYyA9IHN0ci5jaGFyQ29kZUF0KGkpO1xuICAgICAgICAgICAgaWYgKGMgPT0gOSkge1xuICAgICAgICAgICAgICAgIHRhYlNpemUgPSB0aGlzLmdldFNjcmVlblRhYlNpemUoYXJyLmxlbmd0aCArIG9mZnNldCk7XG4gICAgICAgICAgICAgICAgYXJyLnB1c2goVEFCKTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBuID0gMTsgbiA8IHRhYlNpemU7IG4rKykge1xuICAgICAgICAgICAgICAgICAgICBhcnIucHVzaChUQUJfU1BBQ0UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGMgPT0gMzIpIHtcbiAgICAgICAgICAgICAgICBhcnIucHVzaChTUEFDRSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYoKGMgPiAzOSAmJiBjIDwgNDgpIHx8IChjID4gNTcgJiYgYyA8IDY0KSkge1xuICAgICAgICAgICAgICAgIGFyci5wdXNoKFBVTkNUVUFUSU9OKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGMgPj0gMHgxMTAwICYmIGlzRnVsbFdpZHRoKGMpKSB7XG4gICAgICAgICAgICAgICAgYXJyLnB1c2goQ0hBUiwgQ0hBUl9FWFQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBhcnIucHVzaChDSEFSKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH07XG4gICAgdGhpcy4kZ2V0U3RyaW5nU2NyZWVuV2lkdGggPSBmdW5jdGlvbihzdHIsIG1heFNjcmVlbkNvbHVtbiwgc2NyZWVuQ29sdW1uKSB7XG4gICAgICAgIGlmIChtYXhTY3JlZW5Db2x1bW4gPT0gMClcbiAgICAgICAgICAgIHJldHVybiBbMCwgMF07XG4gICAgICAgIGlmIChtYXhTY3JlZW5Db2x1bW4gPT0gbnVsbClcbiAgICAgICAgICAgIG1heFNjcmVlbkNvbHVtbiA9IEluZmluaXR5O1xuICAgICAgICBzY3JlZW5Db2x1bW4gPSBzY3JlZW5Db2x1bW4gfHwgMDtcblxuICAgICAgICB2YXIgYywgY29sdW1uO1xuICAgICAgICBmb3IgKGNvbHVtbiA9IDA7IGNvbHVtbiA8IHN0ci5sZW5ndGg7IGNvbHVtbisrKSB7XG4gICAgICAgICAgICBjID0gc3RyLmNoYXJDb2RlQXQoY29sdW1uKTtcbiAgICAgICAgICAgIGlmIChjID09IDkpIHtcbiAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gKz0gdGhpcy5nZXRTY3JlZW5UYWJTaXplKHNjcmVlbkNvbHVtbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID49IDB4MTEwMCAmJiBpc0Z1bGxXaWR0aChjKSkge1xuICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiArPSAyO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gKz0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzY3JlZW5Db2x1bW4gPiBtYXhTY3JlZW5Db2x1bW4pIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBbc2NyZWVuQ29sdW1uLCBjb2x1bW5dO1xuICAgIH07XG5cbiAgICB0aGlzLmxpbmVXaWRnZXRzID0gbnVsbDtcbiAgICB0aGlzLmdldFJvd0xlbmd0aCA9IGZ1bmN0aW9uKHJvdykge1xuICAgICAgICBpZiAodGhpcy5saW5lV2lkZ2V0cylcbiAgICAgICAgICAgIHZhciBoID0gdGhpcy5saW5lV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YWNoZUluZGV4KHJvd0NhY2hlLCBzY3JlZW5Sb3cpO1xuICAgICAgICB2YXIgbCA9IHJvd0NhY2hlLmxlbmd0aDtcbiAgICAgICAgaWYgKGwgJiYgaSA+PSAwKSB7XG4gICAgICAgICAgICB2YXIgcm93ID0gcm93Q2FjaGVbaV07XG4gICAgICAgICAgICB2YXIgZG9jUm93ID0gdGhpcy4kZG9jUm93Q2FjaGVbaV07XG4gICAgICAgICAgICB2YXIgZG9DYWNoZSA9IHNjcmVlblJvdyA+IHJvd0NhY2hlW2wgLSAxXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBkb0NhY2hlID0gIWw7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbWF4Um93ID0gdGhpcy5nZXRMZW5ndGgoKSAtIDE7XG4gICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuZ2V0TmV4dEZvbGRMaW5lKGRvY1Jvdyk7XG4gICAgICAgIHZhciBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6IEluZmluaXR5O1xuXG4gICAgICAgIHdoaWxlIChyb3cgPD0gc2NyZWVuUm93KSB7XG4gICAgICAgICAgICByb3dMZW5ndGggPSB0aGlzLmdldFJvd0xlbmd0aChkb2NSb3cpO1xuICAgICAgICAgICAgaWYgKHJvdyArIHJvd0xlbmd0aCA+IHNjcmVlblJvdyB8fCBkb2NSb3cgPj0gbWF4Um93KSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJvdyArPSByb3dMZW5ndGg7XG4gICAgICAgICAgICAgICAgZG9jUm93Kys7XG4gICAgICAgICAgICAgICAgaWYgKGRvY1JvdyA+IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgICAgICAgICBkb2NSb3cgPSBmb2xkTGluZS5lbmQucm93KzE7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy5nZXROZXh0Rm9sZExpbmUoZG9jUm93LCBmb2xkTGluZSk7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZG9DYWNoZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuJGRvY1Jvd0NhY2hlLnB1c2goZG9jUm93KTtcbiAgICAgICAgICAgICAgICB0aGlzLiRzY3JlZW5Sb3dDYWNoZS5wdXNoKHJvdyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZm9sZExpbmUgJiYgZm9sZExpbmUuc3RhcnQucm93IDw9IGRvY1Jvdykge1xuICAgICAgICAgICAgbGluZSA9IHRoaXMuZ2V0Rm9sZERpc3BsYXlMaW5lKGZvbGRMaW5lKTtcbiAgICAgICAgICAgIGRvY1JvdyA9IGZvbGRMaW5lLnN0YXJ0LnJvdztcbiAgICAgICAgfSBlbHNlIGlmIChyb3cgKyByb3dMZW5ndGggPD0gc2NyZWVuUm93IHx8IGRvY1JvdyA+IG1heFJvdykge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICByb3c6IG1heFJvdyxcbiAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuZ2V0TGluZShtYXhSb3cpLmxlbmd0aFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGxpbmUgPSB0aGlzLmdldExpbmUoZG9jUm93KTtcbiAgICAgICAgICAgIGZvbGRMaW5lID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICB2YXIgd3JhcEluZGVudCA9IDAsIHNwbGl0SW5kZXggPSBNYXRoLmZsb29yKHNjcmVlblJvdyAtIHJvdyk7XG4gICAgICAgIGlmICh0aGlzLiR1c2VXcmFwTW9kZS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hlLmxlbmd0aDtcbiAgICAgICAgaWYgKGwgJiYgaSA+PSAwKSB7XG4gICAgICAgICAgICB2YXIgcm93ID0gcm93Q2FjaGVbaV07XG4gICAgICAgICAgICB2YXIgc2NyZWVuUm93ID0gdGhpcy4kc2NyZWVuUm93Q2FjaGVbaV07XG4gICAgICAgICAgICB2YXIgZG9DYWNoZSA9IGRvY1JvdyA+IHJvd0NhY2hlW2wgLSAxXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBkb0NhY2hlID0gIWw7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLmdldE5leHRGb2xkTGluZShyb3cpO1xuICAgICAgICB2YXIgZm9sZFN0YXJ0ID0gZm9sZExpbmUgP2ZvbGRMaW5lLnN0YXJ0LnJvdyA6SW5maW5pdHk7XG5cbiAgICAgICAgd2hpbGUgKHJvdyA8IGRvY1Jvdykge1xuICAgICAgICAgICAgaWYgKHJvdyA+PSBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgICAgICByb3dFbmQgPSBmb2xkTGluZS5lbmQucm93ICsgMTtcbiAgICAgICAgICAgICAgICBpZiAocm93RW5kID4gZG9jUm93KVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuZ2V0TmV4dEZvbGRMaW5lKHJvd0VuZCwgZm9sZExpbmUpO1xuICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID9mb2xkTGluZS5zdGFydC5yb3cgOkluZmluaXR5O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgcm93RW5kID0gcm93ICsgMTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2NyZWVuUm93ICs9IHRoaXMuZ2V0Um93TGVuZ3RoKHJvdyk7XG4gICAgICAgICAgICByb3cgPSByb3dFbmQ7XG5cbiAgICAgICAgICAgIGlmIChkb0NhY2hlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kZG9jUm93Q2FjaGUucHVzaChyb3cpO1xuICAgICAgICAgICAgICAgIHRoaXMuJHNjcmVlblJvd0NhY2hlLnB1c2goc2NyZWVuUm93KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgdGV4dExpbmUgPSBcIlwiO1xuICAgICAgICBpZiAoZm9sZExpbmUgJiYgcm93ID49IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgdGV4dExpbmUgPSB0aGlzLmdldEZvbGREaXNwbGF5TGluZShmb2xkTGluZSwgZG9jUm93LCBkb2NDb2x1bW4pO1xuICAgICAgICAgICAgZm9sZFN0YXJ0Um93ID0gZm9sZExpbmUuc3RhcnQucm93O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGV4dExpbmUgPSB0aGlzLmdldExpbmUoZG9jUm93KS5zdWJzdHJpbmcoMCwgZG9jQ29sdW1uKTtcbiAgICAgICAgICAgIGZvbGRTdGFydFJvdyA9IGRvY1JvdztcbiAgICAgICAgfVxuICAgICAgICB2YXIgd3JhcEluZGVudCA9IDA7XG4gICAgICAgIGlmICh0aGlzLiR1c2VXcmFwTW9kZSkge1xuICAgICAgICAgICAgdmFyIHdyYXBSb3cgPSB0aGlzLiR3cmFwRGF0YVtmb2xkU3RhcnRSb3ddO1xuICAgICAgICAgICAgaWYgKHdyYXBSb3cpIHtcbiAgICAgICAgICAgICAgICB2YXIgc2NyZWVuUm93T2Zmc2V0ID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAodGV4dExpbmUubGVuZ3RoID49IHdyYXBSb3dbc2NyZWVuUm93T2Zmc2V0XSkge1xuICAgICAgICAgICAgICAgICAgICBzY3JlZW5Sb3cgKys7XG4gICAgICAgICAgICAgICAgICAgIHNjcmVlblJvd09mZnNldCsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0ZXh0TGluZSA9IH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4kZm9sZERhdGE7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZvbGREYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgZm9sZCA9IGZvbGREYXRhW2ldO1xuICAgICAgICAgICAgICAgIHNjcmVlblJvd3MgLT0gZm9sZC5lbmQucm93IC0gZm9sZC5zdGFydC5yb3c7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgbGFzdFJvdyA9IHRoaXMuJHdyYXBEYXRhLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciByb3cgPSAwLCBpID0gMDtcbiAgICAgICAgICAgIHZhciBmb2xkID0gdGhpcy4kZm9sZERhdGFbaSsrXTtcbiAgICAgICAgICAgIHZhciBmb2xkU3RhcnQgPSBmb2xkID8gZm9sZC5zdGFydC5yb3cgOkluZmluaXR5O1xuXG4gICAgICAgICAgICB3aGlsZSAocm93IDwgbGFzdFJvdykge1xuICAgICAgICAgICAgICAgIHZhciBzcGxpdHMgPSB0aGlzLiR3cmFwRGF0YVtyb3ddO1xuICAgICAgICAgICAgICAgIHNjcmVlblJvd3MgKz0gc3BsaXRzID8gc3BsaXRzLmxlbmd0aCArIDEgOiAxO1xuICAgICAgICAgICAgICAgIHJvdyArKztcbiAgICAgICAgICAgICAgICBpZiAocm93ID4gZm9sZFN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdyA9IGZvbGQuZW5kLnJvdysxO1xuICAgICAgICAgICAgICAgICAgICBmb2xkID0gdGhpcy4kZm9sZERhdGFbaSsrXTtcbiAgICAgICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZCA/Zm9sZC5zdGFydC5yb3cgOkluZmluaXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5saW5lV2lkZ2V0cylcbiAgICAgICAgICAgIHNjcmVlblJvd3Mg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F4U2NyZWVuQ29sdW1uKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIFtzY3JlZW5Db2x1bW4sIGNvbHVtbl07XG4gICAgICAgIH07XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmRlc3Ryb3kgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuYmdUb2tlbml6ZXIpIHtcbiAgICAgICAgICAgIHRoaXMuYmdUb2tlbml6ZXIuc2V0RG9jdW1lbnQobnVsbCk7XG4gICAgICAgICAgICB0aGlzLmJnVG9rZW5pemVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLiRzdG9wV29ya2VyKCk7XG4gICAgfTtcblxuICAgIHRoaXMuaXNGdWxsV2lkdGggPSBpc0Z1bGxXaWR0aDtcbiAgICBmdW5jdGlvbiBpc0Z1bGxXaWR0aChjKSB7XG4gICAgICAgIGlmIChjIDwgMHgxMTAwKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICByZXR1cm4gYyA+PSAweDExMDAgJiYgYyA8PSAweDExNUYgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgxMUEzICYmIGMgPD0gMHgxMUE3IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MTFGQSAmJiBjIDw9IDB4MTFGRiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDIzMjkgJiYgYyA8PSAweDIzMkEgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgyRTgwICYmIGMgPD0gMHgyRTk5IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MkU5QiAmJiBjIDw9IDB4MkVGMyB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDJGMDAgJiYgYyA8PSAweDJGRDUgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgyRkYwICYmIGMgPD0gMHgyRkZCIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzAwMCAmJiBjIDw9IDB4MzAzRSB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMwNDEgJiYgYyA8PSAweDMwOTYgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMDk5ICYmIGMgPD0gMHgzMEZGIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzEwNSAmJiBjIDw9IDB4MzEyRCB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMxMzEgJiYgYyA8PSAweDMxOEUgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMTkwICYmIGMgPD0gMHgzMUJBIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzFDMCAmJiBjIDw9IDB4MzFFMyB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMxRjAgJiYgYyA8PSAweDMyMUUgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMjIwICYmIGMgPD0gMHgzMjQ3IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzI1MCAmJiBjIDw9IDB4MzJGRSB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMzMDAgJiYgYyA8PSAweDREQkYgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHg0RTAwICYmIGMgPD0gMHhBNDhDIHx8XG4gICAgICAgICAgICAgICBjID49IDB4QTQ5MCAmJiBjIDw9IDB4QTRDNiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweEE5NjAgJiYgYyA8PSAweEE5N0MgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHhBQzAwICYmIGMgPD0gMHhEN0EzIHx8XG4gICAgICAgICAgICAgICBjID49IDB4RDdCMCAmJiBjIDw9IDB4RDdDNiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweEQ3Q0IgJiYgYyA8PSAweEQ3RkIgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHhGOTAwICYmIGMgPD0gMHhGQUZGIHx8XG4gICAgICAgICAgICAgICBjID49ID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3RyaW5nXCIpXG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJzZUludCh2YWx1ZSwgMTApIHx8IGZhbHNlO1xuXG4gICAgICAgICAgICBpZiAodGhpcy4kd3JhcCA9PSB2YWx1ZSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB0aGlzLiR3cmFwID0gdmFsdWU7XG4gICAgICAgICAgICBpZiAoIXZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRVc2VXcmFwTW9kZShmYWxzZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBjb2wgPSB0eXBlb2YgdmFsdWUgPT0gXCJudW1iZXJcIiA/IHZhbHVlIDogbnVsbDtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFdyYXBMaW1pdFJhbmdlKGNvbCwgY29sKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFVzZVdyYXBNb2RlKHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuZ2V0VXNlV3JhcE1vZGUoKSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLiR3cmFwID09IC0xKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJwcmludE1hcmdpblwiO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5nZXRXcmFwTGltaXRSYW5nZSgpLm1pbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiZnJlZVwiO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiR3cmFwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFwib2ZmXCI7XG4gICAgICAgIH0sXG4gICAgICAgIGhhbmRsZXNTZXQ6IHRydWVcbiAgICB9LCAgICBcbiAgICB3cmFwTWV0aG9kOiB7XG4gICAgICAgIHNldDogZnVuY3Rpb24odmFsKSB7XG4gICAgICAgICAgICB2YWwgPSB2YWwgPT0gXCJhdXRvXCJcbiAgICAgICAgICAgICAgICA/IHRoaXMuJG1vZGUudHlwZSAhPSBcInRleHRcIlxuICAgICAgICAgICAgICAgIDogdmFsICE9IFwidGV4dFwiO1xuICAgICAgICAgICAgaWYgKHZhbCAhPSB0aGlzLiR3cmFwQXNDb2RlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kd3JhcEFzQ29kZSA9IHZhbDtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy4kdXNlV3JhcE1vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kbW9kaWZpZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLiRyZXNldFJvd0NhY2hlKDApO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLiR1cGRhdGVXcmFwRGF0YSgwLCB0aGlzLmdldExlbmd0aCgpIC0gMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpbml0aWFsVmFsdWU6IFwiYXV0b1wiXG4gICAgfSxcbiAgICBpbmRlbnRlZFNvZnRXcmFwOiB7IGluaXRpYWxWYWx1ZTogdHJ1ZSB9LFxuICAgIGZpcnN0TGluZU51bWJlcjoge1xuICAgICAgICBzZXQ6IGZ1bmN0aW9uKCkge3RoaXMuX3NpZ25hbChcImNoYW5nZUJyZWFrcG9pbnRcIik7fSxcbiAgICAgICAgaW5pdGlhbFZhbHVlOiAxXG4gICAgfSxcbiAgICB1c2VXb3JrZXI6IHtcbiAgICAgICAgc2V0OiBmdW5jdGlvbih1c2VXb3JrZXIpIHtcbiAgICAgICAgICAgIHRoaXMuJHVzZVdvcmtlciA9IHVzZVdvcmtlcjtcblxuICAgICAgICAgICAgdGhpcy4kc3RvcFdvcmtlcigpO1xuICAgICAgICAgICAgaWYgKHVzZVdvcmtlcilcbiAgICAgICAgICAgICAgICB0aGlzLiRzdGFydFdvcmtlcigp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Npb24pIHtcbiAgICAgICAgdmFyIG9wdGlvbnMgPSB0aGlzLiRvcHRpb25zO1xuICAgICAgICB2YXIgaXRlcmF0b3IgPSB0aGlzLiRtYXRjaEl0ZXJhdG9yKHNlc3Npb24sIG9wdGlvbnMpO1xuICAgICAgICBpZiAoIWl0ZXJhdG9yKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuXG4gICAgICAgIHZhciBmaXJzdFJhbmdlID0gbnVsbDtcbiAgICAgICAgaXRlcmF0b3IuZm9yRWFjaChmdW5jdGlvbihzciwgc2MsIGVyLCBlYykge1xuICAgICAgICAgICAgZmlyc3RSYW5nZSA9IG5ldyBSYW5nZShzciwgc2MsIGVyLCBlYyk7XG4gICAgICAgICAgICBpZiAoc2MgPT0gZWMgJiYgb3B0aW9ucy5zdGFydCAmJiBvcHRpb25zLnN0YXJ0LnN0YXJ0XG4gICAgICAgICAgICAgICAgJiYgb3B0aW9ucy5za2lwQ3VycmVudCAhPSBmYWxzZSAmJiBmaXJzdFJhbmdlLmlzRXF1YWwob3B0aW9ucy5zdGFydClcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGZpcnN0UmFuZ2UgPSBudWxsO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBmaXJzdFJhbmdlO1xuICAgIH07XG4gICAgdGhpcy5maW5kQWxsID0gZnVuY3Rpb24oc2Vzc2lvbikge1xuICAgICAgICB2YXIgb3B0aW9ucyA9IHRoaXMuJG9wdGlvbnM7XG4gICAgICAgIGlmICghb3B0aW9ucy5uZWVkbGUpXG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIHRoaXMuJGFzc2VtYmxlUmVnRXhwKG9wdGlvbnMpO1xuXG4gICAgICAgIHZhciByYW5nZSA9IG9wdGlvbnMucmFuZ2U7XG4gICAgICAgIHZhciBsaW5lcyA9IHJhbmdlXG4gICAgICAgICAgICA/IHNlc3Npb24uZ2V0TGluZXMocmFuZ2Uuc3RhcnQucm93LCByYW5nZS5lbmQucm93KVxuICAgICAgICAgICAgOiBzZXNzaW9uLmRvYy5nZXRBbGxMaW5lcygpO1xuXG4gICAgICAgIHZhciByYW5nZXMgPSBbXTtcbiAgICAgICAgdmFyIHJlID0gb3B0aW9ucy5yZTtcbiAgICAgICAgaWYgKG9wdGlvbnMuJGlzTXVsdGlMaW5lKSB7XG4gICAgICAgICAgICB2YXIgbGVuID0gcmUubGVuZ3RoO1xuICAgICAgICAgICAgdmFyIG1heFJvdyA9IGxpbmVzLmxlbmd0aCAtIGxlbjtcbiAgICAgICAgICAgIHZhciBwcmV2UmFuZ2U7XG4gICAgICAgICAgICBvdXRlcjogZm9yICh2YXIgcm93ID0gcmUub2Zmc2V0IHx8IDA7IHJvdyA8PSBtYXhSb3c7IHJvdysrKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBsZW47IGorKylcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmVzW3JvdyArIGpdLnNlYXJjaChyZVtqXSkgPT0gLTEpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnRMaW5lID0gbGluZXNbcm93XTtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IGxpbmVzW3JvdyArIGxlbiAtIDFdO1xuICAgICAgICAgICAgICAgIHZhciBzdGFydEluZGV4ID0gc3RhcnRMaW5lLmxlbmd0aCAtIHN0YXJ0TGluZS5tYXRjaChyZVswXSlbMF0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHZhciBlbmRJbmRleCA9IGxpbmUubWF0Y2gocmVbbGVuIC0gMV0pWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAocHJldlJhbmdlICYmIHByZXZSYW5nZS5lbmQucm93ID09PSByb3cgJiZcbiAgICAgICAgICAgICAgICAgICAgcHJldlJhbmdlLmVuZC5jb2x1bW4gPiBzdGFydEluZGV4XG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByYW5nZXMucHVzaChwcmV2UmFuZ2UgPSBuZXcgUmFuZ2UoXG4gICAgICAgICAgICAgICAgICAgIHJvdywgc3RhcnRJbmRleCwgcm93ICsgbGVuIC0gMSwgZW5kSW5kZXhcbiAgICAgICAgICAgICAgICApKTtcbiAgICAgICAgICAgICAgICBpZiAobGVuID4gMilcbiAgICAgICAgICAgICAgICAgICAgcm93ID0gcm93ICsgbGVuIC0gMjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGluZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgbWF0Y2hlcyA9IGxhbmcuZ2V0TWF0Y2hPZmZzZXRzKGxpbmVzW2ldLCByZSk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBtYXRjaGVzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IG1hdGNoZXNbal07XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlcy5wdXNoKG5ldyBSYW5nZShpLCBtYXRjaC5vZmZzZXQsIGksIG1hdGNoLm9mZnNldCArIG1hdGNoLmxlbmd0aCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyYW5nZSkge1xuICAgICAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gcmFuZ2Uuc3RhcnQuY29sdW1uO1xuICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IHJhbmdlLnN0YXJ0LmNvbHVtbjtcbiAgICAgICAgICAgIHZhciBpID0gMCwgaiA9IHJhbmdlcy5sZW5ndGggLSAxO1xuICAgICAgICAgICAgd2hpbGUgKGkgPCBqICYmIHJhbmdlc1tpXS5zdGFydC5jb2x1bW4gPCBzdGFydENvbHVtbiAmJiByYW5nZXNbaV0uc3RhcnQucm93ID09IHJhbmdlLnN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICBpKys7XG5cbiAgICAgICAgICAgIHdoaWxlIChpIDwgaiAmJiByYW5nZXNbal0uZW5kLmNvbHVtbiA+IGVuZENvbHVtbiAmJiByYW5nZXNbal0uZW5kLnJvdyA9PSByYW5nZS5lbmQucm93KVxuICAgICAgICAgICAgICAgIGotLTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmFuZ2VzID0gcmFuZ2VzLnNsaWNlKGksIGogKyAxKTtcbiAgICAgICAgICAgIGZvciAoaSA9IDAsIGogPSByYW5nZXMubGVuZ3RoOyBpIDwgajsgaSsrKSB7XG4gICAgICAgICAgICAgICAgcmFuZ2VzW2ldLnN0YXJ0LnJvdyArPSByYW5nZS5zdGFydC5yb3c7XG4gICAgICAgICAgICAgICAgcmFuZ2VzW2ldLmVuZC5yb3cgKz0gcmFuZ2Uuc3RhcnQucm93O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHJhbmdlcztcbiAgICB9O1xuICAgIHRoaXMucmVwbGFjZSA9IGZ1bmN0aW9uKGlucHV0LCByZXBsYWNlbWVudCkge1xuICAgICAgICB2YXIgb3B0aW9ucyA9IHRoaXMuJG9wdGlvbnM7XG5cbiAgICAgICAgdmFyIHJlID0gdGhpcy4kYXNzZW1ibGVSZWdFeHAob3B0aW9ucyk7XG4gICAgICAgIGlmIChvcHRpb25zLiRpc011bHRpTGluZSlcbiAgICAgICAgICAgIHJldHVybiByZXBsYWNlbWVudDtcblxuICAgICAgICBpZiAoIXJlKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBtYXRjaCA9IHJlLmV4ZWMoaW5wdXQpO1xuICAgICAgICBpZiAoIW1hdGNoIHx8IG1hdGNoWzBdLmxlbmd0aCAhPSBpbnB1dC5sZW5ndGgpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgXG4gICAgICAgIHJlcGxhY2VtZW50ID0gaW5wdXQucmVwbGFjZShyZSwgcmVwbGFjZW1lbnQpO1xuICAgICAgICBpZiAob3B0aW9ucy5wcmVzZXJ2ZUNhc2UpIHtcbiAgICAgICAgICAgIHJlcGxhY2VtZW50ID0gcmVwbGFjZW1lbnQuc3BsaXQoXCJcIik7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gTWF0aC5taW4oaW5wdXQubGVuZ3RoLCBpbnB1dC5sZW5ndGgpOyBpLS07ICkge1xuICAgICAgICAgICAgICAgIHZhciBjaCA9IGlucHV0W2ldO1xuICAgICAgICAgICAgICAgIGlmIChjaCAmJiBjaC50b0xvd2VyQ2FzZSgpICE9IGNoKVxuICAgICAgICAgICAgICAgICAgICByZXBsYWNlbWVudFtpXSA9IHJlcGxhY2VtZW50W2ldLnRvVXBwZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICByZXBsYWNlbWVudFtpXSA9IHJlcGxhY2VtZW50W2ldLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXBsYWNlbWVudCA9IHJlcGxhY2VtZW50LmpvaW4oXCJcIik7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHJldHVybiByZXBsYWNlbWVudDtcbiAgICB9O1xuXG4gICAgdGhpcy4kYXNzZW1ibGVSZWdFeHAgPSBmdW5jdGlvbihvcHRpb25zLCAkZGlzYWJsZUZha2VNdWx0aWxpbmUpIHtcbiAgICAgICAgaWYgKG9wdGlvbnMubmVlZGxlIGluc3Rhbm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XJ0W3NraXBDdXJyZW50ICE9IGJhY2t3YXJkcyA/IFwiZW5kXCIgOiBcInN0YXJ0XCJdO1xuXG4gICAgICAgIHZhciBmaXJzdFJvdyA9IHJhbmdlID8gcmFuZ2Uuc3RhcnQucm93IDogMDtcbiAgICAgICAgdmFyIGxhc3RSb3cgPSByYW5nZSA/IHJhbmdlLmVuZC5yb3cgOiBzZXNzaW9uLmdldExlbmd0aCgpIC0gMTtcblxuICAgICAgICBpZiAoYmFja3dhcmRzKSB7XG4gICAgICAgICAgICB2YXIgZm9yRWFjaCA9IGZ1bmN0aW9uKGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJvdyA9IHN0YXJ0LnJvdztcbiAgICAgICAgICAgICAgICBpZiAoZm9yRWFjaEluTGluZShyb3csIHN0YXJ0LmNvbHVtbiwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgZm9yIChyb3ctLTsgcm93ID49IGZpcnN0Um93OyByb3ctLSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvckVhY2hJbkxpbmUocm93LCBOdW1iZXIuTUFYX1ZBTFVFLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMud3JhcCA9PSBmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGZvciAocm93ID0gbGFzdFJvdywgZmlyc3RSb3cgPSBzdGFydC5yb3c7IHJvdyA+PSBmaXJzdFJvdzsgcm93LS0pXG4gICAgICAgICAgICAgICAgICAgIGlmIChmb3JFYWNoSW5MaW5lKHJvdywgTnVtYmVyLk1BWF9WQUxVRSwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHZhciBmb3JFYWNoID0gZnVuY3Rpb24oY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICB2YXIgcm93ID0gc3RhcnQucm93O1xuICAgICAgICAgICAgICAgIGlmIChmb3JFYWNoSW5MaW5lKHJvdywgc3RhcnQuY29sdW1uLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBmb3IgKHJvdyA9IHJvdyArIDE7IHJvdyA8PSBsYXN0Um93OyByb3crKylcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvckVhY2hJbkxpbmUocm93LCAwLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMud3JhcCA9PSBmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGZvciAocm93ID0gZmlyc3RSb3csIGxhc3RSb3cgPSBzdGFydC5yb3c7IHJvdyA8PSBsYXN0Um93OyByb3crKylcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvckVhY2hJbkxpbmUocm93LCAwLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBpZiAob3B0aW9ucy4kaXNNdWx0aUxpbmUpIHtcbiAgICAgICAgICAgIHZhciBsZW4gPSByZS5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgZm9yRWFjaEluTGluZSA9IGZ1bmN0aW9uKHJvdywgb2Zmc2V0LCBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHZhciBzdGFydFJvdyA9IGJhY2t3YXJkcyA/IHJvdyAtIGxlbiArIDEgOiByb3c7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXJ0Um93IDwgMCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHN0YXJ0Um93KTtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnRJbmRleCA9IGxpbmUuc2VhcmNoKHJlWzBdKTtcbiAgICAgICAgICAgICAgICBpZiAoIWJhY2t3YXJkcyAmJiBzdGFydEluZGV4IDwgb2Zmc2V0IHx8IHN0YXJ0SW5kZXggPT09IC0xKSByZXR1cm47XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBsZW47IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHN0YXJ0Um93ICsgaSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsaW5lLnNlYXJjaChyZVtpXSkgPT0gLTEpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBlbmRJbmRleCA9IGxpbmUubWF0Y2gocmVbbGVuIC0gMV0pWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZiAoYmFja3dhcmRzICYmIGVuZEluZGV4ID4gb2Zmc2V0KSByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrKHN0YXJ0Um93LCBzdGFydEluZGV4LCBzdGFydFJvdyArIGxlbiAtIDEsIGVuZEluZGV4KSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGJhY2t3YXJkcykge1xuICAgICAgICAgICAgdmFyIGZvckVhY2hJbkxpbmUgPSBmdW5jdGlvbihyb3csIGVuZEluZGV4LCBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoZXMgPSBbXTtcbiAgICAgICAgICAgICAgICB2YXIgbSwgbGFzdCA9IDA7XG4gICAgICAgICAgICAgICAgcmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSgobSA9IHJlLmV4ZWMobGluZSkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBtWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgbGFzdCA9IG0uaW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdCA+PSBsaW5lLmxlbmd0aCkgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICByZS5sYXN0SW5kZXggPSBsYXN0ICs9IDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG0uaW5kZXggKyBsZW5ndGggPiBlbmRJbmRleClcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBtYXRjaGVzLnB1c2gobS5pbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IG1hdGNoZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpIC09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbHVtbiA9IG1hdGNoZXNbaSAtIDFdO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gbWF0Y2hlc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrKHJvdywgY29sdW1uLCByb3csIGNvbHVtbiArIGxlbmd0aCkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdmFyIGZvckVhY2hJbkxpbmUgPSBmdW5jdGlvbihyb3csIHN0YXJ0SW5kZXgsIGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgICAgICB2YXIgbTtcbiAgICAgICAgICAgICAgICB2YXIgbGFzdCA9IHN0YXJ0SW5kZXg7XG4gICAgICAgICAgICAgICAgcmUubGFzdEluZGV4ID0gc3RhcnRJbmRleDtcbiAgICAgICAgICAgICAgICB3aGlsZSgobSA9IHJlLmV4ZWMobGluZSkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBtWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgbGFzdCA9IG0uaW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjayhyb3csIGxhc3QsIHJvdyxsYXN0ICsgbGVuZ3RoKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmUubGFzdEluZGV4ID0gbGFzdCArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhc3QgPj0gbGluZS5sZW5ndGgpIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtmb3JFYWNoOiBmb3JFYWNofTtcbiAgICB9O1xuXG59KS5jYWxsKFNlYXJjaC5wcm90b3R5cGUpO1xuXG5mdW5jdGlvbiBhZGRXb3JkQm91bmRhcnkobmVlZGxlLCBvcHRpb25zKSB7XG4gICAgZnVuY3Rpb24gd29yZEJvdW5kYXJ5KGMpIHtcbiAgICAgICAgaWYgKC9cXHcvLnRlc3QoYykgfHwgb3B0aW9ucy5yZWdFeHApIHJldHVybiBcIlxcXFxiXCI7XG4gICAgICAgIHJldHVybiBc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cm91cCkpIHtcbiAgICAgICAgICAgICAgICB2YXIgaSA9IGNtZEdyb3VwLmluZGV4T2YoY29tbWFuZCk7XG4gICAgICAgICAgICAgICAgaWYgKGkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgY21kR3JvdXAuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY21kR3JvdXAubGVuZ3RoID09IDEpXG4gICAgICAgICAgICAgICAgICAgICAgICBja2Jba2V5SWRdID0gY21kR3JvdXBbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuYmluZEtleSA9IGZ1bmN0aW9uKGtleSwgY29tbWFuZCwgcG9zaXRpb24pIHtcbiAgICAgICAgaWYgKHR5cGVvZiBrZXkgPT0gXCJvYmplY3RcIiAmJiBrZXkpIHtcbiAgICAgICAgICAgIGlmIChwb3NpdGlvbiA9PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgcG9zaXRpb24gPSBrZXkucG9zaXRpb247XG4gICAgICAgICAgICBrZXkgPSBrZXlbdGhpcy5wbGF0Zm9ybV07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFrZXkpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGlmICh0eXBlb2YgY29tbWFuZCA9PSBcImZ1bmN0aW9uXCIpXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hZGRDb21tYW5kKHtleGVjOiBjb21tYW5kLCBiaW5kS2V5OiBrZXksIG5hbWU6IGNvbW1hbmQubmFtZSB8fCBrZXl9KTtcbiAgICAgICAgXG4gICAgICAgIGtleS5zcGxpdChcInxcIikuZm9yRWFjaChmdW5jdGlvbihrZXlQYXJ0KSB7XG4gICAgICAgICAgICB2YXIgY2hhaW4gPSBcIlwiO1xuICAgICAgICAgICAgaWYgKGtleVBhcnQuaW5kZXhPZihcIiBcIikgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFydHMgPSBrZXlQYXJ0LnNwbGl0KC9cXHMrLyk7XG4gICAgICAgICAgICAgICAga2V5UGFydCA9IHBhcnRzLnBvcCgpO1xuICAgICAgICAgICAgICAgIHBhcnRzLmZvckVhY2goZnVuY3Rpb24oa2V5UGFydCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYmluZGluZyA9IHRoaXMucGFyc2VLZXlzKGtleVBhcnQpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaWQgPSBLRVlfTU9EU1tiaW5kaW5nLmhhc2hJZF0gKyBiaW5kaW5nLmtleTtcbiAgICAgICAgICAgICAgICAgICAgY2hhaW4gKz0gKGNoYWluID8gXCIgXCIgOiBcIlwiKSArIGlkO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9hZGRDb21tYW5kVG9CaW5kaW5nKGNoYWluLCBcImNoYWluS2V5c1wiKTtcbiAgICAgICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgICAgICAgICBjaGFpbiArPSBcIiBcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBiaW5kaW5nID0gdGhpcy5wYXJzZUtleXMoa2V5UGFydCk7XG4gICAgICAgICAgICB2YXIgaWQgPSBLRVlfTU9EU1tiaW5kaW5nLmhhc2hJZF0gKyBiaW5kaW5nLmtleTtcbiAgICAgICAgICAgIHRoaXMuX2FkZENvbW1hbmRUb0JpbmRpbmcoY2hhaW4gKyBpZCwgY29tbWFuZCwgcG9zaXRpb24pO1xuICAgICAgICB9LCB0aGlzKTtcbiAgICB9O1xuICAgIFxuICAgIGZ1bmN0aW9uIGdldFBvc2l0aW9uKGNvbW1hbmQpIHtcbiAgICAgICAgcmV0dXJuIHR5cGVvZiBjb21tYW5kID09IFwib2JqZWN0XCIgJiYgY29tbWFuZC5iaW5kS2V5XG4gICAgICAgICAgICAmJiBjb21tYW5kLmJpbmRLZXkucG9zaXRpb25cbiAgICAgICAgICAgIHx8IChjb21tYW5kLmlzRGVmYXVsdCA/IC0xMDAgOiAwKTtcbiAgICB9XG4gICAgdGhpcy5fYWRkQ29tbWFuZFRvQmluZGluZyA9IGZ1bmN0aW9uKGtleUlkLCBjb21tYW5kLCBwb3NpdGlvbikge1xuICAgICAgICB2YXIgY2tiID0gdGhpcy5jb21tYW5kS2V5QmluZGluZywgaTtcbiAgICAgICAgaWYgKCFjb21tYW5kKSB7XG4gICAgICAgICAgICBkZWxldGUgY2tiW2tleUlkXTtcbiAgICAgICAgfSBlbHNlIGlmICghY2tiW2tleUlkXSB8fCB0aGlzLiRzaW5nbGVDb21tYW5kKSB7XG4gICAgICAgICAgICBja2Jba2V5SWRdID0gY29tbWFuZDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShja2Jba2V5SWRdKSkge1xuICAgICAgICAgICAgICAgIGNrYltrZXlJZF0gPSBbY2tiW2tleUlkXV07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKChpID0gY2tiW2tleUlkXS5pbmRleE9mKGNvbW1hbmQpKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgIGNrYltrZXlJZF0uc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHBvc2l0aW9uICE9IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IGdldFBvc2l0aW9uKGNvbW1hbmQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgY29tbWFuZHMgPSBja2Jba2V5SWRdO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvbW1hbmRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIG90aGVyID0gY29tbWFuZHNbaV07XG4gICAgICAgICAgICAgICAgdmFyIG90aGVyUG9zID0gZ2V0UG9zaXRpb24ob3RoZXIpO1xuICAgICAgICAgICAgICAgIGlmIChvdGhlclBvcyA+IHBvc2l0aW9uKVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbW1hbmRzLnNwbGljZShpLCAwLCBjb21tYW5kKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLmFkZENvbW1hbmRzID0gZnVuY3Rpb24oY29tbWFuZHMpIHtcbiAgICAgICAgY29tbWFuZHMgJiYgT2JqZWN0LmtleXMoY29tbWFuZHMpLmZvckVhY2goZnVuY3Rpb24obmFtZSkge1xuICAgICAgICAgICAgdmFyIGNvbW1hbmQgPSBjb21tYW5kc1tuYW1lXTtcbiAgICAgICAgICAgIGlmICghY29tbWFuZClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29tbWFuZCA9PT0gXCJzdHJpbmdcIilcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5iaW5kS2V5KGNvbW1hbmQsIG5hbWUpO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIGNvbW1hbmQgPT09IFwiZnVuY3Rpb25cIilcbiAgICAgICAgICAgICAgICBjb21tYW5kID0geyBleGVjOiBjb21tYW5kIH07XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29tbWFuZCAhPT0gXCJvYmplY3RcIilcbiAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgIGlmICghY29tbWFuZC5uYW1lKVxuICAgICAgICAgICAgICAgIGNvbW1hbmQubmFtZSA9IG5hbWU7XG5cbiAgICAgICAgICAgIHRoaXMuYWRkQ29tbWFuZChjb21tYW5kKTtcbiAgICAgICAgfSwgdGhpcyk7XG4gICAgfTtcblxuICAgIHRoaXMucmVtb3ZlQ29tbWFuZHMgPSBmdW5jdGlvbihjb21tYW5kcykge1xuICAgICAgICBPYmplY3Qua2V5cyhjb21tYW5kcykuZm9yRWFjaChmdW5jdGlvbihuYW1lKSB7XG4gICAgICAgICAgICB0aGlz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SgpLCBoYXNoSWQ6IC0xfTtcblxuICAgICAgICB2YXIgaGFzaElkID0gMDtcbiAgICAgICAgZm9yICh2YXIgaSA9IHBhcnRzLmxlbmd0aDsgaS0tOykge1xuICAgICAgICAgICAgdmFyIG1vZGlmaWVyID0ga2V5VXRpbC5LRVlfTU9EU1twYXJ0c1tpXV07XG4gICAgICAgICAgICBpZiAobW9kaWZpZXIgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgY29uc29sZSAhPSBcInVuZGVmaW5lZFwiKVxuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiaW52YWxpZCBtb2RpZmllciBcIiArIHBhcnRzW2ldICsgXCIgaW4gXCIgKyBrZXlzKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBoYXNoSWQgfD0gbW9kaWZpZXI7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHtrZXk6IGtleSwgaGFzaElkOiBoYXNoSWR9O1xuICAgIH07XG5cbiAgICB0aGlzLmZpbmRLZXlDb21tYW5kID0gZnVuY3Rpb24gZmluZEtleUNvbW1hbmQoaGFzaElkLCBrZXlTdHJpbmcpIHtcbiAgICAgICAgdmFyIGtleSA9IEtFWV9NT0RTW2hhc2hJZF0gKyBrZXlTdHJpbmc7XG4gICAgICAgIHJldHVybiB0aGlzLmNvbW1hbmRLZXlCaW5kaW5nW2tleV07XG4gICAgfTtcblxuICAgIHRoaXMuaGFuZGxlS2V5Ym9hcmQgPSBmdW5jdGlvbihkYXRhLCBoYXNoSWQsIGtleVN0cmluZywga2V5Q29kZSkge1xuICAgICAgICBpZiAoa2V5Q29kZSA8IDApIHJldHVybjtcbiAgICAgICAgdmFyIGtleSA9IEtFWV9NT0RTW2hhc2hJZF0gKyBrZXlTdHJpbmc7XG4gICAgICAgIHZhciBjb21tYW5kID0gdGhpcy5jb21tYW5kS2V5QmluZGluZ1trZXldO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Fjcm8pO1xuICAgICAgICByZXR1cm4gdGhpcy5yZWNvcmRpbmcgPSB0cnVlO1xuICAgIH07XG5cbiAgICB0aGlzLnJlcGxheSA9IGZ1bmN0aW9uKGVkaXRvcikge1xuICAgICAgICBpZiAodGhpcy4kaW5SZXBsYXkgfHwgIXRoaXMubWFjcm8pXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgaWYgKHRoaXMucmVjb3JkaW5nKVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMudG9nZ2xlUmVjb3JkaW5nKGVkaXRvcik7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRoaXMuJGluUmVwbGF5ID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMubWFjcm8uZm9yRWFjaChmdW5jdGlvbih4KSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB4ID09IFwic3RyaW5nXCIpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXhlYyh4LCBlZGl0b3IpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5leGVjKHhbMF0sIGVkaXRvciwgeFsxXSk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgIHRoaXMuJGluUmVwbGF5ID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy50cmltTWFjcm8gPSBmdW5jdGlvbihtKSB7XG4gICAgICAgIHJldHVybiBtLm1hcChmdW5jdGlvbih4KXtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgeFswXSAhPSBcInN0cmluZ1wiKVxuICAgICAgICAgICAgICAgIHhbMF0gPSB4WzBdLm5hbWU7XG4gICAgICAgICAgICBpZiAoIXhbMV0pXG4gICAgICAgICAgICAgICAgeCA9IHhbMF07XG4gICAgICAgICAgICByZXR1cm4geDtcbiAgICAgICAgfSk7XG4gICAgfTtcblxufSkuY2Fs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ClcbiAgICAgICAgICAgIHRoaXMuJGJsb2NrU2Nyb2xsaW5nKys7XG4gICAgfTtcblxuICAgIHRoaXMuZW5kT3BlcmF0aW9uID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBpZiAodGhpcy5jdXJPcCkge1xuICAgICAgICAgICAgaWYgKGUgJiYgZS5yZXR1cm5WYWx1ZSA9PT0gZmFsc2UpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3VyT3AgPSBudWxsO1xuICAgICAgICAgICAgdGhpcy5fc2lnbmFsKFwiYmVmb3JlRW5kT3BlcmF0aW9uXCIpO1xuICAgICAgICAgICAgdmFyIGNvbW1hbmQgPSB0aGlzLmN1ck9wLmNvbW1hbmQ7XG4gICAgICAgICAgICBpZiAoY29tbWFuZC5uYW1lICYmIHRoaXMuJGJsb2NrU2Nyb2xsaW5nID4gMClcbiAgICAgICAgICAgICAgICB0aGlzLiRibG9ja1Njcm9sbGluZy0tO1xuICAgICAgICAgICAgdmFyIHNjcm9sbEludG9WaWV3ID0gY29tbWFuZCAmJiBjb21tYW5kLnNjcm9sbEludG9WaWV3O1xuICAgICAgICAgICAgaWYgKHNjcm9sbEludG9WaWV3KSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChzY3JvbGxJbnRvVmlldykge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwiY2VudGVyLWFuaW1hdGVcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjcm9sbEludG9WaWV3ID0gXCJhbmltYXRlXCI7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXCJjZW50ZXJcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2Nyb2xsQ3Vyc29ySW50b1ZpZXcobnVsbCwgMC41KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwiYW5pbWF0ZVwiOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwiY3Vyc29yXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNjcm9sbEN1cnNvckludG9WaWV3KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcInNlbGVjdGlvblBhcnRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMuc2VsZWN0aW9uLmdldFJhbmdlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0gdGhpcy5yZW5kZXJlci5sYXllckNvbmZpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZS5zdGFydC5yb3cgPj0gY29uZmlnLmxhc3RSb3cgfHwgcmFuZ2UuZW5kLnJvdyA8PSBjb25maWcuZmlyc3RSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNjcm9sbFNlbGVjdGlvbkludG9WaWV3KHRoaXMuc2VsZWN0aW9uLmFuY2hvciwgdGhpcy5zZWxlY3Rpb24ubGVhZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2Nyb2xsSW50b1ZpZXcgPT0gXCJhbmltYXRlXCIpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuYW5pbWF0ZVNjcm9sbGluZyh0aGlzLmN1ck9wLnNjcm9sbFRvcCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHRoaXMucHJldk9wID0gdGhpcy5jdXJPcDtcbiAgICAgICAgICAgIHRoaXMuY3VyT3AgPSBudWxsO1xuICAgICAgICB9XG4gICAg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ZXR1cm47XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBwb3MgPSBzZWxmLmdldEN1cnNvclBvc2l0aW9uKCk7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZWxmLnNlc3Npb24sIHBvcy5yb3csIHBvcy5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICghdG9rZW4gfHwgIS9cXGIoPzp0YWctb3Blbnx0YWctbmFtZSkvLnRlc3QodG9rZW4udHlwZSkpIHtcbiAgICAgICAgICAgICAgICBzZXNzaW9uLnJlbW92ZU1hcmtlcihzZXNzaW9uLiR0YWdIaWdobGlnaHQpO1xuICAgICAgICAgICAgICAgIHNlc3Npb24uJHRhZ0hpZ2hsaWdodCA9IG51bGw7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAodG9rZW4udHlwZS5pbmRleE9mKFwidGFnLW9wZW5cIikgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBGb3J3YXJkKCk7XG4gICAgICAgICAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgdGFnID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICB2YXIgZGVwdGggPSAwO1xuICAgICAgICAgICAgdmFyIHByZXZUb2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocHJldlRva2VuLnZhbHVlID09ICc8Jyl7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBwcmV2VG9rZW4gPSB0b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnZhbHVlID09PSB0YWcgJiYgdG9rZW4udHlwZS5pbmRleE9mKCd0YWctbmFtZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8Lycpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoLS07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgZGVwdGggPj0gMCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBwcmV2VG9rZW47XG4gICAgICAgICAgICAgICAgICAgIHByZXZUb2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnZhbHVlID09PSB0YWcgJiYgdG9rZW4udHlwZS5pbmRleE9mKCd0YWctbmFtZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVwdGgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHJldlRva2VuLnZhbHVlID09PSAnPC8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVwdGgtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHByZXZUb2tlbiAmJiBkZXB0aCA8PSAwKTtcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoIXRva2VuKSB7XG4gICAgICAgICAgICAgICAgc2Vzc2lvbi5yZW1vdmVNYXJrZXIoc2Vzc2lvbi4kdGFnSGlnaGxpZ2h0KTtcbiAgICAgICAgICAgICAgICBzZXNzaW9uLiR0YWdIaWdobGlnaHQgPSBudWxsO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgdmFyIGNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpO1xuICAgICAgICAgICAgdmFyIHJhbmdlID0gbmV3IFJhbmdlKHJvdywgY29sdW1uLCByb3csIGNvbHVtbit0b2tlbi52YWx1ZS5sZW5ndGgpO1xuICAgICAgICAgICAgdmFyIHNibSA9IHNlc3Npb24uJGJhY2tNYXJrZXJzW3Nlc3Npb24uJHRhZ0hpZ2hsaWdodF07XG4gICAgICAgICAgICBpZiAoc2Vzc2lvbi4kdGFnSGlnaGxpZ2h0ICYmIHNibSAhPSB1bmRlZmluZWQgJiYgcmFuZ2UuY29tcGFyZVJhbmdlKHNibS5yYW5nZSkgIT09IDApIHtcbiAgICAgICAgICAgICAgICBzZXNzaW9uLnJlbW92ZU1hcmtlcihzZXNzaW9uLiR0YWdIaWdobGlna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WJlclJ4Lmxhc3RJbmRleCA8IGNvbHVtbikge1xuICAgICAgICAgICAgdmFyIG0gPSBfbnVtYmVyUnguZXhlYyhzKTtcbiAgICAgICAgICAgIGlmKG0uaW5kZXggPD0gY29sdW1uICYmIG0uaW5kZXgrbVswXS5sZW5ndGggPj0gY29sdW1uKXtcbiAgICAgICAgICAgICAgICB2YXIgbnVtYmVyID0ge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogbVswXSxcbiAgICAgICAgICAgICAgICAgICAgc3RhcnQ6IG0uaW5kZXgsXG4gICAgICAgICAgICAgICAgICAgIGVuZDogbS5pbmRleCttWzBdLmxlbmd0aFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bWJlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xuICAgIHRoaXMubW9kaWZ5TnVtYmVyID0gZnVuY3Rpb24oYW1vdW50KSB7XG4gICAgICAgIHZhciByb3cgPSB0aGlzLnNlbGVjdGlvbi5nZXRDdXJzb3IoKS5yb3c7XG4gICAgICAgIHZhciBjb2x1bW4gPSB0aGlzLnNlbGVjdGlvbi5nZXRDdXJzb3IoKS5jb2x1bW47XG4gICAgICAgIHZhciBjaGFyUmFuZ2UgPSBuZXcgUmFuZ2Uocm93LCBjb2x1bW4tMSwgcm93LCBjb2x1bW4pO1xuXG4gICAgICAgIHZhciBjID0gdGhpcy5zZXNzaW9uLmdldFRleHRSYW5nZShjaGFyUmFuZ2UpO1xuICAgICAgICBpZiAoIWlzTmFOKHBhcnNlRmxvYXQoYykpICYmIGlzRmluaXRlKGMpKSB7XG4gICAgICAgICAgICB2YXIgbnIgPSB0aGlzLmdldE51bWJlckF0KHJvdywgY29sdW1uKTtcbiAgICAgICAgICAgIGlmIChucikge1xuICAgICAgICAgICAgICAgIHZhciBmcCA9IG5yLnZhbHVlLmluZGV4T2YoXCIuXCIpID49IDAgPyBuci5zdGFydCArIG5yLnZhbHVlLmluZGV4T2YoXCIuXCIpICsgMSA6IG5yLmVuZDtcbiAgICAgICAgICAgICAgICB2YXIgZGVjaW1hbHMgPSBuci5zdGFydCArIG5yLnZhbHVlLmxlbmd0aCAtIGZwO1xuXG4gICAgICAgICAgICAgICAgdmFyIHQgPSBwYXJzZUZsb2F0KG5yLnZhbHVlKTtcbiAgICAgICAgICAgICAgICB0ICo9IE1hdGgucG93KDEwLCBkZWNpbWFscyk7XG5cblxuICAgICAgICAgICAgICAgIGlmKGZwICE9PSBuci5lbmQgJiYgY29sdW1uIDwgZnApe1xuICAgICAgICAgICAgICAgICAgICBhbW91bnQgKj0gTWF0aC5wb3coMTAsIG5yLmVuZCAtIGNvbHVtbiAtIDEpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGFtb3VudCAqPSBNYXRoLnBvdygxMCwgbnIuZW5kIC0gY29sdW1uKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ICs9IGFtb3VudDtcbiAgICAgICAgICAgICAgICB0IC89IE1hdGgucG93KDEwLCBkZWNpbWFscyk7XG4gICAgICAgICAgICAgICAgdmFyIG5uciA9IHQudG9GaXhlZChkZWNpbWFscyk7XG4gICAgICAgICAgICAgICAgdmFyIHJlcGxhY2VSYW5nZSA9IG5ldyBSYW5nZShyb3csIG5yLnN0YXJ0LCByb3csIG5yLmVuZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXNzaW9uLnJlcGxhY2UocmVwbGFjZVJhbmdlLCBubnIpO1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUN1cnNvclRvKHJvdywgTWF0aC5tYXgobnIuc3RhcnQgKzEsIGNvbHVtbiArIG5uci5sZW5ndGggLSBuci52YWx1ZS5sZW5ndGgpKTtcblxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLnJlbW92ZUxpbmVzID0gZnVuY3Rp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AgICByYW5nZS5tb3ZlQnkobW92ZWQsIDApO1xuICAgICAgICAgICAgc2VsZWN0aW9uLmZyb21PcmllbnRlZFJhbmdlKHJhbmdlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciByYW5nZXMgPSBzZWxlY3Rpb24ucmFuZ2VMaXN0LnJhbmdlcztcbiAgICAgICAgICAgIHNlbGVjdGlvbi5yYW5nZUxpc3QuZGV0YWNoKHRoaXMuc2Vzc2lvbik7XG4gICAgICAgICAgICB0aGlzLmluVmlydHVhbFNlbGVjdGlvbk1vZGUgPSB0cnVlO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgZGlmZiA9IDA7XG4gICAgICAgICAgICB2YXIgdG90YWxEaWZmID0gMDtcbiAgICAgICAgICAgIHZhciBsID0gcmFuZ2VzLmxlbmd0aDtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlSW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIHJhbmdlc1tpXS5tb3ZlQnkoZGlmZiwgMCk7XG4gICAgICAgICAgICAgICAgcm93cyA9IHRoaXMuJGdldFNlbGVjdGVkUm93cyhyYW5nZXNbaV0pO1xuICAgICAgICAgICAgICAgIHZhciBmaXJzdCA9IHJvd3MuZmlyc3Q7XG4gICAgICAgICAgICAgICAgdmFyIGxhc3QgPSByb3dzLmxhc3Q7XG4gICAgICAgICAgICAgICAgd2hpbGUgKCsraSA8IGwpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRvdGFsRGlmZikgcmFuZ2VzW2ldLm1vdmVCeSh0b3RhbERpZmYsIDApO1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3ViUm93cyA9IHRoaXMuJGdldFNlbGVjdGVkUm93cyhyYW5nZXNbaV0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29weSAmJiBzdWJSb3dzLmZpcnN0ICE9IGxhc3QpXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWNvcHkgJiYgc3ViUm93cy5maXJzdCA+IGxhc3QgKyAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGxhc3QgPSBzdWJSb3dzLmxhc3Q7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICBkaWZmID0gdGhpcy5zZXNzaW9uLiRtb3ZlTGluZXMoZmlyc3QsIGxhc3QsIGNvcHkgPyAwIDogZGlyKTtcbiAgICAgICAgICAgICAgICBpZiAoY29weSAmJiBkaXIgPT0gLTEpIHJhbmdlSW5kZXggPSBpICsgMTtcbiAgICAgICAgICAgICAgICB3aGlsZSAocmFuZ2VJbmRleCA8PSBpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlc1tyYW5nZUluZGV4XS5tb3ZlQnkoZGlmZiwgMCk7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlSW5kZXgrKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFjb3B5KSBkaWZmID0gMDtcbiAgICAgICAgICAgICAgICB0b3RhbERpZmYgKz0gZGlmZjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgc2VsZWN0aW9uLmZyb21PcmllbnRlZFJhbmdlKHNlbGVjdGlvbi5yYW5nZXNbMF0pO1xuICAgICAgICAgICAgc2VsZWN0aW9uLnJhbmdlTGlzdC5hdHRhY2godGhpcy5zZXNzaW9uKTtcbiAgICAgICAgICAgIHRoaXMuaW5WaXJ0dWFsU2VsZWN0aW9uTW9kZSA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLiRnZXRTZWxlY3RlZFJvd3MgPSBmdW5jdGlvbihyYW5nZSkge1xuICAgICAgICByYW5nZSA9IChyY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HByZXZUb2tlbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbigpO1xuICAgICAgICB2YXIgdG9rZW4gPSBwcmV2VG9rZW4gfHwgaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcblxuICAgICAgICBpZiAoIXRva2VuKSByZXR1cm47XG4gICAgICAgIHZhciBtYXRjaFR5cGU7XG4gICAgICAgIHZhciBmb3VuZCA9IGZhbHNlO1xuICAgICAgICB2YXIgZGVwdGggPSB7fTtcbiAgICAgICAgdmFyIGkgPSBjdXJzb3IuY29sdW1uIC0gdG9rZW4uc3RhcnQ7XG4gICAgICAgIHZhciBicmFja2V0VHlwZTtcbiAgICAgICAgdmFyIGJyYWNrZXRzID0ge1xuICAgICAgICAgICAgXCIpXCI6IFwiKFwiLFxuICAgICAgICAgICAgXCIoXCI6IFwiKFwiLFxuICAgICAgICAgICAgXCJdXCI6IFwiW1wiLFxuICAgICAgICAgICAgXCJbXCI6IFwiW1wiLFxuICAgICAgICAgICAgXCJ7XCI6IFwie1wiLFxuICAgICAgICAgICAgXCJ9XCI6IFwie1wiXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBkbyB7XG4gICAgICAgICAgICBpZiAodG9rZW4udmFsdWUubWF0Y2goL1t7fSgpXFxbXFxdXS9nKSkge1xuICAgICAgICAgICAgICAgIGZvciAoOyBpIDwgdG9rZW4udmFsdWUubGVuZ3RoICYmICFmb3VuZDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghYnJhY2tldHNbdG9rZW4udmFsdWVbaV1dKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGJyYWNrZXRUeXBlID0gYnJhY2tldHNbdG9rZW4udmFsdWVbaV1dICsgJy4nICsgdG9rZW4udHlwZS5yZXBsYWNlKFwicnBhcmVuXCIsIFwibHBhcmVuXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc05hTihkZXB0aFticmFja2V0VHlwZV0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZXB0aFticmFja2V0VHlwZV0gPSAwO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh0b2tlbi52YWx1ZVtpXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnKCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdbJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3snOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW2JyYWNrZXRUeXBlXSsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnKSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICddJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ30nOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW2JyYWNrZXRUeXBlXS0tO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRoW2JyYWNrZXRUeXBlXSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hUeXBlID0gJ2JyYWNrZXQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0b2tlbiAmJiB0b2tlbi50eXBlLmluZGV4T2YoJ3RhZy1uYW1lJykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzTmFOKGRlcHRoW3Rva2VuLnZhbHVlXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGhbdG9rZW4udmFsdWVdID0gMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlcHRoW3Rva2VuLnZhbHVlXSsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8LycpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGhbdG9rZW4udmFsdWVdLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmIChkZXB0aFt0b2tlbi52YWx1ZV0gPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoVHlwZSA9ICd0YWcnO1xuICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIWZvdW5kKSB7XG4gICAgICAgICAgICAgICAgcHJldlRva2VuID0gdG9rZW47XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlICh0b2tlbiAmJiAhZm91bmQpO1xuICAgICAgICBpZiAoIW1hdGNoVHlwZSlcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgcmFuZ2UsIHBvcztcbiAgICAgICAgaWYgKG1hdGNoVHlwZSA9PT0gJ2JyYWNrZXQnKSB7XG4gICAgICAgICAgICByYW5nZSA9IHRoaXMuc2Vzc2lvbi5nZXRCcmFja2V0UmFuZ2UoY3Vyc29yKTtcbiAgICAgICAgICAgIGlmICghcmFuZ2UpIHtcbiAgICAgICAgICAgICAgICByYW5nZSA9IG5ldyBSYW5nZShcbiAgICAgICAgICAgICAgICAgICAgaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCksXG4gICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgaSAtIDEsXG4gICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIGkgLSAxXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICBwb3MgPSByYW5nZS5zdGFydDtcbiAgICAgICAgICAgICAgICBpZiAoZXhwYW5kIHx8IHBvcy5yb3cgPT09IGN1cnNvci5yb3cgJiYgTWF0aC5hYnMocG9zLmNvbHVtbiAtIGN1cnNvci5jb2x1bW4pIDwgMilcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLnNlc3Npb24uZ2V0QnJhY2tldFJhbmdlKHBvcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobWF0Y2hUeXBlID09PSAndGFnJykge1xuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZigndGFnLW5hbWUnKSAhPT0gLTEpIFxuICAgICAgICAgICAgICAgIHZhciB0YWcgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgIHJhbmdlID0gbmV3IFJhbmdlKFxuICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpIC0gMixcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKSxcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSAtIDJcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmFuZ2UuY29tcGFyZShjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKSA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGZvdW5kID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHByZXZUb2tlbjtcbiAgICAgICAgICAgICAgICAgICAgcHJldlRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAocHJldlRva2VuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJldlRva2VuLnR5cGUuaW5kZXhPZigndGFnLWNsb3NlJykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc2V0RW5kKGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLCBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT09IHRhZyAmJiB0b2tlbi50eXBlLmluZGV4T2YoJ3RhZy1uYW1lJykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW3RhZ10rKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocHJldlRva2VuLnZhbHVlID09PSAnPC8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW3RhZ10tLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRoW3RhZ10gPT09IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHByZXZUb2tlbiAmJiAhZm91bmQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZigndGFnLW5hbWUnKSkge1xuICAgICAgICAgICAgICAgIHBvcyA9IHJhbmdlLnN0YXJ0O1xuICAgICAgICAgICAgICAgIGlmIChwb3Mucm93ID09IGN1cnNvci5yb3cgJiYgTWF0aC5hYnMocG9zLmNvbHVtbiAtIGN1cnNvci5jb2x1bW4pIDwgMilcbiAgICAgICAgICAgICAgICAgICAgcG9zID0gcmFuZ2UuZW5kO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcG9zID0gcmFuZ2UgJiYgcmFuZ2UuY3Vyc29yIHx8IHBvcztcbiAgICAgICAgaWYgKHBvcykge1xuICAgICAgICAgICAgaWYgKHNlbGVjdCkge1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZSAmJiBleHBhbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24uc2V0UmFuZ2UocmFuZ2UpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmFuZ2UgJiYgcmFuZ2UuaXNFcXVhbCh0aGlzLmdldFNlbGVjdGlvblJhbmdlKCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJTZWxlY3Rpb24o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1xuICAgICAgICB2YXIgb25BZnRlclJlbmRlciA9IHRoaXMucmVuZGVyZXIub24oXCJhZnRlclJlbmRlclwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGlmIChzaG91bGRTY3JvbGwgJiYgcmVjdCAmJiAoc2VsZi5pc0ZvY3VzZWQoKVxuICAgICAgICAgICAgICAgIHx8IHNlbGYuc2VhcmNoQm94ICYmIHNlbGYuc2VhcmNoQm94LmlzRm9jdXNlZCgpKVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJlbmRlcmVyID0gc2VsZi5yZW5kZXJlcjtcbiAgICAgICAgICAgICAgICB2YXIgcG9zID0gcmVuZGVyZXIuJGN1cnNvckxheWVyLiRwaXhlbFBvcztcbiAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0gcmVuZGVyZXIubGF5ZXJDb25maWc7XG4gICAgICAgICAgICAgICAgdmFyIHRvcCA9IHBvcy50b3AgLSBjb25maWcub2Zmc2V0O1xuICAgICAgICAgICAgICAgIGlmIChwb3MudG9wID49IDAgJiYgdG9wICsgcmVjdC50b3AgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHNob3VsZFNjcm9sbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwb3MudG9wIDwgY29uZmlnLmhlaWdodCAmJlxuICAgICAgICAgICAgICAgICAgICBwb3MudG9wICsgcmVjdC50b3AgKyBjb25maWcubGluZUhlaWdodCA+IHdpbmRvdy5pbm5lckhlaWdodCkge1xuICAgICAgICAgICAgICAgICAgICBzaG91bGRTY3JvbGwgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzaG91bGRTY3JvbGwgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2hvdWxkU2Nyb2xsICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgc2Nyb2xsQW5j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3ddO1xuICAgICAgICAgICAgaWYgKCFyb3dJbmZvKVxuICAgICAgICAgICAgICAgIHJvd0luZm8gPSB0aGlzLiRhbm5vdGF0aW9uc1tyb3ddID0ge3RleHQ6IFtdfTtcbiAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgYW5ub1RleHQgPSBhbm5vdGF0aW9uLnRleHQ7XG4gICAgICAgICAgICBhbm5vVGV4dCA9IGFubm9UZXh0ID8gbGFuZy5lc2NhcGVIVE1MKGFubm9UZXh0KSA6IGFubm90YXRpb24uaHRtbCB8fCBcIlwiO1xuXG4gICAgICAgICAgICBpZiAocm93SW5mby50ZXh0LmluZGV4T2YoYW5ub1RleHQpID09PSAtMSlcbiAgICAgICAgICAgICAgICByb3dJbmZvLnRleHQucHVzaChhbm5vVGV4dCk7XG5cbiAgICAgICAgICAgIHZhciB0eXBlID0gYW5ub3RhdGlvbi50eXBlO1xuICAgICAgICAgICAgaWYgKHR5cGUgPT0gXCJlcnJvclwiKVxuICAgICAgICAgICAgICAgIHJvd0luZm8uY2xhc3NOYW1lID0gXCIgYWNlX2Vycm9yXCI7XG4gICAgICAgICAgICBlbHNlIGlmICh0eXBlID09IFwid2FybmluZ1wiICYmIHJvd0luZm8uY2xhc3NOYW1lICE9IFwiIGFjZV9lcnJvclwiKVxuICAgICAgICAgICAgICAgIHJvd0luZm8uY2xhc3NOYW1lID0gXCIgYWNlX3dhcm5pbmdcIjtcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT0gXCJpbmZvXCIgJiYgKCFyb3dJbmZvLmNsYXNzTmFtZSkpXG4gICAgICAgICAgICAgICAgcm93SW5mby5jbGFzc05hbWUgPSBcIiBhY2VfaW5mb1wiO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJHVwZGF0ZUFubm90YXRpb25zID0gZnVuY3Rpb24gKGRlbHRhKSB7XG4gICAgICAgIGlmICghdGhpcy4kYW5ub3RhdGlvbnMubGVuZ3RoKVxuICAgICAgICAgICA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gICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2VsbCA9IHRoaXMuJGNlbGxzWysraW5kZXhdO1xuICAgICAgICAgICAgaWYgKCFjZWxsKSB7XG4gICAgICAgICAgICAgICAgY2VsbCA9IHtlbGVtZW50OiBudWxsLCB0ZXh0Tm9kZTogbnVsbCwgZm9sZFdpZGdldDogbnVsbH07XG4gICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50ID0gZG9tLmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG4gICAgICAgICAgICAgICAgY2VsbC50ZXh0Tm9kZSA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCcnKTtcbiAgICAgICAgICAgICAgICBjZWxsLmVsZW1lbnQuYXBwZW5kQ2hpbGQoY2VsbC50ZXh0Tm9kZSk7XG4gICAgICAgICAgICAgICAgdGhpcy5lbGVtZW50LmFwcGVuZENoaWxkKGNlbGwuZWxlbWVudCk7XG4gICAgICAgICAgICAgICAgdGhpcy4kY2VsbHNbaW5kZXhdID0gY2VsbDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGNsYXNzTmFtZSA9IFwiYWNlX2d1dHRlci1jZWxsIFwiO1xuICAgICAgICAgICAgaWYgKGJyZWFrcG9pbnRzW3Jvd10pXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lICs9IGJyZWFrcG9pbnRzW3Jvd107XG4gICAgICAgICAgICBpZiAoZGVjb3JhdGlvbnNbcm93XSlcbiAgICAgICAgICAgICAgICBjbGFzc05hbWUgKz0gZGVjb3JhdGlvbnNbcm93XTtcbiAgICAgICAgICAgIGlmICh0aGlzLiRhbm5vdGF0aW9uc1tyb3ddKVxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZSArPSB0aGlzLiRhbm5vdGF0aW9uc1tyb3ddLmNsYXNzTmFtZTtcbiAgICAgICAgICAgIGlmIChjZWxsLmVsZW1lbnQuY2xhc3NOYW1lICE9IGNsYXNzTmFtZSlcbiAgICAgICAgICAgICAgICBjZWxsLmVsZW1lbnQuY2xhc3NOYW1lID0gY2xhc3NOYW1lO1xuXG4gICAgICAgICAgICB2YXIgaGVpZ2h0ID0gc2Vzc2lvbi5nZXRSb3dMZW5ndGgocm93KSAqIGNvbmZpZy5saW5lSGVpZ2h0ICsgXCJweFwiO1xuICAgICAgICAgICAgaWYgKGhlaWdodCAhPSBjZWxsLmVsZW1lbnQuc3R5bGUuaGVpZ2h0KVxuICAgICAgICAgICAgICAgIGNlbGwuZWxlbWVudC5zdHlsZS5oZWlnaHQgPSBoZWlnaHQ7XG5cbiAgICAgICAgICAgIGlmIChmb2xkV2lkZ2V0cykge1xuICAgICAgICAgICAgICAgIHZhciBjID0gZm9sZFdpZGdldHNbcm93XTtcbiAgICAgICAgICAgICAgICBpZiAoYyA9PSBudWxsKVxuICAgICAgICAgICAgICAgICAgICBjID0gZm9sZFdpZGdldHNbcm93XSA9IHNlc3Npb24uZ2V0Rm9sZFdpZGdldChyb3cpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoYykge1xuICAgICAgICAgICAgICAgIGlmICghY2VsbC5mb2xkV2lkZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9sZFdpZGdldCA9IGRvbS5jcmVhdGVFbGVtZW50KFwic3BhblwiKTtcbiAgICAgICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50LmFwcGVuZENoaWxkKGNlbGwuZm9sZFdpZGdldCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBjbGFzc05hbWUgPSBcImFjZV9mb2xkLXdpZGdldCBhY2VfXCIgKyBjO1xuICAgICAgICAgICAgICAgIGlmIChjID09IFwic3RhcnRcIiAmJiByb3cgPT0gZm9sZFN0YXJ0ICYmIHJvdyA8IGZvbGQuZW5kLnJvdylcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lICs9IFwiIGFjZV9jbG9zZWRcIjtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZSArPSBcIiBhY2Vfb3BlblwiO1xuICAgICAgICAgICAgICAgIGlmIChjZWxsLmZvbGRXaWRnZXQuY2xhc3NOYW1lICE9IGNsYXNzTmFtZSlcbiAgICAgICAgICAgICAgICAgICAgY2VsbC5mb2xkV2lkZ2V0LmNsYXNzTmFtZSA9IGNsYXNzTmFtZTtcblxuICAgICAgICAgICAgICAgIHZhciBoZWlnaHQgPSBjb25maWcubGluZUhlaWdodCArIFwicHhcIjtcbiAgICAgICAgICAgICAgICBpZiAoY2VsbC5mb2xkV2lkZ2V0LnN0eWxlLmhlaWdodCAhPSBoZWlnaHQpXG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9sZFdpZGdldC5zdHlsZS5oZWlnaHQgPSBoZWlnaHQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChjZWxsLmZvbGRXaWRnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50LnJlbW92ZUNoaWxkKGNlbGwuZm9sZFdpZGdldCk7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9sZFdpZGdldCA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgdGV4dCA9IGxhc3RMaW5lTnVtYmVyID0gZ3V0dGVyUmVuZGVyZXJcbiAgICAgICAgICAgICAgICA/IGd1dHRlclJlbmRlcmVyLmdldFRleHQoc2Vzc2lvbiwgcm93KVxuICAgICAgICAgICAgICAgIDogcm93ICsgZmlyc3RMaW5lTnVtYmVyO1xuICAgICAgICAgICAgaWYgKHRleHQgIT09IGNlbGwudGV4dE5vZGUuZGF0YSlcbiAgICAgICAgICAgICAgICBjZWxsLnRleHROb2RlLmRhdGEgPSB0ZXh0O1xuXG4gICAgICA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gY29uZmlnO1xuXG5cbiAgICAgICAgdmFyIGh0bWwgPSBbXTtcbiAgICAgICAgZm9yICh2YXIga2V5IGluIHRoaXMubWFya2Vycykge1xuICAgICAgICAgICAgdmFyIG1hcmtlciA9IHRoaXMubWFya2Vyc1trZXldO1xuXG4gICAgICAgICAgICBpZiAoIW1hcmtlci5yYW5nZSkge1xuICAgICAgICAgICAgICAgIG1hcmtlci51cGRhdGUoaHRtbCwgdGhpcywgdGhpcy5zZXNzaW9uLCBjb25maWcpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBtYXJrZXIucmFuZ2UuY2xpcFJvd3MoY29uZmlnLmZpcnN0Um93LCBjb25maWcubGFzdFJvdyk7XG4gICAgICAgICAgICBpZiAocmFuZ2UuaXNFbXB0eSgpKSBjb250aW51ZTtcblxuICAgICAgICAgICAgcmFuZ2UgPSByYW5nZS50b1NjcmVlblJhbmdlKHRoaXMuc2Vzc2lvbik7XG4gICAgICAgICAgICBpZiAobWFya2VyLnJlbmRlcmVyKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRvcCA9IHRoaXMuJGdldFRvcChyYW5nZS5zdGFydC5yb3csIGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgdmFyIGxlZnQgPSB0aGlzLiRwYWRkaW5nICsgKHRoaXMuc2Vzc2lvbi4kYmlkaUhhbmRsZXIuaXNCaWRpUm93KHJhbmdlLnN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICAgICAgPyB0aGlzLnNlc3Npb24uJGJpZGlIYW5kbGVyLmdldFBvc0xlZnQocmFuZ2Uuc3RhcnQuY29sdW1uKVxuICAgICAgICAgICAgICAgICAgICA6IHJhbmdlLnN0YXJ0LmNvbHVtbiAqIGNvbmZpZy5jaGFyYWN0ZXJXaWR0aCk7XG4gICAgICAgICAgICAgICAgbWFya2VyLnJlbmRlcmVyKGh0bWwsIHJhbmdlLCBsZWZ0LCB0b3AsIGNvbmZpZyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hcmtlci50eXBlID09IFwiZnVsbExpbmVcIikge1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhd0Z1bGxMaW5lTWFya2VyKGh0bWwsIHJhbmdlLCBtYXJrZXIuY2xhenosIGNvbmZpZyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hcmtlci50eXBlID09IFwic2NyZWVuTGluZVwiKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5kcmF3U2NyZWVuTGluZU1hcmtlcihodG1sLCByYW5nZSwgbWFya2VyLmNsYXp6LCBjb25maWcpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChyYW5nZS5pc011bHRpTGluZSgpKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1hcmtlci50eXBlID09IFwidGV4dFwiKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRyYXdUZXh0TWFya2VyKGh0bWwsIHJhbmdlLCBtYXJrZXIuY2xhenosIGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICB0aGlzLmRyYXdNdWx0aUxpbmVNYXJrZXIoaHRtbCwgcmFuZ2UsIG1hcmtlci5jbGF6eiwgY29uZmlnKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuc2Vzc2lvbi4kYmlkaUhhbmRsZXIuaXNCaWRpUm93KHJhbmdlLnN0YXJ0LnJvdykpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kcmF3QmlkaVNpbmdsZUxpbmVNYXJrZXIoaHRtbCwgcmFuZ2UsIG1hcmtlci5jbGF6eiArIFwiIGFjZV9zdGFydFwiICsgXCIgYWNlX2JyMTVcIiwgY29uZmlnKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmRyYXdTaW5nbGVMaW5lTWFya2Vy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kNoYW5nZVRhYlNpemUgPVxuICAgIHRoaXMuJGNvbXB1dGVUYWJTdHJpbmcgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIHRhYlNpemUgPSB0aGlzLnNlc3Npb24uZ2V0VGFiU2l6ZSgpO1xuICAgICAgICB0aGlzLnRhYlNpemUgPSB0YWJTaXplO1xuICAgICAgICB2YXIgdGFiU3RyID0gdGhpcy4kdGFiU3RyaW5ncyA9IFswXTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCB0YWJTaXplICsgMTsgaSsrKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zaG93SW52aXNpYmxlcykge1xuICAgICAgICAgICAgICAgIHRhYlN0ci5wdXNoKFwiPHNwYW4gY2xhc3M9J2FjZV9pbnZpc2libGUgYWNlX2ludmlzaWJsZV90YWInPlwiXG4gICAgICAgICAgICAgICAgICAgICsgbGFuZy5zdHJpbmdSZXBlYXQodGhpcy5UQUJfQ0hBUiwgaSlcbiAgICAgICAgICAgICAgICAgICAgKyBcIjwvc3Bhbj5cIik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRhYlN0ci5wdXNoKGxhbmcuc3RyaW5nUmVwZWF0KFwiIFwiLCBpKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuZGlzcGxheUluZGVudEd1aWRlcykge1xuICAgICAgICAgICAgdGhpcy4kaW5kZW50R3VpZGVSZSA9ICAvXFxzXFxTfCBcXHR8XFx0IHxcXHMkLztcbiAgICAgICAgICAgIHZhciBjbGFzc05hbWUgPSBcImFjZV9pbmRlbnQtZ3VpZGVcIjtcbiAgICAgICAgICAgIHZhciBzcGFjZUNsYXNzID0gXCJcIjtcbiAgICAgICAgICAgIHZhciB0YWJDbGFzcyA9IFwiXCI7XG4gICAgICAgICAgICBpZiAodGhpcy5zaG93SW52aXNpYmxlcykge1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZ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RSb3cgfHxcbiAgICAgICAgICAgIHRoaXMuY29uZmlnLmZpcnN0Um93ICE9IGNvbmZpZy5maXJzdFJvdykge1xuICAgICAgICAgICAgdGhpcy5zY3JvbGxMaW5lcyhjb25maWcpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuY29uZmlnID0gY29uZmlnO1xuXG4gICAgICAgIHZhciBmaXJzdCA9IE1hdGgubWF4KGZpcnN0Um93LCBjb25maWcuZmlyc3RSb3cpO1xuICAgICAgICB2YXIgbGFzdCA9IE1hdGgubWluKGxhc3RSb3csIGNvbmZpZy5sYXN0Um93KTtcblxuICAgICAgICB2YXIgbGluZUVsZW1lbnRzID0gdGhpcy5lbGVtZW50LmNoaWxkTm9kZXM7XG4gICAgICAgIHZhciBsaW5lRWxlbWVudHNJZHggPSAwO1xuXG4gICAgICAgIGZvciAodmFyIHJvdyA9IGNvbmZpZy5maXJzdFJvdzsgcm93IDwgZmlyc3Q7IHJvdysrKSB7XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0Rm9sZExpbmUocm93KTtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgIGlmIChmb2xkTGluZS5jb250YWluc1JvdyhmaXJzdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3QgPSBmb2xkTGluZS5zdGFydC5yb3c7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdyA9IGZvbGRMaW5lLmVuZC5yb3c7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGluZUVsZW1lbnRzSWR4ICsrO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJvdyA9IGZpcnN0O1xuICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TmV4dEZvbGRMaW5lKHJvdyk7XG4gICAgICAgIHZhciBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6IEluZmluaXR5O1xuXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICBpZiAocm93ID4gZm9sZFN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgcm93ID0gZm9sZExpbmUuZW5kLnJvdysxO1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy5zZXNzaW9uLmdldE5leHRGb2xkTGluZShyb3csIGZvbGRMaW5lKTtcbiAgICAgICAgICAgICAgICBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6SW5maW5pdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocm93ID4gbGFzdClcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgdmFyIGxpbmVFbGVtZW50ID0gbGluZUVsZW1lbnRzW2xpbmVFbGVtZW50c0lkeCsrXTtcbiAgICAgICAgICAgIGlmIChsaW5lRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIHZhciBodG1sID0gW107XG4gICAgICAgICAgICAgICAgdGhpcy4kcmVuZGVyTGluZShcbiAgICAgICAgICAgICAgICAgICAgaHRtbCwgcm93LCAhdGhpcy4kdXNlTGluZUdyb3VwcygpLCByb3cgPT0gZm9sZFN0YXJ0ID8gZm9sZExpbmUgOiBmYWxzZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgbGluZUVsZW1lbnQuc3R5bGUuaGVpZ2h0ID0gY29uZmlnLmxpbmVIZWlnaHQgKiB0aGlzLnNlc3Npb24uZ2V0Um93TGVuZ3RoKHJvdykgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgbGluZUVsZW1lbnQuaW5uZXJIVE1MID0gaHRtbC5qb2luKFwiXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcm93Kys7XG4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dGFydCkge1xuICAgICAgICAgICAgICAgIHJvdyA9IGZvbGRMaW5lLmVuZC5yb3crMTtcbiAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuc2Vzc2lvbi5nZXROZXh0Rm9sZExpbmUocm93LCBmb2xkTGluZSk7XG4gICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOiBJbmZpbml0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICB2YXIgY29udGFpbmVyID0gZG9tLmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG5cbiAgICAgICAgICAgIHZhciBodG1sID0gW107XG4gICAgICAgICAgICB0aGlzLiRyZW5kZXJMaW5lKGh0bWwsIHJvdywgZmFsc2UsIHJvdyA9PSBmb2xkU3RhcnQgPyBmb2xkTGluZSA6IGZhbHNlKTtcbiAgICAgICAgICAgIGNvbnRhaW5lci5pbm5lckhUTUwgPSBodG1sLmpvaW4oXCJcIik7XG4gICAgICAgICAgICBpZiAodGhpcy4kdXNlTGluZUdyb3VwcygpKSB7XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLmNsYXNzTmFtZSA9ICdhY2VfbGluZV9ncm91cCc7XG4gICAgICAgICAgICAgICAgZnJhZ21lbnQuYXBwZW5kQ2hpbGQoY29udGFpbmVyKTtcbiAgICAgICAgICAgICAgICBjb250YWluZXIuc3R5bGUuaGVpZ2h0ID0gY29uZmlnLmxpbmVIZWlnaHQgKiB0aGlzLnNlc3Npb24uZ2V0Um93TGVuZ3RoKHJvdykgKyBcInB4XCI7XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgd2hpbGUoY29udGFpbmVyLmZpcnN0Q2hpbGQpXG4gICAgICAgICAgICAgICAgICAgIGZyYWdtZW50LmFwcGVuZENoaWxkKGNvbnRhaW5lci5maXJzdENoaWxkKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcm93Kys7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZyYWdtZW50O1xuICAgIH07XG5cbiAgICB0aGlzLnVwZGF0ZSA9IGZ1bmN0aW9uKGNvbmZpZykge1xuICAgICAgICB0aGlzLmNvbmZpZyA9IGNvbmZpZztcblxuICAgICAgICB2YXIgaHRtbCA9IFtdO1xuICAgICAgICB2YXIgZmlyc3RSb3cgPSBjb25maWcuZmlyc3RSb3csIGxhc3RSb3cgPSBjb25maWcubGFzdFJvdztcblxuICAgICAgICB2YXIgcm93ID0gZmlyc3RSb3c7XG4gICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuc2Vzc2lvbi5nZXROZXh0Rm9sZExpbmUocm93KTtcbiAgICAgICAgdmFyIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG5cbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICAgIGlmIChyb3cgPiBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93KzE7XG4gICAgICAgICAgICAgICAgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TmV4dEZvbGRMaW5lKHJvdywgZm9sZExpbmUpO1xuICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDpJbmZpbml0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBpZiAodGhpcy4kdXNlTGluZUdyb3VwcygpKVxuICAgICAgICAgICAgICAgIGh0bWwucHVzaChcIjxkaXYgY2xhc3M9J2FjZV9saW5lX2dyb3VwJyBzdHlsZT0naGVpZ2h0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0gZWxzZSBpZiAoYyA9PSBcIjxcIikge1xuICAgICAgICAgICAgICAgIHJldHVybiBcIiYjNjA7XCI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGMgPT0gXCI+XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCImIzYyO1wiO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjID09IFwiXFx0XCIpIHtcbiAgICAgICAgICAgICAgICB2YXIgdGFiU2l6ZSA9IHNlbGYuc2Vzc2lvbi5nZXRTY3JlZW5UYWJTaXplKHNjcmVlbkNvbHVtbiArIHRhYklkeCk7XG4gICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uICs9IHRhYlNpemUgLSAxO1xuICAgICAgICAgICAgICAgIHJldHVybiBzZWxmLiR0YWJTdHJpbmdzW3RhYlNpemVdO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjID09IFwiXFx1MzAwMFwiKSB7XG4gICAgICAgICAgICAgICAgdmFyIGNsYXNzVG9Vc2UgPSBzZWxmLnNob3dJbnZpc2libGVzID8gXCJhY2VfY2prIGFjZV9pbnZpc2libGUgYWNlX2ludmlzaWJsZV9zcGFjZVwiIDogXCJhY2VfY2prXCI7XG4gICAgICAgICAgICAgICAgdmFyIHNwYWNlID0gc2VsZi5zaG93SW52aXNpYmxlcyA/IHNlbGYuU1BBQ0VfQ0hBUiA6IFwiXCI7XG4gICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uICs9IDE7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiPHNwYW4gY2xhc3M9J1wiICsgY2xhc3NUb1VzZSArIFwiJyBzdHlsZT0nd2lkdGg6XCIgK1xuICAgICAgICAgICAgICAgICAgICAoc2VsZi5jb25maWcuY2hhcmFjdGVyV2lkdGggKiAyKSArXG4gICAgICAgICAgICAgICAgICAgIFwicHgnPlwiICsgc3BhY2UgKyBcIjwvc3Bhbj5cIjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYikge1xuICAgICAgICAgICAgICAgIHJldHVybiBcIjxzcGFuIGNsYXNzPSdhY2VfaW52aXNpYmxlIGFjZV9pbnZpc2libGVfc3BhY2UgYWNlX2ludmFsaWQnPlwiICsgc2VsZi5TUEFDRV9DSEFSICsgXCI8L3NwYW4+XCI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiArPSAxO1xuICAgICAgICAgICAgICAgIHJldHVybiBcIjxzcGFuIGNsYXNzPSdhY2VfY2prJyBzdHlsZT0nd2lkdGg6XCIgK1xuICAgICAgICAgICAgICAgICAgICAoc2VsZi5jb25maWcuY2hhcmFjdGVyV2lkdGggKiAyKSArXG4gICAgICAgICAgICAgICAgICAgIFwicHgnPlwiICsgYyArIFwiPC9zcGFuPlwiO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBvdXRwdXQgPSB2YWx1ZS5yZXBsYWNlKHJlcGxhY2VSZWcsIHJlcGxhY2VGdW5jKTtcblxuICAgICAgICBpZiAoIXRoaXMuJHRleHRUb2tlblt0b2tlbi50eXBlXSkge1xuICAgICAgICAgICAgdmFyIGNsYXNzZXMgPSBcImFjZV9cIiArIHRva2VuLnR5cGUucmVwbGFjZSgvXFwuL2csIFwiIGFjZV9cIik7XG4gICAgICAgICAgICB2YXIgc3R5bGUgPSBcIlwiO1xuICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUgPT0gXCJmb2xkXCIpXG4gICAgICAgICAgICAgICAgc3R5bGUgPSBcIiBzdHlsZT0nd2lkdGg6XCIgKyAodG9rZW4udmFsdWUubGVuZ3RoICogdGhpcy5jb25maWcuY2hhcmFjdGVyV2lkdGgpICsgXCJweDsnIFwiO1xuICAgICAgICAgICAgc3RyaW5nQnVpbGRlci5wdXNoKFwiPHNwYW4gY2xhc3M9J1wiLCBjbGFzc2VzLCBcIidcIiwgc3R5bGUsIFwiPlwiLCBvdXRwdXQsIFwiPC9zcGFuPlwiKTtcbiAgICAg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LiRyZW5kZXJUb2tlbihcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIsIHNjcmVlbkNvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2VuLCB2YWx1ZS5zdWJzdHJpbmcoMCwgc3BsaXRDaGFycyAtIGNoYXJzKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnN1YnN0cmluZyhzcGxpdENoYXJzIC0gY2hhcnMpO1xuICAgICAgICAgICAgICAgICAgICBjaGFycyA9IHNwbGl0Q2hhcnM7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFvbmx5Q29udGVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIucHVzaChcIjwvZGl2PlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiPGRpdiBjbGFzcz0nYWNlX2xpbmUnIHN0eWxlPSdoZWlnaHQ6XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb25maWcubGluZUhlaWdodCwgXCJweCc+XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBzdHJpbmdCdWlsZGVyLnB1c2gobGFuZy5zdHJpbmdSZXBlYXQoXCJcXHhhMFwiLCBzcGxpdHMuaW5kZW50KSk7XG5cbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgKys7XG4gICAgICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHNwbGl0Q2hhcnMgPSBzcGxpdHNbc3BsaXRdIHx8IE51bWJlci5NQVhfVkFMVUU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBjaGFycyArPSB2Y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luZSA9IGZ1bmN0aW9uKHN0cmluZ0J1aWxkZXIsIHJvdywgb25seUNvbnRlbnRzLCBmb2xkTGluZSkge1xuICAgICAgICBpZiAoIWZvbGRMaW5lICYmIGZvbGRMaW5lICE9IGZhbHNlKVxuICAgICAgICAgICAgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0Rm9sZExpbmUocm93KTtcblxuICAgICAgICBpZiAoZm9sZExpbmUpXG4gICAgICAgICAgICB2YXIgdG9rZW5zID0gdGhpcy4kZ2V0Rm9sZExpbmVUb2tlbnMocm93LCBmb2xkTGluZSk7XG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIHZhciB0b2tlbnMgPSB0aGlzLnNlc3Npb24uZ2V0VG9rZW5zKHJvdyk7XG5cblxuICAgICAgICBpZiAoIW9ubHlDb250ZW50cykge1xuICAgICAgICAgICAgc3RyaW5nQnVpbGRlci5wdXNoKFxuICAgICAgICAgICAgICAgIFwiPGRpdiBjbGFzcz0nYWNlX2xpbmUnIHN0eWxlPSdoZWlnaHQ6XCIsIFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZy5saW5lSGVpZ2h0ICogKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy4kdXNlTGluZUdyb3VwcygpID8gMSA6dGhpcy5zZXNzaW9uLmdldFJvd0xlbmd0aChyb3cpXG4gICAgICAgICAgICAgICAgICAgICksIFwicHgnPlwiXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRva2Vucy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciBzcGxpdHMgPSB0aGlzLnNlc3Npb24uZ2V0Um93U3BsaXREYXRhKHJvdyk7XG4gICAgICAgICAgICBpZiAoc3BsaXRzICYmIHNwbGl0cy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgdGhpcy4kcmVuZGVyV3JhcHBlZExpbmUoc3RyaW5nQnVpbGRlciwgdG9rZW5zLCBzcGxpdHMsIG9ubHlDb250ZW50cyk7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgdGhpcy4kcmVuZGVyU2ltcGxlTGluZShzdHJpbmdCdWlsZGVyLCB0b2tlbnMpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuc2hvd0ludmlzaWJsZXMpIHtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZSlcbiAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93O1xuXG4gICAgICAgICAgICBzdHJpbmdCdWlsZGVyLnB1c2goXG4gICAgICAgICAgICAgICAgXCI8c3BhbiBjbGFzcz0nYWNlX2ludmlzaWJsZSBhY2VfaW52aXNpYmxlX2VvbCc+XCIsXG4gICAgICAgICAgICAgICAgcm93ID09IHRoaXMuc2Vzc2lvbi5nZXRMZW5ndGgoKSAtIDEgPyB0aGlzLkVPRl9DSEFSIDogdGhpcy5FT0xfQ0hBUixcbiAgICAgICAgICAgICAgICBcIjwvc3Bhbj5cIlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIW9ubHlDb250ZW50cylcbiAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIucHVzaChcIjwvZGl2PlwiKTtcbiAgICB9O1xuXG4gICAgdGhpcy4kZ2V0Rm9sZExpbmVUb2tlbnMgPSBmdW5jdGlvbihyb3csIGZvbGRMaW5lKSB7XG4gICAgICAgIHZhciBzZXNzaW9uID0gdGhpcy5zZXNzaW9uO1xuICAgICAgICB2YXIgcmVuZGVyVG9rZW5zID0gW107XG5cbiAgICAgICAgZnVuY3Rpb24gYWRkVG9rZW5zKHRva2VucywgZnJvbSwgdG8pIHtcbiAgICAgICAgICAgIHZhciBpZHggPSAwLCBjb2wgPSAwO1xuICAgICAgICAgICAgd2hpbGUgKChjb2wgKyB0b2tlbnNbaWR4XS52YWx1ZS5sZW5ndGgpIDwgZnJvbSkge1xuICAgICAgICAgICAgICAgIGNvbCArPSB0b2tlbnNbaWR4XS52YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWR4Kys7XG5cbiAgICAgICAgICAgICAgICBpZiAoaWR4ID09IHRva2Vucy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb2wgIT0gZnJvbSkge1xuICAgICAgICAgICAgICAgIHZhciB2YWx1ZSA9IHRva2Vuc1tpZHhdLnZhbHVlLnN1YnN0cmluZyhmcm9tIC0gY29sKTtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoID4gKHRvIC0gZnJvbSkpXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUuc3Vic3RyaW5nKDAsIHRvIC0gZnJvbSk7XG5cbiAgICAgICAgICAgICAgICByZW5kZXJUb2tlbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IHRva2Vuc1tpZHhdLnR5cGUsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZVxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgY29sID0gZnJvbSArIHZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZHggKz0gMTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgd2hpbGUgKGNvbCA8IHRvICYmIGlkeCA8IHRva2Vucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSB0b2tlbnNbaWR4XS52YWx1ZTtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoICsgY29sID4gdG8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmVuZGVyVG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogdG9rZW5zW2lkeF0udHlwZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZS5zdWJzdHJpbmcoMCwgdG8gLSBjb2wpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgICAgICByZW5kZXJUb2tlbnMucHVzaCh0b2tlbnNbaWR4XSk7XG4gICAgICAgICAgICAgICAgY29sICs9IHZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZHggKz0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB0b2tlbnMgPSBzZXNzaW9uLmdldFRva2Vucyhyb3cpO1xuICAgICAgICBmb2xkTGluZS53YWxrKGZ1bmN0aW9uKHBsYWNlaG9sZGVyLCByb3csIGNvbHVtbiwgbGFzdENvbHVtbiwgaXNOZXdSb3cpIHtcbiAgICAgICAgICAgIGlmIChwbGFjZWhvbGRlciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcmVuZGVyVG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImZvbGRcIixcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHBsYWNlaG9sZGVyXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChpc05ld1JvdylcbiAgICAgICAgICAgICAgICAgICAgdG9rZW5zID0gc2Vzc2lvbi5nZXRUb2tlbnMocm93KTtcblxuICAgICAgICAgICAgICAgIGlmICh0b2tlbnMubGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICBhZGRUb2tlbnModG9rZW5zLCBsYXN0Q29sdW1uLCBjb2x1bW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LCBmb2xkTGluZS5lbmQucm93LCB0aGlzLnNlc3Npb24uZ2V0TGluZShmb2xkTGluZS5lbmQucm93KS5sZW5ndGgpO1xuXG4gICAgICAgIHJldHVybiByZW5kZXJUb2tlbnM7XG4gICAgfTtcblxuICAgIHRoaXMuJHVzZUxpbmVHcm91cHMgPSBmdW5jdGlvbigpI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LiRwYWRkaW5nID0gMDtcbiAgICB0aGlzLnNldFBhZGRpbmcgPSBmdW5jdGlvbihwYWRkaW5nKSB7XG4gICAgICAgIHRoaXMuJHBhZGRpbmcgPSBwYWRkaW5nO1xuICAgIH07XG5cbiAgICB0aGlzLnNldFNlc3Npb24gPSBmdW5jdGlvbihzZXNzaW9uKSB7XG4gICAgICAgIHRoaXMuc2Vzc2lvbiA9IHNlc3Npb247XG4gICAgfTtcblxuICAgIHRoaXMuc2V0QmxpbmtpbmcgPSBmdW5jdGlvbihibGlua2luZykge1xuICAgICAgICBpZiAoYmxpbmtpbmcgIT0gdGhpcy5pc0JsaW5raW5nKXtcbiAgICAgICAgICAgIHRoaXMuaXNCbGlua2luZyA9IGJsaW5raW5nO1xuICAgICAgICAgICAgdGhpcy5yZXN0YXJ0VGltZXIoKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLnNldEJsaW5rSW50ZXJ2YWwgPSBmdW5jdGlvbihibGlua0ludGVydmFsKSB7XG4gICAgICAgIGlmIChibGlua0ludGVydmFsICE9IHRoaXMuYmxpbmtJbnRlcnZhbCl7XG4gICAgICAgICAgICB0aGlzLmJsaW5rSW50ZXJ2YWwgPSBibGlua0ludGVydmFsO1xuICAgICAgICAgICAgdGhpcy5yZXN0YXJ0VGltZXIoKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLnNldFNtb290aEJsaW5raW5nID0gZnVuY3Rpb24oc21vb3RoQmxpbmtpbmcpIHtcbiAgICAgICAgaWYgKHNtb290aEJsaW5raW5nICE9IHRoaXMuc21vb3RoQmxpbmtpbmcgJiYgIWlzSUU4KSB7XG4gICAgICAgICAgICB0aGlzLnNtb290aEJsaW5raW5nID0gc21vb3RoQmxpbmtpbmc7XG4gICAgICAgICAgICBkb20uc2V0Q3NzQ2xhc3ModGhpcy5lbGVtZW50LCBcImFjZV9zbW9vdGgtYmxpbmtpbmdcIiwgc21vb3RoQmxpbmtpbmcpO1xuICAgICA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pcbiAgICAgICAgICAgIHRoaXMuY29uZmlnLmxpbmVIZWlnaHQ7XG5cbiAgICAgICAgcmV0dXJuIHtsZWZ0IDogY3Vyc29yTGVmdCwgdG9wIDogY3Vyc29yVG9wfTtcbiAgICB9O1xuXG4gICAgdGhpcy51cGRhdGUgPSBmdW5jdGlvbihjb25maWcpIHtcbiAgICAgICAgdGhpcy5jb25maWcgPSBjb25maWc7XG5cbiAgICAgICAgdmFyIHNlbGVjdGlvbnMgPSB0aGlzLnNlc3Npb24uJHNlbGVjdGlvbk1hcmtlcnM7XG4gICAgICAgIHZhciBpID0gMCwgY3Vyc29ySW5kZXggPSAwO1xuXG4gICAgICAgIGlmIChzZWxlY3Rpb25zID09PSB1bmRlZmluZWQgfHwgc2VsZWN0aW9ucy5sZW5ndGggPT09IDApe1xuICAgICAgICAgICAgc2VsZWN0aW9ucyA9IFt7Y3Vyc29yOiBudWxsfV07XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBpID0gMCwgbiA9IHNlbGVjdGlvbnMubGVuZ3RoOyBpIDwgbjsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgcGl4ZWxQb3MgPSB0aGlzLmdldFBpeGVsUG9zaXRpb24oc2VsZWN0aW9uc1tpXS5jdXJzb3IsIHRydWUpO1xuICAgICAgICAgICAgaWYgKChwaXhlbFBvcy50b3AgPiBjb25maWcuaGVpZ2h0ICsgY29uZmlnLm9mZnNldCB8fFxuICAgICAgICAgICAgICAgICBwaXhlbFBvcy50b3AgPCAwKSAmJiBpID4gMSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgc3R5bGUgPSAodGhpcy5jdXJzb3JzW2N1cnNvckluZGV4KytdIHx8IHRoaXMuYWRkQ3Vyc29yKCkpLnN0eWxlO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoIXRoaXMuZHJhd0N1cnNvcikge1xuICAgICAgICAgICAgICAgI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tcbiAgICBcbiAgICB0aGlzLnNldFBvbGxpbmcgPSBmdW5jdGlvbih2YWwpIHtcbiAgICAgICAgaWYgKHZhbCkge1xuICAgICAgICAgICAgdGhpcy4kcG9sbFNpemVDaGFuZ2VzKCk7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy4kcG9sbFNpemVDaGFuZ2VzVGltZXIpIHtcbiAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGhpcy4kcG9sbFNpemVDaGFuZ2VzVGltZXIpO1xuICAgICAgICAgICAgdGhpcy4kcG9sbFNpemVDaGFuZ2VzVGltZXIgPSAwO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJG1lYXN1cmVTaXplcyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAoQ0hBUl9DT1VOVCA9PT0gNTApIHtcbiAgICAgICAgICAgIHZhciByZWN0ID0gbnVsbDtcbiAgICAgICAgICAgIHRyeSB7IFxuICAgICAgICAgICAgICAgcmVjdCA9IHRoaXMuJG1lYXN1cmVOb2RlLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpO1xuICAgICAgICAgICAgfSBjYXRjaChlKSB7XG4gICAgICAgICAgICAgICByZWN0ID0ge3dpZHRoOiAwLCBoZWlnaHQ6MCB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHNpemUgPSB7XG4gICAgICAgICAgICAgICAgaGVpZ2h0OiByZWN0LmhlaWdodCxcbiAgICAgICAgICAgICAgICB3aWR0aDogcmVjdC53aWR0aCAvIENIQVJfQ09VTlRcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgc2l6ZSA9IHtcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IHRoaXMuJG1lYXN1cmVOb2RlLmNsaWVudEhlaWdodCxcbiAgICAgICAgICAgICAgICB3aWR0aDogdGhpcy4kbWVhc3VyZU5vZGUuY2xpZW50V2lkdGggLyBDSEFSX0NPVU5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CJjaGFuZ2VOZXdMaW5lTW9kZVwiLCB0aGlzLm9uQ2hhbmdlTmV3TGluZU1vZGUpO1xuICAgIH07XG4gICAgdGhpcy51cGRhdGVMaW5lcyA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93LCBmb3JjZSkge1xuICAgICAgICBpZiAobGFzdFJvdyA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgbGFzdFJvdyA9IEluZmluaXR5O1xuXG4gICAgICAgIGlmICghdGhpcy4kY2hhbmdlZExpbmVzKSB7XG4gICAgICAgICAgICB0aGlzLiRjaGFuZ2VkTGluZXMgPSB7XG4gICAgICAgICAgICAgICAgZmlyc3RSb3c6IGZpcnN0Um93LFxuICAgICAgICAgICAgICAgIGxhc3RSb3c6IGxhc3RSb3dcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBpZiAodGhpcy4kY2hhbmdlZExpbmVzLmZpcnN0Um93ID4gZmlyc3RSb3cpXG4gICAgICAgICAgICAgICAgdGhpcy4kY2hhbmdlZExpbmVzLmZpcnN0Um93ID0gZmlyc3RSb3c7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLiRjaGFuZ2VkTGluZXMubGFzdFJvdyA8IGxhc3RSb3cpXG4gICAgICAgICAgICAgICAgdGhpcy4kY2hhbmdlZExpbmVzLmxhc3RSb3cgPSBsYXN0Um93O1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLiRjaGFuZ2VkTGluZXMubGFzdFJvdyA8IHRoaXMubGF5ZXJDb25maWcuZmlyc3RSb3cpIHtcbiAgICAgICAgICAgIGlmIChmb3JjZSlcbiAgICAgICAgICAgICAgICB0aGlzLiRjaGFuZ2VkTGluZXMubGFzdFJvdyA9IHRoaXMubGF5ZXJDb25maWcubGFzdFJvdztcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHR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XMubGF5ZXJDb25maWcuZmlyc3RSb3cgJiYgY29uZmlnLmZpcnN0Um93U2NyZWVuID09IHRoaXMubGF5ZXJDb25maWcuZmlyc3RSb3dTY3JlZW4pIHtcbiAgICAgICAgICAgICAgICB2YXIgc3QgPSB0aGlzLnNjcm9sbFRvcCArIChjb25maWcuZmlyc3RSb3cgLSB0aGlzLmxheWVyQ29uZmlnLmZpcnN0Um93KSAqIHRoaXMubGluZUhlaWdodDtcbiAgICAgICAgICAgICAgICBpZiAoc3QgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2Nyb2xsVG9wID0gc3Q7XG4gICAgICAgICAgICAgICAgICAgIGNoYW5nZXMgPSBjaGFuZ2VzIHwgdGhpcy5DSEFOR0VfU0NST0xMO1xuICAgICAgICAgICAgICAgICAgICBjaGFuZ2VzIHw9IHRoaXMuJGNvbXB1dGVMYXllckNvbmZpZygpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbmZpZyA9IHRoaXMubGF5ZXJDb25maWc7XG4gICAgICAgICAgICB0aGlzLiR1cGRhdGVTY3JvbGxCYXJWKCk7XG4gICAgICAgICAgICBpZiAoY2hhbmdlcyAmIHRoaXMuQ0hBTkdFX0hfU0NST0xMKVxuICAgICAgICAgICAgICAgIHRoaXMuJHVwZGF0ZVNjcm9sbEJhckgoKTtcbiAgICAgICAgICAgIHRoaXMuJGd1dHRlckxheWVyLmVsZW1lbnQuc3R5bGUubWFyZ2luVG9wID0gKC1jb25maWcub2Zmc2V0KSArIFwicHhcIjtcbiAgICAgICAgICAgIHRoaXMuY29udGVudC5zdHlsZS5tYXJnaW5Ub3AgPSAoLWNvbmZpZy5vZmZzZXQpICsgXCJweFwiO1xuICAgICAgICAgICAgdGhpcy5jb250ZW50LnN0eWxlLndpZHRoID0gY29uZmlnLndpZHRoICsgMiAqIHRoaXMuJHBhZGRpbmcgKyBcInB4XCI7XG4gICAgICAgICAgICB0aGlz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TGVuZ3RoKGxhc3RSb3cpICogbGluZUhlaWdodCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdFJvd0hlaWdodDtcblxuICAgICAgICBvZmZzZXQgPSB0aGlzLnNjcm9sbFRvcCAtIGZpcnN0Um93U2NyZWVuICogbGluZUhlaWdodDtcblxuICAgICAgICB2YXIgY2hhbmdlcyA9IDA7XG4gICAgICAgIGlmICh0aGlzLmxheWVyQ29uZmlnLndpZHRoICE9IGxvbmdlc3RMaW5lKSBcbiAgICAgICAgICAgIGNoYW5nZXMgPSB0aGlzLkNIQU5HRV9IX1NDUk9MTDtcbiAgICAgICAgaWYgKGhTY3JvbGxDaGFuZ2VkIHx8IHZTY3JvbGxDaGFuZ2VkKSB7XG4gICAgICAgICAgICBjaGFuZ2VzID0gdGhpcy4kdXBkYXRlQ2FjaGVkU2l6ZSh0cnVlLCB0aGlzLmd1dHRlcldpZHRoLCBzaXplLndpZHRoLCBzaXplLmhlaWdodCk7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwoXCJzY3JvbGxiYXJWaXNpYmlsaXR5Q2hhbmdlZFwiKTtcbiAgICAgICAgICAgIGlmICh2U2Nyb2xsQ2hhbmdlZClcbiAgICAgICAgICAgICAgICBsb25nZXN0TGluZSA9IHRoaXMuJGdldExvbmdlc3RMaW5lKCk7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHRoaXMubGF5ZXJDb25maWcgPSB7XG4gICAgICAgICAgICB3aWR0aCA6IGxvbmdlc3RMaW5lLFxuICAgICAgICAgICAgcGFkZGluZyA6IHRoaXMuJHBhZGRpbmcsXG4gICAgICAgICAgICBmaXJzdFJvdyA6IGZpcnN0Um93LFxuICAgICAgICAgICAgZmlyc3RSb3dTY3JlZW46IGZpcnN0Um93U2NyZWVuLFxuICAgICAgICAgICAgbGFzdFJvdyA6IGxhc3RSb3csXG4gICAgICAgICAgICBsaW5lSGVpZ2h0IDogbGluZUhl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bW9kdWxlLmNzc0NsYXNzKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcImNvdWxkbid0IGxvYWQgbW9kdWxlIFwiICsgdGhlbWUgKyBcIiBvciBpdCBkaWRuJ3QgY2FsbCBkZWZpbmVcIik7XG4gICAgICAgICAgICBkb20uaW1wb3J0Q3NzU3RyaW5nKFxuICAgICAgICAgICAgICAgIG1vZHVsZS5jc3NUZXh0LFxuICAgICAgICAgICAgICAgIG1vZHVsZS5jc3NDbGFzcyxcbiAgICAgICAgICAgICAgICBfc2VsZi5jb250YWluZXIub3duZXJEb2N1bWVudFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgaWYgKF9zZWxmLnRoZW1lKVxuICAgICAgICAgICAgICAgIGRvbS5yZW1vdmVDc3NDbGFzcyhfc2VsZi5jb250YWluZXIsIF9zZWxmLnRoZW1lLmNzc0NsYXNzKTtcblxuICAgICAgICAgICAgdmFyIHBhZGRpbmcgPSBcInBhZGRpbmdcIiBpbiBtb2R1bGUgPyBtb2R1bGUucGFkZGluZyBcbiAgICAgICAgICAgICAgICA6IFwicGFkZGluZ1wiIGluIChfc2VsZi50aGVtZSB8fCB7fSkgPyA0IDogX3NlbGYuJHBhZGRpbmc7XG4gICAgICAgICAgICBpZiAoX3NlbGYuJHBhZGRpbmcgJiYgcGFkZGluZyAhPSBfc2VsZi4kcGFkZGluZylcbiAgICAgICAgICAgICAgICBfc2VsZi5zZXRQYWRkaW5nKHBhZGRpbmcpO1xuICAgICAgICAgICAgX3NlbGYuJHRoZW1lID0gbW9kdWxlLmNzc0NsYXNzO1xuXG4gICAgICAgICAgICBfc2VsZi50aGVtZSA9IG1vZHVsZTtcbiAgICAgICAgICAgIGRvbS5hZGRDc3NDbGFzcyhfc2VsZi5jb250YWluZXIsIG1vZHVsZS5jc3NDbGFzcyk7XG4gICAgICAgICAgICBkb20uc2V0Q3NzQ2xhc3MoX3NlbGYuY29udGFpbmVyLCBcImFjZV9kYXJrXCIsIG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1xuICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhtc2cuZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmNhbGxiYWNrc1ttc2cuaWRdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJlcnJvclwiOlxuICAgICAgICAgICAgICAgIHRoaXMucmVwb3J0RXJyb3IobXNnLmRhdGEpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxvZ1wiOlxuICAgICAgICAgICAgICAgIHdpbmRvdy5jb25zb2xlICYmIGNvbnNvbGUubG9nICYmIGNvbnNvbGUubG9nLmFwcGx5KGNvbnNvbGUsIG1zZy5kYXRhKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy5yZXBvcnRFcnJvciA9IGZ1bmN0aW9uKGVycikge1xuICAgICAgICB3aW5kb3cuY29uc29sZSAmJiBjb25zb2xlLmVycm9yICYmIGNvbnNvbGUuZXJyb3IoZXJyKTtcbiAgICB9O1xuXG4gICAgdGhpcy4kbm9ybWFsaXplUGF0aCA9IGZ1bmN0aW9uKHBhdGgpIHtcbiAgICAgICAgcmV0dXJuIG5ldC5xdWFsaWZ5VVJMKHBhdGgpO1xuICAgIH07XG5cbiAgICB0aGlzLnRlcm1pbmF0ZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB0aGlzLl9zaWduYWwoXCJ0ZXJtaW5hdGVcIiwge30pO1xuICAgICAgICB0aGlzLmRlbHRhUXVldWUgPSBudWxsO1xuICAgICAgICB0aGlzLiR3b3JrZXIudGVybWluYXRlKCk7XG4gICAgICAgIHRoaXMuJHdvcmtlciA9IG51bGw7XG4gICAgICAgIGlmICh0aGlzLiRkb2MpXG4gICAgICAgICAgICB0aGlzLiRkb2Mub2ZmKFwiY2hhbmdlXCIsIHRoaXMuY2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0aGlzLnBvcy5jb2x1bW4gJiYgcmFuZ2Uuc3RhcnQuY29sdW1uIDw9IHRoaXMucG9zLmNvbHVtbiArIHRoaXMubGVuZ3RoICsgMTtcbiAgICAgICAgdmFyIGRpc3RhbmNlRnJvbVN0YXJ0ID0gcmFuZ2Uuc3RhcnQuY29sdW1uIC0gdGhpcy5wb3MuY29sdW1uO1xuICAgICAgICBcbiAgICAgICAgdGhpcy51cGRhdGVBbmNob3JzKGRlbHRhKTtcbiAgICAgICAgXG4gICAgICAgIGlmIChpbk1haW5SYW5nZSlcbiAgICAgICAgICAgIHRoaXMubGVuZ3RoICs9IGxlbmd0aERpZmY7XG5cbiAgICAgICAgaWYgKGluTWFpblJhbmdlICYmICF0aGlzLnNlc3Npb24uJGZyb21VbmRvKSB7XG4gICAgICAgICAgICBpZiAoZGVsdGEuYWN0aW9uID09PSAnaW5zZXJ0Jykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSB0aGlzLm90aGVycy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb3RoZXJQb3MgPSB0aGlzLm90aGVyc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5ld1BvcyA9IHtyb3c6IG90aGVyUG9zLnJvdywgY29sdW1uOiBvdGhlclBvcy5jb2x1bW4gKyBkaXN0YW5jZUZyb21TdGFydH07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9jLmluc2VydE1lcmdlZExpbmVzKG5ld1BvcywgZGVsdGEubGluZXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZGVsdGEuYWN0aW9uID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSB0aGlzLm90aGVycy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb3RoZXJQb3MgPSB0aGlzLm90aGVyc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5ld1BvcyA9IHtyb3c6IG90aGVyUG9zLnJvdywgY29sdW1uOiBvdGhlclBvcy5jb2x1bW4gKyBkaXN0YW5jZUZyb21TdGFydH07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9jLnJlbW92ZShuZXcgUmFuZ2UobmV3UG9zLnJvdywgbmV3UG9zLmNvbHVtbiwgbmV3UG9zLnJvdywgbmV3UG9zLmNvbHVtbiAtIGxlbmd0aERpZmYpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHRoaXMuJHVwZGF0aW5nID0gZmFsc2U7XG4gICAgICAgIHRoaXMudXBkYXRlTWFya2VycygpO1xuICAgIH07XG4gICAgXG4gICAgdGhpcy51cGRhdGVBbmNob3JzID0gZnVuY3Rpb24oZGVsdGEpIHtcbiAgICAgICAgdGhpcy5wb3Mub25DaGFuZ2UoZGVsdGEpO1xuICAgICAgICBmb3IgKHZhciBpID0gdGhpcy5vdGhlcnMubGVuZ3RoOyBpLS07KVxuICAgICAgICAgICAgdGhpcy5vdGhlcnNbaV0ub25DaGFuZ2UoZGVsdGEpO1xuICAgICAgICB0aGlzLnVwZGF0ZU1hcmtlcnMoKTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMudXBkYXRlTWFya2VycyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAodGhpcy4kdXBkYXRpbmcpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBfc2VsZiA9IHRoaXM7XG4gICAgICAgIHZhciBzZXNzaW9uID0gdGhpcy5zZXNzaW9uO1xuICAgICAgICB2YXIgdXBkYXRlTWFya2VyID0gZnVuY3Rpb24ocG9zLCBjbGFzc05hbWUpIHtcbiAgICAgICAgICAgIHNlc3Npb24ucmVtb3ZlTWFya2VyKHBvcy5tYXJrZXJJZCk7XG4gICAgICAgICAgICBwb3MubWFya2VyS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G4gICAgICAgIHZhciBhbGwgPSBzZWwucmFuZ2VzO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSBhbGwubGVuZ3RoOyBpLS07ICkge1xuICAgICAgICAgICAgdmFyIHJhbmdlID0gYWxsW2ldO1xuICAgICAgICAgICAgaWYgKHJhbmdlLmlzRW1wdHkoKSkge1xuICAgICAgICAgICAgICAgIHZhciB0bXAgPSBzZXNzaW9uLmdldFdvcmRSYW5nZShyYW5nZS5zdGFydC5yb3csIHJhbmdlLnN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQucm93ID0gdG1wLnN0YXJ0LnJvdztcbiAgICAgICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4gPSB0bXAuc3RhcnQuY29sdW1uO1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5yb3cgPSB0bXAuZW5kLnJvdztcbiAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uID0gdG1wLmVuZC5jb2x1bW47XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgc2VsLm1lcmdlT3ZlcmxhcHBpbmdSYW5nZXMoKTtcblxuICAgICAgICB2YXIgd29yZHMgPSBbXTtcbiAgICAgICAgZm9yICh2YXIgaSA9IGFsbC5sZW5ndGg7IGktLTsgKSB7XG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBhbGxbaV07XG4gICAgICAgICAgICB3b3Jkcy51bnNoaWZ0KHNlc3Npb24uZ2V0VGV4dFJhbmdlKHJhbmdlKSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZGlyIDwgMClcbiAgICAgICAgICAgIHdvcmRzLnVuc2hpZnQod29yZHMucG9wKCkpO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICB3b3Jkcy5wdXNoKHdvcmRzLnNoaWZ0KCkpO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSBhbGwubGVuZ3RoOyBpLS07ICkge1xuICAgICAgICAgICAgd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uICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5zZWxlY3Rpb24uZ2V0UmFuZ2UoKTtcbiAgICAgICAgICAgIHZhciBmciA9IHJhbmdlLnN0YXJ0LnJvdywgbHIgPSByYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgdmFyIGd1ZXNzUmFuZ2UgPSBmciA9PSBscjtcbiAgICAgICAgICAgIGlmIChndWVzc1JhbmdlKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1heCA9IHRoaXMuc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgICAgICAgICB2YXIgbGluZTtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TGluZShscik7XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoL1s9Ol0vLnRlc3QobGluZSkgJiYgKytsciA8IG1heCk7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBsaW5lID0gdGhpcy5zZXNzaW9uLmdldExpbmUoZnIpO1xuICAgICAgICAgICAgICAgIH0gd2hpbGUgKC9bPTpdLy50ZXN0KGxpbmUpICYmIC0tZnIgPiAwKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAoZnIgPCAwKSBmciA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKGxyID49IG1heCkgbHIgPSBtYXggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGxpbmVzID0gdGhpcy5zZXNzaW9uLnJlbW92ZUZ1bGxMaW5lcyhmciwgbHIpO1xuICAgICAgICAgICAgbGluZXMgPSB0aGlzLiRyZUFsaWduVGV4dChsaW5lcywgZ3Vlc3NSYW5nZSk7XG4gICAgICAgICAgICB0aGlzLnNlc3Npb24uaW5zZXJ0KHtyb3c6IGZyLCBjb2x1bW46IDB9LCBsaW5lcy5qb2luKFwiXFxuXCIpICsgXCJcXG5cIik7XG4gICAgICAgICAgICBpZiAoIWd1ZXNzUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4gPSAwO1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4gPSBsaW5lc1tsaW5lcy5sZW5ndGggLSAxXS5sZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5zZXRSYW5nZShyYW5nZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzYW1lUm93UmFuZ2VzLmZvckVhY2goZnVuY3Rpb24ocikge1xuICAgICAgICAgICAgICAgIHNlbC5zdWJzdHJhY3RQb2ludChyLmN1cnNvcik7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgdmFyIG1heENvbCA9IDA7XG4gICAgICAgICAgICB2YXIgbWluU3BhY2UgPSBJbmZpbml0eTtcbiAgICAgICAgICAgIHZhciBzcGFjZU9mZnNldHMgPSByYW5nZXMubWFwKGZ1bmN0aW9uKHIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcCA9IHIuY3Vyc29yO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHAucm93KTtcbiAgICAgICAgICAgICAgICB2YXIgc3BhY2VPZmZzZXQgPSBsaW5lLnN1YnN0cihwLmNvbHVtbikuc2VhcmNoKC9cXFMvZyk7XG4gICAgICAgICAgICAgICAgaWYgKHNwYWNlT2Zmc2V0ID09IC0xKVxuICAgICAgICAgICAgICAgICAgICBzcGFjZU9mZnNldCA9IDA7XG5cbiAgICAgICAgICAgICAgICBpZiAocC5jb2x1bW4gPiBtYXhDb2wpXG4gICAgICAgICAgICAgICAgICAgIG1heENvbCA9IHAuY29sdW1uO1xuICAgICAgICAgICAgICAgIGlmIChzcGFjZU9mZnNldCA8IG1pblNwYWNlKVxuICAgICAgICAgICAgICAgICAgICBtaW5TcGFjZSA9IHNwYWNlT2Zmc2V0O1xuICAgICAgICAgICAgICAgIHJldHVybiBzcGFjZU9mZnNldDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmFuZ2VzLmZvckVhY2goZnVuY3Rpb24ociwgaSkge1xuICAgICAgICAgICAgICAgIHZhciBwID0gci5jdXJzb3I7XG4gICAgICAgICAgICAgICAgdmFyIGwgPSBtYXhDb2wgLSBwLmNvbHVtbjtcbiAgICAgICAgICAgICAgICB2YXIgZCA9IHNwYWNlT2Zmc2V0c1tpXSAtIG1pblNwYWNlO1xuICAgICAgICAgICAgICAgIGlmIChsID4gZClcbiAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbi5pbnNlcnQocCwgbGFuZy5zdHJpbmdSZXBlYXQoXCIgXCIsIGwgLSBkKSk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBzZXNzaW9uLnJlbW92ZShuZXcgUmFuZ2UocC5yb3csIHAuY29sdW1uLCBwLnJvdywgcC5jb2x1bW4gLSBsICsgZCkpO1xuXG4gICAgICAgICAgICAgICAgci5zdGFydC5jb2x1bW4gPSByLmVuZC5jb2x1bW4gPSBtYXhDb2w7XG4gICAgICAgICAgICAgICAgci5zdGFydC5yb3cgPSByLmVuZC5yb3cgPSBwLnJvdztcbiAgICAgICAgICAgICAgICByLmN1cnNvciA9IHIuZW5kO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzZWwuZnJvbU9yaWVudGVkUmFuZ2UocmFuZ2VzWzBdKTtcbiAgICAgICAgICAgIHRoaXMucmVuZGVyZXIudXBkYXRlQ3Vyc29yKCk7XG4gICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnVwZGF0ZUJhY2tNYXJrZXJzKCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy4kcmVBbGlnblRleHQgPSBmdW5jdGlvbihsaW5lcywgZm9yY2VMZWZ0KSB7XG4gICAgICAgIHZhciBpc0xlZnRBbGlnbmVkID0gdHJ1ZSwgaXNSaWdodEFsaWduZWQgPSB0cnVlO1xuICAgICAgICB2YXIgc3RhcnRXLCB0ZXh0VywgZW5kVztcblxuICAgICAgICByZXR1cm4gbGluZXMubWFwKGZ1bmN0aW9uKGxpbmUpIHtcbiAgICAgICAgICAgIHZhciBtID0gbGluZS5tYXRjaCgvKFxccyopKC4qPykoXFxzKikoWz06XS4qKS8pO1xuICAgICAgICAgICAgaWYgKCFtKVxuICAgICAgICAgICAgICAgIHJldHVybiBbbGluZV07XG5cbiAgICAgICAgICAgIGlmIChzdGFydFcgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHN0YXJ0VyA9IG1bMV0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHRleHRXID0gbVsyXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgZW5kVyA9IG1bM10ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHJldHVybiBtO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc3RhcnRXICsgdGV4dFcgKyBlbmRXICE9IG1bMV0ubGVuZ3RoICsgbVsyXS5sZW5ndGggKyBtWzNdLmxlbmd0aClcbiAgICAgICAgICAgICAgICBpc1JpZ2h0QWxpZ25lZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKHN0YXJ0VyAhPSBtWzFdLmxlbmd0aClcbiAgICAgICAgICAgICAgICBpc0xlZnRBbGlnbmVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgIGlmIChzdGFydFcgPiBtWzFdLmxlbmd0aClcbiAgICAgICAgICAgICAgICBzdGFydFcgPSBtWzFdLmxlbmd0aDtcbiAgICAgICAgICAgIGlmICh0ZXh0VyA8IG1bMl0ubGVuZ3RoKVxuICAgICAgICAgICAgICAgIHRleHRXID0gbVsyXS5sZW5ndGg7XG4gICAgICAgICAgICBpZiAoZW5kVyA+IG1bM10ubGVuZ3RoKVxuICAgICAgICAgICAgICAgIGVuZFcgPSBtWzNdLmxlbmd0aDtcblxuICAgICAgICAg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gICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgdmFyIHN0YXJ0TGV2ZWwgPSBsaW5lLnNlYXJjaChyZSk7XG4gICAgICAgIGlmIChzdGFydExldmVsID09IC0xKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGNvbHVtbiB8fCBsaW5lLmxlbmd0aDtcbiAgICAgICAgdmFyIG1heFJvdyA9IHNlc3Npb24uZ2V0TGVuZ3RoKCk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIGVuZFJvdyA9IHJvdztcblxuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIHZhciBsZXZlbCA9IHNlc3Npb24uZ2V0TGluZShyb3cpLnNlYXJjaChyZSk7XG5cbiAgICAgICAgICAgIGlmIChsZXZlbCA9PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgaWYgKGxldmVsIDw9IHN0YXJ0TGV2ZWwpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChlbmRSb3cgPiBzdGFydFJvdykge1xuICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IHNlc3Npb24uZ2V0TGluZShlbmRSb3cpLmxlbmd0aDtcbiAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sdW1uLCBlbmRSb3csIGVuZENvbHVtbik7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy5vcGVuaW5nQnJhY2tldEJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgYnJhY2tldCwgcm93LCBjb2x1bW4sIHR5cGVSZSkge1xuICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiByb3csIGN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uICAgIH07ICAgIFxuICAgIFxuICAgIHRoaXMuJG9uQ2hhbmdlRWRpdG9yID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB0aGlzLmF0dGFjaChlLmVkaXRvcik7XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmF0dGFjaCA9IGZ1bmN0aW9uKGVkaXRvcikge1xuICAgICAgICBpZiAoZWRpdG9yICAmJiBlZGl0b3Iud2lkZ2V0TWFuYWdlciAmJiBlZGl0b3Iud2lkZ2V0TWFuYWdlciAhPSB0aGlzKVxuICAgICAgICAgICAgZWRpdG9yLndpZGdldE1hbmFnZXIuZGV0YWNoKCk7XG5cbiAgICAgICAgaWYgKHRoaXMuZWRpdG9yID09IGVkaXRvcilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB0aGlzLmRldGFjaCgpO1xuICAgICAgICB0aGlzLmVkaXRvciA9IGVkaXRvcjtcbiAgICAgICAgXG4gICAgICAgIGlmIChlZGl0b3IpIHtcbiAgICAgICAgICAgIGVkaXRvci53aWRnZXRNYW5hZ2VyID0gdGhpcztcbiAgICAgICAgICAgIGVkaXRvci5yZW5kZXJlci5vbihcImJlZm9yZVJlbmRlclwiLCB0aGlzLm1lYXN1cmVXaWRnZXRzKTtcbiAgICAgICAgICAgIGVkaXRvci5yZW5kZXJlci5vbihcImFmdGVyUmVuZGVyXCIsIHRoaXMucmVuZGVyV2lkZ2V0cyk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuZGV0YWNoID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB2YXIgZWRpdG9yID0gdGhpcy5lZGl0b3I7XG4gICAgICAgIGlmICghZWRpdG9yKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICBcbiAgICAgICAgdGhpcy5lZGl0b3IgPSBudWxsO1xuICAgICAgICBlZGl0b3Iud2lkZ2V0TWFuYWdlciA9IG51bGw7XG4gICAgICAgIFxuICAgICAgICBlZGl0b3IucmVuZGVyZXIub2ZmKF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AgIHJlbW92ZWQuZm9yRWFjaChmdW5jdGlvbih3KSB7XG4gICAgICAgICAgICAgICAgdyAmJiB0aGlzLnJlbW92ZUxpbmVXaWRnZXQodyk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuJHVwZGF0ZVJvd3MoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gbmV3IEFycmF5KGxlbik7XG4gICAgICAgICAgICBhcmdzLnVuc2hpZnQoc3RhcnRSb3csIDApO1xuICAgICAgICAgICAgbGluZVdpZGdldHMuc3BsaWNlLmFwcGx5KGxpbmVXaWRnZXRzLCBhcmdzKTtcbiAgICAgICAgICAgIHRoaXMuJHVwZGF0ZVJvd3MoKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy4kdXBkYXRlUm93cyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgbGluZVdpZGdldHMgPSB0aGlzLnNlc3Npb24ubGluZVdpZGdldHM7XG4gICAgICAgIGlmICghbGluZVdpZGdldHMpIHJldHVybjtcbiAgICAgICAgdmFyIG5vV2lkZ2V0cyA9IHRydWU7XG4gICAgICAgIGxpbmVXaWRnZXRzLmZvckVhY2goZnVuY3Rpb24odywgaSkge1xuICAgICAgICAgICAgaWYgKHcpIHtcbiAgICAgICAgICAgICAgICBub1dpZGdldHMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB3LnJvdyA9IGk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHcuJG9sZFdpZGdldCkge1xuICAgICAgICAgICAgICAgICAgICB3LiRvbGRXaWRnZXQucm93ID0gaTtcbiAgICAgICAgICAgICAgICAgICAgdyA9IHcuJG9sZFdpZGdldDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBpZiAobm9XaWRnZXRzKVxuICAgICAgICAgICAgdGhpcy5zZXNzaW9uLmxpbmVXa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gICAgICAgICAgICAgIHdoaWxlICh3MSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodzEuJG9sZFdpZGdldCA9PSB3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3MS4kb2xkV2lkZ2V0ID0gdy4kb2xkV2lkZ2V0O1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdzEgPSB3MS4kb2xkV2lkZ2V0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNlc3Npb24uX2VtaXQoXCJjaGFuZ2VGb2xkXCIsIHtkYXRhOntzdGFydDp7cm93OiB3LnJvd319fSk7XG4gICAgICAgIHRoaXMuJHVwZGF0ZVJvd3MoKTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMuZ2V0V2lkZ2V0c0F0Um93ID0gZnVuY3Rpb24ocm93KSB7XG4gICAgICAgIHZhciBsaW5lV2lkZ2V0cyA9IHRoaXMuc2Vzc2lvbi5saW5lV2lkZ2V0cztcbiAgICAgICAgdmFyIHcgPSBsaW5lV2lkZ2V0cyAmJiBsaW5lV2lkZ2V0c1tyb3ddO1xuICAgICAgICB2YXIgbGlzdCA9IFtdO1xuICAgICAgICB3aGlsZSAodykge1xuICAgICAgICAgICAgbGlzdC5wdXNoKHcpO1xuICAgICAgICAgICAgdyA9IHcuJG9sZFdpZGdldDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbGlzdDtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMub25XaWRnZXRDaGFuZ2VkID0gZnVuY3Rpb24odykge1xuICAgICAgICB0aGlzLnNlc3Npb24uX2NoYW5nZWRXaWRnZXRzLnB1c2godyk7XG4gICAgICAgIHRoaXMuZWRpdG9yICYmIHRoaXMuZWRpdG9yLnJlbmRlcmVyLnVwZGF0ZUZ1bGwoKTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMubWVhc3VyZVdpZGdldHMgPSBmdW5jdGlvbihlLCByZW5kZXJlcikge1xuICAgICAgICB2YXIgY2hhbmdlZFdpZGdldHMgPSB0aGlzLnNlc3Npb24uX2NoYW5nZWRXaWRnZXRzO1xuICAgICAgICB2YXIgY29uZmlnID0gcmVuZGVyZXIubGF5ZXJDb25maWc7XG4gICAgICAgIFxuICAgICAgICBpZiAoIWNoYW5nZWRXaWRnZXRzIHx8ICFjaGFuZ2VkV2lkZ2V0cy5sZW5ndGgpIHJldHVybjtcbiAgICAgICAgdmFyIG1pbiA9IEluZmluaXR5O1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYW5nZWRXaWRnZXRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgdyA9IGNoYW5nZWRXaWRnZXRzW2ldO1xuICAgICAgICAgICAgaWYgKCF3IHx8ICF3LmVsKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICh3LnNlc3Npb24gIT0gdGhpcy5zZXNzaW9uKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICghdy5faW5Eb2N1bWVudCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlc3Npb24ubGluZVdpZGdldHNbdy5yb3ddICE9IHcpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIHcuX2luRG9jdW1lbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHJlbmRlcmVyLmNvbnRhaW5lci5hcHBlbmRDaGlsZCh3LmVsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdy5oID0gdy5lbC5vZmZzZXRIZWlnaHQ7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICghdy5maXhlZFdpZHRoKSB7XG4gICAgICAgICAgICAgICAgdy53ID0gdy5lbC5vZmZzZXRXaWR0aDtcbiAgICAgICAgICAgICAgICB3LnNjcmVlbldpZHRoID0gTWF0aC5jZWlsKHcudyAvIGNvbmZpZy5jaGFyYWN0ZXJXaWR0aCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByb3dDb3VudCA9IHcuaCAvIGNvbmZpZy5saW5lSGVpZ2h0O1xuICAgICAgICAgICAgaWYgKHcuY292ZXJMaW5lKSB7XG4gICAgICAgICAgICAgICAgcm93Q291bnQgLT0gdGhpcy5zZXNzaW9uLmdldFJvd0xpbmVDb3VudCh3LnJvdyk7XG4gICAgICAgICAgICAgICAgaWYgKHJvd0NvdW50IDwgMClcbiAgICAgICAgICAgICAgICAgICAgcm93Q291bnQgPSAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHcucm93Q291bnQgIT0gcm93Q291bnQpIHtcbiAgICAgICAgICAgICAgICB3LnJvd0NvdW50ID0gcm93Q291bnQ7XG4gICAgICAgICAgICAgICAgaWYgKHcucm93IDwgbWluKVxuICAgICAgICAgICAgICAgICAgICBtaW4gPSB3LnJvdztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAobWluICE9IEluZmluaXR5KSB7XG4gICAgICAgICAgICB0aGlzLnNlc3Npb24uX2VtaXQoXCJjaGFuZ2VGb2xkXCIsIHtkYXRhOntzdGFydDp7cm93OiBtaW59fX0pO1xuICAgICAgICAgICAgdGhpcy5zZXNzaW9uLmxpbmVXaWRnZXRXaWR0aCA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXNzaW9uLl9jaGFuZ2VkV2lkZ2V0cyA9IFtdO1xuICAgIH07XG4gICAgXG4gICAgdGhpcy5yZW5kZXJXaWRnZXRzID0gZnVuY3Rpb24oZSwgcmVuZGVyZXIpIHtcbiAgICAgICAgdmFyIGNvbmZpZyA9IHJlbmRlcmVyLmxheWVyQ29uZmlnO1xuICAgICAgICB2YXIgbGluZVdpZGdldHMgPSB0aGlzLnNlc3Npb24ubGluZVdpZGdldHM7XG4gICAgICAgIGlmICghbGluZVdpZGdldHMpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBmaXJzdCA9IE1hdGgubWluKHRoaXMuZmlyc3RSb3csIGNvbmZpZy5maXJzdFJvdyk7XG4gICAgICAgIHZhciBsYXN0ID0gTWF0aC5tYXgodGhpcy5sYXN0Um93LCBjb25maWcubGFzdFJvdywgbGluZVdpZGdldHMubGVuZ3RoKTtcbiAgICAgICAgXG4gICAgICAgIHdoaWxlIChmaXJzdCA+IDAgJiYgIWxpbmVXaWRnZXRzW2ZpcnN0XSlcbiAgICAgICAgICAgIGZpcnN0LS07XG4gICAgICAgIFxuICAgICAgICB0aGlzLmZpcnN0Um93ID0gY29uZmlnLmZpcnN0Um93O1xuICAgICAgICB0aGlzLmxhc3RSb3cgPSBjb25maWcubGFzdFJvdztcblxuICAgICAgICByZW5kZXJlci4kY3Vyc29yTGF5ZXIuY29uZmlnID0gY29uZmlnO1xuICAgICAgICBmb3IgKHZhciBpID0gZmlyc3Q7IGkgPD0gbGFzdDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgdyA9IGxpbmVXaWRnZXRzW2ldO1xuICAgICAgICAgICAgaWYgKCF3IHx8ICF3LmVsKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICh3LmhpZGRlbikge1xuICAgICAgICAgICAgICAgIHcuZWwuc3R5bGUudG9wID0gLTEwMCAtICh3LnBpeGVsSGVpZ2h0IHx8IDApICsgXCJweFwiO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCF3Ll9pbkRvY3VtZW50KSB7XG4gICAgICAgICAgICAgICAgdy5faW5Eb2N1bWVudCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmVuZGVyZXIuY29udGFpbmVyLmFwcGVuZENoaWxkKHcuZWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHRvcCA9IHJlbmRlcmVyLiRjdXJzb3JMYXllci5nZXRQaXhlbFBvc2l0aW9uKHtyb3c6IGksIGNvbHVtbjowfSwgdHJ1ZSkudG9wO1xuICAgICAgICAgICAgaWYgKCF3LmNvdmVyTGluZSlcbiAgICAgICAgICAgICAgICB0b3AgKz0gY29uZmlnLmxpbmVIZWlnaHQgKiB0aGlzLnNlc3Npb24uZ2V0Um93TGluZUNvdW50KHcucm93KTtcbiAgICAgICAgICAgIHcuZWwuc3R5bGUudG9wID0gdG9wIC0gY29uZmlnLm9mZnNldCArIFwicHhcIjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIGxlZnQgPSB3LmNvdmVyR3V0dGVyID8gMCA6IHJlbmRlcmVyLmd1dHRlcldpZHRoO1xuICAgICAgICAgICAgaWYgKCF3LmZpeGVkV2lkdGgpXG4gICAgICAgICAgICAgICAgbGVmdCAtPSByZW5kZXJlci5zY3JvbGxMZWZ0O1xuICAgICAgICAgICAgdy5lbC5zdHlsZS5sZWZ0ID0gbGVmdCArIFwicHhcIjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHcuZnVsbFdpZHRoICYmIHcuc2NyZWVuV2lkdGgpIHtcbiAgICAgICAgICAgICAgICB3LmVsLnN0eWxlLm1pbldpZHRoID0gY29uZmlnLndpZHRoICsgMiAqIGNvbmZpZy5wYWRkaW5nICsgXCJweFwiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAody5maXhlZFdpZHRoKSB7XG4gICAgICAgICAgICAgICAgdy5lbC5zdHlsZS5yaWdodCA9IHJlbmRlcmVyLnNjcm9sbEJhci5nZXRXaWR0aCgpICsgXCJweFwiO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB3LmVsLnN0eWxlLnJpZ2h0ID0gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG4gICAgXG59KS5jYWxsKExpbmVXaWRnZXRzLnByb3RvdHlwZSk7XG5cblxu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VyKHdpbmRvdywgXCJyZXNpemVcIiwgZW52Lm9uUmVzaXplKTtcbiAgICAgICAgZW52LmVkaXRvci5jb250YWluZXIuZW52ID0gbnVsbDsgLy8gcHJldmVudCBtZW1vcnkgbGVhayBvbiBvbGQgaWVcbiAgICB9KTtcbiAgICBlZGl0b3IuY29udGFpbmVyLmVudiA9IGVkaXRvci5lbnYgPSBlbnY7XG4gICAgcmV0dXJuIGVkaXRvcjtcbn07XG5leHBvcnRzLmNyZWF0ZUVkaXRTZXNzaW9uID0gZnVuY3Rpb24odGV4dCwgbW9kZSkge1xuICAgIHZhciBkb2MgPSBuZXcgRWRpdFNlc3Npb24odGV4dCwgbW9kZSk7XG4gICAgZG9jLnNldFVuZG9NYW5hZ2VyKG5ldyBVbmRvTWFuYWdlcigpKTtcbiAgICByZXR1cm4gZG9jO1xufTtcbmV4cG9ydHMuRWRpdFNlc3Npb24gPSBFZGl0U2Vzc2lvbjtcbmV4cG9ydHMuVW5kb01hbmFnZXIgPSBVbmRvTWFuYWdlcjtcbmV4cG9ydHMudmVyc2lvbiA9IFwiMS4yLjlcIjtcbn0pO1xuICAgICAgICAgICAgKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGFjZS5hY2VxdWlyZShbXCJhY2UvYWNlXCJdLCBmdW5jdGlvbihhKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhLmNvbmZpZy5pbml0KHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYS5kZWZpbmUgPSBhY2UuZGVmaW5lO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghd2luZG93LmFjZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hY2UgPSBhO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gYSkgaWYgKGEuaGFzT3duUHJvcGVydHkoa2V5KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hY2Vba2V5XSA9IGFba2V5XTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pKCk7XG4gICAgICAgIFxubW9kdWxlLmV4cG9ydHMgPSB3aW5kb3cuYWNlLmFjZXF1aXJlKFwiYWNlL2FjZVwiKTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/index.js\n"); + +/***/ }), + +/***/ "../../../../brace@0.11.1/node_modules/brace/mode/css.js": +/*!********************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/css.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("ace.define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar supportType = exports.supportType = \"align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index\";\nvar supportFunction = exports.supportFunction = \"rgb|rgba|url|attr|counter|counters\";\nvar supportConstant = exports.supportConstant = \"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\";\nvar supportConstantColor = exports.supportConstantColor = \"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen\";\nvar supportConstantFonts = exports.supportConstantFonts = \"arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\";\n\nvar numRe = exports.numRe = \"\\\\-?(?:(?:[0-9]+(?:\\\\.[0-9]+)?)|(?:\\\\.[0-9]+))\";\nvar pseudoElements = exports.pseudoElements = \"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\";\nvar pseudoClasses = exports.pseudoClasses = \"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\\\b\";\n\nvar CssHighlightRules = function() {\n\n var keywordMapper = this.createKeywordMapper({\n \"support.function\": supportFunction,\n \"support.constant\": supportConstant,\n \"support.type\": supportType,\n \"support.constant.color\": supportConstantColor,\n \"support.constant.fonts\": supportConstantFonts\n }, \"text\", true);\n\n this.$rules = {\n \"start\" : [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"ruleset\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\"\n }, {\n token: \"string\",\n regex: \"@\",\n next: \"media\"\n }, {\n token: \"keyword\",\n regex: \"#[a-z0-9-_]+\"\n }, {\n token: \"keyword\",\n regex: \"%\"\n }, {\n token: \"variable\",\n regex: \"\\\\.[a-z0-9-_]+\"\n }, {\n token: \"string\",\n regex: \":[a-z0-9-_]+\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token: \"constant\",\n regex: \"[a-z0-9-_]+\"\n }, {\n caseInsensitive: true\n }],\n\n \"media\": [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \";\",\n next: \"start\"\n }, {\n token: \"keyword\",\n regex: \"(?:media|supports|document|charset|import|namespace|media|supports|document\"\n + \"|page|font|keyframes|viewport|counter-style|font-feature-values\"\n + \"|swash|ornaments|annotation|stylistic|styleset|character-variant)\"\n }],\n\n \"comments\" : [{\n token: \"comment\", // multi line comment\n regex: \"\\\\/\\\\*\",\n push: [{\n token : \"comment\",\n regex : \"\\\\*\\\\/\",\n next : \"pop\"\n }, {\n defaultToken : \"comment\"\n }]\n }],\n\n \"ruleset\" : [{\n regex : \"-(webkit|ms|moz|o)-\",\n token : \"text\"\n }, {\n token : \"paren.rparen\",\n regex : \"\\\\}\",\n next : \"start\"\n }, {\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token : [\"constant.numeric\", \"keyword\"],\n regex : \"(\" + numRe + \")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token : \"constant.numeric\", // hex6 color\n regex : \"#[a-f0-9]{6}\"\n }, {\n token : \"constant.numeric\", // hex3 color\n regex : \"#[a-f0-9]{3}\"\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-element.css\"],\n regex : pseudoElements\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-class.css\"],\n regex : pseudoClasses\n }, {\n include: \"url\"\n }, {\n token : keywordMapper,\n regex : \"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"\n }, {\n caseInsensitive: true\n }],\n\n url: [{\n token : \"support.function\",\n regex : \"(?:url(:?-prefix)?|domain|regexp)\\\\(\",\n push: [{\n token : \"support.function\",\n regex : \"\\\\)\",\n next : \"pop\"\n }, {\n defaultToken: \"string\"\n }]\n }],\n\n strings: [{\n token : \"string.start\",\n regex : \"'\",\n push : [{\n token : \"string.end\",\n regex : \"'|$\",\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }, {\n token : \"string.start\",\n regex : '\"',\n push : [{\n token : \"string.end\",\n regex : '\"|$',\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }],\n escapes: [{\n token : \"constant.language.escape\",\n regex : /\\\\([a-fA-F\\d]{1,6}|[^a-fA-F\\d])/\n }]\n\n };\n\n this.normalizeRules();\n};\n\noop.inherits(CssHighlightRules, TextHighlightRules);\n\nexports.CssHighlightRules = CssHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/css_completions\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar propertyMap = {\n \"background\": {\"#$0\": 1},\n \"background-color\": {\"#$0\": 1, \"transparent\": 1, \"fixed\": 1},\n \"background-image\": {\"url('/$0')\": 1},\n \"background-repeat\": {\"repeat\": 1, \"repeat-x\": 1, \"repeat-y\": 1, \"no-repeat\": 1, \"inherit\": 1},\n \"background-position\": {\"bottom\":2, \"center\":2, \"left\":2, \"right\":2, \"top\":2, \"inherit\":2},\n \"background-attachment\": {\"scroll\": 1, \"fixed\": 1},\n \"background-size\": {\"cover\": 1, \"contain\": 1},\n \"background-clip\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"background-origin\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"border\": {\"solid $0\": 1, \"dashed $0\": 1, \"dotted $0\": 1, \"#$0\": 1},\n \"border-color\": {\"#$0\": 1},\n \"border-style\": {\"solid\":2, \"dashed\":2, \"dotted\":2, \"double\":2, \"groove\":2, \"hidden\":2, \"inherit\":2, \"inset\":2, \"none\":2, \"outset\":2, \"ridged\":2},\n \"border-collapse\": {\"collapse\": 1, \"separate\": 1},\n \"bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"clear\": {\"left\": 1, \"right\": 1, \"both\": 1, \"none\": 1},\n \"color\": {\"#$0\": 1, \"rgb(#$00,0,0)\": 1},\n \"cursor\": {\"default\": 1, \"pointer\": 1, \"move\": 1, \"text\": 1, \"wait\": 1, \"help\": 1, \"progress\": 1, \"n-resize\": 1, \"ne-resize\": 1, \"e-resize\": 1, \"se-resize\": 1, \"s-resize\": 1, \"sw-resize\": 1, \"w-resize\": 1, \"nw-resize\": 1},\n \"display\": {\"none\": 1, \"block\": 1, \"inline\": 1, \"inline-block\": 1, \"table-cell\": 1},\n \"empty-cells\": {\"show\": 1, \"hide\": 1},\n \"float\": {\"left\": 1, \"right\": 1, \"none\": 1},\n \"font-family\": {\"Arial\":2,\"Comic Sans MS\":2,\"Consolas\":2,\"Courier New\":2,\"Courier\":2,\"Georgia\":2,\"Monospace\":2,\"Sans-Serif\":2, \"Segoe UI\":2,\"Tahoma\":2,\"Times New Roman\":2,\"Trebuchet MS\":2,\"Verdana\": 1},\n \"font-size\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"font-weight\": {\"bold\": 1, \"normal\": 1},\n \"font-style\": {\"italic\": 1, \"normal\": 1},\n \"font-variant\": {\"normal\": 1, \"small-caps\": 1},\n \"height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"letter-spacing\": {\"normal\": 1},\n \"line-height\": {\"normal\": 1},\n \"list-style-type\": {\"none\": 1, \"disc\": 1, \"circle\": 1, \"square\": 1, \"decimal\": 1, \"decimal-leading-zero\": 1, \"lower-roman\": 1, \"upper-roman\": 1, \"lower-greek\": 1, \"lower-latin\": 1, \"upper-latin\": 1, \"georgian\": 1, \"lower-alpha\": 1, \"upper-alpha\": 1},\n \"margin\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"overflow\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-x\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-y\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"padding\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"page-break-after\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"page-break-before\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"position\": {\"absolute\": 1, \"relative\": 1, \"fixed\": 1, \"static\": 1},\n \"right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"table-layout\": {\"fixed\": 1, \"auto\": 1},\n \"text-decoration\": {\"none\": 1, \"underline\": 1, \"line-through\": 1, \"blink\": 1},\n \"text-align\": {\"left\": 1, \"right\": 1, \"center\": 1, \"justify\": 1},\n \"text-transform\": {\"capitalize\": 1, \"uppercase\": 1, \"lowercase\": 1, \"none\": 1},\n \"top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"vertical-align\": {\"top\": 1, \"bottom\": 1},\n \"visibility\": {\"hidden\": 1, \"visible\": 1},\n \"white-space\": {\"nowrap\": 1, \"normal\": 1, \"pre\": 1, \"pre-line\": 1, \"pre-wrap\": 1},\n \"width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"word-spacing\": {\"normal\": 1},\n \"filter\": {\"alpha(opacity=$0100)\": 1},\n\n \"text-shadow\": {\"$02px 2px 2px #777\": 1},\n \"text-overflow\": {\"ellipsis-word\": 1, \"clip\": 1, \"ellipsis\": 1},\n \"-moz-border-radius\": 1,\n \"-moz-border-radius-topright\": 1,\n \"-moz-border-radius-bottomright\": 1,\n \"-moz-border-radius-topleft\": 1,\n \"-moz-border-radius-bottomleft\": 1,\n \"-webkit-border-radius\": 1,\n \"-webkit-border-top-right-radius\": 1,\n \"-webkit-border-top-left-radius\": 1,\n \"-webkit-border-bottom-right-radius\": 1,\n \"-webkit-border-bottom-left-radius\": 1,\n \"-moz-box-shadow\": 1,\n \"-webkit-box-shadow\": 1,\n \"transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-moz-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-webkit-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1 }\n};\n\nvar CssCompletions = function() {\n\n};\n\n(function() {\n\n this.completionsDefined = false;\n\n this.defineCompletions = function() {\n if (document) {\n var style = document.createElement('c').style;\n\n for (var i in style) {\n if (typeof style[i] !== 'string')\n continue;\n\n var name = i.replace(/[A-Z]/g, function(x) {\n return '-' + x.toLowerCase();\n });\n\n if (!propertyMap.hasOwnProperty(name))\n propertyMap[name] = 1;\n }\n }\n\n this.completionsDefined = true;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n if (!this.completionsDefined) {\n this.defineCompletions();\n }\n\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (state==='ruleset'){\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/:[^;]+$/.test(line)) {\n /([\\w\\-]+):[^:]*$/.test(line);\n\n return this.getPropertyValueCompletions(state, session, pos, prefix);\n } else {\n return this.getPropertyCompletions(state, session, pos, prefix);\n }\n }\n\n return [];\n };\n\n this.getPropertyCompletions = function(state, session, pos, prefix) {\n var properties = Object.keys(propertyMap);\n return properties.map(function(property){\n return {\n caption: property,\n snippet: property + ': $0;',\n meta: \"property\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getPropertyValueCompletions = function(state, session, pos, prefix) {\n var line = session.getLine(pos.row).substr(0, pos.column);\n var property = (/([\\w\\-]+):[^:]*$/.exec(line) || {})[1];\n\n if (!property)\n return [];\n var values = [];\n if (property in propertyMap && typeof propertyMap[property] === \"object\") {\n values = Object.keys(propertyMap[property]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"property value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(CssCompletions.prototype);\n\nexports.CssCompletions = CssCompletions;\n});\n\nace.define(\"ace/mode/behaviour/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar CstyleBehaviour = acequire(\"./cstyle\").CstyleBehaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\n\nvar CssBehaviour = function () {\n\n this.inherit(CstyleBehaviour);\n\n this.add(\"colon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ':') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n if (!line.substring(cursor.column).match(/^\\s*;/)) {\n return {\n text: ':;',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"colon\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar === ';') {\n range.end.column ++;\n return range;\n }\n }\n }\n });\n\n this.add(\"semicolon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ';') {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ';') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n });\n\n};\noop.inherits(CssBehaviour, CstyleBehaviour);\n\nexports.CssBehaviour = CssBehaviour;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/css_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/css_completions\",\"ace/mode/behaviour/css\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CssCompletions = acequire(\"./css_completions\").CssCompletions;\nvar CssBehaviour = acequire(\"./behaviour/css\").CssBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = CssHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CssBehaviour();\n this.$completer = new CssCompletions();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.foldingRules = \"cStyle\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n var tokens = this.getTokenizer().getLineTokens(line, state).tokens;\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n var match = line.match(/^.*\\{\\s*$/);\n if (match) {\n indent += tab;\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/css */ \"../../../../brace@0.11.1/node_modules/brace/worker/css.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/css\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9icmFjZUAwLjExLjEvbm9kZV9tb2R1bGVzL2JyYWNlL21vZGUvY3NzLmpzP2ExZDUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLOztBQUVMO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBLHVCQUF1QjtBQUN2QjtBQUNBLFNBQVM7QUFDVDtBQUNBLHVCQUF1QjtBQUN2QixTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ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AgICAgcmVnZXg6IFwiXFxcXH1cIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmdcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIkBcIixcbiAgICAgICAgICAgIG5leHQ6ICBcIm1lZGlhXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwia2V5d29yZFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiI1thLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwia2V5d29yZFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiJVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInZhcmlhYmxlXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxcLlthLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nXCIsXG4gICAgICAgICAgICByZWdleDogXCI6W2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLFxuICAgICAgICAgICAgcmVnZXggOiBudW1SZVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiW2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBjYXNlSW5zZW5zaXRpdmU6IHRydWVcbiAgICAgICAgfV0sXG5cbiAgICAgICAgXCJtZWRpYVwiOiBbe1xuICAgICAgICAgICAgaW5jbHVkZSA6IFtcInN0cmluZ3NcIiwgXCJ1cmxcIiwgXCJjb21tZW50c1wiXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJwYXJlbi5scGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFx7XCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXH1cIixcbiAgICAgICAgICAgIG5leHQ6ICBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nXCIsXG4gICAgICAgICAgICByZWdleDogXCI7XCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIig/Om1lZGlhfHN1cHBvcnRzfGRvY3VtZW50fGNoYXJzZXR8aW1wb3J0fG5hbWVzcGFjZXxtZWRpYXxzdXBwb3J0c3xkb2N1bWVudFwiXG4gICAgICAgICAgICAgICAgKyBcInxwYWdlfGZvbnR8a2V5ZnJhbWVzfHZpZXdwb3J0fGNvdW50ZXItc3R5bGV8Zm9udC1mZWF0dXJlLXZhbHVlc1wiXG4gICAgICAgICAgICAgICAgKyBcInxzd2FzaHxvcm5hbWVudHN8YW5ub3RhdGlvbnxzdHlsaXN0aWN8c3R5bGVzZXR8Y2hhcmFjdGVyLXZhcmlhbnQpXCJcbiAgICAgICAgfV0sXG5cbiAgICAgICAgXCJjb21tZW50c1wiIDogW3tcbiAgICAgICAgICAgIHRva2VuOiBcImNvbW1lbnRcIiwgLy8gbXVsdGkgbGluZSBjb21tZW50XG4gICAgICAgICAgICByZWdleDogXCJcXFxcL1xcXFwqXCIsXG4gICAgICAgICAgICBwdXNoOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwqXFxcXC9cIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9XSxcblxuICAgICAgICBcInJ1bGVzZXRcIiA6IFt7XG4gICAgICAgICAgICByZWdleCA6IFwiLSh3ZWJraXR8bXN8bW96fG8pLVwiLFxuICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ucnBhcmVuXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXH1cIixcbiAgICAgICAgICAgIG5leHQgOiBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZSA6IFtcInN0cmluZ3NcIiwgXCJ1cmxcIiwgXCJjb21tZW50c1wiXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFtcImNvbnN0YW50Lm51bWVyaWNcIiwgXCJrZXl3b3JkXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIG51bVJlICsgXCIpKGNofGNtfGRlZ3xlbXxleHxmcnxnZHxncmFkfEh6fGlufGtIenxtbXxtc3xwY3xwdHxweHxyYWR8cmVtfHN8dHVybnx2aHx2bXx2d3wlKVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsXG4gICAgICAgICAgICByZWdleCA6IG51bVJlXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsICAvLyBoZXg2IGNvbG9yXG4gICAgICAgICAgICByZWdleCA6IFwiI1thLWYwLTldezZ9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIiwgLy8gaGV4MyBjb2xvclxuICAgICAgICAgICAgcmVnZXggOiBcIiNbYS1mMC05XXszfVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogW1wicHVuY3R1YXRpb25cIiwgXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUucHNldWRvLWVsZW1lbnQuY3NzXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBwc2V1ZG9FbGVtZW50c1xuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFtcInB1bmN0dWF0aW9uXCIsIFwiZW50aXR5Lm90aGVyLmF0dHJpYnV0ZS1uYW1lLnBzZXVkby1jbGFzcy5jc3NcIl0sXG4gICAgICAgICAgICByZWdleCA6IHBzZXVkb0NsYXNzZXNcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZTogXCJ1cmxcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IGtleXdvcmRNYXBwZXIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXC0/W2EtekEtWl9dW2EtekEtWjAtOV9cXFxcLV0qXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgY2FzZUluc2Vuc2l0aXZlOiB0cnVlXG4gICAgICAgIH1dLFxuXG4gICAgICAgIHVybDogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiKD86dXJsKDo/LXByZWZpeCk/fGRvbWFpbnxyZWdleHApXFxcXChcIixcbiAgICAgICAgICAgIHB1c2g6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN1cHBvcnQuZnVuY3Rpb25cIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXClcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfV0sXG5cbiAgICAgICAgc3RyaW5nczogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuc3RhcnRcIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCInXCIsXG4gICAgICAgICAgICBwdXNoIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLmVuZFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCInfCRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgaW5jbHVkZSA6IFwiZXNjYXBlc1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1xcXFwkLyxcbiAgICAgICAgICAgICAgICBjb25zdW1lTGluZUVuZDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5zdGFydFwiLFxuICAgICAgICAgICAgcmVnZXggOiAnXCInLFxuICAgICAgICAgICAgcHVzaCA6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5lbmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcInwkJyxcbiAgICAgICAgICAgICAgICBuZXh0OiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgaW5jbHVkZSA6IFwiZXNjYXBlc1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1xcXFwkLyxcbiAgICAgICAgICAgICAgICBjb25zdW1lTGluZUVuZDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZm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TtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSBpbiBzdHlsZSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3R5bGVbaV0gIT09ICdzdHJpbmcnKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgICAgIHZhciBuYW1lID0gaS5yZXBsYWNlKC9bQS1aXS9nLCBmdW5jdGlvbih4KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnLScgKyB4LnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoIXByb3BlcnR5TWFwLmhhc093blByb3BlcnR5KG5hbWUpKVxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eU1hcFtuYW1lXSA9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNvbXBsZXRpb25zRGVmaW5lZCA9IHRydWU7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Q29tcGxldGlvbnMgPSBmdW5jdGlvbihzdGF0ZSwgc2Vzc2lvbiwgcG9zLCBwcmVmaXgpIHtcbiAgICAgICAgaWYgKCF0aGlzLmNvbXBsZXRpb25zRGVmaW5lZCkge1xuICAgICAgICAgICAgdGhpcy5kZWZpbmVDb21wbGV0aW9ucygpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHRva2VuID0gc2Vzc2lvbi5nZXRUb2tlbkF0KHBvcy5yb3csIHBvcy5jb2x1bW4pO1xuXG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIGlmIChzdGF0ZT09PSdydWxlc2V0Jyl7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShwb3Mucm93KS5zdWJzdHIoMCwgcG9zLmNvbHVtbik7XG4gICAgICAgICAgICBpZiAoLzpbXjtdKyQvLnRlc3QobGluZSkpIHtcbiAgICA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O1xuICAgICAgICB2YXIgcHJvcGVydHkgPSAoLyhbXFx3XFwtXSspOlteOl0qJC8uZXhlYyhsaW5lKSB8fCB7fSlbMV07XG5cbiAgICAgICAgaWYgKCFwcm9wZXJ0eSlcbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgdmFyIHZhbHVlcyA9IFtdO1xuICAgICAgICBpZiAocHJvcGVydHkgaW4gcHJvcGVydHlNYXAgJiYgdHlwZW9mIHByb3BlcnR5TWFwW3Byb3BlcnR5XSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgdmFsdWVzID0gT2JqZWN0LmtleXMocHJvcGVydHlNYXBbcHJvcGVydHldKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdmFsdWVzLm1hcChmdW5jdGlvbih2YWx1ZSl7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGNhcHRpb246IHZhbHVlLFxuICAgICAgICAgICAgICAgIHNuaXBwZXQ6IHZhbHVlLFxuICAgICAgICAgICAgICAgIG1ldGE6IFwicHJvcGVydHkgdmFsdWVcIixcbiAgICAgICAgICAgICAgICBzY29yZTogTnVtYmVyLk1BWF9WQUxVRVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSk7XG4gICAgfTtcblxufSkuY2FsbChDc3NDb21wbGV0aW9ucy5wcm90b3R5cGUpO1xuXG5leHBvcnRzLkNzc0NvbXBsZXRpb25zID0gQ3NzQ29tcGxldGlvbnM7XG59KTtcblxuYWNlLmRlZmluZShcImFjZS9tb2RlL2JlaGF2aW91ci9jc3NcIixbXCJyZXF1aXJlXCIsXCJleHBvcnRzXCIsXCJtb2R1bGVcIixcImFjZS9saWIvb29wXCIsXCJhY2UvbW9kZS9iZWhhdmlvdXJcIixcImFjZS9tb2RlL2JlaGF2aW91ci9jc3R5bGVcIixcImFjZS90b2tlbl9pdGVyYXRvclwiXSwgZnVuY3Rpb24oYWNlcXVpcmUsIGV4cG9ydHMsIG1vZHVsZSk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AgICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmRvYy5nZXRMaW5lKGN1cnNvci5yb3cpO1xuICAgICAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PT0gJzonKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4pLm1hdGNoKC9eXFxzKjsvKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAnOjsnLFxuICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJjb2xvblwiLCBcImRlbGV0aW9uXCIsIGZ1bmN0aW9uIChzdGF0ZSwgYWN0aW9uLCBlZGl0b3IsIHNlc3Npb24sIHJhbmdlKSB7XG4gICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShyYW5nZSk7XG4gICAgICAgIGlmICghcmFuZ2UuaXNNdWx0aUxpbmUoKSAmJiBzZWxlY3RlZCA9PT0gJzonKSB7XG4gICAgICAgICAgICB2YXIgY3Vyc29yID0gZWRpdG9yLmdldEN1cnNvclBvc2l0aW9uKCk7XG4gICAgICAgICAgICB2YXIgaXR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aW5kZXg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5vcGVuaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHJhbmdlID0gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSArIG1hdGNoWzBdLmxlbmd0aCwgMSk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChyYW5nZSAmJiAhcmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgIGlmIChmb3JjZU11bHRpbGluZSkge1xuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IHRoaXMuZ2V0U2VjdGlvblJhbmdlKHNlc3Npb24sIHJvdyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChmb2xkU3R5bGUgIT0gXCJhbGxcIilcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZm9sZFN0eWxlID09PSBcIm1hcmtiZWdpblwiKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2godGhpcy5mb2xkaW5nU3RvcE1hcmtlcik7XG4gICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgdmFyIGkgPSBtYXRjaC5pbmRleCArIG1hdGNoWzBdLmxlbmd0aDtcblxuICAgICAgICAgICAgaWYgKG1hdGNoWzFdKVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNsb3NpbmdCcmFja2V0QmxvY2soc2Vzc2lvbiwgbWF0Y2hbMV0sIHJvdywgaSk7XG5cbiAgICAgICAgICAgIHJldHVybiBzZXNzaW9uLmdldENvbW1lbnRGb2xkUmFuZ2Uocm93LCBpLCAtMSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHRoaXMuZ2V0U2VjdGlvblJhbmdlID0gZnVuY3Rpb24oc2Vzc2lvbiwgcm93KSB7XG4gICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgIHZhciBzdGFydEluZGVudCA9IGxpbmUuc2VhcmNoKC9cXFMvKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICB2YXIgc3RhcnRDb2x1bW4gPSBsaW5lLmxlbmd0aDtcbiAgICAgICAgcm93ID0gcm93ICsgMTtcbiAgICAgICAgdmFyIGVuZFJvdyA9IHJvdztcbiAgICAgICAgdmFyIG1heFJvdyA9IHNlc3Npb24uZ2V0TGVuZ3RoKCk7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIGluZGVudCA9IGxpbmUuc2VhcmNoKC9cXFMvKTtcbiAgICAgICAgICAgIGlmIChpbmRlbnQgPT09IC0xKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgaWYgIChzdGFydEluZGVudCA+IGluZGVudClcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIHZhciBzdWJSYW5nZSA9IHRoaXMuZ2V0Rm9sZFdpZGdldFJhbmdlKHNlc3Npb24sIFwiYWxsXCIsIHJvdyk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChzdWJSYW5nZSkge1xuICAgICAgICAgICAgICAgIGlmIChzdWJSYW5nZS5zdGFydC5yb3cgPD0gc3RhcnRSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzdWJSYW5nZS5pc011bHRpTGluZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdyA9IHN1YlJhbmdlLmVuZC5yb3c7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzdGFydEluZGVudCA9PSBpbmRlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZW5kUm93ID0gcm93O1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBzZXNzaW9uLmdldExpbmUoZW5kUm93KS5sZW5ndGgpO1xuICAgIH07XG4gICAgdGhpcy5nZXRDb21tZW50UmVnaW9uQmxvY2sgPSBmdW5jdGlvbihzZXNzaW9uLCBsaW5lLCByb3cpIHtcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5zZWFyY2goL1xccyokLyk7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB2YXIgc3RhcnRSb3cgPSByb3c7XG4gICAgICAgIFxuICAgICAgICB2YXIgcmUgPSAvXlxccyooPzpcXC9cXCp8XFwvXFwvfC0tKSM/KGVuZCk/cmVnaW9uXFxiLztcbiAgICAgICAgdmFyIGRlcHRoID0gMTtcbiAgICAgICAgd2hpbGUgKCsrcm93IDwgbWF4Um93KSB7XG4gICAgICAgICAgICBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICB2YXIgbSA9IHJlLmV4ZWMobGluZSk7XG4gICAgICAgICAgICBpZiAoIW0pIGNvbnRpbnVlO1xuICAgICAgICAgICAgaWYgKG1bMV0pIGRlcHRoLS07XG4gICAgICAgICAgICBlbHNlIGRlcHRoKys7XG5cbiAgICAgICAgICAgIGlmICghZGVwdGgpIGJyZWFrO1xuICAgICAgICB9XG5cb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jaFRvRG9jdW1lbnQoc2Vzc2lvbi5nZXREb2N1bWVudCgpKTtcblxuICAgICAgICB3b3JrZXIub24oXCJhbm5vdGF0ZVwiLCBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICBzZXNzaW9uLnNldEFubm90YXRpb25zKGUuZGF0YSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHdvcmtlci5vbihcInRlcm1pbmF0ZVwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHNlc3Npb24uY2xlYXJBbm5vdGF0aW9ucygpO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gd29ya2VyO1xuICAgIH07XG5cbiAgICB0aGlzLiRpZCA9IFwiYWNlL21vZGUvY3NzXCI7XG59KS5jYWxsKE1vZGUucHJvdG90eXBlKTtcblxuZXhwb3J0cy5Nb2RlID0gTW9kZTtcblxufSk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/css.js\n"); + +/***/ }), + +/***/ "../../../../brace@0.11.1/node_modules/brace/mode/html.js": +/*!*********************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/html.js ***! + \*********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\n\nvar JavaScriptHighlightRules = function(options) {\n var keywordMapper = this.createKeywordMapper({\n \"variable.language\":\n \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\" , // Pseudo\n \"keyword\":\n \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|function|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\n \"storage.type\":\n \"const|let|var|function\",\n \"constant.language\":\n \"null|Infinity|NaN|undefined\",\n \"support.function\":\n \"alert\",\n \"constant.language.boolean\": \"true|false\"\n }, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n\n this.$rules = {\n \"no_regex\" : [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n {\n token : \"string\",\n regex : \"'(?=.)\",\n next : \"qstring\"\n }, {\n token : \"string\",\n regex : '\"(?=.)',\n next : \"qqstring\"\n }, {\n token : \"constant.numeric\", // hexadecimal, octal and binary\n regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token : \"constant.numeric\", // decimal integers and floats\n regex : /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"support.function\",\n \"punctuation.operator\", \"entity.name.function\", \"text\",\"keyword.operator\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(prototype)(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"text\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"keyword\",\n regex : \"from(?=\\\\s*('|\\\"))\"\n }, {\n token : \"keyword\",\n regex : \"(?:\" + kwBeforeRe + \")\\\\b\",\n next : \"start\"\n }, {\n token : [\"support.constant\"],\n regex : /that\\b/\n }, {\n token : [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex : /(console)(\\.)(warn|info|log|error|time|trace|timeEnd|assert)\\b/\n }, {\n token : keywordMapper,\n regex : identifierRe\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/,\n next : \"property\"\n }, {\n token : \"storage.type\",\n regex : /=>/\n }, {\n token : \"keyword.operator\",\n regex : /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next : \"start\"\n }, {\n token : \"punctuation.operator\",\n regex : /[?:,;.]/,\n next : \"start\"\n }, {\n token : \"paren.lparen\",\n regex : /[\\[({]/,\n next : \"start\"\n }, {\n token : \"paren.rparen\",\n regex : /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token : \"text\",\n regex : \"\\\\s+\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(?:(\\\\s+)(\\\\w+))?(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/\n }, {\n token : \"support.function\",\n regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|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(?=\\()/\n }, {\n token : \"support.function.dom\",\n 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|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token : \"support.constant\",\n 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/\n }, {\n token : \"identifier\",\n regex : identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token : \"text\",\n regex : \"\\\\s+|^$\",\n next : \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token : \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token : \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token : \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"function_arguments\": [\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \"[, ]+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : '\"|$',\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : \"'|$\",\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n\n\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function(val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token : \"string.quasi.start\",\n regex : /`/,\n push : [{\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"paren.quasi.start\",\n regex : /\\${/,\n push : \"start\"\n }, {\n token : \"string.quasi.end\",\n regex : /`/,\n next : \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n });\n\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n\n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"no_regex\") ]);\n\n this.normalizeRules();\n};\n\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\n\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch : function(val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n } else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex : \"\",\n onMatch : function(value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{type: this.token, value: value}];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n token : \"text.tag-whitespace.xml\",\n regex : \"\\\\s+\"\n }, {\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n stateName : \"jsx_attr_q\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n stateName : \"jsx_attr_qq\",\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\n\nfunction comments(next) {\n return [\n {\n token : \"comment\", // multi line comment\n regex : /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"\\\\*\\\\/\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }, {\n token : \"comment\",\n regex : \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"$|^\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = JavaScriptHighlightRules;\n \n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n this.$quotes = {'\"': '\"', \"'\": \"'\", \"`\": \"`\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n } else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/javascript */ \"../../../../brace@0.11.1/node_modules/brace/worker/javascript.js\"), \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(results) {\n session.setAnnotations(results.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/javascript\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n\nace.define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar supportType = exports.supportType = \"align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index\";\nvar supportFunction = exports.supportFunction = \"rgb|rgba|url|attr|counter|counters\";\nvar supportConstant = exports.supportConstant = \"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\";\nvar supportConstantColor = exports.supportConstantColor = \"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen\";\nvar supportConstantFonts = exports.supportConstantFonts = \"arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\";\n\nvar numRe = exports.numRe = \"\\\\-?(?:(?:[0-9]+(?:\\\\.[0-9]+)?)|(?:\\\\.[0-9]+))\";\nvar pseudoElements = exports.pseudoElements = \"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\";\nvar pseudoClasses = exports.pseudoClasses = \"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\\\b\";\n\nvar CssHighlightRules = function() {\n\n var keywordMapper = this.createKeywordMapper({\n \"support.function\": supportFunction,\n \"support.constant\": supportConstant,\n \"support.type\": supportType,\n \"support.constant.color\": supportConstantColor,\n \"support.constant.fonts\": supportConstantFonts\n }, \"text\", true);\n\n this.$rules = {\n \"start\" : [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"ruleset\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\"\n }, {\n token: \"string\",\n regex: \"@\",\n next: \"media\"\n }, {\n token: \"keyword\",\n regex: \"#[a-z0-9-_]+\"\n }, {\n token: \"keyword\",\n regex: \"%\"\n }, {\n token: \"variable\",\n regex: \"\\\\.[a-z0-9-_]+\"\n }, {\n token: \"string\",\n regex: \":[a-z0-9-_]+\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token: \"constant\",\n regex: \"[a-z0-9-_]+\"\n }, {\n caseInsensitive: true\n }],\n\n \"media\": [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \";\",\n next: \"start\"\n }, {\n token: \"keyword\",\n regex: \"(?:media|supports|document|charset|import|namespace|media|supports|document\"\n + \"|page|font|keyframes|viewport|counter-style|font-feature-values\"\n + \"|swash|ornaments|annotation|stylistic|styleset|character-variant)\"\n }],\n\n \"comments\" : [{\n token: \"comment\", // multi line comment\n regex: \"\\\\/\\\\*\",\n push: [{\n token : \"comment\",\n regex : \"\\\\*\\\\/\",\n next : \"pop\"\n }, {\n defaultToken : \"comment\"\n }]\n }],\n\n \"ruleset\" : [{\n regex : \"-(webkit|ms|moz|o)-\",\n token : \"text\"\n }, {\n token : \"paren.rparen\",\n regex : \"\\\\}\",\n next : \"start\"\n }, {\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token : [\"constant.numeric\", \"keyword\"],\n regex : \"(\" + numRe + \")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token : \"constant.numeric\", // hex6 color\n regex : \"#[a-f0-9]{6}\"\n }, {\n token : \"constant.numeric\", // hex3 color\n regex : \"#[a-f0-9]{3}\"\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-element.css\"],\n regex : pseudoElements\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-class.css\"],\n regex : pseudoClasses\n }, {\n include: \"url\"\n }, {\n token : keywordMapper,\n regex : \"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"\n }, {\n caseInsensitive: true\n }],\n\n url: [{\n token : \"support.function\",\n regex : \"(?:url(:?-prefix)?|domain|regexp)\\\\(\",\n push: [{\n token : \"support.function\",\n regex : \"\\\\)\",\n next : \"pop\"\n }, {\n defaultToken: \"string\"\n }]\n }],\n\n strings: [{\n token : \"string.start\",\n regex : \"'\",\n push : [{\n token : \"string.end\",\n regex : \"'|$\",\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }, {\n token : \"string.start\",\n regex : '\"',\n push : [{\n token : \"string.end\",\n regex : '\"|$',\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }],\n escapes: [{\n token : \"constant.language.escape\",\n regex : /\\\\([a-fA-F\\d]{1,6}|[^a-fA-F\\d])/\n }]\n\n };\n\n this.normalizeRules();\n};\n\noop.inherits(CssHighlightRules, TextHighlightRules);\n\nexports.CssHighlightRules = CssHighlightRules;\n\n});\n\nace.define(\"ace/mode/css_completions\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar propertyMap = {\n \"background\": {\"#$0\": 1},\n \"background-color\": {\"#$0\": 1, \"transparent\": 1, \"fixed\": 1},\n \"background-image\": {\"url('/$0')\": 1},\n \"background-repeat\": {\"repeat\": 1, \"repeat-x\": 1, \"repeat-y\": 1, \"no-repeat\": 1, \"inherit\": 1},\n \"background-position\": {\"bottom\":2, \"center\":2, \"left\":2, \"right\":2, \"top\":2, \"inherit\":2},\n \"background-attachment\": {\"scroll\": 1, \"fixed\": 1},\n \"background-size\": {\"cover\": 1, \"contain\": 1},\n \"background-clip\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"background-origin\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"border\": {\"solid $0\": 1, \"dashed $0\": 1, \"dotted $0\": 1, \"#$0\": 1},\n \"border-color\": {\"#$0\": 1},\n \"border-style\": {\"solid\":2, \"dashed\":2, \"dotted\":2, \"double\":2, \"groove\":2, \"hidden\":2, \"inherit\":2, \"inset\":2, \"none\":2, \"outset\":2, \"ridged\":2},\n \"border-collapse\": {\"collapse\": 1, \"separate\": 1},\n \"bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"clear\": {\"left\": 1, \"right\": 1, \"both\": 1, \"none\": 1},\n \"color\": {\"#$0\": 1, \"rgb(#$00,0,0)\": 1},\n \"cursor\": {\"default\": 1, \"pointer\": 1, \"move\": 1, \"text\": 1, \"wait\": 1, \"help\": 1, \"progress\": 1, \"n-resize\": 1, \"ne-resize\": 1, \"e-resize\": 1, \"se-resize\": 1, \"s-resize\": 1, \"sw-resize\": 1, \"w-resize\": 1, \"nw-resize\": 1},\n \"display\": {\"none\": 1, \"block\": 1, \"inline\": 1, \"inline-block\": 1, \"table-cell\": 1},\n \"empty-cells\": {\"show\": 1, \"hide\": 1},\n \"float\": {\"left\": 1, \"right\": 1, \"none\": 1},\n \"font-family\": {\"Arial\":2,\"Comic Sans MS\":2,\"Consolas\":2,\"Courier New\":2,\"Courier\":2,\"Georgia\":2,\"Monospace\":2,\"Sans-Serif\":2, \"Segoe UI\":2,\"Tahoma\":2,\"Times New Roman\":2,\"Trebuchet MS\":2,\"Verdana\": 1},\n \"font-size\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"font-weight\": {\"bold\": 1, \"normal\": 1},\n \"font-style\": {\"italic\": 1, \"normal\": 1},\n \"font-variant\": {\"normal\": 1, \"small-caps\": 1},\n \"height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"letter-spacing\": {\"normal\": 1},\n \"line-height\": {\"normal\": 1},\n \"list-style-type\": {\"none\": 1, \"disc\": 1, \"circle\": 1, \"square\": 1, \"decimal\": 1, \"decimal-leading-zero\": 1, \"lower-roman\": 1, \"upper-roman\": 1, \"lower-greek\": 1, \"lower-latin\": 1, \"upper-latin\": 1, \"georgian\": 1, \"lower-alpha\": 1, \"upper-alpha\": 1},\n \"margin\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"overflow\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-x\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-y\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"padding\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"page-break-after\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"page-break-before\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"position\": {\"absolute\": 1, \"relative\": 1, \"fixed\": 1, \"static\": 1},\n \"right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"table-layout\": {\"fixed\": 1, \"auto\": 1},\n \"text-decoration\": {\"none\": 1, \"underline\": 1, \"line-through\": 1, \"blink\": 1},\n \"text-align\": {\"left\": 1, \"right\": 1, \"center\": 1, \"justify\": 1},\n \"text-transform\": {\"capitalize\": 1, \"uppercase\": 1, \"lowercase\": 1, \"none\": 1},\n \"top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"vertical-align\": {\"top\": 1, \"bottom\": 1},\n \"visibility\": {\"hidden\": 1, \"visible\": 1},\n \"white-space\": {\"nowrap\": 1, \"normal\": 1, \"pre\": 1, \"pre-line\": 1, \"pre-wrap\": 1},\n \"width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"word-spacing\": {\"normal\": 1},\n \"filter\": {\"alpha(opacity=$0100)\": 1},\n\n \"text-shadow\": {\"$02px 2px 2px #777\": 1},\n \"text-overflow\": {\"ellipsis-word\": 1, \"clip\": 1, \"ellipsis\": 1},\n \"-moz-border-radius\": 1,\n \"-moz-border-radius-topright\": 1,\n \"-moz-border-radius-bottomright\": 1,\n \"-moz-border-radius-topleft\": 1,\n \"-moz-border-radius-bottomleft\": 1,\n \"-webkit-border-radius\": 1,\n \"-webkit-border-top-right-radius\": 1,\n \"-webkit-border-top-left-radius\": 1,\n \"-webkit-border-bottom-right-radius\": 1,\n \"-webkit-border-bottom-left-radius\": 1,\n \"-moz-box-shadow\": 1,\n \"-webkit-box-shadow\": 1,\n \"transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-moz-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-webkit-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1 }\n};\n\nvar CssCompletions = function() {\n\n};\n\n(function() {\n\n this.completionsDefined = false;\n\n this.defineCompletions = function() {\n if (document) {\n var style = document.createElement('c').style;\n\n for (var i in style) {\n if (typeof style[i] !== 'string')\n continue;\n\n var name = i.replace(/[A-Z]/g, function(x) {\n return '-' + x.toLowerCase();\n });\n\n if (!propertyMap.hasOwnProperty(name))\n propertyMap[name] = 1;\n }\n }\n\n this.completionsDefined = true;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n if (!this.completionsDefined) {\n this.defineCompletions();\n }\n\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (state==='ruleset'){\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/:[^;]+$/.test(line)) {\n /([\\w\\-]+):[^:]*$/.test(line);\n\n return this.getPropertyValueCompletions(state, session, pos, prefix);\n } else {\n return this.getPropertyCompletions(state, session, pos, prefix);\n }\n }\n\n return [];\n };\n\n this.getPropertyCompletions = function(state, session, pos, prefix) {\n var properties = Object.keys(propertyMap);\n return properties.map(function(property){\n return {\n caption: property,\n snippet: property + ': $0;',\n meta: \"property\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getPropertyValueCompletions = function(state, session, pos, prefix) {\n var line = session.getLine(pos.row).substr(0, pos.column);\n var property = (/([\\w\\-]+):[^:]*$/.exec(line) || {})[1];\n\n if (!property)\n return [];\n var values = [];\n if (property in propertyMap && typeof propertyMap[property] === \"object\") {\n values = Object.keys(propertyMap[property]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"property value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(CssCompletions.prototype);\n\nexports.CssCompletions = CssCompletions;\n});\n\nace.define(\"ace/mode/behaviour/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar CstyleBehaviour = acequire(\"./cstyle\").CstyleBehaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\n\nvar CssBehaviour = function () {\n\n this.inherit(CstyleBehaviour);\n\n this.add(\"colon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ':') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n if (!line.substring(cursor.column).match(/^\\s*;/)) {\n return {\n text: ':;',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"colon\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar === ';') {\n range.end.column ++;\n return range;\n }\n }\n }\n });\n\n this.add(\"semicolon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ';') {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ';') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n });\n\n};\noop.inherits(CssBehaviour, CstyleBehaviour);\n\nexports.CssBehaviour = CssBehaviour;\n});\n\nace.define(\"ace/mode/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/css_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/css_completions\",\"ace/mode/behaviour/css\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CssCompletions = acequire(\"./css_completions\").CssCompletions;\nvar CssBehaviour = acequire(\"./behaviour/css\").CssBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = CssHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CssBehaviour();\n this.$completer = new CssCompletions();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.foldingRules = \"cStyle\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n var tokens = this.getTokenizer().getLineTokens(line, state).tokens;\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n var match = line.match(/^.*\\{\\s*$/);\n if (match) {\n indent += tab;\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/css */ \"../../../../brace@0.11.1/node_modules/brace/worker/css.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/css\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n\n});\n\nace.define(\"ace/mode/xml_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar XmlHighlightRules = function(normalize) {\n var tagRegex = \"[_:a-zA-Z\\xc0-\\uffff][-_:.a-zA-Z0-9\\xc0-\\uffff]*\";\n\n this.$rules = {\n start : [\n {token : \"string.cdata.xml\", regex : \"<\\\\!\\\\[CDATA\\\\[\", next : \"cdata\"},\n {\n token : [\"punctuation.instruction.xml\", \"keyword.instruction.xml\"],\n regex : \"(<\\\\?)(\" + tagRegex + \")\", next : \"processing_instruction\"\n },\n {token : \"comment.start.xml\", regex : \"<\\\\!--\", next : \"comment\"},\n {\n token : [\"xml-pe.doctype.xml\", \"xml-pe.doctype.xml\"],\n regex : \"(<\\\\!)(DOCTYPE)(?=[\\\\s])\", next : \"doctype\", caseInsensitive: true\n },\n {include : \"tag\"},\n {token : \"text.end-tag-open.xml\", regex: \"\",\n next : \"start\"\n }],\n\n doctype : [\n {include : \"whitespace\"},\n {include : \"string\"},\n {token : \"xml-pe.doctype.xml\", regex : \">\", next : \"start\"},\n {token : \"xml-pe.xml\", regex : \"[-_a-zA-Z0-9:]+\"},\n {token : \"punctuation.int-subset\", regex : \"\\\\[\", push : \"int_subset\"}\n ],\n\n int_subset : [{\n token : \"text.xml\",\n regex : \"\\\\s+\"\n }, {\n token: \"punctuation.int-subset.xml\",\n regex: \"]\",\n next: \"pop\"\n }, {\n token : [\"punctuation.markup-decl.xml\", \"keyword.markup-decl.xml\"],\n regex : \"(<\\\\!)(\" + tagRegex + \")\",\n push : [{\n token : \"text\",\n regex : \"\\\\s+\"\n },\n {\n token : \"punctuation.markup-decl.xml\",\n regex : \">\",\n next : \"pop\"\n },\n {include : \"string\"}]\n }],\n\n cdata : [\n {token : \"string.cdata.xml\", regex : \"\\\\]\\\\]>\", next : \"start\"},\n {token : \"text.xml\", regex : \"\\\\s+\"},\n {token : \"text.xml\", regex : \"(?:[^\\\\]]|\\\\](?!\\\\]>))+\"}\n ],\n\n comment : [\n {token : \"comment.end.xml\", regex : \"-->\", next : \"start\"},\n {defaultToken : \"comment.xml\"}\n ],\n\n reference : [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }],\n\n attr_reference : [{\n token : \"constant.language.escape.reference.attribute-value.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }],\n\n tag : [{\n token : [\"meta.tag.punctuation.tag-open.xml\", \"meta.tag.punctuation.end-tag-open.xml\", \"meta.tag.tag-name.xml\"],\n regex : \"(?:(<)|(\", next : \"start\"}\n ]\n }],\n\n tag_whitespace : [\n {token : \"text.tag-whitespace.xml\", regex : \"\\\\s+\"}\n ],\n whitespace : [\n {token : \"text.whitespace.xml\", regex : \"\\\\s+\"}\n ],\n string: [{\n token : \"string.xml\",\n regex : \"'\",\n push : [\n {token : \"string.xml\", regex: \"'\", next: \"pop\"},\n {defaultToken : \"string.xml\"}\n ]\n }, {\n token : \"string.xml\",\n regex : '\"',\n push : [\n {token : \"string.xml\", regex: '\"', next: \"pop\"},\n {defaultToken : \"string.xml\"}\n ]\n }],\n\n attributes: [{\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n include: \"tag_whitespace\"\n }, {\n include: \"attribute_value\"\n }],\n\n attribute_value: [{\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"attr_reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"attr_reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }]\n };\n\n if (this.constructor === XmlHighlightRules)\n this.normalizeRules();\n};\n\n\n(function() {\n\n this.embedTagRules = function(HighlightRules, prefix, tag){\n this.$rules.tag.unshift({\n token : [\"meta.tag.punctuation.tag-open.xml\", \"meta.tag.\" + tag + \".tag-name.xml\"],\n regex : \"(<)(\" + tag + \"(?=\\\\s|>|$))\",\n next: [\n {include : \"attributes\"},\n {token : \"meta.tag.punctuation.tag-close.xml\", regex : \"/?>\", next : prefix + \"start\"}\n ]\n });\n\n this.$rules[tag + \"-end\"] = [\n {include : \"attributes\"},\n {token : \"meta.tag.punctuation.tag-close.xml\", regex : \"/?>\", next: \"start\",\n onMatch : function(value, currentState, stack) {\n stack.splice(0);\n return this.token;\n }}\n ];\n\n this.embedRules(HighlightRules, prefix, [{\n token: [\"meta.tag.punctuation.end-tag-open.xml\", \"meta.tag.\" + tag + \".tag-name.xml\"],\n regex : \"(|$))\",\n next: tag + \"-end\"\n }, {\n token: \"string.cdata.xml\",\n regex : \"<\\\\!\\\\[CDATA\\\\[\"\n }, {\n token: \"string.cdata.xml\",\n regex : \"\\\\]\\\\]>\"\n }]);\n };\n\n}).call(TextHighlightRules.prototype);\n\noop.inherits(XmlHighlightRules, TextHighlightRules);\n\nexports.XmlHighlightRules = XmlHighlightRules;\n});\n\nace.define(\"ace/mode/html_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/css_highlight_rules\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/xml_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar XmlHighlightRules = acequire(\"./xml_highlight_rules\").XmlHighlightRules;\n\nvar tagMap = lang.createMap({\n a : 'anchor',\n button \t : 'form',\n form : 'form',\n img : 'image',\n input : 'form',\n label : 'form',\n option : 'form',\n script : 'script',\n select : 'form',\n textarea : 'form',\n style : 'style',\n table : 'table',\n tbody : 'table',\n td : 'table',\n tfoot : 'table',\n th : 'table',\n tr : 'table'\n});\n\nvar HtmlHighlightRules = function() {\n XmlHighlightRules.call(this);\n\n this.addRules({\n attributes: [{\n include : \"tag_whitespace\"\n }, {\n token : \"entity.other.attribute-name.xml\",\n regex : \"[-_a-zA-Z0-9:.]+\"\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\",\n push : [{\n include: \"tag_whitespace\"\n }, {\n token : \"string.unquoted.attribute-value.html\",\n regex : \"[^<>='\\\"`\\\\s]+\",\n next : \"pop\"\n }, {\n token : \"empty\",\n regex : \"\",\n next : \"pop\"\n }]\n }, {\n include : \"attribute_value\"\n }],\n tag: [{\n token : function(start, tag) {\n var group = tagMap[tag];\n return [\"meta.tag.punctuation.\" + (start == \"<\" ? \"\" : \"end-\") + \"tag-open.xml\",\n \"meta.tag\" + (group ? \".\" + group : \"\") + \".tag-name.xml\"];\n },\n regex : \"(\", next : \"start\"}\n ]\n });\n\n this.embedTagRules(CssHighlightRules, \"css-\", \"style\");\n this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), \"js-\", \"script\");\n\n if (this.constructor === HtmlHighlightRules)\n this.normalizeRules();\n};\n\noop.inherits(HtmlHighlightRules, XmlHighlightRules);\n\nexports.HtmlHighlightRules = HtmlHighlightRules;\n});\n\nace.define(\"ace/mode/behaviour/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\nvar lang = acequire(\"../../lib/lang\");\n\nfunction is(token, type) {\n return token.type.lastIndexOf(type + \".xml\") > -1;\n}\n\nvar XmlBehaviour = function () {\n\n this.add(\"string_dquotes\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '\"' || text == \"'\") {\n var quote = text;\n var selected = session.doc.getTextRange(editor.getSelectionRange());\n if (selected !== \"\" && selected !== \"'\" && selected != '\"' && editor.getWrapBehavioursEnabled()) {\n return {\n text: quote + selected + quote,\n selection: false\n };\n }\n\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n if (rightChar == quote && (is(token, \"attribute-value\") || is(token, \"string\"))) {\n return {\n text: \"\",\n selection: [1, 1]\n };\n }\n\n if (!token)\n token = iterator.stepBackward();\n\n if (!token)\n return;\n\n while (is(token, \"tag-whitespace\") || is(token, \"whitespace\")) {\n token = iterator.stepBackward();\n }\n var rightSpace = !rightChar || rightChar.match(/\\s/);\n if (is(token, \"attribute-equals\") && (rightSpace || rightChar == '>') || (is(token, \"decl-attribute-equals\") && (rightSpace || rightChar == '?'))) {\n return {\n text: quote + quote,\n selection: [1, 1]\n };\n }\n }\n });\n\n this.add(\"string_dquotes\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"autoclosing\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '>') {\n var position = editor.getSelectionRange().start;\n var iterator = new TokenIterator(session, position.row, position.column);\n var token = iterator.getCurrentToken() || iterator.stepBackward();\n if (!token || !(is(token, \"tag-name\") || is(token, \"tag-whitespace\") || is(token, \"attribute-name\") || is(token, \"attribute-equals\") || is(token, \"attribute-value\")))\n return;\n if (is(token, \"reference.attribute-value\"))\n return;\n if (is(token, \"attribute-value\")) {\n var firstChar = token.value.charAt(0);\n if (firstChar == '\"' || firstChar == \"'\") {\n var lastChar = token.value.charAt(token.value.length - 1);\n var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;\n if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)\n return;\n }\n }\n while (!is(token, \"tag-name\")) {\n token = iterator.stepBackward();\n if (token.value == \"<\") {\n token = iterator.stepForward();\n break;\n }\n }\n\n var tokenRow = iterator.getCurrentTokenRow();\n var tokenColumn = iterator.getCurrentTokenColumn();\n if (is(iterator.stepBackward(), \"end-tag-open\"))\n return;\n\n var element = token.value;\n if (tokenRow == position.row)\n element = element.substring(0, position.column - tokenColumn);\n\n if (this.voidElements.hasOwnProperty(element.toLowerCase()))\n return;\n\n return {\n text: \">\" + \"\",\n selection: [1, 1]\n };\n }\n });\n\n this.add(\"autoindent\", \"insertion\", function (state, action, editor, session, text) {\n if (text == \"\\n\") {\n var cursor = editor.getCursorPosition();\n var line = session.getLine(cursor.row);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n if (token && token.type.indexOf(\"tag-close\") !== -1) {\n if (token.value == \"/>\")\n return;\n while (token && token.type.indexOf(\"tag-name\") === -1) {\n token = iterator.stepBackward();\n }\n\n if (!token) {\n return;\n }\n\n var tag = token.value;\n var row = iterator.getCurrentTokenRow();\n token = iterator.stepBackward();\n if (!token || token.type.indexOf(\"end-tag\") !== -1) {\n return;\n }\n\n if (this.voidElements && !this.voidElements[tag]) {\n var nextToken = session.getTokenAt(cursor.row, cursor.column+1);\n var line = session.getLine(row);\n var nextIndent = this.$getIndent(line);\n var indent = nextIndent + session.getTabString();\n\n if (nextToken && nextToken.value === \" -1;\n}\n\n(function() {\n\n this.getFoldWidget = function(session, foldStyle, row) {\n var tag = this._getFirstTagInLine(session, row);\n\n if (!tag)\n return this.getCommentFoldWidget(session, row);\n\n if (tag.closing || (!tag.tagName && tag.selfClosing))\n return foldStyle == \"markbeginend\" ? \"end\" : \"\";\n\n if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))\n return \"\";\n\n if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))\n return \"\";\n\n return \"start\";\n };\n\n this.getCommentFoldWidget = function(session, row) {\n if (/comment/.test(session.getState(row)) && /';\n break;\n }\n }\n return tag;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == '/>';\n return tag;\n }\n tag.start.column += token.value.length;\n }\n\n return null;\n };\n\n this._findEndTagInLine = function(session, row, tagName, startColumn) {\n var tokens = session.getTokens(row);\n var column = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n column += token.value.length;\n if (column < startColumn)\n continue;\n if (is(token, \"end-tag-open\")) {\n token = tokens[i + 1];\n if (token && token.value == tagName)\n return true;\n }\n }\n return false;\n };\n this._readTagForward = function(iterator) {\n var token = iterator.getCurrentToken();\n if (!token)\n return null;\n\n var tag = new Tag();\n do {\n if (is(token, \"tag-open\")) {\n tag.closing = is(token, \"end-tag-open\");\n tag.start.row = iterator.getCurrentTokenRow();\n tag.start.column = iterator.getCurrentTokenColumn();\n } else if (is(token, \"tag-name\")) {\n tag.tagName = token.value;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == \"/>\";\n tag.end.row = iterator.getCurrentTokenRow();\n tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;\n iterator.stepForward();\n return tag;\n }\n } while(token = iterator.stepForward());\n\n return null;\n };\n \n this._readTagBackward = function(iterator) {\n var token = iterator.getCurrentToken();\n if (!token)\n return null;\n\n var tag = new Tag();\n do {\n if (is(token, \"tag-open\")) {\n tag.closing = is(token, \"end-tag-open\");\n tag.start.row = iterator.getCurrentTokenRow();\n tag.start.column = iterator.getCurrentTokenColumn();\n iterator.stepBackward();\n return tag;\n } else if (is(token, \"tag-name\")) {\n tag.tagName = token.value;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == \"/>\";\n tag.end.row = iterator.getCurrentTokenRow();\n tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;\n }\n } while(token = iterator.stepBackward());\n\n return null;\n };\n \n this._pop = function(stack, tag) {\n while (stack.length) {\n \n var top = stack[stack.length-1];\n if (!tag || top.tagName == tag.tagName) {\n return stack.pop();\n }\n else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {\n stack.pop();\n continue;\n } else {\n return null;\n }\n }\n };\n \n this.getFoldWidgetRange = function(session, foldStyle, row) {\n var firstTag = this._getFirstTagInLine(session, row);\n \n if (!firstTag) {\n return this.getCommentFoldWidget(session, row)\n && session.getCommentFoldRange(row, session.getLine(row).length);\n }\n \n var isBackward = firstTag.closing || firstTag.selfClosing;\n var stack = [];\n var tag;\n \n if (!isBackward) {\n var iterator = new TokenIterator(session, row, firstTag.start.column);\n var start = {\n row: row,\n column: firstTag.start.column + firstTag.tagName.length + 2\n };\n if (firstTag.start.row == firstTag.end.row)\n start.column = firstTag.end.column;\n while (tag = this._readTagForward(iterator)) {\n if (tag.selfClosing) {\n if (!stack.length) {\n tag.start.column += tag.tagName.length + 2;\n tag.end.column -= 2;\n return Range.fromPoints(tag.start, tag.end);\n } else\n continue;\n }\n \n if (tag.closing) {\n this._pop(stack, tag);\n if (stack.length == 0)\n return Range.fromPoints(start, tag.start);\n }\n else {\n stack.push(tag);\n }\n }\n }\n else {\n var iterator = new TokenIterator(session, row, firstTag.end.column);\n var end = {\n row: row,\n column: firstTag.start.column\n };\n \n while (tag = this._readTagBackward(iterator)) {\n if (tag.selfClosing) {\n if (!stack.length) {\n tag.start.column += tag.tagName.length + 2;\n tag.end.column -= 2;\n return Range.fromPoints(tag.start, tag.end);\n } else\n continue;\n }\n \n if (!tag.closing) {\n this._pop(stack, tag);\n if (stack.length == 0) {\n tag.start.column += tag.tagName.length + 2;\n if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)\n tag.start.column = tag.end.column;\n return Range.fromPoints(tag.start, end);\n }\n }\n else {\n stack.push(tag);\n }\n }\n }\n \n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/folding/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/mixed\",\"ace/mode/folding/xml\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar MixedFoldMode = acequire(\"./mixed\").FoldMode;\nvar XmlFoldMode = acequire(\"./xml\").FoldMode;\nvar CStyleFoldMode = acequire(\"./cstyle\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(voidElements, optionalTags) {\n MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {\n \"js-\": new CStyleFoldMode(),\n \"css-\": new CStyleFoldMode()\n });\n};\n\noop.inherits(FoldMode, MixedFoldMode);\n\n});\n\nace.define(\"ace/mode/html_completions\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\n\nvar commonAttributes = [\n \"accesskey\",\n \"class\",\n \"contenteditable\",\n \"contextmenu\",\n \"dir\",\n \"draggable\",\n \"dropzone\",\n \"hidden\",\n \"id\",\n \"inert\",\n \"itemid\",\n \"itemprop\",\n \"itemref\",\n \"itemscope\",\n \"itemtype\",\n \"lang\",\n \"spellcheck\",\n \"style\",\n \"tabindex\",\n \"title\",\n \"translate\"\n];\n\nvar eventAttributes = [\n \"onabort\",\n \"onblur\",\n \"oncancel\",\n \"oncanplay\",\n \"oncanplaythrough\",\n \"onchange\",\n \"onclick\",\n \"onclose\",\n \"oncontextmenu\",\n \"oncuechange\",\n \"ondblclick\",\n \"ondrag\",\n \"ondragend\",\n \"ondragenter\",\n \"ondragleave\",\n \"ondragover\",\n \"ondragstart\",\n \"ondrop\",\n \"ondurationchange\",\n \"onemptied\",\n \"onended\",\n \"onerror\",\n \"onfocus\",\n \"oninput\",\n \"oninvalid\",\n \"onkeydown\",\n \"onkeypress\",\n \"onkeyup\",\n \"onload\",\n \"onloadeddata\",\n \"onloadedmetadata\",\n \"onloadstart\",\n \"onmousedown\",\n \"onmousemove\",\n \"onmouseout\",\n \"onmouseover\",\n \"onmouseup\",\n \"onmousewheel\",\n \"onpause\",\n \"onplay\",\n \"onplaying\",\n \"onprogress\",\n \"onratechange\",\n \"onreset\",\n \"onscroll\",\n \"onseeked\",\n \"onseeking\",\n \"onselect\",\n \"onshow\",\n \"onstalled\",\n \"onsubmit\",\n \"onsuspend\",\n \"ontimeupdate\",\n \"onvolumechange\",\n \"onwaiting\"\n];\n\nvar globalAttributes = commonAttributes.concat(eventAttributes);\n\nvar attributeMap = {\n \"html\": {\"manifest\": 1},\n \"head\": {},\n \"title\": {},\n \"base\": {\"href\": 1, \"target\": 1},\n \"link\": {\"href\": 1, \"hreflang\": 1, \"rel\": {\"stylesheet\": 1, \"icon\": 1}, \"media\": {\"all\": 1, \"screen\": 1, \"print\": 1}, \"type\": {\"text/css\": 1, \"image/png\": 1, \"image/jpeg\": 1, \"image/gif\": 1}, \"sizes\": 1},\n \"meta\": {\"http-equiv\": {\"content-type\": 1}, \"name\": {\"description\": 1, \"keywords\": 1}, \"content\": {\"text/html; charset=UTF-8\": 1}, \"charset\": 1},\n \"style\": {\"type\": 1, \"media\": {\"all\": 1, \"screen\": 1, \"print\": 1}, \"scoped\": 1},\n \"script\": {\"charset\": 1, \"type\": {\"text/javascript\": 1}, \"src\": 1, \"defer\": 1, \"async\": 1},\n \"noscript\": {\"href\": 1},\n \"body\": {\"onafterprint\": 1, \"onbeforeprint\": 1, \"onbeforeunload\": 1, \"onhashchange\": 1, \"onmessage\": 1, \"onoffline\": 1, \"onpopstate\": 1, \"onredo\": 1, \"onresize\": 1, \"onstorage\": 1, \"onundo\": 1, \"onunload\": 1},\n \"section\": {},\n \"nav\": {},\n \"article\": {\"pubdate\": 1},\n \"aside\": {},\n \"h1\": {},\n \"h2\": {},\n \"h3\": {},\n \"h4\": {},\n \"h5\": {},\n \"h6\": {},\n \"header\": {},\n \"footer\": {},\n \"address\": {},\n \"main\": {},\n \"p\": {},\n \"hr\": {},\n \"pre\": {},\n \"blockquote\": {\"cite\": 1},\n \"ol\": {\"start\": 1, \"reversed\": 1},\n \"ul\": {},\n \"li\": {\"value\": 1},\n \"dl\": {},\n \"dt\": {},\n \"dd\": {},\n \"figure\": {},\n \"figcaption\": {},\n \"div\": {},\n \"a\": {\"href\": 1, \"target\": {\"_blank\": 1, \"top\": 1}, \"ping\": 1, \"rel\": {\"nofollow\": 1, \"alternate\": 1, \"author\": 1, \"bookmark\": 1, \"help\": 1, \"license\": 1, \"next\": 1, \"noreferrer\": 1, \"prefetch\": 1, \"prev\": 1, \"search\": 1, \"tag\": 1}, \"media\": 1, \"hreflang\": 1, \"type\": 1},\n \"em\": {},\n \"strong\": {},\n \"small\": {},\n \"s\": {},\n \"cite\": {},\n \"q\": {\"cite\": 1},\n \"dfn\": {},\n \"abbr\": {},\n \"data\": {},\n \"time\": {\"datetime\": 1},\n \"code\": {},\n \"var\": {},\n \"samp\": {},\n \"kbd\": {},\n \"sub\": {},\n \"sup\": {},\n \"i\": {},\n \"b\": {},\n \"u\": {},\n \"mark\": {},\n \"ruby\": {},\n \"rt\": {},\n \"rp\": {},\n \"bdi\": {},\n \"bdo\": {},\n \"span\": {},\n \"br\": {},\n \"wbr\": {},\n \"ins\": {\"cite\": 1, \"datetime\": 1},\n \"del\": {\"cite\": 1, \"datetime\": 1},\n \"img\": {\"alt\": 1, \"src\": 1, \"height\": 1, \"width\": 1, \"usemap\": 1, \"ismap\": 1},\n \"iframe\": {\"name\": 1, \"src\": 1, \"height\": 1, \"width\": 1, \"sandbox\": {\"allow-same-origin\": 1, \"allow-top-navigation\": 1, \"allow-forms\": 1, \"allow-scripts\": 1}, \"seamless\": {\"seamless\": 1}},\n \"embed\": {\"src\": 1, \"height\": 1, \"width\": 1, \"type\": 1},\n \"object\": {\"param\": 1, \"data\": 1, \"type\": 1, \"height\" : 1, \"width\": 1, \"usemap\": 1, \"name\": 1, \"form\": 1, \"classid\": 1},\n \"param\": {\"name\": 1, \"value\": 1},\n \"video\": {\"src\": 1, \"autobuffer\": 1, \"autoplay\": {\"autoplay\": 1}, \"loop\": {\"loop\": 1}, \"controls\": {\"controls\": 1}, \"width\": 1, \"height\": 1, \"poster\": 1, \"muted\": {\"muted\": 1}, \"preload\": {\"auto\": 1, \"metadata\": 1, \"none\": 1}},\n \"audio\": {\"src\": 1, \"autobuffer\": 1, \"autoplay\": {\"autoplay\": 1}, \"loop\": {\"loop\": 1}, \"controls\": {\"controls\": 1}, \"muted\": {\"muted\": 1}, \"preload\": {\"auto\": 1, \"metadata\": 1, \"none\": 1 }},\n \"source\": {\"src\": 1, \"type\": 1, \"media\": 1},\n \"track\": {\"kind\": 1, \"src\": 1, \"srclang\": 1, \"label\": 1, \"default\": 1},\n \"canvas\": {\"width\": 1, \"height\": 1},\n \"map\": {\"name\": 1},\n \"area\": {\"shape\": 1, \"coords\": 1, \"href\": 1, \"hreflang\": 1, \"alt\": 1, \"target\": 1, \"media\": 1, \"rel\": 1, \"ping\": 1, \"type\": 1},\n \"svg\": {},\n \"math\": {},\n \"table\": {\"summary\": 1},\n \"caption\": {},\n \"colgroup\": {\"span\": 1},\n \"col\": {\"span\": 1},\n \"tbody\": {},\n \"thead\": {},\n \"tfoot\": {},\n \"tr\": {},\n \"td\": {\"headers\": 1, \"rowspan\": 1, \"colspan\": 1},\n \"th\": {\"headers\": 1, \"rowspan\": 1, \"colspan\": 1, \"scope\": 1},\n \"form\": {\"accept-charset\": 1, \"action\": 1, \"autocomplete\": 1, \"enctype\": {\"multipart/form-data\": 1, \"application/x-www-form-urlencoded\": 1}, \"method\": {\"get\": 1, \"post\": 1}, \"name\": 1, \"novalidate\": 1, \"target\": {\"_blank\": 1, \"top\": 1}},\n \"fieldset\": {\"disabled\": 1, \"form\": 1, \"name\": 1},\n \"legend\": {},\n \"label\": {\"form\": 1, \"for\": 1},\n \"input\": {\n \"type\": {\"text\": 1, \"password\": 1, \"hidden\": 1, \"checkbox\": 1, \"submit\": 1, \"radio\": 1, \"file\": 1, \"button\": 1, \"reset\": 1, \"image\": 31, \"color\": 1, \"date\": 1, \"datetime\": 1, \"datetime-local\": 1, \"email\": 1, \"month\": 1, \"number\": 1, \"range\": 1, \"search\": 1, \"tel\": 1, \"time\": 1, \"url\": 1, \"week\": 1},\n \"accept\": 1, \"alt\": 1, \"autocomplete\": {\"on\": 1, \"off\": 1}, \"autofocus\": {\"autofocus\": 1}, \"checked\": {\"checked\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"formaction\": 1, \"formenctype\": {\"application/x-www-form-urlencoded\": 1, \"multipart/form-data\": 1, \"text/plain\": 1}, \"formmethod\": {\"get\": 1, \"post\": 1}, \"formnovalidate\": {\"formnovalidate\": 1}, \"formtarget\": {\"_blank\": 1, \"_self\": 1, \"_parent\": 1, \"_top\": 1}, \"height\": 1, \"list\": 1, \"max\": 1, \"maxlength\": 1, \"min\": 1, \"multiple\": {\"multiple\": 1}, \"name\": 1, \"pattern\": 1, \"placeholder\": 1, \"readonly\": {\"readonly\": 1}, \"acequired\": {\"acequired\": 1}, \"size\": 1, \"src\": 1, \"step\": 1, \"width\": 1, \"files\": 1, \"value\": 1},\n \"button\": {\"autofocus\": 1, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"formaction\": 1, \"formenctype\": 1, \"formmethod\": 1, \"formnovalidate\": 1, \"formtarget\": 1, \"name\": 1, \"value\": 1, \"type\": {\"button\": 1, \"submit\": 1}},\n \"select\": {\"autofocus\": 1, \"disabled\": 1, \"form\": 1, \"multiple\": {\"multiple\": 1}, \"name\": 1, \"size\": 1, \"readonly\":{\"readonly\": 1}},\n \"datalist\": {},\n \"optgroup\": {\"disabled\": 1, \"label\": 1},\n \"option\": {\"disabled\": 1, \"selected\": 1, \"label\": 1, \"value\": 1},\n \"textarea\": {\"autofocus\": {\"autofocus\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"maxlength\": 1, \"name\": 1, \"placeholder\": 1, \"readonly\": {\"readonly\": 1}, \"acequired\": {\"acequired\": 1}, \"rows\": 1, \"cols\": 1, \"wrap\": {\"on\": 1, \"off\": 1, \"hard\": 1, \"soft\": 1}},\n \"keygen\": {\"autofocus\": 1, \"challenge\": {\"challenge\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"keytype\": {\"rsa\": 1, \"dsa\": 1, \"ec\": 1}, \"name\": 1},\n \"output\": {\"for\": 1, \"form\": 1, \"name\": 1},\n \"progress\": {\"value\": 1, \"max\": 1},\n \"meter\": {\"value\": 1, \"min\": 1, \"max\": 1, \"low\": 1, \"high\": 1, \"optimum\": 1},\n \"details\": {\"open\": 1},\n \"summary\": {},\n \"command\": {\"type\": 1, \"label\": 1, \"icon\": 1, \"disabled\": 1, \"checked\": 1, \"radiogroup\": 1, \"command\": 1},\n \"menu\": {\"type\": 1, \"label\": 1},\n \"dialog\": {\"open\": 1}\n};\n\nvar elements = Object.keys(attributeMap);\n\nfunction is(token, type) {\n return token.type.lastIndexOf(type + \".xml\") > -1;\n}\n\nfunction findTagName(session, pos) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n while (token && !is(token, \"tag-name\")){\n token = iterator.stepBackward();\n }\n if (token)\n return token.value;\n}\n\nfunction findAttributeName(session, pos) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n while (token && !is(token, \"attribute-name\")){\n token = iterator.stepBackward();\n }\n if (token)\n return token.value;\n}\n\nvar HtmlCompletions = function() {\n\n};\n\n(function() {\n\n this.getCompletions = function(state, session, pos, prefix) {\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (is(token, \"tag-name\") || is(token, \"tag-open\") || is(token, \"end-tag-open\"))\n return this.getTagCompletions(state, session, pos, prefix);\n if (is(token, \"tag-whitespace\") || is(token, \"attribute-name\"))\n return this.getAttributeCompletions(state, session, pos, prefix);\n if (is(token, \"attribute-value\"))\n return this.getAttributeValueCompletions(state, session, pos, prefix);\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/&[a-z]*$/i.test(line))\n return this.getHTMLEntityCompletions(state, session, pos, prefix);\n\n return [];\n };\n\n this.getTagCompletions = function(state, session, pos, prefix) {\n return elements.map(function(element){\n return {\n value: element,\n meta: \"tag\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getAttributeCompletions = function(state, session, pos, prefix) {\n var tagName = findTagName(session, pos);\n if (!tagName)\n return [];\n var attributes = globalAttributes;\n if (tagName in attributeMap) {\n attributes = attributes.concat(Object.keys(attributeMap[tagName]));\n }\n return attributes.map(function(attribute){\n return {\n caption: attribute,\n snippet: attribute + '=\"$0\"',\n meta: \"attribute\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getAttributeValueCompletions = function(state, session, pos, prefix) {\n var tagName = findTagName(session, pos);\n var attributeName = findAttributeName(session, pos);\n \n if (!tagName)\n return [];\n var values = [];\n if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === \"object\") {\n values = Object.keys(attributeMap[tagName][attributeName]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"attribute value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getHTMLEntityCompletions = function(state, session, pos, prefix) {\n var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];\n\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"html entity\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(HtmlCompletions.prototype);\n\nexports.HtmlCompletions = HtmlCompletions;\n});\n\nace.define(\"ace/mode/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text\",\"ace/mode/javascript\",\"ace/mode/css\",\"ace/mode/html_highlight_rules\",\"ace/mode/behaviour/xml\",\"ace/mode/folding/html\",\"ace/mode/html_completions\",\"ace/worker/worker_client\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptMode = acequire(\"./javascript\").Mode;\nvar CssMode = acequire(\"./css\").Mode;\nvar HtmlHighlightRules = acequire(\"./html_highlight_rules\").HtmlHighlightRules;\nvar XmlBehaviour = acequire(\"./behaviour/xml\").XmlBehaviour;\nvar HtmlFoldMode = acequire(\"./folding/html\").FoldMode;\nvar HtmlCompletions = acequire(\"./html_completions\").HtmlCompletions;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar voidElements = [\"area\", \"base\", \"br\", \"col\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"menuitem\", \"param\", \"source\", \"track\", \"wbr\"];\nvar optionalEndTags = [\"li\", \"dt\", \"dd\", \"p\", \"rt\", \"rp\", \"optgroup\", \"option\", \"colgroup\", \"td\", \"th\"];\n\nvar Mode = function(options) {\n this.fragmentContext = options && options.fragmentContext;\n this.HighlightRules = HtmlHighlightRules;\n this.$behaviour = new XmlBehaviour();\n this.$completer = new HtmlCompletions();\n \n this.createModeDelegates({\n \"js-\": JavaScriptMode,\n \"css-\": CssMode\n });\n \n this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.blockComment = {start: \"\"};\n\n this.voidElements = lang.arrayToMap(voidElements);\n\n this.getNextLineIndent = function(state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function(state, line, input) {\n return false;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n if (this.constructor != Mode)\n return;\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/html */ \"../../../../brace@0.11.1/node_modules/brace/worker/html.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n if (this.fragmentContext)\n worker.call(\"setOptions\", [{context: this.fragmentContext}]);\n\n worker.on(\"error\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/html\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json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PYmplY3R8UmVnRXhwfFN0cmluZ3xQcm94eXxcIiAgKyAvLyBDb25zdHJ1Y3RvcnNcbiAgICAgICAgICAgIFwiTmFtZXNwYWNlfFFOYW1lfFhNTHxYTUxMaXN0fFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBFNFhcbiAgICAgICAgICAgIFwiQXJyYXlCdWZmZXJ8RmxvYXQzMkFycmF5fEZsb2F0NjRBcnJheXxJbnQxNkFycmF5fEludDMyQXJyYXl8SW50OEFycmF5fFwiICAgK1xuICAgICAgICAgICAgXCJVaW50MTZBcnJheXxVaW50MzJBcnJheXxVaW50OEFycmF5fFVpbnQ4Q2xhbXBlZEFycmF5fFwiICAgICAgICAgICAgICAgICAgICArXG4gICAgICAgICAgICBcIkVycm9yfEV2YWxFcnJvcnxJbnRlcm5hbEVycm9yfFJhbmdlRXJyb3J8UmVmZXJlbmNlRXJyb3J8U3RvcEl0ZXJhdGlvbnxcIiAgICsgLy8gRXJyb3JzXG4gICAgICAgICAgICBcIlN5bnRheEVycm9yfFR5cGVFcnJvcnxVUklFcnJvcnxcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiZGVjb2RlVVJJfGRlY29kZVVSSUNvbXBvbmVudHxlbmNvZGVVUkl8ZW5jb2RlVVJJQ29tcG9uZW50fGV2YWx8aXNGaW5pdGV8XCIgKyAvLyBOb24tY29uc3RydWN0b3IgZnVuY3Rpb25zXG4gICAgICAgICAgICBcImlzTmFOfHBhcnNlRmxvYXR8cGFyc2VJbnR8XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiSlNPTnxNYXRofFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBPdGhlclxuICAgICAgICAgICAgXCJ0aGlzfGFyZ3VtZ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NlfGRvfGVsc2V8ZmluYWxseXxpbnxpbnN0YW5jZW9mfHJldHVybnx0aHJvd3x0cnl8dHlwZW9mfHlpZWxkfHZvaWRcIjtcblxuICAgIHZhciBlc2NhcGVkUmUgPSBcIlxcXFxcXFxcKD86eFswLTlhLWZBLUZdezJ9fFwiICsgLy8gaGV4XG4gICAgICAgIFwidVswLTlhLWZBLUZdezR9fFwiICsgLy8gdW5pY29kZVxuICAgICAgICBcInV7WzAtOWEtZkEtRl17MSw2fX18XCIgKyAvLyBlczYgdW5pY29kZVxuICAgICAgICBcIlswLTJdWzAtN117MCwyfXxcIiArIC8vIG9jdFxuICAgICAgICBcIjNbMC03XVswLTddP3xcIiArIC8vIG9jdFxuICAgICAgICBcIls0LTddWzAtN10/fFwiICsgLy9vY3RcbiAgICAgICAgXCIuKVwiO1xuXG4gICAgdGhpcy4kcnVsZXMgPSB7XG4gICAgICAgIFwibm9fcmVnZXhcIiA6IFtcbiAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRTdGFydFJ1bGUoXCJkb2Mtc3RhcnRcIiksXG4gICAgICAgICAgICBjb21tZW50cyhcIm5vX3JlZ2V4XCIpLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiJyg/PS4pXCIsXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcIig/PS4pJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwicXFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleGFkZWNpbWFsLCBvY3RhbCBhbmQgYmluYXJ5XG4gICAgICAgICAgICAgICAgcmVnZXggOiAvMCg/Olt4WF1bMC05YS1mQS1GXSt8W29PXVswLTddK3xbYkJdWzAxXSspXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGRlY2ltYWwgaW50ZWdlcnMgYW5kIGZsb2F0c1xuICAgICAgICAgICAgICAgIHJlZ2V4IDogLyg/OlxcZFxcZCooPzpcXC5cXGQqKT98XFwuXFxkKykoPzpbZUVdWystXT9cXGQrXFxiKT8vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcImtleXdvcmQub3BlcmF0b3JcIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikocHJvdG90eXBlKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLCBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArXCIpKFxcXFxzKikoPSkoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInRleHRcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKykoXFxcXHcrKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoZnVuY3Rpb24pKFxcXFxzKykoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0XCIsIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFxzKikoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwidGV4dFwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiZnJvbSg/PVxcXFxzKignfFxcXCIpKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKD86XCIgKyBrd0JlZm9yZVJlICsgXCIpXFxcXGJcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdXBwb3J0LmNvbnN0YW50XCJdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL3RoYXRcXGIvXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdG9yYWdlLnR5cGVcIiwgXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLCBcInN1cHBvcnQuZnVuY3Rpb24uZmlyZWJ1Z1wiXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IC8oY29uc29sZSkoXFwuKSh3YXJufGluZm98bG9nfGVycm9yfHRpbWV8dHJhY2V8dGltZUVuZHxhc3NlcnQpXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDoga2V5d29yZE1hcHBlcixcbiAgICAgICAgICAgICAgICByZWdleCA6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1suXSg/IVsuXSkvLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJwcm9wZXJ0eVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogLz0+L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvLS18XFwrXFwrfFxcLnszfXw9PT18PT18PXwhPXwhPT18PCs9P3w+Kz0/fCF8JiZ8XFx8XFx8fFxcPzp8WyEkJSYqK1xcLX5cXC9eXT0/LyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1s/Oiw7Ll0vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXFsoe10vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXF0pfV0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXiMhLiokL1xuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBwcm9wZXJ0eTogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxccytcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKSg/OihcXFxccyspKFxcXFx3KykpPyhcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICA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ub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwic3RhcnRcIjogW1xuICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFN0YXJ0UnVsZShcImRvYy1zdGFydFwiKSxcbiAgICAgICAgICAgIGNvbW1lbnRzKFwic3RhcnRcIiksXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwvXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrfF4kXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwicmVnZXhcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5rZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXFxcXFxcXFwoPzp1W1xcXFxkYS1mQS1GXXs0fXx4W1xcXFxkYS1mQS1GXXsyfXwuKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIi9bc3huZ2lteV0qXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImludmFsaWRcIixcbiAgICAgICAgICAgICAgICByZWdleDogL1xce1xcZCtcXGIsP1xcZCpcXH1bKypdfFsrKiReP11bKypdfFskXl1bP118XFw/ezMsfS9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IC9cXChcXD9bOj0hXXxcXCl8XFx7XFxkK1xcYiw/XFxkKlxcfXxbKypdXFw/fFsoKSReKyo/Ll0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmRlbGltaXRlclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFx8L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFxbXFxePy8sXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmcucmVnZXhwXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5jaGFyY2xhc3Mua2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFxcXFxcKD86dVtcXFxcZGEtZkEtRl17NH18eFtcXFxcZGEtZkEtRl17Mn18LilcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIl1cIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcInJlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCItXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIiRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nLnJlZ2V4cC5jaGFyYWNodGVyY2xhc3NcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwidmFyaWFibGUucGFyYW1ldGVyXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiWywgXStcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiZW1wdHlcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJxcXN0cmluZ1wiIDogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IGVzY2FwZWRSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXFxcXFwkXCIsXG4gICAgICAgICAgICAgICAgY29uc3VtZUxpbmVFbmQgIDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcInwkJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcInFzdHJpbmdcIiA6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxcXFxcJFwiLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kICA6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIid8JFwiLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XG4gICAgICAgIF1cbiAgICB9O1xuXG5cbiAgICBpZiAoIW9wdGlvbnMgfHwgIW9wdGlvbnMubm9FUzYpIHtcbiAgICAgICAgdGhpcy4kcnVsZXMubm9fcmVnZXgudW5zaGlmdCh7XG4gICAgICAgICAgICByZWdleDogXCJbe31dXCIsIG9uTWF0Y2g6IGZ1bmN0aW9uKHZhbCwgc3RhdGUsIHN0YWNrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gdmFsID09IFwie1wiID8gdGhpcy5uZXh0U3RhdGUgOiBcIlwiO1xuICAgICAgICAgICAgICAgIGlmICh2YWwgPT0gXCJ7XCIgJiYgc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQoXCJzdGFydFwiLCBzdGF0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbCA9PSBcIn1cIiAmJiBzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmV4dC5pbmRleE9mKFwic3RyaW5nXCIpICE9IC0xIHx8IHRoaXMubmV4dC5pbmRleE9mKFwianN4XCIpICE9IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicGFyZW4ucXVhc2kuZW5kXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWwgPT0gXCJ7XCIgPyBcInBhcmVuLmxwYXJlblwiIDogXCJwYXJlbi5ycGFyZW5cIjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBuZXh0U3RhdGU6IFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnF1YXNpLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6IC9gLyxcbiAgICAgICAgICAgIHB1c2ggIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ucXVhc2kuc3RhcnRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9cXCR7LyxcbiAgICAgICAgICAgICAgICBwdXNoICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcucXVhc2kuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvYC8sXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZy5xdWFzaVwiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoIW9wdGlvbnMgfHwgb3B0aW9ucy5qc3ggIT0gZmFsc2UpXG4gICAgICAgICAgICBKU1guY2FsbCh0aGlzKTtcbiAgICB9XG5cbiAgICB0aGlzLmVtYmVkUnVsZXMoRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLCBcImRvYy1cIixcbiAgICAgICAgWyBEb2NDb21tZW50SGlnaGxpZ2h0UnVsZXMuZ2V0RW5kUnVsZShcIm5vX3JlZ2V4XCIpIF0pO1xuXG4gICAgdGhpcy5ub3JtYWxpemVSdWxlcygpO1xufTtcblxub29wLmluaGVyaXRzKEphdmFTY3JpcHRIaWdobGlnaHRSdWxlcywgVGV4dEhpZ2hsaWdodFJ1bGVzKTtcblxuZnVuY3Rpb24gSlNYKCkge1xuICAgIHZhciB0YWdSZWdleCA9IGlkZW50aWZpZXJSZS5yZXBsYWNlKFwiXFxcXGRcIiwgXCJcXFxcZFxcXFwtXCIpO1xuICAgIHZhciBqc3hUYWcgPSB7XG4gICAgICAgIG9uTWF0Y2ggOiBmdW5jdGlvbih2YWwsIHN0YXRlLCBzdGFjaykge1xuICAgICAgICAgICAgdmFyIG9mZnNldCA9IHZhbC5jaGFyQXQoMSkgPT0gXCIvXCIgPyAyIDogMTtcbiAgICAgICAgICAgIGlmIChvZmZzZXQgPT0gMSkge1xuICAgICAgICAgICAgICAgIGlmIChzdGF0ZSAhPSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sudW5zaGlmdCh0aGlzLm5leHQsIHRoaXMubmV4dFN0YXRlLCAwKTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQodGhpcy5uZXh0KTtcbiAgICAgICAgICAgICAgICBzdGFja1syXSsrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChvZmZzZXQgPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGF0ZSA9PSB0aGlzLm5leHRTdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICBzdGFja1sxXS0tO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW3tcbiAgICAgICAgICAgICAgICB0eXBlOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLlwiICsgKG9mZnNldCA9PSAxID8gXCJcIiA6IFwiZW5kLVwiKSArIFwidGFnLW9wZW4ueG1sXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbC5zbGljZSgwLCBvZmZzZXQpXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJtZXRhLnRhZy50YWctbmFtZS54bWxcIixcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLnN1YnN0cihvZmZzZXQpXG4gICAgICAgICAgICB9XTtcbiAgICAgICAgfSxcbiAgICAgICAgcmVnZXggOiBcIjwvP1wiICsgdGFnUmVnZXggKyBcIlwiLFxuICAgICAgICBuZXh0OiBcImpzeEF0dHJpYnV0ZXNcIixcbiAgICAgICAgbmV4dFN0YXRlOiBcImpzeFwiXG4gICAgfTtcbiAgICB0aGlzLiRydWxlcy5zdGFydC51bnNoaWZ0KGpzeFRhZyk7XG4gICAgdmFyIGpzeEpzUnVsZSA9IHtcbiAgICAgICAgcmVnZXg6IFwie1wiLFxuICAgICAgICB0b2tlbjogXCJwYXJlbi5xdWFzaS5zdGFydFwiLFxuICAgICAgICBwdXNoOiBcInN0YXJ0XCJcbiAgICB9O1xuICAgIHRoaXMuJHJ1bGVzLmpzeCA9IFtcbiAgICAgICAganN4SnNSdWxlLFxuICAgICAgICBqc3hUYWcsXG4gICAgICAgIHtpbmNsdWRlIDogXCJyZWZlcmVuY2VcIn0sXG4gICAgICAgIHtkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJ9XG4gICAgXTtcbiAgICB0aGlzLiRydWxlcy5qc3hBdHRyaWJ1dGVzID0gW3tcbiAgICAgICAgdG9rZW4gOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLnRhZy1jbG9zZS54bWxcIixcbiAgICAgICAgcmVnZXggOiBcIi8/PlwiLFxuICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsdWUsIGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50U3RhdGUgPT0gc3RhY2tbMF0pXG4gICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGFja1swXSA9PSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbMV0tLTtcbiAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5zcGxpY2UoMCwgMik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2tbMF0gfHwgXCJzdGFydFwiO1xuICAgICAgICAgICAgcmV0dXJuIFt7dHlwZTogdGhpcy50b2tlbiwgdmFsdWU6IHZhbHVlfV07XG4gICAgICAgIH0sXG4gICAgICAgIG5leHRTdGF0ZTogXCJqc3hcIlxuICAgIH0sXG4gICAganN4SnNSdWxlLFxuICAgIGNvbW1lbnRzKFwianN4QXR0cmlidXRlc1wiKSxcbiAgICB7XG4gICAgICAgIHRva2VuIDogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogdGFnUmVnZXhcbiAgICB9LCB7XG4gICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yLmF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogXCI9XCJcbiAgICB9LCB7XG4gICAgICAgIHRva2VuIDogXCJ0ZXh0LnRhZy13aGl0ZXNw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ZWdleCA6IFwiKD86JiNbMC05XSs7KXwoPzomI3hbMC05YS1mQS1GXSs7KXwoPzomW2EtekEtWjAtOV86XFxcXC4tXSs7KVwiXG4gICAgfV07XG59XG5cbmZ1bmN0aW9uIGNvbW1lbnRzKG5leHQpIHtcbiAgICByZXR1cm4gW1xuICAgICAgICB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLCAvLyBtdWx0aSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgIHJlZ2V4IDogL1xcL1xcKi8sXG4gICAgICAgICAgICBuZXh0OiBbXG4gICAgICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFRhZ1J1bGUoKSxcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcImNvbW1lbnRcIiwgcmVnZXggOiBcIlxcXFwqXFxcXC9cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXC9cXFxcL1wiLFxuICAgICAgICAgICAgbmV4dDogW1xuICAgICAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRUYWdSdWxlKCksXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJjb21tZW50XCIsIHJlZ2V4IDogXCIkfF5cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gICAgICAgIH1cbiAgICBdO1xufVxuZXhwb3J0cy5KYXZhU2NyaXB0SGlnaGxpZ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iAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMub3BlbmluZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByYW5nZSA9IHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGkgKyBtYXRjaFswXS5sZW5ndGgsIDEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocmFuZ2UgJiYgIXJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLmdldFNlY3Rpb25SYW5nZShzZXNzaW9uLCByb3cpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZFN0eWxlICE9IFwiYWxsXCIpXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvbGRTdHlsZSA9PT0gXCJtYXJrYmVnaW5cIilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0b3BNYXJrZXIpO1xuICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBpID0gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9zaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuXG4gICAgICAgICAgICByZXR1cm4gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSwgLTEpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldFNlY3Rpb25SYW5nZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdykge1xuICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICB2YXIgc3RhcnRJbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5sZW5ndGg7XG4gICAgICAgIHJvdyA9IHJvdyArIDE7XG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBpbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgICAgICBpZiAoaW5kZW50ID09PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICAoc3RhcnRJbmRlbnQgPiBpbmRlbnQpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB2YXIgc3ViUmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShzZXNzaW9uLCBcImFsbFwiLCByb3cpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc3ViUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3ViUmFuZ2Uuc3RhcnQucm93IDw9IHN0YXJ0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3ViUmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBzdWJSYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRJbmRlbnQgPT0gaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgc2Vzc2lvbi5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0Q29tbWVudFJlZ2lvbkJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgbGluZSwgcm93KSB7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUuc2VhcmNoKC9cXHMqJC8pO1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlID0gL15cXHMqKD86XFwvXFwqfFxcL1xcL3wtLSkjPyhlbmQpP3JlZ2lvblxcYi87XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIG0gPSByZS5leGVjKGxpbmUpO1xuICAgICAgICAgICAgaWYgKCFtKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChtWzFdKSBkZXB0aC0tO1xuICAgICAgICAgICAgZWxzZSBkZXB0aCsrO1xuXG4gICAgICAgICAgICBpZiAoIWRlcHRoKSBicmVhaztcbiAgICAgICAgfVxuXG4g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XG4gICAgICAgIHZhciB0b2tlbnMgPSB0b2tlbml6ZWRMaW5lLnRva2VucztcbiAgICAgICAgdmFyIGVuZFN0YXRlID0gdG9rZW5pemVkTGluZS5zdGF0ZTtcblxuICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCAmJiB0b2tlbnNbdG9rZW5zLmxlbmd0aC0xXS50eXBlID09IFwiY29tbWVudFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gaW5kZW50O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHN0YXRlID09IFwic3RhcnRcIiB8fCBzdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL14uKig/OlxcYmNhc2VcXGIuKjp8W1xce1xcKFxcW10pXFxzKiQvKTtcbiAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgIGluZGVudCArPSB0YWI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdGUgPT0gXCJkb2Mtc3RhcnRcIikge1xuICAgICAgICAgICAgaWYgKGVuZFN0YXRlID09IFwic3RhcnRcIiB8fCBlbmRTdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL15cXHMqKFxcLz8pXFwqLyk7XG4gICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgaW5kZW50ICs9IFwiIFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpbmRlbnQgKz0gXCIqIFwiO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGluZGVudDtcbiAgICB9O1xuXG4gICAgdGhp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wiXFxcXHtcIixcbiAgICAgICAgICAgIG5leHQ6ICBcInJ1bGVzZXRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFx9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nXCIsXG4gICAgICAgICAgICByZWdleDogXCJAXCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJtZWRpYVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIiNbYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIiVcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJ2YXJpYWJsZVwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXC5bYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgcmVnZXg6IFwiOlthLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIixcbiAgICAgICAgICAgIHJlZ2V4IDogbnVtUmVcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwiY29uc3RhbnRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlthLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgY2FzZUluc2Vuc2l0aXZlOiB0cnVlXG4gICAgICAgIH1dLFxuXG4gICAgICAgIFwibWVkaWFcIjogW3tcbiAgICAgICAgICAgIGluY2x1ZGUgOiBbXCJzdHJpbmdzXCIsIFwidXJsXCIsIFwiY29tbWVudHNcIl1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicGFyZW4ubHBhcmVuXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxce1wiLFxuICAgICAgICAgICAgbmV4dDogIFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFx9XCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgcmVnZXg6IFwiO1wiLFxuICAgICAgICAgICAgbmV4dDogIFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICByZWdleDogXCIoPzptZWRpYXxzdXBwb3J0c3xkb2N1bWVudHxjaGFyc2V0fGltcG9ydHxuYW1lc3BhY2V8bWVkaWF8c3VwcG9ydHN8ZG9jdW1lbnRcIlxuICAgICAgICAgICAgICAgICsgXCJ8cGFnZXxmb250fGtleWZyYW1lc3x2aWV3cG9ydHxjb3VudGVyLXN0eWxlfGZvbnQtZmVhdHVyZS12YWx1ZXNcIlxuICAgICAgICAgICAgICAgICsgXCJ8c3dhc2h8b3JuYW1lbnRzfGFubm90YXRpb258c3R5bGlzdGljfHN0eWxlc2V0fGNoYXJhY3Rlci12YXJpYW50KVwiXG4gICAgICAgIH1dLFxuXG4gICAgICAgIFwiY29tbWVudHNcIiA6IFt7XG4gICAgICAgICAgICB0b2tlbjogXCJjb21tZW50XCIsIC8vIG11bHRpIGxpbmUgY29tbWVudFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXC9cXFxcKlwiLFxuICAgICAgICAgICAgcHVzaDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcKlxcXFwvXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW4gOiBcImNvbW1lbnRcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfV0sXG5cbiAgICAgICAgXCJydWxlc2V0XCIgOiBbe1xuICAgICAgICAgICAgcmVnZXggOiBcIi0od2Via2l0fG1zfG1venxvKS1cIixcbiAgICAgICAgICAgIHRva2VuIDogXCJ0ZXh0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFx9XCIsXG4gICAgICAgICAgICBuZXh0IDogXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGUgOiBbXCJzdHJpbmdzXCIsIFwidXJsXCIsIFwiY29tbWVudHNcIl1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJjb25zdGFudC5udW1lcmljXCIsIFwia2V5d29yZFwiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBudW1SZSArIFwiKShjaHxjbXxkZWd8ZW18ZXh8ZnJ8Z2R8Z3JhZHxIenxpbnxrSHp8bW18bXN8cGN8cHR8cHh8cmFkfHJlbXxzfHR1cm58dmh8dm18dnd8JSlcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLFxuICAgICAgICAgICAgcmVnZXggOiBudW1SZVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAgLy8gaGV4NiBjb2xvclxuICAgICAgICAgICAgcmVnZXggOiBcIiNbYS1mMC05XXs2fVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleDMgY29sb3JcbiAgICAgICAgICAgIHJlZ2V4IDogXCIjW2EtZjAtOV17M31cIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFtcInB1bmN0dWF0aW9uXCIsIFwiZW50aXR5Lm90aGVyLmF0dHJpYnV0ZS1uYW1lLnBzZXVkby1lbGVtZW50LmNzc1wiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogcHNldWRvRWxlbWVudHNcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJwdW5jdHVhdGlvblwiLCBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS5wc2V1ZG8tY2xhc3MuY3NzXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBwc2V1ZG9DbGFzc2VzXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwidXJsXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBrZXl3b3JkTWFwcGVyLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwtP1thLXpBLVpfXVthLXpBLVowLTlfXFxcXC1dKlwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGNhc2VJbnNlbnNpdGl2ZTogdHJ1ZVxuICAgICAgICB9XSxcblxuICAgICAgICB1cmw6IFt7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3VwcG9ydC5mdW5jdGlvblwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIig/OnVybCg6Py1wcmVmaXgpP3xkb21haW58cmVnZXhwKVxcXFwoXCIsXG4gICAgICAgICAgICBwdXNoOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwpXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH1dLFxuXG4gICAgICAgIHN0cmluZ3M6IFt7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6IFwiJ1wiLFxuICAgICAgICAgICAgcHVzaCA6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5lbmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiJ3wkXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGluY2x1ZGUgOiBcImVzY2FwZXNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9cXFxcJC8sXG4gICAgICAgICAgICAgICAgY29uc3VtZUxpbmVFbmQ6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuc3RhcnRcIixcbiAgICAgICAgICAgIHJlZ2V4IDogJ1wiJyxcbiAgICAgICAgICAgIHB1c2ggOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAnXCJ8JCcsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGluY2x1ZGUgOiBcImVzY2FwZXNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb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IHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICctJyArIHgudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmICghcHJvcGVydHlNYXAuaGFzT3duUHJvcGVydHkobmFtZSkpXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5TWFwW25hbWVdID0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuY29tcGxldGlvbnNEZWZpbmVkID0gdHJ1ZTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRDb21wbGV0aW9ucyA9IGZ1bmN0aW9uKHN0YXRlLCBzZXNzaW9uLCBwb3MsIHByZWZpeCkge1xuICAgICAgICBpZiAoIXRoaXMuY29tcGxldGlvbnNEZWZpbmVkKSB7XG4gICAgICAgICAgICB0aGlzLmRlZmluZUNvbXBsZXRpb25zKCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdG9rZW4gPSBzZXNzaW9uLmdldFRva2VuQXQocG9zLnJvdywgcG9zLmNvbHVtbik7XG5cbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgaWYgKHN0YXRlPT09J3J1bGVzZXQnKXtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHBvcy5yb3cpLnN1YnN0cigwLCBwb3MuY29sdW1uKTtcbiAgICAgICAgICAgIGlmICgvOlteO10rJC8udGVzdChsaW5lKSkge1xuICAgICAgICAgICAgICAgIC8oW1xcd1xcLV0rKTpbXjpdKiQvLnRlc3QobGluZSk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRQcm9wZXJ0eVZhbHVlQ29tcGxldGlvbnMoc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRo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ID09PSAnOicpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJycsXG4gICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbikubWF0Y2goL15cXHMqOy8pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICc6OycsXG4gICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcImNvbG9uXCIsIFwiZGVsZXRpb25cIiwgZnVuY3Rpb24gKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgcmFuZ2UpIHtcbiAgICAgICAgdmFyIHNlbGVjdGVkID0gc2Vzc2lvbi5kb2MuZ2V0VGV4dFJhbmdlKHJhbmdlKTtcbiAgICAgICAgaWYgKCFyYW5nZS5pc011bHRpTGluZSgpICYmIHNlbGVjdGVkID09PSAnOicpIHtcbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHNlc3Npb24sIGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgICAgICBpZiAodG9rZW4gJiYgdG9rZW4udmFsdWUubWF0Y2goL1xccysvKSkge1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodG9rZW4gJiYgdG9rZW4udHlwZSA9PT0gJ3N1cHBvcnQudHlwZScpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZG9jLmdldExpbmUocmFuZ2Uuc3RhcnQucm93KTtcbiAgICAgICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcocmFuZ2UuZW5kLmNvbHVtbiwgcmFuZ2UuZW5kLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT09ICc7Jykge1xuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uICsrO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcInNlbWljb2xvblwiLCBcImluc2VydGlvblwiLCBmdW5jdGlvbiAoc3RhdGUsIGFjdGlvbiwgZWRpdG9yLCBzZXNzaW9uLCB0ZXh0KSB7XG4gICAgICAgIGlmICh0ZXh0ID09PSAnOycpIHtcbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09PSAnOycpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgIHRleHQ6ICcnLFxu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MuJHJ1bGVzID0ge1xuICAgICAgICBzdGFydCA6IFtcbiAgICAgICAgICAgIHt0b2tlbiA6IFwic3RyaW5nLmNkYXRhLnhtbFwiLCByZWdleCA6IFwiPFxcXFwhXFxcXFtDREFUQVxcXFxbXCIsIG5leHQgOiBcImNkYXRhXCJ9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1wicHVuY3R1YXRpb24uaW5zdHJ1Y3Rpb24ueG1sXCIsIFwia2V5d29yZC5pbnN0cnVjdGlvbi54bWxcIl0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIig8XFxcXD8pKFwiICsgdGFnUmVnZXggKyBcIilcIiwgbmV4dCA6IFwicHJvY2Vzc2luZ19pbnN0cnVjdGlvblwiXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge3Rva2VuIDogXCJjb21tZW50LnN0YXJ0LnhtbFwiLCByZWdleCA6IFwiPFxcXFwhLS1cIiwgbmV4dCA6IFwiY29tbWVudFwifSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcInhtbC1wZS5kb2N0eXBlLnhtbFwiLCBcInhtbC1wZS5kb2N0eXBlLnhtbFwiXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKDxcXFxcISkoRE9DVFlQRSkoPz1bXFxcXHNdKVwiLCBuZXh0IDogXCJkb2N0eXBlXCIsIGNhc2VJbnNlbnNpdGl2ZTogdHJ1ZVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJ0YWdcIn0sXG4gICAgICAgICAgICB7dG9rZW4gOiBcInRleHQuZW5kLXRhZy1vcGVuLnhtbFwiLCByZWdleDogXCI8L1wifSxcbiAgICAgICAgICAgIHt0b2tlbiA6IFwidGV4dC50YWctb3Blbi54bWxcIiwgcmVnZXg6IFwiPFwifSxcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJyZWZlcmVuY2VcIn0sXG4gICAgICAgICAgICB7ZGVmYXVsdFRva2VuIDogXCJ0ZXh0LnhtbFwifVxuICAgICAgICBdLFxuXG4gICAgICAgIHByb2Nlc3NpbmdfaW5zdHJ1Y3Rpb24gOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS5kZWNsLWF0dHJpYnV0ZS1uYW1lLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiB0YWdSZWdleFxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwia2V5d29yZC5vcGVyYXRvci5kZWNsLWF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiPVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwid2hpdGVzcGFjZVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwic3RyaW5nXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcInB1bmN0dWF0aW9uLnhtbC1kZWNsLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFw/PlwiLFxuICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICB9XSxcblxuICAgICAgICBkb2N0eXBlIDogW1xuICAgICAgICAgICAge2luY2x1ZGUgOiBcIndoaXRlc3BhY2VcIn0sXG4gICAgICAgICAgICB7aW5jbHVkZSA6IFwic3RyaW5nXCJ9LFxuICAgICAgICAgICAge3Rva2VuIDogXCJ4bWwtcGUuZG9jdHlwZS54bWxcIiwgcmVnZXggOiBcIj5cIiwgbmV4dCA6IFwic3RhcnRcIn0sXG4gICAgICAgICAgICB7dG9rZW4gOiBcInhtbC1wZS54bWxcIiwgcmVnZXggOiBcIlstX2EtekEtWjAtOTpdK1wifSxcbiAgICAgICAgICAgIHt0b2tlbiA6IFwicHVuY3R1YXRpb24uaW50LXN1YnNldFwiLCByZWdleCA6IFwiXFxcXFtcIiwgcHVzaCA6IFwiaW50X3N1YnNldFwifVxuICAgICAgICBdLFxuXG4gICAgICAgIGludF9zdWJzZXQgOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInRleHQueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicHVuY3R1YXRpb24uaW50LXN1YnNldC54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIl1cIixcbiAgICAgICAgICAgIG5leHQ6IFwicG9wXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJwdW5jdHVhdGlvbi5tYXJrdXAtZGVjbC54bWxcIiwgXCJrZXl3b3JkLm1hcmt1cC1kZWNsLnhtbFwiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPFxcXFwhKShcIiArIHRhZ1JlZ2V4ICsgXCIpXCIsXG4gICAgICAgICAgICBwdXNoIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxccytcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicHVuY3R1YXRpb24ubWFya3VwLWRlY2wueG1sXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIj5cIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJzdHJpbmdcIn1dXG4gICAgICAgIH1dLFxuXG4gICAgICAgIGNkYXRhIDogW1xuICAgICAgICAgICAge3Rva2VuIDogXCJzdHJpbmcuY2RhdGEueG1sXCIsIHJlZ2V4IDogXCJcXFxcXVxcXFxdPlwiLCBuZXh0IDogXCJzdGFydFwifSxcbiAgICAgICAgICAgIHt0b2tlbiA6IFwidGV4d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ICAgICAgICAgcmVnZXggOiBcIig/Oig8KXwoPC8pKSgoPzpcIiArIHRhZ1JlZ2V4ICsgXCI6KT9cIiArIHRhZ1JlZ2V4ICsgXCIpXCIsXG4gICAgICAgICAgICBuZXh0OiBbXG4gICAgICAgICAgICAgICAge2luY2x1ZGUgOiBcImF0dHJpYnV0ZXNcIn0sXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJtZXRhLnRhZy5wdW5jdHVhdGlvbi50YWctY2xvc2UueG1sXCIsIHJlZ2V4IDogXCIvPz5cIiwgbmV4dCA6IFwic3RhcnRcIn1cbiAgICAgICAgICAgIF1cbiAgICAgICAgfV0sXG5cbiAgICAgICAgdGFnX3doaXRlc3BhY2UgOiBbXG4gICAgICAgICAgICB7dG9rZW4gOiBcInRleHQudGFnLXdoaXRlc3BhY2UueG1sXCIsIHJlZ2V4IDogXCJcXFxccytcIn1cbiAgICAgICAgXSxcbiAgICAgICAgd2hpdGVzcGFjZSA6IFtcbiAgICAgICAgICAgIHt0b2tlbiA6IFwidGV4dC53aGl0ZXNwYWNlLnhtbFwiLCByZWdleCA6IFwiXFxcXHMrXCJ9XG4gICAgICAgIF0sXG4gICAgICAgIHN0cmluZzogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiJ1wiLFxuICAgICAgICAgICAgcHVzaCA6IFtcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcInN0cmluZy54bWxcIiwgcmVnZXg6IFwiJ1wiLCBuZXh0OiBcInBvcFwifSxcbiAgICAgICAgICAgICAgICB7ZGVmYXVsdFRva2VuIDogXCJzdHJpbmcueG1sXCJ9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6ICdcIicsXG4gICAgICAgICAgICBwdXNoIDogW1xuICAgICAgICAgICAgICAgIHt0b2tlbiA6IFwic3RyaW5nLnhtbFwiLCByZWdleDogJ1wiJywgbmV4dDogXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwic3RyaW5nLnhtbFwifVxuICAgICAgICAgICAgXVxuICAgICAgICB9XSxcblxuICAgICAgICBhdHRyaWJ1dGVzOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogdGFnUmVnZXhcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmQub3BlcmF0b3IuYXR0cmlidXRlLWVxdWFscy54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCI9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZTogXCJ0YWdfd2hpdGVzcGFjZVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwiYXR0cmlidXRlX3ZhbHVlXCJcbiAgICAgICAgfV0sXG5cbiAgICAgICAgYXR0cmlidXRlX3ZhbHVlOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5hdHRyaWJ1dGUtdmFsdWUueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiJ1wiLFxuICAgICAgICAgICAgcHVzaCA6IFtcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcInN0cmluZy5hdHRyaWJ1dGUtdmFsdWUueG1sXCIsIHJlZ2V4OiBcIidcIiwgbmV4dDogXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2luY2x1ZGUgOiBcImF0dHJfcmVmZXJlbmNlXCJ9LFxuICAgICAgICAgICAgICAgIHtkZWZhdWx0VG9rZW4gOiBcInN0cmluZy5hdHRyaWJ1dGUtdmFsdWUueG1sXCJ9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2Vu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sIG5leHQgOiBwcmVmaXggKyBcInN0YXJ0XCJ9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuJHJ1bGVzW3RhZyArIFwiLWVuZFwiXSA9IFtcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJhdHRyaWJ1dGVzXCJ9LFxuICAgICAgICAgICAge3Rva2VuIDogXCJtZXRhLnRhZy5wdW5jdHVhdGlvbi50YWctY2xvc2UueG1sXCIsIHJlZ2V4IDogXCIvPz5cIiwgIG5leHQ6IFwic3RhcnRcIixcbiAgICAgICAgICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsdWUsIGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc3BsaWNlKDApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy50b2tlbjtcbiAgICAgICAgICAgIH19XG4gICAgICAgIF07XG5cbiAgICAgICAgdGhpcy5lbWJlZFJ1bGVzKEhpZ2hsaWdodFJ1bGVzLCBwcmVmaXgsIFt7XG4gICAgICAgICAgICB0b2tlbjogW1wibWV0YS50YWcucHVuY3R1YXRpb24uZW5kLXRhZy1vcGVuLnhtbFwiLCBcIm1ldGEudGFnLlwiICsgdGFnICsgXCIudGFnLW5hbWUueG1sXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBcIig8LykoXCIgKyB0YWcgKyBcIig/PVxcXFxzfD58JCkpXCIsXG4gICAgICAgICAgICBuZXh0OiB0YWcgKyBcIi1lbmRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmcuY2RhdGEueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiPFxcXFwhXFxcXFtDREFUQVxcXFxbXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLmNkYXRhLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxdX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m9wZXJhdG9yLmF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiPVwiLFxuICAgICAgICAgICAgcHVzaCA6IFt7XG4gICAgICAgICAgICAgICAgaW5jbHVkZTogXCJ0YWdfd2hpdGVzcGFjZVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy51bnF1b3RlZC5hdHRyaWJ1dGUtdmFsdWUuaHRtbFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbXjw+PSdcXFwiYFxcXFxzXStcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZSA6IFwiYXR0cmlidXRlX3ZhbHVlXCJcbiAgICAgICAgfV0sXG4gICAgICAgIHRhZzogW3tcbiAgICAgICAgICAgIHRva2VuIDogZnVuY3Rpb24oc3RhcnQsIHRhZykge1xuICAgICAgICAgICAgICAgIHZhciBncm91cCA9IHRhZ01hcFt0YWddO1xuICAgICAgICAgICAgICAgIHJldHVybiBbXCJtZXRhLnRhZy5wdW5jdHVhdGlvbi5cIiArIChzdGFydCA9PSBcIjxcIiA/IFwiXCIgOiBcImVuZC1cIikgKyBcInRhZy1vcGVuLnhtbFwiLFxuICAgICAgICAgICAgICAgICAgICBcIm1ldGEudGFnXCIgKyAoZ3JvdXAgPyBcIi5cIiArIGdyb3VwIDogXCJcIikgKyBcIi50YWctbmFtZS54bWxcIl07XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVnZXggOiBcIig8Lz8pKFstX2EtekEtWjAtOTouXSspXCIsXG4gICAgIC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AgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCBjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKTtcbiAgICAgICAgICAgIHZhciB0b2tlbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbigpO1xuXG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09IHF1b3RlICYmIChpcyh0b2tlbiwgXCJhdHRyaWJ1dGUtdmFsdWVcIikgfHwgaXModG9rZW4sIFwic3RyaW5nXCIpKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuXG4gICAgICAgICAgICBpZiAoIXRva2VuKVxuICAgICAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICAgICAgd2hpbGUgKGlzKHRva2VuLCBcInRhZy13aGl0ZXNwYWNlXCIpIHx8IGlzKHRva2VuLCBcIndoaXRlc3BhY2VcIikpIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xu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AgICAgICAgICAgICAgIHZhciBmaXJzdENoYXIgPSB0b2tlbi52YWx1ZS5jaGFyQXQoMCk7XG4gICAgICAgICAgICAgICAgaWYgKGZpcnN0Q2hhciA9PSAnXCInIHx8IGZpcnN0Q2hhciA9PSBcIidcIikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGFzdENoYXIgPSB0b2tlbi52YWx1ZS5jaGFyQXQodG9rZW4udmFsdWUubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0b2tlbkVuZCA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW5FbmQgPiBwb3NpdGlvbi5jb2x1bW4gfHwgdG9rZW5FbmQgPT0gcG9zaXRpb24uY29sdW1uICYmIGZpcnN0Q2hhciAhPSBsYXN0Q2hhcilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB3aGlsZSAoIWlzKHRva2VuLCBcInRhZy1uYW1lXCIpKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT0gXCI8XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciB0b2tlblJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgdmFyIHRva2VuQ29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCk7XG4gICAgICAgICAgICBpZ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yYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcblxuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZihcInRhZy1jbG9zZVwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT0gXCIvPlwiKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgd2hpbGUgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZihcInRhZy1uYW1lXCIpID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghdG9rZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhciB0YWcgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgICAgICB2YXIgcm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICBpZiAoIXRva2VuIHx8IHRva2VuLnR5cGUuaW5kZXhPZihcImVuZC10YWdcIikgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy52b2lkRWxlbWVudHMgJiYgIXRoaXMudm9pZEVsZW1lbnRzW3RhZ10pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5leHRUb2tlbiA9IHNlc3Npb24uZ2V0VG9rZW5BdChjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKzEpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbmV4dEluZGVudCA9IHRoaXMuJGdldEluZGVudChsaW5lKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGVudCA9IG5leHRJbmRlbnQgKyBzZXNzaW9uLmdldFRhYlN0cmluZygpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0VG9rZW4gJiYgbmV4dFRva2VuLnZhbHVlID09PSBcIjwvXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogXCJcXG5cIiArIGluZGVudCArIFwiXFxuXCIgKyBuZXh0SW5kZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIGluZGVudC5sZW5ndGgsIDEsIGluZGVudC5sZW5ndGhdXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiBcIlxcblwiICsgaW5kZW50XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbn07XG5cbm9vcC5pbmhlcml0cyhYbWxCZWhhdmlvdXIsIEJlaGF2aW91cik7XG5cbmV4cG9ydHMuWG1sQmVoYXZpb3VyID0gWG1sQmVoYXZpb3VyO1xufSk7XG5cbmFjZS5kZWZpbmUoXCJhY2UvbW9kZS9mb2xkaW5nL21peGVkXCIsW1wicmVxdWlyZVwiLFwiZXhwb3J0c1wiLFwibW9kdWxlXCIsXCJhY2UvbGliL29vcFwiLFwiYWNlL21vZGUvZm9sZGluZy9mb2xkX21vZGVcIl0sIGZ1bmN0aW9uKGFjZXF1aXJlLC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ldHVybiBcIlwiO1xuXG4gICAgICAgIGlmICh0aGlzLl9maW5kRW5kVGFnSW5MaW5lKHNlc3Npb24sIHJvdywgdGFnLnRhZ05hbWUsIHRhZy5lbmQuY29sdW1uKSlcbiAgICAgICAgICAgIHJldHVybiBcIlwiO1xuXG4gICAgICAgIHJldHVybiBcInN0YXJ0XCI7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Q29tbWVudEZvbGRXaWRnZXQgPSBmdW5jdGlvbihzZXNzaW9uLCByb3cpIHtcbiAgICAgICAgaWYgKC9jb21tZW50Ly50ZXN0KHNlc3Npb24uZ2V0U3RhdGUocm93KSkgJiYgLzwhLS8udGVzdChzZXNzaW9uLmdldExpbmUocm93KSkpXG4gICAgICAgICAgICByZXR1cm4gXCJzdGFydFwiO1xuICAgICAgICByZXR1cm4gXCJcIjtcbiAgICB9O1xuICAgIHRoaXMuX2dldEZpcnN0VGFnSW5MaW5lID0gZnVuY3Rpb24oc2Vzc2lvbiwgcm93KSB7XG4gICAgICAgIHZhciB0b2tlbnMgPSBzZXNzaW9uLmdldFRva2Vucyhyb3cpO1xuICAgICAgICB2YXIgdGFnID0gbmV3IFRhZygpO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdG9rZW5zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgdG9rZW4gPSB0b2tlbnNbaV07XG4gICAgICAgICAgICBpZiAoaXModG9rZW4sIFwidGFnLW9wZW5cIikpIHtcbiAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiA9IHRhZy5zdGFydC5jb2x1bW4gKyB0b2tlbi52YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgdGFnLmNsb3NpbmcgPSBpcyh0b2tlbiwgXCJlbmQtdGFnLW9wZW5cIik7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbKytpXTtcbiAgICAgICAgICAgICAgICBpZiAoIXRva2VuKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB0YWcudGFnTmFtZSA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgICAgIHRhZy5lbmQuY29sdW1uICs9IHRva2VuLnZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBmb3IgKGkrKzsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHRva2Vuc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgdGFnLmVuZC5jb2x1bW4gKz0gdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXModG9rZW4sIFwidGFnLWNsb3NlXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuc2VsZkNsb3NpbmcgPSB0b2tlbi52YWx1ZSA9PSAnLz4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhZztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXModG9rZW4sIFwidGFnLWNsb3NlXCIpKSB7XG4gICAgICAgICAgICAgICAgdGFnLnNlbGZDbG9zaW5nID0gdG9rZW4udmFsdWUgPT0gJy8+JztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGFnLnN0YXJ0LmNvbHVtbiArPSB0b2tlbi52YWx1ZS5sZW5ndGg7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xuXG4gICAgdGhpcy5fZmluZEVuZFRhZ0luTGluZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdywgdGFnTmFtZSwgc3RhcnRDb2x1bW4pIHtcbiAgICAgICAgdmFyIHRva2VucyA9IHNlc3Npb24uZ2V0VG9rZW5zKHJvdyk7XG4gICAgICAgIHZhciBjb2x1bW4gPSAwO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIHRva2VuID0gdG9rZW5zW2ldO1xuICAgICAgICAgICAgY29sdW1uICs9IHRva2VuLnZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgIGlmIChjb2x1bW4gPCBzdGFydENvbHVtbilcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChpcyh0b2tlbiwgXCJlbmQtdGFnLW9wZW5cIikpIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IHRva2Vuc1tpICsgMV07XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnZhbHVlID09IHRhZ05hbWUpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xuICAgIHRoaXMuX3JlYWRUYWdGb3J3YXJkID0gZnVuY3Rpb24oaXRlcmF0b3IpIHtcbiAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICB2YXIgdGFnID0gbmV3IFRhZygpO1xuICAgICAgICBkbyB7XG4gICAgICAgICAgICBpZiAoaXModG9rZW4sIFwidGFnLW9wZW5cIikpIHtcbiAgICAgICAgICAgICAgICB0YWcuY2xvc2luZyA9IGlzKHRva2VuLCBcImVuZC10YWctb3BlblwiKTtcbiAgICAgICAgICAgICAgICB0YWcuc3RhcnQucm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICAgICAgdGFnLnN0YXJ0LmNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpcyh0b2tlbiwgXCJ0YWctbmFtZVwiKSkge1xuICAgICAgICAgICAgICAgIHRhZy50YWdOYW1lID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzKHRva2VuLCBcInRhZy1jbG9zZVwiKSkge1xuICAgICAgICAgICAgICAgIHRhZy5zZWxmQ2xvc2luZyA9IHRva2VuLnZhbHVlID09IFwiLz5cIjtcbiAgICAgICAgICAgICAgICB0YWcuZW5kLnJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgICAgIHRhZy5lbmQuY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyB0b2tlbi52YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlKHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKSk7XG5cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLl9yZWFkVGFnQmFja3dhcmQgPSBmdW5jdGlvbihpdGVyYXRvcikge1xuICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuXG4gICAgICAgIHZhciB0YWcgPSBuZXcgVGFnKCk7XG4gICAgICAgIGRvIHtcbiAgICAgICAgICAgIGlmIChpcyh0b2tlbiwgXCJ0YWctb3BlblwiKSkge1xuICAgICAgICAgICAgICAgIHRhZy5jbG9zaW5nID0gaXModG9rZW4sIFwiZW5kLXRhZy1vcGVuXCIpO1xuICAgICAgICAgICAgICAgIHRhZy5zdGFydC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgICAgICB0YWcuc3RhcnQuY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCk7XG4gICAgICAgICAgICAgICAgaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhZztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXModG9rZW4sIFwidGFnLW5hbWVcIikpIHtcbiAgICAgICAgICAgICAgICB0YWcudGFnTmFtZSA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpcyh0b2tlbiwgXCJ0YWctY2xvc2VcIikpIHtcbiAgICAgICAgICAgICAgICB0YWcuc2VsZkNsb3NpbmcgPSB0b2tlbi52YWx1ZSA9PSBcIi8+XCI7XG4gICAgICAgICAgICAgICAgdGFnLmVuZC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlKHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCkpO1xuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG4gICAgXG4gICAgdGhpcy5fcG9wID0gZnVuY3Rpb24oc3RhY2ssIHRhZykge1xuICAgICAgICB3aGlsZSAoc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciB0b3AgPSBzdGFja1tzdGFjay5sZW5ndGgtMV07XG4gICAgICAgICAgICBpZiAoIXRhZyB8fCB0b3AudGFnTmFtZSA9PSB0YWcudGFnTmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBzdGFjay5wb3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMub3B0aW9uYWxFbmRUYWdzLmhhc093blByb3BlcnR5KHRvcC50YWdOYW1lKSkge1xuICAgICAgICAgICAgICAgIHN0YWNrLnBvcCgpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uLCBmb2xkU3R5bGUsIHJvdykge1xuICAgICAgICB2YXIgZmlyc3RUYWcgPSB0aGlzLl9nZXRGaXJzdFRhZ0luTGluZShzZXNzaW9uLCByb3cpO1xuICAgICAgICBcbiAgICAgICAgaWYgKCFmaXJzdFRhZykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0Q29tbWVudEZvbGRXaWRnZXQoc2Vzc2lvbiwgcm93KVxuICAgICAgICAgICAgICAgICYmIHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIHNlc3Npb24uZ2V0TGluZShyb3cpLmxlbmd0aCk7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBpc0JhY2t3YXJkID0gZmlyc3RUYWcuY2xvc2luZyB8fCBmaXJzdFRhZy5zZWxmQ2xvc2luZztcbiAgICAgICAgdmFyIHN0YWNrID0gW107XG4gICAgICAgIHZhciB0YWc7XG4gICAgICAgIFxuICAgICAgICBpZiAoIWlzQmFja3dhcmQpIHtcbiAgICAgICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHNlc3Npb24sIHJvdywgZmlyc3RUYWcuc3RhcnQuY29sdW1uKTtcbiAgICAgICAgICAgIHZhciBzdGFydCA9IHtcbiAgICAgICAgICAgICAgICByb3c6IHJvdyxcbiAgICAgICAgICAgICAgICBjb2x1bW46IGZpcnN0VGFnLnN0YXJ0LmNvbHVtbiArIGZpcnN0VGFnLnRhZ05hbWUubGVuZ3RoICsgMlxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChmaXJzdFRhZy5zdGFydC5yb3cgPT0gZmlyc3RUYWcuZW5kLnJvdylcbiAgICAgICAgICAgICAgICBzdGFydC5jb2x1bW4gPSBmaXJzdFRhZy5lbmQuY29sdW1uO1xuICAgICAgICAgICAgd2hpbGUgKHRhZyA9IHRoaXMuX3JlYWRUYWdGb3J3YXJkKGl0ZXJhdG9yKSkge1xuICAgICAgICAgICAgICAgIGlmICh0YWcuc2VsZkNsb3NpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5zdGFydC5jb2x1bW4gKz0gdGFnLnRhZ05hbWUubGVuZ3RoICsgMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5lbmQuY29sdW1uIC09IDI7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyh0YWcuc3RhcnQsIHRhZy5lbmQpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAodGFnLmNsb3NpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcG9wKHN0YWNrLCB0YWcpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhY2subGVuZ3RoID09IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyhzdGFydCwgdGFnLnN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnB1c2godGFnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCByb3csIGZpcnN0VGFnLmVuZC5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIGVuZCA9IHtcbiAgICAgICAgICAgICAgICByb3c6IHJvdyxcbiAgICAgICAgICAgICAgICBjb2x1bW46IGZpcnN0VGFnLnN0YXJ0LmNvbHVtblxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgd2hpbGUgKHRhZyA9IHRoaXMuX3JlYWRUYWdCYWNrd2FyZChpdGVyYXRvcikpIHtcbiAgICAgICAgICAgICAgICBpZiAodGFnLnNlbGZDbG9zaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuc3RhcnQuY29sdW1uICs9IHRhZy50YWdOYW1lLmxlbmd0aCArIDI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiAtPSAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHModGFnLnN0YXJ0LCB0YWcuZW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKCF0YWcuY2xvc2luZykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9wb3Aoc3RhY2ssIHRhZyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGFjay5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFnLnN0YXJ0LmNvbHVtbiArPSB0YWcudGFnTmFtZS5sZW5ndGggKyAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRhZy5zdGFydC5yb3cgPT0gdGFnLmVuZC5yb3cgJiYgdGFnLnN0YXJ0LmNvbHVtbiA8IHRhZy5lbmQuY29sdW1uKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5zdGFydC5jb2x1bW4gPSB0YWcuZW5kLmNvbHVtbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHRhZy5zdGFydCwgZW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sucHVzaCh0YWcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBcbiAgICB9O1xuXG59KS5jYWxsKEZvbGRNb2RlLnByb3RvdHlwZSk7XG5cbn0pO1xuXG5hY2UuZGVmaW5lKFwiYWNlL21vZGUvZm9sZGluZy9odG1sXCIsW1wicmVxdWlyZVwiLFwiZXhwb3J0c1wiLFwibW9kdWxlXCIsXCJhY2UvbGliL29vcFwiLFwiYWNlL21vZGUvZm9sZGluZy9taXhlZFwiLFwiYWNlL21vZGUvZm9sZGluZy94bWxcIixcImFjZS9tb2RlL2ZvbGRpbmcvY3N0eWxlXCJdLCBmdW5jdGlvbihhY2VxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7XG5cInVzZSBzdHJpY3RcIjtcblxudmFyIG9vcCA9IGFjZXF1aXJlKFwiLi4vLi4vbGliL29vcFwiKTtcbnZhciBNaXhlZEZvbGRNb2RlID0gYWNlcXVpcmUoXCIuL21peGVkXCIpLkZvbGRNb2RlO1xudmFyIFhtbEZvbGRNb2RlID0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oZnVuY3Rpb24oZWxlbWVudCl7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBlbGVtZW50LFxuICAgICAgICAgICAgICAgIG1ldGE6IFwidGFnXCIsXG4gICAgICAgICAgICAgICAgc2NvcmU6IE51bWJlci5NQVhfVkFMVUVcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgIH07XG5cbiAgICB0aGlzLmdldEF0dHJpYnV0ZUNvbXBsZXRpb25zID0gZnVuY3Rpb24oc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KSB7XG4gICAgICAgIHZhciB0YWdOYW1lID0gZmluZFRhZ05hbWUoc2Vzc2lvbiwgcG9zKTtcbiAgICAgICAgaWYgKCF0YWdOYW1lKVxuICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICB2YXIgYXR0cmlidXRlcyA9IGdsb2JhbEF0dHJpYnV0ZXM7XG4gICAgICAgIGlmICh0YWdOYW1lIGluIGF0dHJpYnV0ZU1hcCkge1xuICAgICAgICAgICAgYXR0cmlidXRlcyA9IGF0dHJpYnV0ZXMuY29uY2F0KE9iamVjdC5rZXlzKGF0dHJpYnV0ZU1hcFt0YWdOYW1lXSkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBhdHRyaWJ1dGVzLm1hcChmdW5jdGlvbihhdHRyaWJ1dGUpe1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBjYXB0aW9uOiBhdHRyaWJ1dGUsXG4gICAgICAgICAgICAgICAgc25pcHBldDogYXR0cmlidXRlICsgJz1cIiQwXCInLFxuICAgICAgICAgICAgICAgIG1ldGE6IFwiYXR0cmlidXRlXCIsXG4gICAgICAgICAgICAgICAgc2NvcmU6IE51bWJlci5NQVhfVkFMVUVcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgIH07XG5cbiAgICB0aGlzLmdldEF0dHJpYnV0ZVZhbHVlQ29tcGxldGlvb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kY29tcGxldGVyLmdldENvbXBsZXRpb25zKHN0YXRlLCBzZXNzaW9uLCBwb3MsIHByZWZpeCk7XG4gICAgfTtcblxuICAgIHRoaXMuY3JlYXRlV29ya2VyID0gZnVuY3Rpb24oc2Vzc2lvbikge1xuICAgICAgICBpZiAodGhpcy5jb25zdHJ1Y3RvciAhPSBNb2RlKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgd29ya2VyID0gbmV3IFdvcmtlckNsaWVudChbXCJhY2VcIl0sIHJlcXVpcmUoXCIuLi93b3JrZXIvaHRtbFwiKSwgXCJXb3JrZXJcIik7XG4gICAgICAgIHdvcmtlci5hdHRhY2hUb0RvY3VtZW50KHNlc3Npb24uZ2V0RG9jdW1lbnQoKSk7XG5cbiAgICAgICAgaWYgKHRoaXMuZnJhZ21lbnRDb250ZXh0KVxuICAgICAgICAgICAgd29ya2VyLmNhbGwoXCJzZXRPcHRpb25zXCIsIFt7Y29udGV4dDogdGhpcy5mcmFnbWVudENvbnRleHR9XSk7XG5cbiAgICAgICAgd29ya2VyLm9uKFwiZXJyb3JcIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgc2Vzc2lvbi5zZXRBbm5vdGF0aW9ucyhlLmRhdGEpO1xuICAgICAgICB9KTtcblxuICAgICAgICB3b3JrZXIub24oXCJ0ZXJtaW5hdGVcIiwgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBzZXNzaW9uLmNsZWFyQW5ub3RhdGlvbnMoKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgcmV0dXJuIHdvcmtlcjtcbiAgICB9O1xuXG4gICAgdGhpcy4kaWQgPSBcImFjZS9tb2RlL2h0bWxcIjtcbn0pLmNhbGwoTW9kZS5wcm90b3R5cGUpO1xuXG5leHBvcnRzLk1vZGUgPSBNb2RlO1xufSk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/html.js\n"); + +/***/ }), + +/***/ "../../../../brace@0.11.1/node_modules/brace/mode/javascript.js": +/*!***************************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/javascript.js ***! + \***************************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports, __webpack_require__) { + +eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\n\nvar JavaScriptHighlightRules = function(options) {\n var keywordMapper = this.createKeywordMapper({\n \"variable.language\":\n \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\" , // Pseudo\n \"keyword\":\n \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|function|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\n \"storage.type\":\n \"const|let|var|function\",\n \"constant.language\":\n \"null|Infinity|NaN|undefined\",\n \"support.function\":\n \"alert\",\n \"constant.language.boolean\": \"true|false\"\n }, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n\n this.$rules = {\n \"no_regex\" : [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n {\n token : \"string\",\n regex : \"'(?=.)\",\n next : \"qstring\"\n }, {\n token : \"string\",\n regex : '\"(?=.)',\n next : \"qqstring\"\n }, {\n token : \"constant.numeric\", // hexadecimal, octal and binary\n regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token : \"constant.numeric\", // decimal integers and floats\n regex : /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"support.function\",\n \"punctuation.operator\", \"entity.name.function\", \"text\",\"keyword.operator\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(prototype)(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"text\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"keyword\",\n regex : \"from(?=\\\\s*('|\\\"))\"\n }, {\n token : \"keyword\",\n regex : \"(?:\" + kwBeforeRe + \")\\\\b\",\n next : \"start\"\n }, {\n token : [\"support.constant\"],\n regex : /that\\b/\n }, {\n token : [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex : /(console)(\\.)(warn|info|log|error|time|trace|timeEnd|assert)\\b/\n }, {\n token : keywordMapper,\n regex : identifierRe\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/,\n next : \"property\"\n }, {\n token : \"storage.type\",\n regex : /=>/\n }, {\n token : \"keyword.operator\",\n regex : /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next : \"start\"\n }, {\n token : \"punctuation.operator\",\n regex : /[?:,;.]/,\n next : \"start\"\n }, {\n token : \"paren.lparen\",\n regex : /[\\[({]/,\n next : \"start\"\n }, {\n token : \"paren.rparen\",\n regex : /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token : \"text\",\n regex : \"\\\\s+\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(?:(\\\\s+)(\\\\w+))?(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/\n }, {\n token : \"support.function\",\n regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|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(?=\\()/\n }, {\n token : \"support.function.dom\",\n 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|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token : \"support.constant\",\n 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/\n }, {\n token : \"identifier\",\n regex : identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token : \"text\",\n regex : \"\\\\s+|^$\",\n next : \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token : \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token : \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token : \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"function_arguments\": [\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \"[, ]+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : '\"|$',\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : \"'|$\",\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n\n\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function(val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token : \"string.quasi.start\",\n regex : /`/,\n push : [{\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"paren.quasi.start\",\n regex : /\\${/,\n push : \"start\"\n }, {\n token : \"string.quasi.end\",\n regex : /`/,\n next : \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n });\n\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n\n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"no_regex\") ]);\n\n this.normalizeRules();\n};\n\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\n\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch : function(val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n } else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex : \"\",\n onMatch : function(value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{type: this.token, value: value}];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n token : \"text.tag-whitespace.xml\",\n regex : \"\\\\s+\"\n }, {\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n stateName : \"jsx_attr_q\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n stateName : \"jsx_attr_qq\",\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\n\nfunction comments(next) {\n return [\n {\n token : \"comment\", // multi line comment\n regex : /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"\\\\*\\\\/\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }, {\n token : \"comment\",\n regex : \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"$|^\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = JavaScriptHighlightRules;\n \n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n this.$quotes = {'\"': '\"', \"'\": \"'\", \"`\": \"`\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n } else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/javascript */ \"../../../../brace@0.11.1/node_modules/brace/worker/javascript.js\"), \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(results) {\n session.setAnnotations(results.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/javascript\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzI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9vbGVhbnxEYXRlfEZ1bmN0aW9ufEl0ZXJhdG9yfE51bWJlcnxPYmplY3R8UmVnRXhwfFN0cmluZ3xQcm94eXxcIiAgKyAvLyBDb25zdHJ1Y3RvcnNcbiAgICAgICAgICAgIFwiTmFtZXNwYWNlfFFOYW1lfFhNTHxYTUxMaXN0fFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBFNFhcbiAgICAgICAgICAgIFwiQXJyYXlCdWZmZXJ8RmxvYXQzMkFycmF5fEZsb2F0NjRBcnJheXxJbnQxNkFycmF5fEludDMyQXJyYXl8SW50OEFycmF5fFwiICAgK1xuICAgICAgICAgICAgXCJVaW50MTZBcnJheXxVaW50MzJBcnJheXxVaW50OEFycmF5fFVpbnQ4Q2xhbXBlZEFycmF5fFwiICAgICAgICAgICAgICAgICAgICArXG4gICAgICAgICAgICBcIkVycm9yfEV2YWxFcnJvcnxJbnRlcm5hbEVycm9yfFJhbmdlRXJyb3J8UmVmZXJlbmNlRXJyb3J8U3RvcEl0ZXJhdGlvbnxcIiAgICsgLy8gRXJyb3JzXG4gICAgICAgICAgICBcIlN5bnRheEVycm9yfFR5cGVFcnJvcnxVUklFcnJvcnxcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiZGVjb2RlVVJJfGRlY29kZVVSSUNvbXBvbmVudHxlbmNvZGVVUkl8ZW5jb2RlVVJJQ29tcG9uZW50fGV2YWx8aXNGaW5pdGV8XCIgKyAvLyBOb24tY29uc3RydWN0b3IgZnVuY3Rpb25zXG4gICAgICAgICAgICBcImlzTmFOfHBhcnNlRmxvYXR8cGFyc2VJbnR8XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiSlNPTnxNYXRofFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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ZGVudGlmaWVyXCIpO1xuICAgIHZhciBrd0JlZm9yZVJlID0gXCJjYXNlfGRvfGVsc2V8ZmluYWxseXxpbnxpbnN0YW5jZW9mfHJldHVybnx0aHJvd3x0cnl8dHlwZW9mfHlpZWxkfHZvaWRcIjtcblxuICAgIHZhciBlc2NhcGVkUmUgPSBcIlxcXFxcXFxcKD86eFswLTlhLWZBLUZdezJ9fFwiICsgLy8gaGV4XG4gICAgICAgIFwidVswLTlhLWZBLUZdezR9fFwiICsgLy8gdW5pY29kZVxuICAgICAgICBcInV7WzAtOWEtZkEtRl17MSw2fX18XCIgKyAvLyBlczYgdW5pY29kZVxuICAgICAgICBcIlswLTJdWzAtN117MCwyfXxcIiArIC8vIG9jdFxuICAgICAgICBcIjNbMC03XVswLTddP3xcIiArIC8vIG9jdFxuICAgICAgICBcIls0LTddWzAtN10/fFwiICsgLy9vY3RcbiAgICAgICAgXCIuKVwiO1xuXG4gICAgdGhpcy4kcnVsZXMgPSB7XG4gICAgICAgIFwibm9fcmVnZXhcIiA6IFtcbiAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRTdGFydFJ1bGUoXCJkb2Mtc3RhcnRcIiksXG4gICAgICAgICAgICBjb21tZW50cyhcIm5vX3JlZ2V4XCIpLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiJyg/PS4pXCIsXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcIig/PS4pJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwicXFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleGFkZWNpbWFsLCBvY3RhbCBhbmQgYmluYXJ5XG4gICAgICAgICAgICAgICAgcmVnZXggOiAvMCg/Olt4WF1bMC05YS1mQS1GXSt8W29PXVswLTddK3xbYkJdWzAxXSspXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGRlY2ltYWwgaW50ZWdlcnMgYW5kIGZsb2F0c1xuICAgICAgICAgICAgICAgIHJlZ2V4IDogLyg/OlxcZFxcZCooPzpcXC5cXGQqKT98XFwuXFxkKykoPzpbZUVdWystXT9cXGQrXFxiKT8vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcImtleXdvcmQub3BlcmF0b3JcIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikocHJvdG90eXBlKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLCBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArXCIpKFxcXFxzKikoPSkoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInRleHRcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKykoXFxcXHcrKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoZnVuY3Rpb24pKFxcXFxzKykoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0XCIsIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFxzKikoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwidGV4dFwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiZnJvbSg/PVxcXFxzKignfFxcXCIpKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKD86XCIgKyBrd0JlZm9yZVJlICsgXCIpXFxcXGJcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdXBwb3J0LmNvbnN0YW50XCJdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL3RoYXRcXGIvXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdG9yYWdlLnR5cGVcIiwgXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLCBcInN1cHBvcnQuZnVuY3Rpb24uZmlyZWJ1Z1wiXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IC8oY29uc29sZSkoXFwuKSh3YXJufGluZm98bG9nfGVycm9yfHRpbWV8dHJhY2V8dGltZUVuZHxhc3NlcnQpXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDoga2V5d29yZE1hcHBlcixcbiAgICAgICAgICAgICAgICByZWdleCA6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1suXSg/IVsuXSkvLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJwcm9wZXJ0eVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogLz0+L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvLS18XFwrXFwrfFxcLnszfXw9PT18PT18PXwhPXwhPT18PCs9P3w+Kz0/fCF8JiZ8XFx8XFx8fFxcPzp8WyEkJSYqK1xcLX5cXC9eXT0/LyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1s/Oiw7Ll0vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXFsoe10vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXF0pfV0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXiMhLiokL1xuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBwcm9wZXJ0eTogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxccytcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKSg/OihcXFxccyspKFxcXFx3KykpPyhcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2t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HRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwic3RhcnRcIjogW1xuICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFN0YXJ0UnVsZShcImRvYy1zdGFydFwiKSxcbiAgICAgICAgICAgIGNvbW1lbnRzKFwic3RhcnRcIiksXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwvXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrfF4kXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwicmVnZXhcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5rZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXFxcXFxcXFwoPzp1W1xcXFxkYS1mQS1GXXs0fXx4W1xcXFxkYS1mQS1GXXsyfXwuKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIi9bc3huZ2lteV0qXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImludmFsaWRcIixcbiAgICAgICAgICAgICAgICByZWdleDogL1xce1xcZCtcXGIsP1xcZCpcXH1bKypdfFsrKiReP11bKypdfFskXl1bP118XFw/ezMsfS9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IC9cXChcXD9bOj0hXXxcXCl8XFx7XFxkK1xcYiw/XFxkKlxcfXxbKypdXFw/fFsoKSReKyo/Ll0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmRlbGltaXRlclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFx8L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFxbXFxePy8sXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmcucmVnZXhwXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5jaGFyY2xhc3Mua2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFxcXFxcKD86dVtcXFxcZGEtZkEtRl17NH18eFtcXFxcZGEtZkEtRl17Mn18LilcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIl1cIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcInJlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCItXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIiRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nLnJlZ2V4cC5jaGFyYWNodGVyY2xhc3NcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwidmFyaWFibGUucGFyYW1ldGVyXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiWywgXStcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiZW1wdHlcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJxcXN0cmluZ1wiIDogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IGVzY2FwZWRSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXFxcXFwkXCIsXG4gICAgICAgICAgICAgICAgY29uc3VtZUxpbmVFbmQgIDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcInwkJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcInFzdHJpbmdcIiA6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxcXFxcJFwiLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kICA6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIid8JFwiLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XG4gICAgICAgIF1cbiAgICB9O1xuXG5cbiAgICBpZiAoIW9wdGlvbnMgfHwgIW9wdGlvbnMubm9FUzYpIHtcbiAgICAgICAgdGhpcy4kcnVsZXMubm9fcmVnZXgudW5zaGlmdCh7XG4gICAgICAgICAgICByZWdleDogXCJbe31dXCIsIG9uTWF0Y2g6IGZ1bmN0aW9uKHZhbCwgc3RhdGUsIHN0YWNrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gdmFsID09IFwie1wiID8gdGhpcy5uZXh0U3RhdGUgOiBcIlwiO1xuICAgICAgICAgICAgICAgIGlmICh2YWwgPT0gXCJ7XCIgJiYgc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQoXCJzdGFydFwiLCBzdGF0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbCA9PSBcIn1cIiAmJiBzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmV4dC5pbmRleE9mKFwic3RyaW5nXCIpICE9IC0xIHx8IHRoaXMubmV4dC5pbmRleE9mKFwianN4XCIpICE9IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicGFyZW4ucXVhc2kuZW5kXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWwgPT0gXCJ7XCIgPyBcInBhcmVuLmxwYXJlblwiIDogXCJwYXJlbi5ycGFyZW5cIjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBuZXh0U3RhdGU6IFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnF1YXNpLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6IC9gLyxcbiAgICAgICAgICAgIHB1c2ggIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ucXVhc2kuc3RhcnRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9cXCR7LyxcbiAgICAgICAgICAgICAgICBwdXNoICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcucXVhc2kuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvYC8sXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZy5xdWFzaVwiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoIW9wdGlvbnMgfHwgb3B0aW9ucy5qc3ggIT0gZmFsc2UpXG4gICAgICAgICAgICBKU1guY2FsbCh0aGlzKTtcbiAgICB9XG5cbiAgICB0aGlzLmVtYmVkUnVsZXMoRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLCBcImRvYy1cIixcbiAgICAgICAgWyBEb2NDb21tZW50SGlnaGxpZ2h0UnVsZXMuZ2V0RW5kUnVsZShcIm5vX3JlZ2V4XCIpIF0pO1xuXG4gICAgdGhpcy5ub3JtYWxpemVSdWxlcygpO1xufTtcblxub29wLmluaGVyaXRzKEphdmFTY3JpcHRIaWdobGlnaHRSdWxlcywgVGV4dEhpZ2hsaWdodFJ1bGVzKTtcblxuZnVuY3Rpb24gSlNYKCkge1xuICAgIHZhciB0YWdSZWdleCA9IGlkZW50aWZpZXJSZS5yZXBsYWNlKFwiXFxcXGRcIiwgXCJcXFxcZFxcXFwtXCIpO1xuICAgIHZhciBqc3hUYWcgPSB7XG4gICAgICAgIG9uTWF0Y2ggOiBmdW5jdGlvbih2YWwsIHN0YXRlLCBzdGFjaykge1xuICAgICAgICAgICAgdmFyIG9mZnNldCA9IHZhbC5jaGFyQXQoMSkgPT0gXCIvXCIgPyAyIDogMTtcbiAgICAgICAgICAgIGlmIChvZmZzZXQgPT0gMSkge1xuICAgICAgICAgICAgICAgIGlmIChzdGF0ZSAhPSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sudW5zaGlmdCh0aGlzLm5leHQsIHRoaXMubmV4dFN0YXRlLCAwKTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQodGhpcy5uZXh0KTtcbiAgICAgICAgICAgICAgICBzdGFja1syXSsrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChvZmZzZXQgPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGF0ZSA9PSB0aGlzLm5leHRTdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICBzdGFja1sxXS0tO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW3tcbiAgICAgICAgICAgICAgICB0eXBlOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLlwiICsgKG9mZnNldCA9PSAxID8gXCJcIiA6IFwiZW5kLVwiKSArIFwidGFnLW9wZW4ueG1sXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbC5zbGljZSgwLCBvZmZzZXQpXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJtZXRhLnRhZy50YWctbmFtZS54bWxcIixcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLnN1YnN0cihvZmZzZXQpXG4gICAgICAgICAgICB9XTtcbiAgICAgICAgfSxcbiAgICAgICAgcmVnZXggOiBcIjwvP1wiICsgdGFnUmVnZXggKyBcIlwiLFxuICAgICAgICBuZXh0OiBcImpzeEF0dHJpYnV0ZXNcIixcbiAgICAgICAgbmV4dFN0YXRlOiBcImpzeFwiXG4gICAgfTtcbiAgICB0aGlzLiRydWxlcy5zdGFydC51bnNoaWZ0KGpzeFRhZyk7XG4gICAgdmFyIGpzeEpzUnVsZSA9IHtcbiAgICAgICAgcmVnZXg6IFwie1wiLFxuICAgICAgICB0b2tlbjogXCJwYXJlbi5xdWFzaS5zdGFydFwiLFxuICAgICAgICBwdXNoOiBcInN0YXJ0XCJcbiAgICB9O1xuICAgIHRoaXMuJHJ1bGVzLmpzeCA9IFtcbiAgICAgICAganN4SnNSdWxlLFxuICAgICAgICBqc3hUYWcsXG4gICAgICAgIHtpbmNsdWRlIDogXCJyZWZlcmVuY2VcIn0sXG4gICAgICAgIHtkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJ9XG4gICAgXTtcbiAgICB0aGlzLiRydWxlcy5qc3hBdHRyaWJ1dGVzID0gW3tcbiAgICAgICAgdG9rZW4gOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLnRhZy1jbG9zZS54bWxcIixcbiAgICAgICAgcmVnZXggOiBcIi8/PlwiLFxuICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsdWUsIGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50U3RhdGUgPT0gc3RhY2tbMF0pXG4gICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGFja1swXSA9PSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbMV0tLTtcbiAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5zcGxpY2UoMCwgMik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2tbMF0gfHwgXCJzdGFydFwiO1xuICAgICAgICAgICAgcmV0dXJuIFt7dHlwZTogdGhpcy50b2tlbiwgdmFsdWU6IHZhbHVlfV07XG4gICAgICAgIH0sXG4gICAgICAgIG5leHRTdGF0ZTogXCJqc3hcIlxuICAgIH0sXG4gICAganN4SnNSdWxlLFxuICAgIGNvbW1lbnRzKFwianN4QXR0cmlidXRlc1wiKSxcbiAgICB7XG4gICAgICAgIHRva2VuIDogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogdGFnUmVnZXhcbiAgICB9LCB7XG4gICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yLmF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogXCI9XCJcbiAgICB9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W5ndWFnZS5lc2NhcGUucmVmZXJlbmNlLnhtbFwiLFxuICAgICAgICByZWdleCA6IFwiKD86JiNbMC05XSs7KXwoPzomI3hbMC05YS1mQS1GXSs7KXwoPzomW2EtekEtWjAtOV86XFxcXC4tXSs7KVwiXG4gICAgfV07XG59XG5cbmZ1bmN0aW9uIGNvbW1lbnRzKG5leHQpIHtcbiAgICByZXR1cm4gW1xuICAgICAgICB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLCAvLyBtdWx0aSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgIHJlZ2V4IDogL1xcL1xcKi8sXG4gICAgICAgICAgICBuZXh0OiBbXG4gICAgICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFRhZ1J1bGUoKSxcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcImNvbW1lbnRcIiwgcmVnZXggOiBcIlxcXFwqXFxcXC9cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXC9cXFxcL1wiLFxuICAgICAgICAgICAgbmV4dDogW1xuICAgICAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRUYWdSdWxlKCksXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJjb21tZW50XCIsIHJlZ2V4IDogXCIkfF5cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gICAgICAgIH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ICAgICB2YXIgaSA9IG1hdGNoLmluZGV4O1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMub3BlbmluZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByYW5nZSA9IHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGkgKyBtYXRjaFswXS5sZW5ndGgsIDEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocmFuZ2UgJiYgIXJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLmdldFNlY3Rpb25SYW5nZShzZXNzaW9uLCByb3cpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZFN0eWxlICE9IFwiYWxsXCIpXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvbGRTdHlsZSA9PT0gXCJtYXJrYmVnaW5cIilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0b3BNYXJrZXIpO1xuICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBpID0gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9zaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuXG4gICAgICAgICAgICByZXR1cm4gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSwgLTEpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldFNlY3Rpb25SYW5nZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdykge1xuICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICB2YXIgc3RhcnRJbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5sZW5ndGg7XG4gICAgICAgIHJvdyA9IHJvdyArIDE7XG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBpbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgICAgICBpZiAoaW5kZW50ID09PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICAoc3RhcnRJbmRlbnQgPiBpbmRlbnQpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB2YXIgc3ViUmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShzZXNzaW9uLCBcImFsbFwiLCByb3cpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc3ViUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3ViUmFuZ2Uuc3RhcnQucm93IDw9IHN0YXJ0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3ViUmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBzdWJSYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRJbmRlbnQgPT0gaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgc2Vzc2lvbi5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0Q29tbWVudFJlZ2lvbkJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgbGluZSwgcm93KSB7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUuc2VhcmNoKC9cXHMqJC8pO1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlID0gL15cXHMqKD86XFwvXFwqfFxcL1xcL3wtLSkjPyhlbmQpP3JlZ2lvblxcYi87XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIG0gPSByZS5leGVjKGxpbmUpO1xuICAgICAgICAgICAgaWYgKCFtKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChtWzFdKSBkZXB0aC0tO1xuICAgICAgICAgICAgZWxzZSBkZXB0aCsrO1xuXG4gICA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VG9rZW5pemVyKCkuZ2V0TGluZVRva2VucyhsaW5lLCBzdGF0ZSk7XG4gICAgICAgIHZhciB0b2tlbnMgPSB0b2tlbml6ZWRMaW5lLnRva2VucztcbiAgICAgICAgdmFyIGVuZFN0YXRlID0gdG9rZW5pemVkTGluZS5zdGF0ZTtcblxuICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCAmJiB0b2tlbnNbdG9rZW5zLmxlbmd0aC0xXS50eXBlID09IFwiY29tbWVudFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gaW5kZW50O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHN0YXRlID09IFwic3RhcnRcIiB8fCBzdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL14uKig/OlxcYmNhc2VcXGIuKjp8W1xce1xcKFxcW10pXFxzKiQvKTtcbiAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgIGluZGVudCArPSB0YWI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdGUgPT0gXCJkb2Mtc3RhcnRcIikge1xuICAgICAgICAgICAgaWYgKGVuZFN0YXRlID09IFwic3RhcnRcIiB8fCBlbmRTdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL15cXHMqKFxcLz8pXFwqLyk7XG4gICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgaW5kZW50ICs9IFwiIFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpbmRlbnQgKz0gXCIqIFwiO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5c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RlO1xufSk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/javascript.js\n"); + +/***/ }), + +/***/ "../../../../brace@0.11.1/node_modules/brace/mode/jsx.js": +/*!********************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/jsx.js ***! + \********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.define(\"ace/mode/jsx_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar JsxHighlightRules = function() {\n var keywords = lang.arrayToMap(\n (\"break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|\" +\n \"if|throw|\" +\n \"delete|in|try|\" +\n \"class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|\" +\n \"number|int|string|boolean|variant|\" +\n \"log|assert\").split(\"|\")\n );\n \n var buildinConstants = lang.arrayToMap(\n (\"null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined\").split(\"|\")\n );\n \n var reserved = lang.arrayToMap(\n (\"debugger|with|\" +\n \"const|export|\" +\n \"let|private|public|yield|protected|\" +\n \"extern|native|as|operator|__fake__|__readonly__\").split(\"|\")\n );\n \n var identifierRe = \"[a-zA-Z_][a-zA-Z0-9_]*\\\\b\";\n \n this.$rules = {\n \"start\" : [\n {\n token : \"comment\",\n regex : \"\\\\/\\\\/.*$\"\n },\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n {\n token : \"comment\", // multi line comment\n regex : \"\\\\/\\\\*\",\n next : \"comment\"\n }, {\n token : \"string.regexp\",\n regex : \"[/](?:(?:\\\\[(?:\\\\\\\\]|[^\\\\]])+\\\\])|(?:\\\\\\\\/|[^\\\\]/]))*[/]\\\\w*\\\\s*(?=[).,;]|$)\"\n }, {\n token : \"string\", // single line\n regex : '[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]'\n }, {\n token : \"string\", // single line\n regex : \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"\n }, {\n token : \"constant.numeric\", // hex\n regex : \"0[xX][0-9a-fA-F]+\\\\b\"\n }, {\n token : \"constant.numeric\", // float\n regex : \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"\n }, {\n token : \"constant.language.boolean\",\n regex : \"(?:true|false)\\\\b\"\n }, {\n token : [\n \"storage.type\",\n \"text\",\n \"entity.name.function\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")\"\n }, {\n token : function(value) {\n if (value == \"this\")\n return \"variable.language\";\n else if (value == \"function\")\n return \"storage.type\";\n else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value))\n return \"keyword\";\n else if (buildinConstants.hasOwnProperty(value))\n return \"constant.language\";\n else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value))\n return \"language.support.class\";\n else\n return \"identifier\";\n },\n regex : identifierRe\n }, {\n token : \"keyword.operator\",\n regex : \"!|%|&|\\\\*|\\\\-\\\\-|\\\\-|\\\\+\\\\+|\\\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\\\|\\\\||\\\\?\\\\:|\\\\*=|%=|\\\\+=|\\\\-=|&=|\\\\^=|\\\\b(?:in|instanceof|new|delete|typeof|void)\"\n }, {\n token : \"punctuation.operator\",\n regex : \"\\\\?|\\\\:|\\\\,|\\\\;|\\\\.\"\n }, {\n token : \"paren.lparen\",\n regex : \"[[({<]\"\n }, {\n token : \"paren.rparen\",\n regex : \"[\\\\])}>]\"\n }, {\n token : \"text\",\n regex : \"\\\\s+\"\n }\n ],\n \"comment\" : [\n {\n token : \"comment\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : \"start\"\n }, {\n defaultToken : \"comment\"\n }\n ]\n };\n \n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"start\") ]);\n};\n\noop.inherits(JsxHighlightRules, TextHighlightRules);\n\nexports.JsxHighlightRules = JsxHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/jsx\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/jsx_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JsxHighlightRules = acequire(\"./jsx_highlight_rules\").JsxHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nfunction Mode() {\n this.HighlightRules = JsxHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n}\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\") {\n var match = line.match(/^.*[\\{\\(\\[]\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.$id = \"ace/mode/jsx\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9icmFjZUAwLjExLjEvbm9kZV9tb2R1bGVzL2JyYWNlL21vZGUvanN4LmpzP2Q1M2EiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUdBOztBQUVBLENBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQSxpR0FBaUc7QUFDakcsYUFBYTtBQUNiO0FBQ0E7QUFDQSxhQUFhO0FBQ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AgICBuZXh0IDogXCJjb21tZW50XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbL10oPzooPzpcXFxcWyg/OlxcXFxcXFxcXXxbXlxcXFxdXSkrXFxcXF0pfCg/OlxcXFxcXFxcL3xbXlxcXFxdL10pKSpbL11cXFxcdypcXFxccyooPz1bKS4sO118JClcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIiwgLy8gc2luZ2xlIGxpbmVcbiAgICAgICAgICAgICAgICByZWdleCA6ICdbXCJdKD86KD86XFxcXFxcXFwuKXwoPzpbXlwiXFxcXFxcXFxdKSkqP1tcIl0nXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZ1wiLCAvLyBzaW5nbGUgbGluZVxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbJ10oPzooPzpcXFxcXFxcXC4pfCg/OlteJ1xcXFxcXFxcXSkpKj9bJ11cIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIwW3hYXVswLTlhLWZBLUZdK1xcXFxiXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAvLyBmbG9hdFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbKy1dP1xcXFxkKyg/Oig/OlxcXFwuXFxcXGQqKT8oPzpbZUVdWystXT9cXFxcZCspPyk/XFxcXGJcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5ib29sZWFuXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIig/OnRydWV8ZmFsc2UpXFxcXGJcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKGZ1bmN0aW9uKShcXFxccyspKFwiICsgaWRlbnRpZmllclJlICsgXCIpXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IGZ1bmN0aW9uKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PSBcInRoaXNcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcInZhcmlhYmxlLmxhbmd1YWdlXCI7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlID09IFwiZnVuY3Rpb25cIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcInN0b3JhZ2UudHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChrZXl3b3Jkcy5oYXNPd25Qcm9wZXJ0eSh2YWx1ZSkgfHwgcmVzZXJ2ZWQuaGFzT3duUHJvcGVydHkodmFsdWUpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwia2V5d29yZFwiO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChidWlsZGluQ29uc3RhbnRzLmhhc093blByb3BlcnR5KHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImNvbnN0YW50Lmxhbmd1YWdlXCI7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKC9eXz9bQS1aXVthLXpBLVowLTlfXSokLy50ZXN0KHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImxhbmd1YWdlLnN1cHBvcnQuY2xhc3NcIjtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiaWRlbnRpZmllclwiO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBpZGVudGlmaWVyUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwia2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIhfCV8JnxcXFxcKnxcXFxcLVxcXFwtfFxcXFwtfFxcXFwrXFxcXCt8XFxcXCt8fnw9PXw9fCE9fDw9fD49fDw8PXw+Pj18Pj4+PXw8Pnw8fD58IXwmJnxcXFxcfFxcXFx8fFxcXFw/XFxcXDp8XFxcXCo9fCU9fFxcXFwrPXxcXFxcLT18Jj18XFxcXF49fFxcXFxiKD86aW58aW5zdGFuY2VvZnxuZXd8ZGVsZXRlfHR5cGVvZnx2b2lkKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFw/fFxcXFw6fFxcXFwsfFxcXFw7fFxcXFwuXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ubHBhcmVuXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIltbKHs8XVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbXFxcXF0pfT5dXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6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b3cgPSByb3c7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBpbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgICAgICBpZiAoaW5kZW50ID09PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICAoc3RhcnRJbmRlbnQgPiBpbmRlbnQpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB2YXIgc3ViUmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShzZXNzaW9uLCBcImFsbFwiLCByb3cpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc3ViUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3ViUmFuZ2Uuc3RhcnQucm93IDw9IHN0YXJ0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3ViUmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBzdWJSYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRJbmRlbnQgPT0gaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgc2Vzc2lvbi5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0Q29tbWVudFJlZ2lvbkJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgbGluZSwgcm93KSB7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUuc2VhcmNoKC9cXHMqJC8pO1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlID0gL15cXHMqKD86XFwvXFwqfFxcL1xcL3wtLSkjPyhlbmQpP3JlZ2lvblxcYi87XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIG0gPSByZS5leGVjKGxpbmUpO1xuICAgICAgICAgICAgaWYgKCFtKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChtWzFdKSBkZXB0aC0tO1xuICAgICAgICAgICAgZWxzZSBkZXB0aCsrO1xuXG4gICAgICAgICAgICBpZiAoIWRlcHRoKSBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIGlmIChlbmRSb3cgPiBzdGFydFJvdykge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgbGluZS5sZW5ndGgpO1xuICAgICAgICB9XG4gICAgfTtcblxufSkuY2FsbChGb2xkTW9kZS5wcm90b3R5cGUpO1xuXG59KTtcblxuYWNlLmRlZmluZShcImFjZS9tb2RlL2pzeFwiLFtcInJlcXVpcmVcIixcImV4cG9ydHNcIixcIm1vZHVsZVwiLFwiYWNlL2xpYi9vb3BcIixcImFjZS9tb2RlL3RleHRcIixcImFjZS9tb2RlL2pzeF9oaW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uKGZ1bmN0aW9uKCkge1xuXG4gICAgdGhpcy5saW5lQ29tbWVudFN0YXJ0ID0gXCIvL1wiO1xuICAgIHRoaXMuYmxvY2tDb21tZW50ID0ge3N0YXJ0OiBcIi8qXCIsIGVuZDogXCIqL1wifTtcblxuICAgIHRoaXMuZ2V0TmV4dExpbmVJbmRlbnQgPSBmdW5jdGlvbihzdGF0ZSwgbGluZSwgdGFiKSB7XG4gICAgICAgIHZhciBpbmRlbnQgPSB0aGlzLiRnZXRJbmRlbnQobGluZSk7XG5cbiAgICAgICAgdmFyIHRva2VuaXplZExpbmUgPSB0aGlzLmdldFRva2VuaXplcigpLmdldExpbmVUb2tlbnMobGluZSwgc3RhdGUpO1xuICAgICAgICB2YXIgdG9rZW5zID0gdG9rZW5pemVkTGluZS50b2tlbnM7XG5cbiAgICAgICAgaWYgKHRva2Vucy5sZW5ndGggJiYgdG9rZW5zW3Rva2Vucy5sZW5ndGgtMV0udHlwZSA9PSBcImNvbW1lbnRcIikge1xuICAgICAgICAgICAgcmV0dXJuIGluZGVudDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzdGF0ZSA9PSBcInN0YXJ0XCIpIHtcbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL14uKltcXHtcXChcXFtdXFxzKiQvKTtcbiAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgIGluZGVudCArPSB0YWI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaW5kZW50O1xuICAgIH07XG5cbiAgICB0aGlzLmNoZWNrT3V0ZGVudCA9IGZ1bmN0aW9uKHN0YXRlLCBsaW5lLCBpbnB1dCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kb3V0ZGVudC5jaGVja091dGRlbnQobGluZSwgaW5wdXQpO1xuICAgIH07XG5cbiAgICB0aGlzLmF1dG9PdXRkZW50ID0gZnVuY3Rpb24oc3RhdGUsIGRvYywgcm93KSB7XG4gICAgICAgIHRoaXMuJG91dGRlbnQuYXV0b091dGRlbnQoZG9jLCByb3cpO1xuICAgIH07XG5cbiAgICB0aGlzLiRpZCA9IFwiYWNlL21vZGUvanN4XCI7XG59KS5jYWxsKE1vZGUucHJvdG90eXBlKTtcblxuZXhwb3J0cy5Nb2RlID0gTW9kZTtcbn0pO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/jsx.js\n"); + +/***/ }), + +/***/ "../../../../brace@0.11.1/node_modules/brace/worker/css.js": +/*!**********************************************************************************************************!*\ + !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/worker/css.js ***! + \**********************************************************************************************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +eval("module.exports.id = 'ace/mode/css_worker';\nmodule.exports.src = \"\\\"no use strict\\\";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\\\"\\\";testPath;){var alias=paths[testPath];if(\\\"string\\\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\\\/*$/,\\\"/\\\")+(tail||alias.main||alias.name);if(alias===!1)return\\\"\\\";var i=testPath.lastIndexOf(\\\"/\\\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\\\"log\\\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\\\"error\\\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\\\"!\\\")){var chunks=moduleName.split(\\\"!\\\");return window.normalizeModule(parentId,chunks[0])+\\\"!\\\"+window.normalizeModule(parentId,chunks[1])}if(\\\".\\\"==moduleName.charAt(0)){var base=parentId.split(\\\"/\\\").slice(0,-1).join(\\\"/\\\");for(moduleName=(base?base+\\\"/\\\":\\\"\\\")+moduleName;-1!==moduleName.indexOf(\\\".\\\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\\\.\\\\//,\\\"\\\").replace(/\\\\/\\\\.\\\\//,\\\"/\\\").replace(/[^\\\\/]+\\\\/\\\\.\\\\.\\\\//,\\\"\\\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\\\"worker.js acequire() accepts only (parentId, id) as arguments\\\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\\\"unable to load \\\"+id);var path=resolveModuleId(id,window.acequire.tlns);return\\\".js\\\"!=path.slice(-3)&&(path+=\\\".js\\\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\\\"string\\\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\\\"function\\\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\\\"require\\\",\\\"exports\\\",\\\"module\\\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\\\"require\\\":return req;case\\\"exports\\\":return module.exports;case\\\"module\\\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\\\"ace/lib/event_emitter\\\").EventEmitter,oop=window.acequire(\\\"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};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\\\"Unknown command:\\\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\\\"ace/lib/es5-shim\\\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define(\\\"ace/lib/oop\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},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/lang\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.last=function(a){return a[a.length-1]},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 deepCopy(obj){if(\\\"object\\\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if(\\\"[object Object]\\\"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(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(/ [\\\"+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/apply_delta\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\\\"\\\";switch(delta.action){case\\\"insert\\\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\\\"remove\\\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\\\"ace/lib/event_emitter\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";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),listeners=listeners.slice();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){listeners=listeners.slice();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){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},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/anchor\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/lib/event_emitter\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.columnthis.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.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._signal(\\\"change\\\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\\\"change\\\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\\\"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/document\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/apply_delta\\\",\\\"ace/lib/event_emitter\\\",\\\"ace/range\\\",\\\"ace/anchor\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),applyDelta=acequire(\\\"./apply_delta\\\").applyDelta,EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Range=acequire(\\\"./range\\\").Range,Anchor=acequire(\\\"./anchor\\\").Anchor,Document=function(textOrLines){this.$lines=[\\\"\\\"],0===textOrLines.length?this.$lines=[\\\"\\\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).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._signal(\\\"changeNewLineMode\\\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\\\"windows\\\":return\\\"\\\\r\\\\n\\\";case\\\"unix\\\":return\\\"\\\\n\\\";default:return this.$autoNewLine||\\\"\\\\n\\\"}},this.$autoNewLine=\\\"\\\",this.$newLineMode=\\\"auto\\\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\\\"changeNewLineMode\\\"))},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){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\\\"\\\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\\\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\\\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\\\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\\\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\\\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\\\"),this.insertMergedLines(position,[\\\"\\\",\\\"\\\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},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):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\\\"\\\"]),column=0):(lines=[\\\"\\\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\\\"remove\\\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\\\"remove\\\",lines:[\\\"\\\",\\\"\\\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\\\"insert\\\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\\\"change\\\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\\\"\\\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\\\"insert\\\"==delta.action?\\\"remove\\\":\\\"insert\\\",lines:delta.lines.slice()})},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+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\\\"ace/worker/mirror\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/range\\\",\\\"ace/document\\\",\\\"ace/lib/lang\\\"],function(acequire,exports){\\\"use strict\\\";acequire(\\\"../range\\\").Range;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){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:\\\"insert\\\",start:data[i],lines:data[i+1]};else var d={action:\\\"remove\\\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(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(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\\\"ace/mode/css/csslint\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports,module){function objectToString(o){return Object.prototype.toString.call(o)}function clone(parent,circular,depth,prototype){function _clone(parent,depth){if(null===parent)return null;if(0==depth)return parent;var child;if(\\\"object\\\"!=typeof parent)return parent;if(util.isArray(parent))child=[];else if(util.isRegExp(parent))child=RegExp(parent.source,util.getRegExpFlags(parent)),parent.lastIndex&&(child.lastIndex=parent.lastIndex);else if(util.isDate(parent))child=new Date(parent.getTime());else{if(useBuffer&&Buffer.isBuffer(parent))return child=new Buffer(parent.length),parent.copy(child),child;child=prototype===void 0?Object.create(Object.getPrototypeOf(parent)):Object.create(prototype)}if(circular){var index=allParents.indexOf(parent);if(-1!=index)return allChildren[index];allParents.push(parent),allChildren.push(child)}for(var i in parent)child[i]=_clone(parent[i],depth-1);return child}var allParents=[],allChildren=[],useBuffer=\\\"undefined\\\"!=typeof Buffer;return circular===void 0&&(circular=!0),depth===void 0&&(depth=1/0),_clone(parent,depth)}function Reporter(lines,ruleset){this.messages=[],this.stats=[],this.lines=lines,this.ruleset=ruleset}var parserlib={};(function(){function EventTarget(){this._listeners={}}function StringReader(text){this._input=text.replace(/\\\\n\\\\r?/g,\\\"\\\\n\\\"),this._line=1,this._col=1,this._cursor=0}function SyntaxError(message,line,col){this.col=col,this.line=line,this.message=message}function SyntaxUnit(text,line,col,type){this.col=col,this.line=line,this.text=text,this.type=type}function TokenStreamBase(input,tokenData){this._reader=input?new StringReader(\\\"\\\"+input):null,this._token=null,this._tokenData=tokenData,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}EventTarget.prototype={constructor:EventTarget,addListener:function(type,listener){this._listeners[type]||(this._listeners[type]=[]),this._listeners[type].push(listener)},fire:function(event){if(\\\"string\\\"==typeof event&&(event={type:event}),event.target!==void 0&&(event.target=this),event.type===void 0)throw Error(\\\"Event object missing 'type' property.\\\");if(this._listeners[event.type])for(var listeners=this._listeners[event.type].concat(),i=0,len=listeners.length;len>i;i++)listeners[i].call(this,event)},removeListener:function(type,listener){if(this._listeners[type])for(var listeners=this._listeners[type],i=0,len=listeners.length;len>i;i++)if(listeners[i]===listener){listeners.splice(i,1);break}}},StringReader.prototype={constructor:StringReader,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(count){var c=null;return count=count===void 0?1:count,this._cursori;i++)nameMap.push(tokenData[i].name),tokenData[tokenData[i].name]=i,tokenData[i].text&&(typeMap[tokenData[i].text]=i);return tokenData.name=function(tt){return nameMap[tt]},tokenData.type=function(c){return typeMap[c]},tokenData},TokenStreamBase.prototype={constructor:TokenStreamBase,match:function(tokenTypes,channel){tokenTypes instanceof Array||(tokenTypes=[tokenTypes]);\\nfor(var tt=this.get(channel),i=0,len=tokenTypes.length;len>i;)if(tt==tokenTypes[i++])return!0;return this.unget(),!1},mustMatch:function(tokenTypes){var token;if(tokenTypes instanceof Array||(tokenTypes=[tokenTypes]),!this.match.apply(this,arguments))throw token=this.LT(1),new SyntaxError(\\\"Expected \\\"+this._tokenData[tokenTypes[0]].name+\\\" at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol)},advance:function(tokenTypes,channel){for(;0!==this.LA(0)&&!this.match(tokenTypes,channel);)this.get();return this.LA(0)},get:function(channel){var token,info,tokenInfo=this._tokenData,i=(this._reader,0);if(tokenInfo.length,this._lt.length&&this._ltIndex>=0&&this._ltIndex-1&&!tokenInfo[token.type].hide&&(token.channel=tokenInfo[token.type].channel,this._token=token,this._lt.push(token),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),info=tokenInfo[token.type],info&&(info.hide||void 0!==info.channel&&channel!==info.channel)?this.get(channel):token.type},LA:function(index){var tt,total=index;if(index>0){if(index>5)throw Error(\\\"Too much lookahead.\\\");for(;total;)tt=this.get(),total--;for(;index>total;)this.unget(),total++}else if(0>index){if(!this._lt[this._ltIndex+index])throw Error(\\\"Too much lookbehind.\\\");tt=this._lt[this._ltIndex+index].type}else tt=this._token.type;return tt},LT:function(index){return this.LA(index),this._lt[this._ltIndex+index-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(tokenType){return 0>tokenType||tokenType>this._tokenData.length?\\\"UNKNOWN_TOKEN\\\":this._tokenData[tokenType].name},tokenType:function(tokenName){return this._tokenData[tokenName]||-1},unget:function(){if(!this._ltIndexCache.length)throw Error(\\\"Too much lookahead.\\\");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}},parserlib.util={StringReader:StringReader,SyntaxError:SyntaxError,SyntaxUnit:SyntaxUnit,EventTarget:EventTarget,TokenStreamBase:TokenStreamBase}})(),function(){function Combinator(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.COMBINATOR_TYPE),this.type=\\\"unknown\\\",/^\\\\s+$/.test(text)?this.type=\\\"descendant\\\":\\\">\\\"==text?this.type=\\\"child\\\":\\\"+\\\"==text?this.type=\\\"adjacent-sibling\\\":\\\"~\\\"==text&&(this.type=\\\"sibling\\\")}function MediaFeature(name,value){SyntaxUnit.call(this,\\\"(\\\"+name+(null!==value?\\\":\\\"+value:\\\"\\\")+\\\")\\\",name.startLine,name.startCol,Parser.MEDIA_FEATURE_TYPE),this.name=name,this.value=value}function MediaQuery(modifier,mediaType,features,line,col){SyntaxUnit.call(this,(modifier?modifier+\\\" \\\":\\\"\\\")+(mediaType?mediaType:\\\"\\\")+(mediaType&&features.length>0?\\\" and \\\":\\\"\\\")+features.join(\\\" and \\\"),line,col,Parser.MEDIA_QUERY_TYPE),this.modifier=modifier,this.mediaType=mediaType,this.features=features}function Parser(options){EventTarget.call(this),this.options=options||{},this._tokenStream=null}function PropertyName(text,hack,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_NAME_TYPE),this.hack=hack}function PropertyValue(parts,line,col){SyntaxUnit.call(this,parts.join(\\\" \\\"),line,col,Parser.PROPERTY_VALUE_TYPE),this.parts=parts}function PropertyValueIterator(value){this._i=0,this._parts=value.parts,this._marks=[],this.value=value}function PropertyValuePart(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE),this.type=\\\"unknown\\\";var temp;if(/^([+\\\\-]?[\\\\d\\\\.]+)([a-z]+)$/i.test(text))switch(this.type=\\\"dimension\\\",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case\\\"em\\\":case\\\"rem\\\":case\\\"ex\\\":case\\\"px\\\":case\\\"cm\\\":case\\\"mm\\\":case\\\"in\\\":case\\\"pt\\\":case\\\"pc\\\":case\\\"ch\\\":case\\\"vh\\\":case\\\"vw\\\":case\\\"vmax\\\":case\\\"vmin\\\":this.type=\\\"length\\\";break;case\\\"deg\\\":case\\\"rad\\\":case\\\"grad\\\":this.type=\\\"angle\\\";break;case\\\"ms\\\":case\\\"s\\\":this.type=\\\"time\\\";break;case\\\"hz\\\":case\\\"khz\\\":this.type=\\\"frequency\\\";break;case\\\"dpi\\\":case\\\"dpcm\\\":this.type=\\\"resolution\\\"}else/^([+\\\\-]?[\\\\d\\\\.]+)%$/i.test(text)?(this.type=\\\"percentage\\\",this.value=+RegExp.$1):/^([+\\\\-]?\\\\d+)$/i.test(text)?(this.type=\\\"integer\\\",this.value=+RegExp.$1):/^([+\\\\-]?[\\\\d\\\\.]+)$/i.test(text)?(this.type=\\\"number\\\",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type=\\\"color\\\",temp=RegExp.$1,3==temp.length?(this.red=parseInt(temp.charAt(0)+temp.charAt(0),16),this.green=parseInt(temp.charAt(1)+temp.charAt(1),16),this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^rgb\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\\\\(\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^rgba\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\\\\(\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^hsl\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\\\\([\\\"']?([^\\\\)\\\"']+)[\\\"']?\\\\)/i.test(text)?(this.type=\\\"uri\\\",this.uri=RegExp.$1):/^([^\\\\(]+)\\\\(/i.test(text)?(this.type=\\\"function\\\",this.name=RegExp.$1,this.value=text):/^[\\\"'][^\\\"']*[\\\"']/.test(text)?(this.type=\\\"string\\\",this.value=eval(text)):Colors[text.toLowerCase()]?(this.type=\\\"color\\\",temp=Colors[text.toLowerCase()].substring(1),this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16)):/^[\\\\,\\\\/]$/.test(text)?(this.type=\\\"operator\\\",this.value=text):/^[a-z\\\\-_\\\\u0080-\\\\uFFFF][a-z0-9\\\\-_\\\\u0080-\\\\uFFFF]*$/i.test(text)&&(this.type=\\\"identifier\\\",this.value=text)}function Selector(parts,line,col){SyntaxUnit.call(this,parts.join(\\\" \\\"),line,col,Parser.SELECTOR_TYPE),this.parts=parts,this.specificity=Specificity.calculate(this)}function SelectorPart(elementName,modifiers,text,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_PART_TYPE),this.elementName=elementName,this.modifiers=modifiers}function SelectorSubPart(text,type,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_SUB_PART_TYPE),this.type=type,this.args=[]}function Specificity(a,b,c,d){this.a=a,this.b=b,this.c=c,this.d=d}function isHexDigit(c){return null!==c&&h.test(c)}function isDigit(c){return null!==c&&/\\\\d/.test(c)}function isWhitespace(c){return null!==c&&/\\\\s/.test(c)}function isNewLine(c){return null!==c&&nl.test(c)}function isNameStart(c){return null!==c&&/[a-z_\\\\u0080-\\\\uFFFF\\\\\\\\]/i.test(c)}function isNameChar(c){return null!==c&&(isNameStart(c)||/[0-9\\\\-\\\\\\\\]/.test(c))}function isIdentStart(c){return null!==c&&(isNameStart(c)||/\\\\-\\\\\\\\/.test(c))}function mix(receiver,supplier){for(var prop in supplier)supplier.hasOwnProperty(prop)&&(receiver[prop]=supplier[prop]);return receiver}function TokenStream(input){TokenStreamBase.call(this,input,Tokens)}function ValidationError(message,line,col){this.col=col,this.line=line,this.message=message}var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit,Colors={aliceblue:\\\"#f0f8ff\\\",antiquewhite:\\\"#faebd7\\\",aqua:\\\"#00ffff\\\",aquamarine:\\\"#7fffd4\\\",azure:\\\"#f0ffff\\\",beige:\\\"#f5f5dc\\\",bisque:\\\"#ffe4c4\\\",black:\\\"#000000\\\",blanchedalmond:\\\"#ffebcd\\\",blue:\\\"#0000ff\\\",blueviolet:\\\"#8a2be2\\\",brown:\\\"#a52a2a\\\",burlywood:\\\"#deb887\\\",cadetblue:\\\"#5f9ea0\\\",chartreuse:\\\"#7fff00\\\",chocolate:\\\"#d2691e\\\",coral:\\\"#ff7f50\\\",cornflowerblue:\\\"#6495ed\\\",cornsilk:\\\"#fff8dc\\\",crimson:\\\"#dc143c\\\",cyan:\\\"#00ffff\\\",darkblue:\\\"#00008b\\\",darkcyan:\\\"#008b8b\\\",darkgoldenrod:\\\"#b8860b\\\",darkgray:\\\"#a9a9a9\\\",darkgrey:\\\"#a9a9a9\\\",darkgreen:\\\"#006400\\\",darkkhaki:\\\"#bdb76b\\\",darkmagenta:\\\"#8b008b\\\",darkolivegreen:\\\"#556b2f\\\",darkorange:\\\"#ff8c00\\\",darkorchid:\\\"#9932cc\\\",darkred:\\\"#8b0000\\\",darksalmon:\\\"#e9967a\\\",darkseagreen:\\\"#8fbc8f\\\",darkslateblue:\\\"#483d8b\\\",darkslategray:\\\"#2f4f4f\\\",darkslategrey:\\\"#2f4f4f\\\",darkturquoise:\\\"#00ced1\\\",darkviolet:\\\"#9400d3\\\",deeppink:\\\"#ff1493\\\",deepskyblue:\\\"#00bfff\\\",dimgray:\\\"#696969\\\",dimgrey:\\\"#696969\\\",dodgerblue:\\\"#1e90ff\\\",firebrick:\\\"#b22222\\\",floralwhite:\\\"#fffaf0\\\",forestgreen:\\\"#228b22\\\",fuchsia:\\\"#ff00ff\\\",gainsboro:\\\"#dcdcdc\\\",ghostwhite:\\\"#f8f8ff\\\",gold:\\\"#ffd700\\\",goldenrod:\\\"#daa520\\\",gray:\\\"#808080\\\",grey:\\\"#808080\\\",green:\\\"#008000\\\",greenyellow:\\\"#adff2f\\\",honeydew:\\\"#f0fff0\\\",hotpink:\\\"#ff69b4\\\",indianred:\\\"#cd5c5c\\\",indigo:\\\"#4b0082\\\",ivory:\\\"#fffff0\\\",khaki:\\\"#f0e68c\\\",lavender:\\\"#e6e6fa\\\",lavenderblush:\\\"#fff0f5\\\",lawngreen:\\\"#7cfc00\\\",lemonchiffon:\\\"#fffacd\\\",lightblue:\\\"#add8e6\\\",lightcoral:\\\"#f08080\\\",lightcyan:\\\"#e0ffff\\\",lightgoldenrodyellow:\\\"#fafad2\\\",lightgray:\\\"#d3d3d3\\\",lightgrey:\\\"#d3d3d3\\\",lightgreen:\\\"#90ee90\\\",lightpink:\\\"#ffb6c1\\\",lightsalmon:\\\"#ffa07a\\\",lightseagreen:\\\"#20b2aa\\\",lightskyblue:\\\"#87cefa\\\",lightslategray:\\\"#778899\\\",lightslategrey:\\\"#778899\\\",lightsteelblue:\\\"#b0c4de\\\",lightyellow:\\\"#ffffe0\\\",lime:\\\"#00ff00\\\",limegreen:\\\"#32cd32\\\",linen:\\\"#faf0e6\\\",magenta:\\\"#ff00ff\\\",maroon:\\\"#800000\\\",mediumaquamarine:\\\"#66cdaa\\\",mediumblue:\\\"#0000cd\\\",mediumorchid:\\\"#ba55d3\\\",mediumpurple:\\\"#9370d8\\\",mediumseagreen:\\\"#3cb371\\\",mediumslateblue:\\\"#7b68ee\\\",mediumspringgreen:\\\"#00fa9a\\\",mediumturquoise:\\\"#48d1cc\\\",mediumvioletred:\\\"#c71585\\\",midnightblue:\\\"#191970\\\",mintcream:\\\"#f5fffa\\\",mistyrose:\\\"#ffe4e1\\\",moccasin:\\\"#ffe4b5\\\",navajowhite:\\\"#ffdead\\\",navy:\\\"#000080\\\",oldlace:\\\"#fdf5e6\\\",olive:\\\"#808000\\\",olivedrab:\\\"#6b8e23\\\",orange:\\\"#ffa500\\\",orangered:\\\"#ff4500\\\",orchid:\\\"#da70d6\\\",palegoldenrod:\\\"#eee8aa\\\",palegreen:\\\"#98fb98\\\",paleturquoise:\\\"#afeeee\\\",palevioletred:\\\"#d87093\\\",papayawhip:\\\"#ffefd5\\\",peachpuff:\\\"#ffdab9\\\",peru:\\\"#cd853f\\\",pink:\\\"#ffc0cb\\\",plum:\\\"#dda0dd\\\",powderblue:\\\"#b0e0e6\\\",purple:\\\"#800080\\\",red:\\\"#ff0000\\\",rosybrown:\\\"#bc8f8f\\\",royalblue:\\\"#4169e1\\\",saddlebrown:\\\"#8b4513\\\",salmon:\\\"#fa8072\\\",sandybrown:\\\"#f4a460\\\",seagreen:\\\"#2e8b57\\\",seashell:\\\"#fff5ee\\\",sienna:\\\"#a0522d\\\",silver:\\\"#c0c0c0\\\",skyblue:\\\"#87ceeb\\\",slateblue:\\\"#6a5acd\\\",slategray:\\\"#708090\\\",slategrey:\\\"#708090\\\",snow:\\\"#fffafa\\\",springgreen:\\\"#00ff7f\\\",steelblue:\\\"#4682b4\\\",tan:\\\"#d2b48c\\\",teal:\\\"#008080\\\",thistle:\\\"#d8bfd8\\\",tomato:\\\"#ff6347\\\",turquoise:\\\"#40e0d0\\\",violet:\\\"#ee82ee\\\",wheat:\\\"#f5deb3\\\",white:\\\"#ffffff\\\",whitesmoke:\\\"#f5f5f5\\\",yellow:\\\"#ffff00\\\",yellowgreen:\\\"#9acd32\\\",activeBorder:\\\"Active window border.\\\",activecaption:\\\"Active window caption.\\\",appworkspace:\\\"Background color of multiple document interface.\\\",background:\\\"Desktop background.\\\",buttonface:\\\"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttonhighlight:\\\"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttonshadow:\\\"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttontext:\\\"Text on push buttons.\\\",captiontext:\\\"Text in caption, size box, and scrollbar arrow box.\\\",graytext:\\\"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.\\\",greytext:\\\"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.\\\",highlight:\\\"Item(s) selected in a control.\\\",highlighttext:\\\"Text of item(s) selected in a control.\\\",inactiveborder:\\\"Inactive window border.\\\",inactivecaption:\\\"Inactive window caption.\\\",inactivecaptiontext:\\\"Color of text in an inactive caption.\\\",infobackground:\\\"Background color for tooltip controls.\\\",infotext:\\\"Text color for tooltip controls.\\\",menu:\\\"Menu background.\\\",menutext:\\\"Text in menus.\\\",scrollbar:\\\"Scroll bar gray area.\\\",threeddarkshadow:\\\"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedface:\\\"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedhighlight:\\\"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedlightshadow:\\\"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedshadow:\\\"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",window:\\\"Window background.\\\",windowframe:\\\"Window frame.\\\",windowtext:\\\"Text in windows.\\\"};Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator,MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,Parser.DEFAULT_TYPE=0,Parser.COMBINATOR_TYPE=1,Parser.MEDIA_FEATURE_TYPE=2,Parser.MEDIA_QUERY_TYPE=3,Parser.PROPERTY_NAME_TYPE=4,Parser.PROPERTY_VALUE_TYPE=5,Parser.PROPERTY_VALUE_PART_TYPE=6,Parser.SELECTOR_TYPE=7,Parser.SELECTOR_PART_TYPE=8,Parser.SELECTOR_SUB_PART_TYPE=9,Parser.prototype=function(){var prop,proto=new EventTarget,additions={constructor:Parser,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var count,token,tt,tokenStream=this._tokenStream;for(this.fire(\\\"startstylesheet\\\"),this._charset(),this._skipCruft();tokenStream.peek()==Tokens.IMPORT_SYM;)this._import(),this._skipCruft();for(;tokenStream.peek()==Tokens.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(tt=tokenStream.peek();tt>Tokens.EOF;){try{switch(tt){case Tokens.MEDIA_SYM:this._media(),this._skipCruft();break;case Tokens.PAGE_SYM:this._page(),this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case Tokens.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case Tokens.UNKNOWN_SYM:if(tokenStream.get(),this.options.strict)throw new SyntaxError(\\\"Unknown @ rule.\\\",tokenStream.LT(0).startLine,tokenStream.LT(0).startCol);for(this.fire({type:\\\"error\\\",error:null,message:\\\"Unknown @ rule: \\\"+tokenStream.LT(0).value+\\\".\\\",line:tokenStream.LT(0).startLine,col:tokenStream.LT(0).startCol}),count=0;tokenStream.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE;)count++;for(;count;)tokenStream.advance([Tokens.RBRACE]),count--;break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(tt){case Tokens.CHARSET_SYM:throw token=tokenStream.LT(1),this._charset(!1),new SyntaxError(\\\"@charset not allowed here.\\\",token.startLine,token.startCol);case Tokens.IMPORT_SYM:throw token=tokenStream.LT(1),this._import(!1),new SyntaxError(\\\"@import not allowed here.\\\",token.startLine,token.startCol);case Tokens.NAMESPACE_SYM:throw token=tokenStream.LT(1),this._namespace(!1),new SyntaxError(\\\"@namespace not allowed here.\\\",token.startLine,token.startCol);default:tokenStream.get(),this._unexpectedToken(tokenStream.token())}}}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col})}tt=tokenStream.peek()}tt!=Tokens.EOF&&this._unexpectedToken(tokenStream.token()),this.fire(\\\"endstylesheet\\\")},_charset:function(emit){var charset,token,line,col,tokenStream=this._tokenStream;tokenStream.match(Tokens.CHARSET_SYM)&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.mustMatch(Tokens.STRING),token=tokenStream.token(),charset=token.value,this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),emit!==!1&&this.fire({type:\\\"charset\\\",charset:charset,line:line,col:col}))},_import:function(emit){var uri,importToken,tokenStream=this._tokenStream,mediaList=[];tokenStream.mustMatch(Tokens.IMPORT_SYM),importToken=tokenStream.token(),this._readWhitespace(),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/^(?:url\\\\()?[\\\"']?([^\\\"']+?)[\\\"']?\\\\)?$/,\\\"$1\\\"),this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:\\\"import\\\",uri:uri,media:mediaList,line:importToken.startLine,col:importToken.startCol})},_namespace:function(emit){var line,col,prefix,uri,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.NAMESPACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(prefix=tokenStream.token().value,this._readWhitespace()),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/(?:url\\\\()?[\\\"']([^\\\"']+)[\\\"']\\\\)?/,\\\"$1\\\"),this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:\\\"namespace\\\",prefix:prefix,uri:uri,line:line,col:col})},_media:function(){var line,col,mediaList,tokenStream=this._tokenStream;for(tokenStream.mustMatch(Tokens.MEDIA_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:\\\"startmedia\\\",media:mediaList,line:line,col:col});;)if(tokenStream.peek()==Tokens.PAGE_SYM)this._page();else if(tokenStream.peek()==Tokens.FONT_FACE_SYM)this._font_face();else if(tokenStream.peek()==Tokens.VIEWPORT_SYM)this._viewport();else if(!this._ruleset())break;tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:\\\"endmedia\\\",media:mediaList,line:line,col:col})},_media_query_list:function(){var tokenStream=this._tokenStream,mediaList=[];for(this._readWhitespace(),(tokenStream.peek()==Tokens.IDENT||tokenStream.peek()==Tokens.LPAREN)&&mediaList.push(this._media_query());tokenStream.match(Tokens.COMMA);)this._readWhitespace(),mediaList.push(this._media_query());return mediaList},_media_query:function(){var tokenStream=this._tokenStream,type=null,ident=null,token=null,expressions=[];if(tokenStream.match(Tokens.IDENT)&&(ident=tokenStream.token().value.toLowerCase(),\\\"only\\\"!=ident&&\\\"not\\\"!=ident?(tokenStream.unget(),ident=null):token=tokenStream.token()),this._readWhitespace(),tokenStream.peek()==Tokens.IDENT?(type=this._media_type(),null===token&&(token=tokenStream.token())):tokenStream.peek()==Tokens.LPAREN&&(null===token&&(token=tokenStream.LT(1)),expressions.push(this._media_expression())),null===type&&0===expressions.length)return null;for(this._readWhitespace();tokenStream.match(Tokens.IDENT);)\\\"and\\\"!=tokenStream.token().value.toLowerCase()&&this._unexpectedToken(tokenStream.token()),this._readWhitespace(),expressions.push(this._media_expression());return new MediaQuery(ident,type,expressions,token.startLine,token.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var token,tokenStream=this._tokenStream,feature=null,expression=null;return tokenStream.mustMatch(Tokens.LPAREN),this._readWhitespace(),feature=this._media_feature(),this._readWhitespace(),tokenStream.match(Tokens.COLON)&&(this._readWhitespace(),token=tokenStream.LT(1),expression=this._expression()),tokenStream.mustMatch(Tokens.RPAREN),this._readWhitespace(),new MediaFeature(feature,expression?new SyntaxUnit(expression,token.startLine,token.startCol):null)},_media_feature:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.IDENT),SyntaxUnit.fromToken(tokenStream.token())},_page:function(){var line,col,tokenStream=this._tokenStream,identifier=null,pseudoPage=null;tokenStream.mustMatch(Tokens.PAGE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(identifier=tokenStream.token().value,\\\"auto\\\"===identifier.toLowerCase()&&this._unexpectedToken(tokenStream.token())),tokenStream.peek()==Tokens.COLON&&(pseudoPage=this._pseudo_page()),this._readWhitespace(),this.fire({type:\\\"startpage\\\",id:identifier,pseudo:pseudoPage,line:line,col:col}),this._readDeclarations(!0,!0),this.fire({type:\\\"endpage\\\",id:identifier,pseudo:pseudoPage,line:line,col:col})},_margin:function(){var line,col,tokenStream=this._tokenStream,marginSym=this._margin_sym();return marginSym?(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this.fire({type:\\\"startpagemargin\\\",margin:marginSym,line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endpagemargin\\\",margin:marginSym,line:line,col:col}),!0):!1},_margin_sym:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])?SyntaxUnit.fromToken(tokenStream.token()):null},_pseudo_page:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.COLON),tokenStream.mustMatch(Tokens.IDENT),tokenStream.token().value},_font_face:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.FONT_FACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:\\\"startfontface\\\",line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endfontface\\\",line:line,col:col})},_viewport:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.VIEWPORT_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:\\\"startviewport\\\",line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endviewport\\\",line:line,col:col})},_operator:function(inFunction){var tokenStream=this._tokenStream,token=null;return(tokenStream.match([Tokens.SLASH,Tokens.COMMA])||inFunction&&tokenStream.match([Tokens.PLUS,Tokens.STAR,Tokens.MINUS]))&&(token=tokenStream.token(),this._readWhitespace()),token?PropertyValuePart.fromToken(token):null},_combinator:function(){var token,tokenStream=this._tokenStream,value=null;return tokenStream.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(token=tokenStream.token(),value=new Combinator(token.value,token.startLine,token.startCol),this._readWhitespace()),value},_unary_operator:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.MINUS,Tokens.PLUS])?tokenStream.token().value:null},_property:function(){var tokenValue,token,line,col,tokenStream=this._tokenStream,value=null,hack=null;return tokenStream.peek()==Tokens.STAR&&this.options.starHack&&(tokenStream.get(),token=tokenStream.token(),hack=token.value,line=token.startLine,col=token.startCol),tokenStream.match(Tokens.IDENT)&&(token=tokenStream.token(),tokenValue=token.value,\\\"_\\\"==tokenValue.charAt(0)&&this.options.underscoreHack&&(hack=\\\"_\\\",tokenValue=tokenValue.substring(1)),value=new PropertyName(tokenValue,hack,line||token.startLine,col||token.startCol),this._readWhitespace()),value},_ruleset:function(){var tt,selectors,tokenStream=this._tokenStream;try{selectors=this._selectors_group()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.RBRACE]),tt!=Tokens.RBRACE)throw ex;return!0}return selectors&&(this.fire({type:\\\"startrule\\\",selectors:selectors,line:selectors[0].line,col:selectors[0].col}),this._readDeclarations(!0),this.fire({type:\\\"endrule\\\",selectors:selectors,line:selectors[0].line,col:selectors[0].col})),selectors},_selectors_group:function(){var selector,tokenStream=this._tokenStream,selectors=[];if(selector=this._selector(),null!==selector)for(selectors.push(selector);tokenStream.match(Tokens.COMMA);)this._readWhitespace(),selector=this._selector(),null!==selector?selectors.push(selector):this._unexpectedToken(tokenStream.LT(1));return selectors.length?selectors:null},_selector:function(){var tokenStream=this._tokenStream,selector=[],nextSelector=null,combinator=null,ws=null;if(nextSelector=this._simple_selector_sequence(),null===nextSelector)return null;for(selector.push(nextSelector);;)if(combinator=this._combinator(),null!==combinator)selector.push(combinator),nextSelector=this._simple_selector_sequence(),null===nextSelector?this._unexpectedToken(tokenStream.LT(1)):selector.push(nextSelector);else{if(!this._readWhitespace())break;ws=new Combinator(tokenStream.token().value,tokenStream.token().startLine,tokenStream.token().startCol),combinator=this._combinator(),nextSelector=this._simple_selector_sequence(),null===nextSelector?null!==combinator&&this._unexpectedToken(tokenStream.LT(1)):(null!==combinator?selector.push(combinator):selector.push(ws),selector.push(nextSelector))}return new Selector(selector,selector[0].line,selector[0].col)},_simple_selector_sequence:function(){var line,col,tokenStream=this._tokenStream,elementName=null,modifiers=[],selectorText=\\\"\\\",components=[function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,\\\"id\\\",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],i=0,len=components.length,component=null;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol,elementName=this._type_selector(),elementName||(elementName=this._universal()),null!==elementName&&(selectorText+=elementName);;){if(tokenStream.peek()===Tokens.S)break;for(;len>i&&null===component;)component=components[i++].call(this);if(null===component){if(\\\"\\\"===selectorText)return null;break}i=0,modifiers.push(component),selectorText+=\\\"\\\"+component,component=null}return\\\"\\\"!==selectorText?new SelectorPart(elementName,modifiers,selectorText,line,col):null},_type_selector:function(){var tokenStream=this._tokenStream,ns=this._namespace_prefix(),elementName=this._element_name();return elementName?(ns&&(elementName.text=ns+elementName.text,elementName.col-=ns.length),elementName):(ns&&(tokenStream.unget(),ns.length>1&&tokenStream.unget()),null)},_class:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.DOT)?(tokenStream.mustMatch(Tokens.IDENT),token=tokenStream.token(),new SelectorSubPart(\\\".\\\"+token.value,\\\"class\\\",token.startLine,token.startCol-1)):null},_element_name:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.IDENT)?(token=tokenStream.token(),new SelectorSubPart(token.value,\\\"elementName\\\",token.startLine,token.startCol)):null},_namespace_prefix:function(){var tokenStream=this._tokenStream,value=\\\"\\\";return(tokenStream.LA(1)===Tokens.PIPE||tokenStream.LA(2)===Tokens.PIPE)&&(tokenStream.match([Tokens.IDENT,Tokens.STAR])&&(value+=tokenStream.token().value),tokenStream.mustMatch(Tokens.PIPE),value+=\\\"|\\\"),value.length?value:null},_universal:function(){var ns,tokenStream=this._tokenStream,value=\\\"\\\";return ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.match(Tokens.STAR)&&(value+=\\\"*\\\"),value.length?value:null},_attrib:function(){var ns,token,tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.LBRACKET)?(token=tokenStream.token(),value=token.value,value+=this._readWhitespace(),ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.mustMatch(Tokens.IDENT),value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),value+=tokenStream.token().value,value+=this._readWhitespace()),tokenStream.mustMatch(Tokens.RBRACKET),new SelectorSubPart(value+\\\"]\\\",\\\"attribute\\\",token.startLine,token.startCol)):null},_pseudo:function(){var line,col,tokenStream=this._tokenStream,pseudo=null,colons=\\\":\\\";return tokenStream.match(Tokens.COLON)&&(tokenStream.match(Tokens.COLON)&&(colons+=\\\":\\\"),tokenStream.match(Tokens.IDENT)?(pseudo=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol-colons.length):tokenStream.peek()==Tokens.FUNCTION&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol-colons.length,pseudo=this._functional_pseudo()),pseudo&&(pseudo=new SelectorSubPart(colons+pseudo,\\\"pseudo\\\",line,col))),pseudo},_functional_pseudo:function(){var tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.FUNCTION)&&(value=tokenStream.token().value,value+=this._readWhitespace(),value+=this._expression(),tokenStream.mustMatch(Tokens.RPAREN),value+=\\\")\\\"),value},_expression:function(){for(var tokenStream=this._tokenStream,value=\\\"\\\";tokenStream.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION,Tokens.SLASH]);)value+=tokenStream.token().value,value+=this._readWhitespace();return value.length?value:null},_negation:function(){var line,col,arg,tokenStream=this._tokenStream,value=\\\"\\\",subpart=null;return tokenStream.match(Tokens.NOT)&&(value=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol,value+=this._readWhitespace(),arg=this._negation_arg(),value+=arg,value+=this._readWhitespace(),tokenStream.match(Tokens.RPAREN),value+=tokenStream.token().value,subpart=new SelectorSubPart(value,\\\"not\\\",line,col),subpart.args.push(arg)),subpart},_negation_arg:function(){var line,col,part,tokenStream=this._tokenStream,args=[this._type_selector,this._universal,function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,\\\"id\\\",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo],arg=null,i=0,len=args.length;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol;len>i&&null===arg;)arg=args[i].call(this),i++;return null===arg&&this._unexpectedToken(tokenStream.LT(1)),part=\\\"elementName\\\"==arg.type?new SelectorPart(arg,[],\\\"\\\"+arg,line,col):new SelectorPart(null,[arg],\\\"\\\"+arg,line,col)},_declaration:function(){var tokenStream=this._tokenStream,property=null,expr=null,prio=null,invalid=null,propertyName=\\\"\\\";if(property=this._property(),null!==property){tokenStream.mustMatch(Tokens.COLON),this._readWhitespace(),expr=this._expr(),expr&&0!==expr.length||this._unexpectedToken(tokenStream.LT(1)),prio=this._prio(),propertyName=\\\"\\\"+property,(this.options.starHack&&\\\"*\\\"==property.hack||this.options.underscoreHack&&\\\"_\\\"==property.hack)&&(propertyName=property.text);try{this._validateProperty(propertyName,expr)}catch(ex){invalid=ex}return this.fire({type:\\\"property\\\",property:property,value:expr,important:prio,line:property.line,col:property.col,invalid:invalid}),!0}return!1},_prio:function(){var tokenStream=this._tokenStream,result=tokenStream.match(Tokens.IMPORTANT_SYM);return this._readWhitespace(),result},_expr:function(inFunction){var values=(this._tokenStream,[]),value=null,operator=null;if(value=this._term(inFunction),null!==value)for(values.push(value);;){if(operator=this._operator(inFunction),operator&&values.push(operator),value=this._term(inFunction),null===value)break;\\nvalues.push(value)}return values.length>0?new PropertyValue(values,values[0].line,values[0].col):null},_term:function(inFunction){var token,line,col,tokenStream=this._tokenStream,unary=null,value=null,endChar=null;return unary=this._unary_operator(),null!==unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(value=this._ie_function(),null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol)):inFunction&&tokenStream.match([Tokens.LPAREN,Tokens.LBRACE,Tokens.LBRACKET])?(token=tokenStream.token(),endChar=token.endChar,value=token.value+this._expr(inFunction).text,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.mustMatch(Tokens.type(endChar)),value+=endChar,this._readWhitespace()):tokenStream.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(value=tokenStream.token().value,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),this._readWhitespace()):(token=this._hexcolor(),null===token?(null===unary&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol),null===value&&(value=tokenStream.LA(3)==Tokens.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(value=token.value,null===unary&&(line=token.startLine,col=token.startCol))),null!==value?new PropertyValuePart(null!==unary?unary+value:value,line,col):null},_function:function(){var lt,tokenStream=this._tokenStream,functionText=null,expr=null;if(tokenStream.match(Tokens.FUNCTION)){if(functionText=tokenStream.token().value,this._readWhitespace(),expr=this._expr(!0),functionText+=expr,this.options.ieFilters&&tokenStream.peek()==Tokens.EQUALS)do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&<!=Tokens.S&<!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=\\\")\\\",this._readWhitespace()}return functionText},_ie_function:function(){var lt,tokenStream=this._tokenStream,functionText=null;if(tokenStream.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){functionText=tokenStream.token().value;do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&<!=Tokens.S&<!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=\\\")\\\",this._readWhitespace()}return functionText},_hexcolor:function(){var color,tokenStream=this._tokenStream,token=null;if(tokenStream.match(Tokens.HASH)){if(token=tokenStream.token(),color=token.value,!/#[a-f0-9]{3,6}/i.test(color))throw new SyntaxError(\\\"Expected a hex color but found '\\\"+color+\\\"' at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol);this._readWhitespace()}return token},_keyframes:function(){var token,tt,name,tokenStream=this._tokenStream,prefix=\\\"\\\";for(tokenStream.mustMatch(Tokens.KEYFRAMES_SYM),token=tokenStream.token(),/^@\\\\-([^\\\\-]+)\\\\-/.test(token.value)&&(prefix=RegExp.$1),this._readWhitespace(),name=this._keyframe_name(),this._readWhitespace(),tokenStream.mustMatch(Tokens.LBRACE),this.fire({type:\\\"startkeyframes\\\",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tt=tokenStream.peek();tt==Tokens.IDENT||tt==Tokens.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),tt=tokenStream.peek();this.fire({type:\\\"endkeyframes\\\",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tokenStream.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),SyntaxUnit.fromToken(tokenStream.token())},_keyframe_rule:function(){var keyList=(this._tokenStream,this._key_list());this.fire({type:\\\"startkeyframerule\\\",keys:keyList,line:keyList[0].line,col:keyList[0].col}),this._readDeclarations(!0),this.fire({type:\\\"endkeyframerule\\\",keys:keyList,line:keyList[0].line,col:keyList[0].col})},_key_list:function(){var tokenStream=this._tokenStream,keyList=[];for(keyList.push(this._key()),this._readWhitespace();tokenStream.match(Tokens.COMMA);)this._readWhitespace(),keyList.push(this._key()),this._readWhitespace();return keyList},_key:function(){var token,tokenStream=this._tokenStream;if(tokenStream.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(tokenStream.token());if(tokenStream.match(Tokens.IDENT)){if(token=tokenStream.token(),/from|to/i.test(token.value))return SyntaxUnit.fromToken(token);tokenStream.unget()}this._unexpectedToken(tokenStream.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]););},_readDeclarations:function(checkStart,readMargins){var tt,tokenStream=this._tokenStream;this._readWhitespace(),checkStart&&tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(tokenStream.match(Tokens.SEMICOLON)||readMargins&&this._margin());else{if(!this._declaration())break;if(!tokenStream.match(Tokens.SEMICOLON))break}this._readWhitespace()}tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.SEMICOLON,Tokens.RBRACE]),tt==Tokens.SEMICOLON)this._readDeclarations(!1,readMargins);else if(tt!=Tokens.RBRACE)throw ex}},_readWhitespace:function(){for(var tokenStream=this._tokenStream,ws=\\\"\\\";tokenStream.match(Tokens.S);)ws+=tokenStream.token().value;return ws},_unexpectedToken:function(token){throw new SyntaxError(\\\"Unexpected token '\\\"+token.value+\\\"' at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(property,value){Validation.validate(property,value)},parse:function(input){this._tokenStream=new TokenStream(input,Tokens),this._stylesheet()},parseStyleSheet:function(input){return this.parse(input)},parseMediaQuery:function(input){this._tokenStream=new TokenStream(input,Tokens);var result=this._media_query();return this._verifyEnd(),result},parsePropertyValue:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._expr();return this._readWhitespace(),this._verifyEnd(),result},parseRule:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._ruleset();return this._readWhitespace(),this._verifyEnd(),result},parseSelector:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._selector();return this._readWhitespace(),this._verifyEnd(),result},parseStyleAttribute:function(input){input+=\\\"}\\\",this._tokenStream=new TokenStream(input,Tokens),this._readDeclarations()}};for(prop in additions)additions.hasOwnProperty(prop)&&(proto[prop]=additions[prop]);return proto}();var Properties={\\\"align-items\\\":\\\"flex-start | flex-end | center | baseline | stretch\\\",\\\"align-content\\\":\\\"flex-start | flex-end | center | space-between | space-around | stretch\\\",\\\"align-self\\\":\\\"auto | flex-start | flex-end | center | baseline | stretch\\\",\\\"-webkit-align-items\\\":\\\"flex-start | flex-end | center | baseline | stretch\\\",\\\"-webkit-align-content\\\":\\\"flex-start | flex-end | center | space-between | space-around | stretch\\\",\\\"-webkit-align-self\\\":\\\"auto | flex-start | flex-end | center | baseline | stretch\\\",\\\"alignment-adjust\\\":\\\"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | \\\",\\\"alignment-baseline\\\":\\\"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical\\\",animation:1,\\\"animation-delay\\\":{multi:\\\"

    "},{"name":"id","type":"String","values":"postcode (default)"},{"name":"errorId","type":"String","values":"postcode-error (default)"}],"methods":[{"name":"postcodeChange","params":[{"name":"postcodeChange","type":"Event Listener","values":"detail","description":"Dispatches on input change; returns the formatted input string and `true` if the input is a valid postcode"}]}],"examples":[{"title":"Enter a UK postcode","description":"Standard case","template":"","controller":"function (document) {\n const input = document.querySelector(\"postcode-search\");\n \n input.addEventListener(\"postcodeChange\", ({ detail }) => {\n console.debug({ detail });\n });\n }"}],"id":"postcodesearch"}] \ No newline at end of file diff --git a/pitsby/index.html b/pitsby/index.html index 7dea0cc..bb0e3a1 100644 --- a/pitsby/index.html +++ b/pitsby/index.html @@ -1 +1 @@ -Pitsby \ No newline at end of file +Docs - Place Components \ No newline at end of file diff --git a/pitsby/main.css b/pitsby/main.css index 31ef2f9..5d57777 100644 --- a/pitsby/main.css +++ b/pitsby/main.css @@ -1,75 +1,294 @@ +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/_native.styl ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/_native.styl (1) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!**********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/alert.styl ***! + \**********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!**************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/alert.styl (1) ***! + \**************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/back-trigger.styl ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/back-trigger.styl (1) ***! + \*********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/btn.styl ***! + \********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/btn.styl (1) ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/code-editor.styl ***! + \****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/code-editor.styl (1) ***! + \********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/components-menu.styl ***! + \********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/components-menu.styl (1) ***! + \************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/components-menu-item.styl ***! + \*************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*****************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/components-menu-item.styl (1) ***! + \*****************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/credits.styl ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/credits.styl (1) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/engine-menu.styl ***! + \****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/engine-menu.styl (1) ***! + \********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!***********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component.styl ***! + \***********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!***************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component.styl (1) ***! + \***************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*******************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-example.styl ***! + \*******************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!***********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-example.styl (1) ***! + \***********************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*****************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-example-edit-link.styl ***! + \*****************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*********************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-example-edit-link.styl (1) ***! + \*********************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!****************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-code.styl ***! + \****************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-code.styl (1) ***! + \********************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-methods-list.styl ***! + \************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!****************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-methods-list.styl (1) ***! + \****************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!**********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-props-list.styl ***! + \**********************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!**************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-props-list.styl (1) ***! + \**************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!***************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-props-list-item.styl ***! + \***************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-props-list-item.styl (1) ***! + \*******************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!***********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-components-playground.styl ***! + \***********************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!***************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-components-playground.styl (1) ***! + \***************************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/heading.styl ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/heading.styl (1) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!**********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/input.styl ***! + \**********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!**************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/input.styl (1) ***! + \**************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/link.styl ***! + \*********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/link.styl (1) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!**************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/list-item.styl ***! + \**************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!******************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/list-item.styl (1) ***! + \******************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!***********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/loader.styl ***! + \***********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!***************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/loader.styl (1) ***! + \***************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/logo.styl ***! + \*********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/logo.styl (1) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/main.styl ***! + \*********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/main.styl (1) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/menu-trigger.styl ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/menu-trigger.styl (1) ***! + \*********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/pre.styl ***! + \********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/pre.styl (1) ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/required-caption.styl ***! + \*********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/required-caption.styl (1) ***! + \*************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/required-symbol.styl ***! + \********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/required-symbol.styl (1) ***! + \************************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/row.styl ***! + \********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/row.styl (1) ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/row-item.styl ***! + \*************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/row-item.styl (1) ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/sidebar.styl ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/sidebar.styl (1) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/search-input.styl ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/search-input.styl (1) ***! + \*********************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/tabs.styl ***! + \*********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/tabs.styl (1) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/tag.styl ***! + \********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/tag.styl (1) ***! + \************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!***********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/topbar.styl ***! + \***********************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!***************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/topbar.styl (1) ***! + \***************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/viewport.styl ***! + \*************************************************************************************************************************************************************************************************************************************************************/ @import url(https://rsms.me/inter/inter.css); +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/viewport.styl (1) ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ @import url(https://fonts.googleapis.com/css?family=PT+Mono); +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/_native.styl (2) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ html, body { margin: 0; @@ -78,6 +297,9 @@ body { font-weight: 300; } +/*!**************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/alert.styl (2) ***! + \**************************************************************************************************************************************************************************************************************************************************************/ .p-alert { position: relative; padding-top: 6px; @@ -114,11 +336,17 @@ body { font-size: 0.875rem; } +/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/back-trigger.styl (2) ***! + \*********************************************************************************************************************************************************************************************************************************************************************/ .p-back-trigger .p-trigger { margin: 20px 30px 30px; background-image: url("/images/arrow-back.svg"); } +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/btn.styl (2) ***! + \************************************************************************************************************************************************************************************************************************************************************/ .p-btn { position: relative; padding: 0 15px; @@ -177,6 +405,9 @@ body { color: #fff; } +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/code-editor.styl (2) ***! + \********************************************************************************************************************************************************************************************************************************************************************/ .p-code-editor.ace_editor { font: 12px 'PT Mono', monospace; font-weight: 300; @@ -271,6 +502,9 @@ body { box-sizing: border-box; } +/*!************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/components-menu.styl (2) ***! + \************************************************************************************************************************************************************************************************************************************************************************/ .p-components-menu { padding-top: 30px; } @@ -296,6 +530,9 @@ body { box-sizing: border-box; } +/*!*****************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/components-menu-item.styl (2) ***! + \*****************************************************************************************************************************************************************************************************************************************************************************/ .p-components-menu-item-container .p-components-menu-item-container { margin-left: 30px; } @@ -373,6 +610,9 @@ body { pointer-events: none; } +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/credits.styl (2) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ .p-credits { color: #737c84; font-size: 0.75rem; @@ -382,6 +622,9 @@ body { border-bottom: 1px solid #69f; } +/*!********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/engine-menu.styl (2) ***! + \********************************************************************************************************************************************************************************************************************************************************************/ .p-engine-menu-container { padding: 0 30px; border-bottom: 1px solid rgba(198,198,198,0.5); @@ -393,6 +636,7 @@ body { clear: both; } .p-engine-menu { + display: flex; position: relative; bottom: -1px; margin: 0; @@ -406,7 +650,8 @@ body { clear: both; } .p-engine-menu-item { - float: left; + flex-basis: 25%; + flex-grow: 2; } .p-engine-menu-link { display: block; @@ -436,6 +681,9 @@ body { border-bottom-color: #69f; } +/*!***************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component.styl (2) ***! + \***************************************************************************************************************************************************************************************************************************************************************************/ .p-external-component p-heading + p { margin-top: 30px; } @@ -469,6 +717,9 @@ body { margin-top: 75px; } +/*!***********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-example.styl (2) ***! + \***********************************************************************************************************************************************************************************************************************************************************************************/ .p-external-component-example .p-paragraph { margin-top: 5px; font-size: 0.875rem; @@ -482,6 +733,9 @@ body { justify-content: flex-end; } +/*!*********************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-example-edit-link.styl (2) ***! + \*********************************************************************************************************************************************************************************************************************************************************************************************/ .p-external-component-example-edit-link button { padding-right: 20px; color: #69f; @@ -502,6 +756,9 @@ body { text-decoration: underline; } +/*!*************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-examples-list.styl ***! + \*************************************************************************************************************************************************************************************************************************************************************************************/ .p-external-component-examples-list p-list-item { margin-top: 35px; } @@ -510,6 +767,9 @@ body { margin-top: 75px; } +/*!********************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-code.styl (2) ***! + \********************************************************************************************************************************************************************************************************************************************************************************/ .p-external-component-code { color: rgba(51,51,51,0.7); line-height: 1.5; @@ -541,6 +801,9 @@ body { color: rgba(51,51,51,0.7); } +/*!********************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!../../../../prismjs@1.28.0/node_modules/prismjs/themes/prism.css ***! + \********************************************************************************************************************************************************************************************************************************************************************************************/ /** * prism.js default theme for JavaScript, CSS and HTML * Based on dabblet (http://dabblet.com) @@ -666,6 +929,9 @@ pre[class*="language-"] { cursor: help; } +/*!****************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-methods-list.styl (2) ***! + \****************************************************************************************************************************************************************************************************************************************************************************************/ .p-external-component-methods-list .p-heading h4 { float: left; position: relative; @@ -697,6 +963,9 @@ pre[class*="language-"] { border-top: 1px solid #f5f5f5; } +/*!**************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-props-list.styl (2) ***! + \**************************************************************************************************************************************************************************************************************************************************************************************/ .p-external-component-props-list .p-row-item-label { font-size: 0.625rem; font-weight: 600; @@ -721,6 +990,9 @@ pre[class*="language-"] { margin-top: 20px; } +/*!*******************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-component-props-list-item.styl (2) ***! + \*******************************************************************************************************************************************************************************************************************************************************************************************/ p-external-component-props-list-item { display: block; padding: 10px 0; @@ -729,6 +1001,9 @@ p-external-component-props-list-item:not(:first-child) { border-top: 1px solid #f5f5f5; } +/*!***************************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/external-components-playground.styl (2) ***! + \***************************************************************************************************************************************************************************************************************************************************************************************/ .p-external-components-playground.p-external-components-playground-padding p-external-component-preview { padding: 30px; -webkit-box-sizing: border-box; @@ -804,6 +1079,9 @@ p-external-component-props-list-item:not(:first-child) { } } +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/heading.styl (2) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ .p-heading h1, .p-heading h2, .p-heading h3, @@ -827,6 +1105,9 @@ p-external-component-props-list-item:not(:first-child) { font-weight: normal; } +/*!**************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/input.styl (2) ***! + \**************************************************************************************************************************************************************************************************************************************************************/ .p-input-wrapper ::-webkit-input-placeholder { color: #c6c6c6; font-size: 0.75rem; @@ -862,6 +1143,9 @@ p-external-component-props-list-item:not(:first-child) { border-color: #69f; } +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/link.styl (2) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ .p-link { color: #69f; text-decoration: none; @@ -872,11 +1156,17 @@ p-external-component-props-list-item:not(:first-child) { color: #2e72ff; } +/*!******************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/list-item.styl (2) ***! + \******************************************************************************************************************************************************************************************************************************************************************/ p-list-item { display: block; padding: 15px 0; } +/*!***************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/loader.styl (2) ***! + \***************************************************************************************************************************************************************************************************************************************************************/ .p-loader { margin: 0 auto; height: 50px; @@ -887,6 +1177,9 @@ p-list-item { background-image: url("/images/loader.svg"); } +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/logo.styl (2) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ .p-logo { width: 130px; height: 40px; @@ -896,6 +1189,9 @@ p-list-item { background-image: url("/images/logo.svg"); } +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/main.styl (2) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ .p-main { background-color: #fff; min-height: 100vh; @@ -905,10 +1201,16 @@ p-list-item { max-width: 1440px; } +/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/menu-trigger.styl (2) ***! + \*********************************************************************************************************************************************************************************************************************************************************************/ .p-menu-trigger .p-trigger { background-image: url("/images/menu.svg"); } +/*!**************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/paragraph.styl ***! + \**************************************************************************************************************************************************************************************************************************************************************/ .p-paragraph p { margin: 0; line-height: 1.35; @@ -920,12 +1222,18 @@ p-paragraph + p-paragraph { margin-top: 20px; } +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/pre.styl (2) ***! + \************************************************************************************************************************************************************************************************************************************************************/ .p-pre { margin: 0; font-family: 'PT Mono', monospace; font-size: 0.75rem; } +/*!*************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/required-caption.styl (2) ***! + \*************************************************************************************************************************************************************************************************************************************************************************/ .p-required-caption-text { position: relative; top: -3px; @@ -933,11 +1241,17 @@ p-paragraph + p-paragraph { text-transform: uppercase; } +/*!************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/required-symbol.styl (2) ***! + \************************************************************************************************************************************************************************************************************************************************************************/ .p-required-symbol { color: #fc3338; font-size: 0.875rem; } +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/row.styl (2) ***! + \************************************************************************************************************************************************************************************************************************************************************/ .p-row-item { float: left; padding: 0 10px; @@ -1037,6 +1351,9 @@ p-row + p-row { margin-top: 50px; } +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/row-item.styl (2) ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ .p-row-item { float: left; padding: 0 10px; @@ -1108,6 +1425,9 @@ p-row + p-row { } } +/*!****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/sidebar.styl (2) ***! + \****************************************************************************************************************************************************************************************************************************************************************/ .p-sidebar { padding-top: 50px; max-width: 400px; @@ -1122,6 +1442,9 @@ p-row + p-row { margin-top: 50px; } +/*!*********************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/search-input.styl (2) ***! + \*********************************************************************************************************************************************************************************************************************************************************************/ .p-search-input { position: relative; display: block; @@ -1158,6 +1481,9 @@ p-row + p-row { padding-right: 60px; } +/*!*************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/tabs.styl (2) ***! + \*************************************************************************************************************************************************************************************************************************************************************/ .p-tabs-bar { border-bottom: 3px solid #f5f5f5; zoom: 1; @@ -1213,6 +1539,9 @@ p-row + p-row { box-sizing: border-box; } +/*!********************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/tab.styl ***! + \********************************************************************************************************************************************************************************************************************************************************/ p-tab { display: none; } @@ -1220,6 +1549,9 @@ p-tab.p-tab-active { display: block; } +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/tag.styl (2) ***! + \************************************************************************************************************************************************************************************************************************************************************/ .p-tag { display: inline-block; padding: 1px 4px; @@ -1246,6 +1578,9 @@ p-tab.p-tab-active { border-color: rgba(252,51,56,0.7); } +/*!***************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/topbar.styl (2) ***! + \***************************************************************************************************************************************************************************************************************************************************************/ .p-topbar { height: 60px; background-color: #f5f5f5; @@ -1264,6 +1599,9 @@ p-tab.p-tab-active { transform: translate(-50%,-50%); } +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/trigger.styl ***! + \************************************************************************************************************************************************************************************************************************************************************/ .p-trigger { width: 20px; height: 20px; @@ -1273,6 +1611,9 @@ p-tab.p-tab-active { cursor: pointer; } +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/viewport.styl (2) ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ .p-sidebar { padding-top: 50px; max-width: 400px; @@ -1399,6 +1740,9 @@ p-tab.p-tab-active { } } +/*!************************************************************************************************************************************************************************************************************************************************************!*\ + !*** css ../../../../css-loader@6.7.1_webpack@5.74.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../stylus-loader@7.0.0_stylus@0.58.1+webpack@5.74.0/node_modules/stylus-loader/dist/cjs.js!./src/webapp/styles/welcome.styl ***! + \************************************************************************************************************************************************************************************************************************************************************/ .p-welcome { padding: 60px 30px; } @@ -1411,4 +1755,4 @@ p-tab.p-tab-active { } -/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvd2ViYXBwL3N0eWxlcy9fbmF0aXZlLnN0eWwgKDIpIiwid2VicGFjazovLy8uL3NyYy93ZWJhcHAvc3R5bGVzL2FsZXJ0LnN0eWwgKDIpIiwid2VicGFjazovLy8uL3NyYy93ZWJhcHAvc3R5bGVzL2JhY2stdHJpZ2dlci5zdHlsICgyKSIsIndlYnBhY2s6Ly8vLi9zcmMvd2ViYXBwL3N0eWxlcy9id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4gICAgdHJhbnNpdGlvbihtYXJnaW4tbGVmdCwgMzAwbXMpXG4gIC5wLWV4dGVybmFsLWNvbXBvbmVudFxuICAgIHBhZGRpbmcgNjBweCAzMHB4XG4gICAgYm94LXNpemluZyhib3JkZXItYm94KVxuXG4rYnJlYWtwb2ludCgneHMnKVxuICAucC12aWV3cG9ydFxuICAgIC5wLXRvcGJhclxuICAgICAgdG9wIDBcbiAgICAucC1zaWRlYmFyXG4gICAgICBwb3NpdGlvbiBmaXhlZFxuICAgICAgdG9wIDBcbiAgICAgIGxlZnQgMFxuICAgICAgcGFkZGluZy10b3AgMFxuICAgICAgYm94LXNoYWRvdygzcHggMCAzMnB4IDAgYWxwaGEoJGNvbG9yLWRhcmtlc3QsIDApKVxuICAgICAgdHJhbnNmb3JtKCd0cmFuc2xhdGUzZCgtMTAwJSwwLDApJylcbiAgICAgICYucC1zaWRlYmFyLXZpc2libGVcbiAgICAgICAgdHJhbnNmb3JtKCd0cmFuc2xhdGUzZCgwLDAsMCknKVxuICAgICAgICBib3gtc2hhZG93KDNweCAwIDMycHggMCBhbHBoYSgkY29sb3ItZGFya2VzdCwgLjI1KSlcbiAgICAgIC5wLWJhY2stdHJpZ2dlclxuICAgICAgICBkaXNwbGF5IGJsb2NrXG4gICAgICAucC1sb2dvXG4gICAgICAgIGRpc3BsYXkgbm9uZVxuICAgIC5wLW1haW5cbiAgICAgIG1hcmdpbi1sZWZ0IDBcbiAgICAgIHBhZGRpbmctdG9wIDYwcHhcbiAgICAgIHdpZHRoIDEwMCVcbiIsIi5wLXdlbGNvbWVcbiAgcGFkZGluZyA2MHB4IDMwcHhcbiAgcFxuICAgIG1hcmdpbi10b3AgMzBweFxuXG4ucC13ZWxjb21lLWVuZ2luZVxuICBmb250LXdlaWdodCBib2xkXG4gIHRleHQtdHJhbnNmb3JtIGNhcGl0YWxpemVcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==*/ \ No newline at end of file diff --git a/pitsby/main.js b/pitsby/main.js index dcc59f0..2927cdc 100644 --- a/pitsby/main.js +++ b/pitsby/main.js @@ -1,2893 +1,1802 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ function hotDisposeChunk(chunkId) { -/******/ delete installedChunks[chunkId]; -/******/ } -/******/ var parentHotUpdateCallback = window["webpackHotUpdate"]; -/******/ window["webpackHotUpdate"] = // eslint-disable-next-line no-unused-vars -/******/ function webpackHotUpdateCallback(chunkId, moreModules) { -/******/ hotAddUpdateChunk(chunkId, moreModules); -/******/ if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules); -/******/ } ; -/******/ -/******/ // eslint-disable-next-line no-unused-vars -/******/ function hotDownloadUpdateChunk(chunkId) { -/******/ var script = document.createElement("script"); -/******/ script.charset = "utf-8"; -/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js"; -/******/ if (null) script.crossOrigin = null; -/******/ document.head.appendChild(script); -/******/ } -/******/ -/******/ // eslint-disable-next-line no-unused-vars -/******/ function hotDownloadManifest(requestTimeout) { -/******/ requestTimeout = requestTimeout || 10000; -/******/ return new Promise(function(resolve, reject) { -/******/ if (typeof XMLHttpRequest === "undefined") { -/******/ return reject(new Error("No browser support")); -/******/ } -/******/ try { -/******/ var request = new XMLHttpRequest(); -/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json"; -/******/ request.open("GET", requestPath, true); -/******/ request.timeout = requestTimeout; -/******/ request.send(null); -/******/ } catch (err) { -/******/ return reject(err); -/******/ } -/******/ request.onreadystatechange = function() { -/******/ if (request.readyState !== 4) return; -/******/ if (request.status === 0) { -/******/ // timeout -/******/ reject( -/******/ new Error("Manifest request to " + requestPath + " timed out.") -/******/ ); -/******/ } else if (request.status === 404) { -/******/ // no update available -/******/ resolve(); -/******/ } else if (request.status !== 200 && request.status !== 304) { -/******/ // other failure -/******/ reject(new Error("Manifest request to " + requestPath + " failed.")); -/******/ } else { -/******/ // success -/******/ try { -/******/ var update = JSON.parse(request.responseText); -/******/ } catch (e) { -/******/ reject(e); -/******/ return; -/******/ } -/******/ resolve(update); -/******/ } -/******/ }; -/******/ }); -/******/ } -/******/ -/******/ var hotApplyOnUpdate = true; -/******/ // eslint-disable-next-line no-unused-vars -/******/ var hotCurrentHash = "0b70d747d34aae06d155"; -/******/ var hotRequestTimeout = 10000; -/******/ var hotCurrentModuleData = {}; -/******/ var hotCurrentChildModule; -/******/ // eslint-disable-next-line no-unused-vars -/******/ var hotCurrentParents = []; -/******/ // eslint-disable-next-line no-unused-vars -/******/ var hotCurrentParentsTemp = []; -/******/ -/******/ // eslint-disable-next-line no-unused-vars -/******/ function hotCreateRequire(moduleId) { -/******/ var me = installedModules[moduleId]; -/******/ if (!me) return __webpack_require__; -/******/ var fn = function(request) { -/******/ if (me.hot.active) { -/******/ if (installedModules[request]) { -/******/ if (installedModules[request].parents.indexOf(moduleId) === -1) { -/******/ installedModules[request].parents.push(moduleId); -/******/ } -/******/ } else { -/******/ hotCurrentParents = [moduleId]; -/******/ hotCurrentChildModule = request; -/******/ } -/******/ if (me.children.indexOf(request) === -1) { -/******/ me.children.push(request); -/******/ } -/******/ } else { -/******/ console.warn( -/******/ "[HMR] unexpected require(" + -/******/ request + -/******/ ") from disposed module " + -/******/ moduleId -/******/ ); -/******/ hotCurrentParents = []; -/******/ } -/******/ return __webpack_require__(request); -/******/ }; -/******/ var ObjectFactory = function ObjectFactory(name) { -/******/ return { -/******/ configurable: true, -/******/ enumerable: true, -/******/ get: function() { -/******/ return __webpack_require__[name]; -/******/ }, -/******/ set: function(value) { -/******/ __webpack_require__[name] = value; -/******/ } -/******/ }; -/******/ }; -/******/ for (var name in __webpack_require__) { -/******/ if ( -/******/ Object.prototype.hasOwnProperty.call(__webpack_require__, name) && -/******/ name !== "e" && -/******/ name !== "t" -/******/ ) { -/******/ Object.defineProperty(fn, name, ObjectFactory(name)); -/******/ } -/******/ } -/******/ fn.e = function(chunkId) { -/******/ if (hotStatus === "ready") hotSetStatus("prepare"); -/******/ hotChunksLoading++; -/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) { -/******/ finishChunkLoading(); -/******/ throw err; -/******/ }); -/******/ -/******/ function finishChunkLoading() { -/******/ hotChunksLoading--; -/******/ if (hotStatus === "prepare") { -/******/ if (!hotWaitingFilesMap[chunkId]) { -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if (hotChunksLoading === 0 && hotWaitingFiles === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } -/******/ } -/******/ }; -/******/ fn.t = function(value, mode) { -/******/ if (mode & 1) value = fn(value); -/******/ return __webpack_require__.t(value, mode & ~1); -/******/ }; -/******/ return fn; -/******/ } -/******/ -/******/ // eslint-disable-next-line no-unused-vars -/******/ function hotCreateModule(moduleId) { -/******/ var hot = { -/******/ // private stuff -/******/ _acceptedDependencies: {}, -/******/ _declinedDependencies: {}, -/******/ _selfAccepted: false, -/******/ _selfDeclined: false, -/******/ _selfInvalidated: false, -/******/ _disposeHandlers: [], -/******/ _main: hotCurrentChildModule !== moduleId, -/******/ -/******/ // Module API -/******/ active: true, -/******/ accept: function(dep, callback) { -/******/ if (dep === undefined) hot._selfAccepted = true; -/******/ else if (typeof dep === "function") hot._selfAccepted = dep; -/******/ else if (typeof dep === "object") -/******/ for (var i = 0; i < dep.length; i++) -/******/ hot._acceptedDependencies[dep[i]] = callback || function() {}; -/******/ else hot._acceptedDependencies[dep] = callback || function() {}; -/******/ }, -/******/ decline: function(dep) { -/******/ if (dep === undefined) hot._selfDeclined = true; -/******/ else if (typeof dep === "object") -/******/ for (var i = 0; i < dep.length; i++) -/******/ hot._declinedDependencies[dep[i]] = true; -/******/ else hot._declinedDependencies[dep] = true; -/******/ }, -/******/ dispose: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ addDisposeHandler: function(callback) { -/******/ hot._disposeHandlers.push(callback); -/******/ }, -/******/ removeDisposeHandler: function(callback) { -/******/ var idx = hot._disposeHandlers.indexOf(callback); -/******/ if (idx >= 0) hot._disposeHandlers.splice(idx, 1); -/******/ }, -/******/ invalidate: function() { -/******/ this._selfInvalidated = true; -/******/ switch (hotStatus) { -/******/ case "idle": -/******/ hotUpdate = {}; -/******/ hotUpdate[moduleId] = modules[moduleId]; -/******/ hotSetStatus("ready"); -/******/ break; -/******/ case "ready": -/******/ hotApplyInvalidatedModule(moduleId); -/******/ break; -/******/ case "prepare": -/******/ case "check": -/******/ case "dispose": -/******/ case "apply": -/******/ (hotQueuedInvalidatedModules = -/******/ hotQueuedInvalidatedModules || []).push(moduleId); -/******/ break; -/******/ default: -/******/ // ignore requests in error states -/******/ break; -/******/ } -/******/ }, -/******/ -/******/ // Management API -/******/ check: hotCheck, -/******/ apply: hotApply, -/******/ status: function(l) { -/******/ if (!l) return hotStatus; -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ addStatusHandler: function(l) { -/******/ hotStatusHandlers.push(l); -/******/ }, -/******/ removeStatusHandler: function(l) { -/******/ var idx = hotStatusHandlers.indexOf(l); -/******/ if (idx >= 0) hotStatusHandlers.splice(idx, 1); -/******/ }, -/******/ -/******/ //inherit from previous dispose call -/******/ data: hotCurrentModuleData[moduleId] -/******/ }; -/******/ hotCurrentChildModule = undefined; -/******/ return hot; -/******/ } -/******/ -/******/ var hotStatusHandlers = []; -/******/ var hotStatus = "idle"; -/******/ -/******/ function hotSetStatus(newStatus) { -/******/ hotStatus = newStatus; -/******/ for (var i = 0; i < hotStatusHandlers.length; i++) -/******/ hotStatusHandlers[i].call(null, newStatus); -/******/ } -/******/ -/******/ // while downloading -/******/ var hotWaitingFiles = 0; -/******/ var hotChunksLoading = 0; -/******/ var hotWaitingFilesMap = {}; -/******/ var hotRequestedFilesMap = {}; -/******/ var hotAvailableFilesMap = {}; -/******/ var hotDeferred; -/******/ -/******/ // The update info -/******/ var hotUpdate, hotUpdateNewHash, hotQueuedInvalidatedModules; -/******/ -/******/ function toModuleId(id) { -/******/ var isNumber = +id + "" === id; -/******/ return isNumber ? +id : id; -/******/ } -/******/ -/******/ function hotCheck(apply) { -/******/ if (hotStatus !== "idle") { -/******/ throw new Error("check() is only allowed in idle status"); -/******/ } -/******/ hotApplyOnUpdate = apply; -/******/ hotSetStatus("check"); -/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) { -/******/ if (!update) { -/******/ hotSetStatus(hotApplyInvalidatedModules() ? "ready" : "idle"); -/******/ return null; -/******/ } -/******/ hotRequestedFilesMap = {}; -/******/ hotWaitingFilesMap = {}; -/******/ hotAvailableFilesMap = update.c; -/******/ hotUpdateNewHash = update.h; -/******/ -/******/ hotSetStatus("prepare"); -/******/ var promise = new Promise(function(resolve, reject) { -/******/ hotDeferred = { -/******/ resolve: resolve, -/******/ reject: reject -/******/ }; -/******/ }); -/******/ hotUpdate = {}; -/******/ var chunkId = "main"; -/******/ // eslint-disable-next-line no-lone-blocks -/******/ { -/******/ hotEnsureUpdateChunk(chunkId); -/******/ } -/******/ if ( -/******/ hotStatus === "prepare" && -/******/ hotChunksLoading === 0 && -/******/ hotWaitingFiles === 0 -/******/ ) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ return promise; -/******/ }); -/******/ } -/******/ -/******/ // eslint-disable-next-line no-unused-vars -/******/ function hotAddUpdateChunk(chunkId, moreModules) { -/******/ if (!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId]) -/******/ return; -/******/ hotRequestedFilesMap[chunkId] = false; -/******/ for (var moduleId in moreModules) { -/******/ if (Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { -/******/ hotUpdate[moduleId] = moreModules[moduleId]; -/******/ } -/******/ } -/******/ if (--hotWaitingFiles === 0 && hotChunksLoading === 0) { -/******/ hotUpdateDownloaded(); -/******/ } -/******/ } -/******/ -/******/ function hotEnsureUpdateChunk(chunkId) { -/******/ if (!hotAvailableFilesMap[chunkId]) { -/******/ hotWaitingFilesMap[chunkId] = true; -/******/ } else { -/******/ hotRequestedFilesMap[chunkId] = true; -/******/ hotWaitingFiles++; -/******/ hotDownloadUpdateChunk(chunkId); -/******/ } -/******/ } -/******/ -/******/ function hotUpdateDownloaded() { -/******/ hotSetStatus("ready"); -/******/ var deferred = hotDeferred; -/******/ hotDeferred = null; -/******/ if (!deferred) return; -/******/ if (hotApplyOnUpdate) { -/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to -/******/ // avoid triggering uncaught exception warning in Chrome. -/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666 -/******/ Promise.resolve() -/******/ .then(function() { -/******/ return hotApply(hotApplyOnUpdate); -/******/ }) -/******/ .then( -/******/ function(result) { -/******/ deferred.resolve(result); -/******/ }, -/******/ function(err) { -/******/ deferred.reject(err); -/******/ } -/******/ ); -/******/ } else { -/******/ var outdatedModules = []; -/******/ for (var id in hotUpdate) { -/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ outdatedModules.push(toModuleId(id)); -/******/ } -/******/ } -/******/ deferred.resolve(outdatedModules); -/******/ } -/******/ } -/******/ -/******/ function hotApply(options) { -/******/ if (hotStatus !== "ready") -/******/ throw new Error("apply() is only allowed in ready status"); -/******/ options = options || {}; -/******/ return hotApplyInternal(options); -/******/ } -/******/ -/******/ function hotApplyInternal(options) { -/******/ hotApplyInvalidatedModules(); -/******/ -/******/ var cb; -/******/ var i; -/******/ var j; -/******/ var module; -/******/ var moduleId; -/******/ -/******/ function getAffectedStuff(updateModuleId) { -/******/ var outdatedModules = [updateModuleId]; -/******/ var outdatedDependencies = {}; -/******/ -/******/ var queue = outdatedModules.map(function(id) { -/******/ return { -/******/ chain: [id], -/******/ id: id -/******/ }; -/******/ }); -/******/ while (queue.length > 0) { -/******/ var queueItem = queue.pop(); -/******/ var moduleId = queueItem.id; -/******/ var chain = queueItem.chain; -/******/ module = installedModules[moduleId]; -/******/ if ( -/******/ !module || -/******/ (module.hot._selfAccepted && !module.hot._selfInvalidated) -/******/ ) -/******/ continue; -/******/ if (module.hot._selfDeclined) { -/******/ return { -/******/ type: "self-declined", -/******/ chain: chain, -/******/ moduleId: moduleId -/******/ }; -/******/ } -/******/ if (module.hot._main) { -/******/ return { -/******/ type: "unaccepted", -/******/ chain: chain, -/******/ moduleId: moduleId -/******/ }; -/******/ } -/******/ for (var i = 0; i < module.parents.length; i++) { -/******/ var parentId = module.parents[i]; -/******/ var parent = installedModules[parentId]; -/******/ if (!parent) continue; -/******/ if (parent.hot._declinedDependencies[moduleId]) { -/******/ return { -/******/ type: "declined", -/******/ chain: chain.concat([parentId]), -/******/ moduleId: moduleId, -/******/ parentId: parentId -/******/ }; -/******/ } -/******/ if (outdatedModules.indexOf(parentId) !== -1) continue; -/******/ if (parent.hot._acceptedDependencies[moduleId]) { -/******/ if (!outdatedDependencies[parentId]) -/******/ outdatedDependencies[parentId] = []; -/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]); -/******/ continue; -/******/ } -/******/ delete outdatedDependencies[parentId]; -/******/ outdatedModules.push(parentId); -/******/ queue.push({ -/******/ chain: chain.concat([parentId]), -/******/ id: parentId -/******/ }); -/******/ } -/******/ } -/******/ -/******/ return { -/******/ type: "accepted", -/******/ moduleId: updateModuleId, -/******/ outdatedModules: outdatedModules, -/******/ outdatedDependencies: outdatedDependencies -/******/ }; -/******/ } -/******/ -/******/ function addAllToSet(a, b) { -/******/ for (var i = 0; i < b.length; i++) { -/******/ var item = b[i]; -/******/ if (a.indexOf(item) === -1) a.push(item); -/******/ } -/******/ } -/******/ -/******/ // at begin all updates modules are outdated -/******/ // the "outdated" status can propagate to parents if they don't accept the children -/******/ var outdatedDependencies = {}; -/******/ var outdatedModules = []; -/******/ var appliedUpdate = {}; -/******/ -/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() { -/******/ console.warn( -/******/ "[HMR] unexpected require(" + result.moduleId + ") to disposed module" -/******/ ); -/******/ }; -/******/ -/******/ for (var id in hotUpdate) { -/******/ if (Object.prototype.hasOwnProperty.call(hotUpdate, id)) { -/******/ moduleId = toModuleId(id); -/******/ /** @type {TODO} */ -/******/ var result; -/******/ if (hotUpdate[id]) { -/******/ result = getAffectedStuff(moduleId); -/******/ } else { -/******/ result = { -/******/ type: "disposed", -/******/ moduleId: id -/******/ }; -/******/ } -/******/ /** @type {Error|false} */ -/******/ var abortError = false; -/******/ var doApply = false; -/******/ var doDispose = false; -/******/ var chainInfo = ""; -/******/ if (result.chain) { -/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> "); -/******/ } -/******/ switch (result.type) { -/******/ case "self-declined": -/******/ if (options.onDeclined) options.onDeclined(result); -/******/ if (!options.ignoreDeclined) -/******/ abortError = new Error( -/******/ "Aborted because of self decline: " + -/******/ result.moduleId + -/******/ chainInfo -/******/ ); -/******/ break; -/******/ case "declined": -/******/ if (options.onDeclined) options.onDeclined(result); -/******/ if (!options.ignoreDeclined) -/******/ abortError = new Error( -/******/ "Aborted because of declined dependency: " + -/******/ result.moduleId + -/******/ " in " + -/******/ result.parentId + -/******/ chainInfo -/******/ ); -/******/ break; -/******/ case "unaccepted": -/******/ if (options.onUnaccepted) options.onUnaccepted(result); -/******/ if (!options.ignoreUnaccepted) -/******/ abortError = new Error( -/******/ "Aborted because " + moduleId + " is not accepted" + chainInfo -/******/ ); -/******/ break; -/******/ case "accepted": -/******/ if (options.onAccepted) options.onAccepted(result); -/******/ doApply = true; -/******/ break; -/******/ case "disposed": -/******/ if (options.onDisposed) options.onDisposed(result); -/******/ doDispose = true; -/******/ break; -/******/ default: -/******/ throw new Error("Unexception type " + result.type); -/******/ } -/******/ if (abortError) { -/******/ hotSetStatus("abort"); -/******/ return Promise.reject(abortError); -/******/ } -/******/ if (doApply) { -/******/ appliedUpdate[moduleId] = hotUpdate[moduleId]; -/******/ addAllToSet(outdatedModules, result.outdatedModules); -/******/ for (moduleId in result.outdatedDependencies) { -/******/ if ( -/******/ Object.prototype.hasOwnProperty.call( -/******/ result.outdatedDependencies, -/******/ moduleId -/******/ ) -/******/ ) { -/******/ if (!outdatedDependencies[moduleId]) -/******/ outdatedDependencies[moduleId] = []; -/******/ addAllToSet( -/******/ outdatedDependencies[moduleId], -/******/ result.outdatedDependencies[moduleId] -/******/ ); -/******/ } -/******/ } -/******/ } -/******/ if (doDispose) { -/******/ addAllToSet(outdatedModules, [result.moduleId]); -/******/ appliedUpdate[moduleId] = warnUnexpectedRequire; -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Store self accepted outdated modules to require them later by the module system -/******/ var outdatedSelfAcceptedModules = []; -/******/ for (i = 0; i < outdatedModules.length; i++) { -/******/ moduleId = outdatedModules[i]; -/******/ if ( -/******/ installedModules[moduleId] && -/******/ installedModules[moduleId].hot._selfAccepted && -/******/ // removed self-accepted modules should not be required -/******/ appliedUpdate[moduleId] !== warnUnexpectedRequire && -/******/ // when called invalidate self-accepting is not possible -/******/ !installedModules[moduleId].hot._selfInvalidated -/******/ ) { -/******/ outdatedSelfAcceptedModules.push({ -/******/ module: moduleId, -/******/ parents: installedModules[moduleId].parents.slice(), -/******/ errorHandler: installedModules[moduleId].hot._selfAccepted -/******/ }); -/******/ } -/******/ } -/******/ -/******/ // Now in "dispose" phase -/******/ hotSetStatus("dispose"); -/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) { -/******/ if (hotAvailableFilesMap[chunkId] === false) { -/******/ hotDisposeChunk(chunkId); -/******/ } -/******/ }); -/******/ -/******/ var idx; -/******/ var queue = outdatedModules.slice(); -/******/ while (queue.length > 0) { -/******/ moduleId = queue.pop(); -/******/ module = installedModules[moduleId]; -/******/ if (!module) continue; -/******/ -/******/ var data = {}; -/******/ -/******/ // Call dispose handlers -/******/ var disposeHandlers = module.hot._disposeHandlers; -/******/ for (j = 0; j < disposeHandlers.length; j++) { -/******/ cb = disposeHandlers[j]; -/******/ cb(data); -/******/ } -/******/ hotCurrentModuleData[moduleId] = data; -/******/ -/******/ // disable module (this disables requires from this module) -/******/ module.hot.active = false; -/******/ -/******/ // remove module from cache -/******/ delete installedModules[moduleId]; -/******/ -/******/ // when disposing there is no need to call dispose handler -/******/ delete outdatedDependencies[moduleId]; -/******/ -/******/ // remove "parents" references from all children -/******/ for (j = 0; j < module.children.length; j++) { -/******/ var child = installedModules[module.children[j]]; -/******/ if (!child) continue; -/******/ idx = child.parents.indexOf(moduleId); -/******/ if (idx >= 0) { -/******/ child.parents.splice(idx, 1); -/******/ } -/******/ } -/******/ } -/******/ -/******/ // remove outdated dependency from module children -/******/ var dependency; -/******/ var moduleOutdatedDependencies; -/******/ for (moduleId in outdatedDependencies) { -/******/ if ( -/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId) -/******/ ) { -/******/ module = installedModules[moduleId]; -/******/ if (module) { -/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ for (j = 0; j < moduleOutdatedDependencies.length; j++) { -/******/ dependency = moduleOutdatedDependencies[j]; -/******/ idx = module.children.indexOf(dependency); -/******/ if (idx >= 0) module.children.splice(idx, 1); -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Now in "apply" phase -/******/ hotSetStatus("apply"); -/******/ -/******/ if (hotUpdateNewHash !== undefined) { -/******/ hotCurrentHash = hotUpdateNewHash; -/******/ hotUpdateNewHash = undefined; -/******/ } -/******/ hotUpdate = undefined; -/******/ -/******/ // insert new code -/******/ for (moduleId in appliedUpdate) { -/******/ if (Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) { -/******/ modules[moduleId] = appliedUpdate[moduleId]; -/******/ } -/******/ } -/******/ -/******/ // call accept handlers -/******/ var error = null; -/******/ for (moduleId in outdatedDependencies) { -/******/ if ( -/******/ Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId) -/******/ ) { -/******/ module = installedModules[moduleId]; -/******/ if (module) { -/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId]; -/******/ var callbacks = []; -/******/ for (i = 0; i < moduleOutdatedDependencies.length; i++) { -/******/ dependency = moduleOutdatedDependencies[i]; -/******/ cb = module.hot._acceptedDependencies[dependency]; -/******/ if (cb) { -/******/ if (callbacks.indexOf(cb) !== -1) continue; -/******/ callbacks.push(cb); -/******/ } -/******/ } -/******/ for (i = 0; i < callbacks.length; i++) { -/******/ cb = callbacks[i]; -/******/ try { -/******/ cb(moduleOutdatedDependencies); -/******/ } catch (err) { -/******/ if (options.onErrored) { -/******/ options.onErrored({ -/******/ type: "accept-errored", -/******/ moduleId: moduleId, -/******/ dependencyId: moduleOutdatedDependencies[i], -/******/ error: err -/******/ }); -/******/ } -/******/ if (!options.ignoreErrored) { -/******/ if (!error) error = err; -/******/ } -/******/ } -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // Load self accepted modules -/******/ for (i = 0; i < outdatedSelfAcceptedModules.length; i++) { -/******/ var item = outdatedSelfAcceptedModules[i]; -/******/ moduleId = item.module; -/******/ hotCurrentParents = item.parents; -/******/ hotCurrentChildModule = moduleId; -/******/ try { -/******/ __webpack_require__(moduleId); -/******/ } catch (err) { -/******/ if (typeof item.errorHandler === "function") { -/******/ try { -/******/ item.errorHandler(err); -/******/ } catch (err2) { -/******/ if (options.onErrored) { -/******/ options.onErrored({ -/******/ type: "self-accept-error-handler-errored", -/******/ moduleId: moduleId, -/******/ error: err2, -/******/ originalError: err -/******/ }); -/******/ } -/******/ if (!options.ignoreErrored) { -/******/ if (!error) error = err2; -/******/ } -/******/ if (!error) error = err; -/******/ } -/******/ } else { -/******/ if (options.onErrored) { -/******/ options.onErrored({ -/******/ type: "self-accept-errored", -/******/ moduleId: moduleId, -/******/ error: err -/******/ }); -/******/ } -/******/ if (!options.ignoreErrored) { -/******/ if (!error) error = err; -/******/ } -/******/ } -/******/ } -/******/ } -/******/ -/******/ // handle errors in accept handlers and self accepted module load -/******/ if (error) { -/******/ hotSetStatus("fail"); -/******/ return Promise.reject(error); -/******/ } -/******/ -/******/ if (hotQueuedInvalidatedModules) { -/******/ return hotApplyInternal(options).then(function(list) { -/******/ outdatedModules.forEach(function(moduleId) { -/******/ if (list.indexOf(moduleId) < 0) list.push(moduleId); -/******/ }); -/******/ return list; -/******/ }); -/******/ } -/******/ -/******/ hotSetStatus("idle"); -/******/ return new Promise(function(resolve) { -/******/ resolve(outdatedModules); -/******/ }); -/******/ } -/******/ -/******/ function hotApplyInvalidatedModules() { -/******/ if (hotQueuedInvalidatedModules) { -/******/ if (!hotUpdate) hotUpdate = {}; -/******/ hotQueuedInvalidatedModules.forEach(hotApplyInvalidatedModule); -/******/ hotQueuedInvalidatedModules = undefined; -/******/ return true; -/******/ } -/******/ } -/******/ -/******/ function hotApplyInvalidatedModule(moduleId) { -/******/ if (!Object.prototype.hasOwnProperty.call(hotUpdate, moduleId)) -/******/ hotUpdate[moduleId] = modules[moduleId]; -/******/ } -/******/ -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {}, -/******/ hot: hotCreateModule(moduleId), -/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp), -/******/ children: [] -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId)); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // __webpack_hash__ -/******/ __webpack_require__.h = function() { return hotCurrentHash; }; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return hotCreateRequire(0)(__webpack_require__.s = 0); -/******/ }) -/************************************************************************/ -/******/ ({ +/* + * ATTENTION: An "eval-source-map" devtool has been used. + * This devtool is neither made for production nor for readable output files. + * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. + * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) + * or disable the default devtool with "devtool: false". + * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). + */ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ -/***/ "../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive": -/*!*************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/@babel+standalone@7.15.7/node_modules/@babel/standalone sync ***! - \*************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { +/***/ "../../../../@glorious+fyzer@0.1.10/node_modules/@glorious/fyzer/dist/fyzer.min.js": +/*!*****************************************************************************************!*\ + !*** ../../../../@glorious+fyzer@0.1.10/node_modules/@glorious/fyzer/dist/fyzer.min.js ***! + \*****************************************************************************************/ +/***/ ((module) => { -eval("function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = function() { return []; };\nwebpackEmptyContext.resolve = webpackEmptyContext;\nmodule.exports = webpackEmptyContext;\nwebpackEmptyContext.id = \"../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\";//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9AYmFiZWwrc3RhbmRhbG9uZUA3LjE1Ljcvbm9kZV9tb2R1bGVzL0BiYWJlbC9zdGFuZGFsb25lIHN5bmM/ODljMiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUNBQXVDLFdBQVc7QUFDbEQ7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL0BiYWJlbCtzdGFuZGFsb25lQDcuMTUuNy9ub2RlX21vZHVsZXMvQGJhYmVsL3N0YW5kYWxvbmUgc3luYyByZWN1cnNpdmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiB3ZWJwYWNrRW1wdHlDb250ZXh0KHJlcSkge1xuXHR2YXIgZSA9IG5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIgKyByZXEgKyBcIidcIik7XG5cdGUuY29kZSA9ICdNT0RVTEVfTk9UX0ZPVU5EJztcblx0dGhyb3cgZTtcbn1cbndlYnBhY2tFbXB0eUNvbnRleHQua2V5cyA9IGZ1bmN0aW9uKCkgeyByZXR1cm4gW107IH07XG53ZWJwYWNrRW1wdHlDb250ZXh0LnJlc29sdmUgPSB3ZWJwYWNrRW1wdHlDb250ZXh0O1xubW9kdWxlLmV4cG9ydHMgPSB3ZWJwYWNrRW1wdHlDb250ZXh0O1xud2VicGFja0VtcHR5Q29udGV4dC5pZCA9IFwiLi4vLi4vLi4vLi4vQGJhYmVsK3N0YW5kYWxvbmVANy4xNS43L25vZGVfbW9kdWxlcy9AYmFiZWwvc3RhbmRhbG9uZSBzeW5jIHJlY3Vyc2l2ZVwiOyJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\n"); +eval("!function(e,t){ true?module.exports=t():0}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},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=10)}([function(e,t,n){\"use strict\";var r,o,u,i=n(3),f=\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-\";function c(){u=!1}function s(e){if(e){if(e!==r){if(e.length!==f.length)throw new Error(\"Custom alphabet for shortid must be \"+f.length+\" unique characters. You submitted \"+e.length+\" characters: \"+e);var t=e.split(\"\").filter((function(e,t,n){return t!==n.lastIndexOf(e)}));if(t.length)throw new Error(\"Custom alphabet for shortid must be \"+f.length+\" unique characters. These characters were not unique: \"+t.join(\", \"));r=e,c()}}else r!==f&&(r=f,c())}function a(){return u||(u=function(){r||s(f);for(var e,t=r.split(\"\"),n=[],o=i.nextValue();t.length>0;)o=i.nextValue(),e=Math.floor(o*t.length),n.push(t.splice(e,1)[0]);return n.join(\"\")}())}e.exports={get:function(){return r||f},characters:function(e){return s(e),r},seed:function(e){i.seed(e),o!==e&&(c(),o=e)},lookup:function(e){return a()[e]},shuffled:a}},function(e,t,n){\"use strict\";e.exports=n(2)},function(e,t,n){\"use strict\";var r=n(0),o=n(4),u=n(8),i=n(9)||0;function f(){return o(i)}e.exports=f,e.exports.generate=f,e.exports.seed=function(t){return r.seed(t),e.exports},e.exports.worker=function(t){return i=t,e.exports},e.exports.characters=function(e){return void 0!==e&&r.characters(e),r.shuffled()},e.exports.isValid=u},function(e,t,n){\"use strict\";var r=1;e.exports={nextValue:function(){return(r=(9301*r+49297)%233280)/233280},seed:function(e){r=e}}},function(e,t,n){\"use strict\";var r,o,u=n(5);n(0);e.exports=function(e){var t=\"\",n=Math.floor(.001*(Date.now()-1567752802062));return n===o?r++:(r=0,o=n),t+=u(7),t+=u(e),r>0&&(t+=u(r)),t+=u(n)}},function(e,t,n){\"use strict\";var r=n(0),o=n(6),u=n(7);e.exports=function(e){for(var t,n=0,i=\"\";!t;)i+=u(o,r.get(),1),t=e { -eval("/* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {\n\t true ? factory(exports) :\n\tundefined;\n}(this, (function (exports) { 'use strict';\n\n\tvar babel = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tget version () { return version$3; },\n\t\tget types () { return t$f; },\n\t\tget DEFAULT_EXTENSIONS () { return DEFAULT_EXTENSIONS; },\n\t\tget OptionManager () { return OptionManager; },\n\t\tget Plugin () { return Plugin; },\n\t\tget File () { return File; },\n\t\tget buildExternalHelpers () { return babelBuildExternalHelpers; },\n\t\tget resolvePlugin () { return resolvePlugin; },\n\t\tget resolvePreset () { return resolvePreset; },\n\t\tget getEnv () { return getEnv; },\n\t\tget tokTypes () { return tokTypes; },\n\t\tget traverse () { return traverse; },\n\t\tget template () { return template$2; },\n\t\tget createConfigItem () { return createConfigItem; },\n\t\tget createConfigItemSync () { return createConfigItemSync; },\n\t\tget createConfigItemAsync () { return createConfigItemAsync; },\n\t\tget loadPartialConfig () { return loadPartialConfig; },\n\t\tget loadPartialConfigSync () { return loadPartialConfigSync; },\n\t\tget loadPartialConfigAsync () { return loadPartialConfigAsync; },\n\t\tget loadOptions () { return loadOptions; },\n\t\tget loadOptionsSync () { return loadOptionsSync; },\n\t\tget loadOptionsAsync () { return loadOptionsAsync; },\n\t\tget transform () { return transform$2; },\n\t\tget transformSync () { return transformSync; },\n\t\tget transformAsync () { return transformAsync; },\n\t\tget transformFile () { return transformFile; },\n\t\tget transformFileSync () { return transformFileSync; },\n\t\tget transformFileAsync () { return transformFileAsync; },\n\t\tget transformFromAst () { return transformFromAst$1; },\n\t\tget transformFromAstSync () { return transformFromAstSync; },\n\t\tget transformFromAstAsync () { return transformFromAstAsync; },\n\t\tget parse () { return parse$2; },\n\t\tget parseSync () { return parseSync; },\n\t\tget parseAsync () { return parseAsync; }\n\t});\n\n\tvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\tfunction getAugmentedNamespace(n) {\n\t\tif (n.__esModule) return n;\n\t\tvar a = Object.defineProperty({}, '__esModule', {value: true});\n\t\tObject.keys(n).forEach(function (k) {\n\t\t\tvar d = Object.getOwnPropertyDescriptor(n, k);\n\t\t\tObject.defineProperty(a, k, d.get ? d : {\n\t\t\t\tenumerable: true,\n\t\t\t\tget: function () {\n\t\t\t\t\treturn n[k];\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t\treturn a;\n\t}\n\n\tfunction createCommonjsModule(fn, basedir, module) {\n\t\treturn module = {\n\t\t\tpath: basedir,\n\t\t\texports: {},\n\t\t\trequire: function (path, base) {\n\t\t\t\treturn commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n\t\t\t}\n\t\t}, fn(module, module.exports), module.exports;\n\t}\n\n\tfunction commonjsRegister (path, loader) {\n\t\tDYNAMIC_REQUIRE_LOADERS[path] = loader;\n\t}\n\n\tconst DYNAMIC_REQUIRE_LOADERS = Object.create(null);\n\tconst DYNAMIC_REQUIRE_CACHE = Object.create(null);\n\tconst DEFAULT_PARENT_MODULE = {\n\t\tid: '<' + 'rollup>', exports: {}, parent: undefined, filename: null, loaded: false, children: [], paths: []\n\t};\n\tconst CHECKED_EXTENSIONS = ['', '.js', '.json'];\n\n\tfunction normalize$2 (path) {\n\t\tpath = path.replace(/\\\\/g, '/');\n\t\tconst parts = path.split('/');\n\t\tconst slashed = parts[0] === '';\n\t\tfor (let i = 1; i < parts.length; i++) {\n\t\t\tif (parts[i] === '.' || parts[i] === '') {\n\t\t\t\tparts.splice(i--, 1);\n\t\t\t}\n\t\t}\n\t\tfor (let i = 1; i < parts.length; i++) {\n\t\t\tif (parts[i] !== '..') continue;\n\t\t\tif (i > 0 && parts[i - 1] !== '..' && parts[i - 1] !== '.') {\n\t\t\t\tparts.splice(--i, 2);\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tpath = parts.join('/');\n\t\tif (slashed && path[0] !== '/')\n\t\t path = '/' + path;\n\t\telse if (path.length === 0)\n\t\t path = '.';\n\t\treturn path;\n\t}\n\n\tfunction join$1 () {\n\t\tif (arguments.length === 0)\n\t\t return '.';\n\t\tlet joined;\n\t\tfor (let i = 0; i < arguments.length; ++i) {\n\t\t let arg = arguments[i];\n\t\t if (arg.length > 0) {\n\t\t\tif (joined === undefined)\n\t\t\t joined = arg;\n\t\t\telse\n\t\t\t joined += '/' + arg;\n\t\t }\n\t\t}\n\t\tif (joined === undefined)\n\t\t return '.';\n\n\t\treturn joined;\n\t}\n\n\tfunction isPossibleNodeModulesPath (modulePath) {\n\t\tlet c0 = modulePath[0];\n\t\tif (c0 === '/' || c0 === '\\\\') return false;\n\t\tlet c1 = modulePath[1], c2 = modulePath[2];\n\t\tif ((c0 === '.' && (!c1 || c1 === '/' || c1 === '\\\\')) ||\n\t\t\t(c0 === '.' && c1 === '.' && (!c2 || c2 === '/' || c2 === '\\\\'))) return false;\n\t\tif (c1 === ':' && (c2 === '/' || c2 === '\\\\'))\n\t\t\treturn false;\n\t\treturn true;\n\t}\n\n\tfunction dirname$1 (path) {\n\t if (path.length === 0)\n\t return '.';\n\n\t let i = path.length - 1;\n\t while (i > 0) {\n\t const c = path.charCodeAt(i);\n\t if ((c === 47 || c === 92) && i !== path.length - 1)\n\t break;\n\t i--;\n\t }\n\n\t if (i > 0)\n\t return path.substr(0, i);\n\n\t if (path.chartCodeAt(0) === 47 || path.chartCodeAt(0) === 92)\n\t return path.charAt(0);\n\n\t return '.';\n\t}\n\n\tfunction commonjsResolveImpl (path, originalModuleDir, testCache) {\n\t\tconst shouldTryNodeModules = isPossibleNodeModulesPath(path);\n\t\tpath = normalize$2(path);\n\t\tlet relPath;\n\t\tif (path[0] === '/') {\n\t\t\toriginalModuleDir = '/';\n\t\t}\n\t\twhile (true) {\n\t\t\tif (!shouldTryNodeModules) {\n\t\t\t\trelPath = originalModuleDir ? normalize$2(originalModuleDir + '/' + path) : path;\n\t\t\t} else if (originalModuleDir) {\n\t\t\t\trelPath = normalize$2(originalModuleDir + '/node_modules/' + path);\n\t\t\t} else {\n\t\t\t\trelPath = normalize$2(join$1('node_modules', path));\n\t\t\t}\n\n\t\t\tif (relPath.endsWith('/..')) {\n\t\t\t\tbreak; // Travelled too far up, avoid infinite loop\n\t\t\t}\n\n\t\t\tfor (let extensionIndex = 0; extensionIndex < CHECKED_EXTENSIONS.length; extensionIndex++) {\n\t\t\t\tconst resolvedPath = relPath + CHECKED_EXTENSIONS[extensionIndex];\n\t\t\t\tif (DYNAMIC_REQUIRE_CACHE[resolvedPath]) {\n\t\t\t\t\treturn resolvedPath;\n\t\t\t\t}\t\t\tif (DYNAMIC_REQUIRE_LOADERS[resolvedPath]) {\n\t\t\t\t\treturn resolvedPath;\n\t\t\t\t}\t\t}\n\t\t\tif (!shouldTryNodeModules) break;\n\t\t\tconst nextDir = normalize$2(originalModuleDir + '/..');\n\t\t\tif (nextDir === originalModuleDir) break;\n\t\t\toriginalModuleDir = nextDir;\n\t\t}\n\t\treturn null;\n\t}\n\n\tfunction commonjsResolve (path, originalModuleDir) {\n\t\tconst resolvedPath = commonjsResolveImpl(path, originalModuleDir);\n\t\tif (resolvedPath !== null) {\n\t\t\treturn resolvedPath;\n\t\t}\n\t\treturn /*require.resolve*/(__webpack_require__(\"../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\").resolve(path));\n\t}\n\n\tfunction commonjsRequire (path, originalModuleDir) {\n\t\tconst resolvedPath = commonjsResolveImpl(path, originalModuleDir);\n\t\tif (resolvedPath !== null) {\n\t let cachedModule = DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t if (cachedModule) return cachedModule.exports;\n\t const loader = DYNAMIC_REQUIRE_LOADERS[resolvedPath];\n\t if (loader) {\n\t DYNAMIC_REQUIRE_CACHE[resolvedPath] = cachedModule = {\n\t id: resolvedPath,\n\t filename: resolvedPath,\n\t path: dirname$1(resolvedPath),\n\t exports: {},\n\t parent: DEFAULT_PARENT_MODULE,\n\t loaded: false,\n\t children: [],\n\t paths: [],\n\t require: function (path, base) {\n\t return commonjsRequire(path, (base === undefined || base === null) ? cachedModule.path : base);\n\t }\n\t };\n\t try {\n\t loader.call(commonjsGlobal, cachedModule, cachedModule.exports);\n\t } catch (error) {\n\t delete DYNAMIC_REQUIRE_CACHE[resolvedPath];\n\t throw error;\n\t }\n\t cachedModule.loaded = true;\n\t return cachedModule.exports;\n\t }\t}\n\t\treturn __webpack_require__(\"../../../../@babel+standalone@7.15.7/node_modules/@babel/standalone sync recursive\")(path);\n\t}\n\n\tcommonjsRequire.cache = DYNAMIC_REQUIRE_CACHE;\n\tcommonjsRequire.resolve = commonjsResolve;\n\n\tvar regenerate = createCommonjsModule(function (module, exports) {\n\n\t (function (root) {\n\t var freeExports = exports;\n\t var freeModule = module && module.exports == freeExports && module;\n\t var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal;\n\n\t if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {\n\t root = freeGlobal;\n\t }\n\n\t var ERRORS = {\n\t 'rangeOrder': \"A range\\u2019s `stop` value must be greater than or equal \" + 'to the `start` value.',\n\t 'codePointRange': 'Invalid code point value. Code points range from ' + 'U+000000 to U+10FFFF.'\n\t };\n\t var HIGH_SURROGATE_MIN = 0xD800;\n\t var HIGH_SURROGATE_MAX = 0xDBFF;\n\t var LOW_SURROGATE_MIN = 0xDC00;\n\t var LOW_SURROGATE_MAX = 0xDFFF;\n\t var regexNull = /\\\\x00([^0123456789]|$)/g;\n\t var object = {};\n\t var hasOwnProperty = object.hasOwnProperty;\n\n\t var extend = function extend(destination, source) {\n\t var key;\n\n\t for (key in source) {\n\t if (hasOwnProperty.call(source, key)) {\n\t destination[key] = source[key];\n\t }\n\t }\n\n\t return destination;\n\t };\n\n\t var forEach = function forEach(array, callback) {\n\t var index = -1;\n\t var length = array.length;\n\n\t while (++index < length) {\n\t callback(array[index], index);\n\t }\n\t };\n\n\t var toString = object.toString;\n\n\t var isArray = function isArray(value) {\n\t return toString.call(value) == '[object Array]';\n\t };\n\n\t var isNumber = function isNumber(value) {\n\t return typeof value == 'number' || toString.call(value) == '[object Number]';\n\t };\n\n\t var zeroes = '0000';\n\n\t var pad = function pad(number, totalCharacters) {\n\t var string = String(number);\n\t return string.length < totalCharacters ? (zeroes + string).slice(-totalCharacters) : string;\n\t };\n\n\t var hex = function hex(number) {\n\t return Number(number).toString(16).toUpperCase();\n\t };\n\n\t var slice = [].slice;\n\n\t var dataFromCodePoints = function dataFromCodePoints(codePoints) {\n\t var index = -1;\n\t var length = codePoints.length;\n\t var max = length - 1;\n\t var result = [];\n\t var isStart = true;\n\t var tmp;\n\t var previous = 0;\n\n\t while (++index < length) {\n\t tmp = codePoints[index];\n\n\t if (isStart) {\n\t result.push(tmp);\n\t previous = tmp;\n\t isStart = false;\n\t } else {\n\t if (tmp == previous + 1) {\n\t if (index != max) {\n\t previous = tmp;\n\t continue;\n\t } else {\n\t isStart = true;\n\t result.push(tmp + 1);\n\t }\n\t } else {\n\t result.push(previous + 1, tmp);\n\t previous = tmp;\n\t }\n\t }\n\t }\n\n\t if (!isStart) {\n\t result.push(tmp + 1);\n\t }\n\n\t return result;\n\t };\n\n\t var dataRemove = function dataRemove(data, codePoint) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (codePoint >= start && codePoint < end) {\n\t if (codePoint == start) {\n\t if (end == start + 1) {\n\t data.splice(index, 2);\n\t return data;\n\t } else {\n\t data[index] = codePoint + 1;\n\t return data;\n\t }\n\t } else if (codePoint == end - 1) {\n\t data[index + 1] = codePoint;\n\t return data;\n\t } else {\n\t data.splice(index, 2, start, codePoint, codePoint + 1, end);\n\t return data;\n\t }\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataRemoveRange = function dataRemoveRange(data, rangeStart, rangeEnd) {\n\t if (rangeEnd < rangeStart) {\n\t throw Error(ERRORS.rangeOrder);\n\t }\n\n\t var index = 0;\n\t var start;\n\t var end;\n\n\t while (index < data.length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start > rangeEnd) {\n\t return data;\n\t }\n\n\t if (rangeStart <= start && rangeEnd >= end) {\n\t data.splice(index, 2);\n\t continue;\n\t }\n\n\t if (rangeStart >= start && rangeEnd < end) {\n\t if (rangeStart == start) {\n\t data[index] = rangeEnd + 1;\n\t data[index + 1] = end + 1;\n\t return data;\n\t }\n\n\t data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);\n\t return data;\n\t }\n\n\t if (rangeStart >= start && rangeStart <= end) {\n\t data[index + 1] = rangeStart;\n\t } else if (rangeEnd >= start && rangeEnd <= end) {\n\t data[index] = rangeEnd + 1;\n\t return data;\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataAdd = function dataAdd(data, codePoint) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var lastIndex = null;\n\t var length = data.length;\n\n\t if (codePoint < 0x0 || codePoint > 0x10FFFF) {\n\t throw RangeError(ERRORS.codePointRange);\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (codePoint >= start && codePoint < end) {\n\t return data;\n\t }\n\n\t if (codePoint == start - 1) {\n\t data[index] = codePoint;\n\t return data;\n\t }\n\n\t if (start > codePoint) {\n\t data.splice(lastIndex != null ? lastIndex + 2 : 0, 0, codePoint, codePoint + 1);\n\t return data;\n\t }\n\n\t if (codePoint == end) {\n\t if (codePoint + 1 == data[index + 2]) {\n\t data.splice(index, 4, start, data[index + 3]);\n\t return data;\n\t }\n\n\t data[index + 1] = codePoint + 1;\n\t return data;\n\t }\n\n\t lastIndex = index;\n\t index += 2;\n\t }\n\n\t data.push(codePoint, codePoint + 1);\n\t return data;\n\t };\n\n\t var dataAddData = function dataAddData(dataA, dataB) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var data = dataA.slice();\n\t var length = dataB.length;\n\n\t while (index < length) {\n\t start = dataB[index];\n\t end = dataB[index + 1] - 1;\n\n\t if (start == end) {\n\t data = dataAdd(data, start);\n\t } else {\n\t data = dataAddRange(data, start, end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataRemoveData = function dataRemoveData(dataA, dataB) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var data = dataA.slice();\n\t var length = dataB.length;\n\n\t while (index < length) {\n\t start = dataB[index];\n\t end = dataB[index + 1] - 1;\n\n\t if (start == end) {\n\t data = dataRemove(data, start);\n\t } else {\n\t data = dataRemoveRange(data, start, end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return data;\n\t };\n\n\t var dataAddRange = function dataAddRange(data, rangeStart, rangeEnd) {\n\t if (rangeEnd < rangeStart) {\n\t throw Error(ERRORS.rangeOrder);\n\t }\n\n\t if (rangeStart < 0x0 || rangeStart > 0x10FFFF || rangeEnd < 0x0 || rangeEnd > 0x10FFFF) {\n\t throw RangeError(ERRORS.codePointRange);\n\t }\n\n\t var index = 0;\n\t var start;\n\t var end;\n\t var added = false;\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (added) {\n\t if (start == rangeEnd + 1) {\n\t data.splice(index - 1, 2);\n\t return data;\n\t }\n\n\t if (start > rangeEnd) {\n\t return data;\n\t }\n\n\t if (start >= rangeStart && start <= rangeEnd) {\n\t if (end > rangeStart && end - 1 <= rangeEnd) {\n\t data.splice(index, 2);\n\t index -= 2;\n\t } else {\n\t data.splice(index - 1, 2);\n\t index -= 2;\n\t }\n\t }\n\t } else if (start == rangeEnd + 1 || start == rangeEnd) {\n\t data[index] = rangeStart;\n\t return data;\n\t } else if (start > rangeEnd) {\n\t data.splice(index, 0, rangeStart, rangeEnd + 1);\n\t return data;\n\t } else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {\n\t return data;\n\t } else if (rangeStart >= start && rangeStart < end || end == rangeStart) {\n\t data[index + 1] = rangeEnd + 1;\n\t added = true;\n\t } else if (rangeStart <= start && rangeEnd + 1 >= end) {\n\t data[index] = rangeStart;\n\t data[index + 1] = rangeEnd + 1;\n\t added = true;\n\t }\n\n\t index += 2;\n\t }\n\n\t if (!added) {\n\t data.push(rangeStart, rangeEnd + 1);\n\t }\n\n\t return data;\n\t };\n\n\t var dataContains = function dataContains(data, codePoint) {\n\t var index = 0;\n\t var length = data.length;\n\t var start = data[index];\n\t var end = data[length - 1];\n\n\t if (length >= 2) {\n\t if (codePoint < start || codePoint > end) {\n\t return false;\n\t }\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t if (codePoint >= start && codePoint < end) {\n\t return true;\n\t }\n\n\t index += 2;\n\t }\n\n\t return false;\n\t };\n\n\t var dataIntersection = function dataIntersection(data, codePoints) {\n\t var index = 0;\n\t var length = codePoints.length;\n\t var codePoint;\n\t var result = [];\n\n\t while (index < length) {\n\t codePoint = codePoints[index];\n\n\t if (dataContains(data, codePoint)) {\n\t result.push(codePoint);\n\t }\n\n\t ++index;\n\t }\n\n\t return dataFromCodePoints(result);\n\t };\n\n\t var dataIsEmpty = function dataIsEmpty(data) {\n\t return !data.length;\n\t };\n\n\t var dataIsSingleton = function dataIsSingleton(data) {\n\t return data.length == 2 && data[0] + 1 == data[1];\n\t };\n\n\t var dataToArray = function dataToArray(data) {\n\t var index = 0;\n\t var start;\n\t var end;\n\t var result = [];\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1];\n\n\t while (start < end) {\n\t result.push(start);\n\t ++start;\n\t }\n\n\t index += 2;\n\t }\n\n\t return result;\n\t };\n\n\t var floor = Math.floor;\n\n\t var highSurrogate = function highSurrogate(codePoint) {\n\t return parseInt(floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN, 10);\n\t };\n\n\t var lowSurrogate = function lowSurrogate(codePoint) {\n\t return parseInt((codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN, 10);\n\t };\n\n\t var stringFromCharCode = String.fromCharCode;\n\n\t var codePointToString = function codePointToString(codePoint) {\n\t var string;\n\n\t if (codePoint == 0x09) {\n\t string = '\\\\t';\n\t } else if (codePoint == 0x0A) {\n\t string = '\\\\n';\n\t } else if (codePoint == 0x0C) {\n\t string = '\\\\f';\n\t } else if (codePoint == 0x0D) {\n\t string = '\\\\r';\n\t } else if (codePoint == 0x2D) {\n\t string = '\\\\x2D';\n\t } else if (codePoint == 0x5C) {\n\t string = '\\\\\\\\';\n\t } else if (codePoint == 0x24 || codePoint >= 0x28 && codePoint <= 0x2B || codePoint == 0x2E || codePoint == 0x2F || codePoint == 0x3F || codePoint >= 0x5B && codePoint <= 0x5E || codePoint >= 0x7B && codePoint <= 0x7D) {\n\t string = '\\\\' + stringFromCharCode(codePoint);\n\t } else if (codePoint >= 0x20 && codePoint <= 0x7E) {\n\t string = stringFromCharCode(codePoint);\n\t } else if (codePoint <= 0xFF) {\n\t string = '\\\\x' + pad(hex(codePoint), 2);\n\t } else {\n\t string = \"\\\\u\" + pad(hex(codePoint), 4);\n\t }\n\n\t return string;\n\t };\n\n\t var codePointToStringUnicode = function codePointToStringUnicode(codePoint) {\n\t if (codePoint <= 0xFFFF) {\n\t return codePointToString(codePoint);\n\t }\n\n\t return \"\\\\u{\" + codePoint.toString(16).toUpperCase() + '}';\n\t };\n\n\t var symbolToCodePoint = function symbolToCodePoint(symbol) {\n\t var length = symbol.length;\n\t var first = symbol.charCodeAt(0);\n\t var second;\n\n\t if (first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX && length > 1) {\n\t second = symbol.charCodeAt(1);\n\t return (first - HIGH_SURROGATE_MIN) * 0x400 + second - LOW_SURROGATE_MIN + 0x10000;\n\t }\n\n\t return first;\n\t };\n\n\t var createBMPCharacterClasses = function createBMPCharacterClasses(data) {\n\t var result = '';\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t if (dataIsSingleton(data)) {\n\t return codePointToString(data[0]);\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start == end) {\n\t result += codePointToString(start);\n\t } else if (start + 1 == end) {\n\t result += codePointToString(start) + codePointToString(end);\n\t } else {\n\t result += codePointToString(start) + '-' + codePointToString(end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return '[' + result + ']';\n\t };\n\n\t var createUnicodeCharacterClasses = function createUnicodeCharacterClasses(data) {\n\t var result = '';\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t if (dataIsSingleton(data)) {\n\t return codePointToStringUnicode(data[0]);\n\t }\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start == end) {\n\t result += codePointToStringUnicode(start);\n\t } else if (start + 1 == end) {\n\t result += codePointToStringUnicode(start) + codePointToStringUnicode(end);\n\t } else {\n\t result += codePointToStringUnicode(start) + '-' + codePointToStringUnicode(end);\n\t }\n\n\t index += 2;\n\t }\n\n\t return '[' + result + ']';\n\t };\n\n\t var splitAtBMP = function splitAtBMP(data) {\n\t var loneHighSurrogates = [];\n\t var loneLowSurrogates = [];\n\t var bmp = [];\n\t var astral = [];\n\t var index = 0;\n\t var start;\n\t var end;\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\n\t if (start < HIGH_SURROGATE_MIN) {\n\t if (end < HIGH_SURROGATE_MIN) {\n\t bmp.push(start, end + 1);\n\t }\n\n\t if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t bmp.push(start, HIGH_SURROGATE_MIN);\n\t loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);\n\t }\n\n\t if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t bmp.push(start, HIGH_SURROGATE_MIN);\n\t loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t }\n\n\t if (end > LOW_SURROGATE_MAX) {\n\t bmp.push(start, HIGH_SURROGATE_MIN);\n\t loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\n\t if (end <= 0xFFFF) {\n\t bmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t } else {\n\t bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t }\n\t } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {\n\t if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {\n\t loneHighSurrogates.push(start, end + 1);\n\t }\n\n\t if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);\n\t }\n\n\t if (end > LOW_SURROGATE_MAX) {\n\t loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);\n\t loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);\n\n\t if (end <= 0xFFFF) {\n\t bmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t } else {\n\t bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t }\n\t } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {\n\t if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {\n\t loneLowSurrogates.push(start, end + 1);\n\t }\n\n\t if (end > LOW_SURROGATE_MAX) {\n\t loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);\n\n\t if (end <= 0xFFFF) {\n\t bmp.push(LOW_SURROGATE_MAX + 1, end + 1);\n\t } else {\n\t bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t }\n\t } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {\n\t if (end <= 0xFFFF) {\n\t bmp.push(start, end + 1);\n\t } else {\n\t bmp.push(start, 0xFFFF + 1);\n\t astral.push(0xFFFF + 1, end + 1);\n\t }\n\t } else {\n\t astral.push(start, end + 1);\n\t }\n\n\t index += 2;\n\t }\n\n\t return {\n\t 'loneHighSurrogates': loneHighSurrogates,\n\t 'loneLowSurrogates': loneLowSurrogates,\n\t 'bmp': bmp,\n\t 'astral': astral\n\t };\n\t };\n\n\t var optimizeSurrogateMappings = function optimizeSurrogateMappings(surrogateMappings) {\n\t var result = [];\n\t var tmpLow = [];\n\t var addLow = false;\n\t var mapping;\n\t var nextMapping;\n\t var highSurrogates;\n\t var lowSurrogates;\n\t var nextHighSurrogates;\n\t var nextLowSurrogates;\n\t var index = -1;\n\t var length = surrogateMappings.length;\n\n\t while (++index < length) {\n\t mapping = surrogateMappings[index];\n\t nextMapping = surrogateMappings[index + 1];\n\n\t if (!nextMapping) {\n\t result.push(mapping);\n\t continue;\n\t }\n\n\t highSurrogates = mapping[0];\n\t lowSurrogates = mapping[1];\n\t nextHighSurrogates = nextMapping[0];\n\t nextLowSurrogates = nextMapping[1];\n\t tmpLow = lowSurrogates;\n\n\t while (nextHighSurrogates && highSurrogates[0] == nextHighSurrogates[0] && highSurrogates[1] == nextHighSurrogates[1]) {\n\t if (dataIsSingleton(nextLowSurrogates)) {\n\t tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);\n\t } else {\n\t tmpLow = dataAddRange(tmpLow, nextLowSurrogates[0], nextLowSurrogates[1] - 1);\n\t }\n\n\t ++index;\n\t mapping = surrogateMappings[index];\n\t highSurrogates = mapping[0];\n\t lowSurrogates = mapping[1];\n\t nextMapping = surrogateMappings[index + 1];\n\t nextHighSurrogates = nextMapping && nextMapping[0];\n\t nextLowSurrogates = nextMapping && nextMapping[1];\n\t addLow = true;\n\t }\n\n\t result.push([highSurrogates, addLow ? tmpLow : lowSurrogates]);\n\t addLow = false;\n\t }\n\n\t return optimizeByLowSurrogates(result);\n\t };\n\n\t var optimizeByLowSurrogates = function optimizeByLowSurrogates(surrogateMappings) {\n\t if (surrogateMappings.length == 1) {\n\t return surrogateMappings;\n\t }\n\n\t var index = -1;\n\t var innerIndex = -1;\n\n\t while (++index < surrogateMappings.length) {\n\t var mapping = surrogateMappings[index];\n\t var lowSurrogates = mapping[1];\n\t var lowSurrogateStart = lowSurrogates[0];\n\t var lowSurrogateEnd = lowSurrogates[1];\n\t innerIndex = index;\n\n\t while (++innerIndex < surrogateMappings.length) {\n\t var otherMapping = surrogateMappings[innerIndex];\n\t var otherLowSurrogates = otherMapping[1];\n\t var otherLowSurrogateStart = otherLowSurrogates[0];\n\t var otherLowSurrogateEnd = otherLowSurrogates[1];\n\n\t if (lowSurrogateStart == otherLowSurrogateStart && lowSurrogateEnd == otherLowSurrogateEnd && otherLowSurrogates.length === 2) {\n\t if (dataIsSingleton(otherMapping[0])) {\n\t mapping[0] = dataAdd(mapping[0], otherMapping[0][0]);\n\t } else {\n\t mapping[0] = dataAddRange(mapping[0], otherMapping[0][0], otherMapping[0][1] - 1);\n\t }\n\n\t surrogateMappings.splice(innerIndex, 1);\n\t --innerIndex;\n\t }\n\t }\n\t }\n\n\t return surrogateMappings;\n\t };\n\n\t var surrogateSet = function surrogateSet(data) {\n\t if (!data.length) {\n\t return [];\n\t }\n\n\t var index = 0;\n\t var start;\n\t var end;\n\t var startHigh;\n\t var startLow;\n\t var endHigh;\n\t var endLow;\n\t var surrogateMappings = [];\n\t var length = data.length;\n\n\t while (index < length) {\n\t start = data[index];\n\t end = data[index + 1] - 1;\n\t startHigh = highSurrogate(start);\n\t startLow = lowSurrogate(start);\n\t endHigh = highSurrogate(end);\n\t endLow = lowSurrogate(end);\n\t var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;\n\t var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;\n\t var complete = false;\n\n\t if (startHigh == endHigh || startsWithLowestLowSurrogate && endsWithHighestLowSurrogate) {\n\t surrogateMappings.push([[startHigh, endHigh + 1], [startLow, endLow + 1]]);\n\t complete = true;\n\t } else {\n\t surrogateMappings.push([[startHigh, startHigh + 1], [startLow, LOW_SURROGATE_MAX + 1]]);\n\t }\n\n\t if (!complete && startHigh + 1 < endHigh) {\n\t if (endsWithHighestLowSurrogate) {\n\t surrogateMappings.push([[startHigh + 1, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);\n\t complete = true;\n\t } else {\n\t surrogateMappings.push([[startHigh + 1, endHigh], [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]]);\n\t }\n\t }\n\n\t if (!complete) {\n\t surrogateMappings.push([[endHigh, endHigh + 1], [LOW_SURROGATE_MIN, endLow + 1]]);\n\t }\n\n\t index += 2;\n\t }\n\n\t return optimizeSurrogateMappings(surrogateMappings);\n\t };\n\n\t var createSurrogateCharacterClasses = function createSurrogateCharacterClasses(surrogateMappings) {\n\t var result = [];\n\t forEach(surrogateMappings, function (surrogateMapping) {\n\t var highSurrogates = surrogateMapping[0];\n\t var lowSurrogates = surrogateMapping[1];\n\t result.push(createBMPCharacterClasses(highSurrogates) + createBMPCharacterClasses(lowSurrogates));\n\t });\n\t return result.join('|');\n\t };\n\n\t var createCharacterClassesFromData = function createCharacterClassesFromData(data, bmpOnly, hasUnicodeFlag) {\n\t if (hasUnicodeFlag) {\n\t return createUnicodeCharacterClasses(data);\n\t }\n\n\t var result = [];\n\t var parts = splitAtBMP(data);\n\t var loneHighSurrogates = parts.loneHighSurrogates;\n\t var loneLowSurrogates = parts.loneLowSurrogates;\n\t var bmp = parts.bmp;\n\t var astral = parts.astral;\n\t var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);\n\t var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);\n\t var surrogateMappings = surrogateSet(astral);\n\n\t if (bmpOnly) {\n\t bmp = dataAddData(bmp, loneHighSurrogates);\n\t hasLoneHighSurrogates = false;\n\t bmp = dataAddData(bmp, loneLowSurrogates);\n\t hasLoneLowSurrogates = false;\n\t }\n\n\t if (!dataIsEmpty(bmp)) {\n\t result.push(createBMPCharacterClasses(bmp));\n\t }\n\n\t if (surrogateMappings.length) {\n\t result.push(createSurrogateCharacterClasses(surrogateMappings));\n\t }\n\n\t if (hasLoneHighSurrogates) {\n\t result.push(createBMPCharacterClasses(loneHighSurrogates) + \"(?![\\\\uDC00-\\\\uDFFF])\");\n\t }\n\n\t if (hasLoneLowSurrogates) {\n\t result.push(\"(?:[^\\\\uD800-\\\\uDBFF]|^)\" + createBMPCharacterClasses(loneLowSurrogates));\n\t }\n\n\t return result.join('|');\n\t };\n\n\t var regenerate = function regenerate(value) {\n\t if (arguments.length > 1) {\n\t value = slice.call(arguments);\n\t }\n\n\t if (this instanceof regenerate) {\n\t this.data = [];\n\t return value ? this.add(value) : this;\n\t }\n\n\t return new regenerate().add(value);\n\t };\n\n\t regenerate.version = '1.4.2';\n\t var proto = regenerate.prototype;\n\t extend(proto, {\n\t 'add': function add(value) {\n\t var $this = this;\n\n\t if (value == null) {\n\t return $this;\n\t }\n\n\t if (value instanceof regenerate) {\n\t $this.data = dataAddData($this.data, value.data);\n\t return $this;\n\t }\n\n\t if (arguments.length > 1) {\n\t value = slice.call(arguments);\n\t }\n\n\t if (isArray(value)) {\n\t forEach(value, function (item) {\n\t $this.add(item);\n\t });\n\t return $this;\n\t }\n\n\t $this.data = dataAdd($this.data, isNumber(value) ? value : symbolToCodePoint(value));\n\t return $this;\n\t },\n\t 'remove': function remove(value) {\n\t var $this = this;\n\n\t if (value == null) {\n\t return $this;\n\t }\n\n\t if (value instanceof regenerate) {\n\t $this.data = dataRemoveData($this.data, value.data);\n\t return $this;\n\t }\n\n\t if (arguments.length > 1) {\n\t value = slice.call(arguments);\n\t }\n\n\t if (isArray(value)) {\n\t forEach(value, function (item) {\n\t $this.remove(item);\n\t });\n\t return $this;\n\t }\n\n\t $this.data = dataRemove($this.data, isNumber(value) ? value : symbolToCodePoint(value));\n\t return $this;\n\t },\n\t 'addRange': function addRange(start, end) {\n\t var $this = this;\n\t $this.data = dataAddRange($this.data, isNumber(start) ? start : symbolToCodePoint(start), isNumber(end) ? end : symbolToCodePoint(end));\n\t return $this;\n\t },\n\t 'removeRange': function removeRange(start, end) {\n\t var $this = this;\n\t var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);\n\t var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);\n\t $this.data = dataRemoveRange($this.data, startCodePoint, endCodePoint);\n\t return $this;\n\t },\n\t 'intersection': function intersection(argument) {\n\t var $this = this;\n\t var array = argument instanceof regenerate ? dataToArray(argument.data) : argument;\n\t $this.data = dataIntersection($this.data, array);\n\t return $this;\n\t },\n\t 'contains': function contains(codePoint) {\n\t return dataContains(this.data, isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint));\n\t },\n\t 'clone': function clone() {\n\t var set = new regenerate();\n\t set.data = this.data.slice(0);\n\t return set;\n\t },\n\t 'toString': function toString(options) {\n\t var result = createCharacterClassesFromData(this.data, options ? options.bmpOnly : false, options ? options.hasUnicodeFlag : false);\n\n\t if (!result) {\n\t return '[]';\n\t }\n\n\t return result.replace(regexNull, '\\\\0$1');\n\t },\n\t 'toRegExp': function toRegExp(flags) {\n\t var pattern = this.toString(flags && flags.indexOf('u') != -1 ? {\n\t 'hasUnicodeFlag': true\n\t } : null);\n\t return RegExp(pattern, flags || '');\n\t },\n\t 'valueOf': function valueOf() {\n\t return dataToArray(this.data);\n\t }\n\t });\n\t proto.toArray = proto.valueOf;\n\n\t if (freeExports && !freeExports.nodeType) {\n\t if (freeModule) {\n\t freeModule.exports = regenerate;\n\t } else {\n\t freeExports.regenerate = regenerate;\n\t }\n\t } else {\n\t root.regenerate = regenerate;\n\t }\n\t })(commonjsGlobal);\n\t}, \"/$$rollup_base$$/node_modules/regenerate\");\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Alphabetic.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x345, 0x37F, 0x386, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x9B2, 0x9CE, 0x9D7, 0x9FC, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xD4E, 0xDBD, 0xDD6, 0xE4D, 0xE84, 0xEA5, 0xEC6, 0xECD, 0xF00, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8C5, 0xA8FB, 0xA9CF, 0xAAC0, 0xAAC2, 0xFB3E, 0x10808, 0x1083C, 0x10F27, 0x110C2, 0x11176, 0x111DA, 0x111DC, 0x11237, 0x1123E, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11640, 0x11644, 0x116B8, 0x11909, 0x119E1, 0x11A9D, 0x11C40, 0x11D3A, 0x11D43, 0x11D98, 0x11FB0, 0x16FE3, 0x1BC9E, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E947, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5B0, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x657).addRange(0x659, 0x65F).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6E1, 0x6E8).addRange(0x6ED, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x710, 0x73F).addRange(0x74D, 0x7B1).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x817).addRange(0x81A, 0x82C).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x8D4, 0x8DF).addRange(0x8E3, 0x8E9).addRange(0x8F0, 0x93B).addRange(0x93D, 0x94C).addRange(0x94E, 0x950).addRange(0x955, 0x963).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8);\n\tset.addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BD, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9F0, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4C).addRange(0xA59, 0xA5C).addRange(0xA70, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE3).addRange(0xAF9, 0xAFC).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3D, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB56, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A);\n\tset.addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC00, 0xC03).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3D, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4C).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCC).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3D, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82);\n\tset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB9).addRange(0xEBB, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF81).addRange(0xF88, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1036).addRange(0x103B, 0x103F).addRange(0x1050, 0x108F).addRange(0x109A, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1713).addRange(0x171F, 0x1733).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17B3).addRange(0x17B6, 0x17C8).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E);\n\tset.addRange(0x1920, 0x192B).addRange(0x1930, 0x1938).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A61, 0x1A74).addRange(0x1ABF, 0x1AC0).addRange(0x1ACC, 0x1ACE).addRange(0x1B00, 0x1B33).addRange(0x1B35, 0x1B43).addRange(0x1B45, 0x1B4C).addRange(0x1B80, 0x1BA9).addRange(0x1BAC, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1BE7, 0x1BF1).addRange(0x1C00, 0x1C36).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1DE7, 0x1DF4).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149);\n\tset.addRange(0x2160, 0x2188).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA674, 0xA67B).addRange(0xA67F, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA805).addRange(0xA807, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FF).addRange(0xA90A, 0xA92A).addRange(0xA930, 0xA952);\n\tset.addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9B2).addRange(0xA9B4, 0xA9BF).addRange(0xA9E0, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAABE).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D);\n\tset.addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7);\n\tset.addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11045).addRange(0x11071, 0x11075).addRange(0x11082, 0x110B8).addRange(0x110D0, 0x110E8).addRange(0x11100, 0x11132).addRange(0x11144, 0x11147).addRange(0x11150, 0x11172).addRange(0x11180, 0x111BF).addRange(0x111C1, 0x111C4).addRange(0x111CE, 0x111CF).addRange(0x11200, 0x11211).addRange(0x11213, 0x11234).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112E8).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133D, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134C).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11441).addRange(0x11443, 0x11445).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114C1).addRange(0x114C4, 0x114C5);\n\tset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115BE).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x1163E).addRange(0x11680, 0x116B5).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172A).addRange(0x11740, 0x11746).addRange(0x11800, 0x11838).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193C).addRange(0x1193F, 0x11942).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119DF).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A32).addRange(0x11A35, 0x11A3E).addRange(0x11A50, 0x11A97).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C3E).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D41).addRange(0x11D46, 0x11D47).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D96).addRange(0x11EE0, 0x11EF6).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E);\n\tset.addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8);\n\tset.addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Any.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x0, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ASCII_Hex_Digit.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ASCII.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x0, 0x7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Assigned.js\", function (module, exports) {\n\t const set = regenerate(0x38C, 0x85E, 0x9B2, 0x9D7, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1940, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA7D3, 0xFB3E, 0xFDCF, 0xFEFF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x110CD, 0x11288, 0x11350, 0x11357, 0x11909, 0x11D3A, 0x11FB0, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E2FF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0, 0xE0001);\n\tset.addRange(0x0, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x600, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x82D).addRange(0x830, 0x83E).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0);\n\tset.addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9);\n\tset.addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE3A).addRange(0xE3F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5);\n\tset.addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1736).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A1B).addRange(0x1A1E, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E).addRange(0x1B80, 0x1BF3).addRange(0x1BFC, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CD0, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D);\n\tset.addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x2000, 0x2064).addRange(0x2066, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x20D0, 0x20F0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3000, 0x303F).addRange(0x3041, 0x3096).addRange(0x3099, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31F0, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1);\n\tset.addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA82C).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9).addRange(0xA8E0, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAAC2).addRange(0xAADB, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xD800, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFE19).addRange(0xFE20, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE);\n\tset.addRange(0xFFF9, 0xFFFD).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FD).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E0, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B);\n\tset.addRange(0x1091F, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F27).addRange(0x10F30, 0x10F59).addRange(0x10F70, 0x10F89).addRange(0x10FB0, 0x10FCB).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075).addRange(0x1107F, 0x110C2).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147).addRange(0x11150, 0x11176).addRange(0x11180, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1123E).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112EA);\n\tset.addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746).addRange(0x11800, 0x1183B).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4).addRange(0x11A00, 0x11A47).addRange(0x11A50, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\n\tset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF8).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x1342E).addRange(0x13430, 0x13438).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5).addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C);\n\tset.addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D1EA).addRange(0x1D200, 0x1D245).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\n\tset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C);\n\tset.addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Bidi_Control.js\", function (module, exports) {\n\t const set = regenerate(0x61C);\n\tset.addRange(0x200E, 0x200F).addRange(0x202A, 0x202E).addRange(0x2066, 0x2069);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Bidi_Mirrored.js\", function (module, exports) {\n\t const set = regenerate(0x3C, 0x3E, 0x5B, 0x5D, 0x7B, 0x7D, 0xAB, 0xBB, 0x2140, 0x2211, 0x2224, 0x2226, 0x2239, 0x2262, 0x2298, 0x27C0, 0x29B8, 0x29C9, 0x29E1, 0x2A24, 0x2A26, 0x2A29, 0x2ADC, 0x2ADE, 0x2AF3, 0x2AFD, 0x2BFE, 0xFF1C, 0xFF1E, 0xFF3B, 0xFF3D, 0xFF5B, 0xFF5D, 0x1D6DB, 0x1D715, 0x1D74F, 0x1D789, 0x1D7C3);\n\tset.addRange(0x28, 0x29).addRange(0xF3A, 0xF3D).addRange(0x169B, 0x169C).addRange(0x2039, 0x203A).addRange(0x2045, 0x2046).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2201, 0x2204).addRange(0x2208, 0x220D).addRange(0x2215, 0x2216).addRange(0x221A, 0x221D).addRange(0x221F, 0x2222).addRange(0x222B, 0x2233).addRange(0x223B, 0x224C).addRange(0x2252, 0x2255).addRange(0x225F, 0x2260).addRange(0x2264, 0x226B).addRange(0x226E, 0x228C).addRange(0x228F, 0x2292).addRange(0x22A2, 0x22A3).addRange(0x22A6, 0x22B8).addRange(0x22BE, 0x22BF).addRange(0x22C9, 0x22CD).addRange(0x22D0, 0x22D1).addRange(0x22D6, 0x22ED).addRange(0x22F0, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C3, 0x27C6).addRange(0x27C8, 0x27C9).addRange(0x27CB, 0x27CD).addRange(0x27D3, 0x27D6).addRange(0x27DC, 0x27DE).addRange(0x27E2, 0x27EF).addRange(0x2983, 0x2998).addRange(0x299B, 0x29A0).addRange(0x29A2, 0x29AF).addRange(0x29C0, 0x29C5).addRange(0x29CE, 0x29D2).addRange(0x29D4, 0x29D5).addRange(0x29D8, 0x29DC).addRange(0x29E3, 0x29E5).addRange(0x29E8, 0x29E9).addRange(0x29F4, 0x29F9).addRange(0x29FC, 0x29FD).addRange(0x2A0A, 0x2A1C).addRange(0x2A1E, 0x2A21).addRange(0x2A2B, 0x2A2E).addRange(0x2A34, 0x2A35);\n\tset.addRange(0x2A3C, 0x2A3E).addRange(0x2A57, 0x2A58).addRange(0x2A64, 0x2A65).addRange(0x2A6A, 0x2A6D).addRange(0x2A6F, 0x2A70).addRange(0x2A73, 0x2A74).addRange(0x2A79, 0x2AA3).addRange(0x2AA6, 0x2AAD).addRange(0x2AAF, 0x2AD6).addRange(0x2AE2, 0x2AE6).addRange(0x2AEC, 0x2AEE).addRange(0x2AF7, 0x2AFB).addRange(0x2E02, 0x2E05).addRange(0x2E09, 0x2E0A).addRange(0x2E0C, 0x2E0D).addRange(0x2E1C, 0x2E1D).addRange(0x2E20, 0x2E29).addRange(0x2E55, 0x2E5C).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xFE59, 0xFE5E).addRange(0xFE64, 0xFE65).addRange(0xFF08, 0xFF09).addRange(0xFF5F, 0xFF60).addRange(0xFF62, 0xFF63);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Case_Ignorable.js\", function (module, exports) {\n\t const set = regenerate(0x27, 0x2E, 0x3A, 0x5E, 0x60, 0xA8, 0xAD, 0xAF, 0xB4, 0x37A, 0x387, 0x559, 0x55F, 0x5BF, 0x5C7, 0x5F4, 0x61C, 0x640, 0x670, 0x70F, 0x711, 0x7FA, 0x7FD, 0x888, 0x93A, 0x93C, 0x94D, 0x971, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xEC6, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x10FC, 0x17C6, 0x17D7, 0x17DD, 0x1843, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1AA7, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x1D78, 0x1FBD, 0x2024, 0x2027, 0x2071, 0x207F, 0x2D6F, 0x2D7F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9CF, 0xAA43, 0xAA4C, 0xAA70, 0xAA7C, 0xAAB0, 0xAAC1, 0xAADD, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0xFE13, 0xFE52, 0xFE55, 0xFEFF, 0xFF07, 0xFF0E, 0xFF1A, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110BD, 0x110C2, 0x110CD, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x16F4F, 0x1DA75, 0x1DA84, 0x1E2AE, 0xE0001);\n\tset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x36F).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x600, 0x605).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DD).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x816, 0x82D).addRange(0x859, 0x85B).addRange(0x890, 0x891).addRange(0x898, 0x89F).addRange(0x8C9, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\n\tset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE46, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180F).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\n\tset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x200B, 0x200F).addRange(0x2018, 0x2019).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20F0).addRange(0x2C7C, 0x2C7D).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3031, 0x3035).addRange(0x3099, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69C, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xA9E5, 0xA9E6).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xAAF3, 0xAAF4).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B);\n\tset.addRange(0xFBB2, 0xFBC2).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0xFFF9, 0xFFFB).addRange(0x10376, 0x1037A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B);\n\tset.addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x13430, 0x13438).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1BC9D, 0x1BC9E).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D173, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\n\tset.addRange(0x1E130, 0x1E13D).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94B).addRange(0x1F3FB, 0x1F3FF).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Cased.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0x10780, 0x1D4A2, 0x1D4BB, 0x1D546);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149);\n\tset.addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69D).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514);\n\tset.addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E900, 0x1E943).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Casefolded.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x345, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x587, 0x10C7, 0x10CD, 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2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D1).addRange(0x3D5, 0x3D6).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4);\n\tset.addRange(0x1FB7, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC7, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Casemapped.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x1BF, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1D79, 0x1D7D, 0x1D8E, 0x1E9E, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2126, 0x2132, 0x214E, 0x2D27, 0x2D2D, 0xAB53);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x137).addRange(0x139, 0x18C).addRange(0x18E, 0x19A).addRange(0x19C, 0x1A9).addRange(0x1AC, 0x1B9).addRange(0x1BC, 0x1BD).addRange(0x1C4, 0x220).addRange(0x222, 0x233).addRange(0x23A, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3D1).addRange(0x3D5, 0x3F5).addRange(0x3F7, 0x3FB).addRange(0x3FD, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x561, 0x587).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1E00, 0x1E9B).addRange(0x1EA0, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC);\n\tset.addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x212A, 0x212B).addRange(0x2160, 0x217F).addRange(0x2183, 0x2184).addRange(0x24B6, 0x24E9).addRange(0x2C00, 0x2C70).addRange(0x2C72, 0x2C73).addRange(0x2C75, 0x2C76).addRange(0x2C7E, 0x2CE3).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA72F).addRange(0xA732, 0xA76F).addRange(0xA779, 0xA787).addRange(0xA78B, 0xA78D).addRange(0xA790, 0xA794).addRange(0xA796, 0xA7AE).addRange(0xA7B0, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D6, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1E900, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Lowercased.js\", function (module, exports) {\n\t const set = regenerate(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x10C7, 0x10CD, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18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0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1C5).addRange(0x1C7, 0x1C8).addRange(0x1CA, 0x1CB).addRange(0x1F1, 0x1F2).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF).addRange(0x1FB8, 0x1FBC).addRange(0x1FC8, 0x1FCC).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFC).addRange(0x212A, 0x212B);\n\tset.addRange(0x2160, 0x216F).addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1E900, 0x1E921);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_NFKC_Casefolded.js\", function (module, exports) {\n\t const set = regenerate(0xA0, 0xA8, 0xAA, 0xAD, 0xAF, 0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x136, 0x139, 0x13B, 0x13D, 0x143, 0x145, 0x147, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x17F, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x34F, 0x370, 0x372, 0x374, 0x376, 0x37A, 0x38C, 0x3C2, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2, 0x4F4, 0x4F6, 0x4F8, 0x4FA, 0x4FC, 0x4FE, 0x500, 0x502, 0x504, 0x506, 0x508, 0x50A, 0x50C, 0x50E, 0x510, 0x512, 0x514, 0x516, 0x518, 0x51A, 0x51C, 0x51E, 0x520, 0x522, 0x524, 0x526, 0x528, 0x52A, 0x52C, 0x52E, 0x587, 0x61C, 0x9DF, 0xA33, 0xA36, 0xA5E, 0xE33, 0xEB3, 0xF0C, 0xF43, 0xF4D, 0xF52, 0xF57, 0xF5C, 0xF69, 0xF73, 0xF81, 0xF93, 0xF9D, 0xFA2, 0xFA7, 0xFAC, 0xFB9, 0x10C7, 0x10CD, 0x10FC, 0x1D78, 0x1E00, 0x1E02, 0x1E04, 0x1E06, 0x1E08, 0x1E0A, 0x1E0C, 0x1E0E, 0x1E10, 0x1E12, 0x1E14, 0x1E16, 0x1E18, 0x1E1A, 0x1E1C, 0x1E1E, 0x1E20, 0x1E22, 0x1E24, 0x1E26, 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2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0x2D6F, 0x2E9F, 0x2EF3, 0x3000, 0x3036, 0x309F, 0x30FF, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA770, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xAB69, 0xFA10, 0xFA12, 0xFA20, 0xFA22, 0xFB1D, 0xFB3E, 0xFE74, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F190);\n\tset.addRange(0x41, 0x5A).addRange(0xB2, 0xB5).addRange(0xB8, 0xBA).addRange(0xBC, 0xBE).addRange(0xC0, 0xD6).addRange(0xD8, 0xDF).addRange(0x132, 0x134).addRange(0x13F, 0x141).addRange(0x149, 0x14A).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1C4, 0x1CD).addRange(0x1F1, 0x1F4).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x2B0, 0x2B8).addRange(0x2D8, 0x2DD).addRange(0x2E0, 0x2E4).addRange(0x340, 0x341).addRange(0x343, 0x345).addRange(0x37E, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3CF, 0x3D6).addRange(0x3F0, 0x3F2).addRange(0x3F4, 0x3F5).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x675, 0x678).addRange(0x958, 0x95F).addRange(0x9DC, 0x9DD).addRange(0xA59, 0xA5B).addRange(0xB5C, 0xB5D).addRange(0xEDC, 0xEDD);\n\tset.addRange(0xF75, 0xF79).addRange(0x10A0, 0x10C5).addRange(0x115F, 0x1160).addRange(0x13F8, 0x13FD).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D2C, 0x1D2E).addRange(0x1D30, 0x1D3A).addRange(0x1D3C, 0x1D4D).addRange(0x1D4F, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x1E9A, 0x1E9B).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1F80, 0x1FAF).addRange(0x1FB2, 0x1FB4).addRange(0x1FB7, 0x1FC4).addRange(0x1FC7, 0x1FCF).addRange(0x1FD8, 0x1FDB).addRange(0x1FDD, 0x1FDF).addRange(0x1FE8, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF7, 0x1FFE).addRange(0x2000, 0x200F).addRange(0x2024, 0x2026).addRange(0x202A, 0x202F).addRange(0x2033, 0x2034).addRange(0x2036, 0x2037).addRange(0x2047, 0x2049).addRange(0x205F, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x2100, 0x2103).addRange(0x2105, 0x2107).addRange(0x2109, 0x2113).addRange(0x2115, 0x2116).addRange(0x2119, 0x211D).addRange(0x2120, 0x2122).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213B, 0x2140).addRange(0x2145, 0x2149).addRange(0x2150, 0x217F).addRange(0x222C, 0x222D);\n\tset.addRange(0x222F, 0x2230).addRange(0x2329, 0x232A).addRange(0x2460, 0x24EA).addRange(0x2A74, 0x2A76).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7C, 0x2C80).addRange(0x2F00, 0x2FD5).addRange(0x3038, 0x303A).addRange(0x309B, 0x309C).addRange(0x3131, 0x318E).addRange(0x3192, 0x319F).addRange(0x3200, 0x321E).addRange(0x3220, 0x3247).addRange(0x3250, 0x327E).addRange(0x3280, 0x33FF).addRange(0xA69C, 0xA69D).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xA7F2, 0xA7F5).addRange(0xA7F8, 0xA7F9).addRange(0xAB5C, 0xAB5F).addRange(0xAB70, 0xABBF).addRange(0xF900, 0xFA0D).addRange(0xFA15, 0xFA1E).addRange(0xFA25, 0xFA26).addRange(0xFA2A, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFC).addRange(0xFE00, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE72).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFFBE).addRange(0xFFC2, 0xFFC7);\n\tset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF0, 0xFFF8).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10781, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D15E, 0x1D164).addRange(0x1D173, 0x1D17A).addRange(0x1D1BB, 0x1D1C0).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E900, 0x1E921).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72);\n\tset.addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1F100, 0x1F10A).addRange(0x1F110, 0x1F12E).addRange(0x1F130, 0x1F14F).addRange(0x1F16A, 0x1F16C).addRange(0x1F200, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1FBF0, 0x1FBF9).addRange(0x2F800, 0x2FA1D).addRange(0xE0000, 0xE0FFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Titlecased.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1C4, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1D79, 0x1D7D, 0x1D8E, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x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CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CE3, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C6, 0x1C7).addRange(0x1C9, 0x1CA).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F1).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4);\n\tset.addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Changes_When_Uppercased.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x137, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x18C, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1B9, 0x1BD, 0x1BF, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x233, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x259, 0x263, 0x26F, 0x275, 0x27D, 0x280, 0x292, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x3FB, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1D79, 0x1D7D, 0x1D8E, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E2D, 0x1E2F, 0x1E31, 0x1E33, 0x1E35, 0x1E37, 0x1E39, 0x1E3B, 0x1E3D, 0x1E3F, 0x1E41, 0x1E43, 0x1E45, 0x1E47, 0x1E49, 0x1E4B, 0x1E4D, 0x1E4F, 0x1E51, 0x1E53, 0x1E55, 0x1E57, 0x1E59, 0x1E5B, 0x1E5D, 0x1E5F, 0x1E61, 0x1E63, 0x1E65, 0x1E67, 0x1E69, 0x1E6B, 0x1E6D, 0x1E6F, 0x1E71, 0x1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, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA72F, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D7, 0xA7D9, 0xA7F6, 0xAB53);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x199, 0x19A).addRange(0x1C5, 0x1C6).addRange(0x1C8, 0x1C9).addRange(0x1CB, 0x1CC).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x1F2, 0x1F3).addRange(0x23F, 0x240).addRange(0x24F, 0x254).addRange(0x256, 0x257).addRange(0x25B, 0x25C).addRange(0x260, 0x261).addRange(0x265, 0x266).addRange(0x268, 0x26C).addRange(0x271, 0x272).addRange(0x282, 0x283).addRange(0x287, 0x28C).addRange(0x29D, 0x29E).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x561, 0x587).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1E95, 0x1E9B).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7).addRange(0x1FE0, 0x1FE7);\n\tset.addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2D00, 0x2D25).addRange(0xA793, 0xA794).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Dash.js\", function (module, exports) {\n\t const set = regenerate(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2053, 0x207B, 0x208B, 0x2212, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\n\tset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Default_Ignorable_Code_Point.js\", function (module, exports) {\n\t const set = regenerate(0xAD, 0x34F, 0x61C, 0x3164, 0xFEFF, 0xFFA0);\n\tset.addRange(0x115F, 0x1160).addRange(0x17B4, 0x17B5).addRange(0x180B, 0x180F).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0xFE00, 0xFE0F).addRange(0xFFF0, 0xFFF8).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0000, 0xE0FFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Deprecated.js\", function (module, exports) {\n\t const set = regenerate(0x149, 0x673, 0xF77, 0xF79, 0xE0001);\n\tset.addRange(0x17A3, 0x17A4).addRange(0x206A, 0x206F).addRange(0x2329, 0x232A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Diacritic.js\", function (module, exports) {\n\t const set = regenerate(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0x37A, 0x559, 0x5BF, 0x5C4, 0x93C, 0x94D, 0x971, 0x9BC, 0x9CD, 0xA3C, 0xA4D, 0xABC, 0xACD, 0xB3C, 0xB4D, 0xB55, 0xBCD, 0xC3C, 0xC4D, 0xCBC, 0xCCD, 0xD4D, 0xDCA, 0xE4E, 0xEBA, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1037, 0x108F, 0x17DD, 0x1A7F, 0x1B34, 0x1B44, 0x1CED, 0x1CF4, 0x1FBD, 0x2E2F, 0x30FC, 0xA66F, 0xA67F, 0xA8C4, 0xA953, 0xA9B3, 0xA9C0, 0xA9E5, 0xAAF6, 0xFB1E, 0xFF3E, 0xFF40, 0xFF70, 0xFFE3, 0x102E0, 0x11046, 0x11070, 0x11173, 0x111C0, 0x1133C, 0x1134D, 0x11442, 0x11446, 0x1163F, 0x1172B, 0x11943, 0x119E0, 0x11A34, 0x11A47, 0x11A99, 0x11C3F, 0x11D42, 0x11D97, 0x1E2AE);\n\tset.addRange(0xB7, 0xB8).addRange(0x2B0, 0x34E).addRange(0x350, 0x357).addRange(0x35D, 0x362).addRange(0x374, 0x375).addRange(0x384, 0x385).addRange(0x483, 0x487).addRange(0x591, 0x5A1).addRange(0x5A3, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x64B, 0x652).addRange(0x657, 0x658).addRange(0x6DF, 0x6E0).addRange(0x6E5, 0x6E6).addRange(0x6EA, 0x6EC).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F5).addRange(0x818, 0x819).addRange(0x898, 0x89F).addRange(0x8C9, 0x8D2).addRange(0x8E3, 0x8FE).addRange(0x951, 0x954).addRange(0xAFD, 0xAFF).addRange(0xD3B, 0xD3C).addRange(0xE47, 0xE4C).addRange(0xEC8, 0xECC).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF82, 0xF84).addRange(0xF86, 0xF87).addRange(0x1039, 0x103A).addRange(0x1063, 0x1064).addRange(0x1069, 0x106D).addRange(0x1087, 0x108D).addRange(0x109A, 0x109B).addRange(0x135D, 0x135F).addRange(0x1714, 0x1715).addRange(0x17C9, 0x17D3).addRange(0x1939, 0x193B).addRange(0x1A75, 0x1A7C).addRange(0x1AB0, 0x1ABE).addRange(0x1AC1, 0x1ACB).addRange(0x1B6B, 0x1B73).addRange(0x1BAA, 0x1BAB).addRange(0x1C36, 0x1C37).addRange(0x1C78, 0x1C7D).addRange(0x1CD0, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1D2C, 0x1D6A).addRange(0x1DC4, 0x1DCF);\n\tset.addRange(0x1DF5, 0x1DFF).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x2CEF, 0x2CF1).addRange(0x302A, 0x302F).addRange(0x3099, 0x309C).addRange(0xA67C, 0xA67D).addRange(0xA69C, 0xA69D).addRange(0xA6F0, 0xA6F1).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA7F8, 0xA7F9).addRange(0xA8E0, 0xA8F1).addRange(0xA92B, 0xA92E).addRange(0xAA7B, 0xAA7D).addRange(0xAABF, 0xAAC2).addRange(0xAB5B, 0xAB5F).addRange(0xAB69, 0xAB6B).addRange(0xABEC, 0xABED).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10AE5, 0x10AE6).addRange(0x10D22, 0x10D27).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x110B9, 0x110BA).addRange(0x11133, 0x11134).addRange(0x111CA, 0x111CC).addRange(0x11235, 0x11236).addRange(0x112E9, 0x112EA).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x114C2, 0x114C3).addRange(0x115BF, 0x115C0).addRange(0x116B6, 0x116B7).addRange(0x11839, 0x1183A).addRange(0x1193D, 0x1193E).addRange(0x11D44, 0x11D45).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F9F).addRange(0x16FF0, 0x16FF1).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE);\n\tset.addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E946).addRange(0x1E948, 0x1E94A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Component.js\", function (module, exports) {\n\t const set = regenerate(0x23, 0x2A, 0x200D, 0x20E3, 0xFE0F);\n\tset.addRange(0x30, 0x39).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F3FB, 0x1F3FF).addRange(0x1F9B0, 0x1F9B3).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Modifier_Base.js\", function (module, exports) {\n\t const set = regenerate(0x261D, 0x26F9, 0x1F385, 0x1F3C7, 0x1F47C, 0x1F48F, 0x1F491, 0x1F4AA, 0x1F57A, 0x1F590, 0x1F6A3, 0x1F6C0, 0x1F6CC, 0x1F90C, 0x1F90F, 0x1F926, 0x1F977, 0x1F9BB);\n\tset.addRange(0x270A, 0x270D).addRange(0x1F3C2, 0x1F3C4).addRange(0x1F3CA, 0x1F3CC).addRange(0x1F442, 0x1F443).addRange(0x1F446, 0x1F450).addRange(0x1F466, 0x1F478).addRange(0x1F481, 0x1F483).addRange(0x1F485, 0x1F487).addRange(0x1F574, 0x1F575).addRange(0x1F595, 0x1F596).addRange(0x1F645, 0x1F647).addRange(0x1F64B, 0x1F64F).addRange(0x1F6B4, 0x1F6B6).addRange(0x1F918, 0x1F91F).addRange(0x1F930, 0x1F939).addRange(0x1F93C, 0x1F93E).addRange(0x1F9B5, 0x1F9B6).addRange(0x1F9B8, 0x1F9B9).addRange(0x1F9CD, 0x1F9CF).addRange(0x1F9D1, 0x1F9DD).addRange(0x1FAC3, 0x1FAC5).addRange(0x1FAF0, 0x1FAF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Modifier.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1F3FB, 0x1F3FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji_Presentation.js\", function (module, exports) {\n\t const set = regenerate(0x23F0, 0x23F3, 0x267F, 0x2693, 0x26A1, 0x26CE, 0x26D4, 0x26EA, 0x26F5, 0x26FA, 0x26FD, 0x2705, 0x2728, 0x274C, 0x274E, 0x2757, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F201, 0x1F21A, 0x1F22F, 0x1F3F4, 0x1F440, 0x1F57A, 0x1F5A4, 0x1F6CC, 0x1F7F0);\n\tset.addRange(0x231A, 0x231B).addRange(0x23E9, 0x23EC).addRange(0x25FD, 0x25FE).addRange(0x2614, 0x2615).addRange(0x2648, 0x2653).addRange(0x26AA, 0x26AB).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26F2, 0x26F3).addRange(0x270A, 0x270B).addRange(0x2753, 0x2755).addRange(0x2795, 0x2797).addRange(0x2B1B, 0x2B1C).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F232, 0x1F236).addRange(0x1F238, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F320).addRange(0x1F32D, 0x1F335).addRange(0x1F337, 0x1F37C).addRange(0x1F37E, 0x1F393).addRange(0x1F3A0, 0x1F3CA).addRange(0x1F3CF, 0x1F3D3).addRange(0x1F3E0, 0x1F3F0).addRange(0x1F3F8, 0x1F43E).addRange(0x1F442, 0x1F4FC).addRange(0x1F4FF, 0x1F53D).addRange(0x1F54B, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F595, 0x1F596).addRange(0x1F5FB, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6D0, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DD, 0x1F6DF).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F4, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Emoji.js\", function (module, exports) {\n\t const set = regenerate(0x23, 0x2A, 0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x260E, 0x2611, 0x2618, 0x261D, 0x2620, 0x2626, 0x262A, 0x2640, 0x2642, 0x2663, 0x2668, 0x267B, 0x2699, 0x26A7, 0x26C8, 0x26D1, 0x26FD, 0x2702, 0x2705, 0x270F, 0x2712, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F004, 0x1F0CF, 0x1F18E, 0x1F21A, 0x1F22F, 0x1F587, 0x1F590, 0x1F5A8, 0x1F5BC, 0x1F5E1, 0x1F5E3, 0x1F5E8, 0x1F5EF, 0x1F5F3, 0x1F6E9, 0x1F6F0, 0x1F7F0);\n\tset.addRange(0x30, 0x39).addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2604).addRange(0x2614, 0x2615).addRange(0x2622, 0x2623).addRange(0x262E, 0x262F).addRange(0x2638, 0x263A).addRange(0x2648, 0x2653).addRange(0x265F, 0x2660).addRange(0x2665, 0x2666).addRange(0x267E, 0x267F).addRange(0x2692, 0x2697).addRange(0x269B, 0x269C).addRange(0x26A0, 0x26A1).addRange(0x26AA, 0x26AB).addRange(0x26B0, 0x26B1).addRange(0x26BD, 0x26BE).addRange(0x26C4, 0x26C5).addRange(0x26CE, 0x26CF).addRange(0x26D3, 0x26D4).addRange(0x26E9, 0x26EA).addRange(0x26F0, 0x26F5).addRange(0x26F7, 0x26FA).addRange(0x2708, 0x270D).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2764).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F170, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F232, 0x1F23A).addRange(0x1F250, 0x1F251).addRange(0x1F300, 0x1F321).addRange(0x1F324, 0x1F393).addRange(0x1F396, 0x1F397).addRange(0x1F399, 0x1F39B).addRange(0x1F39E, 0x1F3F0).addRange(0x1F3F3, 0x1F3F5).addRange(0x1F3F7, 0x1F4FD);\n\tset.addRange(0x1F4FF, 0x1F53D).addRange(0x1F549, 0x1F54E).addRange(0x1F550, 0x1F567).addRange(0x1F56F, 0x1F570).addRange(0x1F573, 0x1F57A).addRange(0x1F58A, 0x1F58D).addRange(0x1F595, 0x1F596).addRange(0x1F5A4, 0x1F5A5).addRange(0x1F5B1, 0x1F5B2).addRange(0x1F5C2, 0x1F5C4).addRange(0x1F5D1, 0x1F5D3).addRange(0x1F5DC, 0x1F5DE).addRange(0x1F5FA, 0x1F64F).addRange(0x1F680, 0x1F6C5).addRange(0x1F6CB, 0x1F6D2).addRange(0x1F6D5, 0x1F6D7).addRange(0x1F6DD, 0x1F6E5).addRange(0x1F6EB, 0x1F6EC).addRange(0x1F6F3, 0x1F6FC).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1F9FF).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Extended_Pictographic.js\", function (module, exports) {\n\t const set = regenerate(0xA9, 0xAE, 0x203C, 0x2049, 0x2122, 0x2139, 0x2328, 0x2388, 0x23CF, 0x24C2, 0x25B6, 0x25C0, 0x2714, 0x2716, 0x271D, 0x2721, 0x2728, 0x2744, 0x2747, 0x274C, 0x274E, 0x2757, 0x27A1, 0x27B0, 0x27BF, 0x2B50, 0x2B55, 0x3030, 0x303D, 0x3297, 0x3299, 0x1F12F, 0x1F18E, 0x1F21A, 0x1F22F);\n\tset.addRange(0x2194, 0x2199).addRange(0x21A9, 0x21AA).addRange(0x231A, 0x231B).addRange(0x23E9, 0x23F3).addRange(0x23F8, 0x23FA).addRange(0x25AA, 0x25AB).addRange(0x25FB, 0x25FE).addRange(0x2600, 0x2605).addRange(0x2607, 0x2612).addRange(0x2614, 0x2685).addRange(0x2690, 0x2705).addRange(0x2708, 0x2712).addRange(0x2733, 0x2734).addRange(0x2753, 0x2755).addRange(0x2763, 0x2767).addRange(0x2795, 0x2797).addRange(0x2934, 0x2935).addRange(0x2B05, 0x2B07).addRange(0x2B1B, 0x2B1C).addRange(0x1F000, 0x1F0FF).addRange(0x1F10D, 0x1F10F).addRange(0x1F16C, 0x1F171).addRange(0x1F17E, 0x1F17F).addRange(0x1F191, 0x1F19A).addRange(0x1F1AD, 0x1F1E5).addRange(0x1F201, 0x1F20F).addRange(0x1F232, 0x1F23A).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F3FA).addRange(0x1F400, 0x1F53D).addRange(0x1F546, 0x1F64F).addRange(0x1F680, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D5, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8FF).addRange(0x1F90C, 0x1F93A).addRange(0x1F93C, 0x1F945).addRange(0x1F947, 0x1FAFF).addRange(0x1FC00, 0x1FFFD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Extender.js\", function (module, exports) {\n\t const set = regenerate(0xB7, 0x640, 0x7FA, 0xB55, 0xE46, 0xEC6, 0x180A, 0x1843, 0x1AA7, 0x1C36, 0x1C7B, 0x3005, 0xA015, 0xA60C, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xFF70, 0x1135D, 0x11A98, 0x16FE3);\n\tset.addRange(0x2D0, 0x2D1).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xAAF3, 0xAAF4).addRange(0x10781, 0x10782).addRange(0x115C6, 0x115C8).addRange(0x16B42, 0x16B43).addRange(0x16FE0, 0x16FE1).addRange(0x1E13C, 0x1E13D).addRange(0x1E944, 0x1E946);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Grapheme_Base.js\", function (module, exports) {\n\t const set = regenerate(0x38C, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6DE, 0x6E9, 0x710, 0x7B1, 0x81A, 0x824, 0x828, 0x85E, 0x93B, 0x9B2, 0x9BD, 0x9CE, 0xA03, 0xA5E, 0xA76, 0xA83, 0xAC9, 0xAD0, 0xAF9, 0xB3D, 0xB40, 0xB83, 0xB9C, 0xBBF, 0xBD0, 0xC3D, 0xC5D, 0xD3D, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF36, 0xF38, 0xF7F, 0xF85, 0x1031, 0x1038, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x1715, 0x17B6, 0x18AA, 0x1940, 0x1A57, 0x1A61, 0x1B3B, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CD3, 0x1CE1, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x2D27, 0x2D2D, 0xA673, 0xA7D3, 0xAA4D, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFDCF, 0x101A0, 0x10808, 0x1083C, 0x1093F, 0x10EAD, 0x11000, 0x11075, 0x1112C, 0x11235, 0x11288, 0x1133D, 0x1133F, 0x11350, 0x11445, 0x1145D, 0x114B9, 0x114BE, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1183B, 0x11909, 0x1193D, 0x11A00, 0x11A50, 0x11A97, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D46, 0x11D96, 0x11D98, 0x11FB0, 0x16AF5, 0x1BC9C, 0x1BC9F, 0x1D166, 0x1D245, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E2FF, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E, 0x1F7F0);\n\tset.addRange(0x20, 0x7E).addRange(0xA0, 0xAC).addRange(0xAE, 0x2FF).addRange(0x370, 0x377).addRange(0x37A, 0x37F).addRange(0x384, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x482).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0x606, 0x60F).addRange(0x61D, 0x64A).addRange(0x660, 0x66F).addRange(0x671, 0x6D5).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x70D).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7C0, 0x7EA).addRange(0x7F4, 0x7FA).addRange(0x7FE, 0x815).addRange(0x830, 0x83E).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x903, 0x939).addRange(0x93D, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x950).addRange(0x958, 0x961).addRange(0x964, 0x980).addRange(0x982, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BF, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9E6, 0x9FD).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28);\n\tset.addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA40).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA6F).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABD, 0xAC0).addRange(0xACB, 0xACC).addRange(0xAE0, 0xAE1).addRange(0xAE6, 0xAF1).addRange(0xB02, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB66, 0xB77).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xBE6, 0xBFA).addRange(0xC01, 0xC03).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC41, 0xC44).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC66, 0xC6F);\n\tset.addRange(0xC77, 0xC80).addRange(0xC82, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBD, 0xCBE).addRange(0xCC0, 0xCC1).addRange(0xCC3, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD02, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD3F, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD4E, 0xD4F).addRange(0xD54, 0xD56).addRange(0xD58, 0xD61).addRange(0xD66, 0xD7F).addRange(0xD82, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDD0, 0xDD1).addRange(0xDD8, 0xDDE).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE3F, 0xE46).addRange(0xE4F, 0xE5B).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF00, 0xF17).addRange(0xF1A, 0xF34).addRange(0xF3A, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C);\n\tset.addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFDA).addRange(0x1000, 0x102C).addRange(0x103B, 0x103C).addRange(0x103F, 0x1057).addRange(0x105A, 0x105D).addRange(0x1061, 0x1070).addRange(0x1075, 0x1081).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x108E, 0x109C).addRange(0x109E, 0x10C5).addRange(0x10D0, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1360, 0x137C).addRange(0x1380, 0x1399).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1400, 0x169C).addRange(0x16A0, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1734, 0x1736).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x17D4, 0x17DC).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1800, 0x180A).addRange(0x1810, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5);\n\tset.addRange(0x1900, 0x191E).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1944, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x1A16).addRange(0x1A19, 0x1A1A).addRange(0x1A1E, 0x1A55).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD).addRange(0x1B04, 0x1B33).addRange(0x1B3D, 0x1B41).addRange(0x1B43, 0x1B4C).addRange(0x1B50, 0x1B6A).addRange(0x1B74, 0x1B7E).addRange(0x1B82, 0x1BA1).addRange(0x1BA6, 0x1BA7).addRange(0x1BAE, 0x1BE5).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1BFC, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CC7).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE);\n\tset.addRange(0x2000, 0x200A).addRange(0x2010, 0x2027).addRange(0x202F, 0x205F).addRange(0x2070, 0x2071).addRange(0x2074, 0x208E).addRange(0x2090, 0x209C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2CF9, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2E00, 0x2E5D).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3000, 0x3029).addRange(0x3030, 0x303F).addRange(0x3041, 0x3096).addRange(0x309B, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x3190, 0x31E3).addRange(0x31F0, 0x321E).addRange(0x3220, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xA4D0, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67E, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA6F2, 0xA6F7).addRange(0xA700, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805);\n\tset.addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA824).addRange(0xA827, 0xA82B).addRange(0xA830, 0xA839).addRange(0xA840, 0xA877).addRange(0xA880, 0xA8C3).addRange(0xA8CE, 0xA8D9).addRange(0xA8F2, 0xA8FE).addRange(0xA900, 0xA925).addRange(0xA92E, 0xA946).addRange(0xA952, 0xA953).addRange(0xA95F, 0xA97C).addRange(0xA983, 0xA9B2).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9E4).addRange(0xA9E6, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA7B).addRange(0xAA7D, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAAEB).addRange(0xAAEE, 0xAAF5).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB6B).addRange(0xAB70, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEC).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41);\n\tset.addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF01, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x102E1, 0x102FB).addRange(0x10300, 0x10323).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x1039F, 0x103C3).addRange(0x103C8, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x1056F, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595);\n\tset.addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10857, 0x1089E).addRange(0x108A7, 0x108AF).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x1091B).addRange(0x1091F, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x10A00).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A40, 0x10A48).addRange(0x10A50, 0x10A58).addRange(0x10A60, 0x10A9F).addRange(0x10AC0, 0x10AE4).addRange(0x10AEB, 0x10AF6).addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B55).addRange(0x10B58, 0x10B72).addRange(0x10B78, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10D23).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F27).addRange(0x10F30, 0x10F45).addRange(0x10F51, 0x10F59).addRange(0x10F70, 0x10F81).addRange(0x10F86, 0x10F89).addRange(0x10FB0, 0x10FCB);\n\tset.addRange(0x10FE0, 0x10FF6).addRange(0x11002, 0x11037).addRange(0x11047, 0x1104D).addRange(0x11052, 0x1106F).addRange(0x11071, 0x11072).addRange(0x11082, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11103, 0x11126).addRange(0x11136, 0x11147).addRange(0x11150, 0x11172).addRange(0x11174, 0x11176).addRange(0x11182, 0x111B5).addRange(0x111BF, 0x111C8).addRange(0x111CD, 0x111CE).addRange(0x111D0, 0x111DF).addRange(0x111E1, 0x111F4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122E).addRange(0x11232, 0x11233).addRange(0x11238, 0x1123D).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9).addRange(0x112B0, 0x112DE).addRange(0x112E0, 0x112E2).addRange(0x112F0, 0x112F9).addRange(0x11302, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11400, 0x11437).addRange(0x11440, 0x11441).addRange(0x11447, 0x1145B).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114B1, 0x114B2).addRange(0x114BB, 0x114BC).addRange(0x114C4, 0x114C7).addRange(0x114D0, 0x114D9);\n\tset.addRange(0x11580, 0x115AE).addRange(0x115B0, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x115C1, 0x115DB).addRange(0x11600, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x11641, 0x11644).addRange(0x11650, 0x11659).addRange(0x11660, 0x1166C).addRange(0x11680, 0x116AA).addRange(0x116AE, 0x116AF).addRange(0x116B8, 0x116B9).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x11720, 0x11721).addRange(0x11730, 0x11746).addRange(0x11800, 0x1182E).addRange(0x118A0, 0x118F2).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x11931, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193F, 0x11942).addRange(0x11944, 0x11946).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x119E1, 0x119E4).addRange(0x11A0B, 0x11A32).addRange(0x11A39, 0x11A3A).addRange(0x11A3F, 0x11A46).addRange(0x11A57, 0x11A58).addRange(0x11A5C, 0x11A89).addRange(0x11A9A, 0x11AA2).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2F).addRange(0x11C40, 0x11C45).addRange(0x11C50, 0x11C6C).addRange(0x11C70, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D93, 0x11D94);\n\tset.addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF2).addRange(0x11EF5, 0x11EF8).addRange(0x11FC0, 0x11FF1).addRange(0x11FFF, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF2).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B37, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E9A).addRange(0x16F00, 0x16F4A).addRange(0x16F50, 0x16F87).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16D).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA);\n\tset.addRange(0x1D200, 0x1D241).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA8B).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8CF).addRange(0x1E900, 0x1E943).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F);\n\tset.addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF);\n\tset.addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Grapheme_Extend.js\", function (module, exports) {\n\t const set = regenerate(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9BE, 0x9CD, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB4D, 0xB82, 0xBBE, 0xBC0, 0xBCD, 0xBD7, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC2, 0xCC6, 0xD3E, 0xD4D, 0xD57, 0xD81, 0xDCA, 0xDCF, 0xDD6, 0xDDF, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x200C, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x112DF, 0x1133E, 0x11340, 0x11357, 0x11446, 0x1145E, 0x114B0, 0x114BA, 0x114BD, 0x115AF, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x11930, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x16F4F, 0x16FE4, 0x1D165, 0x1DA75, 0x1DA84, 0x1E2AE);\n\tset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB3E, 0xB3F).addRange(0xB41, 0xB44).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C);\n\tset.addRange(0xD41, 0xD44).addRange(0xD62, 0xD63).addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B34, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2);\n\tset.addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFF9E, 0xFF9F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE);\n\tset.addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231).addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D);\n\tset.addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D16E, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0020, 0xE007F).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Hex_Digit.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x46).addRange(0x61, 0x66).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF26).addRange(0xFF41, 0xFF46);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ID_Continue.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x1123E, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\n\tset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\n\tset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\n\tset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\n\tset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0);\n\tset.addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7).addRange(0xA8FD, 0xA92D);\n\tset.addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7);\n\tset.addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7);\n\tset.addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310);\n\tset.addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09);\n\tset.addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9D, 0x1BC9E);\n\tset.addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE).addRange(0x1E2C0, 0x1E2F9);\n\tset.addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/ID_Start.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x16FE3, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\n\tset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\n\tset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8);\n\tset.addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96);\n\tset.addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309B, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42);\n\tset.addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C);\n\tset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0);\n\tset.addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9);\n\tset.addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738);\n\tset.addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Ideographic.js\", function (module, exports) {\n\t const set = regenerate(0x16FE4);\n\tset.addRange(0x3006, 0x3007).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B170, 0x1B2FB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/IDS_Binary_Operator.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2FF0, 0x2FF1).addRange(0x2FF4, 0x2FFB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/IDS_Trinary_Operator.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2FF2, 0x2FF3);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Join_Control.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x200C, 0x200D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Logical_Order_Exception.js\", function (module, exports) {\n\t const set = regenerate(0x19BA, 0xAAB9);\n\tset.addRange(0xE40, 0xE44).addRange(0xEC0, 0xEC4).addRange(0x19B5, 0x19B7).addRange(0xAAB5, 0xAAB6).addRange(0xAABB, 0xAABC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Lowercase.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x345, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 0x4E9, 0x4EB, 0x4ED, 0x4EF, 0x4F1, 0x4F3, 0x4F5, 0x4F7, 0x4F9, 0x4FB, 0x4FD, 0x4FF, 0x501, 0x503, 0x505, 0x507, 0x509, 0x50B, 0x50D, 0x50F, 0x511, 0x513, 0x515, 0x517, 0x519, 0x51B, 0x51D, 0x51F, 0x521, 0x523, 0x525, 0x527, 0x529, 0x52B, 0x52D, 0x52F, 0x1E01, 0x1E03, 0x1E05, 0x1E07, 0x1E09, 0x1E0B, 0x1E0D, 0x1E0F, 0x1E11, 0x1E13, 0x1E15, 0x1E17, 0x1E19, 0x1E1B, 0x1E1D, 0x1E1F, 0x1E21, 0x1E23, 0x1E25, 0x1E27, 0x1E29, 0x1E2B, 0x1E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AB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0x10780, 0x1D4BB, 0x1D7CB);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2B8).addRange(0x2C0, 0x2C1).addRange(0x2E0, 0x2E4).addRange(0x37A, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1DBF).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\n\tset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x2090, 0x209C).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2170, 0x217F).addRange(0x24D0, 0x24E9).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7D).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA69B, 0xA69D).addRange(0xA72F, 0xA731).addRange(0xA76F, 0xA778).addRange(0xA793, 0xA795).addRange(0xA7F8, 0xA7FA).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10783, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3).addRange(0x1D5EE, 0x1D607);\n\tset.addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Math.js\", function (module, exports) {\n\t const set = regenerate(0x2B, 0x5E, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3D5, 0x2016, 0x2040, 0x2044, 0x2052, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x214B, 0x21DD, 0x237C, 0x23B7, 0x23D0, 0x25E2, 0x25E4, 0x2640, 0x2642, 0xFB29, 0xFE68, 0xFF0B, 0xFF3C, 0xFF3E, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x3C, 0x3E).addRange(0x3D0, 0x3D2).addRange(0x3F0, 0x3F1).addRange(0x3F4, 0x3F6).addRange(0x606, 0x608).addRange(0x2032, 0x2034).addRange(0x2061, 0x2064).addRange(0x207A, 0x207E).addRange(0x208A, 0x208E).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20E6).addRange(0x20EB, 0x20EF).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x2128, 0x2129).addRange(0x212C, 0x212D).addRange(0x212F, 0x2131).addRange(0x2133, 0x2138).addRange(0x213C, 0x2149).addRange(0x2190, 0x21A7).addRange(0x21A9, 0x21AE).addRange(0x21B0, 0x21B1).addRange(0x21B6, 0x21B7).addRange(0x21BC, 0x21DB).addRange(0x21E4, 0x21E5).addRange(0x21F4, 0x22FF).addRange(0x2308, 0x230B).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B5).addRange(0x23DC, 0x23E2).addRange(0x25A0, 0x25A1).addRange(0x25AE, 0x25B7).addRange(0x25BC, 0x25C1).addRange(0x25C6, 0x25C7).addRange(0x25CA, 0x25CB).addRange(0x25CF, 0x25D3).addRange(0x25E7, 0x25EC).addRange(0x25F8, 0x25FF).addRange(0x2605, 0x2606).addRange(0x2660, 0x2663).addRange(0x266D, 0x266F).addRange(0x27C0, 0x27FF).addRange(0x2900, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE61, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F);\n\tset.addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Noncharacter_Code_Point.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xFDD0, 0xFDEF).addRange(0xFFFE, 0xFFFF).addRange(0x1FFFE, 0x1FFFF).addRange(0x2FFFE, 0x2FFFF).addRange(0x3FFFE, 0x3FFFF).addRange(0x4FFFE, 0x4FFFF).addRange(0x5FFFE, 0x5FFFF).addRange(0x6FFFE, 0x6FFFF).addRange(0x7FFFE, 0x7FFFF).addRange(0x8FFFE, 0x8FFFF).addRange(0x9FFFE, 0x9FFFF).addRange(0xAFFFE, 0xAFFFF).addRange(0xBFFFE, 0xBFFFF).addRange(0xCFFFE, 0xCFFFF).addRange(0xDFFFE, 0xDFFFF).addRange(0xEFFFE, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Pattern_Syntax.js\", function (module, exports) {\n\t const set = regenerate(0x60, 0xA9, 0xAE, 0xB6, 0xBB, 0xBF, 0xD7, 0xF7, 0x3030);\n\tset.addRange(0x21, 0x2F).addRange(0x3A, 0x40).addRange(0x5B, 0x5E).addRange(0x7B, 0x7E).addRange(0xA1, 0xA7).addRange(0xAB, 0xAC).addRange(0xB0, 0xB1).addRange(0x2010, 0x2027).addRange(0x2030, 0x203E).addRange(0x2041, 0x2053).addRange(0x2055, 0x205E).addRange(0x2190, 0x245F).addRange(0x2500, 0x2775).addRange(0x2794, 0x2BFF).addRange(0x2E00, 0x2E7F).addRange(0x3001, 0x3003).addRange(0x3008, 0x3020).addRange(0xFD3E, 0xFD3F).addRange(0xFE45, 0xFE46);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Pattern_White_Space.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0x85);\n\tset.addRange(0x9, 0xD).addRange(0x200E, 0x200F).addRange(0x2028, 0x2029);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Quotation_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x22, 0x27, 0xAB, 0xBB, 0x2E42, 0xFF02, 0xFF07);\n\tset.addRange(0x2018, 0x201F).addRange(0x2039, 0x203A).addRange(0x300C, 0x300F).addRange(0x301D, 0x301F).addRange(0xFE41, 0xFE44).addRange(0xFF62, 0xFF63);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Radical.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Regional_Indicator.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1F1E6, 0x1F1FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Sentence_Terminal.js\", function (module, exports) {\n\t const set = regenerate(0x21, 0x2E, 0x3F, 0x589, 0x6D4, 0x7F9, 0x837, 0x839, 0x1362, 0x166E, 0x1803, 0x1809, 0x2E2E, 0x2E3C, 0x3002, 0xA4FF, 0xA6F3, 0xA6F7, 0xA92F, 0xABEB, 0xFE52, 0xFF01, 0xFF0E, 0xFF1F, 0xFF61, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x16AF5, 0x16B44, 0x16E98, 0x1BC9F, 0x1DA88);\n\tset.addRange(0x61D, 0x61F).addRange(0x700, 0x702).addRange(0x83D, 0x83E).addRange(0x964, 0x965).addRange(0x104A, 0x104B).addRange(0x1367, 0x1368).addRange(0x1735, 0x1736).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5E, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3C).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E53, 0x2E54).addRange(0xA60E, 0xA60F).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C8, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE56, 0xFE57).addRange(0x10A56, 0x10A57).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x11048).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x11239).addRange(0x1123B, 0x1123C).addRange(0x1144B, 0x1144C).addRange(0x115C2, 0x115C3).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11C41, 0x11C42).addRange(0x11EF7, 0x11EF8).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B38);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Soft_Dotted.js\", function (module, exports) {\n\t const set = regenerate(0x12F, 0x249, 0x268, 0x29D, 0x2B2, 0x3F3, 0x456, 0x458, 0x1D62, 0x1D96, 0x1DA4, 0x1DA8, 0x1E2D, 0x1ECB, 0x2071, 0x2C7C, 0x1DF1A);\n\tset.addRange(0x69, 0x6A).addRange(0x2148, 0x2149).addRange(0x1D422, 0x1D423).addRange(0x1D456, 0x1D457).addRange(0x1D48A, 0x1D48B).addRange(0x1D4BE, 0x1D4BF).addRange(0x1D4F2, 0x1D4F3).addRange(0x1D526, 0x1D527).addRange(0x1D55A, 0x1D55B).addRange(0x1D58E, 0x1D58F).addRange(0x1D5C2, 0x1D5C3).addRange(0x1D5F6, 0x1D5F7).addRange(0x1D62A, 0x1D62B).addRange(0x1D65E, 0x1D65F).addRange(0x1D692, 0x1D693);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Terminal_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x21, 0x2C, 0x2E, 0x3F, 0x37E, 0x387, 0x589, 0x5C3, 0x60C, 0x61B, 0x6D4, 0x70C, 0x85E, 0xF08, 0x166E, 0x17DA, 0x2E2E, 0x2E3C, 0x2E41, 0x2E4C, 0xA92F, 0xAADF, 0xABEB, 0xFF01, 0xFF0C, 0xFF0E, 0xFF1F, 0xFF61, 0xFF64, 0x1039F, 0x103D0, 0x10857, 0x1091F, 0x111CD, 0x112A9, 0x11944, 0x11946, 0x11C71, 0x16AF5, 0x16B44, 0x1BC9F);\n\tset.addRange(0x3A, 0x3B).addRange(0x61D, 0x61F).addRange(0x700, 0x70A).addRange(0x7F8, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF0D, 0xF12).addRange(0x104A, 0x104B).addRange(0x1361, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x1802, 0x1805).addRange(0x1808, 0x1809).addRange(0x1944, 0x1945).addRange(0x1AA8, 0x1AAB).addRange(0x1B5A, 0x1B5B).addRange(0x1B5D, 0x1B5F).addRange(0x1B7D, 0x1B7E).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x203C, 0x203D).addRange(0x2047, 0x2049).addRange(0x2E4E, 0x2E4F).addRange(0x2E53, 0x2E54).addRange(0x3001, 0x3002).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F3, 0xA6F7).addRange(0xA876, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA9C7, 0xA9C9).addRange(0xAA5D, 0xAA5F).addRange(0xAAF0, 0xAAF1).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFF1A, 0xFF1B).addRange(0x10A56, 0x10A57).addRange(0x10AF0, 0x10AF5).addRange(0x10B3A, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BE, 0x110C1).addRange(0x11141, 0x11143).addRange(0x111C5, 0x111C6).addRange(0x111DE, 0x111DF).addRange(0x11238, 0x1123C).addRange(0x1144B, 0x1144D);\n\tset.addRange(0x1145A, 0x1145B).addRange(0x115C2, 0x115C5).addRange(0x115C9, 0x115D7).addRange(0x11641, 0x11642).addRange(0x1173C, 0x1173E).addRange(0x11A42, 0x11A43).addRange(0x11A9B, 0x11A9C).addRange(0x11AA1, 0x11AA2).addRange(0x11C41, 0x11C43).addRange(0x11EF7, 0x11EF8).addRange(0x12470, 0x12474).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B39).addRange(0x16E97, 0x16E98).addRange(0x1DA87, 0x1DA8A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Unified_Ideograph.js\", function (module, exports) {\n\t const set = regenerate(0xFA11, 0xFA1F, 0xFA21);\n\tset.addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xFA0E, 0xFA0F).addRange(0xFA13, 0xFA14).addRange(0xFA23, 0xFA24).addRange(0xFA27, 0xFA29).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Uppercase.js\", function (module, exports) {\n\t const set = regenerate(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0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, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2160, 0x216F);\n\tset.addRange(0x24B6, 0x24CF).addRange(0x2C00, 0x2C2F).addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921).addRange(0x1F130, 0x1F149).addRange(0x1F150, 0x1F169).addRange(0x1F170, 0x1F189);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/Variation_Selector.js\", function (module, exports) {\n\t const set = regenerate(0x180F);\n\tset.addRange(0x180B, 0x180D).addRange(0xFE00, 0xFE0F).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/White_Space.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0x85, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\n\tset.addRange(0x9, 0xD).addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/XID_Continue.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0xAA, 0xB5, 0xB7, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x38C, 0x559, 0x5BF, 0x5C7, 0x6FF, 0x7FA, 0x7FD, 0x9B2, 0x9D7, 0x9FC, 0x9FE, 0xA3C, 0xA51, 0xA5E, 0xAD0, 0xB71, 0xB9C, 0xBD0, 0xBD7, 0xC5D, 0xDBD, 0xDCA, 0xDD6, 0xE84, 0xEA5, 0xEC6, 0xF00, 0xF35, 0xF37, 0xF39, 0xFC6, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x1AA7, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2054, 0x2071, 0x207F, 0x20E1, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA82C, 0xA8FB, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0xFF3F, 0x101FD, 0x102E0, 0x10808, 0x1083C, 0x10A3F, 0x10F27, 0x110C2, 0x11176, 0x111DC, 0x1123E, 0x11288, 0x11350, 0x11357, 0x114C7, 0x11644, 0x11909, 0x11A47, 0x11A9D, 0x11D3A, 0x11FB0, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1DA75, 0x1DA84, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x30, 0x39).addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x300, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x386, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x483, 0x487).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x610, 0x61A).addRange(0x620, 0x669).addRange(0x66E, 0x6D3).addRange(0x6D5, 0x6DC).addRange(0x6DF, 0x6E8).addRange(0x6EA, 0x6FC).addRange(0x710, 0x74A).addRange(0x74D, 0x7B1).addRange(0x7C0, 0x7F5).addRange(0x800, 0x82D).addRange(0x840, 0x85B).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x898, 0x8E1).addRange(0x8E3, 0x963).addRange(0x966, 0x96F).addRange(0x971, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD);\n\tset.addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9F1).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA75).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAEF).addRange(0xAF9, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB6F).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9);\n\tset.addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBEF).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC80, 0xC83).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4E).addRange(0xD54, 0xD57).addRange(0xD5F, 0xD63).addRange(0xD66, 0xD6F).addRange(0xD7A, 0xD7F).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF3).addRange(0xE01, 0xE3A).addRange(0xE40, 0xE4E).addRange(0xE50, 0xE59).addRange(0xE81, 0xE82);\n\tset.addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF).addRange(0xF18, 0xF19).addRange(0xF20, 0xF29).addRange(0xF3E, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF84).addRange(0xF86, 0xF97).addRange(0xF99, 0xFBC).addRange(0x1000, 0x1049).addRange(0x1050, 0x109D).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x135F).addRange(0x1369, 0x1371).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1715).addRange(0x171F, 0x1734).addRange(0x1740, 0x1753).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773).addRange(0x1780, 0x17D3).addRange(0x17DC, 0x17DD).addRange(0x17E0, 0x17E9);\n\tset.addRange(0x180B, 0x180D).addRange(0x180F, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1946, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x1A00, 0x1A1B).addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B59).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1BF3).addRange(0x1C00, 0x1C37).addRange(0x1C40, 0x1C49).addRange(0x1C4D, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CFA).addRange(0x1D00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x203F, 0x2040).addRange(0x2090, 0x209C).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0);\n\tset.addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D7F, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x2DE0, 0x2DFF).addRange(0x3005, 0x3007).addRange(0x3021, 0x302F).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x3099, 0x309A).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA62B).addRange(0xA640, 0xA66F).addRange(0xA674, 0xA67D).addRange(0xA67F, 0xA6F1).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA827).addRange(0xA840, 0xA873).addRange(0xA880, 0xA8C5).addRange(0xA8D0, 0xA8D9).addRange(0xA8E0, 0xA8F7);\n\tset.addRange(0xA8FD, 0xA92D).addRange(0xA930, 0xA953).addRange(0xA960, 0xA97C).addRange(0xA980, 0xA9C0).addRange(0xA9CF, 0xA9D9).addRange(0xA9E0, 0xA9FE).addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA60, 0xAA76).addRange(0xAA7A, 0xAAC2).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEF).addRange(0xAAF2, 0xAAF6).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xABF0, 0xABF9).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1D, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F).addRange(0xFE7F, 0xFEFC).addRange(0xFF10, 0xFF19).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE);\n\tset.addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x1037A).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104A0, 0x104A9).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939);\n\tset.addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE6).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAC).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F50).addRange(0x10F70, 0x10F85).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11000, 0x11046).addRange(0x11066, 0x11075).addRange(0x1107F, 0x110BA).addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9).addRange(0x11100, 0x11134).addRange(0x11136, 0x1113F).addRange(0x11144, 0x11147).addRange(0x11150, 0x11173).addRange(0x11180, 0x111C4).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111DA).addRange(0x11200, 0x11211).addRange(0x11213, 0x11237).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C);\n\tset.addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11400, 0x1144A).addRange(0x11450, 0x11459).addRange(0x1145E, 0x11461).addRange(0x11480, 0x114C5).addRange(0x114D0, 0x114D9).addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115D8, 0x115DD).addRange(0x11600, 0x11640).addRange(0x11650, 0x11659).addRange(0x11680, 0x116B8).addRange(0x116C0, 0x116C9).addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11739).addRange(0x11740, 0x11746).addRange(0x11800, 0x1183A).addRange(0x118A0, 0x118E9).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11943).addRange(0x11950, 0x11959).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E1).addRange(0x119E3, 0x119E4).addRange(0x11A00, 0x11A3E).addRange(0x11A50, 0x11A99).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C40).addRange(0x11C50, 0x11C59).addRange(0x11C72, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D00, 0x11D06);\n\tset.addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9).addRange(0x11EE0, 0x11EF6).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9).addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF4).addRange(0x16B00, 0x16B36).addRange(0x16B40, 0x16B43).addRange(0x16B50, 0x16B59).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x16FE3, 0x16FE4).addRange(0x16FF0, 0x16FF1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99);\n\tset.addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1DF00, 0x1DF1E).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E290, 0x1E2AE);\n\tset.addRange(0x1E2C0, 0x1E2F9).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1FBF0, 0x1FBF9).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Binary_Property/XID_Start.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE32, 0xE84, 0xEA5, 0xEB2, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0xFE71, 0xFE73, 0xFE77, 0xFE79, 0xFE7B, 0xFE7D, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x16FE3, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\n\tset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\n\tset.addRange(0xE01, 0xE30).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E);\n\tset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2118, 0x211D).addRange(0x212A, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2160, 0x2188).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE);\n\tset.addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3007).addRange(0x3021, 0x3029).addRange(0x3031, 0x3035).addRange(0x3038, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6EF).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76);\n\tset.addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFC5D).addRange(0xFC64, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDF9).addRange(0xFE7F, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10140, 0x10174).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0);\n\tset.addRange(0x10300, 0x1031F).addRange(0x1032D, 0x1034A).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x103D1, 0x103D5).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10C80, 0x10CB2);\n\tset.addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32);\n\tset.addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3);\n\tset.addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D);\n\tset.addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Cased_Letter.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x37F, 0x386, 0x38C, 0x10C7, 0x10CD, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2139, 0x214E, 0x2D27, 0x2D2D, 0xA7D3, 0xA7FA, 0x1D4A2, 0x1D4BB, 0x1D546);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x1BA).addRange(0x1BC, 0x1BF).addRange(0x1C4, 0x293).addRange(0x295, 0x2AF).addRange(0x370, 0x373).addRange(0x376, 0x377).addRange(0x37B, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2134).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184);\n\tset.addRange(0x2C00, 0x2C7B).addRange(0x2C7E, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25).addRange(0xA640, 0xA66D).addRange(0xA680, 0xA69B).addRange(0xA722, 0xA76F).addRange(0xA771, 0xA787).addRange(0xA78B, 0xA78E).addRange(0xA790, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F5, 0xA7F6).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10400, 0x1044F).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x118A0, 0x118DF).addRange(0x16E40, 0x16E7F).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550);\n\tset.addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E900, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Close_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x29, 0x5D, 0x7D, 0xF3B, 0xF3D, 0x169C, 0x2046, 0x207E, 0x208E, 0x2309, 0x230B, 0x232A, 0x2769, 0x276B, 0x276D, 0x276F, 0x2771, 0x2773, 0x2775, 0x27C6, 0x27E7, 0x27E9, 0x27EB, 0x27ED, 0x27EF, 0x2984, 0x2986, 0x2988, 0x298A, 0x298C, 0x298E, 0x2990, 0x2992, 0x2994, 0x2996, 0x2998, 0x29D9, 0x29DB, 0x29FD, 0x2E23, 0x2E25, 0x2E27, 0x2E29, 0x2E56, 0x2E58, 0x2E5A, 0x2E5C, 0x3009, 0x300B, 0x300D, 0x300F, 0x3011, 0x3015, 0x3017, 0x3019, 0x301B, 0xFD3E, 0xFE18, 0xFE36, 0xFE38, 0xFE3A, 0xFE3C, 0xFE3E, 0xFE40, 0xFE42, 0xFE44, 0xFE48, 0xFE5A, 0xFE5C, 0xFE5E, 0xFF09, 0xFF3D, 0xFF5D, 0xFF60, 0xFF63);\n\tset.addRange(0x301E, 0x301F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Connector_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0x2054, 0xFF3F);\n\tset.addRange(0x203F, 0x2040).addRange(0xFE33, 0xFE34).addRange(0xFE4D, 0xFE4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Control.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Currency_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x24, 0x58F, 0x60B, 0x9FB, 0xAF1, 0xBF9, 0xE3F, 0x17DB, 0xA838, 0xFDFC, 0xFE69, 0xFF04, 0x1E2FF, 0x1ECB0);\n\tset.addRange(0xA2, 0xA5).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x20A0, 0x20C0).addRange(0xFFE0, 0xFFE1).addRange(0xFFE5, 0xFFE6).addRange(0x11FDD, 0x11FE0);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Dash_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x2D, 0x58A, 0x5BE, 0x1400, 0x1806, 0x2E17, 0x2E1A, 0x2E40, 0x2E5D, 0x301C, 0x3030, 0x30A0, 0xFE58, 0xFE63, 0xFF0D, 0x10EAD);\n\tset.addRange(0x2010, 0x2015).addRange(0x2E3A, 0x2E3B).addRange(0xFE31, 0xFE32);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Decimal_Number.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x30, 0x39).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xBE6, 0xBEF).addRange(0xC66, 0xC6F).addRange(0xCE6, 0xCEF).addRange(0xD66, 0xD6F).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF29).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x17E0, 0x17E9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19D9).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0xA620, 0xA629).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x104A0, 0x104A9).addRange(0x10D30, 0x10D39).addRange(0x11066, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x11739).addRange(0x118E0, 0x118E9).addRange(0x11950, 0x11959);\n\tset.addRange(0x11C50, 0x11C59).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E950, 0x1E959).addRange(0x1FBF0, 0x1FBF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Enclosing_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x1ABE);\n\tset.addRange(0x488, 0x489).addRange(0x20DD, 0x20E0).addRange(0x20E2, 0x20E4).addRange(0xA670, 0xA672);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Final_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0xBB, 0x2019, 0x201D, 0x203A, 0x2E03, 0x2E05, 0x2E0A, 0x2E0D, 0x2E1D, 0x2E21);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Format.js\", function (module, exports) {\n\t const set = regenerate(0xAD, 0x61C, 0x6DD, 0x70F, 0x8E2, 0x180E, 0xFEFF, 0x110BD, 0x110CD, 0xE0001);\n\tset.addRange(0x600, 0x605).addRange(0x890, 0x891).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x2064).addRange(0x2066, 0x206F).addRange(0xFFF9, 0xFFFB).addRange(0x13430, 0x13438).addRange(0x1BCA0, 0x1BCA3).addRange(0x1D173, 0x1D17A).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Initial_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0xAB, 0x2018, 0x201F, 0x2039, 0x2E02, 0x2E04, 0x2E09, 0x2E0C, 0x2E1C, 0x2E20);\n\tset.addRange(0x201B, 0x201C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Letter_Number.js\", function (module, exports) {\n\t const set = regenerate(0x3007, 0x10341, 0x1034A);\n\tset.addRange(0x16EE, 0x16F0).addRange(0x2160, 0x2182).addRange(0x2185, 0x2188).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0xA6E6, 0xA6EF).addRange(0x10140, 0x10174).addRange(0x103D1, 0x103D5).addRange(0x12400, 0x1246E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Letter.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xB5, 0xBA, 0x2EC, 0x2EE, 0x37F, 0x386, 0x38C, 0x559, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x7FA, 0x81A, 0x824, 0x828, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xEC6, 0xF00, 0x103F, 0x1061, 0x108E, 0x10C7, 0x10CD, 0x1258, 0x12C0, 0x17D7, 0x17DC, 0x18AA, 0x1AA7, 0x1CFA, 0x1F59, 0x1F5B, 0x1F5D, 0x1FBE, 0x2071, 0x207F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x214E, 0x2D27, 0x2D2D, 0x2D6F, 0x2E2F, 0xA7D3, 0xA8FB, 0xA9CF, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x16FE3, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1E14E, 0x1E94B, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x370, 0x374).addRange(0x376, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3F5).addRange(0x3F7, 0x481).addRange(0x48A, 0x52F).addRange(0x531, 0x556).addRange(0x560, 0x588).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6E5, 0x6E6).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x7F4, 0x7F5).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C9).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x971, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33);\n\tset.addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6);\n\tset.addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE46).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066).addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1878).addRange(0x1880, 0x1884);\n\tset.addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C7D).addRange(0x1C80, 0x1C88).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6).addRange(0x1D00, 0x1DBF).addRange(0x1E00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FBC).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FCC).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FE0, 0x1FEC).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFC).addRange(0x2090, 0x209C).addRange(0x210A, 0x2113).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x212F, 0x2139).addRange(0x213C, 0x213F).addRange(0x2145, 0x2149).addRange(0x2183, 0x2184).addRange(0x2C00, 0x2CE4).addRange(0x2CEB, 0x2CEE).addRange(0x2CF2, 0x2CF3).addRange(0x2D00, 0x2D25);\n\tset.addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3005, 0x3006).addRange(0x3031, 0x3035).addRange(0x303B, 0x303C).addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x30A1, 0x30FA).addRange(0x30FC, 0x30FF).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA48C).addRange(0xA4D0, 0xA4FD).addRange(0xA500, 0xA60C).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA640, 0xA66E).addRange(0xA67F, 0xA69D).addRange(0xA6A0, 0xA6E5).addRange(0xA717, 0xA71F).addRange(0xA722, 0xA788).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E6, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28);\n\tset.addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADD).addRange(0xAAE0, 0xAAEA).addRange(0xAAF2, 0xAAF4).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB69).addRange(0xAB70, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0xFF66, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C);\n\tset.addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10400, 0x1049D).addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48);\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118A0, 0x118DF).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0);\n\tset.addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B40, 0x16B43).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16E40, 0x16E7F).addRange(0x16F00, 0x16F4A).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B000, 0x1B122).addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3);\n\tset.addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6FA).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D734).addRange(0x1D736, 0x1D74E).addRange(0x1D750, 0x1D76E).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D7A8).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7CB).addRange(0x1DF00, 0x1DF1E).addRange(0x1E100, 0x1E12C).addRange(0x1E137, 0x1E13D).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1E900, 0x1E943).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D);\n\tset.addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Line_Separator.js\", function (module, exports) {\n\t const set = regenerate(0x2028);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Lowercase_Letter.js\", function (module, exports) {\n\t const set = regenerate(0xB5, 0x101, 0x103, 0x105, 0x107, 0x109, 0x10B, 0x10D, 0x10F, 0x111, 0x113, 0x115, 0x117, 0x119, 0x11B, 0x11D, 0x11F, 0x121, 0x123, 0x125, 0x127, 0x129, 0x12B, 0x12D, 0x12F, 0x131, 0x133, 0x135, 0x13A, 0x13C, 0x13E, 0x140, 0x142, 0x144, 0x146, 0x14B, 0x14D, 0x14F, 0x151, 0x153, 0x155, 0x157, 0x159, 0x15B, 0x15D, 0x15F, 0x161, 0x163, 0x165, 0x167, 0x169, 0x16B, 0x16D, 0x16F, 0x171, 0x173, 0x175, 0x177, 0x17A, 0x17C, 0x183, 0x185, 0x188, 0x192, 0x195, 0x19E, 0x1A1, 0x1A3, 0x1A5, 0x1A8, 0x1AD, 0x1B0, 0x1B4, 0x1B6, 0x1C6, 0x1C9, 0x1CC, 0x1CE, 0x1D0, 0x1D2, 0x1D4, 0x1D6, 0x1D8, 0x1DA, 0x1DF, 0x1E1, 0x1E3, 0x1E5, 0x1E7, 0x1E9, 0x1EB, 0x1ED, 0x1F3, 0x1F5, 0x1F9, 0x1FB, 0x1FD, 0x1FF, 0x201, 0x203, 0x205, 0x207, 0x209, 0x20B, 0x20D, 0x20F, 0x211, 0x213, 0x215, 0x217, 0x219, 0x21B, 0x21D, 0x21F, 0x221, 0x223, 0x225, 0x227, 0x229, 0x22B, 0x22D, 0x22F, 0x231, 0x23C, 0x242, 0x247, 0x249, 0x24B, 0x24D, 0x371, 0x373, 0x377, 0x390, 0x3D9, 0x3DB, 0x3DD, 0x3DF, 0x3E1, 0x3E3, 0x3E5, 0x3E7, 0x3E9, 0x3EB, 0x3ED, 0x3F5, 0x3F8, 0x461, 0x463, 0x465, 0x467, 0x469, 0x46B, 0x46D, 0x46F, 0x471, 0x473, 0x475, 0x477, 0x479, 0x47B, 0x47D, 0x47F, 0x481, 0x48B, 0x48D, 0x48F, 0x491, 0x493, 0x495, 0x497, 0x499, 0x49B, 0x49D, 0x49F, 0x4A1, 0x4A3, 0x4A5, 0x4A7, 0x4A9, 0x4AB, 0x4AD, 0x4AF, 0x4B1, 0x4B3, 0x4B5, 0x4B7, 0x4B9, 0x4BB, 0x4BD, 0x4BF, 0x4C2, 0x4C4, 0x4C6, 0x4C8, 0x4CA, 0x4CC, 0x4D1, 0x4D3, 0x4D5, 0x4D7, 0x4D9, 0x4DB, 0x4DD, 0x4DF, 0x4E1, 0x4E3, 0x4E5, 0x4E7, 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1EE1, 0x1EE3, 0x1EE5, 0x1EE7, 0x1EE9, 0x1EEB, 0x1EED, 0x1EEF, 0x1EF1, 0x1EF3, 0x1EF5, 0x1EF7, 0x1EF9, 0x1EFB, 0x1EFD, 0x1FBE, 0x210A, 0x2113, 0x212F, 0x2134, 0x2139, 0x214E, 0x2184, 0x2C61, 0x2C68, 0x2C6A, 0x2C6C, 0x2C71, 0x2C81, 0x2C83, 0x2C85, 0x2C87, 0x2C89, 0x2C8B, 0x2C8D, 0x2C8F, 0x2C91, 0x2C93, 0x2C95, 0x2C97, 0x2C99, 0x2C9B, 0x2C9D, 0x2C9F, 0x2CA1, 0x2CA3, 0x2CA5, 0x2CA7, 0x2CA9, 0x2CAB, 0x2CAD, 0x2CAF, 0x2CB1, 0x2CB3, 0x2CB5, 0x2CB7, 0x2CB9, 0x2CBB, 0x2CBD, 0x2CBF, 0x2CC1, 0x2CC3, 0x2CC5, 0x2CC7, 0x2CC9, 0x2CCB, 0x2CCD, 0x2CCF, 0x2CD1, 0x2CD3, 0x2CD5, 0x2CD7, 0x2CD9, 0x2CDB, 0x2CDD, 0x2CDF, 0x2CE1, 0x2CEC, 0x2CEE, 0x2CF3, 0x2D27, 0x2D2D, 0xA641, 0xA643, 0xA645, 0xA647, 0xA649, 0xA64B, 0xA64D, 0xA64F, 0xA651, 0xA653, 0xA655, 0xA657, 0xA659, 0xA65B, 0xA65D, 0xA65F, 0xA661, 0xA663, 0xA665, 0xA667, 0xA669, 0xA66B, 0xA66D, 0xA681, 0xA683, 0xA685, 0xA687, 0xA689, 0xA68B, 0xA68D, 0xA68F, 0xA691, 0xA693, 0xA695, 0xA697, 0xA699, 0xA69B, 0xA723, 0xA725, 0xA727, 0xA729, 0xA72B, 0xA72D, 0xA733, 0xA735, 0xA737, 0xA739, 0xA73B, 0xA73D, 0xA73F, 0xA741, 0xA743, 0xA745, 0xA747, 0xA749, 0xA74B, 0xA74D, 0xA74F, 0xA751, 0xA753, 0xA755, 0xA757, 0xA759, 0xA75B, 0xA75D, 0xA75F, 0xA761, 0xA763, 0xA765, 0xA767, 0xA769, 0xA76B, 0xA76D, 0xA76F, 0xA77A, 0xA77C, 0xA77F, 0xA781, 0xA783, 0xA785, 0xA787, 0xA78C, 0xA78E, 0xA791, 0xA797, 0xA799, 0xA79B, 0xA79D, 0xA79F, 0xA7A1, 0xA7A3, 0xA7A5, 0xA7A7, 0xA7A9, 0xA7AF, 0xA7B5, 0xA7B7, 0xA7B9, 0xA7BB, 0xA7BD, 0xA7BF, 0xA7C1, 0xA7C3, 0xA7C8, 0xA7CA, 0xA7D1, 0xA7D3, 0xA7D5, 0xA7D7, 0xA7D9, 0xA7F6, 0xA7FA, 0x1D4BB, 0x1D7CB);\n\tset.addRange(0x61, 0x7A).addRange(0xDF, 0xF6).addRange(0xF8, 0xFF).addRange(0x137, 0x138).addRange(0x148, 0x149).addRange(0x17E, 0x180).addRange(0x18C, 0x18D).addRange(0x199, 0x19B).addRange(0x1AA, 0x1AB).addRange(0x1B9, 0x1BA).addRange(0x1BD, 0x1BF).addRange(0x1DC, 0x1DD).addRange(0x1EF, 0x1F0).addRange(0x233, 0x239).addRange(0x23F, 0x240).addRange(0x24F, 0x293).addRange(0x295, 0x2AF).addRange(0x37B, 0x37D).addRange(0x3AC, 0x3CE).addRange(0x3D0, 0x3D1).addRange(0x3D5, 0x3D7).addRange(0x3EF, 0x3F3).addRange(0x3FB, 0x3FC).addRange(0x430, 0x45F).addRange(0x4CE, 0x4CF).addRange(0x560, 0x588).addRange(0x10D0, 0x10FA).addRange(0x10FD, 0x10FF).addRange(0x13F8, 0x13FD).addRange(0x1C80, 0x1C88).addRange(0x1D00, 0x1D2B).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1D9A).addRange(0x1E95, 0x1E9D).addRange(0x1EFF, 0x1F07).addRange(0x1F10, 0x1F15).addRange(0x1F20, 0x1F27).addRange(0x1F30, 0x1F37).addRange(0x1F40, 0x1F45).addRange(0x1F50, 0x1F57).addRange(0x1F60, 0x1F67).addRange(0x1F70, 0x1F7D).addRange(0x1F80, 0x1F87).addRange(0x1F90, 0x1F97).addRange(0x1FA0, 0x1FA7).addRange(0x1FB0, 0x1FB4).addRange(0x1FB6, 0x1FB7).addRange(0x1FC2, 0x1FC4).addRange(0x1FC6, 0x1FC7).addRange(0x1FD0, 0x1FD3).addRange(0x1FD6, 0x1FD7);\n\tset.addRange(0x1FE0, 0x1FE7).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FF7).addRange(0x210E, 0x210F).addRange(0x213C, 0x213D).addRange(0x2146, 0x2149).addRange(0x2C30, 0x2C5F).addRange(0x2C65, 0x2C66).addRange(0x2C73, 0x2C74).addRange(0x2C76, 0x2C7B).addRange(0x2CE3, 0x2CE4).addRange(0x2D00, 0x2D25).addRange(0xA72F, 0xA731).addRange(0xA771, 0xA778).addRange(0xA793, 0xA795).addRange(0xAB30, 0xAB5A).addRange(0xAB60, 0xAB68).addRange(0xAB70, 0xABBF).addRange(0xFB00, 0xFB06).addRange(0xFB13, 0xFB17).addRange(0xFF41, 0xFF5A).addRange(0x10428, 0x1044F).addRange(0x104D8, 0x104FB).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC).addRange(0x10CC0, 0x10CF2).addRange(0x118C0, 0x118DF).addRange(0x16E60, 0x16E7F).addRange(0x1D41A, 0x1D433).addRange(0x1D44E, 0x1D454).addRange(0x1D456, 0x1D467).addRange(0x1D482, 0x1D49B).addRange(0x1D4B6, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D4CF).addRange(0x1D4EA, 0x1D503).addRange(0x1D51E, 0x1D537).addRange(0x1D552, 0x1D56B).addRange(0x1D586, 0x1D59F).addRange(0x1D5BA, 0x1D5D3).addRange(0x1D5EE, 0x1D607).addRange(0x1D622, 0x1D63B).addRange(0x1D656, 0x1D66F).addRange(0x1D68A, 0x1D6A5).addRange(0x1D6C2, 0x1D6DA).addRange(0x1D6DC, 0x1D6E1).addRange(0x1D6FC, 0x1D714).addRange(0x1D716, 0x1D71B).addRange(0x1D736, 0x1D74E);\n\tset.addRange(0x1D750, 0x1D755).addRange(0x1D770, 0x1D788).addRange(0x1D78A, 0x1D78F).addRange(0x1D7AA, 0x1D7C2).addRange(0x1D7C4, 0x1D7C9).addRange(0x1DF00, 0x1DF09).addRange(0x1DF0B, 0x1DF1E).addRange(0x1E922, 0x1E943);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Mark.js\", function (module, exports) {\n\t const set = regenerate(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x9BC, 0x9D7, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xB3C, 0xB82, 0xBD7, 0xC3C, 0xCBC, 0xD57, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x108F, 0x17DD, 0x180F, 0x18A9, 0x1A7F, 0x1CED, 0x1CF4, 0x2D7F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9E5, 0xAA43, 0xAAB0, 0xAAC1, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11070, 0x110C2, 0x11173, 0x1123E, 0x11357, 0x1145E, 0x11940, 0x119E4, 0x11A47, 0x11D3A, 0x11D47, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E2AE);\n\tset.addRange(0x300, 0x36F).addRange(0x483, 0x489).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x903).addRange(0x93A, 0x93C).addRange(0x93E, 0x94F).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x981, 0x983).addRange(0x9BE, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CD).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA03).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA83).addRange(0xABE, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB01, 0xB03).addRange(0xB3E, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB62, 0xB63).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD);\n\tset.addRange(0xC00, 0xC04).addRange(0xC3E, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xC81, 0xC83).addRange(0xCBE, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD03).addRange(0xD3B, 0xD3C).addRange(0xD3E, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4D).addRange(0xD62, 0xD63).addRange(0xD81, 0xD83).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF3E, 0xF3F).addRange(0xF71, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102B, 0x103E).addRange(0x1056, 0x1059).addRange(0x105E, 0x1060).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1071, 0x1074).addRange(0x1082, 0x108D).addRange(0x109A, 0x109D).addRange(0x135D, 0x135F).addRange(0x1712, 0x1715).addRange(0x1732, 0x1734).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1A17, 0x1A1B);\n\tset.addRange(0x1A55, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1AB0, 0x1ACE).addRange(0x1B00, 0x1B04).addRange(0x1B34, 0x1B44).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B82).addRange(0x1BA1, 0x1BAD).addRange(0x1BE6, 0x1BF3).addRange(0x1C24, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE8).addRange(0x1CF7, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302F).addRange(0x3099, 0x309A).addRange(0xA66F, 0xA672).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA823, 0xA827).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA953).addRange(0xA980, 0xA983).addRange(0xA9B3, 0xA9C0).addRange(0xAA29, 0xAA36).addRange(0xAA4C, 0xAA4D).addRange(0xAA7B, 0xAA7D).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEB, 0xAAEF).addRange(0xAAF5, 0xAAF6).addRange(0xABE3, 0xABEA).addRange(0xABEC, 0xABED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC);\n\tset.addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11000, 0x11002).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11082).addRange(0x110B0, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x11134).addRange(0x11145, 0x11146).addRange(0x11180, 0x11182).addRange(0x111B3, 0x111C0).addRange(0x111C9, 0x111CC).addRange(0x111CE, 0x111CF).addRange(0x1122C, 0x11237).addRange(0x112DF, 0x112EA).addRange(0x11300, 0x11303).addRange(0x1133B, 0x1133C).addRange(0x1133E, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11435, 0x11446).addRange(0x114B0, 0x114C3).addRange(0x115AF, 0x115B5).addRange(0x115B8, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11630, 0x11640).addRange(0x116AB, 0x116B7).addRange(0x1171D, 0x1172B).addRange(0x1182C, 0x1183A).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x1193E).addRange(0x11942, 0x11943).addRange(0x119D1, 0x119D7).addRange(0x119DA, 0x119E0).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A39).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A5B).addRange(0x11A8A, 0x11A99).addRange(0x11C2F, 0x11C36).addRange(0x11C38, 0x11C3F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45);\n\tset.addRange(0x11D8A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D97).addRange(0x11EF3, 0x11EF6).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F51, 0x16F87).addRange(0x16F8F, 0x16F92).addRange(0x16FF0, 0x16FF1).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D165, 0x1D169).addRange(0x1D16D, 0x1D172).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Math_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x2B, 0x7C, 0x7E, 0xAC, 0xB1, 0xD7, 0xF7, 0x3F6, 0x2044, 0x2052, 0x2118, 0x214B, 0x21A0, 0x21A3, 0x21A6, 0x21AE, 0x21D2, 0x21D4, 0x237C, 0x25B7, 0x25C1, 0x266F, 0xFB29, 0xFE62, 0xFF0B, 0xFF5C, 0xFF5E, 0xFFE2, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3);\n\tset.addRange(0x3C, 0x3E).addRange(0x606, 0x608).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x2140, 0x2144).addRange(0x2190, 0x2194).addRange(0x219A, 0x219B).addRange(0x21CE, 0x21CF).addRange(0x21F4, 0x22FF).addRange(0x2320, 0x2321).addRange(0x239B, 0x23B3).addRange(0x23DC, 0x23E1).addRange(0x25F8, 0x25FF).addRange(0x27C0, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x27FF).addRange(0x2900, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2AFF).addRange(0x2B30, 0x2B44).addRange(0x2B47, 0x2B4C).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE9, 0xFFEC).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Modifier_Letter.js\", function (module, exports) {\n\t const set = regenerate(0x2EC, 0x2EE, 0x374, 0x37A, 0x559, 0x640, 0x7FA, 0x81A, 0x824, 0x828, 0x8C9, 0x971, 0xE46, 0xEC6, 0x10FC, 0x17D7, 0x1843, 0x1AA7, 0x1D78, 0x2071, 0x207F, 0x2D6F, 0x2E2F, 0x3005, 0x303B, 0xA015, 0xA60C, 0xA67F, 0xA770, 0xA788, 0xA9CF, 0xA9E6, 0xAA70, 0xAADD, 0xAB69, 0xFF70, 0x16FE3, 0x1E94B);\n\tset.addRange(0x2B0, 0x2C1).addRange(0x2C6, 0x2D1).addRange(0x2E0, 0x2E4).addRange(0x6E5, 0x6E6).addRange(0x7F4, 0x7F5).addRange(0x1C78, 0x1C7D).addRange(0x1D2C, 0x1D6A).addRange(0x1D9B, 0x1DBF).addRange(0x2090, 0x209C).addRange(0x2C7C, 0x2C7D).addRange(0x3031, 0x3035).addRange(0x309D, 0x309E).addRange(0x30FC, 0x30FE).addRange(0xA4F8, 0xA4FD).addRange(0xA69C, 0xA69D).addRange(0xA717, 0xA71F).addRange(0xA7F2, 0xA7F4).addRange(0xA7F8, 0xA7F9).addRange(0xAAF3, 0xAAF4).addRange(0xAB5C, 0xAB5F).addRange(0xFF9E, 0xFF9F).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x16B40, 0x16B43).addRange(0x16F93, 0x16F9F).addRange(0x16FE0, 0x16FE1).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1E137, 0x1E13D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Modifier_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x5E, 0x60, 0xA8, 0xAF, 0xB4, 0xB8, 0x2ED, 0x375, 0x888, 0x1FBD, 0xAB5B, 0xFF3E, 0xFF40, 0xFFE3);\n\tset.addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x309B, 0x309C).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0x1F3FB, 0x1F3FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Nonspacing_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x5BF, 0x5C7, 0x670, 0x711, 0x7FD, 0x93A, 0x93C, 0x94D, 0x981, 0x9BC, 0x9CD, 0x9FE, 0xA3C, 0xA51, 0xA75, 0xABC, 0xACD, 0xB01, 0xB3C, 0xB3F, 0xB4D, 0xB82, 0xBC0, 0xBCD, 0xC00, 0xC04, 0xC3C, 0xC81, 0xCBC, 0xCBF, 0xCC6, 0xD4D, 0xD81, 0xDCA, 0xDD6, 0xE31, 0xEB1, 0xF35, 0xF37, 0xF39, 0xFC6, 0x1082, 0x108D, 0x109D, 0x17C6, 0x17DD, 0x180F, 0x18A9, 0x1932, 0x1A1B, 0x1A56, 0x1A60, 0x1A62, 0x1A7F, 0x1B34, 0x1B3C, 0x1B42, 0x1BE6, 0x1BED, 0x1CED, 0x1CF4, 0x20E1, 0x2D7F, 0xA66F, 0xA802, 0xA806, 0xA80B, 0xA82C, 0xA8FF, 0xA9B3, 0xA9E5, 0xAA43, 0xAA4C, 0xAA7C, 0xAAB0, 0xAAC1, 0xAAF6, 0xABE5, 0xABE8, 0xABED, 0xFB1E, 0x101FD, 0x102E0, 0x10A3F, 0x11001, 0x11070, 0x110C2, 0x11173, 0x111CF, 0x11234, 0x1123E, 0x112DF, 0x11340, 0x11446, 0x1145E, 0x114BA, 0x1163D, 0x116AB, 0x116AD, 0x116B7, 0x1193E, 0x11943, 0x119E0, 0x11A47, 0x11C3F, 0x11D3A, 0x11D47, 0x11D95, 0x11D97, 0x16F4F, 0x16FE4, 0x1DA75, 0x1DA84, 0x1E2AE);\n\tset.addRange(0x300, 0x36F).addRange(0x483, 0x487).addRange(0x591, 0x5BD).addRange(0x5C1, 0x5C2).addRange(0x5C4, 0x5C5).addRange(0x610, 0x61A).addRange(0x64B, 0x65F).addRange(0x6D6, 0x6DC).addRange(0x6DF, 0x6E4).addRange(0x6E7, 0x6E8).addRange(0x6EA, 0x6ED).addRange(0x730, 0x74A).addRange(0x7A6, 0x7B0).addRange(0x7EB, 0x7F3).addRange(0x816, 0x819).addRange(0x81B, 0x823).addRange(0x825, 0x827).addRange(0x829, 0x82D).addRange(0x859, 0x85B).addRange(0x898, 0x89F).addRange(0x8CA, 0x8E1).addRange(0x8E3, 0x902).addRange(0x941, 0x948).addRange(0x951, 0x957).addRange(0x962, 0x963).addRange(0x9C1, 0x9C4).addRange(0x9E2, 0x9E3).addRange(0xA01, 0xA02).addRange(0xA41, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA70, 0xA71).addRange(0xA81, 0xA82).addRange(0xAC1, 0xAC5).addRange(0xAC7, 0xAC8).addRange(0xAE2, 0xAE3).addRange(0xAFA, 0xAFF).addRange(0xB41, 0xB44).addRange(0xB55, 0xB56).addRange(0xB62, 0xB63).addRange(0xC3E, 0xC40).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC62, 0xC63).addRange(0xCCC, 0xCCD).addRange(0xCE2, 0xCE3).addRange(0xD00, 0xD01).addRange(0xD3B, 0xD3C).addRange(0xD41, 0xD44).addRange(0xD62, 0xD63);\n\tset.addRange(0xDD2, 0xDD4).addRange(0xE34, 0xE3A).addRange(0xE47, 0xE4E).addRange(0xEB4, 0xEBC).addRange(0xEC8, 0xECD).addRange(0xF18, 0xF19).addRange(0xF71, 0xF7E).addRange(0xF80, 0xF84).addRange(0xF86, 0xF87).addRange(0xF8D, 0xF97).addRange(0xF99, 0xFBC).addRange(0x102D, 0x1030).addRange(0x1032, 0x1037).addRange(0x1039, 0x103A).addRange(0x103D, 0x103E).addRange(0x1058, 0x1059).addRange(0x105E, 0x1060).addRange(0x1071, 0x1074).addRange(0x1085, 0x1086).addRange(0x135D, 0x135F).addRange(0x1712, 0x1714).addRange(0x1732, 0x1733).addRange(0x1752, 0x1753).addRange(0x1772, 0x1773).addRange(0x17B4, 0x17B5).addRange(0x17B7, 0x17BD).addRange(0x17C9, 0x17D3).addRange(0x180B, 0x180D).addRange(0x1885, 0x1886).addRange(0x1920, 0x1922).addRange(0x1927, 0x1928).addRange(0x1939, 0x193B).addRange(0x1A17, 0x1A18).addRange(0x1A58, 0x1A5E).addRange(0x1A65, 0x1A6C).addRange(0x1A73, 0x1A7C).addRange(0x1AB0, 0x1ABD).addRange(0x1ABF, 0x1ACE).addRange(0x1B00, 0x1B03).addRange(0x1B36, 0x1B3A).addRange(0x1B6B, 0x1B73).addRange(0x1B80, 0x1B81).addRange(0x1BA2, 0x1BA5).addRange(0x1BA8, 0x1BA9).addRange(0x1BAB, 0x1BAD).addRange(0x1BE8, 0x1BE9).addRange(0x1BEF, 0x1BF1).addRange(0x1C2C, 0x1C33).addRange(0x1C36, 0x1C37).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0);\n\tset.addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x20D0, 0x20DC).addRange(0x20E5, 0x20F0).addRange(0x2CEF, 0x2CF1).addRange(0x2DE0, 0x2DFF).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xA674, 0xA67D).addRange(0xA69E, 0xA69F).addRange(0xA6F0, 0xA6F1).addRange(0xA825, 0xA826).addRange(0xA8C4, 0xA8C5).addRange(0xA8E0, 0xA8F1).addRange(0xA926, 0xA92D).addRange(0xA947, 0xA951).addRange(0xA980, 0xA982).addRange(0xA9B6, 0xA9B9).addRange(0xA9BC, 0xA9BD).addRange(0xAA29, 0xAA2E).addRange(0xAA31, 0xAA32).addRange(0xAA35, 0xAA36).addRange(0xAAB2, 0xAAB4).addRange(0xAAB7, 0xAAB8).addRange(0xAABE, 0xAABF).addRange(0xAAEC, 0xAAED).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2F).addRange(0x10376, 0x1037A).addRange(0x10A01, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A0F).addRange(0x10A38, 0x10A3A).addRange(0x10AE5, 0x10AE6).addRange(0x10D24, 0x10D27).addRange(0x10EAB, 0x10EAC).addRange(0x10F46, 0x10F50).addRange(0x10F82, 0x10F85).addRange(0x11038, 0x11046).addRange(0x11073, 0x11074).addRange(0x1107F, 0x11081).addRange(0x110B3, 0x110B6).addRange(0x110B9, 0x110BA).addRange(0x11100, 0x11102).addRange(0x11127, 0x1112B).addRange(0x1112D, 0x11134).addRange(0x11180, 0x11181).addRange(0x111B6, 0x111BE).addRange(0x111C9, 0x111CC).addRange(0x1122F, 0x11231);\n\tset.addRange(0x11236, 0x11237).addRange(0x112E3, 0x112EA).addRange(0x11300, 0x11301).addRange(0x1133B, 0x1133C).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11438, 0x1143F).addRange(0x11442, 0x11444).addRange(0x114B3, 0x114B8).addRange(0x114BF, 0x114C0).addRange(0x114C2, 0x114C3).addRange(0x115B2, 0x115B5).addRange(0x115BC, 0x115BD).addRange(0x115BF, 0x115C0).addRange(0x115DC, 0x115DD).addRange(0x11633, 0x1163A).addRange(0x1163F, 0x11640).addRange(0x116B0, 0x116B5).addRange(0x1171D, 0x1171F).addRange(0x11722, 0x11725).addRange(0x11727, 0x1172B).addRange(0x1182F, 0x11837).addRange(0x11839, 0x1183A).addRange(0x1193B, 0x1193C).addRange(0x119D4, 0x119D7).addRange(0x119DA, 0x119DB).addRange(0x11A01, 0x11A0A).addRange(0x11A33, 0x11A38).addRange(0x11A3B, 0x11A3E).addRange(0x11A51, 0x11A56).addRange(0x11A59, 0x11A5B).addRange(0x11A8A, 0x11A96).addRange(0x11A98, 0x11A99).addRange(0x11C30, 0x11C36).addRange(0x11C38, 0x11C3D).addRange(0x11C92, 0x11CA7).addRange(0x11CAA, 0x11CB0).addRange(0x11CB2, 0x11CB3).addRange(0x11CB5, 0x11CB6).addRange(0x11D31, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D45).addRange(0x11D90, 0x11D91).addRange(0x11EF3, 0x11EF4).addRange(0x16AF0, 0x16AF4).addRange(0x16B30, 0x16B36).addRange(0x16F8F, 0x16F92).addRange(0x1BC9D, 0x1BC9E).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169);\n\tset.addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0x1D242, 0x1D244).addRange(0x1DA00, 0x1DA36).addRange(0x1DA3B, 0x1DA6C).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A).addRange(0x1E130, 0x1E136).addRange(0x1E2EC, 0x1E2EF).addRange(0x1E8D0, 0x1E8D6).addRange(0x1E944, 0x1E94A).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Number.js\", function (module, exports) {\n\t const set = regenerate(0xB9, 0x2070, 0x2CFD, 0x3007, 0x10341, 0x1034A);\n\tset.addRange(0x30, 0x39).addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x660, 0x669).addRange(0x6F0, 0x6F9).addRange(0x7C0, 0x7C9).addRange(0x966, 0x96F).addRange(0x9E6, 0x9EF).addRange(0x9F4, 0x9F9).addRange(0xA66, 0xA6F).addRange(0xAE6, 0xAEF).addRange(0xB66, 0xB6F).addRange(0xB72, 0xB77).addRange(0xBE6, 0xBF2).addRange(0xC66, 0xC6F).addRange(0xC78, 0xC7E).addRange(0xCE6, 0xCEF).addRange(0xD58, 0xD5E).addRange(0xD66, 0xD78).addRange(0xDE6, 0xDEF).addRange(0xE50, 0xE59).addRange(0xED0, 0xED9).addRange(0xF20, 0xF33).addRange(0x1040, 0x1049).addRange(0x1090, 0x1099).addRange(0x1369, 0x137C).addRange(0x16EE, 0x16F0).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x1810, 0x1819).addRange(0x1946, 0x194F).addRange(0x19D0, 0x19DA).addRange(0x1A80, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1B50, 0x1B59).addRange(0x1BB0, 0x1BB9).addRange(0x1C40, 0x1C49).addRange(0x1C50, 0x1C59).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x2182).addRange(0x2185, 0x2189).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3021, 0x3029).addRange(0x3038, 0x303A).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F);\n\tset.addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA620, 0xA629).addRange(0xA6E6, 0xA6EF).addRange(0xA830, 0xA835).addRange(0xA8D0, 0xA8D9).addRange(0xA900, 0xA909).addRange(0xA9D0, 0xA9D9).addRange(0xA9F0, 0xA9F9).addRange(0xAA50, 0xAA59).addRange(0xABF0, 0xABF9).addRange(0xFF10, 0xFF19).addRange(0x10107, 0x10133).addRange(0x10140, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x103D1, 0x103D5).addRange(0x104A0, 0x104A9).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10D30, 0x10D39).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x1106F).addRange(0x110F0, 0x110F9).addRange(0x11136, 0x1113F).addRange(0x111D0, 0x111D9).addRange(0x111E1, 0x111F4).addRange(0x112F0, 0x112F9).addRange(0x11450, 0x11459).addRange(0x114D0, 0x114D9).addRange(0x11650, 0x11659).addRange(0x116C0, 0x116C9).addRange(0x11730, 0x1173B);\n\tset.addRange(0x118E0, 0x118F2).addRange(0x11950, 0x11959).addRange(0x11C50, 0x11C6C).addRange(0x11D50, 0x11D59).addRange(0x11DA0, 0x11DA9).addRange(0x11FC0, 0x11FD4).addRange(0x12400, 0x1246E).addRange(0x16A60, 0x16A69).addRange(0x16AC0, 0x16AC9).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1D7CE, 0x1D7FF).addRange(0x1E140, 0x1E149).addRange(0x1E2F0, 0x1E2F9).addRange(0x1E8C7, 0x1E8CF).addRange(0x1E950, 0x1E959).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C).addRange(0x1FBF0, 0x1FBF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Open_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x28, 0x5B, 0x7B, 0xF3A, 0xF3C, 0x169B, 0x201A, 0x201E, 0x2045, 0x207D, 0x208D, 0x2308, 0x230A, 0x2329, 0x2768, 0x276A, 0x276C, 0x276E, 0x2770, 0x2772, 0x2774, 0x27C5, 0x27E6, 0x27E8, 0x27EA, 0x27EC, 0x27EE, 0x2983, 0x2985, 0x2987, 0x2989, 0x298B, 0x298D, 0x298F, 0x2991, 0x2993, 0x2995, 0x2997, 0x29D8, 0x29DA, 0x29FC, 0x2E22, 0x2E24, 0x2E26, 0x2E28, 0x2E42, 0x2E55, 0x2E57, 0x2E59, 0x2E5B, 0x3008, 0x300A, 0x300C, 0x300E, 0x3010, 0x3014, 0x3016, 0x3018, 0x301A, 0x301D, 0xFD3F, 0xFE17, 0xFE35, 0xFE37, 0xFE39, 0xFE3B, 0xFE3D, 0xFE3F, 0xFE41, 0xFE43, 0xFE47, 0xFE59, 0xFE5B, 0xFE5D, 0xFF08, 0xFF3B, 0xFF5B, 0xFF5F, 0xFF62);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Letter.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xBA, 0x1BB, 0x294, 0x6D5, 0x6FF, 0x710, 0x7B1, 0x93D, 0x950, 0x9B2, 0x9BD, 0x9CE, 0x9FC, 0xA5E, 0xABD, 0xAD0, 0xAF9, 0xB3D, 0xB71, 0xB83, 0xB9C, 0xBD0, 0xC3D, 0xC5D, 0xC80, 0xCBD, 0xD3D, 0xD4E, 0xDBD, 0xE84, 0xEA5, 0xEBD, 0xF00, 0x103F, 0x1061, 0x108E, 0x1258, 0x12C0, 0x17DC, 0x18AA, 0x1CFA, 0x3006, 0x303C, 0x309F, 0x30FF, 0xA66E, 0xA78F, 0xA7F7, 0xA8FB, 0xAA7A, 0xAAB1, 0xAAC0, 0xAAC2, 0xAAF2, 0xFB1D, 0xFB3E, 0x10808, 0x1083C, 0x10A00, 0x10F27, 0x11075, 0x11144, 0x11147, 0x11176, 0x111DA, 0x111DC, 0x11288, 0x1133D, 0x11350, 0x114C7, 0x11644, 0x116B8, 0x11909, 0x1193F, 0x11941, 0x119E1, 0x119E3, 0x11A00, 0x11A3A, 0x11A50, 0x11A9D, 0x11C40, 0x11D46, 0x11D98, 0x11FB0, 0x16F50, 0x1DF0A, 0x1E14E, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x1C0, 0x1C3).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F2).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x66E, 0x66F).addRange(0x671, 0x6D3).addRange(0x6EE, 0x6EF).addRange(0x6FA, 0x6FC).addRange(0x712, 0x72F).addRange(0x74D, 0x7A5).addRange(0x7CA, 0x7EA).addRange(0x800, 0x815).addRange(0x840, 0x858).addRange(0x860, 0x86A).addRange(0x870, 0x887).addRange(0x889, 0x88E).addRange(0x8A0, 0x8C8).addRange(0x904, 0x939).addRange(0x958, 0x961).addRange(0x972, 0x980).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E1).addRange(0x9F0, 0x9F1).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA59, 0xA5C).addRange(0xA72, 0xA74).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xAE0, 0xAE1).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39);\n\tset.addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB61).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xC05, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC61).addRange(0xC85, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE1).addRange(0xCF1, 0xCF2).addRange(0xD04, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD3A).addRange(0xD54, 0xD56).addRange(0xD5F, 0xD61).addRange(0xD7A, 0xD7F).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xE01, 0xE30).addRange(0xE32, 0xE33).addRange(0xE40, 0xE45).addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEB0).addRange(0xEB2, 0xEB3).addRange(0xEC0, 0xEC4).addRange(0xEDC, 0xEDF).addRange(0xF40, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF88, 0xF8C).addRange(0x1000, 0x102A).addRange(0x1050, 0x1055).addRange(0x105A, 0x105D).addRange(0x1065, 0x1066);\n\tset.addRange(0x106E, 0x1070).addRange(0x1075, 0x1081).addRange(0x1100, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x1380, 0x138F).addRange(0x1401, 0x166C).addRange(0x166F, 0x167F).addRange(0x1681, 0x169A).addRange(0x16A0, 0x16EA).addRange(0x16F1, 0x16F8).addRange(0x1700, 0x1711).addRange(0x171F, 0x1731).addRange(0x1740, 0x1751).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1780, 0x17B3).addRange(0x1820, 0x1842).addRange(0x1844, 0x1878).addRange(0x1880, 0x1884).addRange(0x1887, 0x18A8).addRange(0x18B0, 0x18F5).addRange(0x1900, 0x191E).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974).addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x1A00, 0x1A16).addRange(0x1A20, 0x1A54).addRange(0x1B05, 0x1B33).addRange(0x1B45, 0x1B4C).addRange(0x1B83, 0x1BA0).addRange(0x1BAE, 0x1BAF).addRange(0x1BBA, 0x1BE5).addRange(0x1C00, 0x1C23).addRange(0x1C4D, 0x1C4F).addRange(0x1C5A, 0x1C77).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF6);\n\tset.addRange(0x2135, 0x2138).addRange(0x2D30, 0x2D67).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0x3041, 0x3096).addRange(0x30A1, 0x30FA).addRange(0x3105, 0x312F).addRange(0x3131, 0x318E).addRange(0x31A0, 0x31BF).addRange(0x31F0, 0x31FF).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0xA014).addRange(0xA016, 0xA48C).addRange(0xA4D0, 0xA4F7).addRange(0xA500, 0xA60B).addRange(0xA610, 0xA61F).addRange(0xA62A, 0xA62B).addRange(0xA6A0, 0xA6E5).addRange(0xA7FB, 0xA801).addRange(0xA803, 0xA805).addRange(0xA807, 0xA80A).addRange(0xA80C, 0xA822).addRange(0xA840, 0xA873).addRange(0xA882, 0xA8B3).addRange(0xA8F2, 0xA8F7).addRange(0xA8FD, 0xA8FE).addRange(0xA90A, 0xA925).addRange(0xA930, 0xA946).addRange(0xA960, 0xA97C).addRange(0xA984, 0xA9B2).addRange(0xA9E0, 0xA9E4).addRange(0xA9E7, 0xA9EF).addRange(0xA9FA, 0xA9FE).addRange(0xAA00, 0xAA28).addRange(0xAA40, 0xAA42).addRange(0xAA44, 0xAA4B).addRange(0xAA60, 0xAA6F).addRange(0xAA71, 0xAA76).addRange(0xAA7E, 0xAAAF).addRange(0xAAB5, 0xAAB6).addRange(0xAAB9, 0xAABD).addRange(0xAADB, 0xAADC).addRange(0xAAE0, 0xAAEA).addRange(0xAB01, 0xAB06);\n\tset.addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0xABC0, 0xABE2).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFB1F, 0xFB28).addRange(0xFB2A, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFBB1).addRange(0xFBD3, 0xFD3D).addRange(0xFD50, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFB).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC).addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10280, 0x1029C).addRange(0x102A0, 0x102D0).addRange(0x10300, 0x1031F).addRange(0x1032D, 0x10340).addRange(0x10342, 0x10349).addRange(0x10350, 0x10375).addRange(0x10380, 0x1039D).addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103CF).addRange(0x10450, 0x1049D).addRange(0x10500, 0x10527).addRange(0x10530, 0x10563).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\n\tset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838).addRange(0x1083F, 0x10855).addRange(0x10860, 0x10876).addRange(0x10880, 0x1089E).addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x10900, 0x10915).addRange(0x10920, 0x10939).addRange(0x10980, 0x109B7).addRange(0x109BE, 0x109BF).addRange(0x10A10, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A60, 0x10A7C).addRange(0x10A80, 0x10A9C).addRange(0x10AC0, 0x10AC7).addRange(0x10AC9, 0x10AE4).addRange(0x10B00, 0x10B35).addRange(0x10B40, 0x10B55).addRange(0x10B60, 0x10B72).addRange(0x10B80, 0x10B91).addRange(0x10C00, 0x10C48).addRange(0x10D00, 0x10D23).addRange(0x10E80, 0x10EA9).addRange(0x10EB0, 0x10EB1).addRange(0x10F00, 0x10F1C).addRange(0x10F30, 0x10F45).addRange(0x10F70, 0x10F81).addRange(0x10FB0, 0x10FC4).addRange(0x10FE0, 0x10FF6).addRange(0x11003, 0x11037).addRange(0x11071, 0x11072).addRange(0x11083, 0x110AF).addRange(0x110D0, 0x110E8).addRange(0x11103, 0x11126).addRange(0x11150, 0x11172).addRange(0x11183, 0x111B2).addRange(0x111C1, 0x111C4).addRange(0x11200, 0x11211).addRange(0x11213, 0x1122B).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A8).addRange(0x112B0, 0x112DE).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330);\n\tset.addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1135D, 0x11361).addRange(0x11400, 0x11434).addRange(0x11447, 0x1144A).addRange(0x1145F, 0x11461).addRange(0x11480, 0x114AF).addRange(0x114C4, 0x114C5).addRange(0x11580, 0x115AE).addRange(0x115D8, 0x115DB).addRange(0x11600, 0x1162F).addRange(0x11680, 0x116AA).addRange(0x11700, 0x1171A).addRange(0x11740, 0x11746).addRange(0x11800, 0x1182B).addRange(0x118FF, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x1192F).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D0).addRange(0x11A0B, 0x11A32).addRange(0x11A5C, 0x11A89).addRange(0x11AB0, 0x11AF8).addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C2E).addRange(0x11C72, 0x11C8F).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D30).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D89).addRange(0x11EE0, 0x11EF2).addRange(0x12000, 0x12399).addRange(0x12480, 0x12543).addRange(0x12F90, 0x12FF0).addRange(0x13000, 0x1342E).addRange(0x14400, 0x14646).addRange(0x16800, 0x16A38).addRange(0x16A40, 0x16A5E).addRange(0x16A70, 0x16ABE).addRange(0x16AD0, 0x16AED).addRange(0x16B00, 0x16B2F).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F).addRange(0x16F00, 0x16F4A).addRange(0x17000, 0x187F7).addRange(0x18800, 0x18CD5).addRange(0x18D00, 0x18D08).addRange(0x1B000, 0x1B122);\n\tset.addRange(0x1B150, 0x1B152).addRange(0x1B164, 0x1B167).addRange(0x1B170, 0x1B2FB).addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1E100, 0x1E12C).addRange(0x1E290, 0x1E2AD).addRange(0x1E2C0, 0x1E2EB).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE).addRange(0x1E800, 0x1E8C4).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Number.js\", function (module, exports) {\n\t const set = regenerate(0xB9, 0x19DA, 0x2070, 0x2189, 0x2CFD);\n\tset.addRange(0xB2, 0xB3).addRange(0xBC, 0xBE).addRange(0x9F4, 0x9F9).addRange(0xB72, 0xB77).addRange(0xBF0, 0xBF2).addRange(0xC78, 0xC7E).addRange(0xD58, 0xD5E).addRange(0xD70, 0xD78).addRange(0xF2A, 0xF33).addRange(0x1369, 0x137C).addRange(0x17F0, 0x17F9).addRange(0x2074, 0x2079).addRange(0x2080, 0x2089).addRange(0x2150, 0x215F).addRange(0x2460, 0x249B).addRange(0x24EA, 0x24FF).addRange(0x2776, 0x2793).addRange(0x3192, 0x3195).addRange(0x3220, 0x3229).addRange(0x3248, 0x324F).addRange(0x3251, 0x325F).addRange(0x3280, 0x3289).addRange(0x32B1, 0x32BF).addRange(0xA830, 0xA835).addRange(0x10107, 0x10133).addRange(0x10175, 0x10178).addRange(0x1018A, 0x1018B).addRange(0x102E1, 0x102FB).addRange(0x10320, 0x10323).addRange(0x10858, 0x1085F).addRange(0x10879, 0x1087F).addRange(0x108A7, 0x108AF).addRange(0x108FB, 0x108FF).addRange(0x10916, 0x1091B).addRange(0x109BC, 0x109BD).addRange(0x109C0, 0x109CF).addRange(0x109D2, 0x109FF).addRange(0x10A40, 0x10A48).addRange(0x10A7D, 0x10A7E).addRange(0x10A9D, 0x10A9F).addRange(0x10AEB, 0x10AEF).addRange(0x10B58, 0x10B5F).addRange(0x10B78, 0x10B7F).addRange(0x10BA9, 0x10BAF).addRange(0x10CFA, 0x10CFF).addRange(0x10E60, 0x10E7E).addRange(0x10F1D, 0x10F26).addRange(0x10F51, 0x10F54).addRange(0x10FC5, 0x10FCB).addRange(0x11052, 0x11065).addRange(0x111E1, 0x111F4);\n\tset.addRange(0x1173A, 0x1173B).addRange(0x118EA, 0x118F2).addRange(0x11C5A, 0x11C6C).addRange(0x11FC0, 0x11FD4).addRange(0x16B5B, 0x16B61).addRange(0x16E80, 0x16E96).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D360, 0x1D378).addRange(0x1E8C7, 0x1E8CF).addRange(0x1EC71, 0x1ECAB).addRange(0x1ECAD, 0x1ECAF).addRange(0x1ECB1, 0x1ECB4).addRange(0x1ED01, 0x1ED2D).addRange(0x1ED2F, 0x1ED3D).addRange(0x1F100, 0x1F10C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x2A, 0x2C, 0x5C, 0xA1, 0xA7, 0xBF, 0x37E, 0x387, 0x589, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x166E, 0x1CD3, 0x2053, 0x2D70, 0x2E0B, 0x2E1B, 0x2E41, 0x303D, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE19, 0xFE30, 0xFE68, 0xFF0A, 0xFF0C, 0xFF3C, 0xFF61, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\n\tset.addRange(0x21, 0x23).addRange(0x25, 0x27).addRange(0x2E, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x1805).addRange(0x1807, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2016, 0x2017).addRange(0x2020, 0x2027).addRange(0x2030, 0x2038).addRange(0x203B, 0x203E).addRange(0x2041, 0x2043).addRange(0x2047, 0x2051).addRange(0x2055, 0x205E).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E01).addRange(0x2E06, 0x2E08).addRange(0x2E0E, 0x2E16).addRange(0x2E18, 0x2E19);\n\tset.addRange(0x2E1E, 0x2E1F).addRange(0x2E2A, 0x2E2E).addRange(0x2E30, 0x2E39).addRange(0x2E3C, 0x2E3F).addRange(0x2E43, 0x2E4F).addRange(0x2E52, 0x2E54).addRange(0x3001, 0x3003).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFE10, 0xFE16).addRange(0xFE45, 0xFE46).addRange(0xFE49, 0xFE4C).addRange(0xFE50, 0xFE52).addRange(0xFE54, 0xFE57).addRange(0xFE5F, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF07).addRange(0xFF0E, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF64, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D).addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643);\n\tset.addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other_Symbol.js\", function (module, exports) {\n\t const set = regenerate(0xA6, 0xA9, 0xAE, 0xB0, 0x482, 0x6DE, 0x6E9, 0x7F6, 0x9FA, 0xB70, 0xBFA, 0xC7F, 0xD4F, 0xD79, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x1940, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214A, 0x214F, 0x21D3, 0x3004, 0x3020, 0x3250, 0xA839, 0xFDCF, 0xFFE4, 0xFFE8, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1E14F, 0x1ECAC, 0x1ED2E, 0x1F7F0);\n\tset.addRange(0x58D, 0x58E).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0xBF3, 0xBF8).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2117).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x214C, 0x214D).addRange(0x218A, 0x218B).addRange(0x2195, 0x2199).addRange(0x219C, 0x219F).addRange(0x21A1, 0x21A2).addRange(0x21A4, 0x21A5).addRange(0x21A7, 0x21AD).addRange(0x21AF, 0x21CD).addRange(0x21D0, 0x21D1).addRange(0x21D5, 0x21F3).addRange(0x2300, 0x2307).addRange(0x230C, 0x231F).addRange(0x2322, 0x2328).addRange(0x232B, 0x237B).addRange(0x237D, 0x239A).addRange(0x23B4, 0x23DB).addRange(0x23E2, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9).addRange(0x2500, 0x25B6).addRange(0x25B8, 0x25C0).addRange(0x25C2, 0x25F7).addRange(0x2600, 0x266E).addRange(0x2670, 0x2767).addRange(0x2794, 0x27BF).addRange(0x2800, 0x28FF).addRange(0x2B00, 0x2B2F).addRange(0x2B45, 0x2B46).addRange(0x2B4D, 0x2B73);\n\tset.addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA837).addRange(0xAA77, 0xAA79).addRange(0xFD40, 0xFD4F).addRange(0xFDFD, 0xFDFF).addRange(0xFFED, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FDC).addRange(0x11FE1, 0x11FF1).addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83);\n\tset.addRange(0x1DA85, 0x1DA86).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F3FA).addRange(0x1F400, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Other.js\", function (module, exports) {\n\t const set = regenerate(0xAD, 0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x61C, 0x6DD, 0x83F, 0x85F, 0x8E2, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x180E, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x110BD, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x1246F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FB93);\n\tset.addRange(0x0, 0x1F).addRange(0x7F, 0x9F).addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x605).addRange(0x70E, 0x70F).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x88F, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D);\n\tset.addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7).addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF3, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xECE, 0xECF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF);\n\tset.addRange(0x169D, 0x169F).addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E).addRange(0x1737, 0x173F).addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x200B, 0x200F).addRange(0x202A, 0x202E).addRange(0x2060, 0x206F).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F);\n\tset.addRange(0x244B, 0x245F).addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E).addRange(0x2D71, 0x2D7E).addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x2FFC, 0x2FFF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EF).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xF8FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF);\n\tset.addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F).addRange(0xFEFD, 0xFF00).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1).addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF).addRange(0xFFEF, 0xFFFB).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E);\n\tset.addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F).addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38).addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77).addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFF).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x1123F, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F);\n\tset.addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F).addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C).addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF).addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x1342F, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E).addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF);\n\tset.addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF).addRange(0x1B123, 0x1B14F).addRange(0x1B153, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA0, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D173, 0x1D17A).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00).addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26);\n\tset.addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF).addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DC).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D9, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA75, 0x1FA77).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA87, 0x1FA8F).addRange(0x1FAAD, 0x1FAAF).addRange(0x1FABB, 0x1FABF).addRange(0x1FAC6, 0x1FACF).addRange(0x1FADA, 0x1FADF).addRange(0x1FAE8, 0x1FAEF).addRange(0x1FAF7, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B739, 0x2B73F).addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0xE00FF).addRange(0xE01F0, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Paragraph_Separator.js\", function (module, exports) {\n\t const set = regenerate(0x2029);\n\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Private_Use.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xE000, 0xF8FF).addRange(0xF0000, 0xFFFFD).addRange(0x100000, 0x10FFFD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Punctuation.js\", function (module, exports) {\n\t const set = regenerate(0x5F, 0x7B, 0x7D, 0xA1, 0xA7, 0xAB, 0xBB, 0xBF, 0x37E, 0x387, 0x5BE, 0x5C0, 0x5C3, 0x5C6, 0x61B, 0x6D4, 0x85E, 0x970, 0x9FD, 0xA76, 0xAF0, 0xC77, 0xC84, 0xDF4, 0xE4F, 0xF14, 0xF85, 0x10FB, 0x1400, 0x166E, 0x1CD3, 0x2D70, 0x3030, 0x303D, 0x30A0, 0x30FB, 0xA673, 0xA67E, 0xA8FC, 0xA95F, 0xABEB, 0xFE63, 0xFE68, 0xFF3F, 0xFF5B, 0xFF5D, 0x1039F, 0x103D0, 0x1056F, 0x10857, 0x1091F, 0x1093F, 0x10A7F, 0x10EAD, 0x111CD, 0x111DB, 0x112A9, 0x1145D, 0x114C6, 0x116B9, 0x1183B, 0x119E2, 0x11FFF, 0x16AF5, 0x16B44, 0x16FE2, 0x1BC9F);\n\tset.addRange(0x21, 0x23).addRange(0x25, 0x2A).addRange(0x2C, 0x2F).addRange(0x3A, 0x3B).addRange(0x3F, 0x40).addRange(0x5B, 0x5D).addRange(0xB6, 0xB7).addRange(0x55A, 0x55F).addRange(0x589, 0x58A).addRange(0x5F3, 0x5F4).addRange(0x609, 0x60A).addRange(0x60C, 0x60D).addRange(0x61D, 0x61F).addRange(0x66A, 0x66D).addRange(0x700, 0x70D).addRange(0x7F7, 0x7F9).addRange(0x830, 0x83E).addRange(0x964, 0x965).addRange(0xE5A, 0xE5B).addRange(0xF04, 0xF12).addRange(0xF3A, 0xF3D).addRange(0xFD0, 0xFD4).addRange(0xFD9, 0xFDA).addRange(0x104A, 0x104F).addRange(0x1360, 0x1368).addRange(0x169B, 0x169C).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x17D4, 0x17D6).addRange(0x17D8, 0x17DA).addRange(0x1800, 0x180A).addRange(0x1944, 0x1945).addRange(0x1A1E, 0x1A1F).addRange(0x1AA0, 0x1AA6).addRange(0x1AA8, 0x1AAD).addRange(0x1B5A, 0x1B60).addRange(0x1B7D, 0x1B7E).addRange(0x1BFC, 0x1BFF).addRange(0x1C3B, 0x1C3F).addRange(0x1C7E, 0x1C7F).addRange(0x1CC0, 0x1CC7).addRange(0x2010, 0x2027).addRange(0x2030, 0x2043).addRange(0x2045, 0x2051).addRange(0x2053, 0x205E).addRange(0x207D, 0x207E).addRange(0x208D, 0x208E).addRange(0x2308, 0x230B).addRange(0x2329, 0x232A).addRange(0x2768, 0x2775).addRange(0x27C5, 0x27C6);\n\tset.addRange(0x27E6, 0x27EF).addRange(0x2983, 0x2998).addRange(0x29D8, 0x29DB).addRange(0x29FC, 0x29FD).addRange(0x2CF9, 0x2CFC).addRange(0x2CFE, 0x2CFF).addRange(0x2E00, 0x2E2E).addRange(0x2E30, 0x2E4F).addRange(0x2E52, 0x2E5D).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3014, 0x301F).addRange(0xA4FE, 0xA4FF).addRange(0xA60D, 0xA60F).addRange(0xA6F2, 0xA6F7).addRange(0xA874, 0xA877).addRange(0xA8CE, 0xA8CF).addRange(0xA8F8, 0xA8FA).addRange(0xA92E, 0xA92F).addRange(0xA9C1, 0xA9CD).addRange(0xA9DE, 0xA9DF).addRange(0xAA5C, 0xAA5F).addRange(0xAADE, 0xAADF).addRange(0xAAF0, 0xAAF1).addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE61).addRange(0xFE6A, 0xFE6B).addRange(0xFF01, 0xFF03).addRange(0xFF05, 0xFF0A).addRange(0xFF0C, 0xFF0F).addRange(0xFF1A, 0xFF1B).addRange(0xFF1F, 0xFF20).addRange(0xFF3B, 0xFF3D).addRange(0xFF5F, 0xFF65).addRange(0x10100, 0x10102).addRange(0x10A50, 0x10A58).addRange(0x10AF0, 0x10AF6).addRange(0x10B39, 0x10B3F).addRange(0x10B99, 0x10B9C).addRange(0x10F55, 0x10F59).addRange(0x10F86, 0x10F89).addRange(0x11047, 0x1104D).addRange(0x110BB, 0x110BC).addRange(0x110BE, 0x110C1).addRange(0x11140, 0x11143).addRange(0x11174, 0x11175).addRange(0x111C5, 0x111C8).addRange(0x111DD, 0x111DF).addRange(0x11238, 0x1123D);\n\tset.addRange(0x1144B, 0x1144F).addRange(0x1145A, 0x1145B).addRange(0x115C1, 0x115D7).addRange(0x11641, 0x11643).addRange(0x11660, 0x1166C).addRange(0x1173C, 0x1173E).addRange(0x11944, 0x11946).addRange(0x11A3F, 0x11A46).addRange(0x11A9A, 0x11A9C).addRange(0x11A9E, 0x11AA2).addRange(0x11C41, 0x11C45).addRange(0x11C70, 0x11C71).addRange(0x11EF7, 0x11EF8).addRange(0x12470, 0x12474).addRange(0x12FF1, 0x12FF2).addRange(0x16A6E, 0x16A6F).addRange(0x16B37, 0x16B3B).addRange(0x16E97, 0x16E9A).addRange(0x1DA87, 0x1DA8B).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Separator.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\n\tset.addRange(0x2000, 0x200A).addRange(0x2028, 0x2029);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Space_Separator.js\", function (module, exports) {\n\t const set = regenerate(0x20, 0xA0, 0x1680, 0x202F, 0x205F, 0x3000);\n\tset.addRange(0x2000, 0x200A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Spacing_Mark.js\", function (module, exports) {\n\t const set = regenerate(0x903, 0x93B, 0x9D7, 0xA03, 0xA83, 0xAC9, 0xB3E, 0xB40, 0xB57, 0xBD7, 0xCBE, 0xD57, 0xF7F, 0x1031, 0x1038, 0x108F, 0x1715, 0x1734, 0x17B6, 0x1A55, 0x1A57, 0x1A61, 0x1B04, 0x1B35, 0x1B3B, 0x1B82, 0x1BA1, 0x1BAA, 0x1BE7, 0x1BEE, 0x1CE1, 0x1CF7, 0xA827, 0xA983, 0xAA4D, 0xAA7B, 0xAA7D, 0xAAEB, 0xAAF5, 0xABEC, 0x11000, 0x11002, 0x11082, 0x1112C, 0x11182, 0x111CE, 0x11235, 0x11357, 0x11445, 0x114B9, 0x114C1, 0x115BE, 0x1163E, 0x116AC, 0x116B6, 0x11726, 0x11838, 0x1193D, 0x11940, 0x11942, 0x119E4, 0x11A39, 0x11A97, 0x11C2F, 0x11C3E, 0x11CA9, 0x11CB1, 0x11CB4, 0x11D96);\n\tset.addRange(0x93E, 0x940).addRange(0x949, 0x94C).addRange(0x94E, 0x94F).addRange(0x982, 0x983).addRange(0x9BE, 0x9C0).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CC).addRange(0xA3E, 0xA40).addRange(0xABE, 0xAC0).addRange(0xACB, 0xACC).addRange(0xB02, 0xB03).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4C).addRange(0xBBE, 0xBBF).addRange(0xBC1, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCC).addRange(0xC01, 0xC03).addRange(0xC41, 0xC44).addRange(0xC82, 0xC83).addRange(0xCC0, 0xCC4).addRange(0xCC7, 0xCC8).addRange(0xCCA, 0xCCB).addRange(0xCD5, 0xCD6).addRange(0xD02, 0xD03).addRange(0xD3E, 0xD40).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4C).addRange(0xD82, 0xD83).addRange(0xDCF, 0xDD1).addRange(0xDD8, 0xDDF).addRange(0xDF2, 0xDF3).addRange(0xF3E, 0xF3F).addRange(0x102B, 0x102C).addRange(0x103B, 0x103C).addRange(0x1056, 0x1057).addRange(0x1062, 0x1064).addRange(0x1067, 0x106D).addRange(0x1083, 0x1084).addRange(0x1087, 0x108C).addRange(0x109A, 0x109C).addRange(0x17BE, 0x17C5).addRange(0x17C7, 0x17C8).addRange(0x1923, 0x1926).addRange(0x1929, 0x192B).addRange(0x1930, 0x1931).addRange(0x1933, 0x1938).addRange(0x1A19, 0x1A1A).addRange(0x1A63, 0x1A64).addRange(0x1A6D, 0x1A72).addRange(0x1B3D, 0x1B41);\n\tset.addRange(0x1B43, 0x1B44).addRange(0x1BA6, 0x1BA7).addRange(0x1BEA, 0x1BEC).addRange(0x1BF2, 0x1BF3).addRange(0x1C24, 0x1C2B).addRange(0x1C34, 0x1C35).addRange(0x302E, 0x302F).addRange(0xA823, 0xA824).addRange(0xA880, 0xA881).addRange(0xA8B4, 0xA8C3).addRange(0xA952, 0xA953).addRange(0xA9B4, 0xA9B5).addRange(0xA9BA, 0xA9BB).addRange(0xA9BE, 0xA9C0).addRange(0xAA2F, 0xAA30).addRange(0xAA33, 0xAA34).addRange(0xAAEE, 0xAAEF).addRange(0xABE3, 0xABE4).addRange(0xABE6, 0xABE7).addRange(0xABE9, 0xABEA).addRange(0x110B0, 0x110B2).addRange(0x110B7, 0x110B8).addRange(0x11145, 0x11146).addRange(0x111B3, 0x111B5).addRange(0x111BF, 0x111C0).addRange(0x1122C, 0x1122E).addRange(0x11232, 0x11233).addRange(0x112E0, 0x112E2).addRange(0x11302, 0x11303).addRange(0x1133E, 0x1133F).addRange(0x11341, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x11362, 0x11363).addRange(0x11435, 0x11437).addRange(0x11440, 0x11441).addRange(0x114B0, 0x114B2).addRange(0x114BB, 0x114BE).addRange(0x115AF, 0x115B1).addRange(0x115B8, 0x115BB).addRange(0x11630, 0x11632).addRange(0x1163B, 0x1163C).addRange(0x116AE, 0x116AF).addRange(0x11720, 0x11721).addRange(0x1182C, 0x1182E).addRange(0x11930, 0x11935).addRange(0x11937, 0x11938).addRange(0x119D1, 0x119D3).addRange(0x119DC, 0x119DF).addRange(0x11A57, 0x11A58).addRange(0x11D8A, 0x11D8E);\n\tset.addRange(0x11D93, 0x11D94).addRange(0x11EF5, 0x11EF6).addRange(0x16F51, 0x16F87).addRange(0x16FF0, 0x16FF1).addRange(0x1D165, 0x1D166).addRange(0x1D16D, 0x1D172);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Surrogate.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xD800, 0xDFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Symbol.js\", function (module, exports) {\n\t const set = regenerate(0x24, 0x2B, 0x5E, 0x60, 0x7C, 0x7E, 0xAC, 0xB4, 0xB8, 0xD7, 0xF7, 0x2ED, 0x375, 0x3F6, 0x482, 0x60B, 0x6DE, 0x6E9, 0x7F6, 0x888, 0xAF1, 0xB70, 0xC7F, 0xD4F, 0xD79, 0xE3F, 0xF13, 0xF34, 0xF36, 0xF38, 0x166D, 0x17DB, 0x1940, 0x1FBD, 0x2044, 0x2052, 0x2114, 0x2125, 0x2127, 0x2129, 0x212E, 0x214F, 0x3004, 0x3020, 0x3250, 0xAB5B, 0xFB29, 0xFDCF, 0xFE62, 0xFE69, 0xFF04, 0xFF0B, 0xFF3E, 0xFF40, 0xFF5C, 0xFF5E, 0x101A0, 0x10AC8, 0x1173F, 0x16B45, 0x1BC9C, 0x1D245, 0x1D6C1, 0x1D6DB, 0x1D6FB, 0x1D715, 0x1D735, 0x1D74F, 0x1D76F, 0x1D789, 0x1D7A9, 0x1D7C3, 0x1E14F, 0x1E2FF, 0x1ECAC, 0x1ECB0, 0x1ED2E, 0x1F7F0);\n\tset.addRange(0x3C, 0x3E).addRange(0xA2, 0xA6).addRange(0xA8, 0xA9).addRange(0xAE, 0xB1).addRange(0x2C2, 0x2C5).addRange(0x2D2, 0x2DF).addRange(0x2E5, 0x2EB).addRange(0x2EF, 0x2FF).addRange(0x384, 0x385).addRange(0x58D, 0x58F).addRange(0x606, 0x608).addRange(0x60E, 0x60F).addRange(0x6FD, 0x6FE).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x9FA, 0x9FB).addRange(0xBF3, 0xBFA).addRange(0xF01, 0xF03).addRange(0xF15, 0xF17).addRange(0xF1A, 0xF1F).addRange(0xFBE, 0xFC5).addRange(0xFC7, 0xFCC).addRange(0xFCE, 0xFCF).addRange(0xFD5, 0xFD8).addRange(0x109E, 0x109F).addRange(0x1390, 0x1399).addRange(0x19DE, 0x19FF).addRange(0x1B61, 0x1B6A).addRange(0x1B74, 0x1B7C).addRange(0x1FBF, 0x1FC1).addRange(0x1FCD, 0x1FCF).addRange(0x1FDD, 0x1FDF).addRange(0x1FED, 0x1FEF).addRange(0x1FFD, 0x1FFE).addRange(0x207A, 0x207C).addRange(0x208A, 0x208C).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2101).addRange(0x2103, 0x2106).addRange(0x2108, 0x2109).addRange(0x2116, 0x2118).addRange(0x211E, 0x2123).addRange(0x213A, 0x213B).addRange(0x2140, 0x2144).addRange(0x214A, 0x214D).addRange(0x218A, 0x218B).addRange(0x2190, 0x2307).addRange(0x230C, 0x2328).addRange(0x232B, 0x2426).addRange(0x2440, 0x244A).addRange(0x249C, 0x24E9);\n\tset.addRange(0x2500, 0x2767).addRange(0x2794, 0x27C4).addRange(0x27C7, 0x27E5).addRange(0x27F0, 0x2982).addRange(0x2999, 0x29D7).addRange(0x29DC, 0x29FB).addRange(0x29FE, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2CE5, 0x2CEA).addRange(0x2E50, 0x2E51).addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x2FF0, 0x2FFB).addRange(0x3012, 0x3013).addRange(0x3036, 0x3037).addRange(0x303E, 0x303F).addRange(0x309B, 0x309C).addRange(0x3190, 0x3191).addRange(0x3196, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3200, 0x321E).addRange(0x322A, 0x3247).addRange(0x3260, 0x327F).addRange(0x328A, 0x32B0).addRange(0x32C0, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA490, 0xA4C6).addRange(0xA700, 0xA716).addRange(0xA720, 0xA721).addRange(0xA789, 0xA78A).addRange(0xA828, 0xA82B).addRange(0xA836, 0xA839).addRange(0xAA77, 0xAA79).addRange(0xAB6A, 0xAB6B).addRange(0xFBB2, 0xFBC2).addRange(0xFD40, 0xFD4F).addRange(0xFDFC, 0xFDFF).addRange(0xFE64, 0xFE66).addRange(0xFF1C, 0xFF1E).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFFC, 0xFFFD).addRange(0x10137, 0x1013F).addRange(0x10179, 0x10189).addRange(0x1018C, 0x1018E).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x10877, 0x10878).addRange(0x11FD5, 0x11FF1);\n\tset.addRange(0x16B3C, 0x16B3F).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D164).addRange(0x1D16A, 0x1D16C).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D200, 0x1D241).addRange(0x1D300, 0x1D356).addRange(0x1D800, 0x1D9FF).addRange(0x1DA37, 0x1DA3A).addRange(0x1DA6D, 0x1DA74).addRange(0x1DA76, 0x1DA83).addRange(0x1DA85, 0x1DA86).addRange(0x1EEF0, 0x1EEF1).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F10D, 0x1F1AD).addRange(0x1F1E6, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7);\n\tset.addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Titlecase_Letter.js\", function (module, exports) {\n\t const set = regenerate(0x1C5, 0x1C8, 0x1CB, 0x1F2, 0x1FBC, 0x1FCC, 0x1FFC);\n\tset.addRange(0x1F88, 0x1F8F).addRange(0x1F98, 0x1F9F).addRange(0x1FA8, 0x1FAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Unassigned.js\", function (module, exports) {\n\t const set = regenerate(0x38B, 0x38D, 0x3A2, 0x530, 0x590, 0x70E, 0x83F, 0x85F, 0x88F, 0x984, 0x9A9, 0x9B1, 0x9DE, 0xA04, 0xA29, 0xA31, 0xA34, 0xA37, 0xA3D, 0xA5D, 0xA84, 0xA8E, 0xA92, 0xAA9, 0xAB1, 0xAB4, 0xAC6, 0xACA, 0xB00, 0xB04, 0xB29, 0xB31, 0xB34, 0xB5E, 0xB84, 0xB91, 0xB9B, 0xB9D, 0xBC9, 0xC0D, 0xC11, 0xC29, 0xC45, 0xC49, 0xC57, 0xC8D, 0xC91, 0xCA9, 0xCB4, 0xCC5, 0xCC9, 0xCDF, 0xCF0, 0xD0D, 0xD11, 0xD45, 0xD49, 0xD80, 0xD84, 0xDB2, 0xDBC, 0xDD5, 0xDD7, 0xE83, 0xE85, 0xE8B, 0xEA4, 0xEA6, 0xEC5, 0xEC7, 0xF48, 0xF98, 0xFBD, 0xFCD, 0x10C6, 0x1249, 0x1257, 0x1259, 0x1289, 0x12B1, 0x12BF, 0x12C1, 0x12D7, 0x1311, 0x176D, 0x1771, 0x191F, 0x1A5F, 0x1B7F, 0x1F58, 0x1F5A, 0x1F5C, 0x1F5E, 0x1FB5, 0x1FC5, 0x1FDC, 0x1FF5, 0x1FFF, 0x2065, 0x208F, 0x2B96, 0x2D26, 0x2DA7, 0x2DAF, 0x2DB7, 0x2DBF, 0x2DC7, 0x2DCF, 0x2DD7, 0x2DDF, 0x2E9A, 0x3040, 0x3130, 0x318F, 0x321F, 0xA7D2, 0xA7D4, 0xA9CE, 0xA9FF, 0xAB27, 0xAB2F, 0xFB37, 0xFB3D, 0xFB3F, 0xFB42, 0xFB45, 0xFE53, 0xFE67, 0xFE75, 0xFF00, 0xFFE7, 0x1000C, 0x10027, 0x1003B, 0x1003E, 0x1018F, 0x1039E, 0x1057B, 0x1058B, 0x10593, 0x10596, 0x105A2, 0x105B2, 0x105BA, 0x10786, 0x107B1, 0x10809, 0x10836, 0x10856, 0x108F3, 0x10A04, 0x10A14, 0x10A18, 0x10E7F, 0x10EAA, 0x11135, 0x111E0, 0x11212, 0x11287, 0x11289, 0x1128E, 0x1129E, 0x11304, 0x11329, 0x11331, 0x11334, 0x1133A, 0x1145C, 0x11914, 0x11917, 0x11936, 0x11C09, 0x11C37, 0x11CA8, 0x11D07, 0x11D0A, 0x11D3B, 0x11D3E, 0x11D66, 0x11D69, 0x11D8F, 0x11D92, 0x1246F, 0x1342F, 0x16A5F, 0x16ABF, 0x16B5A, 0x16B62, 0x1AFF4, 0x1AFFC, 0x1AFFF, 0x1D455, 0x1D49D, 0x1D4AD, 0x1D4BA, 0x1D4BC, 0x1D4C4, 0x1D506, 0x1D515, 0x1D51D, 0x1D53A, 0x1D53F, 0x1D545, 0x1D551, 0x1DAA0, 0x1E007, 0x1E022, 0x1E025, 0x1E7E7, 0x1E7EC, 0x1E7EF, 0x1E7FF, 0x1EE04, 0x1EE20, 0x1EE23, 0x1EE28, 0x1EE33, 0x1EE38, 0x1EE3A, 0x1EE48, 0x1EE4A, 0x1EE4C, 0x1EE50, 0x1EE53, 0x1EE58, 0x1EE5A, 0x1EE5C, 0x1EE5E, 0x1EE60, 0x1EE63, 0x1EE6B, 0x1EE73, 0x1EE78, 0x1EE7D, 0x1EE7F, 0x1EE8A, 0x1EEA4, 0x1EEAA, 0x1F0C0, 0x1F0D0, 0x1FB93);\n\tset.addRange(0x378, 0x379).addRange(0x380, 0x383).addRange(0x557, 0x558).addRange(0x58B, 0x58C).addRange(0x5C8, 0x5CF).addRange(0x5EB, 0x5EE).addRange(0x5F5, 0x5FF).addRange(0x74B, 0x74C).addRange(0x7B2, 0x7BF).addRange(0x7FB, 0x7FC).addRange(0x82E, 0x82F).addRange(0x85C, 0x85D).addRange(0x86B, 0x86F).addRange(0x892, 0x897).addRange(0x98D, 0x98E).addRange(0x991, 0x992).addRange(0x9B3, 0x9B5).addRange(0x9BA, 0x9BB).addRange(0x9C5, 0x9C6).addRange(0x9C9, 0x9CA).addRange(0x9CF, 0x9D6).addRange(0x9D8, 0x9DB).addRange(0x9E4, 0x9E5).addRange(0x9FF, 0xA00).addRange(0xA0B, 0xA0E).addRange(0xA11, 0xA12).addRange(0xA3A, 0xA3B).addRange(0xA43, 0xA46).addRange(0xA49, 0xA4A).addRange(0xA4E, 0xA50).addRange(0xA52, 0xA58).addRange(0xA5F, 0xA65).addRange(0xA77, 0xA80).addRange(0xABA, 0xABB).addRange(0xACE, 0xACF).addRange(0xAD1, 0xADF).addRange(0xAE4, 0xAE5).addRange(0xAF2, 0xAF8).addRange(0xB0D, 0xB0E).addRange(0xB11, 0xB12).addRange(0xB3A, 0xB3B).addRange(0xB45, 0xB46).addRange(0xB49, 0xB4A).addRange(0xB4E, 0xB54).addRange(0xB58, 0xB5B).addRange(0xB64, 0xB65).addRange(0xB78, 0xB81).addRange(0xB8B, 0xB8D).addRange(0xB96, 0xB98).addRange(0xBA0, 0xBA2).addRange(0xBA5, 0xBA7);\n\tset.addRange(0xBAB, 0xBAD).addRange(0xBBA, 0xBBD).addRange(0xBC3, 0xBC5).addRange(0xBCE, 0xBCF).addRange(0xBD1, 0xBD6).addRange(0xBD8, 0xBE5).addRange(0xBFB, 0xBFF).addRange(0xC3A, 0xC3B).addRange(0xC4E, 0xC54).addRange(0xC5B, 0xC5C).addRange(0xC5E, 0xC5F).addRange(0xC64, 0xC65).addRange(0xC70, 0xC76).addRange(0xCBA, 0xCBB).addRange(0xCCE, 0xCD4).addRange(0xCD7, 0xCDC).addRange(0xCE4, 0xCE5).addRange(0xCF3, 0xCFF).addRange(0xD50, 0xD53).addRange(0xD64, 0xD65).addRange(0xD97, 0xD99).addRange(0xDBE, 0xDBF).addRange(0xDC7, 0xDC9).addRange(0xDCB, 0xDCE).addRange(0xDE0, 0xDE5).addRange(0xDF0, 0xDF1).addRange(0xDF5, 0xE00).addRange(0xE3B, 0xE3E).addRange(0xE5C, 0xE80).addRange(0xEBE, 0xEBF).addRange(0xECE, 0xECF).addRange(0xEDA, 0xEDB).addRange(0xEE0, 0xEFF).addRange(0xF6D, 0xF70).addRange(0xFDB, 0xFFF).addRange(0x10C8, 0x10CC).addRange(0x10CE, 0x10CF).addRange(0x124E, 0x124F).addRange(0x125E, 0x125F).addRange(0x128E, 0x128F).addRange(0x12B6, 0x12B7).addRange(0x12C6, 0x12C7).addRange(0x1316, 0x1317).addRange(0x135B, 0x135C).addRange(0x137D, 0x137F).addRange(0x139A, 0x139F).addRange(0x13F6, 0x13F7).addRange(0x13FE, 0x13FF).addRange(0x169D, 0x169F).addRange(0x16F9, 0x16FF).addRange(0x1716, 0x171E);\n\tset.addRange(0x1737, 0x173F).addRange(0x1754, 0x175F).addRange(0x1774, 0x177F).addRange(0x17DE, 0x17DF).addRange(0x17EA, 0x17EF).addRange(0x17FA, 0x17FF).addRange(0x181A, 0x181F).addRange(0x1879, 0x187F).addRange(0x18AB, 0x18AF).addRange(0x18F6, 0x18FF).addRange(0x192C, 0x192F).addRange(0x193C, 0x193F).addRange(0x1941, 0x1943).addRange(0x196E, 0x196F).addRange(0x1975, 0x197F).addRange(0x19AC, 0x19AF).addRange(0x19CA, 0x19CF).addRange(0x19DB, 0x19DD).addRange(0x1A1C, 0x1A1D).addRange(0x1A7D, 0x1A7E).addRange(0x1A8A, 0x1A8F).addRange(0x1A9A, 0x1A9F).addRange(0x1AAE, 0x1AAF).addRange(0x1ACF, 0x1AFF).addRange(0x1B4D, 0x1B4F).addRange(0x1BF4, 0x1BFB).addRange(0x1C38, 0x1C3A).addRange(0x1C4A, 0x1C4C).addRange(0x1C89, 0x1C8F).addRange(0x1CBB, 0x1CBC).addRange(0x1CC8, 0x1CCF).addRange(0x1CFB, 0x1CFF).addRange(0x1F16, 0x1F17).addRange(0x1F1E, 0x1F1F).addRange(0x1F46, 0x1F47).addRange(0x1F4E, 0x1F4F).addRange(0x1F7E, 0x1F7F).addRange(0x1FD4, 0x1FD5).addRange(0x1FF0, 0x1FF1).addRange(0x2072, 0x2073).addRange(0x209D, 0x209F).addRange(0x20C1, 0x20CF).addRange(0x20F1, 0x20FF).addRange(0x218C, 0x218F).addRange(0x2427, 0x243F).addRange(0x244B, 0x245F).addRange(0x2B74, 0x2B75).addRange(0x2CF4, 0x2CF8).addRange(0x2D28, 0x2D2C).addRange(0x2D2E, 0x2D2F).addRange(0x2D68, 0x2D6E);\n\tset.addRange(0x2D71, 0x2D7E).addRange(0x2D97, 0x2D9F).addRange(0x2E5E, 0x2E7F).addRange(0x2EF4, 0x2EFF).addRange(0x2FD6, 0x2FEF).addRange(0x2FFC, 0x2FFF).addRange(0x3097, 0x3098).addRange(0x3100, 0x3104).addRange(0x31E4, 0x31EF).addRange(0xA48D, 0xA48F).addRange(0xA4C7, 0xA4CF).addRange(0xA62C, 0xA63F).addRange(0xA6F8, 0xA6FF).addRange(0xA7CB, 0xA7CF).addRange(0xA7DA, 0xA7F1).addRange(0xA82D, 0xA82F).addRange(0xA83A, 0xA83F).addRange(0xA878, 0xA87F).addRange(0xA8C6, 0xA8CD).addRange(0xA8DA, 0xA8DF).addRange(0xA954, 0xA95E).addRange(0xA97D, 0xA97F).addRange(0xA9DA, 0xA9DD).addRange(0xAA37, 0xAA3F).addRange(0xAA4E, 0xAA4F).addRange(0xAA5A, 0xAA5B).addRange(0xAAC3, 0xAADA).addRange(0xAAF7, 0xAB00).addRange(0xAB07, 0xAB08).addRange(0xAB0F, 0xAB10).addRange(0xAB17, 0xAB1F).addRange(0xAB6C, 0xAB6F).addRange(0xABEE, 0xABEF).addRange(0xABFA, 0xABFF).addRange(0xD7A4, 0xD7AF).addRange(0xD7C7, 0xD7CA).addRange(0xD7FC, 0xD7FF).addRange(0xFA6E, 0xFA6F).addRange(0xFADA, 0xFAFF).addRange(0xFB07, 0xFB12).addRange(0xFB18, 0xFB1C).addRange(0xFBC3, 0xFBD2).addRange(0xFD90, 0xFD91).addRange(0xFDC8, 0xFDCE).addRange(0xFDD0, 0xFDEF).addRange(0xFE1A, 0xFE1F).addRange(0xFE6C, 0xFE6F).addRange(0xFEFD, 0xFEFE).addRange(0xFFBF, 0xFFC1).addRange(0xFFC8, 0xFFC9).addRange(0xFFD0, 0xFFD1);\n\tset.addRange(0xFFD8, 0xFFD9).addRange(0xFFDD, 0xFFDF).addRange(0xFFEF, 0xFFF8).addRange(0xFFFE, 0xFFFF).addRange(0x1004E, 0x1004F).addRange(0x1005E, 0x1007F).addRange(0x100FB, 0x100FF).addRange(0x10103, 0x10106).addRange(0x10134, 0x10136).addRange(0x1019D, 0x1019F).addRange(0x101A1, 0x101CF).addRange(0x101FE, 0x1027F).addRange(0x1029D, 0x1029F).addRange(0x102D1, 0x102DF).addRange(0x102FC, 0x102FF).addRange(0x10324, 0x1032C).addRange(0x1034B, 0x1034F).addRange(0x1037B, 0x1037F).addRange(0x103C4, 0x103C7).addRange(0x103D6, 0x103FF).addRange(0x1049E, 0x1049F).addRange(0x104AA, 0x104AF).addRange(0x104D4, 0x104D7).addRange(0x104FC, 0x104FF).addRange(0x10528, 0x1052F).addRange(0x10564, 0x1056E).addRange(0x105BD, 0x105FF).addRange(0x10737, 0x1073F).addRange(0x10756, 0x1075F).addRange(0x10768, 0x1077F).addRange(0x107BB, 0x107FF).addRange(0x10806, 0x10807).addRange(0x10839, 0x1083B).addRange(0x1083D, 0x1083E).addRange(0x1089F, 0x108A6).addRange(0x108B0, 0x108DF).addRange(0x108F6, 0x108FA).addRange(0x1091C, 0x1091E).addRange(0x1093A, 0x1093E).addRange(0x10940, 0x1097F).addRange(0x109B8, 0x109BB).addRange(0x109D0, 0x109D1).addRange(0x10A07, 0x10A0B).addRange(0x10A36, 0x10A37).addRange(0x10A3B, 0x10A3E).addRange(0x10A49, 0x10A4F).addRange(0x10A59, 0x10A5F).addRange(0x10AA0, 0x10ABF).addRange(0x10AE7, 0x10AEA).addRange(0x10AF7, 0x10AFF).addRange(0x10B36, 0x10B38);\n\tset.addRange(0x10B56, 0x10B57).addRange(0x10B73, 0x10B77).addRange(0x10B92, 0x10B98).addRange(0x10B9D, 0x10BA8).addRange(0x10BB0, 0x10BFF).addRange(0x10C49, 0x10C7F).addRange(0x10CB3, 0x10CBF).addRange(0x10CF3, 0x10CF9).addRange(0x10D28, 0x10D2F).addRange(0x10D3A, 0x10E5F).addRange(0x10EAE, 0x10EAF).addRange(0x10EB2, 0x10EFF).addRange(0x10F28, 0x10F2F).addRange(0x10F5A, 0x10F6F).addRange(0x10F8A, 0x10FAF).addRange(0x10FCC, 0x10FDF).addRange(0x10FF7, 0x10FFF).addRange(0x1104E, 0x11051).addRange(0x11076, 0x1107E).addRange(0x110C3, 0x110CC).addRange(0x110CE, 0x110CF).addRange(0x110E9, 0x110EF).addRange(0x110FA, 0x110FF).addRange(0x11148, 0x1114F).addRange(0x11177, 0x1117F).addRange(0x111F5, 0x111FF).addRange(0x1123F, 0x1127F).addRange(0x112AA, 0x112AF).addRange(0x112EB, 0x112EF).addRange(0x112FA, 0x112FF).addRange(0x1130D, 0x1130E).addRange(0x11311, 0x11312).addRange(0x11345, 0x11346).addRange(0x11349, 0x1134A).addRange(0x1134E, 0x1134F).addRange(0x11351, 0x11356).addRange(0x11358, 0x1135C).addRange(0x11364, 0x11365).addRange(0x1136D, 0x1136F).addRange(0x11375, 0x113FF).addRange(0x11462, 0x1147F).addRange(0x114C8, 0x114CF).addRange(0x114DA, 0x1157F).addRange(0x115B6, 0x115B7).addRange(0x115DE, 0x115FF).addRange(0x11645, 0x1164F).addRange(0x1165A, 0x1165F).addRange(0x1166D, 0x1167F).addRange(0x116BA, 0x116BF).addRange(0x116CA, 0x116FF).addRange(0x1171B, 0x1171C);\n\tset.addRange(0x1172C, 0x1172F).addRange(0x11747, 0x117FF).addRange(0x1183C, 0x1189F).addRange(0x118F3, 0x118FE).addRange(0x11907, 0x11908).addRange(0x1190A, 0x1190B).addRange(0x11939, 0x1193A).addRange(0x11947, 0x1194F).addRange(0x1195A, 0x1199F).addRange(0x119A8, 0x119A9).addRange(0x119D8, 0x119D9).addRange(0x119E5, 0x119FF).addRange(0x11A48, 0x11A4F).addRange(0x11AA3, 0x11AAF).addRange(0x11AF9, 0x11BFF).addRange(0x11C46, 0x11C4F).addRange(0x11C6D, 0x11C6F).addRange(0x11C90, 0x11C91).addRange(0x11CB7, 0x11CFF).addRange(0x11D37, 0x11D39).addRange(0x11D48, 0x11D4F).addRange(0x11D5A, 0x11D5F).addRange(0x11D99, 0x11D9F).addRange(0x11DAA, 0x11EDF).addRange(0x11EF9, 0x11FAF).addRange(0x11FB1, 0x11FBF).addRange(0x11FF2, 0x11FFE).addRange(0x1239A, 0x123FF).addRange(0x12475, 0x1247F).addRange(0x12544, 0x12F8F).addRange(0x12FF3, 0x12FFF).addRange(0x13439, 0x143FF).addRange(0x14647, 0x167FF).addRange(0x16A39, 0x16A3F).addRange(0x16A6A, 0x16A6D).addRange(0x16ACA, 0x16ACF).addRange(0x16AEE, 0x16AEF).addRange(0x16AF6, 0x16AFF).addRange(0x16B46, 0x16B4F).addRange(0x16B78, 0x16B7C).addRange(0x16B90, 0x16E3F).addRange(0x16E9B, 0x16EFF).addRange(0x16F4B, 0x16F4E).addRange(0x16F88, 0x16F8E).addRange(0x16FA0, 0x16FDF).addRange(0x16FE5, 0x16FEF).addRange(0x16FF2, 0x16FFF).addRange(0x187F8, 0x187FF).addRange(0x18CD6, 0x18CFF).addRange(0x18D09, 0x1AFEF).addRange(0x1B123, 0x1B14F);\n\tset.addRange(0x1B153, 0x1B163).addRange(0x1B168, 0x1B16F).addRange(0x1B2FC, 0x1BBFF).addRange(0x1BC6B, 0x1BC6F).addRange(0x1BC7D, 0x1BC7F).addRange(0x1BC89, 0x1BC8F).addRange(0x1BC9A, 0x1BC9B).addRange(0x1BCA4, 0x1CEFF).addRange(0x1CF2E, 0x1CF2F).addRange(0x1CF47, 0x1CF4F).addRange(0x1CFC4, 0x1CFFF).addRange(0x1D0F6, 0x1D0FF).addRange(0x1D127, 0x1D128).addRange(0x1D1EB, 0x1D1FF).addRange(0x1D246, 0x1D2DF).addRange(0x1D2F4, 0x1D2FF).addRange(0x1D357, 0x1D35F).addRange(0x1D379, 0x1D3FF).addRange(0x1D4A0, 0x1D4A1).addRange(0x1D4A3, 0x1D4A4).addRange(0x1D4A7, 0x1D4A8).addRange(0x1D50B, 0x1D50C).addRange(0x1D547, 0x1D549).addRange(0x1D6A6, 0x1D6A7).addRange(0x1D7CC, 0x1D7CD).addRange(0x1DA8C, 0x1DA9A).addRange(0x1DAB0, 0x1DEFF).addRange(0x1DF1F, 0x1DFFF).addRange(0x1E019, 0x1E01A).addRange(0x1E02B, 0x1E0FF).addRange(0x1E12D, 0x1E12F).addRange(0x1E13E, 0x1E13F).addRange(0x1E14A, 0x1E14D).addRange(0x1E150, 0x1E28F).addRange(0x1E2AF, 0x1E2BF).addRange(0x1E2FA, 0x1E2FE).addRange(0x1E300, 0x1E7DF).addRange(0x1E8C5, 0x1E8C6).addRange(0x1E8D7, 0x1E8FF).addRange(0x1E94C, 0x1E94F).addRange(0x1E95A, 0x1E95D).addRange(0x1E960, 0x1EC70).addRange(0x1ECB5, 0x1ED00).addRange(0x1ED3E, 0x1EDFF).addRange(0x1EE25, 0x1EE26).addRange(0x1EE3C, 0x1EE41).addRange(0x1EE43, 0x1EE46).addRange(0x1EE55, 0x1EE56).addRange(0x1EE65, 0x1EE66).addRange(0x1EE9C, 0x1EEA0).addRange(0x1EEBC, 0x1EEEF);\n\tset.addRange(0x1EEF2, 0x1EFFF).addRange(0x1F02C, 0x1F02F).addRange(0x1F094, 0x1F09F).addRange(0x1F0AF, 0x1F0B0).addRange(0x1F0F6, 0x1F0FF).addRange(0x1F1AE, 0x1F1E5).addRange(0x1F203, 0x1F20F).addRange(0x1F23C, 0x1F23F).addRange(0x1F249, 0x1F24F).addRange(0x1F252, 0x1F25F).addRange(0x1F266, 0x1F2FF).addRange(0x1F6D8, 0x1F6DC).addRange(0x1F6ED, 0x1F6EF).addRange(0x1F6FD, 0x1F6FF).addRange(0x1F774, 0x1F77F).addRange(0x1F7D9, 0x1F7DF).addRange(0x1F7EC, 0x1F7EF).addRange(0x1F7F1, 0x1F7FF).addRange(0x1F80C, 0x1F80F).addRange(0x1F848, 0x1F84F).addRange(0x1F85A, 0x1F85F).addRange(0x1F888, 0x1F88F).addRange(0x1F8AE, 0x1F8AF).addRange(0x1F8B2, 0x1F8FF).addRange(0x1FA54, 0x1FA5F).addRange(0x1FA6E, 0x1FA6F).addRange(0x1FA75, 0x1FA77).addRange(0x1FA7D, 0x1FA7F).addRange(0x1FA87, 0x1FA8F).addRange(0x1FAAD, 0x1FAAF).addRange(0x1FABB, 0x1FABF).addRange(0x1FAC6, 0x1FACF).addRange(0x1FADA, 0x1FADF).addRange(0x1FAE8, 0x1FAEF).addRange(0x1FAF7, 0x1FAFF).addRange(0x1FBCB, 0x1FBEF).addRange(0x1FBFA, 0x1FFFF).addRange(0x2A6E0, 0x2A6FF).addRange(0x2B739, 0x2B73F).addRange(0x2B81E, 0x2B81F).addRange(0x2CEA2, 0x2CEAF).addRange(0x2EBE1, 0x2F7FF).addRange(0x2FA1E, 0x2FFFF).addRange(0x3134B, 0xE0000).addRange(0xE0002, 0xE001F).addRange(0xE0080, 0xE00FF).addRange(0xE01F0, 0xEFFFF).addRange(0xFFFFE, 0xFFFFF).addRange(0x10FFFE, 0x10FFFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/General_Category/Uppercase_Letter.js\", function (module, exports) {\n\t const set = regenerate(0x100, 0x102, 0x104, 0x106, 0x108, 0x10A, 0x10C, 0x10E, 0x110, 0x112, 0x114, 0x116, 0x118, 0x11A, 0x11C, 0x11E, 0x120, 0x122, 0x124, 0x126, 0x128, 0x12A, 0x12C, 0x12E, 0x130, 0x132, 0x134, 0x136, 0x139, 0x13B, 0x13D, 0x13F, 0x141, 0x143, 0x145, 0x147, 0x14A, 0x14C, 0x14E, 0x150, 0x152, 0x154, 0x156, 0x158, 0x15A, 0x15C, 0x15E, 0x160, 0x162, 0x164, 0x166, 0x168, 0x16A, 0x16C, 0x16E, 0x170, 0x172, 0x174, 0x176, 0x17B, 0x17D, 0x184, 0x1A2, 0x1A4, 0x1A9, 0x1AC, 0x1B5, 0x1BC, 0x1C4, 0x1C7, 0x1CA, 0x1CD, 0x1CF, 0x1D1, 0x1D3, 0x1D5, 0x1D7, 0x1D9, 0x1DB, 0x1DE, 0x1E0, 0x1E2, 0x1E4, 0x1E6, 0x1E8, 0x1EA, 0x1EC, 0x1EE, 0x1F1, 0x1F4, 0x1FA, 0x1FC, 0x1FE, 0x200, 0x202, 0x204, 0x206, 0x208, 0x20A, 0x20C, 0x20E, 0x210, 0x212, 0x214, 0x216, 0x218, 0x21A, 0x21C, 0x21E, 0x220, 0x222, 0x224, 0x226, 0x228, 0x22A, 0x22C, 0x22E, 0x230, 0x232, 0x241, 0x248, 0x24A, 0x24C, 0x24E, 0x370, 0x372, 0x376, 0x37F, 0x386, 0x38C, 0x3CF, 0x3D8, 0x3DA, 0x3DC, 0x3DE, 0x3E0, 0x3E2, 0x3E4, 0x3E6, 0x3E8, 0x3EA, 0x3EC, 0x3EE, 0x3F4, 0x3F7, 0x460, 0x462, 0x464, 0x466, 0x468, 0x46A, 0x46C, 0x46E, 0x470, 0x472, 0x474, 0x476, 0x478, 0x47A, 0x47C, 0x47E, 0x480, 0x48A, 0x48C, 0x48E, 0x490, 0x492, 0x494, 0x496, 0x498, 0x49A, 0x49C, 0x49E, 0x4A0, 0x4A2, 0x4A4, 0x4A6, 0x4A8, 0x4AA, 0x4AC, 0x4AE, 0x4B0, 0x4B2, 0x4B4, 0x4B6, 0x4B8, 0x4BA, 0x4BC, 0x4BE, 0x4C3, 0x4C5, 0x4C7, 0x4C9, 0x4CB, 0x4CD, 0x4D0, 0x4D2, 0x4D4, 0x4D6, 0x4D8, 0x4DA, 0x4DC, 0x4DE, 0x4E0, 0x4E2, 0x4E4, 0x4E6, 0x4E8, 0x4EA, 0x4EC, 0x4EE, 0x4F0, 0x4F2,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, 0x1EE6, 0x1EE8, 0x1EEA, 0x1EEC, 0x1EEE, 0x1EF0, 0x1EF2, 0x1EF4, 0x1EF6, 0x1EF8, 0x1EFA, 0x1EFC, 0x1EFE, 0x1F59, 0x1F5B, 0x1F5D, 0x1F5F, 0x2102, 0x2107, 0x2115, 0x2124, 0x2126, 0x2128, 0x2145, 0x2183, 0x2C60, 0x2C67, 0x2C69, 0x2C6B, 0x2C72, 0x2C75, 0x2C82, 0x2C84, 0x2C86, 0x2C88, 0x2C8A, 0x2C8C, 0x2C8E, 0x2C90, 0x2C92, 0x2C94, 0x2C96, 0x2C98, 0x2C9A, 0x2C9C, 0x2C9E, 0x2CA0, 0x2CA2, 0x2CA4, 0x2CA6, 0x2CA8, 0x2CAA, 0x2CAC, 0x2CAE, 0x2CB0, 0x2CB2, 0x2CB4, 0x2CB6, 0x2CB8, 0x2CBA, 0x2CBC, 0x2CBE, 0x2CC0, 0x2CC2, 0x2CC4, 0x2CC6, 0x2CC8, 0x2CCA, 0x2CCC, 0x2CCE, 0x2CD0, 0x2CD2, 0x2CD4, 0x2CD6, 0x2CD8, 0x2CDA, 0x2CDC, 0x2CDE, 0x2CE0, 0x2CE2, 0x2CEB, 0x2CED, 0x2CF2, 0xA640, 0xA642, 0xA644, 0xA646, 0xA648, 0xA64A, 0xA64C, 0xA64E, 0xA650, 0xA652, 0xA654, 0xA656, 0xA658, 0xA65A, 0xA65C, 0xA65E, 0xA660, 0xA662, 0xA664, 0xA666, 0xA668, 0xA66A, 0xA66C, 0xA680, 0xA682, 0xA684, 0xA686, 0xA688, 0xA68A, 0xA68C, 0xA68E, 0xA690, 0xA692, 0xA694, 0xA696, 0xA698, 0xA69A, 0xA722, 0xA724, 0xA726, 0xA728, 0xA72A, 0xA72C, 0xA72E, 0xA732, 0xA734, 0xA736, 0xA738, 0xA73A, 0xA73C, 0xA73E, 0xA740, 0xA742, 0xA744, 0xA746, 0xA748, 0xA74A, 0xA74C, 0xA74E, 0xA750, 0xA752, 0xA754, 0xA756, 0xA758, 0xA75A, 0xA75C, 0xA75E, 0xA760, 0xA762, 0xA764, 0xA766, 0xA768, 0xA76A, 0xA76C, 0xA76E, 0xA779, 0xA77B, 0xA780, 0xA782, 0xA784, 0xA786, 0xA78B, 0xA78D, 0xA790, 0xA792, 0xA796, 0xA798, 0xA79A, 0xA79C, 0xA79E, 0xA7A0, 0xA7A2, 0xA7A4, 0xA7A6, 0xA7A8, 0xA7B6, 0xA7B8, 0xA7BA, 0xA7BC, 0xA7BE, 0xA7C0, 0xA7C2, 0xA7C9, 0xA7D0, 0xA7D6, 0xA7D8, 0xA7F5, 0x1D49C, 0x1D4A2, 0x1D546, 0x1D7CA);\n\tset.addRange(0x41, 0x5A).addRange(0xC0, 0xD6).addRange(0xD8, 0xDE).addRange(0x178, 0x179).addRange(0x181, 0x182).addRange(0x186, 0x187).addRange(0x189, 0x18B).addRange(0x18E, 0x191).addRange(0x193, 0x194).addRange(0x196, 0x198).addRange(0x19C, 0x19D).addRange(0x19F, 0x1A0).addRange(0x1A6, 0x1A7).addRange(0x1AE, 0x1AF).addRange(0x1B1, 0x1B3).addRange(0x1B7, 0x1B8).addRange(0x1F6, 0x1F8).addRange(0x23A, 0x23B).addRange(0x23D, 0x23E).addRange(0x243, 0x246).addRange(0x388, 0x38A).addRange(0x38E, 0x38F).addRange(0x391, 0x3A1).addRange(0x3A3, 0x3AB).addRange(0x3D2, 0x3D4).addRange(0x3F9, 0x3FA).addRange(0x3FD, 0x42F).addRange(0x4C0, 0x4C1).addRange(0x531, 0x556).addRange(0x10A0, 0x10C5).addRange(0x13A0, 0x13F5).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x1F08, 0x1F0F).addRange(0x1F18, 0x1F1D).addRange(0x1F28, 0x1F2F).addRange(0x1F38, 0x1F3F).addRange(0x1F48, 0x1F4D).addRange(0x1F68, 0x1F6F).addRange(0x1FB8, 0x1FBB).addRange(0x1FC8, 0x1FCB).addRange(0x1FD8, 0x1FDB).addRange(0x1FE8, 0x1FEC).addRange(0x1FF8, 0x1FFB).addRange(0x210B, 0x210D).addRange(0x2110, 0x2112).addRange(0x2119, 0x211D).addRange(0x212A, 0x212D).addRange(0x2130, 0x2133).addRange(0x213E, 0x213F).addRange(0x2C00, 0x2C2F);\n\tset.addRange(0x2C62, 0x2C64).addRange(0x2C6D, 0x2C70).addRange(0x2C7E, 0x2C80).addRange(0xA77D, 0xA77E).addRange(0xA7AA, 0xA7AE).addRange(0xA7B0, 0xA7B4).addRange(0xA7C4, 0xA7C7).addRange(0xFF21, 0xFF3A).addRange(0x10400, 0x10427).addRange(0x104B0, 0x104D3).addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10C80, 0x10CB2).addRange(0x118A0, 0x118BF).addRange(0x16E40, 0x16E5F).addRange(0x1D400, 0x1D419).addRange(0x1D434, 0x1D44D).addRange(0x1D468, 0x1D481).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B5).addRange(0x1D4D0, 0x1D4E9).addRange(0x1D504, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D538, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D56C, 0x1D585).addRange(0x1D5A0, 0x1D5B9).addRange(0x1D5D4, 0x1D5ED).addRange(0x1D608, 0x1D621).addRange(0x1D63C, 0x1D655).addRange(0x1D670, 0x1D689).addRange(0x1D6A8, 0x1D6C0).addRange(0x1D6E2, 0x1D6FA).addRange(0x1D71C, 0x1D734).addRange(0x1D756, 0x1D76E).addRange(0x1D790, 0x1D7A8).addRange(0x1E900, 0x1E921);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/index.js\", function (module, exports) {\n\t module.exports = new Map([\n\t\t['General_Category', [\n\t\t\t'Cased_Letter',\n\t\t\t'Close_Punctuation',\n\t\t\t'Connector_Punctuation',\n\t\t\t'Control',\n\t\t\t'Currency_Symbol',\n\t\t\t'Dash_Punctuation',\n\t\t\t'Decimal_Number',\n\t\t\t'Enclosing_Mark',\n\t\t\t'Final_Punctuation',\n\t\t\t'Format',\n\t\t\t'Initial_Punctuation',\n\t\t\t'Letter',\n\t\t\t'Letter_Number',\n\t\t\t'Line_Separator',\n\t\t\t'Lowercase_Letter',\n\t\t\t'Mark',\n\t\t\t'Math_Symbol',\n\t\t\t'Modifier_Letter',\n\t\t\t'Modifier_Symbol',\n\t\t\t'Nonspacing_Mark',\n\t\t\t'Number',\n\t\t\t'Open_Punctuation',\n\t\t\t'Other',\n\t\t\t'Other_Letter',\n\t\t\t'Other_Number',\n\t\t\t'Other_Punctuation',\n\t\t\t'Other_Symbol',\n\t\t\t'Paragraph_Separator',\n\t\t\t'Private_Use',\n\t\t\t'Punctuation',\n\t\t\t'Separator',\n\t\t\t'Space_Separator',\n\t\t\t'Spacing_Mark',\n\t\t\t'Surrogate',\n\t\t\t'Symbol',\n\t\t\t'Titlecase_Letter',\n\t\t\t'Unassigned',\n\t\t\t'Uppercase_Letter'\n\t\t]],\n\t\t['Script', [\n\t\t\t'Adlam',\n\t\t\t'Ahom',\n\t\t\t'Anatolian_Hieroglyphs',\n\t\t\t'Arabic',\n\t\t\t'Armenian',\n\t\t\t'Avestan',\n\t\t\t'Balinese',\n\t\t\t'Bamum',\n\t\t\t'Bassa_Vah',\n\t\t\t'Batak',\n\t\t\t'Bengali',\n\t\t\t'Bhaiksuki',\n\t\t\t'Bopomofo',\n\t\t\t'Brahmi',\n\t\t\t'Braille',\n\t\t\t'Buginese',\n\t\t\t'Buhid',\n\t\t\t'Canadian_Aboriginal',\n\t\t\t'Carian',\n\t\t\t'Caucasian_Albanian',\n\t\t\t'Chakma',\n\t\t\t'Cham',\n\t\t\t'Cherokee',\n\t\t\t'Chorasmian',\n\t\t\t'Common',\n\t\t\t'Coptic',\n\t\t\t'Cuneiform',\n\t\t\t'Cypriot',\n\t\t\t'Cypro_Minoan',\n\t\t\t'Cyrillic',\n\t\t\t'Deseret',\n\t\t\t'Devanagari',\n\t\t\t'Dives_Akuru',\n\t\t\t'Dogra',\n\t\t\t'Duployan',\n\t\t\t'Egyptian_Hieroglyphs',\n\t\t\t'Elbasan',\n\t\t\t'Elymaic',\n\t\t\t'Ethiopic',\n\t\t\t'Georgian',\n\t\t\t'Glagolitic',\n\t\t\t'Gothic',\n\t\t\t'Grantha',\n\t\t\t'Greek',\n\t\t\t'Gujarati',\n\t\t\t'Gunjala_Gondi',\n\t\t\t'Gurmukhi',\n\t\t\t'Han',\n\t\t\t'Hangul',\n\t\t\t'Hanifi_Rohingya',\n\t\t\t'Hanunoo',\n\t\t\t'Hatran',\n\t\t\t'Hebrew',\n\t\t\t'Hiragana',\n\t\t\t'Imperial_Aramaic',\n\t\t\t'Inherited',\n\t\t\t'Inscriptional_Pahlavi',\n\t\t\t'Inscriptional_Parthian',\n\t\t\t'Javanese',\n\t\t\t'Kaithi',\n\t\t\t'Kannada',\n\t\t\t'Katakana',\n\t\t\t'Kayah_Li',\n\t\t\t'Kharoshthi',\n\t\t\t'Khitan_Small_Script',\n\t\t\t'Khmer',\n\t\t\t'Khojki',\n\t\t\t'Khudawadi',\n\t\t\t'Lao',\n\t\t\t'Latin',\n\t\t\t'Lepcha',\n\t\t\t'Limbu',\n\t\t\t'Linear_A',\n\t\t\t'Linear_B',\n\t\t\t'Lisu',\n\t\t\t'Lycian',\n\t\t\t'Lydian',\n\t\t\t'Mahajani',\n\t\t\t'Makasar',\n\t\t\t'Malayalam',\n\t\t\t'Mandaic',\n\t\t\t'Manichaean',\n\t\t\t'Marchen',\n\t\t\t'Masaram_Gondi',\n\t\t\t'Medefaidrin',\n\t\t\t'Meetei_Mayek',\n\t\t\t'Mende_Kikakui',\n\t\t\t'Meroitic_Cursive',\n\t\t\t'Meroitic_Hieroglyphs',\n\t\t\t'Miao',\n\t\t\t'Modi',\n\t\t\t'Mongolian',\n\t\t\t'Mro',\n\t\t\t'Multani',\n\t\t\t'Myanmar',\n\t\t\t'Nabataean',\n\t\t\t'Nandinagari',\n\t\t\t'New_Tai_Lue',\n\t\t\t'Newa',\n\t\t\t'Nko',\n\t\t\t'Nushu',\n\t\t\t'Nyiakeng_Puachue_Hmong',\n\t\t\t'Ogham',\n\t\t\t'Ol_Chiki',\n\t\t\t'Old_Hungarian',\n\t\t\t'Old_Italic',\n\t\t\t'Old_North_Arabian',\n\t\t\t'Old_Permic',\n\t\t\t'Old_Persian',\n\t\t\t'Old_Sogdian',\n\t\t\t'Old_South_Arabian',\n\t\t\t'Old_Turkic',\n\t\t\t'Old_Uyghur',\n\t\t\t'Oriya',\n\t\t\t'Osage',\n\t\t\t'Osmanya',\n\t\t\t'Pahawh_Hmong',\n\t\t\t'Palmyrene',\n\t\t\t'Pau_Cin_Hau',\n\t\t\t'Phags_Pa',\n\t\t\t'Phoenician',\n\t\t\t'Psalter_Pahlavi',\n\t\t\t'Rejang',\n\t\t\t'Runic',\n\t\t\t'Samaritan',\n\t\t\t'Saurashtra',\n\t\t\t'Sharada',\n\t\t\t'Shavian',\n\t\t\t'Siddham',\n\t\t\t'SignWriting',\n\t\t\t'Sinhala',\n\t\t\t'Sogdian',\n\t\t\t'Sora_Sompeng',\n\t\t\t'Soyombo',\n\t\t\t'Sundanese',\n\t\t\t'Syloti_Nagri',\n\t\t\t'Syriac',\n\t\t\t'Tagalog',\n\t\t\t'Tagbanwa',\n\t\t\t'Tai_Le',\n\t\t\t'Tai_Tham',\n\t\t\t'Tai_Viet',\n\t\t\t'Takri',\n\t\t\t'Tamil',\n\t\t\t'Tangsa',\n\t\t\t'Tangut',\n\t\t\t'Telugu',\n\t\t\t'Thaana',\n\t\t\t'Thai',\n\t\t\t'Tibetan',\n\t\t\t'Tifinagh',\n\t\t\t'Tirhuta',\n\t\t\t'Toto',\n\t\t\t'Ugaritic',\n\t\t\t'Vai',\n\t\t\t'Vithkuqi',\n\t\t\t'Wancho',\n\t\t\t'Warang_Citi',\n\t\t\t'Yezidi',\n\t\t\t'Yi',\n\t\t\t'Zanabazar_Square'\n\t\t]],\n\t\t['Script_Extensions', [\n\t\t\t'Adlam',\n\t\t\t'Ahom',\n\t\t\t'Anatolian_Hieroglyphs',\n\t\t\t'Arabic',\n\t\t\t'Armenian',\n\t\t\t'Avestan',\n\t\t\t'Balinese',\n\t\t\t'Bamum',\n\t\t\t'Bassa_Vah',\n\t\t\t'Batak',\n\t\t\t'Bengali',\n\t\t\t'Bhaiksuki',\n\t\t\t'Bopomofo',\n\t\t\t'Brahmi',\n\t\t\t'Braille',\n\t\t\t'Buginese',\n\t\t\t'Buhid',\n\t\t\t'Canadian_Aboriginal',\n\t\t\t'Carian',\n\t\t\t'Caucasian_Albanian',\n\t\t\t'Chakma',\n\t\t\t'Cham',\n\t\t\t'Cherokee',\n\t\t\t'Chorasmian',\n\t\t\t'Common',\n\t\t\t'Coptic',\n\t\t\t'Cuneiform',\n\t\t\t'Cypriot',\n\t\t\t'Cypro_Minoan',\n\t\t\t'Cyrillic',\n\t\t\t'Deseret',\n\t\t\t'Devanagari',\n\t\t\t'Dives_Akuru',\n\t\t\t'Dogra',\n\t\t\t'Duployan',\n\t\t\t'Egyptian_Hieroglyphs',\n\t\t\t'Elbasan',\n\t\t\t'Elymaic',\n\t\t\t'Ethiopic',\n\t\t\t'Georgian',\n\t\t\t'Glagolitic',\n\t\t\t'Gothic',\n\t\t\t'Grantha',\n\t\t\t'Greek',\n\t\t\t'Gujarati',\n\t\t\t'Gunjala_Gondi',\n\t\t\t'Gurmukhi',\n\t\t\t'Han',\n\t\t\t'Hangul',\n\t\t\t'Hanifi_Rohingya',\n\t\t\t'Hanunoo',\n\t\t\t'Hatran',\n\t\t\t'Hebrew',\n\t\t\t'Hiragana',\n\t\t\t'Imperial_Aramaic',\n\t\t\t'Inherited',\n\t\t\t'Inscriptional_Pahlavi',\n\t\t\t'Inscriptional_Parthian',\n\t\t\t'Javanese',\n\t\t\t'Kaithi',\n\t\t\t'Kannada',\n\t\t\t'Katakana',\n\t\t\t'Kayah_Li',\n\t\t\t'Kharoshthi',\n\t\t\t'Khitan_Small_Script',\n\t\t\t'Khmer',\n\t\t\t'Khojki',\n\t\t\t'Khudawadi',\n\t\t\t'Lao',\n\t\t\t'Latin',\n\t\t\t'Lepcha',\n\t\t\t'Limbu',\n\t\t\t'Linear_A',\n\t\t\t'Linear_B',\n\t\t\t'Lisu',\n\t\t\t'Lycian',\n\t\t\t'Lydian',\n\t\t\t'Mahajani',\n\t\t\t'Makasar',\n\t\t\t'Malayalam',\n\t\t\t'Mandaic',\n\t\t\t'Manichaean',\n\t\t\t'Marchen',\n\t\t\t'Masaram_Gondi',\n\t\t\t'Medefaidrin',\n\t\t\t'Meetei_Mayek',\n\t\t\t'Mende_Kikakui',\n\t\t\t'Meroitic_Cursive',\n\t\t\t'Meroitic_Hieroglyphs',\n\t\t\t'Miao',\n\t\t\t'Modi',\n\t\t\t'Mongolian',\n\t\t\t'Mro',\n\t\t\t'Multani',\n\t\t\t'Myanmar',\n\t\t\t'Nabataean',\n\t\t\t'Nandinagari',\n\t\t\t'New_Tai_Lue',\n\t\t\t'Newa',\n\t\t\t'Nko',\n\t\t\t'Nushu',\n\t\t\t'Nyiakeng_Puachue_Hmong',\n\t\t\t'Ogham',\n\t\t\t'Ol_Chiki',\n\t\t\t'Old_Hungarian',\n\t\t\t'Old_Italic',\n\t\t\t'Old_North_Arabian',\n\t\t\t'Old_Permic',\n\t\t\t'Old_Persian',\n\t\t\t'Old_Sogdian',\n\t\t\t'Old_South_Arabian',\n\t\t\t'Old_Turkic',\n\t\t\t'Old_Uyghur',\n\t\t\t'Oriya',\n\t\t\t'Osage',\n\t\t\t'Osmanya',\n\t\t\t'Pahawh_Hmong',\n\t\t\t'Palmyrene',\n\t\t\t'Pau_Cin_Hau',\n\t\t\t'Phags_Pa',\n\t\t\t'Phoenician',\n\t\t\t'Psalter_Pahlavi',\n\t\t\t'Rejang',\n\t\t\t'Runic',\n\t\t\t'Samaritan',\n\t\t\t'Saurashtra',\n\t\t\t'Sharada',\n\t\t\t'Shavian',\n\t\t\t'Siddham',\n\t\t\t'SignWriting',\n\t\t\t'Sinhala',\n\t\t\t'Sogdian',\n\t\t\t'Sora_Sompeng',\n\t\t\t'Soyombo',\n\t\t\t'Sundanese',\n\t\t\t'Syloti_Nagri',\n\t\t\t'Syriac',\n\t\t\t'Tagalog',\n\t\t\t'Tagbanwa',\n\t\t\t'Tai_Le',\n\t\t\t'Tai_Tham',\n\t\t\t'Tai_Viet',\n\t\t\t'Takri',\n\t\t\t'Tamil',\n\t\t\t'Tangsa',\n\t\t\t'Tangut',\n\t\t\t'Telugu',\n\t\t\t'Thaana',\n\t\t\t'Thai',\n\t\t\t'Tibetan',\n\t\t\t'Tifinagh',\n\t\t\t'Tirhuta',\n\t\t\t'Toto',\n\t\t\t'Ugaritic',\n\t\t\t'Vai',\n\t\t\t'Vithkuqi',\n\t\t\t'Wancho',\n\t\t\t'Warang_Citi',\n\t\t\t'Yezidi',\n\t\t\t'Yi',\n\t\t\t'Zanabazar_Square'\n\t\t]],\n\t\t['Binary_Property', [\n\t\t\t'ASCII',\n\t\t\t'ASCII_Hex_Digit',\n\t\t\t'Alphabetic',\n\t\t\t'Any',\n\t\t\t'Assigned',\n\t\t\t'Bidi_Control',\n\t\t\t'Bidi_Mirrored',\n\t\t\t'Case_Ignorable',\n\t\t\t'Cased',\n\t\t\t'Changes_When_Casefolded',\n\t\t\t'Changes_When_Casemapped',\n\t\t\t'Changes_When_Lowercased',\n\t\t\t'Changes_When_NFKC_Casefolded',\n\t\t\t'Changes_When_Titlecased',\n\t\t\t'Changes_When_Uppercased',\n\t\t\t'Dash',\n\t\t\t'Default_Ignorable_Code_Point',\n\t\t\t'Deprecated',\n\t\t\t'Diacritic',\n\t\t\t'Emoji',\n\t\t\t'Emoji_Component',\n\t\t\t'Emoji_Modifier',\n\t\t\t'Emoji_Modifier_Base',\n\t\t\t'Emoji_Presentation',\n\t\t\t'Extended_Pictographic',\n\t\t\t'Extender',\n\t\t\t'Grapheme_Base',\n\t\t\t'Grapheme_Extend',\n\t\t\t'Hex_Digit',\n\t\t\t'IDS_Binary_Operator',\n\t\t\t'IDS_Trinary_Operator',\n\t\t\t'ID_Continue',\n\t\t\t'ID_Start',\n\t\t\t'Ideographic',\n\t\t\t'Join_Control',\n\t\t\t'Logical_Order_Exception',\n\t\t\t'Lowercase',\n\t\t\t'Math',\n\t\t\t'Noncharacter_Code_Point',\n\t\t\t'Pattern_Syntax',\n\t\t\t'Pattern_White_Space',\n\t\t\t'Quotation_Mark',\n\t\t\t'Radical',\n\t\t\t'Regional_Indicator',\n\t\t\t'Sentence_Terminal',\n\t\t\t'Soft_Dotted',\n\t\t\t'Terminal_Punctuation',\n\t\t\t'Unified_Ideograph',\n\t\t\t'Uppercase',\n\t\t\t'Variation_Selector',\n\t\t\t'White_Space',\n\t\t\t'XID_Continue',\n\t\t\t'XID_Start'\n\t\t]]\n\t]);\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Adlam.js\", function (module, exports) {\n\t const set = regenerate(0x61F, 0x640);\n\tset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ahom.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Anatolian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x14400, 0x14646);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Arabic.js\", function (module, exports) {\n\t const set = regenerate(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x600, 0x604).addRange(0x606, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x102E0, 0x102FB).addRange(0x10E60, 0x10E7E).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Armenian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Avestan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Balinese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bamum.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bassa_Vah.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Batak.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bengali.js\", function (module, exports) {\n\t const set = regenerate(0x9B2, 0x9D7, 0x1CD0, 0x1CD2, 0x1CD8, 0x1CE1, 0x1CEA, 0x1CED, 0x1CF2, 0xA8F1);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE).addRange(0x1CD5, 0x1CD6).addRange(0x1CF5, 0x1CF7);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bhaiksuki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Bopomofo.js\", function (module, exports) {\n\t const set = regenerate(0x3030, 0x3037, 0x30FB);\n\tset.addRange(0x2EA, 0x2EB).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302A, 0x302D).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Brahmi.js\", function (module, exports) {\n\t const set = regenerate(0x1107F);\n\tset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Braille.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2800, 0x28FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Buginese.js\", function (module, exports) {\n\t const set = regenerate(0xA9CF);\n\tset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Buhid.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1735, 0x1736).addRange(0x1740, 0x1753);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Canadian_Aboriginal.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Carian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x102A0, 0x102D0);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Caucasian_Albanian.js\", function (module, exports) {\n\t const set = regenerate(0x1056F);\n\tset.addRange(0x10530, 0x10563);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Chakma.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x9E6, 0x9EF).addRange(0x1040, 0x1049).addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cherokee.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Chorasmian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FB0, 0x10FCB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Common.js\", function (module, exports) {\n\t const set = regenerate(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x6DD, 0x8E2, 0xE3F, 0x3000, 0x3004, 0x3012, 0x3020, 0x3036, 0x327F, 0x33FF, 0xAB5B, 0xFEFF, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\n\tset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x2000, 0x200B).addRange(0x200E, 0x202E).addRange(0x2030, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E42).addRange(0x2E44, 0x2E5D).addRange(0x2FF0, 0x2FFB).addRange(0x3248, 0x325F).addRange(0x32B1, 0x32BF).addRange(0x32CC, 0x32CF).addRange(0x3371, 0x337A).addRange(0x3380, 0x33DF).addRange(0x4DC0, 0x4DFF).addRange(0xA708, 0xA721).addRange(0xA788, 0xA78A).addRange(0xAB6A, 0xAB6B).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE44).addRange(0xFE47, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF60).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE);\n\tset.addRange(0xFFF9, 0xFFFD).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D372, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D).addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8);\n\tset.addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Coptic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF).addRange(0x102E0, 0x102FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cuneiform.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cypriot.js\", function (module, exports) {\n\t const set = regenerate(0x10808, 0x1083C, 0x1083F);\n\tset.addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cypro_Minoan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10100, 0x10101).addRange(0x12F90, 0x12FF2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Cyrillic.js\", function (module, exports) {\n\t const set = regenerate(0x1D2B, 0x1D78, 0x1DF8, 0x2E43);\n\tset.addRange(0x400, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Deseret.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10400, 0x1044F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Devanagari.js\", function (module, exports) {\n\t const set = regenerate(0x20F0);\n\tset.addRange(0x900, 0x952).addRange(0x955, 0x97F).addRange(0x1CD0, 0x1CF6).addRange(0x1CF8, 0x1CF9).addRange(0xA830, 0xA839).addRange(0xA8E0, 0xA8FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Dives_Akuru.js\", function (module, exports) {\n\t const set = regenerate(0x11909);\n\tset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Dogra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11800, 0x1183B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Duployan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BCA3);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Egyptian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13000, 0x1342E).addRange(0x13430, 0x13438);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Elbasan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10500, 0x10527);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Elymaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FE0, 0x10FF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ethiopic.js\", function (module, exports) {\n\t const set = regenerate(0x1258, 0x12C0);\n\tset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Georgian.js\", function (module, exports) {\n\t const set = regenerate(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\n\tset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Glagolitic.js\", function (module, exports) {\n\t const set = regenerate(0x484, 0x487, 0x2E43, 0xA66F);\n\tset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gothic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10330, 0x1034A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Grantha.js\", function (module, exports) {\n\t const set = regenerate(0x1CD0, 0x20F0, 0x11350, 0x11357, 0x11FD3);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xBE6, 0xBF3).addRange(0x1CD2, 0x1CD3).addRange(0x1CF2, 0x1CF4).addRange(0x1CF8, 0x1CF9).addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133B, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374).addRange(0x11FD0, 0x11FD1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Greek.js\", function (module, exports) {\n\t const set = regenerate(0x342, 0x345, 0x37F, 0x384, 0x386, 0x38C, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\n\tset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1DBF, 0x1DC1).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gujarati.js\", function (module, exports) {\n\t const set = regenerate(0xAD0);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF).addRange(0xA830, 0xA839);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gunjala_Gondi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Gurmukhi.js\", function (module, exports) {\n\t const set = regenerate(0xA3C, 0xA51, 0xA5E);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76).addRange(0xA830, 0xA839);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Han.js\", function (module, exports) {\n\t const set = regenerate(0x3030, 0x30FB, 0x32FF);\n\tset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3001, 0x3003).addRange(0x3005, 0x3011).addRange(0x3013, 0x301F).addRange(0x3021, 0x302D).addRange(0x3037, 0x303F).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x3247).addRange(0x3280, 0x32B0).addRange(0x32C0, 0x32CB).addRange(0x3358, 0x3370).addRange(0x337B, 0x337F).addRange(0x33E0, 0x33FE).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xA700, 0xA707).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x1D360, 0x1D371).addRange(0x1F250, 0x1F251).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hangul.js\", function (module, exports) {\n\t const set = regenerate(0x3037, 0x30FB);\n\tset.addRange(0x1100, 0x11FF).addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x302E, 0x3030).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hanifi_Rohingya.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61B, 0x61F, 0x640, 0x6D4);\n\tset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hanunoo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1720, 0x1736);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hatran.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hebrew.js\", function (module, exports) {\n\t const set = regenerate(0xFB3E);\n\tset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Hiragana.js\", function (module, exports) {\n\t const set = regenerate(0x3037, 0xFF70, 0x1F200);\n\tset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3041, 0x3096).addRange(0x3099, 0x30A0).addRange(0x30FB, 0x30FC).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Imperial_Aramaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Inherited.js\", function (module, exports) {\n\t const set = regenerate(0x1DF9, 0x101FD);\n\tset.addRange(0x300, 0x341).addRange(0x343, 0x344).addRange(0x346, 0x362).addRange(0x953, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1DC2, 0x1DF7).addRange(0x1DFB, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20EF).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Inscriptional_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Inscriptional_Parthian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Javanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA980, 0xA9CD).addRange(0xA9CF, 0xA9D9).addRange(0xA9DE, 0xA9DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kaithi.js\", function (module, exports) {\n\t const set = regenerate(0x110CD);\n\tset.addRange(0x966, 0x96F).addRange(0xA830, 0xA839).addRange(0x11080, 0x110C2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kannada.js\", function (module, exports) {\n\t const set = regenerate(0x1CD0, 0x1CD2, 0x1CDA, 0x1CF2, 0x1CF4);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2).addRange(0xA830, 0xA835);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Katakana.js\", function (module, exports) {\n\t const set = regenerate(0x3037, 0x1B000);\n\tset.addRange(0x3001, 0x3003).addRange(0x3008, 0x3011).addRange(0x3013, 0x301F).addRange(0x3030, 0x3035).addRange(0x303C, 0x303D).addRange(0x3099, 0x309C).addRange(0x30A0, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFE45, 0xFE46).addRange(0xFF61, 0xFF9F).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kayah_Li.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA900, 0xA92F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Kharoshthi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khitan_Small_Script.js\", function (module, exports) {\n\t const set = regenerate(0x16FE4);\n\tset.addRange(0x18B00, 0x18CD5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khmer.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khojki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAE6, 0xAEF).addRange(0xA830, 0xA839).addRange(0x11200, 0x11211).addRange(0x11213, 0x1123E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Khudawadi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lao.js\", function (module, exports) {\n\t const set = regenerate(0xE84, 0xEA5, 0xEC6);\n\tset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Latin.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xBA, 0x10FB, 0x202F, 0x2071, 0x207F, 0x20F0, 0x2132, 0x214E, 0xA7D3, 0xA92E);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x363, 0x36F).addRange(0x485, 0x486).addRange(0x951, 0x952).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA700, 0xA707).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lepcha.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Limbu.js\", function (module, exports) {\n\t const set = regenerate(0x965, 0x1940);\n\tset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Linear_A.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10107, 0x10133).addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Linear_B.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lisu.js\", function (module, exports) {\n\t const set = regenerate(0x11FB0);\n\tset.addRange(0xA4D0, 0xA4FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lycian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10280, 0x1029C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Lydian.js\", function (module, exports) {\n\t const set = regenerate(0x1093F);\n\tset.addRange(0x10920, 0x10939);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mahajani.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x96F).addRange(0xA830, 0xA839).addRange(0x11150, 0x11176);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Makasar.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11EE0, 0x11EF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Malayalam.js\", function (module, exports) {\n\t const set = regenerate(0x1CDA);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F).addRange(0xA830, 0xA832);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mandaic.js\", function (module, exports) {\n\t const set = regenerate(0x640, 0x85E);\n\tset.addRange(0x840, 0x85B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Manichaean.js\", function (module, exports) {\n\t const set = regenerate(0x640);\n\tset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Marchen.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Masaram_Gondi.js\", function (module, exports) {\n\t const set = regenerate(0x11D3A);\n\tset.addRange(0x964, 0x965).addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Medefaidrin.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16E40, 0x16E9A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Meetei_Mayek.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mende_Kikakui.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Meroitic_Cursive.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Meroitic_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10980, 0x1099F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Miao.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Modi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA830, 0xA839).addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mongolian.js\", function (module, exports) {\n\t const set = regenerate(0x202F);\n\tset.addRange(0x1800, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Mro.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Multani.js\", function (module, exports) {\n\t const set = regenerate(0x11288);\n\tset.addRange(0xA66, 0xA6F).addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Myanmar.js\", function (module, exports) {\n\t const set = regenerate(0xA92E);\n\tset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nabataean.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nandinagari.js\", function (module, exports) {\n\t const set = regenerate(0x1CE9, 0x1CF2, 0x1CFA);\n\tset.addRange(0x964, 0x965).addRange(0xCE6, 0xCEF).addRange(0xA830, 0xA835).addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/New_Tai_Lue.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Newa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nko.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61B, 0x61F);\n\tset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF).addRange(0xFD3E, 0xFD3F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nushu.js\", function (module, exports) {\n\t const set = regenerate(0x16FE1);\n\tset.addRange(0x1B170, 0x1B2FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Nyiakeng_Puachue_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ogham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1680, 0x169C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ol_Chiki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C50, 0x1C7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Hungarian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Italic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_North_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A80, 0x10A9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Permic.js\", function (module, exports) {\n\t const set = regenerate(0x483);\n\tset.addRange(0x10350, 0x1037A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Persian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Sogdian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F00, 0x10F27);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_South_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A60, 0x10A7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Turkic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C00, 0x10C48);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Old_Uyghur.js\", function (module, exports) {\n\t const set = regenerate(0x640, 0x10AF2);\n\tset.addRange(0x10F70, 0x10F89);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Oriya.js\", function (module, exports) {\n\t const set = regenerate(0x1CDA, 0x1CF2);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Osage.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Osmanya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Pahawh_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Palmyrene.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10860, 0x1087F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Pau_Cin_Hau.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11AC0, 0x11AF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Phags_Pa.js\", function (module, exports) {\n\t const set = regenerate(0x1805);\n\tset.addRange(0x1802, 0x1803).addRange(0xA840, 0xA877);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Phoenician.js\", function (module, exports) {\n\t const set = regenerate(0x1091F);\n\tset.addRange(0x10900, 0x1091B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Psalter_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate(0x640);\n\tset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Rejang.js\", function (module, exports) {\n\t const set = regenerate(0xA95F);\n\tset.addRange(0xA930, 0xA953);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Runic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Samaritan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Saurashtra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sharada.js\", function (module, exports) {\n\t const set = regenerate(0x951, 0x1CD7, 0x1CD9, 0x1CE0);\n\tset.addRange(0x1CDC, 0x1CDD).addRange(0x11180, 0x111DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Shavian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10450, 0x1047F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Siddham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/SignWriting.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sinhala.js\", function (module, exports) {\n\t const set = regenerate(0xDBD, 0xDCA, 0xDD6);\n\tset.addRange(0x964, 0x965).addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sogdian.js\", function (module, exports) {\n\t const set = regenerate(0x640);\n\tset.addRange(0x10F30, 0x10F59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sora_Sompeng.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Soyombo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A50, 0x11AA2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Sundanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Syloti_Nagri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0x9E6, 0x9EF).addRange(0xA800, 0xA82C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Syriac.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61F, 0x640, 0x670, 0x1DF8, 0x1DFA);\n\tset.addRange(0x61B, 0x61C).addRange(0x64B, 0x655).addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tagalog.js\", function (module, exports) {\n\t const set = regenerate(0x171F);\n\tset.addRange(0x1700, 0x1715).addRange(0x1735, 0x1736);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tagbanwa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1735, 0x1736).addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tai_Le.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1040, 0x1049).addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tai_Tham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tai_Viet.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Takri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tamil.js\", function (module, exports) {\n\t const set = regenerate(0xB9C, 0xBD0, 0xBD7, 0x1CDA, 0xA8F3, 0x11301, 0x11303, 0x11FFF);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x1133B, 0x1133C).addRange(0x11FC0, 0x11FF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tangsa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tangut.js\", function (module, exports) {\n\t const set = regenerate(0x16FE0);\n\tset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Telugu.js\", function (module, exports) {\n\t const set = regenerate(0xC5D, 0x1CDA, 0x1CF2);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Thaana.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61F, 0xFDF2, 0xFDFD);\n\tset.addRange(0x61B, 0x61C).addRange(0x660, 0x669).addRange(0x780, 0x7B1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Thai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tibetan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tifinagh.js\", function (module, exports) {\n\t const set = regenerate(0x2D7F);\n\tset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Tirhuta.js\", function (module, exports) {\n\t const set = regenerate(0x1CF2);\n\tset.addRange(0x951, 0x952).addRange(0x964, 0x965).addRange(0xA830, 0xA839).addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Toto.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E290, 0x1E2AE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Ugaritic.js\", function (module, exports) {\n\t const set = regenerate(0x1039F);\n\tset.addRange(0x10380, 0x1039D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Vai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA500, 0xA62B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Vithkuqi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Wancho.js\", function (module, exports) {\n\t const set = regenerate(0x1E2FF);\n\tset.addRange(0x1E2C0, 0x1E2F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Warang_Citi.js\", function (module, exports) {\n\t const set = regenerate(0x118FF);\n\tset.addRange(0x118A0, 0x118F2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Yezidi.js\", function (module, exports) {\n\t const set = regenerate(0x60C, 0x61B, 0x61F);\n\tset.addRange(0x660, 0x669).addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Yi.js\", function (module, exports) {\n\t const set = regenerate(0x30FB);\n\tset.addRange(0x3001, 0x3002).addRange(0x3008, 0x3011).addRange(0x3014, 0x301B).addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6).addRange(0xFF61, 0xFF65);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script_Extensions/Zanabazar_Square.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A00, 0x11A47);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Adlam.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E900, 0x1E94B).addRange(0x1E950, 0x1E959).addRange(0x1E95E, 0x1E95F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ahom.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11700, 0x1171A).addRange(0x1171D, 0x1172B).addRange(0x11730, 0x11746);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Anatolian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x14400, 0x14646);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Arabic.js\", function (module, exports) {\n\t const set = regenerate(0xFDCF, 0x1EE24, 0x1EE27, 0x1EE39, 0x1EE3B, 0x1EE42, 0x1EE47, 0x1EE49, 0x1EE4B, 0x1EE54, 0x1EE57, 0x1EE59, 0x1EE5B, 0x1EE5D, 0x1EE5F, 0x1EE64, 0x1EE7E);\n\tset.addRange(0x600, 0x604).addRange(0x606, 0x60B).addRange(0x60D, 0x61A).addRange(0x61C, 0x61E).addRange(0x620, 0x63F).addRange(0x641, 0x64A).addRange(0x656, 0x66F).addRange(0x671, 0x6DC).addRange(0x6DE, 0x6FF).addRange(0x750, 0x77F).addRange(0x870, 0x88E).addRange(0x890, 0x891).addRange(0x898, 0x8E1).addRange(0x8E3, 0x8FF).addRange(0xFB50, 0xFBC2).addRange(0xFBD3, 0xFD3D).addRange(0xFD40, 0xFD8F).addRange(0xFD92, 0xFDC7).addRange(0xFDF0, 0xFDFF).addRange(0xFE70, 0xFE74).addRange(0xFE76, 0xFEFC).addRange(0x10E60, 0x10E7E).addRange(0x1EE00, 0x1EE03).addRange(0x1EE05, 0x1EE1F).addRange(0x1EE21, 0x1EE22).addRange(0x1EE29, 0x1EE32).addRange(0x1EE34, 0x1EE37).addRange(0x1EE4D, 0x1EE4F).addRange(0x1EE51, 0x1EE52).addRange(0x1EE61, 0x1EE62).addRange(0x1EE67, 0x1EE6A).addRange(0x1EE6C, 0x1EE72).addRange(0x1EE74, 0x1EE77).addRange(0x1EE79, 0x1EE7C).addRange(0x1EE80, 0x1EE89).addRange(0x1EE8B, 0x1EE9B).addRange(0x1EEA1, 0x1EEA3).addRange(0x1EEA5, 0x1EEA9).addRange(0x1EEAB, 0x1EEBB).addRange(0x1EEF0, 0x1EEF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Armenian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x531, 0x556).addRange(0x559, 0x58A).addRange(0x58D, 0x58F).addRange(0xFB13, 0xFB17);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Avestan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B00, 0x10B35).addRange(0x10B39, 0x10B3F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Balinese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B00, 0x1B4C).addRange(0x1B50, 0x1B7E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bamum.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA6A0, 0xA6F7).addRange(0x16800, 0x16A38);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bassa_Vah.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16AD0, 0x16AED).addRange(0x16AF0, 0x16AF5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Batak.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC0, 0x1BF3).addRange(0x1BFC, 0x1BFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bengali.js\", function (module, exports) {\n\t const set = regenerate(0x9B2, 0x9D7);\n\tset.addRange(0x980, 0x983).addRange(0x985, 0x98C).addRange(0x98F, 0x990).addRange(0x993, 0x9A8).addRange(0x9AA, 0x9B0).addRange(0x9B6, 0x9B9).addRange(0x9BC, 0x9C4).addRange(0x9C7, 0x9C8).addRange(0x9CB, 0x9CE).addRange(0x9DC, 0x9DD).addRange(0x9DF, 0x9E3).addRange(0x9E6, 0x9FE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bhaiksuki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C00, 0x11C08).addRange(0x11C0A, 0x11C36).addRange(0x11C38, 0x11C45).addRange(0x11C50, 0x11C6C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Bopomofo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2EA, 0x2EB).addRange(0x3105, 0x312F).addRange(0x31A0, 0x31BF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Brahmi.js\", function (module, exports) {\n\t const set = regenerate(0x1107F);\n\tset.addRange(0x11000, 0x1104D).addRange(0x11052, 0x11075);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Braille.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2800, 0x28FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Buginese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1A00, 0x1A1B).addRange(0x1A1E, 0x1A1F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Buhid.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1740, 0x1753);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Canadian_Aboriginal.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1400, 0x167F).addRange(0x18B0, 0x18F5).addRange(0x11AB0, 0x11ABF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Carian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x102A0, 0x102D0);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Caucasian_Albanian.js\", function (module, exports) {\n\t const set = regenerate(0x1056F);\n\tset.addRange(0x10530, 0x10563);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Chakma.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11100, 0x11134).addRange(0x11136, 0x11147);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA00, 0xAA36).addRange(0xAA40, 0xAA4D).addRange(0xAA50, 0xAA59).addRange(0xAA5C, 0xAA5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cherokee.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13A0, 0x13F5).addRange(0x13F8, 0x13FD).addRange(0xAB70, 0xABBF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Chorasmian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FB0, 0x10FCB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Common.js\", function (module, exports) {\n\t const set = regenerate(0xD7, 0xF7, 0x374, 0x37E, 0x385, 0x387, 0x605, 0x60C, 0x61B, 0x61F, 0x640, 0x6DD, 0x8E2, 0xE3F, 0x10FB, 0x1805, 0x1CD3, 0x1CE1, 0x1CFA, 0x3006, 0x30A0, 0x32FF, 0xA92E, 0xA9CF, 0xAB5B, 0xFEFF, 0xFF70, 0x1D4A2, 0x1D4BB, 0x1D546, 0x1F7F0, 0xE0001);\n\tset.addRange(0x0, 0x40).addRange(0x5B, 0x60).addRange(0x7B, 0xA9).addRange(0xAB, 0xB9).addRange(0xBB, 0xBF).addRange(0x2B9, 0x2DF).addRange(0x2E5, 0x2E9).addRange(0x2EC, 0x2FF).addRange(0x964, 0x965).addRange(0xFD5, 0xFD8).addRange(0x16EB, 0x16ED).addRange(0x1735, 0x1736).addRange(0x1802, 0x1803).addRange(0x1CE9, 0x1CEC).addRange(0x1CEE, 0x1CF3).addRange(0x1CF5, 0x1CF7).addRange(0x2000, 0x200B).addRange(0x200E, 0x2064).addRange(0x2066, 0x2070).addRange(0x2074, 0x207E).addRange(0x2080, 0x208E).addRange(0x20A0, 0x20C0).addRange(0x2100, 0x2125).addRange(0x2127, 0x2129).addRange(0x212C, 0x2131).addRange(0x2133, 0x214D).addRange(0x214F, 0x215F).addRange(0x2189, 0x218B).addRange(0x2190, 0x2426).addRange(0x2440, 0x244A).addRange(0x2460, 0x27FF).addRange(0x2900, 0x2B73).addRange(0x2B76, 0x2B95).addRange(0x2B97, 0x2BFF).addRange(0x2E00, 0x2E5D).addRange(0x2FF0, 0x2FFB).addRange(0x3000, 0x3004).addRange(0x3008, 0x3020).addRange(0x3030, 0x3037).addRange(0x303C, 0x303F).addRange(0x309B, 0x309C).addRange(0x30FB, 0x30FC).addRange(0x3190, 0x319F).addRange(0x31C0, 0x31E3).addRange(0x3220, 0x325F).addRange(0x327F, 0x32CF).addRange(0x3358, 0x33FF).addRange(0x4DC0, 0x4DFF).addRange(0xA700, 0xA721).addRange(0xA788, 0xA78A).addRange(0xA830, 0xA839);\n\tset.addRange(0xAB6A, 0xAB6B).addRange(0xFD3E, 0xFD3F).addRange(0xFE10, 0xFE19).addRange(0xFE30, 0xFE52).addRange(0xFE54, 0xFE66).addRange(0xFE68, 0xFE6B).addRange(0xFF01, 0xFF20).addRange(0xFF3B, 0xFF40).addRange(0xFF5B, 0xFF65).addRange(0xFF9E, 0xFF9F).addRange(0xFFE0, 0xFFE6).addRange(0xFFE8, 0xFFEE).addRange(0xFFF9, 0xFFFD).addRange(0x10100, 0x10102).addRange(0x10107, 0x10133).addRange(0x10137, 0x1013F).addRange(0x10190, 0x1019C).addRange(0x101D0, 0x101FC).addRange(0x102E1, 0x102FB).addRange(0x1BCA0, 0x1BCA3).addRange(0x1CF50, 0x1CFC3).addRange(0x1D000, 0x1D0F5).addRange(0x1D100, 0x1D126).addRange(0x1D129, 0x1D166).addRange(0x1D16A, 0x1D17A).addRange(0x1D183, 0x1D184).addRange(0x1D18C, 0x1D1A9).addRange(0x1D1AE, 0x1D1EA).addRange(0x1D2E0, 0x1D2F3).addRange(0x1D300, 0x1D356).addRange(0x1D360, 0x1D378).addRange(0x1D400, 0x1D454).addRange(0x1D456, 0x1D49C).addRange(0x1D49E, 0x1D49F).addRange(0x1D4A5, 0x1D4A6).addRange(0x1D4A9, 0x1D4AC).addRange(0x1D4AE, 0x1D4B9).addRange(0x1D4BD, 0x1D4C3).addRange(0x1D4C5, 0x1D505).addRange(0x1D507, 0x1D50A).addRange(0x1D50D, 0x1D514).addRange(0x1D516, 0x1D51C).addRange(0x1D51E, 0x1D539).addRange(0x1D53B, 0x1D53E).addRange(0x1D540, 0x1D544).addRange(0x1D54A, 0x1D550).addRange(0x1D552, 0x1D6A5).addRange(0x1D6A8, 0x1D7CB).addRange(0x1D7CE, 0x1D7FF).addRange(0x1EC71, 0x1ECB4).addRange(0x1ED01, 0x1ED3D);\n\tset.addRange(0x1F000, 0x1F02B).addRange(0x1F030, 0x1F093).addRange(0x1F0A0, 0x1F0AE).addRange(0x1F0B1, 0x1F0BF).addRange(0x1F0C1, 0x1F0CF).addRange(0x1F0D1, 0x1F0F5).addRange(0x1F100, 0x1F1AD).addRange(0x1F1E6, 0x1F1FF).addRange(0x1F201, 0x1F202).addRange(0x1F210, 0x1F23B).addRange(0x1F240, 0x1F248).addRange(0x1F250, 0x1F251).addRange(0x1F260, 0x1F265).addRange(0x1F300, 0x1F6D7).addRange(0x1F6DD, 0x1F6EC).addRange(0x1F6F0, 0x1F6FC).addRange(0x1F700, 0x1F773).addRange(0x1F780, 0x1F7D8).addRange(0x1F7E0, 0x1F7EB).addRange(0x1F800, 0x1F80B).addRange(0x1F810, 0x1F847).addRange(0x1F850, 0x1F859).addRange(0x1F860, 0x1F887).addRange(0x1F890, 0x1F8AD).addRange(0x1F8B0, 0x1F8B1).addRange(0x1F900, 0x1FA53).addRange(0x1FA60, 0x1FA6D).addRange(0x1FA70, 0x1FA74).addRange(0x1FA78, 0x1FA7C).addRange(0x1FA80, 0x1FA86).addRange(0x1FA90, 0x1FAAC).addRange(0x1FAB0, 0x1FABA).addRange(0x1FAC0, 0x1FAC5).addRange(0x1FAD0, 0x1FAD9).addRange(0x1FAE0, 0x1FAE7).addRange(0x1FAF0, 0x1FAF6).addRange(0x1FB00, 0x1FB92).addRange(0x1FB94, 0x1FBCA).addRange(0x1FBF0, 0x1FBF9).addRange(0xE0020, 0xE007F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Coptic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x3E2, 0x3EF).addRange(0x2C80, 0x2CF3).addRange(0x2CF9, 0x2CFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cuneiform.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x12000, 0x12399).addRange(0x12400, 0x1246E).addRange(0x12470, 0x12474).addRange(0x12480, 0x12543);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cypriot.js\", function (module, exports) {\n\t const set = regenerate(0x10808, 0x1083C, 0x1083F);\n\tset.addRange(0x10800, 0x10805).addRange(0x1080A, 0x10835).addRange(0x10837, 0x10838);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cypro_Minoan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x12F90, 0x12FF2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Cyrillic.js\", function (module, exports) {\n\t const set = regenerate(0x1D2B, 0x1D78);\n\tset.addRange(0x400, 0x484).addRange(0x487, 0x52F).addRange(0x1C80, 0x1C88).addRange(0x2DE0, 0x2DFF).addRange(0xA640, 0xA69F).addRange(0xFE2E, 0xFE2F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Deseret.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10400, 0x1044F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Devanagari.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x900, 0x950).addRange(0x955, 0x963).addRange(0x966, 0x97F).addRange(0xA8E0, 0xA8FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Dives_Akuru.js\", function (module, exports) {\n\t const set = regenerate(0x11909);\n\tset.addRange(0x11900, 0x11906).addRange(0x1190C, 0x11913).addRange(0x11915, 0x11916).addRange(0x11918, 0x11935).addRange(0x11937, 0x11938).addRange(0x1193B, 0x11946).addRange(0x11950, 0x11959);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Dogra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11800, 0x1183B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Duployan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1BC00, 0x1BC6A).addRange(0x1BC70, 0x1BC7C).addRange(0x1BC80, 0x1BC88).addRange(0x1BC90, 0x1BC99).addRange(0x1BC9C, 0x1BC9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Egyptian_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x13000, 0x1342E).addRange(0x13430, 0x13438);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Elbasan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10500, 0x10527);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Elymaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10FE0, 0x10FF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ethiopic.js\", function (module, exports) {\n\t const set = regenerate(0x1258, 0x12C0);\n\tset.addRange(0x1200, 0x1248).addRange(0x124A, 0x124D).addRange(0x1250, 0x1256).addRange(0x125A, 0x125D).addRange(0x1260, 0x1288).addRange(0x128A, 0x128D).addRange(0x1290, 0x12B0).addRange(0x12B2, 0x12B5).addRange(0x12B8, 0x12BE).addRange(0x12C2, 0x12C5).addRange(0x12C8, 0x12D6).addRange(0x12D8, 0x1310).addRange(0x1312, 0x1315).addRange(0x1318, 0x135A).addRange(0x135D, 0x137C).addRange(0x1380, 0x1399).addRange(0x2D80, 0x2D96).addRange(0x2DA0, 0x2DA6).addRange(0x2DA8, 0x2DAE).addRange(0x2DB0, 0x2DB6).addRange(0x2DB8, 0x2DBE).addRange(0x2DC0, 0x2DC6).addRange(0x2DC8, 0x2DCE).addRange(0x2DD0, 0x2DD6).addRange(0x2DD8, 0x2DDE).addRange(0xAB01, 0xAB06).addRange(0xAB09, 0xAB0E).addRange(0xAB11, 0xAB16).addRange(0xAB20, 0xAB26).addRange(0xAB28, 0xAB2E).addRange(0x1E7E0, 0x1E7E6).addRange(0x1E7E8, 0x1E7EB).addRange(0x1E7ED, 0x1E7EE).addRange(0x1E7F0, 0x1E7FE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Georgian.js\", function (module, exports) {\n\t const set = regenerate(0x10C7, 0x10CD, 0x2D27, 0x2D2D);\n\tset.addRange(0x10A0, 0x10C5).addRange(0x10D0, 0x10FA).addRange(0x10FC, 0x10FF).addRange(0x1C90, 0x1CBA).addRange(0x1CBD, 0x1CBF).addRange(0x2D00, 0x2D25);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Glagolitic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x2C00, 0x2C5F).addRange(0x1E000, 0x1E006).addRange(0x1E008, 0x1E018).addRange(0x1E01B, 0x1E021).addRange(0x1E023, 0x1E024).addRange(0x1E026, 0x1E02A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gothic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10330, 0x1034A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Grantha.js\", function (module, exports) {\n\t const set = regenerate(0x11350, 0x11357);\n\tset.addRange(0x11300, 0x11303).addRange(0x11305, 0x1130C).addRange(0x1130F, 0x11310).addRange(0x11313, 0x11328).addRange(0x1132A, 0x11330).addRange(0x11332, 0x11333).addRange(0x11335, 0x11339).addRange(0x1133C, 0x11344).addRange(0x11347, 0x11348).addRange(0x1134B, 0x1134D).addRange(0x1135D, 0x11363).addRange(0x11366, 0x1136C).addRange(0x11370, 0x11374);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Greek.js\", function (module, exports) {\n\t const set = regenerate(0x37F, 0x384, 0x386, 0x38C, 0x1DBF, 0x1F59, 0x1F5B, 0x1F5D, 0x2126, 0xAB65, 0x101A0);\n\tset.addRange(0x370, 0x373).addRange(0x375, 0x377).addRange(0x37A, 0x37D).addRange(0x388, 0x38A).addRange(0x38E, 0x3A1).addRange(0x3A3, 0x3E1).addRange(0x3F0, 0x3FF).addRange(0x1D26, 0x1D2A).addRange(0x1D5D, 0x1D61).addRange(0x1D66, 0x1D6A).addRange(0x1F00, 0x1F15).addRange(0x1F18, 0x1F1D).addRange(0x1F20, 0x1F45).addRange(0x1F48, 0x1F4D).addRange(0x1F50, 0x1F57).addRange(0x1F5F, 0x1F7D).addRange(0x1F80, 0x1FB4).addRange(0x1FB6, 0x1FC4).addRange(0x1FC6, 0x1FD3).addRange(0x1FD6, 0x1FDB).addRange(0x1FDD, 0x1FEF).addRange(0x1FF2, 0x1FF4).addRange(0x1FF6, 0x1FFE).addRange(0x10140, 0x1018E).addRange(0x1D200, 0x1D245);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gujarati.js\", function (module, exports) {\n\t const set = regenerate(0xAD0);\n\tset.addRange(0xA81, 0xA83).addRange(0xA85, 0xA8D).addRange(0xA8F, 0xA91).addRange(0xA93, 0xAA8).addRange(0xAAA, 0xAB0).addRange(0xAB2, 0xAB3).addRange(0xAB5, 0xAB9).addRange(0xABC, 0xAC5).addRange(0xAC7, 0xAC9).addRange(0xACB, 0xACD).addRange(0xAE0, 0xAE3).addRange(0xAE6, 0xAF1).addRange(0xAF9, 0xAFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gunjala_Gondi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11D60, 0x11D65).addRange(0x11D67, 0x11D68).addRange(0x11D6A, 0x11D8E).addRange(0x11D90, 0x11D91).addRange(0x11D93, 0x11D98).addRange(0x11DA0, 0x11DA9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Gurmukhi.js\", function (module, exports) {\n\t const set = regenerate(0xA3C, 0xA51, 0xA5E);\n\tset.addRange(0xA01, 0xA03).addRange(0xA05, 0xA0A).addRange(0xA0F, 0xA10).addRange(0xA13, 0xA28).addRange(0xA2A, 0xA30).addRange(0xA32, 0xA33).addRange(0xA35, 0xA36).addRange(0xA38, 0xA39).addRange(0xA3E, 0xA42).addRange(0xA47, 0xA48).addRange(0xA4B, 0xA4D).addRange(0xA59, 0xA5C).addRange(0xA66, 0xA76);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Han.js\", function (module, exports) {\n\t const set = regenerate(0x3005, 0x3007);\n\tset.addRange(0x2E80, 0x2E99).addRange(0x2E9B, 0x2EF3).addRange(0x2F00, 0x2FD5).addRange(0x3021, 0x3029).addRange(0x3038, 0x303B).addRange(0x3400, 0x4DBF).addRange(0x4E00, 0x9FFF).addRange(0xF900, 0xFA6D).addRange(0xFA70, 0xFAD9).addRange(0x16FE2, 0x16FE3).addRange(0x16FF0, 0x16FF1).addRange(0x20000, 0x2A6DF).addRange(0x2A700, 0x2B738).addRange(0x2B740, 0x2B81D).addRange(0x2B820, 0x2CEA1).addRange(0x2CEB0, 0x2EBE0).addRange(0x2F800, 0x2FA1D).addRange(0x30000, 0x3134A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hangul.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1100, 0x11FF).addRange(0x302E, 0x302F).addRange(0x3131, 0x318E).addRange(0x3200, 0x321E).addRange(0x3260, 0x327E).addRange(0xA960, 0xA97C).addRange(0xAC00, 0xD7A3).addRange(0xD7B0, 0xD7C6).addRange(0xD7CB, 0xD7FB).addRange(0xFFA0, 0xFFBE).addRange(0xFFC2, 0xFFC7).addRange(0xFFCA, 0xFFCF).addRange(0xFFD2, 0xFFD7).addRange(0xFFDA, 0xFFDC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hanifi_Rohingya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10D00, 0x10D27).addRange(0x10D30, 0x10D39);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hanunoo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1720, 0x1734);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hatran.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x108E0, 0x108F2).addRange(0x108F4, 0x108F5).addRange(0x108FB, 0x108FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hebrew.js\", function (module, exports) {\n\t const set = regenerate(0xFB3E);\n\tset.addRange(0x591, 0x5C7).addRange(0x5D0, 0x5EA).addRange(0x5EF, 0x5F4).addRange(0xFB1D, 0xFB36).addRange(0xFB38, 0xFB3C).addRange(0xFB40, 0xFB41).addRange(0xFB43, 0xFB44).addRange(0xFB46, 0xFB4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Hiragana.js\", function (module, exports) {\n\t const set = regenerate(0x1F200);\n\tset.addRange(0x3041, 0x3096).addRange(0x309D, 0x309F).addRange(0x1B001, 0x1B11F).addRange(0x1B150, 0x1B152);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Imperial_Aramaic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10840, 0x10855).addRange(0x10857, 0x1085F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Inherited.js\", function (module, exports) {\n\t const set = regenerate(0x670, 0x1CED, 0x1CF4, 0x101FD, 0x102E0, 0x1133B);\n\tset.addRange(0x300, 0x36F).addRange(0x485, 0x486).addRange(0x64B, 0x655).addRange(0x951, 0x954).addRange(0x1AB0, 0x1ACE).addRange(0x1CD0, 0x1CD2).addRange(0x1CD4, 0x1CE0).addRange(0x1CE2, 0x1CE8).addRange(0x1CF8, 0x1CF9).addRange(0x1DC0, 0x1DFF).addRange(0x200C, 0x200D).addRange(0x20D0, 0x20F0).addRange(0x302A, 0x302D).addRange(0x3099, 0x309A).addRange(0xFE00, 0xFE0F).addRange(0xFE20, 0xFE2D).addRange(0x1CF00, 0x1CF2D).addRange(0x1CF30, 0x1CF46).addRange(0x1D167, 0x1D169).addRange(0x1D17B, 0x1D182).addRange(0x1D185, 0x1D18B).addRange(0x1D1AA, 0x1D1AD).addRange(0xE0100, 0xE01EF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Inscriptional_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B60, 0x10B72).addRange(0x10B78, 0x10B7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Inscriptional_Parthian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B40, 0x10B55).addRange(0x10B58, 0x10B5F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Javanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA980, 0xA9CD).addRange(0xA9D0, 0xA9D9).addRange(0xA9DE, 0xA9DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kaithi.js\", function (module, exports) {\n\t const set = regenerate(0x110CD);\n\tset.addRange(0x11080, 0x110C2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kannada.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xC80, 0xC8C).addRange(0xC8E, 0xC90).addRange(0xC92, 0xCA8).addRange(0xCAA, 0xCB3).addRange(0xCB5, 0xCB9).addRange(0xCBC, 0xCC4).addRange(0xCC6, 0xCC8).addRange(0xCCA, 0xCCD).addRange(0xCD5, 0xCD6).addRange(0xCDD, 0xCDE).addRange(0xCE0, 0xCE3).addRange(0xCE6, 0xCEF).addRange(0xCF1, 0xCF2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Katakana.js\", function (module, exports) {\n\t const set = regenerate(0x1B000);\n\tset.addRange(0x30A1, 0x30FA).addRange(0x30FD, 0x30FF).addRange(0x31F0, 0x31FF).addRange(0x32D0, 0x32FE).addRange(0x3300, 0x3357).addRange(0xFF66, 0xFF6F).addRange(0xFF71, 0xFF9D).addRange(0x1AFF0, 0x1AFF3).addRange(0x1AFF5, 0x1AFFB).addRange(0x1AFFD, 0x1AFFE).addRange(0x1B120, 0x1B122).addRange(0x1B164, 0x1B167);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kayah_Li.js\", function (module, exports) {\n\t const set = regenerate(0xA92F);\n\tset.addRange(0xA900, 0xA92D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Kharoshthi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A00, 0x10A03).addRange(0x10A05, 0x10A06).addRange(0x10A0C, 0x10A13).addRange(0x10A15, 0x10A17).addRange(0x10A19, 0x10A35).addRange(0x10A38, 0x10A3A).addRange(0x10A3F, 0x10A48).addRange(0x10A50, 0x10A58);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khitan_Small_Script.js\", function (module, exports) {\n\t const set = regenerate(0x16FE4);\n\tset.addRange(0x18B00, 0x18CD5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khmer.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1780, 0x17DD).addRange(0x17E0, 0x17E9).addRange(0x17F0, 0x17F9).addRange(0x19E0, 0x19FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khojki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11200, 0x11211).addRange(0x11213, 0x1123E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Khudawadi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x112B0, 0x112EA).addRange(0x112F0, 0x112F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lao.js\", function (module, exports) {\n\t const set = regenerate(0xE84, 0xEA5, 0xEC6);\n\tset.addRange(0xE81, 0xE82).addRange(0xE86, 0xE8A).addRange(0xE8C, 0xEA3).addRange(0xEA7, 0xEBD).addRange(0xEC0, 0xEC4).addRange(0xEC8, 0xECD).addRange(0xED0, 0xED9).addRange(0xEDC, 0xEDF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Latin.js\", function (module, exports) {\n\t const set = regenerate(0xAA, 0xBA, 0x2071, 0x207F, 0x2132, 0x214E, 0xA7D3);\n\tset.addRange(0x41, 0x5A).addRange(0x61, 0x7A).addRange(0xC0, 0xD6).addRange(0xD8, 0xF6).addRange(0xF8, 0x2B8).addRange(0x2E0, 0x2E4).addRange(0x1D00, 0x1D25).addRange(0x1D2C, 0x1D5C).addRange(0x1D62, 0x1D65).addRange(0x1D6B, 0x1D77).addRange(0x1D79, 0x1DBE).addRange(0x1E00, 0x1EFF).addRange(0x2090, 0x209C).addRange(0x212A, 0x212B).addRange(0x2160, 0x2188).addRange(0x2C60, 0x2C7F).addRange(0xA722, 0xA787).addRange(0xA78B, 0xA7CA).addRange(0xA7D0, 0xA7D1).addRange(0xA7D5, 0xA7D9).addRange(0xA7F2, 0xA7FF).addRange(0xAB30, 0xAB5A).addRange(0xAB5C, 0xAB64).addRange(0xAB66, 0xAB69).addRange(0xFB00, 0xFB06).addRange(0xFF21, 0xFF3A).addRange(0xFF41, 0xFF5A).addRange(0x10780, 0x10785).addRange(0x10787, 0x107B0).addRange(0x107B2, 0x107BA).addRange(0x1DF00, 0x1DF1E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lepcha.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C00, 0x1C37).addRange(0x1C3B, 0x1C49).addRange(0x1C4D, 0x1C4F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Limbu.js\", function (module, exports) {\n\t const set = regenerate(0x1940);\n\tset.addRange(0x1900, 0x191E).addRange(0x1920, 0x192B).addRange(0x1930, 0x193B).addRange(0x1944, 0x194F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Linear_A.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10600, 0x10736).addRange(0x10740, 0x10755).addRange(0x10760, 0x10767);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Linear_B.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10000, 0x1000B).addRange(0x1000D, 0x10026).addRange(0x10028, 0x1003A).addRange(0x1003C, 0x1003D).addRange(0x1003F, 0x1004D).addRange(0x10050, 0x1005D).addRange(0x10080, 0x100FA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lisu.js\", function (module, exports) {\n\t const set = regenerate(0x11FB0);\n\tset.addRange(0xA4D0, 0xA4FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lycian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10280, 0x1029C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Lydian.js\", function (module, exports) {\n\t const set = regenerate(0x1093F);\n\tset.addRange(0x10920, 0x10939);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mahajani.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11150, 0x11176);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Makasar.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11EE0, 0x11EF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Malayalam.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xD00, 0xD0C).addRange(0xD0E, 0xD10).addRange(0xD12, 0xD44).addRange(0xD46, 0xD48).addRange(0xD4A, 0xD4F).addRange(0xD54, 0xD63).addRange(0xD66, 0xD7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mandaic.js\", function (module, exports) {\n\t const set = regenerate(0x85E);\n\tset.addRange(0x840, 0x85B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Manichaean.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10AC0, 0x10AE6).addRange(0x10AEB, 0x10AF6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Marchen.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11C70, 0x11C8F).addRange(0x11C92, 0x11CA7).addRange(0x11CA9, 0x11CB6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Masaram_Gondi.js\", function (module, exports) {\n\t const set = regenerate(0x11D3A);\n\tset.addRange(0x11D00, 0x11D06).addRange(0x11D08, 0x11D09).addRange(0x11D0B, 0x11D36).addRange(0x11D3C, 0x11D3D).addRange(0x11D3F, 0x11D47).addRange(0x11D50, 0x11D59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Medefaidrin.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16E40, 0x16E9A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Meetei_Mayek.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAAE0, 0xAAF6).addRange(0xABC0, 0xABED).addRange(0xABF0, 0xABF9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mende_Kikakui.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E800, 0x1E8C4).addRange(0x1E8C7, 0x1E8D6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Meroitic_Cursive.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x109A0, 0x109B7).addRange(0x109BC, 0x109CF).addRange(0x109D2, 0x109FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Meroitic_Hieroglyphs.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10980, 0x1099F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Miao.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16F00, 0x16F4A).addRange(0x16F4F, 0x16F87).addRange(0x16F8F, 0x16F9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Modi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11600, 0x11644).addRange(0x11650, 0x11659);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mongolian.js\", function (module, exports) {\n\t const set = regenerate(0x1804);\n\tset.addRange(0x1800, 0x1801).addRange(0x1806, 0x1819).addRange(0x1820, 0x1878).addRange(0x1880, 0x18AA).addRange(0x11660, 0x1166C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Mro.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A40, 0x16A5E).addRange(0x16A60, 0x16A69).addRange(0x16A6E, 0x16A6F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Multani.js\", function (module, exports) {\n\t const set = regenerate(0x11288);\n\tset.addRange(0x11280, 0x11286).addRange(0x1128A, 0x1128D).addRange(0x1128F, 0x1129D).addRange(0x1129F, 0x112A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Myanmar.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1000, 0x109F).addRange(0xA9E0, 0xA9FE).addRange(0xAA60, 0xAA7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nabataean.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10880, 0x1089E).addRange(0x108A7, 0x108AF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nandinagari.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x119A0, 0x119A7).addRange(0x119AA, 0x119D7).addRange(0x119DA, 0x119E4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/New_Tai_Lue.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1980, 0x19AB).addRange(0x19B0, 0x19C9).addRange(0x19D0, 0x19DA).addRange(0x19DE, 0x19DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Newa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11400, 0x1145B).addRange(0x1145D, 0x11461);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nko.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x7C0, 0x7FA).addRange(0x7FD, 0x7FF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nushu.js\", function (module, exports) {\n\t const set = regenerate(0x16FE1);\n\tset.addRange(0x1B170, 0x1B2FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Nyiakeng_Puachue_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E100, 0x1E12C).addRange(0x1E130, 0x1E13D).addRange(0x1E140, 0x1E149).addRange(0x1E14E, 0x1E14F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ogham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1680, 0x169C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ol_Chiki.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1C50, 0x1C7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Hungarian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C80, 0x10CB2).addRange(0x10CC0, 0x10CF2).addRange(0x10CFA, 0x10CFF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Italic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10300, 0x10323).addRange(0x1032D, 0x1032F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_North_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A80, 0x10A9F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Permic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10350, 0x1037A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Persian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x103A0, 0x103C3).addRange(0x103C8, 0x103D5);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Sogdian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F00, 0x10F27);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_South_Arabian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10A60, 0x10A7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Turkic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10C00, 0x10C48);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Old_Uyghur.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F70, 0x10F89);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Oriya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xB01, 0xB03).addRange(0xB05, 0xB0C).addRange(0xB0F, 0xB10).addRange(0xB13, 0xB28).addRange(0xB2A, 0xB30).addRange(0xB32, 0xB33).addRange(0xB35, 0xB39).addRange(0xB3C, 0xB44).addRange(0xB47, 0xB48).addRange(0xB4B, 0xB4D).addRange(0xB55, 0xB57).addRange(0xB5C, 0xB5D).addRange(0xB5F, 0xB63).addRange(0xB66, 0xB77);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Osage.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x104B0, 0x104D3).addRange(0x104D8, 0x104FB);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Osmanya.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10480, 0x1049D).addRange(0x104A0, 0x104A9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Pahawh_Hmong.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16B00, 0x16B45).addRange(0x16B50, 0x16B59).addRange(0x16B5B, 0x16B61).addRange(0x16B63, 0x16B77).addRange(0x16B7D, 0x16B8F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Palmyrene.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10860, 0x1087F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Pau_Cin_Hau.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11AC0, 0x11AF8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Phags_Pa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA840, 0xA877);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Phoenician.js\", function (module, exports) {\n\t const set = regenerate(0x1091F);\n\tset.addRange(0x10900, 0x1091B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Psalter_Pahlavi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10B80, 0x10B91).addRange(0x10B99, 0x10B9C).addRange(0x10BA9, 0x10BAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Rejang.js\", function (module, exports) {\n\t const set = regenerate(0xA95F);\n\tset.addRange(0xA930, 0xA953);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Runic.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A0, 0x16EA).addRange(0x16EE, 0x16F8);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Samaritan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x800, 0x82D).addRange(0x830, 0x83E);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Saurashtra.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA880, 0xA8C5).addRange(0xA8CE, 0xA8D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sharada.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11180, 0x111DF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Shavian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10450, 0x1047F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Siddham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11580, 0x115B5).addRange(0x115B8, 0x115DD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/SignWriting.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1D800, 0x1DA8B).addRange(0x1DA9B, 0x1DA9F).addRange(0x1DAA1, 0x1DAAF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sinhala.js\", function (module, exports) {\n\t const set = regenerate(0xDBD, 0xDCA, 0xDD6);\n\tset.addRange(0xD81, 0xD83).addRange(0xD85, 0xD96).addRange(0xD9A, 0xDB1).addRange(0xDB3, 0xDBB).addRange(0xDC0, 0xDC6).addRange(0xDCF, 0xDD4).addRange(0xDD8, 0xDDF).addRange(0xDE6, 0xDEF).addRange(0xDF2, 0xDF4).addRange(0x111E1, 0x111F4);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sogdian.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10F30, 0x10F59);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sora_Sompeng.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x110D0, 0x110E8).addRange(0x110F0, 0x110F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Soyombo.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A50, 0x11AA2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Sundanese.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1B80, 0x1BBF).addRange(0x1CC0, 0x1CC7);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Syloti_Nagri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA800, 0xA82C);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Syriac.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x700, 0x70D).addRange(0x70F, 0x74A).addRange(0x74D, 0x74F).addRange(0x860, 0x86A);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tagalog.js\", function (module, exports) {\n\t const set = regenerate(0x171F);\n\tset.addRange(0x1700, 0x1715);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tagbanwa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1760, 0x176C).addRange(0x176E, 0x1770).addRange(0x1772, 0x1773);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tai_Le.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1950, 0x196D).addRange(0x1970, 0x1974);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tai_Tham.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1A20, 0x1A5E).addRange(0x1A60, 0x1A7C).addRange(0x1A7F, 0x1A89).addRange(0x1A90, 0x1A99).addRange(0x1AA0, 0x1AAD);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tai_Viet.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xAA80, 0xAAC2).addRange(0xAADB, 0xAADF);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Takri.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11680, 0x116B9).addRange(0x116C0, 0x116C9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tamil.js\", function (module, exports) {\n\t const set = regenerate(0xB9C, 0xBD0, 0xBD7, 0x11FFF);\n\tset.addRange(0xB82, 0xB83).addRange(0xB85, 0xB8A).addRange(0xB8E, 0xB90).addRange(0xB92, 0xB95).addRange(0xB99, 0xB9A).addRange(0xB9E, 0xB9F).addRange(0xBA3, 0xBA4).addRange(0xBA8, 0xBAA).addRange(0xBAE, 0xBB9).addRange(0xBBE, 0xBC2).addRange(0xBC6, 0xBC8).addRange(0xBCA, 0xBCD).addRange(0xBE6, 0xBFA).addRange(0x11FC0, 0x11FF1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tangsa.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x16A70, 0x16ABE).addRange(0x16AC0, 0x16AC9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tangut.js\", function (module, exports) {\n\t const set = regenerate(0x16FE0);\n\tset.addRange(0x17000, 0x187F7).addRange(0x18800, 0x18AFF).addRange(0x18D00, 0x18D08);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Telugu.js\", function (module, exports) {\n\t const set = regenerate(0xC5D);\n\tset.addRange(0xC00, 0xC0C).addRange(0xC0E, 0xC10).addRange(0xC12, 0xC28).addRange(0xC2A, 0xC39).addRange(0xC3C, 0xC44).addRange(0xC46, 0xC48).addRange(0xC4A, 0xC4D).addRange(0xC55, 0xC56).addRange(0xC58, 0xC5A).addRange(0xC60, 0xC63).addRange(0xC66, 0xC6F).addRange(0xC77, 0xC7F);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Thaana.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x780, 0x7B1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Thai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xE01, 0xE3A).addRange(0xE40, 0xE5B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tibetan.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xF00, 0xF47).addRange(0xF49, 0xF6C).addRange(0xF71, 0xF97).addRange(0xF99, 0xFBC).addRange(0xFBE, 0xFCC).addRange(0xFCE, 0xFD4).addRange(0xFD9, 0xFDA);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tifinagh.js\", function (module, exports) {\n\t const set = regenerate(0x2D7F);\n\tset.addRange(0x2D30, 0x2D67).addRange(0x2D6F, 0x2D70);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Tirhuta.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11480, 0x114C7).addRange(0x114D0, 0x114D9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Toto.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x1E290, 0x1E2AE);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Ugaritic.js\", function (module, exports) {\n\t const set = regenerate(0x1039F);\n\tset.addRange(0x10380, 0x1039D);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Vai.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA500, 0xA62B);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Vithkuqi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10570, 0x1057A).addRange(0x1057C, 0x1058A).addRange(0x1058C, 0x10592).addRange(0x10594, 0x10595).addRange(0x10597, 0x105A1).addRange(0x105A3, 0x105B1).addRange(0x105B3, 0x105B9).addRange(0x105BB, 0x105BC);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Wancho.js\", function (module, exports) {\n\t const set = regenerate(0x1E2FF);\n\tset.addRange(0x1E2C0, 0x1E2F9);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Warang_Citi.js\", function (module, exports) {\n\t const set = regenerate(0x118FF);\n\tset.addRange(0x118A0, 0x118F2);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Yezidi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x10E80, 0x10EA9).addRange(0x10EAB, 0x10EAD).addRange(0x10EB0, 0x10EB1);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Yi.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0xA000, 0xA48C).addRange(0xA490, 0xA4C6);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/Script/Zanabazar_Square.js\", function (module, exports) {\n\t const set = regenerate();\n\tset.addRange(0x11A00, 0x11A47);\n\tmodule.exports = set;\n\n\t});\n\n\tcommonjsRegister(\"/$$rollup_base$$/node_modules/regenerate-unicode-properties/unicode-version.js\", function (module, exports) {\n\t module.exports = '14.0.0';\n\n\t});\n\n\tfunction _defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t var descriptor = props[i];\n\t descriptor.enumerable = descriptor.enumerable || false;\n\t descriptor.configurable = true;\n\t if (\"value\" in descriptor) descriptor.writable = true;\n\t Object.defineProperty(target, descriptor.key, descriptor);\n\t }\n\t}\n\n\tfunction _createClass(Constructor, protoProps, staticProps) {\n\t if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\t if (staticProps) _defineProperties(Constructor, staticProps);\n\t return Constructor;\n\t}\n\n\tfunction _inherits(subClass, superClass) {\n\t if (typeof superClass !== \"function\" && superClass !== null) {\n\t throw new TypeError(\"Super expression must either be null or a function\");\n\t }\n\n\t subClass.prototype = Object.create(superClass && superClass.prototype, {\n\t constructor: {\n\t value: subClass,\n\t writable: true,\n\t configurable: true\n\t }\n\t });\n\t if (superClass) _setPrototypeOf(subClass, superClass);\n\t}\n\n\tfunction _setPrototypeOf(o, p) {\n\t _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n\t o.__proto__ = p;\n\t return o;\n\t };\n\n\t return _setPrototypeOf(o, p);\n\t}\n\n\tfunction _objectWithoutPropertiesLoose(source, excluded) {\n\t if (source == null) return {};\n\t var target = {};\n\t var sourceKeys = Object.keys(source);\n\t var key, i;\n\n\t for (i = 0; i < sourceKeys.length; i++) {\n\t key = sourceKeys[i];\n\t if (excluded.indexOf(key) >= 0) continue;\n\t target[key] = source[key];\n\t }\n\n\t return target;\n\t}\n\n\tfunction _objectWithoutProperties(source, excluded) {\n\t if (source == null) return {};\n\n\t var target = _objectWithoutPropertiesLoose(source, excluded);\n\n\t var key, i;\n\n\t if (Object.getOwnPropertySymbols) {\n\t var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n\t for (i = 0; i < sourceSymbolKeys.length; i++) {\n\t key = sourceSymbolKeys[i];\n\t if (excluded.indexOf(key) >= 0) continue;\n\t if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n\t target[key] = source[key];\n\t }\n\t }\n\n\t return target;\n\t}\n\n\tfunction _taggedTemplateLiteralLoose(strings, raw) {\n\t if (!raw) {\n\t raw = strings.slice(0);\n\t }\n\n\t strings.raw = raw;\n\t return strings;\n\t}\n\n\tfunction _slicedToArray$1(arr, i) {\n\t return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n\t}\n\n\tfunction _toConsumableArray(arr) {\n\t return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n\t}\n\n\tfunction _arrayWithoutHoles(arr) {\n\t if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n\t}\n\n\tfunction _arrayWithHoles(arr) {\n\t if (Array.isArray(arr)) return arr;\n\t}\n\n\tfunction _iterableToArray(iter) {\n\t if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n\t}\n\n\tfunction _iterableToArrayLimit(arr, i) {\n\t var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n\t if (_i == null) return;\n\t var _arr = [];\n\t var _n = true;\n\t var _d = false;\n\n\t var _s, _e;\n\n\t try {\n\t for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n\t _arr.push(_s.value);\n\n\t if (i && _arr.length === i) break;\n\t }\n\t } catch (err) {\n\t _d = true;\n\t _e = err;\n\t } finally {\n\t try {\n\t if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n\t } finally {\n\t if (_d) throw _e;\n\t }\n\t }\n\n\t return _arr;\n\t}\n\n\tfunction _unsupportedIterableToArray(o, minLen) {\n\t if (!o) return;\n\t if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n\t var n = Object.prototype.toString.call(o).slice(8, -1);\n\t if (n === \"Object\" && o.constructor) n = o.constructor.name;\n\t if (n === \"Map\" || n === \"Set\") return Array.from(o);\n\t if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n\t}\n\n\tfunction _arrayLikeToArray(arr, len) {\n\t if (len == null || len > arr.length) len = arr.length;\n\n\t for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n\t return arr2;\n\t}\n\n\tfunction _nonIterableSpread() {\n\t throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tfunction _nonIterableRest() {\n\t throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n\t var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n\t if (it) return (it = it.call(o)).next.bind(it);\n\n\t if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n\t if (it) o = it;\n\t var i = 0;\n\t return function () {\n\t if (i >= o.length) return {\n\t done: true\n\t };\n\t return {\n\t done: false,\n\t value: o[i++]\n\t };\n\t };\n\t }\n\n\t throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tfunction shallowEqual(actual, expected) {\n\t var keys = Object.keys(expected);\n\n\t for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {\n\t var key = _keys[_i];\n\n\t if (actual[key] !== expected[key]) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}\n\n\tfunction isArrayExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrayExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAssignmentExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AssignmentExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBinaryExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BinaryExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterpreterDirective(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterpreterDirective\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDirective(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Directive\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDirectiveLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DirectiveLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBlockStatement$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BlockStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBreakStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BreakStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isCallExpression$6(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"CallExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isCatchClause(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"CatchClause\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isConditionalExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ConditionalExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isContinueStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ContinueStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDebuggerStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DebuggerStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDoWhileStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DoWhileStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEmptyStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EmptyStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExpressionStatement$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExpressionStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFile$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"File\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForInStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ForInStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForStatement$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ForStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIdentifier$g(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Identifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIfStatement$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"IfStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLabeledStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"LabeledStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStringLiteral$7(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StringLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumericLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumericLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNullLiteral$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NullLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBooleanLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BooleanLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRegExpLiteral$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RegExpLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLogicalExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"LogicalExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMemberExpression$8(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"MemberExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNewExpression$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NewExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isProgram$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Program\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectMethod$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectProperty$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRestElement$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RestElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isReturnStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ReturnStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSequenceExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SequenceExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isParenthesizedExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ParenthesizedExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSwitchCase(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SwitchCase\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSwitchStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SwitchStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isThisExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ThisExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isThrowStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ThrowStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTryStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TryStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUnaryExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"UnaryExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUpdateExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"UpdateExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVariableDeclaration$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"VariableDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVariableDeclarator$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"VariableDeclarator\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isWhileStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"WhileStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isWithStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"WithStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAssignmentPattern$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AssignmentPattern\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArrayPattern(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrayPattern\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArrowFunctionExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrowFunctionExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassBody$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassDeclaration$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportAllDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportAllDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportDefaultDeclaration$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportDefaultDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportNamedDeclaration$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportNamedDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportSpecifier(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForOfStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ForOfStatement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportDeclaration$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportDefaultSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportDefaultSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportNamespaceSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportNamespaceSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMetaProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"MetaProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassMethod$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectPattern$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectPattern\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSpreadElement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SpreadElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSuper$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Super\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTaggedTemplateExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TaggedTemplateExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTemplateElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TemplateElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTemplateLiteral$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TemplateLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isYieldExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"YieldExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAwaitExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AwaitExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImport(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Import\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBigIntLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BigIntLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportNamespaceSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportNamespaceSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOptionalMemberExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OptionalMemberExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOptionalCallExpression$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OptionalCallExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassPrivateProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassPrivateProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassPrivateMethod(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassPrivateMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPrivateName$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PrivateName\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isAnyTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"AnyTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArrayTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArrayTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBooleanTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BooleanTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBooleanLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BooleanLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNullLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NullLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClassImplements(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ClassImplements\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareClass(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareClass\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareFunction(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareFunction\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareInterface(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareInterface\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareModule(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareModule\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareModuleExports(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareModuleExports\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareTypeAlias(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareTypeAlias\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareOpaqueType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareOpaqueType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareVariable(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareVariable\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareExportDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareExportDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclareExportAllDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclareExportAllDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclaredPredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DeclaredPredicate\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExistsTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExistsTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionTypeParam(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"FunctionTypeParam\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isGenericTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"GenericTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInferredPredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InferredPredicate\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterfaceExtends(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterfaceExtends\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterfaceDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterfaceDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isInterfaceTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"InterfaceTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIntersectionTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"IntersectionTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMixedTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"MixedTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEmptyTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EmptyTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNullableTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NullableTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumberLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumberLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumberTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumberTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeInternalSlot(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeInternalSlot\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeCallProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeCallProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeIndexer(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeIndexer\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectTypeSpreadProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ObjectTypeSpreadProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOpaqueType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OpaqueType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isQualifiedTypeIdentifier(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"QualifiedTypeIdentifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStringLiteralTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StringLiteralTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStringTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StringTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSymbolTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SymbolTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isThisTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ThisTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTupleTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TupleTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeofTypeAnnotation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeofTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeAlias(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeAlias\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeAnnotation$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeCastExpression$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeCastExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeParameter(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeParameter\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeParameterDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeParameterDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTypeParameterInstantiation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TypeParameterInstantiation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUnionTypeAnnotation$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"UnionTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVariance(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Variance\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isVoidTypeAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"VoidTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumBooleanBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumBooleanBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumNumberBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumNumberBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumStringBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumStringBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumSymbolBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumSymbolBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumBooleanMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumBooleanMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumNumberMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumNumberMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumStringMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumStringMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumDefaultedMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"EnumDefaultedMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isIndexedAccessType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"IndexedAccessType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isOptionalIndexedAccessType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"OptionalIndexedAccessType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXAttribute(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXAttribute\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXClosingElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXClosingElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXEmptyExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXEmptyExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXExpressionContainer$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXExpressionContainer\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXSpreadChild(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXSpreadChild\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXIdentifier$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXIdentifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXMemberExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXMemberExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXNamespacedName$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXNamespacedName\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXOpeningElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXOpeningElement\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXSpreadAttribute$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXSpreadAttribute\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXText(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXText\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXFragment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXFragment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXOpeningFragment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXOpeningFragment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSXClosingFragment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"JSXClosingFragment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNoop(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Noop\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPlaceholder$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Placeholder\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isV8IntrinsicIdentifier(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"V8IntrinsicIdentifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isArgumentPlaceholder(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ArgumentPlaceholder\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBindExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"BindExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isImportAttribute(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ImportAttribute\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDecorator(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"Decorator\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDoExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DoExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportDefaultSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ExportDefaultSpecifier\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRecordExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RecordExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTupleExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TupleExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDecimalLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"DecimalLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStaticBlock(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"StaticBlock\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isModuleExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"ModuleExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTopicReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TopicReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPipelineTopicExpression(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PipelineTopicExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPipelineBareFunction(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PipelineBareFunction\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPipelinePrimaryTopicReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"PipelinePrimaryTopicReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSParameterProperty(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSParameterProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSDeclareFunction(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSDeclareFunction\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSDeclareMethod(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSDeclareMethod\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSQualifiedName(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSQualifiedName\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSCallSignatureDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSCallSignatureDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSConstructSignatureDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSConstructSignatureDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSPropertySignature(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSPropertySignature\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSMethodSignature(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSMethodSignature\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIndexSignature(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIndexSignature\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSAnyKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSAnyKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSBooleanKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSBooleanKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSBigIntKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSBigIntKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIntrinsicKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIntrinsicKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNeverKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNeverKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNullKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNullKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNumberKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNumberKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSObjectKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSObjectKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSStringKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSStringKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSSymbolKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSSymbolKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSUndefinedKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSUndefinedKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSUnknownKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSUnknownKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSVoidKeyword(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSVoidKeyword\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSThisType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSThisType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSFunctionType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSFunctionType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSConstructorType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSConstructorType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypePredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypePredicate\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeQuery(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeQuery\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeLiteral(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSArrayType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSArrayType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTupleType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTupleType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSOptionalType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSOptionalType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSRestType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSRestType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNamedTupleMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNamedTupleMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSUnionType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSUnionType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIntersectionType$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIntersectionType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSConditionalType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSConditionalType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSInferType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSInferType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSParenthesizedType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSParenthesizedType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeOperator(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeOperator\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSIndexedAccessType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSIndexedAccessType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSMappedType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSMappedType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSLiteralType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSLiteralType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSExpressionWithTypeArguments(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSExpressionWithTypeArguments\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSInterfaceDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSInterfaceDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSInterfaceBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSInterfaceBody\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeAliasDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeAliasDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSAsExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSAsExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeAssertion$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeAssertion\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSEnumDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSEnumDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSEnumMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSEnumMember\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSModuleDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSModuleDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSModuleBlock(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSModuleBlock\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSImportType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSImportType\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSImportEqualsDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSImportEqualsDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSExternalModuleReference(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSExternalModuleReference\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNonNullExpression$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNonNullExpression\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSExportAssignment(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSExportAssignment\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSNamespaceExportDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSNamespaceExportDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeAnnotation$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeAnnotation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeParameterInstantiation(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeParameterInstantiation\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeParameterDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeParameterDeclaration\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeParameter(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"TSTypeParameter\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExpression$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ArrayExpression\" === nodeType || \"AssignmentExpression\" === nodeType || \"BinaryExpression\" === nodeType || \"CallExpression\" === nodeType || \"ConditionalExpression\" === nodeType || \"FunctionExpression\" === nodeType || \"Identifier\" === nodeType || \"StringLiteral\" === nodeType || \"NumericLiteral\" === nodeType || \"NullLiteral\" === nodeType || \"BooleanLiteral\" === nodeType || \"RegExpLiteral\" === nodeType || \"LogicalExpression\" === nodeType || \"MemberExpression\" === nodeType || \"NewExpression\" === nodeType || \"ObjectExpression\" === nodeType || \"SequenceExpression\" === nodeType || \"ParenthesizedExpression\" === nodeType || \"ThisExpression\" === nodeType || \"UnaryExpression\" === nodeType || \"UpdateExpression\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassExpression\" === nodeType || \"MetaProperty\" === nodeType || \"Super\" === nodeType || \"TaggedTemplateExpression\" === nodeType || \"TemplateLiteral\" === nodeType || \"YieldExpression\" === nodeType || \"AwaitExpression\" === nodeType || \"Import\" === nodeType || \"BigIntLiteral\" === nodeType || \"OptionalMemberExpression\" === nodeType || \"OptionalCallExpression\" === nodeType || \"TypeCastExpression\" === nodeType || \"JSXElement\" === nodeType || \"JSXFragment\" === nodeType || \"BindExpression\" === nodeType || \"DoExpression\" === nodeType || \"RecordExpression\" === nodeType || \"TupleExpression\" === nodeType || \"DecimalLiteral\" === nodeType || \"ModuleExpression\" === nodeType || \"TopicReference\" === nodeType || \"PipelineTopicExpression\" === nodeType || \"PipelineBareFunction\" === nodeType || \"PipelinePrimaryTopicReference\" === nodeType || \"TSAsExpression\" === nodeType || \"TSTypeAssertion\" === nodeType || \"TSNonNullExpression\" === nodeType || nodeType === \"Placeholder\" && (\"Expression\" === node.expectedNode || \"Identifier\" === node.expectedNode || \"StringLiteral\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBinary$3(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BinaryExpression\" === nodeType || \"LogicalExpression\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isScopable(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"CatchClause\" === nodeType || \"DoWhileStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"Program\" === nodeType || \"ObjectMethod\" === nodeType || \"SwitchStatement\" === nodeType || \"WhileStatement\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassExpression\" === nodeType || \"ClassDeclaration\" === nodeType || \"ForOfStatement\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType || \"StaticBlock\" === nodeType || \"TSModuleBlock\" === nodeType || nodeType === \"Placeholder\" && \"BlockStatement\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBlockParent(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"CatchClause\" === nodeType || \"DoWhileStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"Program\" === nodeType || \"ObjectMethod\" === nodeType || \"SwitchStatement\" === nodeType || \"WhileStatement\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ForOfStatement\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType || \"StaticBlock\" === nodeType || \"TSModuleBlock\" === nodeType || nodeType === \"Placeholder\" && \"BlockStatement\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isBlock(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"Program\" === nodeType || \"TSModuleBlock\" === nodeType || nodeType === \"Placeholder\" && \"BlockStatement\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isStatement$7(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BlockStatement\" === nodeType || \"BreakStatement\" === nodeType || \"ContinueStatement\" === nodeType || \"DebuggerStatement\" === nodeType || \"DoWhileStatement\" === nodeType || \"EmptyStatement\" === nodeType || \"ExpressionStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"FunctionDeclaration\" === nodeType || \"IfStatement\" === nodeType || \"LabeledStatement\" === nodeType || \"ReturnStatement\" === nodeType || \"SwitchStatement\" === nodeType || \"ThrowStatement\" === nodeType || \"TryStatement\" === nodeType || \"VariableDeclaration\" === nodeType || \"WhileStatement\" === nodeType || \"WithStatement\" === nodeType || \"ClassDeclaration\" === nodeType || \"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType || \"ForOfStatement\" === nodeType || \"ImportDeclaration\" === nodeType || \"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"OpaqueType\" === nodeType || \"TypeAlias\" === nodeType || \"EnumDeclaration\" === nodeType || \"TSDeclareFunction\" === nodeType || \"TSInterfaceDeclaration\" === nodeType || \"TSTypeAliasDeclaration\" === nodeType || \"TSEnumDeclaration\" === nodeType || \"TSModuleDeclaration\" === nodeType || \"TSImportEqualsDeclaration\" === nodeType || \"TSExportAssignment\" === nodeType || \"TSNamespaceExportDeclaration\" === nodeType || nodeType === \"Placeholder\" && (\"Statement\" === node.expectedNode || \"Declaration\" === node.expectedNode || \"BlockStatement\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTerminatorless(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BreakStatement\" === nodeType || \"ContinueStatement\" === nodeType || \"ReturnStatement\" === nodeType || \"ThrowStatement\" === nodeType || \"YieldExpression\" === nodeType || \"AwaitExpression\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isCompletionStatement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"BreakStatement\" === nodeType || \"ContinueStatement\" === nodeType || \"ReturnStatement\" === nodeType || \"ThrowStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isConditional$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ConditionalExpression\" === nodeType || \"IfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLoop$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DoWhileStatement\" === nodeType || \"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"WhileStatement\" === nodeType || \"ForOfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isWhile(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DoWhileStatement\" === nodeType || \"WhileStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExpressionWrapper(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExpressionStatement\" === nodeType || \"ParenthesizedExpression\" === nodeType || \"TypeCastExpression\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFor$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ForInStatement\" === nodeType || \"ForStatement\" === nodeType || \"ForOfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isForXStatement$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ForInStatement\" === nodeType || \"ForOfStatement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunction$4(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"ObjectMethod\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFunctionParent(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"ObjectMethod\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPureish$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"FunctionExpression\" === nodeType || \"StringLiteral\" === nodeType || \"NumericLiteral\" === nodeType || \"NullLiteral\" === nodeType || \"BooleanLiteral\" === nodeType || \"RegExpLiteral\" === nodeType || \"ArrowFunctionExpression\" === nodeType || \"BigIntLiteral\" === nodeType || \"DecimalLiteral\" === nodeType || nodeType === \"Placeholder\" && \"StringLiteral\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"FunctionDeclaration\" === nodeType || \"VariableDeclaration\" === nodeType || \"ClassDeclaration\" === nodeType || \"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType || \"ImportDeclaration\" === nodeType || \"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"OpaqueType\" === nodeType || \"TypeAlias\" === nodeType || \"EnumDeclaration\" === nodeType || \"TSDeclareFunction\" === nodeType || \"TSInterfaceDeclaration\" === nodeType || \"TSTypeAliasDeclaration\" === nodeType || \"TSEnumDeclaration\" === nodeType || \"TSModuleDeclaration\" === nodeType || nodeType === \"Placeholder\" && \"Declaration\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPatternLike(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"Identifier\" === nodeType || \"RestElement\" === nodeType || \"AssignmentPattern\" === nodeType || \"ArrayPattern\" === nodeType || \"ObjectPattern\" === nodeType || nodeType === \"Placeholder\" && (\"Pattern\" === node.expectedNode || \"Identifier\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLVal(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"Identifier\" === nodeType || \"MemberExpression\" === nodeType || \"RestElement\" === nodeType || \"AssignmentPattern\" === nodeType || \"ArrayPattern\" === nodeType || \"ObjectPattern\" === nodeType || \"TSParameterProperty\" === nodeType || nodeType === \"Placeholder\" && (\"Pattern\" === node.expectedNode || \"Identifier\" === node.expectedNode)) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSEntityName(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"Identifier\" === nodeType || \"TSQualifiedName\" === nodeType || nodeType === \"Placeholder\" && \"Identifier\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isLiteral$7(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"StringLiteral\" === nodeType || \"NumericLiteral\" === nodeType || \"NullLiteral\" === nodeType || \"BooleanLiteral\" === nodeType || \"RegExpLiteral\" === nodeType || \"TemplateLiteral\" === nodeType || \"BigIntLiteral\" === nodeType || \"DecimalLiteral\" === nodeType || nodeType === \"Placeholder\" && \"StringLiteral\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUserWhitespacable(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectMethod\" === nodeType || \"ObjectProperty\" === nodeType || \"ObjectTypeInternalSlot\" === nodeType || \"ObjectTypeCallProperty\" === nodeType || \"ObjectTypeIndexer\" === nodeType || \"ObjectTypeProperty\" === nodeType || \"ObjectTypeSpreadProperty\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isMethod$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectMethod\" === nodeType || \"ClassMethod\" === nodeType || \"ClassPrivateMethod\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isObjectMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectMethod\" === nodeType || \"ObjectProperty\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isProperty$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ObjectProperty\" === nodeType || \"ClassProperty\" === nodeType || \"ClassPrivateProperty\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isUnaryLike$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"UnaryExpression\" === nodeType || \"SpreadElement\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPattern(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AssignmentPattern\" === nodeType || \"ArrayPattern\" === nodeType || \"ObjectPattern\" === nodeType || nodeType === \"Placeholder\" && \"Pattern\" === node.expectedNode) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isClass$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ClassExpression\" === nodeType || \"ClassDeclaration\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isModuleDeclaration$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType || \"ImportDeclaration\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isExportDeclaration$2(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExportAllDeclaration\" === nodeType || \"ExportDefaultDeclaration\" === nodeType || \"ExportNamedDeclaration\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isModuleSpecifier$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ExportSpecifier\" === nodeType || \"ImportDefaultSpecifier\" === nodeType || \"ImportNamespaceSpecifier\" === nodeType || \"ImportSpecifier\" === nodeType || \"ExportNamespaceSpecifier\" === nodeType || \"ExportDefaultSpecifier\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isPrivate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"ClassPrivateProperty\" === nodeType || \"ClassPrivateMethod\" === nodeType || \"PrivateName\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlow$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AnyTypeAnnotation\" === nodeType || \"ArrayTypeAnnotation\" === nodeType || \"BooleanTypeAnnotation\" === nodeType || \"BooleanLiteralTypeAnnotation\" === nodeType || \"NullLiteralTypeAnnotation\" === nodeType || \"ClassImplements\" === nodeType || \"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"DeclaredPredicate\" === nodeType || \"ExistsTypeAnnotation\" === nodeType || \"FunctionTypeAnnotation\" === nodeType || \"FunctionTypeParam\" === nodeType || \"GenericTypeAnnotation\" === nodeType || \"InferredPredicate\" === nodeType || \"InterfaceExtends\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"InterfaceTypeAnnotation\" === nodeType || \"IntersectionTypeAnnotation\" === nodeType || \"MixedTypeAnnotation\" === nodeType || \"EmptyTypeAnnotation\" === nodeType || \"NullableTypeAnnotation\" === nodeType || \"NumberLiteralTypeAnnotation\" === nodeType || \"NumberTypeAnnotation\" === nodeType || \"ObjectTypeAnnotation\" === nodeType || \"ObjectTypeInternalSlot\" === nodeType || \"ObjectTypeCallProperty\" === nodeType || \"ObjectTypeIndexer\" === nodeType || \"ObjectTypeProperty\" === nodeType || \"ObjectTypeSpreadProperty\" === nodeType || \"OpaqueType\" === nodeType || \"QualifiedTypeIdentifier\" === nodeType || \"StringLiteralTypeAnnotation\" === nodeType || \"StringTypeAnnotation\" === nodeType || \"SymbolTypeAnnotation\" === nodeType || \"ThisTypeAnnotation\" === nodeType || \"TupleTypeAnnotation\" === nodeType || \"TypeofTypeAnnotation\" === nodeType || \"TypeAlias\" === nodeType || \"TypeAnnotation\" === nodeType || \"TypeCastExpression\" === nodeType || \"TypeParameter\" === nodeType || \"TypeParameterDeclaration\" === nodeType || \"TypeParameterInstantiation\" === nodeType || \"UnionTypeAnnotation\" === nodeType || \"Variance\" === nodeType || \"VoidTypeAnnotation\" === nodeType || \"IndexedAccessType\" === nodeType || \"OptionalIndexedAccessType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AnyTypeAnnotation\" === nodeType || \"ArrayTypeAnnotation\" === nodeType || \"BooleanTypeAnnotation\" === nodeType || \"BooleanLiteralTypeAnnotation\" === nodeType || \"NullLiteralTypeAnnotation\" === nodeType || \"ExistsTypeAnnotation\" === nodeType || \"FunctionTypeAnnotation\" === nodeType || \"GenericTypeAnnotation\" === nodeType || \"InterfaceTypeAnnotation\" === nodeType || \"IntersectionTypeAnnotation\" === nodeType || \"MixedTypeAnnotation\" === nodeType || \"EmptyTypeAnnotation\" === nodeType || \"NullableTypeAnnotation\" === nodeType || \"NumberLiteralTypeAnnotation\" === nodeType || \"NumberTypeAnnotation\" === nodeType || \"ObjectTypeAnnotation\" === nodeType || \"StringLiteralTypeAnnotation\" === nodeType || \"StringTypeAnnotation\" === nodeType || \"SymbolTypeAnnotation\" === nodeType || \"ThisTypeAnnotation\" === nodeType || \"TupleTypeAnnotation\" === nodeType || \"TypeofTypeAnnotation\" === nodeType || \"UnionTypeAnnotation\" === nodeType || \"VoidTypeAnnotation\" === nodeType || \"IndexedAccessType\" === nodeType || \"OptionalIndexedAccessType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowBaseAnnotation$1(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"AnyTypeAnnotation\" === nodeType || \"BooleanTypeAnnotation\" === nodeType || \"NullLiteralTypeAnnotation\" === nodeType || \"MixedTypeAnnotation\" === nodeType || \"EmptyTypeAnnotation\" === nodeType || \"NumberTypeAnnotation\" === nodeType || \"StringTypeAnnotation\" === nodeType || \"SymbolTypeAnnotation\" === nodeType || \"ThisTypeAnnotation\" === nodeType || \"VoidTypeAnnotation\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowDeclaration(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DeclareClass\" === nodeType || \"DeclareFunction\" === nodeType || \"DeclareInterface\" === nodeType || \"DeclareModule\" === nodeType || \"DeclareModuleExports\" === nodeType || \"DeclareTypeAlias\" === nodeType || \"DeclareOpaqueType\" === nodeType || \"DeclareVariable\" === nodeType || \"DeclareExportDeclaration\" === nodeType || \"DeclareExportAllDeclaration\" === nodeType || \"InterfaceDeclaration\" === nodeType || \"OpaqueType\" === nodeType || \"TypeAlias\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isFlowPredicate(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"DeclaredPredicate\" === nodeType || \"InferredPredicate\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumBody(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"EnumBooleanBody\" === nodeType || \"EnumNumberBody\" === nodeType || \"EnumStringBody\" === nodeType || \"EnumSymbolBody\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isEnumMember(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"EnumBooleanMember\" === nodeType || \"EnumNumberMember\" === nodeType || \"EnumStringMember\" === nodeType || \"EnumDefaultedMember\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isJSX(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"JSXAttribute\" === nodeType || \"JSXClosingElement\" === nodeType || \"JSXElement\" === nodeType || \"JSXEmptyExpression\" === nodeType || \"JSXExpressionContainer\" === nodeType || \"JSXSpreadChild\" === nodeType || \"JSXIdentifier\" === nodeType || \"JSXMemberExpression\" === nodeType || \"JSXNamespacedName\" === nodeType || \"JSXOpeningElement\" === nodeType || \"JSXSpreadAttribute\" === nodeType || \"JSXText\" === nodeType || \"JSXFragment\" === nodeType || \"JSXOpeningFragment\" === nodeType || \"JSXClosingFragment\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSTypeElement(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"TSCallSignatureDeclaration\" === nodeType || \"TSConstructSignatureDeclaration\" === nodeType || \"TSPropertySignature\" === nodeType || \"TSMethodSignature\" === nodeType || \"TSIndexSignature\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"TSAnyKeyword\" === nodeType || \"TSBooleanKeyword\" === nodeType || \"TSBigIntKeyword\" === nodeType || \"TSIntrinsicKeyword\" === nodeType || \"TSNeverKeyword\" === nodeType || \"TSNullKeyword\" === nodeType || \"TSNumberKeyword\" === nodeType || \"TSObjectKeyword\" === nodeType || \"TSStringKeyword\" === nodeType || \"TSSymbolKeyword\" === nodeType || \"TSUndefinedKeyword\" === nodeType || \"TSUnknownKeyword\" === nodeType || \"TSVoidKeyword\" === nodeType || \"TSThisType\" === nodeType || \"TSFunctionType\" === nodeType || \"TSConstructorType\" === nodeType || \"TSTypeReference\" === nodeType || \"TSTypePredicate\" === nodeType || \"TSTypeQuery\" === nodeType || \"TSTypeLiteral\" === nodeType || \"TSArrayType\" === nodeType || \"TSTupleType\" === nodeType || \"TSOptionalType\" === nodeType || \"TSRestType\" === nodeType || \"TSUnionType\" === nodeType || \"TSIntersectionType\" === nodeType || \"TSConditionalType\" === nodeType || \"TSInferType\" === nodeType || \"TSParenthesizedType\" === nodeType || \"TSTypeOperator\" === nodeType || \"TSIndexedAccessType\" === nodeType || \"TSMappedType\" === nodeType || \"TSLiteralType\" === nodeType || \"TSExpressionWithTypeArguments\" === nodeType || \"TSImportType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isTSBaseType(node, opts) {\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (\"TSAnyKeyword\" === nodeType || \"TSBooleanKeyword\" === nodeType || \"TSBigIntKeyword\" === nodeType || \"TSIntrinsicKeyword\" === nodeType || \"TSNeverKeyword\" === nodeType || \"TSNullKeyword\" === nodeType || \"TSNumberKeyword\" === nodeType || \"TSObjectKeyword\" === nodeType || \"TSStringKeyword\" === nodeType || \"TSSymbolKeyword\" === nodeType || \"TSUndefinedKeyword\" === nodeType || \"TSUnknownKeyword\" === nodeType || \"TSVoidKeyword\" === nodeType || \"TSThisType\" === nodeType || \"TSLiteralType\" === nodeType) {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isNumberLiteral(node, opts) {\n\t console.trace(\"The node type NumberLiteral has been renamed to NumericLiteral\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"NumberLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRegexLiteral(node, opts) {\n\t console.trace(\"The node type RegexLiteral has been renamed to RegExpLiteral\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RegexLiteral\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isRestProperty(node, opts) {\n\t console.trace(\"The node type RestProperty has been renamed to RestElement\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"RestProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\tfunction isSpreadProperty(node, opts) {\n\t console.trace(\"The node type SpreadProperty has been renamed to SpreadElement\");\n\t if (!node) return false;\n\t var nodeType = node.type;\n\n\t if (nodeType === \"SpreadProperty\") {\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction matchesPattern$2(member, match, allowPartial) {\n\t if (!isMemberExpression$8(member)) return false;\n\t var parts = Array.isArray(match) ? match : match.split(\".\");\n\t var nodes = [];\n\t var node;\n\n\t for (node = member; isMemberExpression$8(node); node = node.object) {\n\t nodes.push(node.property);\n\t }\n\n\t nodes.push(node);\n\t if (nodes.length < parts.length) return false;\n\t if (!allowPartial && nodes.length > parts.length) return false;\n\n\t for (var i = 0, j = nodes.length - 1; i < parts.length; i++, j--) {\n\t var _node = nodes[j];\n\t var value = void 0;\n\n\t if (isIdentifier$g(_node)) {\n\t value = _node.name;\n\t } else if (isStringLiteral$7(_node)) {\n\t value = _node.value;\n\t } else if (isThisExpression$2(_node)) {\n\t value = \"this\";\n\t } else {\n\t return false;\n\t }\n\n\t if (parts[i] !== value) return false;\n\t }\n\n\t return true;\n\t}\n\n\tfunction buildMatchMemberExpression$1(match, allowPartial) {\n\t var parts = match.split(\".\");\n\t return function (member) {\n\t return matchesPattern$2(member, parts, allowPartial);\n\t };\n\t}\n\n\tvar isReactComponent = buildMatchMemberExpression$1(\"React.Component\");\n\n\tfunction isCompatTag$1(tagName) {\n\t return !!tagName && /^[a-z]/.test(tagName);\n\t}\n\n\tvar fastProto = null;\n\n\tfunction FastObject(o) {\n\t if (fastProto !== null && typeof fastProto.property) {\n\t var result = fastProto;\n\t fastProto = FastObject.prototype = null;\n\t return result;\n\t }\n\n\t fastProto = FastObject.prototype = o == null ? Object.create(null) : o;\n\t return new FastObject();\n\t}\n\n\tFastObject();\n\n\tvar toFastProperties = function toFastproperties(o) {\n\t return FastObject(o);\n\t};\n\n\tvar browser$4 = createCommonjsModule(function (module) {\n\t var process = module.exports = {};\n\t var cachedSetTimeout;\n\t var cachedClearTimeout;\n\n\t function defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t }\n\n\t function defaultClearTimeout() {\n\t throw new Error('clearTimeout has not been defined');\n\t }\n\n\t (function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t })();\n\n\t function runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t return setTimeout(fun, 0);\n\t }\n\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\n\t try {\n\t return cachedSetTimeout(fun, 0);\n\t } catch (e) {\n\t try {\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch (e) {\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t }\n\n\t function runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t return clearTimeout(marker);\n\t }\n\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\n\t try {\n\t return cachedClearTimeout(marker);\n\t } catch (e) {\n\t try {\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e) {\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t }\n\n\t var queue = [];\n\t var draining = false;\n\t var currentQueue;\n\t var queueIndex = -1;\n\n\t function cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\n\t draining = false;\n\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t }\n\n\t function drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t var len = queue.length;\n\n\t while (len) {\n\t currentQueue = queue;\n\t queue = [];\n\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t }\n\n\t process.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\n\t queue.push(new Item(fun, args));\n\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t };\n\n\t function Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t }\n\n\t Item.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t };\n\n\t process.title = 'browser';\n\t process.browser = true;\n\t process.env = {};\n\t process.argv = [];\n\t process.version = '';\n\t process.versions = {};\n\n\t function noop() {}\n\n\t process.on = noop;\n\t process.addListener = noop;\n\t process.once = noop;\n\t process.off = noop;\n\t process.removeListener = noop;\n\t process.removeAllListeners = noop;\n\t process.emit = noop;\n\t process.prependListener = noop;\n\t process.prependOnceListener = noop;\n\n\t process.listeners = function (name) {\n\t return [];\n\t };\n\n\t process.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t };\n\n\t process.cwd = function () {\n\t return '/';\n\t };\n\n\t process.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t };\n\n\t process.umask = function () {\n\t return 0;\n\t };\n\t}, \"/$$rollup_base$$/node_modules/process\");\n\n\tfunction isType$2(nodeType, targetType) {\n\t if (nodeType === targetType) return true;\n\t if (ALIAS_KEYS[targetType]) return false;\n\t var aliases = FLIPPED_ALIAS_KEYS$3[targetType];\n\n\t if (aliases) {\n\t if (aliases[0] === nodeType) return true;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {\n\t var alias = _step.value;\n\t if (nodeType === alias) return true;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction isPlaceholderType(placeholderType, targetType) {\n\t if (placeholderType === targetType) return true;\n\t var aliases = PLACEHOLDERS_ALIAS[placeholderType];\n\n\t if (aliases) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {\n\t var alias = _step.value;\n\t if (targetType === alias) return true;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction is$1(type, node, opts) {\n\t if (!node) return false;\n\t var matches = isType$2(node.type, type);\n\n\t if (!matches) {\n\t if (!opts && node.type === \"Placeholder\" && type in FLIPPED_ALIAS_KEYS$3) {\n\t return isPlaceholderType(node.expectedNode, type);\n\t }\n\n\t return false;\n\t }\n\n\t if (typeof opts === \"undefined\") {\n\t return true;\n\t } else {\n\t return shallowEqual(node, opts);\n\t }\n\t}\n\n\tvar nonASCIIidentifierStartChars = \"\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0560-\\u0588\\u05D0-\\u05EA\\u05EF-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u0860-\\u086A\\u0870-\\u0887\\u0889-\\u088E\\u08A0-\\u08C9\\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0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u1711\\u171F-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1878\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4C\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1C90-\\u1CBA\\u1CBD-\\u1CBF\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5\\u1CF6\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2118-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309B-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u31A0-\\u31BF\\u31F0-\\u31FF\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7CA\\uA7D0\\uA7D1\\uA7D3\\uA7D5-\\uA7D9\\uA7F2-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA8FE\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB69\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\";\n\tvar nonASCIIidentifierChars = \"\\u200C\\u200D\\xB7\\u0300-\\u036F\\u0387\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u0669\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07C0-\\u07C9\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0898-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0966-\\u096F\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09E6-\\u09EF\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A66-\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AE6-\\u0AEF\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B66-\\u0B6F\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CE6-\\u0CEF\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D66-\\u0D6F\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0E50-\\u0E59\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1040-\\u1049\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F-\\u109D\\u135D-\\u135F\\u1369-\\u1371\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u180F-\\u1819\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u194F\\u19D0-\\u19DA\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AB0-\\u1ABD\\u1ABF-\\u1ACE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BB0-\\u1BB9\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1C40-\\u1C49\\u1C50-\\u1C59\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u203F\\u2040\\u2054\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA620-\\uA629\\uA66F\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8D0-\\uA8D9\\uA8E0-\\uA8F1\\uA8FF-\\uA909\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9D0-\\uA9D9\\uA9E5\\uA9F0-\\uA9F9\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA50-\\uAA59\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF10-\\uFF19\\uFF3F\";\n\tvar nonASCIIidentifierStart = new RegExp(\"[\" + nonASCIIidentifierStartChars + \"]\");\n\tvar nonASCIIidentifier = new RegExp(\"[\" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + \"]\");\n\tnonASCIIidentifierStartChars = nonASCIIidentifierChars = null;\n\tvar astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];\n\tvar astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];\n\n\tfunction isInAstralSet(code, set) {\n\t var pos = 0x10000;\n\n\t for (var i = 0, length = set.length; i < length; i += 2) {\n\t pos += set[i];\n\t if (pos > code) return false;\n\t pos += set[i + 1];\n\t if (pos >= code) return true;\n\t }\n\n\t return false;\n\t}\n\n\tfunction isIdentifierStart(code) {\n\t if (code < 65) return code === 36;\n\t if (code <= 90) return true;\n\t if (code < 97) return code === 95;\n\t if (code <= 122) return true;\n\n\t if (code <= 0xffff) {\n\t return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));\n\t }\n\n\t return isInAstralSet(code, astralIdentifierStartCodes);\n\t}\n\tfunction isIdentifierChar(code) {\n\t if (code < 48) return code === 36;\n\t if (code < 58) return true;\n\t if (code < 65) return false;\n\t if (code <= 90) return true;\n\t if (code < 97) return code === 95;\n\t if (code <= 122) return true;\n\n\t if (code <= 0xffff) {\n\t return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));\n\t }\n\n\t return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);\n\t}\n\tfunction isIdentifierName(name) {\n\t var isFirst = true;\n\n\t for (var i = 0; i < name.length; i++) {\n\t var cp = name.charCodeAt(i);\n\n\t if ((cp & 0xfc00) === 0xd800 && i + 1 < name.length) {\n\t var trail = name.charCodeAt(++i);\n\n\t if ((trail & 0xfc00) === 0xdc00) {\n\t cp = 0x10000 + ((cp & 0x3ff) << 10) + (trail & 0x3ff);\n\t }\n\t }\n\n\t if (isFirst) {\n\t isFirst = false;\n\n\t if (!isIdentifierStart(cp)) {\n\t return false;\n\t }\n\t } else if (!isIdentifierChar(cp)) {\n\t return false;\n\t }\n\t }\n\n\t return !isFirst;\n\t}\n\n\tvar reservedWords = {\n\t keyword: [\"break\", \"case\", \"catch\", \"continue\", \"debugger\", \"default\", \"do\", \"else\", \"finally\", \"for\", \"function\", \"if\", \"return\", \"switch\", \"throw\", \"try\", \"var\", \"const\", \"while\", \"with\", \"new\", \"this\", \"super\", \"class\", \"extends\", \"export\", \"import\", \"null\", \"true\", \"false\", \"in\", \"instanceof\", \"typeof\", \"void\", \"delete\"],\n\t strict: [\"implements\", \"interface\", \"let\", \"package\", \"private\", \"protected\", \"public\", \"static\", \"yield\"],\n\t strictBind: [\"eval\", \"arguments\"]\n\t};\n\tvar keywords$1 = new Set(reservedWords.keyword);\n\tvar reservedWordsStrictSet = new Set(reservedWords.strict);\n\tvar reservedWordsStrictBindSet = new Set(reservedWords.strictBind);\n\tfunction isReservedWord(word, inModule) {\n\t return inModule && word === \"await\" || word === \"enum\";\n\t}\n\tfunction isStrictReservedWord(word, inModule) {\n\t return isReservedWord(word, inModule) || reservedWordsStrictSet.has(word);\n\t}\n\tfunction isStrictBindOnlyReservedWord(word) {\n\t return reservedWordsStrictBindSet.has(word);\n\t}\n\tfunction isStrictBindReservedWord(word, inModule) {\n\t return isStrictReservedWord(word, inModule) || isStrictBindOnlyReservedWord(word);\n\t}\n\tfunction isKeyword(word) {\n\t return keywords$1.has(word);\n\t}\n\n\tfunction isValidIdentifier$1(name, reserved) {\n\t if (reserved === void 0) {\n\t reserved = true;\n\t }\n\n\t if (typeof name !== \"string\") return false;\n\n\t if (reserved) {\n\t if (isKeyword(name) || isStrictReservedWord(name, true)) {\n\t return false;\n\t }\n\t }\n\n\t return isIdentifierName(name);\n\t}\n\n\tvar STATEMENT_OR_BLOCK_KEYS$1 = [\"consequent\", \"body\", \"alternate\"];\n\tvar FLATTENABLE_KEYS = [\"body\", \"expressions\"];\n\tvar FOR_INIT_KEYS = [\"left\", \"init\"];\n\tvar COMMENT_KEYS = [\"leadingComments\", \"trailingComments\", \"innerComments\"];\n\tvar LOGICAL_OPERATORS$2 = [\"||\", \"&&\", \"??\"];\n\tvar UPDATE_OPERATORS = [\"++\", \"--\"];\n\tvar BOOLEAN_NUMBER_BINARY_OPERATORS$1 = [\">\", \"<\", \">=\", \"<=\"];\n\tvar EQUALITY_BINARY_OPERATORS = [\"==\", \"===\", \"!=\", \"!==\"];\n\tvar COMPARISON_BINARY_OPERATORS = [].concat(EQUALITY_BINARY_OPERATORS, [\"in\", \"instanceof\"]);\n\tvar BOOLEAN_BINARY_OPERATORS$1 = [].concat(_toConsumableArray(COMPARISON_BINARY_OPERATORS), BOOLEAN_NUMBER_BINARY_OPERATORS$1);\n\tvar NUMBER_BINARY_OPERATORS$1 = [\"-\", \"/\", \"%\", \"*\", \"**\", \"&\", \"|\", \">>\", \">>>\", \"<<\", \"^\"];\n\tvar BINARY_OPERATORS = [\"+\"].concat(NUMBER_BINARY_OPERATORS$1, _toConsumableArray(BOOLEAN_BINARY_OPERATORS$1));\n\tvar ASSIGNMENT_OPERATORS = [\"=\", \"+=\"].concat(_toConsumableArray(NUMBER_BINARY_OPERATORS$1.map(function (op) {\n\t return op + \"=\";\n\t})), _toConsumableArray(LOGICAL_OPERATORS$2.map(function (op) {\n\t return op + \"=\";\n\t})));\n\tvar BOOLEAN_UNARY_OPERATORS$1 = [\"delete\", \"!\"];\n\tvar NUMBER_UNARY_OPERATORS$1 = [\"+\", \"-\", \"~\"];\n\tvar STRING_UNARY_OPERATORS$1 = [\"typeof\"];\n\tvar UNARY_OPERATORS = [\"void\", \"throw\"].concat(BOOLEAN_UNARY_OPERATORS$1, NUMBER_UNARY_OPERATORS$1, STRING_UNARY_OPERATORS$1);\n\tvar INHERIT_KEYS = {\n\t optional: [\"typeAnnotation\", \"typeParameters\", \"returnType\"],\n\t force: [\"start\", \"loc\", \"end\"]\n\t};\n\tvar BLOCK_SCOPED_SYMBOL = Symbol[\"for\"](\"var used to be block scoped\");\n\tvar NOT_LOCAL_BINDING$2 = Symbol[\"for\"](\"should not be considered a local binding\");\n\n\tfunction validate$6(node, key, val) {\n\t if (!node) return;\n\t var fields = NODE_FIELDS[node.type];\n\t if (!fields) return;\n\t var field = fields[key];\n\t validateField(node, key, val, field);\n\t validateChild(node, key, val);\n\t}\n\tfunction validateField(node, key, val, field) {\n\t if (!(field != null && field.validate)) return;\n\t if (field.optional && val == null) return;\n\t field.validate(node, key, val);\n\t}\n\tfunction validateChild(node, key, val) {\n\t if (val == null) return;\n\t var validate = NODE_PARENT_VALIDATIONS[val.type];\n\t if (!validate) return;\n\t validate(node, key, val);\n\t}\n\n\tvar VISITOR_KEYS$6 = {};\n\tvar ALIAS_KEYS = {};\n\tvar FLIPPED_ALIAS_KEYS$3 = {};\n\tvar NODE_FIELDS = {};\n\tvar BUILDER_KEYS = {};\n\tvar DEPRECATED_KEYS$1 = {};\n\tvar NODE_PARENT_VALIDATIONS = {};\n\n\tfunction getType$2(val) {\n\t if (Array.isArray(val)) {\n\t return \"array\";\n\t } else if (val === null) {\n\t return \"null\";\n\t } else {\n\t return typeof val;\n\t }\n\t}\n\n\tfunction validate$5(validate) {\n\t return {\n\t validate: validate\n\t };\n\t}\n\tfunction typeIs(typeName) {\n\t return typeof typeName === \"string\" ? assertNodeType(typeName) : assertNodeType.apply(void 0, _toConsumableArray(typeName));\n\t}\n\tfunction validateType(typeName) {\n\t return validate$5(typeIs(typeName));\n\t}\n\tfunction validateOptional(validate) {\n\t return {\n\t validate: validate,\n\t optional: true\n\t };\n\t}\n\tfunction validateOptionalType(typeName) {\n\t return {\n\t validate: typeIs(typeName),\n\t optional: true\n\t };\n\t}\n\tfunction arrayOf(elementType) {\n\t return chain$1(assertValueType(\"array\"), assertEach(elementType));\n\t}\n\tfunction arrayOfType(typeName) {\n\t return arrayOf(typeIs(typeName));\n\t}\n\tfunction validateArrayOfType(typeName) {\n\t return validate$5(arrayOfType(typeName));\n\t}\n\tfunction assertEach(callback) {\n\t function validator(node, key, val) {\n\t if (!Array.isArray(val)) return;\n\n\t for (var i = 0; i < val.length; i++) {\n\t var subkey = key + \"[\" + i + \"]\";\n\t var v = val[i];\n\t callback(node, subkey, v);\n\t if (browser$4.env.BABEL_TYPES_8_BREAKING) validateChild(node, subkey, v);\n\t }\n\t }\n\n\t validator.each = callback;\n\t return validator;\n\t}\n\tfunction assertOneOf() {\n\t for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {\n\t values[_key] = arguments[_key];\n\t }\n\n\t function validate(node, key, val) {\n\t if (values.indexOf(val) < 0) {\n\t throw new TypeError(\"Property \" + key + \" expected value to be one of \" + JSON.stringify(values) + \" but got \" + JSON.stringify(val));\n\t }\n\t }\n\n\t validate.oneOf = values;\n\t return validate;\n\t}\n\tfunction assertNodeType() {\n\t for (var _len2 = arguments.length, types = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t types[_key2] = arguments[_key2];\n\t }\n\n\t function validate(node, key, val) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(types), _step; !(_step = _iterator()).done;) {\n\t var type = _step.value;\n\n\t if (is$1(type, val)) {\n\t validateChild(node, key, val);\n\t return;\n\t }\n\t }\n\n\t throw new TypeError(\"Property \" + key + \" of \" + node.type + \" expected node to be of a type \" + JSON.stringify(types) + \" but instead got \" + JSON.stringify(val == null ? void 0 : val.type));\n\t }\n\n\t validate.oneOfNodeTypes = types;\n\t return validate;\n\t}\n\tfunction assertNodeOrValueType() {\n\t for (var _len3 = arguments.length, types = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t types[_key3] = arguments[_key3];\n\t }\n\n\t function validate(node, key, val) {\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(types), _step2; !(_step2 = _iterator2()).done;) {\n\t var type = _step2.value;\n\n\t if (getType$2(val) === type || is$1(type, val)) {\n\t validateChild(node, key, val);\n\t return;\n\t }\n\t }\n\n\t throw new TypeError(\"Property \" + key + \" of \" + node.type + \" expected node to be of a type \" + JSON.stringify(types) + \" but instead got \" + JSON.stringify(val == null ? void 0 : val.type));\n\t }\n\n\t validate.oneOfNodeOrValueTypes = types;\n\t return validate;\n\t}\n\tfunction assertValueType(type) {\n\t function validate(node, key, val) {\n\t var valid = getType$2(val) === type;\n\n\t if (!valid) {\n\t throw new TypeError(\"Property \" + key + \" expected type of \" + type + \" but got \" + getType$2(val));\n\t }\n\t }\n\n\t validate.type = type;\n\t return validate;\n\t}\n\tfunction assertShape(shape) {\n\t function validate(node, key, val) {\n\t var errors = [];\n\n\t for (var _i = 0, _Object$keys = Object.keys(shape); _i < _Object$keys.length; _i++) {\n\t var property = _Object$keys[_i];\n\n\t try {\n\t validateField(node, property, val[property], shape[property]);\n\t } catch (error) {\n\t if (error instanceof TypeError) {\n\t errors.push(error.message);\n\t continue;\n\t }\n\n\t throw error;\n\t }\n\t }\n\n\t if (errors.length) {\n\t throw new TypeError(\"Property \" + key + \" of \" + node.type + \" expected to have the following:\\n\" + errors.join(\"\\n\"));\n\t }\n\t }\n\n\t validate.shapeOf = shape;\n\t return validate;\n\t}\n\tfunction assertOptionalChainStart() {\n\t function validate(node) {\n\t var _current2;\n\n\t var current = node;\n\n\t while (node) {\n\t var _current = current,\n\t type = _current.type;\n\n\t if (type === \"OptionalCallExpression\") {\n\t if (current.optional) return;\n\t current = current.callee;\n\t continue;\n\t }\n\n\t if (type === \"OptionalMemberExpression\") {\n\t if (current.optional) return;\n\t current = current.object;\n\t continue;\n\t }\n\n\t break;\n\t }\n\n\t throw new TypeError(\"Non-optional \" + node.type + \" must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from \" + ((_current2 = current) == null ? void 0 : _current2.type));\n\t }\n\n\t return validate;\n\t}\n\tfunction chain$1() {\n\t for (var _len4 = arguments.length, fns = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t fns[_key4] = arguments[_key4];\n\t }\n\n\t function validate() {\n\t for (var _iterator3 = _createForOfIteratorHelperLoose(fns), _step3; !(_step3 = _iterator3()).done;) {\n\t var fn = _step3.value;\n\t fn.apply(void 0, arguments);\n\t }\n\t }\n\n\t validate.chainOf = fns;\n\n\t if (fns.length >= 2 && \"type\" in fns[0] && fns[0].type === \"array\" && !(\"each\" in fns[1])) {\n\t throw new Error(\"An assertValueType(\\\"array\\\") validator can only be followed by an assertEach(...) validator.\");\n\t }\n\n\t return validate;\n\t}\n\tvar validTypeOpts = [\"aliases\", \"builder\", \"deprecatedAlias\", \"fields\", \"inherits\", \"visitor\", \"validate\"];\n\tvar validFieldKeys = [\"default\", \"optional\", \"validate\"];\n\tfunction defineType(type, opts) {\n\t if (opts === void 0) {\n\t opts = {};\n\t }\n\n\t var inherits = opts.inherits && store[opts.inherits] || {};\n\t var fields = opts.fields;\n\n\t if (!fields) {\n\t fields = {};\n\n\t if (inherits.fields) {\n\t var keys = Object.getOwnPropertyNames(inherits.fields);\n\n\t for (var _iterator4 = _createForOfIteratorHelperLoose(keys), _step4; !(_step4 = _iterator4()).done;) {\n\t var _key5 = _step4.value;\n\t var field = inherits.fields[_key5];\n\t var def = field[\"default\"];\n\n\t if (Array.isArray(def) ? def.length > 0 : def && typeof def === \"object\") {\n\t throw new Error(\"field defaults can only be primitives or empty arrays currently\");\n\t }\n\n\t fields[_key5] = {\n\t \"default\": Array.isArray(def) ? [] : def,\n\t optional: field.optional,\n\t validate: field.validate\n\t };\n\t }\n\t }\n\t }\n\n\t var visitor = opts.visitor || inherits.visitor || [];\n\t var aliases = opts.aliases || inherits.aliases || [];\n\t var builder = opts.builder || inherits.builder || opts.visitor || [];\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(opts); _i2 < _Object$keys2.length; _i2++) {\n\t var k = _Object$keys2[_i2];\n\n\t if (validTypeOpts.indexOf(k) === -1) {\n\t throw new Error(\"Unknown type option \\\"\" + k + \"\\\" on \" + type);\n\t }\n\t }\n\n\t if (opts.deprecatedAlias) {\n\t DEPRECATED_KEYS$1[opts.deprecatedAlias] = type;\n\t }\n\n\t for (var _iterator5 = _createForOfIteratorHelperLoose(visitor.concat(builder)), _step5; !(_step5 = _iterator5()).done;) {\n\t var _key7 = _step5.value;\n\t fields[_key7] = fields[_key7] || {};\n\t }\n\n\t for (var _i3 = 0, _Object$keys3 = Object.keys(fields); _i3 < _Object$keys3.length; _i3++) {\n\t var _key6 = _Object$keys3[_i3];\n\t var _field = fields[_key6];\n\n\t if (_field[\"default\"] !== undefined && builder.indexOf(_key6) === -1) {\n\t _field.optional = true;\n\t }\n\n\t if (_field[\"default\"] === undefined) {\n\t _field[\"default\"] = null;\n\t } else if (!_field.validate && _field[\"default\"] != null) {\n\t _field.validate = assertValueType(getType$2(_field[\"default\"]));\n\t }\n\n\t for (var _i4 = 0, _Object$keys4 = Object.keys(_field); _i4 < _Object$keys4.length; _i4++) {\n\t var _k = _Object$keys4[_i4];\n\n\t if (validFieldKeys.indexOf(_k) === -1) {\n\t throw new Error(\"Unknown field key \\\"\" + _k + \"\\\" on \" + type + \".\" + _key6);\n\t }\n\t }\n\t }\n\n\t VISITOR_KEYS$6[type] = opts.visitor = visitor;\n\t BUILDER_KEYS[type] = opts.builder = builder;\n\t NODE_FIELDS[type] = opts.fields = fields;\n\t ALIAS_KEYS[type] = opts.aliases = aliases;\n\t aliases.forEach(function (alias) {\n\t FLIPPED_ALIAS_KEYS$3[alias] = FLIPPED_ALIAS_KEYS$3[alias] || [];\n\t FLIPPED_ALIAS_KEYS$3[alias].push(type);\n\t });\n\n\t if (opts.validate) {\n\t NODE_PARENT_VALIDATIONS[type] = opts.validate;\n\t }\n\n\t store[type] = opts;\n\t}\n\tvar store = {};\n\n\tdefineType(\"ArrayExpression\", {\n\t fields: {\n\t elements: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeOrValueType(\"null\", \"Expression\", \"SpreadElement\"))),\n\t \"default\": !browser$4.env.BABEL_TYPES_8_BREAKING ? [] : undefined\n\t }\n\t },\n\t visitor: [\"elements\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"AssignmentExpression\", {\n\t fields: {\n\t operator: {\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) {\n\t return assertValueType(\"string\");\n\t }\n\n\t var identifier = assertOneOf.apply(void 0, _toConsumableArray(ASSIGNMENT_OPERATORS));\n\t var pattern = assertOneOf(\"=\");\n\t return function (node, key, val) {\n\t var validator = is$1(\"Pattern\", node.left) ? pattern : identifier;\n\t validator(node, key, val);\n\t };\n\t }()\n\t },\n\t left: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"LVal\") : assertNodeType(\"Identifier\", \"MemberExpression\", \"ArrayPattern\", \"ObjectPattern\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t builder: [\"operator\", \"left\", \"right\"],\n\t visitor: [\"left\", \"right\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"BinaryExpression\", {\n\t builder: [\"operator\", \"left\", \"right\"],\n\t fields: {\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(BINARY_OPERATORS))\n\t },\n\t left: {\n\t validate: function () {\n\t var expression = assertNodeType(\"Expression\");\n\t var inOp = assertNodeType(\"Expression\", \"PrivateName\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.operator === \"in\" ? inOp : expression;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"PrivateName\"];\n\t return validator;\n\t }()\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t visitor: [\"left\", \"right\"],\n\t aliases: [\"Binary\", \"Expression\"]\n\t});\n\tdefineType(\"InterpreterDirective\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"Directive\", {\n\t visitor: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertNodeType(\"DirectiveLiteral\")\n\t }\n\t }\n\t});\n\tdefineType(\"DirectiveLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"BlockStatement\", {\n\t builder: [\"body\", \"directives\"],\n\t visitor: [\"directives\", \"body\"],\n\t fields: {\n\t directives: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Directive\"))),\n\t \"default\": []\n\t },\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\", \"Block\", \"Statement\"]\n\t});\n\tdefineType(\"BreakStatement\", {\n\t visitor: [\"label\"],\n\t fields: {\n\t label: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t }\n\t },\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"]\n\t});\n\tdefineType(\"CallExpression\", {\n\t visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n\t builder: [\"callee\", \"arguments\"],\n\t aliases: [\"Expression\"],\n\t fields: Object.assign({\n\t callee: {\n\t validate: assertNodeType(\"Expression\", \"V8IntrinsicIdentifier\")\n\t },\n\t arguments: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"SpreadElement\", \"JSXNamespacedName\", \"ArgumentPlaceholder\")))\n\t }\n\t }, !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t optional: {\n\t validate: assertOneOf(true, false),\n\t optional: true\n\t }\n\t } : {}, {\n\t typeArguments: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"CatchClause\", {\n\t visitor: [\"param\", \"body\"],\n\t fields: {\n\t param: {\n\t validate: assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\"]\n\t});\n\tdefineType(\"ConditionalExpression\", {\n\t visitor: [\"test\", \"consequent\", \"alternate\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t consequent: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t alternate: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Conditional\"]\n\t});\n\tdefineType(\"ContinueStatement\", {\n\t visitor: [\"label\"],\n\t fields: {\n\t label: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t }\n\t },\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"]\n\t});\n\tdefineType(\"DebuggerStatement\", {\n\t aliases: [\"Statement\"]\n\t});\n\tdefineType(\"DoWhileStatement\", {\n\t visitor: [\"test\", \"body\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t },\n\t aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"]\n\t});\n\tdefineType(\"EmptyStatement\", {\n\t aliases: [\"Statement\"]\n\t});\n\tdefineType(\"ExpressionStatement\", {\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Statement\", \"ExpressionWrapper\"]\n\t});\n\tdefineType(\"File\", {\n\t builder: [\"program\", \"comments\", \"tokens\"],\n\t visitor: [\"program\"],\n\t fields: {\n\t program: {\n\t validate: assertNodeType(\"Program\")\n\t },\n\t comments: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? Object.assign(function () {}, {\n\t each: {\n\t oneOfNodeTypes: [\"CommentBlock\", \"CommentLine\"]\n\t }\n\t }) : assertEach(assertNodeType(\"CommentBlock\", \"CommentLine\")),\n\t optional: true\n\t },\n\t tokens: {\n\t validate: assertEach(Object.assign(function () {}, {\n\t type: \"any\"\n\t })),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ForInStatement\", {\n\t visitor: [\"left\", \"right\", \"body\"],\n\t aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\", \"ForXStatement\"],\n\t fields: {\n\t left: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"VariableDeclaration\", \"LVal\") : assertNodeType(\"VariableDeclaration\", \"Identifier\", \"MemberExpression\", \"ArrayPattern\", \"ObjectPattern\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"ForStatement\", {\n\t visitor: [\"init\", \"test\", \"update\", \"body\"],\n\t aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\"],\n\t fields: {\n\t init: {\n\t validate: assertNodeType(\"VariableDeclaration\", \"Expression\"),\n\t optional: true\n\t },\n\t test: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t update: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tvar functionCommon = {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Identifier\", \"Pattern\", \"RestElement\")))\n\t },\n\t generator: {\n\t \"default\": false\n\t },\n\t async: {\n\t \"default\": false\n\t }\n\t};\n\tvar functionTypeAnnotationCommon = {\n\t returnType: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t }\n\t};\n\tvar functionDeclarationCommon = Object.assign({}, functionCommon, {\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t id: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t }\n\t});\n\tdefineType(\"FunctionDeclaration\", {\n\t builder: [\"id\", \"params\", \"body\", \"generator\", \"async\"],\n\t visitor: [\"id\", \"params\", \"body\", \"returnType\", \"typeParameters\"],\n\t fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t }),\n\t aliases: [\"Scopable\", \"Function\", \"BlockParent\", \"FunctionParent\", \"Statement\", \"Pureish\", \"Declaration\"],\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return function () {};\n\t var identifier = assertNodeType(\"Identifier\");\n\t return function (parent, key, node) {\n\t if (!is$1(\"ExportDefaultDeclaration\", parent)) {\n\t identifier(node, \"id\", node.id);\n\t }\n\t };\n\t }()\n\t});\n\tdefineType(\"FunctionExpression\", {\n\t inherits: \"FunctionDeclaration\",\n\t aliases: [\"Scopable\", \"Function\", \"BlockParent\", \"FunctionParent\", \"Expression\", \"Pureish\"],\n\t fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {\n\t id: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t })\n\t});\n\tvar patternLikeCommon = {\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\")))\n\t }\n\t};\n\tdefineType(\"Identifier\", {\n\t builder: [\"name\"],\n\t visitor: [\"typeAnnotation\", \"decorators\"],\n\t aliases: [\"Expression\", \"PatternLike\", \"LVal\", \"TSEntityName\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t name: {\n\t validate: chain$1(assertValueType(\"string\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (!isValidIdentifier$1(val, false)) {\n\t throw new TypeError(\"\\\"\" + val + \"\\\" is not a valid identifier name\");\n\t }\n\t }, {\n\t type: \"string\"\n\t }))\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t }),\n\t validate: function validate(parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var match = /\\.(\\w+)$/.exec(key);\n\t if (!match) return;\n\n\t var _match = _slicedToArray$1(match, 2),\n\t parentKey = _match[1];\n\n\t var nonComp = {\n\t computed: false\n\t };\n\n\t if (parentKey === \"property\") {\n\t if (is$1(\"MemberExpression\", parent, nonComp)) return;\n\t if (is$1(\"OptionalMemberExpression\", parent, nonComp)) return;\n\t } else if (parentKey === \"key\") {\n\t if (is$1(\"Property\", parent, nonComp)) return;\n\t if (is$1(\"Method\", parent, nonComp)) return;\n\t } else if (parentKey === \"exported\") {\n\t if (is$1(\"ExportSpecifier\", parent)) return;\n\t } else if (parentKey === \"imported\") {\n\t if (is$1(\"ImportSpecifier\", parent, {\n\t imported: node\n\t })) return;\n\t } else if (parentKey === \"meta\") {\n\t if (is$1(\"MetaProperty\", parent, {\n\t meta: node\n\t })) return;\n\t }\n\n\t if ((isKeyword(node.name) || isReservedWord(node.name, false)) && node.name !== \"this\") {\n\t throw new TypeError(\"\\\"\" + node.name + \"\\\" is not a valid identifier\");\n\t }\n\t }\n\t});\n\tdefineType(\"IfStatement\", {\n\t visitor: [\"test\", \"consequent\", \"alternate\"],\n\t aliases: [\"Statement\", \"Conditional\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t consequent: {\n\t validate: assertNodeType(\"Statement\")\n\t },\n\t alternate: {\n\t optional: true,\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"LabeledStatement\", {\n\t visitor: [\"label\", \"body\"],\n\t aliases: [\"Statement\"],\n\t fields: {\n\t label: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"StringLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"NumericLiteral\", {\n\t builder: [\"value\"],\n\t deprecatedAlias: \"NumberLiteral\",\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"number\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"NullLiteral\", {\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"BooleanLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"boolean\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"RegExpLiteral\", {\n\t builder: [\"pattern\", \"flags\"],\n\t deprecatedAlias: \"RegexLiteral\",\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\"],\n\t fields: {\n\t pattern: {\n\t validate: assertValueType(\"string\")\n\t },\n\t flags: {\n\t validate: chain$1(assertValueType(\"string\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var invalid = /[^gimsuy]/.exec(val);\n\n\t if (invalid) {\n\t throw new TypeError(\"\\\"\" + invalid[0] + \"\\\" is not a valid RegExp flag\");\n\t }\n\t }, {\n\t type: \"string\"\n\t })),\n\t \"default\": \"\"\n\t }\n\t }\n\t});\n\tdefineType(\"LogicalExpression\", {\n\t builder: [\"operator\", \"left\", \"right\"],\n\t visitor: [\"left\", \"right\"],\n\t aliases: [\"Binary\", \"Expression\"],\n\t fields: {\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(LOGICAL_OPERATORS$2))\n\t },\n\t left: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"MemberExpression\", {\n\t builder: [\"object\", \"property\", \"computed\"].concat(_toConsumableArray(!browser$4.env.BABEL_TYPES_8_BREAKING ? [\"optional\"] : [])),\n\t visitor: [\"object\", \"property\"],\n\t aliases: [\"Expression\", \"LVal\"],\n\t fields: Object.assign({\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t property: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\", \"PrivateName\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"PrivateName\"];\n\t return validator;\n\t }()\n\t },\n\t computed: {\n\t \"default\": false\n\t }\n\t }, !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t optional: {\n\t validate: assertOneOf(true, false),\n\t optional: true\n\t }\n\t } : {})\n\t});\n\tdefineType(\"NewExpression\", {\n\t inherits: \"CallExpression\"\n\t});\n\tdefineType(\"Program\", {\n\t visitor: [\"directives\", \"body\"],\n\t builder: [\"body\", \"directives\", \"sourceType\", \"interpreter\"],\n\t fields: {\n\t sourceFile: {\n\t validate: assertValueType(\"string\")\n\t },\n\t sourceType: {\n\t validate: assertOneOf(\"script\", \"module\"),\n\t \"default\": \"script\"\n\t },\n\t interpreter: {\n\t validate: assertNodeType(\"InterpreterDirective\"),\n\t \"default\": null,\n\t optional: true\n\t },\n\t directives: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Directive\"))),\n\t \"default\": []\n\t },\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\", \"Block\"]\n\t});\n\tdefineType(\"ObjectExpression\", {\n\t visitor: [\"properties\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t properties: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ObjectMethod\", \"ObjectProperty\", \"SpreadElement\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ObjectMethod\", {\n\t builder: [\"kind\", \"key\", \"params\", \"body\", \"computed\", \"generator\", \"async\"],\n\t fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {\n\t kind: Object.assign({\n\t validate: assertOneOf(\"method\", \"get\", \"set\")\n\t }, !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t \"default\": \"method\"\n\t } : {}),\n\t computed: {\n\t \"default\": false\n\t },\n\t key: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"StringLiteral\", \"NumericLiteral\"];\n\t return validator;\n\t }()\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t }),\n\t visitor: [\"key\", \"params\", \"body\", \"decorators\", \"returnType\", \"typeParameters\"],\n\t aliases: [\"UserWhitespacable\", \"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\", \"ObjectMember\"]\n\t});\n\tdefineType(\"ObjectProperty\", {\n\t builder: [\"key\", \"value\", \"computed\", \"shorthand\"].concat(_toConsumableArray(!browser$4.env.BABEL_TYPES_8_BREAKING ? [\"decorators\"] : [])),\n\t fields: {\n\t computed: {\n\t \"default\": false\n\t },\n\t key: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\", \"StringLiteral\", \"NumericLiteral\"];\n\t return validator;\n\t }()\n\t },\n\t value: {\n\t validate: assertNodeType(\"Expression\", \"PatternLike\")\n\t },\n\t shorthand: {\n\t validate: chain$1(assertValueType(\"boolean\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && node.computed) {\n\t throw new TypeError(\"Property shorthand of ObjectProperty cannot be true if computed is true\");\n\t }\n\t }, {\n\t type: \"boolean\"\n\t }), function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && !is$1(\"Identifier\", node.key)) {\n\t throw new TypeError(\"Property shorthand of ObjectProperty cannot be true if key is not an Identifier\");\n\t }\n\t }),\n\t \"default\": false\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t },\n\t visitor: [\"key\", \"value\", \"decorators\"],\n\t aliases: [\"UserWhitespacable\", \"Property\", \"ObjectMember\"],\n\t validate: function () {\n\t var pattern = assertNodeType(\"Identifier\", \"Pattern\");\n\t var expression = assertNodeType(\"Expression\");\n\t return function (parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var validator = is$1(\"ObjectPattern\", parent) ? pattern : expression;\n\t validator(node, \"value\", node.value);\n\t };\n\t }()\n\t});\n\tdefineType(\"RestElement\", {\n\t visitor: [\"argument\", \"typeAnnotation\"],\n\t builder: [\"argument\"],\n\t aliases: [\"LVal\", \"PatternLike\"],\n\t deprecatedAlias: \"RestProperty\",\n\t fields: Object.assign({}, patternLikeCommon, {\n\t argument: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"LVal\") : assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\", \"MemberExpression\")\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t }),\n\t validate: function validate(parent, key) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var match = /(\\w+)\\[(\\d+)\\]/.exec(key);\n\t if (!match) throw new Error(\"Internal Babel error: malformed key.\");\n\n\t var _match2 = _slicedToArray$1(match, 3),\n\t listKey = _match2[1],\n\t index = _match2[2];\n\n\t if (parent[listKey].length > index + 1) {\n\t throw new TypeError(\"RestElement must be last element of \" + listKey);\n\t }\n\t }\n\t});\n\tdefineType(\"ReturnStatement\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"SequenceExpression\", {\n\t visitor: [\"expressions\"],\n\t fields: {\n\t expressions: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\")))\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"ParenthesizedExpression\", {\n\t visitor: [\"expression\"],\n\t aliases: [\"Expression\", \"ExpressionWrapper\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"SwitchCase\", {\n\t visitor: [\"test\", \"consequent\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t consequent: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t }\n\t});\n\tdefineType(\"SwitchStatement\", {\n\t visitor: [\"discriminant\", \"cases\"],\n\t aliases: [\"Statement\", \"BlockParent\", \"Scopable\"],\n\t fields: {\n\t discriminant: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t cases: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"SwitchCase\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ThisExpression\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"ThrowStatement\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Statement\", \"Terminatorless\", \"CompletionStatement\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"TryStatement\", {\n\t visitor: [\"block\", \"handler\", \"finalizer\"],\n\t aliases: [\"Statement\"],\n\t fields: {\n\t block: {\n\t validate: chain$1(assertNodeType(\"BlockStatement\"), Object.assign(function (node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (!node.handler && !node.finalizer) {\n\t throw new TypeError(\"TryStatement expects either a handler or finalizer, or both\");\n\t }\n\t }, {\n\t oneOfNodeTypes: [\"BlockStatement\"]\n\t }))\n\t },\n\t handler: {\n\t optional: true,\n\t validate: assertNodeType(\"CatchClause\")\n\t },\n\t finalizer: {\n\t optional: true,\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t }\n\t});\n\tdefineType(\"UnaryExpression\", {\n\t builder: [\"operator\", \"argument\", \"prefix\"],\n\t fields: {\n\t prefix: {\n\t \"default\": true\n\t },\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(UNARY_OPERATORS))\n\t }\n\t },\n\t visitor: [\"argument\"],\n\t aliases: [\"UnaryLike\", \"Expression\"]\n\t});\n\tdefineType(\"UpdateExpression\", {\n\t builder: [\"operator\", \"argument\", \"prefix\"],\n\t fields: {\n\t prefix: {\n\t \"default\": false\n\t },\n\t argument: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertNodeType(\"Expression\") : assertNodeType(\"Identifier\", \"MemberExpression\")\n\t },\n\t operator: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(UPDATE_OPERATORS))\n\t }\n\t },\n\t visitor: [\"argument\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"VariableDeclaration\", {\n\t builder: [\"kind\", \"declarations\"],\n\t visitor: [\"declarations\"],\n\t aliases: [\"Statement\", \"Declaration\"],\n\t fields: {\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t kind: {\n\t validate: assertOneOf(\"var\", \"let\", \"const\")\n\t },\n\t declarations: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"VariableDeclarator\")))\n\t }\n\t },\n\t validate: function validate(parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t if (!is$1(\"ForXStatement\", parent, {\n\t left: node\n\t })) return;\n\n\t if (node.declarations.length !== 1) {\n\t throw new TypeError(\"Exactly one VariableDeclarator is required in the VariableDeclaration of a \" + parent.type);\n\t }\n\t }\n\t});\n\tdefineType(\"VariableDeclarator\", {\n\t visitor: [\"id\", \"init\"],\n\t fields: {\n\t id: {\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) {\n\t return assertNodeType(\"LVal\");\n\t }\n\n\t var normal = assertNodeType(\"Identifier\", \"ArrayPattern\", \"ObjectPattern\");\n\t var without = assertNodeType(\"Identifier\");\n\t return function (node, key, val) {\n\t var validator = node.init ? normal : without;\n\t validator(node, key, val);\n\t };\n\t }()\n\t },\n\t definite: {\n\t optional: true,\n\t validate: assertValueType(\"boolean\")\n\t },\n\t init: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"WhileStatement\", {\n\t visitor: [\"test\", \"body\"],\n\t aliases: [\"Statement\", \"BlockParent\", \"Loop\", \"While\", \"Scopable\"],\n\t fields: {\n\t test: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"WithStatement\", {\n\t visitor: [\"object\", \"body\"],\n\t aliases: [\"Statement\"],\n\t fields: {\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t }\n\t }\n\t});\n\tdefineType(\"AssignmentPattern\", {\n\t visitor: [\"left\", \"right\", \"decorators\"],\n\t builder: [\"left\", \"right\"],\n\t aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t left: {\n\t validate: assertNodeType(\"Identifier\", \"ObjectPattern\", \"ArrayPattern\", \"MemberExpression\")\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"ArrayPattern\", {\n\t visitor: [\"elements\", \"typeAnnotation\"],\n\t builder: [\"elements\"],\n\t aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t elements: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeOrValueType(\"null\", \"PatternLike\")))\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"ArrowFunctionExpression\", {\n\t builder: [\"params\", \"body\", \"async\"],\n\t visitor: [\"params\", \"body\", \"returnType\", \"typeParameters\"],\n\t aliases: [\"Scopable\", \"Function\", \"BlockParent\", \"FunctionParent\", \"Expression\", \"Pureish\"],\n\t fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {\n\t expression: {\n\t validate: assertValueType(\"boolean\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\", \"Expression\")\n\t }\n\t })\n\t});\n\tdefineType(\"ClassBody\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ClassMethod\", \"ClassPrivateMethod\", \"ClassProperty\", \"ClassPrivateProperty\", \"TSDeclareMethod\", \"TSIndexSignature\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ClassExpression\", {\n\t builder: [\"id\", \"superClass\", \"body\", \"decorators\"],\n\t visitor: [\"id\", \"body\", \"superClass\", \"mixins\", \"typeParameters\", \"superTypeParameters\", \"implements\", \"decorators\"],\n\t aliases: [\"Scopable\", \"Class\", \"Expression\"],\n\t fields: {\n\t id: {\n\t validate: assertNodeType(\"Identifier\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"ClassBody\")\n\t },\n\t superClass: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t superTypeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t \"implements\": {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"))),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t mixins: {\n\t validate: assertNodeType(\"InterfaceExtends\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ClassDeclaration\", {\n\t inherits: \"ClassExpression\",\n\t aliases: [\"Scopable\", \"Class\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterDeclaration\", \"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t },\n\t body: {\n\t validate: assertNodeType(\"ClassBody\")\n\t },\n\t superClass: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t superTypeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t \"implements\": {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSExpressionWithTypeArguments\", \"ClassImplements\"))),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t mixins: {\n\t validate: assertNodeType(\"InterfaceExtends\"),\n\t optional: true\n\t },\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t \"abstract\": {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t },\n\t validate: function () {\n\t var identifier = assertNodeType(\"Identifier\");\n\t return function (parent, key, node) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (!is$1(\"ExportDefaultDeclaration\", parent)) {\n\t identifier(node, \"id\", node.id);\n\t }\n\t };\n\t }()\n\t});\n\tdefineType(\"ExportAllDeclaration\", {\n\t visitor: [\"source\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\", \"ExportDeclaration\"],\n\t fields: {\n\t source: {\n\t validate: assertNodeType(\"StringLiteral\")\n\t },\n\t exportKind: validateOptional(assertOneOf(\"type\", \"value\")),\n\t assertions: {\n\t optional: true,\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportAttribute\")))\n\t }\n\t }\n\t});\n\tdefineType(\"ExportDefaultDeclaration\", {\n\t visitor: [\"declaration\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\", \"ExportDeclaration\"],\n\t fields: {\n\t declaration: {\n\t validate: assertNodeType(\"FunctionDeclaration\", \"TSDeclareFunction\", \"ClassDeclaration\", \"Expression\")\n\t },\n\t exportKind: validateOptional(assertOneOf(\"value\"))\n\t }\n\t});\n\tdefineType(\"ExportNamedDeclaration\", {\n\t visitor: [\"declaration\", \"specifiers\", \"source\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\", \"ExportDeclaration\"],\n\t fields: {\n\t declaration: {\n\t optional: true,\n\t validate: chain$1(assertNodeType(\"Declaration\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && node.specifiers.length) {\n\t throw new TypeError(\"Only declaration or specifiers is allowed on ExportNamedDeclaration\");\n\t }\n\t }, {\n\t oneOfNodeTypes: [\"Declaration\"]\n\t }), function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && node.source) {\n\t throw new TypeError(\"Cannot export a declaration from a source\");\n\t }\n\t })\n\t },\n\t assertions: {\n\t optional: true,\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportAttribute\")))\n\t },\n\t specifiers: {\n\t \"default\": [],\n\t validate: chain$1(assertValueType(\"array\"), assertEach(function () {\n\t var sourced = assertNodeType(\"ExportSpecifier\", \"ExportDefaultSpecifier\", \"ExportNamespaceSpecifier\");\n\t var sourceless = assertNodeType(\"ExportSpecifier\");\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return sourced;\n\t return function (node, key, val) {\n\t var validator = node.source ? sourced : sourceless;\n\t validator(node, key, val);\n\t };\n\t }()))\n\t },\n\t source: {\n\t validate: assertNodeType(\"StringLiteral\"),\n\t optional: true\n\t },\n\t exportKind: validateOptional(assertOneOf(\"type\", \"value\"))\n\t }\n\t});\n\tdefineType(\"ExportSpecifier\", {\n\t visitor: [\"local\", \"exported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t exported: {\n\t validate: assertNodeType(\"Identifier\", \"StringLiteral\")\n\t }\n\t }\n\t});\n\tdefineType(\"ForOfStatement\", {\n\t visitor: [\"left\", \"right\", \"body\"],\n\t builder: [\"left\", \"right\", \"body\", \"await\"],\n\t aliases: [\"Scopable\", \"Statement\", \"For\", \"BlockParent\", \"Loop\", \"ForXStatement\"],\n\t fields: {\n\t left: {\n\t validate: function () {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) {\n\t return assertNodeType(\"VariableDeclaration\", \"LVal\");\n\t }\n\n\t var declaration = assertNodeType(\"VariableDeclaration\");\n\t var lval = assertNodeType(\"Identifier\", \"MemberExpression\", \"ArrayPattern\", \"ObjectPattern\");\n\t return function (node, key, val) {\n\t if (is$1(\"VariableDeclaration\", val)) {\n\t declaration(node, key, val);\n\t } else {\n\t lval(node, key, val);\n\t }\n\t };\n\t }()\n\t },\n\t right: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"Statement\")\n\t },\n\t \"await\": {\n\t \"default\": false\n\t }\n\t }\n\t});\n\tdefineType(\"ImportDeclaration\", {\n\t visitor: [\"specifiers\", \"source\"],\n\t aliases: [\"Statement\", \"Declaration\", \"ModuleDeclaration\"],\n\t fields: {\n\t assertions: {\n\t optional: true,\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportAttribute\")))\n\t },\n\t specifiers: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ImportSpecifier\", \"ImportDefaultSpecifier\", \"ImportNamespaceSpecifier\")))\n\t },\n\t source: {\n\t validate: assertNodeType(\"StringLiteral\")\n\t },\n\t importKind: {\n\t validate: assertOneOf(\"type\", \"typeof\", \"value\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ImportDefaultSpecifier\", {\n\t visitor: [\"local\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"ImportNamespaceSpecifier\", {\n\t visitor: [\"local\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"ImportSpecifier\", {\n\t visitor: [\"local\", \"imported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t local: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t imported: {\n\t validate: assertNodeType(\"Identifier\", \"StringLiteral\")\n\t },\n\t importKind: {\n\t validate: assertOneOf(\"type\", \"typeof\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"MetaProperty\", {\n\t visitor: [\"meta\", \"property\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t meta: {\n\t validate: chain$1(assertNodeType(\"Identifier\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\t var property;\n\n\t switch (val.name) {\n\t case \"function\":\n\t property = \"sent\";\n\t break;\n\n\t case \"new\":\n\t property = \"target\";\n\t break;\n\n\t case \"import\":\n\t property = \"meta\";\n\t break;\n\t }\n\n\t if (!is$1(\"Identifier\", node.property, {\n\t name: property\n\t })) {\n\t throw new TypeError(\"Unrecognised MetaProperty\");\n\t }\n\t }, {\n\t oneOfNodeTypes: [\"Identifier\"]\n\t }))\n\t },\n\t property: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tvar classMethodOrPropertyCommon = {\n\t \"abstract\": {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t accessibility: {\n\t validate: assertOneOf(\"public\", \"private\", \"protected\"),\n\t optional: true\n\t },\n\t \"static\": {\n\t \"default\": false\n\t },\n\t override: {\n\t \"default\": false\n\t },\n\t computed: {\n\t \"default\": false\n\t },\n\t optional: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t key: {\n\t validate: chain$1(function () {\n\t var normal = assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\");\n\t var computed = assertNodeType(\"Expression\");\n\t return function (node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\t }(), assertNodeType(\"Identifier\", \"StringLiteral\", \"NumericLiteral\", \"Expression\"))\n\t }\n\t};\n\tvar classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Identifier\", \"Pattern\", \"RestElement\", \"TSParameterProperty\")))\n\t },\n\t kind: {\n\t validate: assertOneOf(\"get\", \"set\", \"method\", \"constructor\"),\n\t \"default\": \"method\"\n\t },\n\t access: {\n\t validate: chain$1(assertValueType(\"string\"), assertOneOf(\"public\", \"private\", \"protected\")),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t});\n\tdefineType(\"ClassMethod\", {\n\t aliases: [\"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\"],\n\t builder: [\"kind\", \"key\", \"params\", \"body\", \"computed\", \"static\", \"generator\", \"async\"],\n\t visitor: [\"key\", \"params\", \"body\", \"decorators\", \"returnType\", \"typeParameters\"],\n\t fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t })\n\t});\n\tdefineType(\"ObjectPattern\", {\n\t visitor: [\"properties\", \"typeAnnotation\", \"decorators\"],\n\t builder: [\"properties\"],\n\t aliases: [\"Pattern\", \"PatternLike\", \"LVal\"],\n\t fields: Object.assign({}, patternLikeCommon, {\n\t properties: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"RestElement\", \"ObjectProperty\")))\n\t }\n\t })\n\t});\n\tdefineType(\"SpreadElement\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"UnaryLike\"],\n\t deprecatedAlias: \"SpreadProperty\",\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"Super\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"TaggedTemplateExpression\", {\n\t visitor: [\"tag\", \"quasi\", \"typeParameters\"],\n\t builder: [\"tag\", \"quasi\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t tag: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t quasi: {\n\t validate: assertNodeType(\"TemplateLiteral\")\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"TemplateElement\", {\n\t builder: [\"value\", \"tail\"],\n\t fields: {\n\t value: {\n\t validate: assertShape({\n\t raw: {\n\t validate: assertValueType(\"string\")\n\t },\n\t cooked: {\n\t validate: assertValueType(\"string\"),\n\t optional: true\n\t }\n\t })\n\t },\n\t tail: {\n\t \"default\": false\n\t }\n\t }\n\t});\n\tdefineType(\"TemplateLiteral\", {\n\t visitor: [\"quasis\", \"expressions\"],\n\t aliases: [\"Expression\", \"Literal\"],\n\t fields: {\n\t quasis: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TemplateElement\")))\n\t },\n\t expressions: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"TSType\")), function (node, key, val) {\n\t if (node.quasis.length !== val.length + 1) {\n\t throw new TypeError(\"Number of \" + node.type + \" quasis should be exactly one more than the number of expressions.\\nExpected \" + (val.length + 1) + \" quasis but got \" + node.quasis.length);\n\t }\n\t })\n\t }\n\t }\n\t});\n\tdefineType(\"YieldExpression\", {\n\t builder: [\"argument\", \"delegate\"],\n\t visitor: [\"argument\"],\n\t aliases: [\"Expression\", \"Terminatorless\"],\n\t fields: {\n\t delegate: {\n\t validate: chain$1(assertValueType(\"boolean\"), Object.assign(function (node, key, val) {\n\t if (!browser$4.env.BABEL_TYPES_8_BREAKING) return;\n\n\t if (val && !node.argument) {\n\t throw new TypeError(\"Property delegate of YieldExpression cannot be true if there is no argument\");\n\t }\n\t }, {\n\t type: \"boolean\"\n\t })),\n\t \"default\": false\n\t },\n\t argument: {\n\t optional: true,\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"AwaitExpression\", {\n\t builder: [\"argument\"],\n\t visitor: [\"argument\"],\n\t aliases: [\"Expression\", \"Terminatorless\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"Import\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"BigIntLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"ExportNamespaceSpecifier\", {\n\t visitor: [\"exported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t exported: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"OptionalMemberExpression\", {\n\t builder: [\"object\", \"property\", \"computed\", \"optional\"],\n\t visitor: [\"object\", \"property\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t property: {\n\t validate: function () {\n\t var normal = assertNodeType(\"Identifier\");\n\t var computed = assertNodeType(\"Expression\");\n\n\t var validator = function validator(node, key, val) {\n\t var validator = node.computed ? computed : normal;\n\t validator(node, key, val);\n\t };\n\n\t validator.oneOfNodeTypes = [\"Expression\", \"Identifier\"];\n\t return validator;\n\t }()\n\t },\n\t computed: {\n\t \"default\": false\n\t },\n\t optional: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertValueType(\"boolean\") : chain$1(assertValueType(\"boolean\"), assertOptionalChainStart())\n\t }\n\t }\n\t});\n\tdefineType(\"OptionalCallExpression\", {\n\t visitor: [\"callee\", \"arguments\", \"typeParameters\", \"typeArguments\"],\n\t builder: [\"callee\", \"arguments\", \"optional\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t callee: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t arguments: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"SpreadElement\", \"JSXNamespacedName\", \"ArgumentPlaceholder\")))\n\t },\n\t optional: {\n\t validate: !browser$4.env.BABEL_TYPES_8_BREAKING ? assertValueType(\"boolean\") : chain$1(assertValueType(\"boolean\"), assertOptionalChainStart())\n\t },\n\t typeArguments: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ClassProperty\", {\n\t visitor: [\"key\", \"value\", \"typeAnnotation\", \"decorators\"],\n\t builder: [\"key\", \"value\", \"typeAnnotation\", \"decorators\", \"computed\", \"static\"],\n\t aliases: [\"Property\"],\n\t fields: Object.assign({}, classMethodOrPropertyCommon, {\n\t value: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t definite: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t readonly: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t declare: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t variance: {\n\t validate: assertNodeType(\"Variance\"),\n\t optional: true\n\t }\n\t })\n\t});\n\tdefineType(\"ClassPrivateProperty\", {\n\t visitor: [\"key\", \"value\", \"decorators\", \"typeAnnotation\"],\n\t builder: [\"key\", \"value\", \"decorators\", \"static\"],\n\t aliases: [\"Property\", \"Private\"],\n\t fields: {\n\t key: {\n\t validate: assertNodeType(\"PrivateName\")\n\t },\n\t value: {\n\t validate: assertNodeType(\"Expression\"),\n\t optional: true\n\t },\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TypeAnnotation\", \"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t },\n\t readonly: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t definite: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t variance: {\n\t validate: assertNodeType(\"Variance\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"ClassPrivateMethod\", {\n\t builder: [\"kind\", \"key\", \"params\", \"body\", \"static\"],\n\t visitor: [\"key\", \"params\", \"body\", \"decorators\", \"returnType\", \"typeParameters\"],\n\t aliases: [\"Function\", \"Scopable\", \"BlockParent\", \"FunctionParent\", \"Method\", \"Private\"],\n\t fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {\n\t key: {\n\t validate: assertNodeType(\"PrivateName\")\n\t },\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t }\n\t })\n\t});\n\tdefineType(\"PrivateName\", {\n\t visitor: [\"id\"],\n\t aliases: [\"Private\"],\n\t fields: {\n\t id: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\n\tvar defineInterfaceishType = function defineInterfaceishType(name, typeParameterType) {\n\t if (typeParameterType === void 0) {\n\t typeParameterType = \"TypeParameterDeclaration\";\n\t }\n\n\t defineType(name, {\n\t builder: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n\t visitor: [\"id\", \"typeParameters\", \"extends\", \"mixins\", \"implements\", \"body\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(typeParameterType),\n\t \"extends\": validateOptional(arrayOfType(\"InterfaceExtends\")),\n\t mixins: validateOptional(arrayOfType(\"InterfaceExtends\")),\n\t \"implements\": validateOptional(arrayOfType(\"ClassImplements\")),\n\t body: validateType(\"ObjectTypeAnnotation\")\n\t }\n\t });\n\t};\n\n\tdefineType(\"AnyTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ArrayTypeAnnotation\", {\n\t visitor: [\"elementType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t elementType: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"BooleanTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"BooleanLiteralTypeAnnotation\", {\n\t builder: [\"value\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t value: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"NullLiteralTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ClassImplements\", {\n\t visitor: [\"id\", \"typeParameters\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterInstantiation\")\n\t }\n\t});\n\tdefineInterfaceishType(\"DeclareClass\");\n\tdefineType(\"DeclareFunction\", {\n\t visitor: [\"id\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t predicate: validateOptionalType(\"DeclaredPredicate\")\n\t }\n\t});\n\tdefineInterfaceishType(\"DeclareInterface\");\n\tdefineType(\"DeclareModule\", {\n\t builder: [\"id\", \"body\", \"kind\"],\n\t visitor: [\"id\", \"body\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"StringLiteral\"]),\n\t body: validateType(\"BlockStatement\"),\n\t kind: validateOptional(assertOneOf(\"CommonJS\", \"ES\"))\n\t }\n\t});\n\tdefineType(\"DeclareModuleExports\", {\n\t visitor: [\"typeAnnotation\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TypeAnnotation\")\n\t }\n\t});\n\tdefineType(\"DeclareTypeAlias\", {\n\t visitor: [\"id\", \"typeParameters\", \"right\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t right: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"DeclareOpaqueType\", {\n\t visitor: [\"id\", \"typeParameters\", \"supertype\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t supertype: validateOptionalType(\"FlowType\"),\n\t impltype: validateOptionalType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"DeclareVariable\", {\n\t visitor: [\"id\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\")\n\t }\n\t});\n\tdefineType(\"DeclareExportDeclaration\", {\n\t visitor: [\"declaration\", \"specifiers\", \"source\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t declaration: validateOptionalType(\"Flow\"),\n\t specifiers: validateOptional(arrayOfType([\"ExportSpecifier\", \"ExportNamespaceSpecifier\"])),\n\t source: validateOptionalType(\"StringLiteral\"),\n\t \"default\": validateOptional(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"DeclareExportAllDeclaration\", {\n\t visitor: [\"source\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t source: validateType(\"StringLiteral\"),\n\t exportKind: validateOptional(assertOneOf(\"type\", \"value\"))\n\t }\n\t});\n\tdefineType(\"DeclaredPredicate\", {\n\t visitor: [\"value\"],\n\t aliases: [\"Flow\", \"FlowPredicate\"],\n\t fields: {\n\t value: validateType(\"Flow\")\n\t }\n\t});\n\tdefineType(\"ExistsTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\"]\n\t});\n\tdefineType(\"FunctionTypeAnnotation\", {\n\t visitor: [\"typeParameters\", \"params\", \"rest\", \"returnType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t params: validate$5(arrayOfType(\"FunctionTypeParam\")),\n\t rest: validateOptionalType(\"FunctionTypeParam\"),\n\t \"this\": validateOptionalType(\"FunctionTypeParam\"),\n\t returnType: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"FunctionTypeParam\", {\n\t visitor: [\"name\", \"typeAnnotation\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t name: validateOptionalType(\"Identifier\"),\n\t typeAnnotation: validateType(\"FlowType\"),\n\t optional: validateOptional(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"GenericTypeAnnotation\", {\n\t visitor: [\"id\", \"typeParameters\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n\t typeParameters: validateOptionalType(\"TypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"InferredPredicate\", {\n\t aliases: [\"Flow\", \"FlowPredicate\"]\n\t});\n\tdefineType(\"InterfaceExtends\", {\n\t visitor: [\"id\", \"typeParameters\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"]),\n\t typeParameters: validateOptionalType(\"TypeParameterInstantiation\")\n\t }\n\t});\n\tdefineInterfaceishType(\"InterfaceDeclaration\");\n\tdefineType(\"InterfaceTypeAnnotation\", {\n\t visitor: [\"extends\", \"body\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t \"extends\": validateOptional(arrayOfType(\"InterfaceExtends\")),\n\t body: validateType(\"ObjectTypeAnnotation\")\n\t }\n\t});\n\tdefineType(\"IntersectionTypeAnnotation\", {\n\t visitor: [\"types\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t types: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"MixedTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"EmptyTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"NullableTypeAnnotation\", {\n\t visitor: [\"typeAnnotation\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t typeAnnotation: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"NumberLiteralTypeAnnotation\", {\n\t builder: [\"value\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t value: validate$5(assertValueType(\"number\"))\n\t }\n\t});\n\tdefineType(\"NumberTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ObjectTypeAnnotation\", {\n\t visitor: [\"properties\", \"indexers\", \"callProperties\", \"internalSlots\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t builder: [\"properties\", \"indexers\", \"callProperties\", \"internalSlots\", \"exact\"],\n\t fields: {\n\t properties: validate$5(arrayOfType([\"ObjectTypeProperty\", \"ObjectTypeSpreadProperty\"])),\n\t indexers: validateOptional(arrayOfType(\"ObjectTypeIndexer\")),\n\t callProperties: validateOptional(arrayOfType(\"ObjectTypeCallProperty\")),\n\t internalSlots: validateOptional(arrayOfType(\"ObjectTypeInternalSlot\")),\n\t exact: {\n\t validate: assertValueType(\"boolean\"),\n\t \"default\": false\n\t },\n\t inexact: validateOptional(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeInternalSlot\", {\n\t visitor: [\"id\", \"value\", \"optional\", \"static\", \"method\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t value: validateType(\"FlowType\"),\n\t optional: validate$5(assertValueType(\"boolean\")),\n\t \"static\": validate$5(assertValueType(\"boolean\")),\n\t method: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeCallProperty\", {\n\t visitor: [\"value\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t value: validateType(\"FlowType\"),\n\t \"static\": validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeIndexer\", {\n\t visitor: [\"id\", \"key\", \"value\", \"variance\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t id: validateOptionalType(\"Identifier\"),\n\t key: validateType(\"FlowType\"),\n\t value: validateType(\"FlowType\"),\n\t \"static\": validate$5(assertValueType(\"boolean\")),\n\t variance: validateOptionalType(\"Variance\")\n\t }\n\t});\n\tdefineType(\"ObjectTypeProperty\", {\n\t visitor: [\"key\", \"value\", \"variance\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t key: validateType([\"Identifier\", \"StringLiteral\"]),\n\t value: validateType(\"FlowType\"),\n\t kind: validate$5(assertOneOf(\"init\", \"get\", \"set\")),\n\t \"static\": validate$5(assertValueType(\"boolean\")),\n\t proto: validate$5(assertValueType(\"boolean\")),\n\t optional: validate$5(assertValueType(\"boolean\")),\n\t variance: validateOptionalType(\"Variance\"),\n\t method: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"ObjectTypeSpreadProperty\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Flow\", \"UserWhitespacable\"],\n\t fields: {\n\t argument: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"OpaqueType\", {\n\t visitor: [\"id\", \"typeParameters\", \"supertype\", \"impltype\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t supertype: validateOptionalType(\"FlowType\"),\n\t impltype: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"QualifiedTypeIdentifier\", {\n\t visitor: [\"id\", \"qualification\"],\n\t aliases: [\"Flow\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t qualification: validateType([\"Identifier\", \"QualifiedTypeIdentifier\"])\n\t }\n\t});\n\tdefineType(\"StringLiteralTypeAnnotation\", {\n\t builder: [\"value\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t value: validate$5(assertValueType(\"string\"))\n\t }\n\t});\n\tdefineType(\"StringTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"SymbolTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"ThisTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"TupleTypeAnnotation\", {\n\t visitor: [\"types\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t types: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"TypeofTypeAnnotation\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t argument: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"TypeAlias\", {\n\t visitor: [\"id\", \"typeParameters\", \"right\"],\n\t aliases: [\"Flow\", \"FlowDeclaration\", \"Statement\", \"Declaration\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TypeParameterDeclaration\"),\n\t right: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"TypeAnnotation\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"TypeCastExpression\", {\n\t visitor: [\"expression\", \"typeAnnotation\"],\n\t aliases: [\"Flow\", \"ExpressionWrapper\", \"Expression\"],\n\t fields: {\n\t expression: validateType(\"Expression\"),\n\t typeAnnotation: validateType(\"TypeAnnotation\")\n\t }\n\t});\n\tdefineType(\"TypeParameter\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"bound\", \"default\", \"variance\"],\n\t fields: {\n\t name: validate$5(assertValueType(\"string\")),\n\t bound: validateOptionalType(\"TypeAnnotation\"),\n\t \"default\": validateOptionalType(\"FlowType\"),\n\t variance: validateOptionalType(\"Variance\")\n\t }\n\t});\n\tdefineType(\"TypeParameterDeclaration\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"params\"],\n\t fields: {\n\t params: validate$5(arrayOfType(\"TypeParameter\"))\n\t }\n\t});\n\tdefineType(\"TypeParameterInstantiation\", {\n\t aliases: [\"Flow\"],\n\t visitor: [\"params\"],\n\t fields: {\n\t params: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"UnionTypeAnnotation\", {\n\t visitor: [\"types\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t types: validate$5(arrayOfType(\"FlowType\"))\n\t }\n\t});\n\tdefineType(\"Variance\", {\n\t aliases: [\"Flow\"],\n\t builder: [\"kind\"],\n\t fields: {\n\t kind: validate$5(assertOneOf(\"minus\", \"plus\"))\n\t }\n\t});\n\tdefineType(\"VoidTypeAnnotation\", {\n\t aliases: [\"Flow\", \"FlowType\", \"FlowBaseAnnotation\"]\n\t});\n\tdefineType(\"EnumDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"body\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t body: validateType([\"EnumBooleanBody\", \"EnumNumberBody\", \"EnumStringBody\", \"EnumSymbolBody\"])\n\t }\n\t});\n\tdefineType(\"EnumBooleanBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t explicitType: validate$5(assertValueType(\"boolean\")),\n\t members: validateArrayOfType(\"EnumBooleanMember\"),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumNumberBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t explicitType: validate$5(assertValueType(\"boolean\")),\n\t members: validateArrayOfType(\"EnumNumberMember\"),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumStringBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t explicitType: validate$5(assertValueType(\"boolean\")),\n\t members: validateArrayOfType([\"EnumStringMember\", \"EnumDefaultedMember\"]),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumSymbolBody\", {\n\t aliases: [\"EnumBody\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t members: validateArrayOfType(\"EnumDefaultedMember\"),\n\t hasUnknownMembers: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\tdefineType(\"EnumBooleanMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t init: validateType(\"BooleanLiteral\")\n\t }\n\t});\n\tdefineType(\"EnumNumberMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\", \"init\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t init: validateType(\"NumericLiteral\")\n\t }\n\t});\n\tdefineType(\"EnumStringMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\", \"init\"],\n\t fields: {\n\t id: validateType(\"Identifier\"),\n\t init: validateType(\"StringLiteral\")\n\t }\n\t});\n\tdefineType(\"EnumDefaultedMember\", {\n\t aliases: [\"EnumMember\"],\n\t visitor: [\"id\"],\n\t fields: {\n\t id: validateType(\"Identifier\")\n\t }\n\t});\n\tdefineType(\"IndexedAccessType\", {\n\t visitor: [\"objectType\", \"indexType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t objectType: validateType(\"FlowType\"),\n\t indexType: validateType(\"FlowType\")\n\t }\n\t});\n\tdefineType(\"OptionalIndexedAccessType\", {\n\t visitor: [\"objectType\", \"indexType\"],\n\t aliases: [\"Flow\", \"FlowType\"],\n\t fields: {\n\t objectType: validateType(\"FlowType\"),\n\t indexType: validateType(\"FlowType\"),\n\t optional: validate$5(assertValueType(\"boolean\"))\n\t }\n\t});\n\n\tdefineType(\"JSXAttribute\", {\n\t visitor: [\"name\", \"value\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\", \"JSXNamespacedName\")\n\t },\n\t value: {\n\t optional: true,\n\t validate: assertNodeType(\"JSXElement\", \"JSXFragment\", \"StringLiteral\", \"JSXExpressionContainer\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXClosingElement\", {\n\t visitor: [\"name\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\", \"JSXMemberExpression\", \"JSXNamespacedName\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXElement\", {\n\t builder: [\"openingElement\", \"closingElement\", \"children\", \"selfClosing\"],\n\t visitor: [\"openingElement\", \"children\", \"closingElement\"],\n\t aliases: [\"JSX\", \"Immutable\", \"Expression\"],\n\t fields: {\n\t openingElement: {\n\t validate: assertNodeType(\"JSXOpeningElement\")\n\t },\n\t closingElement: {\n\t optional: true,\n\t validate: assertNodeType(\"JSXClosingElement\")\n\t },\n\t children: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"JSXText\", \"JSXExpressionContainer\", \"JSXSpreadChild\", \"JSXElement\", \"JSXFragment\")))\n\t },\n\t selfClosing: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"JSXEmptyExpression\", {\n\t aliases: [\"JSX\"]\n\t});\n\tdefineType(\"JSXExpressionContainer\", {\n\t visitor: [\"expression\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\", \"JSXEmptyExpression\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXSpreadChild\", {\n\t visitor: [\"expression\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXIdentifier\", {\n\t builder: [\"name\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t name: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXMemberExpression\", {\n\t visitor: [\"object\", \"property\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t object: {\n\t validate: assertNodeType(\"JSXMemberExpression\", \"JSXIdentifier\")\n\t },\n\t property: {\n\t validate: assertNodeType(\"JSXIdentifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXNamespacedName\", {\n\t visitor: [\"namespace\", \"name\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t namespace: {\n\t validate: assertNodeType(\"JSXIdentifier\")\n\t },\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXOpeningElement\", {\n\t builder: [\"name\", \"attributes\", \"selfClosing\"],\n\t visitor: [\"name\", \"attributes\"],\n\t aliases: [\"JSX\", \"Immutable\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"JSXIdentifier\", \"JSXMemberExpression\", \"JSXNamespacedName\")\n\t },\n\t selfClosing: {\n\t \"default\": false\n\t },\n\t attributes: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"JSXAttribute\", \"JSXSpreadAttribute\")))\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TypeParameterInstantiation\", \"TSTypeParameterInstantiation\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"JSXSpreadAttribute\", {\n\t visitor: [\"argument\"],\n\t aliases: [\"JSX\"],\n\t fields: {\n\t argument: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXText\", {\n\t aliases: [\"JSX\", \"Immutable\"],\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\tdefineType(\"JSXFragment\", {\n\t builder: [\"openingFragment\", \"closingFragment\", \"children\"],\n\t visitor: [\"openingFragment\", \"children\", \"closingFragment\"],\n\t aliases: [\"JSX\", \"Immutable\", \"Expression\"],\n\t fields: {\n\t openingFragment: {\n\t validate: assertNodeType(\"JSXOpeningFragment\")\n\t },\n\t closingFragment: {\n\t validate: assertNodeType(\"JSXClosingFragment\")\n\t },\n\t children: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"JSXText\", \"JSXExpressionContainer\", \"JSXSpreadChild\", \"JSXElement\", \"JSXFragment\")))\n\t }\n\t }\n\t});\n\tdefineType(\"JSXOpeningFragment\", {\n\t aliases: [\"JSX\", \"Immutable\"]\n\t});\n\tdefineType(\"JSXClosingFragment\", {\n\t aliases: [\"JSX\", \"Immutable\"]\n\t});\n\n\tvar PLACEHOLDERS = [\"Identifier\", \"StringLiteral\", \"Expression\", \"Statement\", \"Declaration\", \"BlockStatement\", \"ClassBody\", \"Pattern\"];\n\tvar PLACEHOLDERS_ALIAS = {\n\t Declaration: [\"Statement\"],\n\t Pattern: [\"PatternLike\", \"LVal\"]\n\t};\n\n\tfor (var _i$3 = 0, _PLACEHOLDERS = PLACEHOLDERS; _i$3 < _PLACEHOLDERS.length; _i$3++) {\n\t var type$2 = _PLACEHOLDERS[_i$3];\n\t var alias = ALIAS_KEYS[type$2];\n\t if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type$2] = alias;\n\t}\n\n\tvar PLACEHOLDERS_FLIPPED_ALIAS = {};\n\tObject.keys(PLACEHOLDERS_ALIAS).forEach(function (type) {\n\t PLACEHOLDERS_ALIAS[type].forEach(function (alias) {\n\t if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) {\n\t PLACEHOLDERS_FLIPPED_ALIAS[alias] = [];\n\t }\n\n\t PLACEHOLDERS_FLIPPED_ALIAS[alias].push(type);\n\t });\n\t});\n\n\t{\n\t defineType(\"Noop\", {\n\t visitor: []\n\t });\n\t}\n\tdefineType(\"Placeholder\", {\n\t visitor: [],\n\t builder: [\"expectedNode\", \"name\"],\n\t fields: {\n\t name: {\n\t validate: assertNodeType(\"Identifier\")\n\t },\n\t expectedNode: {\n\t validate: assertOneOf.apply(void 0, _toConsumableArray(PLACEHOLDERS))\n\t }\n\t }\n\t});\n\tdefineType(\"V8IntrinsicIdentifier\", {\n\t builder: [\"name\"],\n\t fields: {\n\t name: {\n\t validate: assertValueType(\"string\")\n\t }\n\t }\n\t});\n\n\tdefineType(\"ArgumentPlaceholder\", {});\n\tdefineType(\"BindExpression\", {\n\t visitor: [\"object\", \"callee\"],\n\t aliases: [\"Expression\"],\n\t fields: !browser$4.env.BABEL_TYPES_8_BREAKING ? {\n\t object: {\n\t validate: Object.assign(function () {}, {\n\t oneOfNodeTypes: [\"Expression\"]\n\t })\n\t },\n\t callee: {\n\t validate: Object.assign(function () {}, {\n\t oneOfNodeTypes: [\"Expression\"]\n\t })\n\t }\n\t } : {\n\t object: {\n\t validate: assertNodeType(\"Expression\")\n\t },\n\t callee: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"ImportAttribute\", {\n\t visitor: [\"key\", \"value\"],\n\t fields: {\n\t key: {\n\t validate: assertNodeType(\"Identifier\", \"StringLiteral\")\n\t },\n\t value: {\n\t validate: assertNodeType(\"StringLiteral\")\n\t }\n\t }\n\t});\n\tdefineType(\"Decorator\", {\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t }\n\t});\n\tdefineType(\"DoExpression\", {\n\t visitor: [\"body\"],\n\t builder: [\"body\", \"async\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t body: {\n\t validate: assertNodeType(\"BlockStatement\")\n\t },\n\t async: {\n\t validate: assertValueType(\"boolean\"),\n\t \"default\": false\n\t }\n\t }\n\t});\n\tdefineType(\"ExportDefaultSpecifier\", {\n\t visitor: [\"exported\"],\n\t aliases: [\"ModuleSpecifier\"],\n\t fields: {\n\t exported: {\n\t validate: assertNodeType(\"Identifier\")\n\t }\n\t }\n\t});\n\tdefineType(\"RecordExpression\", {\n\t visitor: [\"properties\"],\n\t aliases: [\"Expression\"],\n\t fields: {\n\t properties: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"ObjectProperty\", \"SpreadElement\")))\n\t }\n\t }\n\t});\n\tdefineType(\"TupleExpression\", {\n\t fields: {\n\t elements: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Expression\", \"SpreadElement\"))),\n\t \"default\": []\n\t }\n\t },\n\t visitor: [\"elements\"],\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"DecimalLiteral\", {\n\t builder: [\"value\"],\n\t fields: {\n\t value: {\n\t validate: assertValueType(\"string\")\n\t }\n\t },\n\t aliases: [\"Expression\", \"Pureish\", \"Literal\", \"Immutable\"]\n\t});\n\tdefineType(\"StaticBlock\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Statement\")))\n\t }\n\t },\n\t aliases: [\"Scopable\", \"BlockParent\"]\n\t});\n\tdefineType(\"ModuleExpression\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: {\n\t validate: assertNodeType(\"Program\")\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"TopicReference\", {\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"PipelineTopicExpression\", {\n\t builder: [\"expression\"],\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"PipelineBareFunction\", {\n\t builder: [\"callee\"],\n\t visitor: [\"callee\"],\n\t fields: {\n\t callee: {\n\t validate: assertNodeType(\"Expression\")\n\t }\n\t },\n\t aliases: [\"Expression\"]\n\t});\n\tdefineType(\"PipelinePrimaryTopicReference\", {\n\t aliases: [\"Expression\"]\n\t});\n\n\tvar bool = assertValueType(\"boolean\");\n\tvar tSFunctionTypeAnnotationCommon = {\n\t returnType: {\n\t validate: assertNodeType(\"TSTypeAnnotation\", \"Noop\"),\n\t optional: true\n\t },\n\t typeParameters: {\n\t validate: assertNodeType(\"TSTypeParameterDeclaration\", \"Noop\"),\n\t optional: true\n\t }\n\t};\n\tdefineType(\"TSParameterProperty\", {\n\t aliases: [\"LVal\"],\n\t visitor: [\"parameter\"],\n\t fields: {\n\t accessibility: {\n\t validate: assertOneOf(\"public\", \"private\", \"protected\"),\n\t optional: true\n\t },\n\t readonly: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t parameter: {\n\t validate: assertNodeType(\"Identifier\", \"AssignmentPattern\")\n\t },\n\t override: {\n\t validate: assertValueType(\"boolean\"),\n\t optional: true\n\t },\n\t decorators: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"Decorator\"))),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"TSDeclareFunction\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"typeParameters\", \"params\", \"returnType\"],\n\t fields: Object.assign({}, functionDeclarationCommon, tSFunctionTypeAnnotationCommon)\n\t});\n\tdefineType(\"TSDeclareMethod\", {\n\t visitor: [\"decorators\", \"key\", \"typeParameters\", \"params\", \"returnType\"],\n\t fields: Object.assign({}, classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)\n\t});\n\tdefineType(\"TSQualifiedName\", {\n\t aliases: [\"TSEntityName\"],\n\t visitor: [\"left\", \"right\"],\n\t fields: {\n\t left: validateType(\"TSEntityName\"),\n\t right: validateType(\"Identifier\")\n\t }\n\t});\n\tvar signatureDeclarationCommon = {\n\t typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n\t parameters: validateArrayOfType([\"Identifier\", \"RestElement\"]),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\")\n\t};\n\tvar callConstructSignatureDeclaration = {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"typeParameters\", \"parameters\", \"typeAnnotation\"],\n\t fields: signatureDeclarationCommon\n\t};\n\tdefineType(\"TSCallSignatureDeclaration\", callConstructSignatureDeclaration);\n\tdefineType(\"TSConstructSignatureDeclaration\", callConstructSignatureDeclaration);\n\tvar namedTypeElementCommon = {\n\t key: validateType(\"Expression\"),\n\t computed: validate$5(bool),\n\t optional: validateOptional(bool)\n\t};\n\tdefineType(\"TSPropertySignature\", {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"key\", \"typeAnnotation\", \"initializer\"],\n\t fields: Object.assign({}, namedTypeElementCommon, {\n\t readonly: validateOptional(bool),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n\t initializer: validateOptionalType(\"Expression\"),\n\t kind: {\n\t validate: assertOneOf(\"get\", \"set\")\n\t }\n\t })\n\t});\n\tdefineType(\"TSMethodSignature\", {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"key\", \"typeParameters\", \"parameters\", \"typeAnnotation\"],\n\t fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {\n\t kind: {\n\t validate: assertOneOf(\"method\", \"get\", \"set\")\n\t }\n\t })\n\t});\n\tdefineType(\"TSIndexSignature\", {\n\t aliases: [\"TSTypeElement\"],\n\t visitor: [\"parameters\", \"typeAnnotation\"],\n\t fields: {\n\t readonly: validateOptional(bool),\n\t \"static\": validateOptional(bool),\n\t parameters: validateArrayOfType(\"Identifier\"),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\")\n\t }\n\t});\n\tvar tsKeywordTypes = [\"TSAnyKeyword\", \"TSBooleanKeyword\", \"TSBigIntKeyword\", \"TSIntrinsicKeyword\", \"TSNeverKeyword\", \"TSNullKeyword\", \"TSNumberKeyword\", \"TSObjectKeyword\", \"TSStringKeyword\", \"TSSymbolKeyword\", \"TSUndefinedKeyword\", \"TSUnknownKeyword\", \"TSVoidKeyword\"];\n\n\tfor (var _i$2 = 0, _tsKeywordTypes = tsKeywordTypes; _i$2 < _tsKeywordTypes.length; _i$2++) {\n\t var type$1 = _tsKeywordTypes[_i$2];\n\t defineType(type$1, {\n\t aliases: [\"TSType\", \"TSBaseType\"],\n\t visitor: [],\n\t fields: {}\n\t });\n\t}\n\n\tdefineType(\"TSThisType\", {\n\t aliases: [\"TSType\", \"TSBaseType\"],\n\t visitor: [],\n\t fields: {}\n\t});\n\tvar fnOrCtrBase = {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeParameters\", \"parameters\", \"typeAnnotation\"]\n\t};\n\tdefineType(\"TSFunctionType\", Object.assign({}, fnOrCtrBase, {\n\t fields: signatureDeclarationCommon\n\t}));\n\tdefineType(\"TSConstructorType\", Object.assign({}, fnOrCtrBase, {\n\t fields: Object.assign({}, signatureDeclarationCommon, {\n\t \"abstract\": validateOptional(bool)\n\t })\n\t}));\n\tdefineType(\"TSTypeReference\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeName\", \"typeParameters\"],\n\t fields: {\n\t typeName: validateType(\"TSEntityName\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"TSTypePredicate\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"parameterName\", \"typeAnnotation\"],\n\t builder: [\"parameterName\", \"typeAnnotation\", \"asserts\"],\n\t fields: {\n\t parameterName: validateType([\"Identifier\", \"TSThisType\"]),\n\t typeAnnotation: validateOptionalType(\"TSTypeAnnotation\"),\n\t asserts: validateOptional(bool)\n\t }\n\t});\n\tdefineType(\"TSTypeQuery\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"exprName\"],\n\t fields: {\n\t exprName: validateType([\"TSEntityName\", \"TSImportType\"])\n\t }\n\t});\n\tdefineType(\"TSTypeLiteral\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"members\"],\n\t fields: {\n\t members: validateArrayOfType(\"TSTypeElement\")\n\t }\n\t});\n\tdefineType(\"TSArrayType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"elementType\"],\n\t fields: {\n\t elementType: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSTupleType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"elementTypes\"],\n\t fields: {\n\t elementTypes: validateArrayOfType([\"TSType\", \"TSNamedTupleMember\"])\n\t }\n\t});\n\tdefineType(\"TSOptionalType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSRestType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSNamedTupleMember\", {\n\t visitor: [\"label\", \"elementType\"],\n\t builder: [\"label\", \"elementType\", \"optional\"],\n\t fields: {\n\t label: validateType(\"Identifier\"),\n\t optional: {\n\t validate: bool,\n\t \"default\": false\n\t },\n\t elementType: validateType(\"TSType\")\n\t }\n\t});\n\tvar unionOrIntersection = {\n\t aliases: [\"TSType\"],\n\t visitor: [\"types\"],\n\t fields: {\n\t types: validateArrayOfType(\"TSType\")\n\t }\n\t};\n\tdefineType(\"TSUnionType\", unionOrIntersection);\n\tdefineType(\"TSIntersectionType\", unionOrIntersection);\n\tdefineType(\"TSConditionalType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"checkType\", \"extendsType\", \"trueType\", \"falseType\"],\n\t fields: {\n\t checkType: validateType(\"TSType\"),\n\t extendsType: validateType(\"TSType\"),\n\t trueType: validateType(\"TSType\"),\n\t falseType: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSInferType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeParameter\"],\n\t fields: {\n\t typeParameter: validateType(\"TSTypeParameter\")\n\t }\n\t});\n\tdefineType(\"TSParenthesizedType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSTypeOperator\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t operator: validate$5(assertValueType(\"string\")),\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSIndexedAccessType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"objectType\", \"indexType\"],\n\t fields: {\n\t objectType: validateType(\"TSType\"),\n\t indexType: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSMappedType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"typeParameter\", \"typeAnnotation\", \"nameType\"],\n\t fields: {\n\t readonly: validateOptional(bool),\n\t typeParameter: validateType(\"TSTypeParameter\"),\n\t optional: validateOptional(bool),\n\t typeAnnotation: validateOptionalType(\"TSType\"),\n\t nameType: validateOptionalType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSLiteralType\", {\n\t aliases: [\"TSType\", \"TSBaseType\"],\n\t visitor: [\"literal\"],\n\t fields: {\n\t literal: {\n\t validate: function () {\n\t var unaryExpression = assertNodeType(\"NumericLiteral\", \"BigIntLiteral\");\n\t var unaryOperator = assertOneOf(\"-\");\n\t var literal = assertNodeType(\"NumericLiteral\", \"StringLiteral\", \"BooleanLiteral\", \"BigIntLiteral\");\n\n\t function validator(parent, key, node) {\n\t if (is$1(\"UnaryExpression\", node)) {\n\t unaryOperator(node, \"operator\", node.operator);\n\t unaryExpression(node, \"argument\", node.argument);\n\t } else {\n\t literal(parent, key, node);\n\t }\n\t }\n\n\t validator.oneOfNodeTypes = [\"NumericLiteral\", \"StringLiteral\", \"BooleanLiteral\", \"BigIntLiteral\", \"UnaryExpression\"];\n\t return validator;\n\t }()\n\t }\n\t }\n\t});\n\tdefineType(\"TSExpressionWithTypeArguments\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"expression\", \"typeParameters\"],\n\t fields: {\n\t expression: validateType(\"TSEntityName\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"TSInterfaceDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"typeParameters\", \"extends\", \"body\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n\t \"extends\": validateOptional(arrayOfType(\"TSExpressionWithTypeArguments\")),\n\t body: validateType(\"TSInterfaceBody\")\n\t }\n\t});\n\tdefineType(\"TSInterfaceBody\", {\n\t visitor: [\"body\"],\n\t fields: {\n\t body: validateArrayOfType(\"TSTypeElement\")\n\t }\n\t});\n\tdefineType(\"TSTypeAliasDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"typeParameters\", \"typeAnnotation\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t id: validateType(\"Identifier\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterDeclaration\"),\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSAsExpression\", {\n\t aliases: [\"Expression\"],\n\t visitor: [\"expression\", \"typeAnnotation\"],\n\t fields: {\n\t expression: validateType(\"Expression\"),\n\t typeAnnotation: validateType(\"TSType\")\n\t }\n\t});\n\tdefineType(\"TSTypeAssertion\", {\n\t aliases: [\"Expression\"],\n\t visitor: [\"typeAnnotation\", \"expression\"],\n\t fields: {\n\t typeAnnotation: validateType(\"TSType\"),\n\t expression: validateType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSEnumDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"members\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t \"const\": validateOptional(bool),\n\t id: validateType(\"Identifier\"),\n\t members: validateArrayOfType(\"TSEnumMember\"),\n\t initializer: validateOptionalType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSEnumMember\", {\n\t visitor: [\"id\", \"initializer\"],\n\t fields: {\n\t id: validateType([\"Identifier\", \"StringLiteral\"]),\n\t initializer: validateOptionalType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSModuleDeclaration\", {\n\t aliases: [\"Statement\", \"Declaration\"],\n\t visitor: [\"id\", \"body\"],\n\t fields: {\n\t declare: validateOptional(bool),\n\t global: validateOptional(bool),\n\t id: validateType([\"Identifier\", \"StringLiteral\"]),\n\t body: validateType([\"TSModuleBlock\", \"TSModuleDeclaration\"])\n\t }\n\t});\n\tdefineType(\"TSModuleBlock\", {\n\t aliases: [\"Scopable\", \"Block\", \"BlockParent\"],\n\t visitor: [\"body\"],\n\t fields: {\n\t body: validateArrayOfType(\"Statement\")\n\t }\n\t});\n\tdefineType(\"TSImportType\", {\n\t aliases: [\"TSType\"],\n\t visitor: [\"argument\", \"qualifier\", \"typeParameters\"],\n\t fields: {\n\t argument: validateType(\"StringLiteral\"),\n\t qualifier: validateOptionalType(\"TSEntityName\"),\n\t typeParameters: validateOptionalType(\"TSTypeParameterInstantiation\")\n\t }\n\t});\n\tdefineType(\"TSImportEqualsDeclaration\", {\n\t aliases: [\"Statement\"],\n\t visitor: [\"id\", \"moduleReference\"],\n\t fields: {\n\t isExport: validate$5(bool),\n\t id: validateType(\"Identifier\"),\n\t moduleReference: validateType([\"TSEntityName\", \"TSExternalModuleReference\"]),\n\t importKind: {\n\t validate: assertOneOf(\"type\", \"value\"),\n\t optional: true\n\t }\n\t }\n\t});\n\tdefineType(\"TSExternalModuleReference\", {\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: validateType(\"StringLiteral\")\n\t }\n\t});\n\tdefineType(\"TSNonNullExpression\", {\n\t aliases: [\"Expression\"],\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: validateType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSExportAssignment\", {\n\t aliases: [\"Statement\"],\n\t visitor: [\"expression\"],\n\t fields: {\n\t expression: validateType(\"Expression\")\n\t }\n\t});\n\tdefineType(\"TSNamespaceExportDeclaration\", {\n\t aliases: [\"Statement\"],\n\t visitor: [\"id\"],\n\t fields: {\n\t id: validateType(\"Identifier\")\n\t }\n\t});\n\tdefineType(\"TSTypeAnnotation\", {\n\t visitor: [\"typeAnnotation\"],\n\t fields: {\n\t typeAnnotation: {\n\t validate: assertNodeType(\"TSType\")\n\t }\n\t }\n\t});\n\tdefineType(\"TSTypeParameterInstantiation\", {\n\t visitor: [\"params\"],\n\t fields: {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSType\")))\n\t }\n\t }\n\t});\n\tdefineType(\"TSTypeParameterDeclaration\", {\n\t visitor: [\"params\"],\n\t fields: {\n\t params: {\n\t validate: chain$1(assertValueType(\"array\"), assertEach(assertNodeType(\"TSTypeParameter\")))\n\t }\n\t }\n\t});\n\tdefineType(\"TSTypeParameter\", {\n\t builder: [\"constraint\", \"default\", \"name\"],\n\t visitor: [\"constraint\", \"default\"],\n\t fields: {\n\t name: {\n\t validate: assertValueType(\"string\")\n\t },\n\t constraint: {\n\t validate: assertNodeType(\"TSType\"),\n\t optional: true\n\t },\n\t \"default\": {\n\t validate: assertNodeType(\"TSType\"),\n\t optional: true\n\t }\n\t }\n\t});\n\n\ttoFastProperties(VISITOR_KEYS$6);\n\ttoFastProperties(ALIAS_KEYS);\n\ttoFastProperties(FLIPPED_ALIAS_KEYS$3);\n\ttoFastProperties(NODE_FIELDS);\n\ttoFastProperties(BUILDER_KEYS);\n\ttoFastProperties(DEPRECATED_KEYS$1);\n\ttoFastProperties(PLACEHOLDERS_ALIAS);\n\ttoFastProperties(PLACEHOLDERS_FLIPPED_ALIAS);\n\tvar TYPES$1 = Object.keys(VISITOR_KEYS$6).concat(Object.keys(FLIPPED_ALIAS_KEYS$3)).concat(Object.keys(DEPRECATED_KEYS$1));\n\n\tfunction builder(type) {\n\t for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t var keys = BUILDER_KEYS[type];\n\t var countArgs = args.length;\n\n\t if (countArgs > keys.length) {\n\t throw new Error(type + \": Too many arguments passed. Received \" + countArgs + \" but can receive no more than \" + keys.length);\n\t }\n\n\t var node = {\n\t type: type\n\t };\n\t var i = 0;\n\t keys.forEach(function (key) {\n\t var field = NODE_FIELDS[type][key];\n\t var arg;\n\t if (i < countArgs) arg = args[i];\n\n\t if (arg === undefined) {\n\t arg = Array.isArray(field[\"default\"]) ? [] : field[\"default\"];\n\t }\n\n\t node[key] = arg;\n\t i++;\n\t });\n\n\t for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t validate$6(node, key, node[key]);\n\t }\n\n\t return node;\n\t}\n\n\tfunction arrayExpression$2(elements) {\n\t return builder.apply(void 0, [\"ArrayExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction assignmentExpression$c(operator, left, right) {\n\t return builder.apply(void 0, [\"AssignmentExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction binaryExpression$4(operator, left, right) {\n\t return builder.apply(void 0, [\"BinaryExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interpreterDirective$1(value) {\n\t return builder.apply(void 0, [\"InterpreterDirective\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction directive$1(value) {\n\t return builder.apply(void 0, [\"Directive\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction directiveLiteral$1(value) {\n\t return builder.apply(void 0, [\"DirectiveLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction blockStatement$6(body, directives) {\n\t return builder.apply(void 0, [\"BlockStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction breakStatement(label) {\n\t return builder.apply(void 0, [\"BreakStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction callExpression$e(callee, _arguments) {\n\t return builder.apply(void 0, [\"CallExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction catchClause(param, body) {\n\t return builder.apply(void 0, [\"CatchClause\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction conditionalExpression$3(test, consequent, alternate) {\n\t return builder.apply(void 0, [\"ConditionalExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction continueStatement(label) {\n\t return builder.apply(void 0, [\"ContinueStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction debuggerStatement() {\n\t return builder.apply(void 0, [\"DebuggerStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction doWhileStatement(test, body) {\n\t return builder.apply(void 0, [\"DoWhileStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction emptyStatement$1() {\n\t return builder.apply(void 0, [\"EmptyStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction expressionStatement$a(expression) {\n\t return builder.apply(void 0, [\"ExpressionStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction file$1(program, comments, tokens) {\n\t return builder.apply(void 0, [\"File\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction forInStatement(left, right, body) {\n\t return builder.apply(void 0, [\"ForInStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction forStatement(init, test, update, body) {\n\t return builder.apply(void 0, [\"ForStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionDeclaration(id, params, body, generator, async) {\n\t return builder.apply(void 0, [\"FunctionDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionExpression$3(id, params, body, generator, async) {\n\t return builder.apply(void 0, [\"FunctionExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction identifier$j(name) {\n\t return builder.apply(void 0, [\"Identifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction ifStatement(test, consequent, alternate) {\n\t return builder.apply(void 0, [\"IfStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction labeledStatement(label, body) {\n\t return builder.apply(void 0, [\"LabeledStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction stringLiteral$8(value) {\n\t return builder.apply(void 0, [\"StringLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction numericLiteral$8(value) {\n\t return builder.apply(void 0, [\"NumericLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction nullLiteral$2() {\n\t return builder.apply(void 0, [\"NullLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction booleanLiteral$5(value) {\n\t return builder.apply(void 0, [\"BooleanLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction regExpLiteral(pattern, flags) {\n\t return builder.apply(void 0, [\"RegExpLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction logicalExpression$2(operator, left, right) {\n\t return builder.apply(void 0, [\"LogicalExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction memberExpression$b(object, property, computed, optional) {\n\t return builder.apply(void 0, [\"MemberExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction newExpression(callee, _arguments) {\n\t return builder.apply(void 0, [\"NewExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction program$3(body, directives, sourceType, interpreter) {\n\t return builder.apply(void 0, [\"Program\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectExpression$4(properties) {\n\t return builder.apply(void 0, [\"ObjectExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectMethod(kind, key, params, body, computed, generator, async) {\n\t return builder.apply(void 0, [\"ObjectMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectProperty$2(key, value, computed, shorthand, decorators) {\n\t return builder.apply(void 0, [\"ObjectProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction restElement$1(argument) {\n\t return builder.apply(void 0, [\"RestElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction returnStatement$3(argument) {\n\t return builder.apply(void 0, [\"ReturnStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction sequenceExpression$7(expressions) {\n\t return builder.apply(void 0, [\"SequenceExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction parenthesizedExpression(expression) {\n\t return builder.apply(void 0, [\"ParenthesizedExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction switchCase(test, consequent) {\n\t return builder.apply(void 0, [\"SwitchCase\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction switchStatement(discriminant, cases) {\n\t return builder.apply(void 0, [\"SwitchStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction thisExpression$3() {\n\t return builder.apply(void 0, [\"ThisExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction throwStatement(argument) {\n\t return builder.apply(void 0, [\"ThrowStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tryStatement(block, handler, finalizer) {\n\t return builder.apply(void 0, [\"TryStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction unaryExpression$7(operator, argument, prefix) {\n\t return builder.apply(void 0, [\"UnaryExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction updateExpression(operator, argument, prefix) {\n\t return builder.apply(void 0, [\"UpdateExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction variableDeclaration$8(kind, declarations) {\n\t return builder.apply(void 0, [\"VariableDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction variableDeclarator$8(id, init) {\n\t return builder.apply(void 0, [\"VariableDeclarator\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction whileStatement(test, body) {\n\t return builder.apply(void 0, [\"WhileStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction withStatement(object, body) {\n\t return builder.apply(void 0, [\"WithStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction assignmentPattern(left, right) {\n\t return builder.apply(void 0, [\"AssignmentPattern\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction arrayPattern(elements) {\n\t return builder.apply(void 0, [\"ArrayPattern\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction arrowFunctionExpression$4(params, body, async) {\n\t return builder.apply(void 0, [\"ArrowFunctionExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classBody(body) {\n\t return builder.apply(void 0, [\"ClassBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classExpression(id, superClass, body, decorators) {\n\t return builder.apply(void 0, [\"ClassExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classDeclaration(id, superClass, body, decorators) {\n\t return builder.apply(void 0, [\"ClassDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportAllDeclaration(source) {\n\t return builder.apply(void 0, [\"ExportAllDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportDefaultDeclaration(declaration) {\n\t return builder.apply(void 0, [\"ExportDefaultDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportNamedDeclaration$2(declaration, specifiers, source) {\n\t return builder.apply(void 0, [\"ExportNamedDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportSpecifier$2(local, exported) {\n\t return builder.apply(void 0, [\"ExportSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction forOfStatement(left, right, body, _await) {\n\t return builder.apply(void 0, [\"ForOfStatement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importDeclaration$1(specifiers, source) {\n\t return builder.apply(void 0, [\"ImportDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importDefaultSpecifier$1(local) {\n\t return builder.apply(void 0, [\"ImportDefaultSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importNamespaceSpecifier$1(local) {\n\t return builder.apply(void 0, [\"ImportNamespaceSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importSpecifier$1(local, imported) {\n\t return builder.apply(void 0, [\"ImportSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction metaProperty$1(meta, property) {\n\t return builder.apply(void 0, [\"MetaProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classMethod(kind, key, params, body, computed, _static, generator, async) {\n\t return builder.apply(void 0, [\"ClassMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectPattern(properties) {\n\t return builder.apply(void 0, [\"ObjectPattern\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction spreadElement$2(argument) {\n\t return builder.apply(void 0, [\"SpreadElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\n\tfunction _super$1() {\n\t return builder.apply(void 0, [\"Super\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction taggedTemplateExpression(tag, quasi) {\n\t return builder.apply(void 0, [\"TaggedTemplateExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction templateElement(value, tail) {\n\t return builder.apply(void 0, [\"TemplateElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction templateLiteral(quasis, expressions) {\n\t return builder.apply(void 0, [\"TemplateLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction yieldExpression$2(argument, delegate) {\n\t return builder.apply(void 0, [\"YieldExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction awaitExpression$1(argument) {\n\t return builder.apply(void 0, [\"AwaitExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\n\tfunction _import() {\n\t return builder.apply(void 0, [\"Import\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction bigIntLiteral(value) {\n\t return builder.apply(void 0, [\"BigIntLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportNamespaceSpecifier(exported) {\n\t return builder.apply(void 0, [\"ExportNamespaceSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction optionalMemberExpression$2(object, property, computed, optional) {\n\t return builder.apply(void 0, [\"OptionalMemberExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction optionalCallExpression$2(callee, _arguments, optional) {\n\t return builder.apply(void 0, [\"OptionalCallExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classProperty(key, value, typeAnnotation, decorators, computed, _static) {\n\t return builder.apply(void 0, [\"ClassProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classPrivateProperty(key, value, decorators, _static) {\n\t return builder.apply(void 0, [\"ClassPrivateProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classPrivateMethod(kind, key, params, body, _static) {\n\t return builder.apply(void 0, [\"ClassPrivateMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction privateName(id) {\n\t return builder.apply(void 0, [\"PrivateName\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction anyTypeAnnotation$2() {\n\t return builder.apply(void 0, [\"AnyTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction arrayTypeAnnotation$1(elementType) {\n\t return builder.apply(void 0, [\"ArrayTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction booleanTypeAnnotation$1() {\n\t return builder.apply(void 0, [\"BooleanTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction booleanLiteralTypeAnnotation(value) {\n\t return builder.apply(void 0, [\"BooleanLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction nullLiteralTypeAnnotation$1() {\n\t return builder.apply(void 0, [\"NullLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction classImplements(id, typeParameters) {\n\t return builder.apply(void 0, [\"ClassImplements\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareClass(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"DeclareClass\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareFunction(id) {\n\t return builder.apply(void 0, [\"DeclareFunction\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareInterface(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"DeclareInterface\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareModule(id, body, kind) {\n\t return builder.apply(void 0, [\"DeclareModule\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareModuleExports(typeAnnotation) {\n\t return builder.apply(void 0, [\"DeclareModuleExports\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareTypeAlias(id, typeParameters, right) {\n\t return builder.apply(void 0, [\"DeclareTypeAlias\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareOpaqueType(id, typeParameters, supertype) {\n\t return builder.apply(void 0, [\"DeclareOpaqueType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareVariable(id) {\n\t return builder.apply(void 0, [\"DeclareVariable\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareExportDeclaration(declaration, specifiers, source) {\n\t return builder.apply(void 0, [\"DeclareExportDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declareExportAllDeclaration(source) {\n\t return builder.apply(void 0, [\"DeclareExportAllDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction declaredPredicate(value) {\n\t return builder.apply(void 0, [\"DeclaredPredicate\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction existsTypeAnnotation() {\n\t return builder.apply(void 0, [\"ExistsTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionTypeAnnotation(typeParameters, params, rest, returnType) {\n\t return builder.apply(void 0, [\"FunctionTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction functionTypeParam(name, typeAnnotation) {\n\t return builder.apply(void 0, [\"FunctionTypeParam\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction genericTypeAnnotation$1(id, typeParameters) {\n\t return builder.apply(void 0, [\"GenericTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction inferredPredicate() {\n\t return builder.apply(void 0, [\"InferredPredicate\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interfaceExtends(id, typeParameters) {\n\t return builder.apply(void 0, [\"InterfaceExtends\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interfaceDeclaration(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"InterfaceDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction interfaceTypeAnnotation(_extends, body) {\n\t return builder.apply(void 0, [\"InterfaceTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction intersectionTypeAnnotation(types) {\n\t return builder.apply(void 0, [\"IntersectionTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction mixedTypeAnnotation() {\n\t return builder.apply(void 0, [\"MixedTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction emptyTypeAnnotation() {\n\t return builder.apply(void 0, [\"EmptyTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction nullableTypeAnnotation(typeAnnotation) {\n\t return builder.apply(void 0, [\"NullableTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction numberLiteralTypeAnnotation(value) {\n\t return builder.apply(void 0, [\"NumberLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction numberTypeAnnotation$2() {\n\t return builder.apply(void 0, [\"NumberTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeAnnotation(properties, indexers, callProperties, internalSlots, exact) {\n\t return builder.apply(void 0, [\"ObjectTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeInternalSlot(id, value, optional, _static, method) {\n\t return builder.apply(void 0, [\"ObjectTypeInternalSlot\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeCallProperty(value) {\n\t return builder.apply(void 0, [\"ObjectTypeCallProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeIndexer(id, key, value, variance) {\n\t return builder.apply(void 0, [\"ObjectTypeIndexer\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeProperty(key, value, variance) {\n\t return builder.apply(void 0, [\"ObjectTypeProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction objectTypeSpreadProperty(argument) {\n\t return builder.apply(void 0, [\"ObjectTypeSpreadProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction opaqueType(id, typeParameters, supertype, impltype) {\n\t return builder.apply(void 0, [\"OpaqueType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction qualifiedTypeIdentifier(id, qualification) {\n\t return builder.apply(void 0, [\"QualifiedTypeIdentifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction stringLiteralTypeAnnotation(value) {\n\t return builder.apply(void 0, [\"StringLiteralTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction stringTypeAnnotation$2() {\n\t return builder.apply(void 0, [\"StringTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction symbolTypeAnnotation() {\n\t return builder.apply(void 0, [\"SymbolTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction thisTypeAnnotation() {\n\t return builder.apply(void 0, [\"ThisTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tupleTypeAnnotation$1(types) {\n\t return builder.apply(void 0, [\"TupleTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeofTypeAnnotation(argument) {\n\t return builder.apply(void 0, [\"TypeofTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeAlias(id, typeParameters, right) {\n\t return builder.apply(void 0, [\"TypeAlias\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeAnnotation(typeAnnotation) {\n\t return builder.apply(void 0, [\"TypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeCastExpression(expression, typeAnnotation) {\n\t return builder.apply(void 0, [\"TypeCastExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeParameter(bound, _default, variance) {\n\t return builder.apply(void 0, [\"TypeParameter\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeParameterDeclaration(params) {\n\t return builder.apply(void 0, [\"TypeParameterDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction typeParameterInstantiation(params) {\n\t return builder.apply(void 0, [\"TypeParameterInstantiation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction unionTypeAnnotation$1(types) {\n\t return builder.apply(void 0, [\"UnionTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction variance(kind) {\n\t return builder.apply(void 0, [\"Variance\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction voidTypeAnnotation$3() {\n\t return builder.apply(void 0, [\"VoidTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumDeclaration(id, body) {\n\t return builder.apply(void 0, [\"EnumDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumBooleanBody(members) {\n\t return builder.apply(void 0, [\"EnumBooleanBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumNumberBody(members) {\n\t return builder.apply(void 0, [\"EnumNumberBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumStringBody(members) {\n\t return builder.apply(void 0, [\"EnumStringBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumSymbolBody(members) {\n\t return builder.apply(void 0, [\"EnumSymbolBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumBooleanMember(id) {\n\t return builder.apply(void 0, [\"EnumBooleanMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumNumberMember(id, init) {\n\t return builder.apply(void 0, [\"EnumNumberMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumStringMember(id, init) {\n\t return builder.apply(void 0, [\"EnumStringMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction enumDefaultedMember(id) {\n\t return builder.apply(void 0, [\"EnumDefaultedMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction indexedAccessType(objectType, indexType) {\n\t return builder.apply(void 0, [\"IndexedAccessType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction optionalIndexedAccessType(objectType, indexType) {\n\t return builder.apply(void 0, [\"OptionalIndexedAccessType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxAttribute(name, value) {\n\t return builder.apply(void 0, [\"JSXAttribute\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxClosingElement(name) {\n\t return builder.apply(void 0, [\"JSXClosingElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxElement(openingElement, closingElement, children, selfClosing) {\n\t return builder.apply(void 0, [\"JSXElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxEmptyExpression() {\n\t return builder.apply(void 0, [\"JSXEmptyExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxExpressionContainer$1(expression) {\n\t return builder.apply(void 0, [\"JSXExpressionContainer\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxSpreadChild(expression) {\n\t return builder.apply(void 0, [\"JSXSpreadChild\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxIdentifier$2(name) {\n\t return builder.apply(void 0, [\"JSXIdentifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxMemberExpression$1(object, property) {\n\t return builder.apply(void 0, [\"JSXMemberExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxNamespacedName(namespace, name) {\n\t return builder.apply(void 0, [\"JSXNamespacedName\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxOpeningElement(name, attributes, selfClosing) {\n\t return builder.apply(void 0, [\"JSXOpeningElement\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxSpreadAttribute(argument) {\n\t return builder.apply(void 0, [\"JSXSpreadAttribute\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxText(value) {\n\t return builder.apply(void 0, [\"JSXText\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxFragment(openingFragment, closingFragment, children) {\n\t return builder.apply(void 0, [\"JSXFragment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxOpeningFragment() {\n\t return builder.apply(void 0, [\"JSXOpeningFragment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction jsxClosingFragment() {\n\t return builder.apply(void 0, [\"JSXClosingFragment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction noop$1() {\n\t return builder.apply(void 0, [\"Noop\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction placeholder(expectedNode, name) {\n\t return builder.apply(void 0, [\"Placeholder\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction v8IntrinsicIdentifier(name) {\n\t return builder.apply(void 0, [\"V8IntrinsicIdentifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction argumentPlaceholder() {\n\t return builder.apply(void 0, [\"ArgumentPlaceholder\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction bindExpression(object, callee) {\n\t return builder.apply(void 0, [\"BindExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction importAttribute(key, value) {\n\t return builder.apply(void 0, [\"ImportAttribute\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction decorator(expression) {\n\t return builder.apply(void 0, [\"Decorator\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction doExpression(body, async) {\n\t return builder.apply(void 0, [\"DoExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction exportDefaultSpecifier(exported) {\n\t return builder.apply(void 0, [\"ExportDefaultSpecifier\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction recordExpression(properties) {\n\t return builder.apply(void 0, [\"RecordExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tupleExpression(elements) {\n\t return builder.apply(void 0, [\"TupleExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction decimalLiteral(value) {\n\t return builder.apply(void 0, [\"DecimalLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction staticBlock$1(body) {\n\t return builder.apply(void 0, [\"StaticBlock\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction moduleExpression(body) {\n\t return builder.apply(void 0, [\"ModuleExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction topicReference() {\n\t return builder.apply(void 0, [\"TopicReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction pipelineTopicExpression(expression) {\n\t return builder.apply(void 0, [\"PipelineTopicExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction pipelineBareFunction(callee) {\n\t return builder.apply(void 0, [\"PipelineBareFunction\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction pipelinePrimaryTopicReference() {\n\t return builder.apply(void 0, [\"PipelinePrimaryTopicReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsParameterProperty(parameter) {\n\t return builder.apply(void 0, [\"TSParameterProperty\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsDeclareFunction(id, typeParameters, params, returnType) {\n\t return builder.apply(void 0, [\"TSDeclareFunction\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsDeclareMethod(decorators, key, typeParameters, params, returnType) {\n\t return builder.apply(void 0, [\"TSDeclareMethod\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsQualifiedName(left, right) {\n\t return builder.apply(void 0, [\"TSQualifiedName\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsCallSignatureDeclaration(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSCallSignatureDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsConstructSignatureDeclaration(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSConstructSignatureDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsPropertySignature(key, typeAnnotation, initializer) {\n\t return builder.apply(void 0, [\"TSPropertySignature\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsMethodSignature(key, typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSMethodSignature\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIndexSignature(parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSIndexSignature\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsAnyKeyword() {\n\t return builder.apply(void 0, [\"TSAnyKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsBooleanKeyword() {\n\t return builder.apply(void 0, [\"TSBooleanKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsBigIntKeyword() {\n\t return builder.apply(void 0, [\"TSBigIntKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIntrinsicKeyword() {\n\t return builder.apply(void 0, [\"TSIntrinsicKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNeverKeyword() {\n\t return builder.apply(void 0, [\"TSNeverKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNullKeyword() {\n\t return builder.apply(void 0, [\"TSNullKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNumberKeyword() {\n\t return builder.apply(void 0, [\"TSNumberKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsObjectKeyword() {\n\t return builder.apply(void 0, [\"TSObjectKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsStringKeyword() {\n\t return builder.apply(void 0, [\"TSStringKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsSymbolKeyword() {\n\t return builder.apply(void 0, [\"TSSymbolKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsUndefinedKeyword() {\n\t return builder.apply(void 0, [\"TSUndefinedKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsUnknownKeyword() {\n\t return builder.apply(void 0, [\"TSUnknownKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsVoidKeyword() {\n\t return builder.apply(void 0, [\"TSVoidKeyword\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsThisType() {\n\t return builder.apply(void 0, [\"TSThisType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsFunctionType(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSFunctionType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsConstructorType(typeParameters, parameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSConstructorType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeReference(typeName, typeParameters) {\n\t return builder.apply(void 0, [\"TSTypeReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypePredicate(parameterName, typeAnnotation, asserts) {\n\t return builder.apply(void 0, [\"TSTypePredicate\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeQuery(exprName) {\n\t return builder.apply(void 0, [\"TSTypeQuery\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeLiteral(members) {\n\t return builder.apply(void 0, [\"TSTypeLiteral\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsArrayType(elementType) {\n\t return builder.apply(void 0, [\"TSArrayType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTupleType(elementTypes) {\n\t return builder.apply(void 0, [\"TSTupleType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsOptionalType(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSOptionalType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsRestType(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSRestType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNamedTupleMember(label, elementType, optional) {\n\t return builder.apply(void 0, [\"TSNamedTupleMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsUnionType(types) {\n\t return builder.apply(void 0, [\"TSUnionType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIntersectionType(types) {\n\t return builder.apply(void 0, [\"TSIntersectionType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsConditionalType(checkType, extendsType, trueType, falseType) {\n\t return builder.apply(void 0, [\"TSConditionalType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsInferType(typeParameter) {\n\t return builder.apply(void 0, [\"TSInferType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsParenthesizedType(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSParenthesizedType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeOperator(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSTypeOperator\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsIndexedAccessType(objectType, indexType) {\n\t return builder.apply(void 0, [\"TSIndexedAccessType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsMappedType(typeParameter, typeAnnotation, nameType) {\n\t return builder.apply(void 0, [\"TSMappedType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsLiteralType(literal) {\n\t return builder.apply(void 0, [\"TSLiteralType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsExpressionWithTypeArguments(expression, typeParameters) {\n\t return builder.apply(void 0, [\"TSExpressionWithTypeArguments\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsInterfaceDeclaration(id, typeParameters, _extends, body) {\n\t return builder.apply(void 0, [\"TSInterfaceDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsInterfaceBody(body) {\n\t return builder.apply(void 0, [\"TSInterfaceBody\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeAliasDeclaration(id, typeParameters, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSTypeAliasDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsAsExpression(expression, typeAnnotation) {\n\t return builder.apply(void 0, [\"TSAsExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeAssertion(typeAnnotation, expression) {\n\t return builder.apply(void 0, [\"TSTypeAssertion\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsEnumDeclaration(id, members) {\n\t return builder.apply(void 0, [\"TSEnumDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsEnumMember(id, initializer) {\n\t return builder.apply(void 0, [\"TSEnumMember\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsModuleDeclaration(id, body) {\n\t return builder.apply(void 0, [\"TSModuleDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsModuleBlock(body) {\n\t return builder.apply(void 0, [\"TSModuleBlock\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsImportType(argument, qualifier, typeParameters) {\n\t return builder.apply(void 0, [\"TSImportType\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsImportEqualsDeclaration(id, moduleReference) {\n\t return builder.apply(void 0, [\"TSImportEqualsDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsExternalModuleReference(expression) {\n\t return builder.apply(void 0, [\"TSExternalModuleReference\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNonNullExpression(expression) {\n\t return builder.apply(void 0, [\"TSNonNullExpression\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsExportAssignment(expression) {\n\t return builder.apply(void 0, [\"TSExportAssignment\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsNamespaceExportDeclaration(id) {\n\t return builder.apply(void 0, [\"TSNamespaceExportDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeAnnotation(typeAnnotation) {\n\t return builder.apply(void 0, [\"TSTypeAnnotation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeParameterInstantiation(params) {\n\t return builder.apply(void 0, [\"TSTypeParameterInstantiation\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeParameterDeclaration(params) {\n\t return builder.apply(void 0, [\"TSTypeParameterDeclaration\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\tfunction tsTypeParameter(constraint, _default, name) {\n\t return builder.apply(void 0, [\"TSTypeParameter\"].concat(Array.prototype.slice.call(arguments)));\n\t}\n\n\tfunction NumberLiteral() {\n\t console.trace(\"The node type NumberLiteral has been renamed to NumericLiteral\");\n\n\t for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\n\t return builder.apply(void 0, [\"NumberLiteral\"].concat(args));\n\t}\n\n\tfunction RegexLiteral() {\n\t console.trace(\"The node type RegexLiteral has been renamed to RegExpLiteral\");\n\n\t for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n\t args[_key2] = arguments[_key2];\n\t }\n\n\t return builder.apply(void 0, [\"RegexLiteral\"].concat(args));\n\t}\n\n\tfunction RestProperty$1() {\n\t console.trace(\"The node type RestProperty has been renamed to RestElement\");\n\n\t for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n\t args[_key3] = arguments[_key3];\n\t }\n\n\t return builder.apply(void 0, [\"RestProperty\"].concat(args));\n\t}\n\n\tfunction SpreadProperty$1() {\n\t console.trace(\"The node type SpreadProperty has been renamed to SpreadElement\");\n\n\t for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n\t args[_key4] = arguments[_key4];\n\t }\n\n\t return builder.apply(void 0, [\"SpreadProperty\"].concat(args));\n\t}\n\n\tfunction cleanJSXElementLiteralChild(child, args) {\n\t var lines = child.value.split(/\\r\\n|\\n|\\r/);\n\t var lastNonEmptyLine = 0;\n\n\t for (var i = 0; i < lines.length; i++) {\n\t if (lines[i].match(/[^ \\t]/)) {\n\t lastNonEmptyLine = i;\n\t }\n\t }\n\n\t var str = \"\";\n\n\t for (var _i = 0; _i < lines.length; _i++) {\n\t var line = lines[_i];\n\t var isFirstLine = _i === 0;\n\t var isLastLine = _i === lines.length - 1;\n\t var isLastNonEmptyLine = _i === lastNonEmptyLine;\n\t var trimmedLine = line.replace(/\\t/g, \" \");\n\n\t if (!isFirstLine) {\n\t trimmedLine = trimmedLine.replace(/^[ ]+/, \"\");\n\t }\n\n\t if (!isLastLine) {\n\t trimmedLine = trimmedLine.replace(/[ ]+$/, \"\");\n\t }\n\n\t if (trimmedLine) {\n\t if (!isLastNonEmptyLine) {\n\t trimmedLine += \" \";\n\t }\n\n\t str += trimmedLine;\n\t }\n\t }\n\n\t if (str) args.push(stringLiteral$8(str));\n\t}\n\n\tfunction buildChildren(node) {\n\t var elements = [];\n\n\t for (var i = 0; i < node.children.length; i++) {\n\t var child = node.children[i];\n\n\t if (isJSXText(child)) {\n\t cleanJSXElementLiteralChild(child, elements);\n\t continue;\n\t }\n\n\t if (isJSXExpressionContainer$1(child)) child = child.expression;\n\t if (isJSXEmptyExpression(child)) continue;\n\t elements.push(child);\n\t }\n\n\t return elements;\n\t}\n\n\tfunction isNode(node) {\n\t return !!(node && VISITOR_KEYS$6[node.type]);\n\t}\n\n\tfunction assertNode(node) {\n\t if (!isNode(node)) {\n\t var _node$type;\n\n\t var type = (_node$type = node == null ? void 0 : node.type) != null ? _node$type : JSON.stringify(node);\n\t throw new TypeError(\"Not a valid node of type \\\"\" + type + \"\\\"\");\n\t }\n\t}\n\n\tfunction assert$1(type, node, opts) {\n\t if (!is$1(type, node, opts)) {\n\t throw new Error(\"Expected type \\\"\" + type + \"\\\" with option \" + JSON.stringify(opts) + \", \" + (\"but instead got \\\"\" + node.type + \"\\\".\"));\n\t }\n\t}\n\n\tfunction assertArrayExpression(node, opts) {\n\t assert$1(\"ArrayExpression\", node, opts);\n\t}\n\tfunction assertAssignmentExpression(node, opts) {\n\t assert$1(\"AssignmentExpression\", node, opts);\n\t}\n\tfunction assertBinaryExpression(node, opts) {\n\t assert$1(\"BinaryExpression\", node, opts);\n\t}\n\tfunction assertInterpreterDirective(node, opts) {\n\t assert$1(\"InterpreterDirective\", node, opts);\n\t}\n\tfunction assertDirective(node, opts) {\n\t assert$1(\"Directive\", node, opts);\n\t}\n\tfunction assertDirectiveLiteral(node, opts) {\n\t assert$1(\"DirectiveLiteral\", node, opts);\n\t}\n\tfunction assertBlockStatement(node, opts) {\n\t assert$1(\"BlockStatement\", node, opts);\n\t}\n\tfunction assertBreakStatement(node, opts) {\n\t assert$1(\"BreakStatement\", node, opts);\n\t}\n\tfunction assertCallExpression(node, opts) {\n\t assert$1(\"CallExpression\", node, opts);\n\t}\n\tfunction assertCatchClause(node, opts) {\n\t assert$1(\"CatchClause\", node, opts);\n\t}\n\tfunction assertConditionalExpression(node, opts) {\n\t assert$1(\"ConditionalExpression\", node, opts);\n\t}\n\tfunction assertContinueStatement(node, opts) {\n\t assert$1(\"ContinueStatement\", node, opts);\n\t}\n\tfunction assertDebuggerStatement(node, opts) {\n\t assert$1(\"DebuggerStatement\", node, opts);\n\t}\n\tfunction assertDoWhileStatement(node, opts) {\n\t assert$1(\"DoWhileStatement\", node, opts);\n\t}\n\tfunction assertEmptyStatement(node, opts) {\n\t assert$1(\"EmptyStatement\", node, opts);\n\t}\n\tfunction assertExpressionStatement$1(node, opts) {\n\t assert$1(\"ExpressionStatement\", node, opts);\n\t}\n\tfunction assertFile(node, opts) {\n\t assert$1(\"File\", node, opts);\n\t}\n\tfunction assertForInStatement(node, opts) {\n\t assert$1(\"ForInStatement\", node, opts);\n\t}\n\tfunction assertForStatement(node, opts) {\n\t assert$1(\"ForStatement\", node, opts);\n\t}\n\tfunction assertFunctionDeclaration(node, opts) {\n\t assert$1(\"FunctionDeclaration\", node, opts);\n\t}\n\tfunction assertFunctionExpression(node, opts) {\n\t assert$1(\"FunctionExpression\", node, opts);\n\t}\n\tfunction assertIdentifier(node, opts) {\n\t assert$1(\"Identifier\", node, opts);\n\t}\n\tfunction assertIfStatement(node, opts) {\n\t assert$1(\"IfStatement\", node, opts);\n\t}\n\tfunction assertLabeledStatement(node, opts) {\n\t assert$1(\"LabeledStatement\", node, opts);\n\t}\n\tfunction assertStringLiteral(node, opts) {\n\t assert$1(\"StringLiteral\", node, opts);\n\t}\n\tfunction assertNumericLiteral(node, opts) {\n\t assert$1(\"NumericLiteral\", node, opts);\n\t}\n\tfunction assertNullLiteral(node, opts) {\n\t assert$1(\"NullLiteral\", node, opts);\n\t}\n\tfunction assertBooleanLiteral(node, opts) {\n\t assert$1(\"BooleanLiteral\", node, opts);\n\t}\n\tfunction assertRegExpLiteral(node, opts) {\n\t assert$1(\"RegExpLiteral\", node, opts);\n\t}\n\tfunction assertLogicalExpression(node, opts) {\n\t assert$1(\"LogicalExpression\", node, opts);\n\t}\n\tfunction assertMemberExpression(node, opts) {\n\t assert$1(\"MemberExpression\", node, opts);\n\t}\n\tfunction assertNewExpression(node, opts) {\n\t assert$1(\"NewExpression\", node, opts);\n\t}\n\tfunction assertProgram(node, opts) {\n\t assert$1(\"Program\", node, opts);\n\t}\n\tfunction assertObjectExpression(node, opts) {\n\t assert$1(\"ObjectExpression\", node, opts);\n\t}\n\tfunction assertObjectMethod(node, opts) {\n\t assert$1(\"ObjectMethod\", node, opts);\n\t}\n\tfunction assertObjectProperty(node, opts) {\n\t assert$1(\"ObjectProperty\", node, opts);\n\t}\n\tfunction assertRestElement(node, opts) {\n\t assert$1(\"RestElement\", node, opts);\n\t}\n\tfunction assertReturnStatement(node, opts) {\n\t assert$1(\"ReturnStatement\", node, opts);\n\t}\n\tfunction assertSequenceExpression(node, opts) {\n\t assert$1(\"SequenceExpression\", node, opts);\n\t}\n\tfunction assertParenthesizedExpression(node, opts) {\n\t assert$1(\"ParenthesizedExpression\", node, opts);\n\t}\n\tfunction assertSwitchCase(node, opts) {\n\t assert$1(\"SwitchCase\", node, opts);\n\t}\n\tfunction assertSwitchStatement(node, opts) {\n\t assert$1(\"SwitchStatement\", node, opts);\n\t}\n\tfunction assertThisExpression(node, opts) {\n\t assert$1(\"ThisExpression\", node, opts);\n\t}\n\tfunction assertThrowStatement(node, opts) {\n\t assert$1(\"ThrowStatement\", node, opts);\n\t}\n\tfunction assertTryStatement(node, opts) {\n\t assert$1(\"TryStatement\", node, opts);\n\t}\n\tfunction assertUnaryExpression(node, opts) {\n\t assert$1(\"UnaryExpression\", node, opts);\n\t}\n\tfunction assertUpdateExpression(node, opts) {\n\t assert$1(\"UpdateExpression\", node, opts);\n\t}\n\tfunction assertVariableDeclaration(node, opts) {\n\t assert$1(\"VariableDeclaration\", node, opts);\n\t}\n\tfunction assertVariableDeclarator(node, opts) {\n\t assert$1(\"VariableDeclarator\", node, opts);\n\t}\n\tfunction assertWhileStatement(node, opts) {\n\t assert$1(\"WhileStatement\", node, opts);\n\t}\n\tfunction assertWithStatement(node, opts) {\n\t assert$1(\"WithStatement\", node, opts);\n\t}\n\tfunction assertAssignmentPattern(node, opts) {\n\t assert$1(\"AssignmentPattern\", node, opts);\n\t}\n\tfunction assertArrayPattern(node, opts) {\n\t assert$1(\"ArrayPattern\", node, opts);\n\t}\n\tfunction assertArrowFunctionExpression(node, opts) {\n\t assert$1(\"ArrowFunctionExpression\", node, opts);\n\t}\n\tfunction assertClassBody(node, opts) {\n\t assert$1(\"ClassBody\", node, opts);\n\t}\n\tfunction assertClassExpression(node, opts) {\n\t assert$1(\"ClassExpression\", node, opts);\n\t}\n\tfunction assertClassDeclaration(node, opts) {\n\t assert$1(\"ClassDeclaration\", node, opts);\n\t}\n\tfunction assertExportAllDeclaration(node, opts) {\n\t assert$1(\"ExportAllDeclaration\", node, opts);\n\t}\n\tfunction assertExportDefaultDeclaration(node, opts) {\n\t assert$1(\"ExportDefaultDeclaration\", node, opts);\n\t}\n\tfunction assertExportNamedDeclaration(node, opts) {\n\t assert$1(\"ExportNamedDeclaration\", node, opts);\n\t}\n\tfunction assertExportSpecifier$1(node, opts) {\n\t assert$1(\"ExportSpecifier\", node, opts);\n\t}\n\tfunction assertForOfStatement(node, opts) {\n\t assert$1(\"ForOfStatement\", node, opts);\n\t}\n\tfunction assertImportDeclaration(node, opts) {\n\t assert$1(\"ImportDeclaration\", node, opts);\n\t}\n\tfunction assertImportDefaultSpecifier(node, opts) {\n\t assert$1(\"ImportDefaultSpecifier\", node, opts);\n\t}\n\tfunction assertImportNamespaceSpecifier(node, opts) {\n\t assert$1(\"ImportNamespaceSpecifier\", node, opts);\n\t}\n\tfunction assertImportSpecifier(node, opts) {\n\t assert$1(\"ImportSpecifier\", node, opts);\n\t}\n\tfunction assertMetaProperty(node, opts) {\n\t assert$1(\"MetaProperty\", node, opts);\n\t}\n\tfunction assertClassMethod(node, opts) {\n\t assert$1(\"ClassMethod\", node, opts);\n\t}\n\tfunction assertObjectPattern(node, opts) {\n\t assert$1(\"ObjectPattern\", node, opts);\n\t}\n\tfunction assertSpreadElement(node, opts) {\n\t assert$1(\"SpreadElement\", node, opts);\n\t}\n\tfunction assertSuper(node, opts) {\n\t assert$1(\"Super\", node, opts);\n\t}\n\tfunction assertTaggedTemplateExpression(node, opts) {\n\t assert$1(\"TaggedTemplateExpression\", node, opts);\n\t}\n\tfunction assertTemplateElement(node, opts) {\n\t assert$1(\"TemplateElement\", node, opts);\n\t}\n\tfunction assertTemplateLiteral(node, opts) {\n\t assert$1(\"TemplateLiteral\", node, opts);\n\t}\n\tfunction assertYieldExpression(node, opts) {\n\t assert$1(\"YieldExpression\", node, opts);\n\t}\n\tfunction assertAwaitExpression(node, opts) {\n\t assert$1(\"AwaitExpression\", node, opts);\n\t}\n\tfunction assertImport(node, opts) {\n\t assert$1(\"Import\", node, opts);\n\t}\n\tfunction assertBigIntLiteral(node, opts) {\n\t assert$1(\"BigIntLiteral\", node, opts);\n\t}\n\tfunction assertExportNamespaceSpecifier(node, opts) {\n\t assert$1(\"ExportNamespaceSpecifier\", node, opts);\n\t}\n\tfunction assertOptionalMemberExpression(node, opts) {\n\t assert$1(\"OptionalMemberExpression\", node, opts);\n\t}\n\tfunction assertOptionalCallExpression(node, opts) {\n\t assert$1(\"OptionalCallExpression\", node, opts);\n\t}\n\tfunction assertClassProperty(node, opts) {\n\t assert$1(\"ClassProperty\", node, opts);\n\t}\n\tfunction assertClassPrivateProperty(node, opts) {\n\t assert$1(\"ClassPrivateProperty\", node, opts);\n\t}\n\tfunction assertClassPrivateMethod(node, opts) {\n\t assert$1(\"ClassPrivateMethod\", node, opts);\n\t}\n\tfunction assertPrivateName(node, opts) {\n\t assert$1(\"PrivateName\", node, opts);\n\t}\n\tfunction assertAnyTypeAnnotation(node, opts) {\n\t assert$1(\"AnyTypeAnnotation\", node, opts);\n\t}\n\tfunction assertArrayTypeAnnotation(node, opts) {\n\t assert$1(\"ArrayTypeAnnotation\", node, opts);\n\t}\n\tfunction assertBooleanTypeAnnotation(node, opts) {\n\t assert$1(\"BooleanTypeAnnotation\", node, opts);\n\t}\n\tfunction assertBooleanLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"BooleanLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNullLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"NullLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertClassImplements(node, opts) {\n\t assert$1(\"ClassImplements\", node, opts);\n\t}\n\tfunction assertDeclareClass(node, opts) {\n\t assert$1(\"DeclareClass\", node, opts);\n\t}\n\tfunction assertDeclareFunction(node, opts) {\n\t assert$1(\"DeclareFunction\", node, opts);\n\t}\n\tfunction assertDeclareInterface(node, opts) {\n\t assert$1(\"DeclareInterface\", node, opts);\n\t}\n\tfunction assertDeclareModule(node, opts) {\n\t assert$1(\"DeclareModule\", node, opts);\n\t}\n\tfunction assertDeclareModuleExports(node, opts) {\n\t assert$1(\"DeclareModuleExports\", node, opts);\n\t}\n\tfunction assertDeclareTypeAlias(node, opts) {\n\t assert$1(\"DeclareTypeAlias\", node, opts);\n\t}\n\tfunction assertDeclareOpaqueType(node, opts) {\n\t assert$1(\"DeclareOpaqueType\", node, opts);\n\t}\n\tfunction assertDeclareVariable(node, opts) {\n\t assert$1(\"DeclareVariable\", node, opts);\n\t}\n\tfunction assertDeclareExportDeclaration(node, opts) {\n\t assert$1(\"DeclareExportDeclaration\", node, opts);\n\t}\n\tfunction assertDeclareExportAllDeclaration(node, opts) {\n\t assert$1(\"DeclareExportAllDeclaration\", node, opts);\n\t}\n\tfunction assertDeclaredPredicate(node, opts) {\n\t assert$1(\"DeclaredPredicate\", node, opts);\n\t}\n\tfunction assertExistsTypeAnnotation(node, opts) {\n\t assert$1(\"ExistsTypeAnnotation\", node, opts);\n\t}\n\tfunction assertFunctionTypeAnnotation(node, opts) {\n\t assert$1(\"FunctionTypeAnnotation\", node, opts);\n\t}\n\tfunction assertFunctionTypeParam(node, opts) {\n\t assert$1(\"FunctionTypeParam\", node, opts);\n\t}\n\tfunction assertGenericTypeAnnotation(node, opts) {\n\t assert$1(\"GenericTypeAnnotation\", node, opts);\n\t}\n\tfunction assertInferredPredicate(node, opts) {\n\t assert$1(\"InferredPredicate\", node, opts);\n\t}\n\tfunction assertInterfaceExtends(node, opts) {\n\t assert$1(\"InterfaceExtends\", node, opts);\n\t}\n\tfunction assertInterfaceDeclaration(node, opts) {\n\t assert$1(\"InterfaceDeclaration\", node, opts);\n\t}\n\tfunction assertInterfaceTypeAnnotation(node, opts) {\n\t assert$1(\"InterfaceTypeAnnotation\", node, opts);\n\t}\n\tfunction assertIntersectionTypeAnnotation(node, opts) {\n\t assert$1(\"IntersectionTypeAnnotation\", node, opts);\n\t}\n\tfunction assertMixedTypeAnnotation(node, opts) {\n\t assert$1(\"MixedTypeAnnotation\", node, opts);\n\t}\n\tfunction assertEmptyTypeAnnotation(node, opts) {\n\t assert$1(\"EmptyTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNullableTypeAnnotation(node, opts) {\n\t assert$1(\"NullableTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNumberLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"NumberLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertNumberTypeAnnotation(node, opts) {\n\t assert$1(\"NumberTypeAnnotation\", node, opts);\n\t}\n\tfunction assertObjectTypeAnnotation(node, opts) {\n\t assert$1(\"ObjectTypeAnnotation\", node, opts);\n\t}\n\tfunction assertObjectTypeInternalSlot(node, opts) {\n\t assert$1(\"ObjectTypeInternalSlot\", node, opts);\n\t}\n\tfunction assertObjectTypeCallProperty(node, opts) {\n\t assert$1(\"ObjectTypeCallProperty\", node, opts);\n\t}\n\tfunction assertObjectTypeIndexer(node, opts) {\n\t assert$1(\"ObjectTypeIndexer\", node, opts);\n\t}\n\tfunction assertObjectTypeProperty(node, opts) {\n\t assert$1(\"ObjectTypeProperty\", node, opts);\n\t}\n\tfunction assertObjectTypeSpreadProperty(node, opts) {\n\t assert$1(\"ObjectTypeSpreadProperty\", node, opts);\n\t}\n\tfunction assertOpaqueType(node, opts) {\n\t assert$1(\"OpaqueType\", node, opts);\n\t}\n\tfunction assertQualifiedTypeIdentifier(node, opts) {\n\t assert$1(\"QualifiedTypeIdentifier\", node, opts);\n\t}\n\tfunction assertStringLiteralTypeAnnotation(node, opts) {\n\t assert$1(\"StringLiteralTypeAnnotation\", node, opts);\n\t}\n\tfunction assertStringTypeAnnotation(node, opts) {\n\t assert$1(\"StringTypeAnnotation\", node, opts);\n\t}\n\tfunction assertSymbolTypeAnnotation(node, opts) {\n\t assert$1(\"SymbolTypeAnnotation\", node, opts);\n\t}\n\tfunction assertThisTypeAnnotation(node, opts) {\n\t assert$1(\"ThisTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTupleTypeAnnotation(node, opts) {\n\t assert$1(\"TupleTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTypeofTypeAnnotation(node, opts) {\n\t assert$1(\"TypeofTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTypeAlias(node, opts) {\n\t assert$1(\"TypeAlias\", node, opts);\n\t}\n\tfunction assertTypeAnnotation(node, opts) {\n\t assert$1(\"TypeAnnotation\", node, opts);\n\t}\n\tfunction assertTypeCastExpression(node, opts) {\n\t assert$1(\"TypeCastExpression\", node, opts);\n\t}\n\tfunction assertTypeParameter(node, opts) {\n\t assert$1(\"TypeParameter\", node, opts);\n\t}\n\tfunction assertTypeParameterDeclaration(node, opts) {\n\t assert$1(\"TypeParameterDeclaration\", node, opts);\n\t}\n\tfunction assertTypeParameterInstantiation(node, opts) {\n\t assert$1(\"TypeParameterInstantiation\", node, opts);\n\t}\n\tfunction assertUnionTypeAnnotation(node, opts) {\n\t assert$1(\"UnionTypeAnnotation\", node, opts);\n\t}\n\tfunction assertVariance(node, opts) {\n\t assert$1(\"Variance\", node, opts);\n\t}\n\tfunction assertVoidTypeAnnotation(node, opts) {\n\t assert$1(\"VoidTypeAnnotation\", node, opts);\n\t}\n\tfunction assertEnumDeclaration(node, opts) {\n\t assert$1(\"EnumDeclaration\", node, opts);\n\t}\n\tfunction assertEnumBooleanBody(node, opts) {\n\t assert$1(\"EnumBooleanBody\", node, opts);\n\t}\n\tfunction assertEnumNumberBody(node, opts) {\n\t assert$1(\"EnumNumberBody\", node, opts);\n\t}\n\tfunction assertEnumStringBody(node, opts) {\n\t assert$1(\"EnumStringBody\", node, opts);\n\t}\n\tfunction assertEnumSymbolBody(node, opts) {\n\t assert$1(\"EnumSymbolBody\", node, opts);\n\t}\n\tfunction assertEnumBooleanMember(node, opts) {\n\t assert$1(\"EnumBooleanMember\", node, opts);\n\t}\n\tfunction assertEnumNumberMember(node, opts) {\n\t assert$1(\"EnumNumberMember\", node, opts);\n\t}\n\tfunction assertEnumStringMember(node, opts) {\n\t assert$1(\"EnumStringMember\", node, opts);\n\t}\n\tfunction assertEnumDefaultedMember(node, opts) {\n\t assert$1(\"EnumDefaultedMember\", node, opts);\n\t}\n\tfunction assertIndexedAccessType(node, opts) {\n\t assert$1(\"IndexedAccessType\", node, opts);\n\t}\n\tfunction assertOptionalIndexedAccessType(node, opts) {\n\t assert$1(\"OptionalIndexedAccessType\", node, opts);\n\t}\n\tfunction assertJSXAttribute(node, opts) {\n\t assert$1(\"JSXAttribute\", node, opts);\n\t}\n\tfunction assertJSXClosingElement(node, opts) {\n\t assert$1(\"JSXClosingElement\", node, opts);\n\t}\n\tfunction assertJSXElement(node, opts) {\n\t assert$1(\"JSXElement\", node, opts);\n\t}\n\tfunction assertJSXEmptyExpression(node, opts) {\n\t assert$1(\"JSXEmptyExpression\", node, opts);\n\t}\n\tfunction assertJSXExpressionContainer(node, opts) {\n\t assert$1(\"JSXExpressionContainer\", node, opts);\n\t}\n\tfunction assertJSXSpreadChild(node, opts) {\n\t assert$1(\"JSXSpreadChild\", node, opts);\n\t}\n\tfunction assertJSXIdentifier(node, opts) {\n\t assert$1(\"JSXIdentifier\", node, opts);\n\t}\n\tfunction assertJSXMemberExpression(node, opts) {\n\t assert$1(\"JSXMemberExpression\", node, opts);\n\t}\n\tfunction assertJSXNamespacedName(node, opts) {\n\t assert$1(\"JSXNamespacedName\", node, opts);\n\t}\n\tfunction assertJSXOpeningElement(node, opts) {\n\t assert$1(\"JSXOpeningElement\", node, opts);\n\t}\n\tfunction assertJSXSpreadAttribute(node, opts) {\n\t assert$1(\"JSXSpreadAttribute\", node, opts);\n\t}\n\tfunction assertJSXText(node, opts) {\n\t assert$1(\"JSXText\", node, opts);\n\t}\n\tfunction assertJSXFragment(node, opts) {\n\t assert$1(\"JSXFragment\", node, opts);\n\t}\n\tfunction assertJSXOpeningFragment(node, opts) {\n\t assert$1(\"JSXOpeningFragment\", node, opts);\n\t}\n\tfunction assertJSXClosingFragment(node, opts) {\n\t assert$1(\"JSXClosingFragment\", node, opts);\n\t}\n\tfunction assertNoop(node, opts) {\n\t assert$1(\"Noop\", node, opts);\n\t}\n\tfunction assertPlaceholder(node, opts) {\n\t assert$1(\"Placeholder\", node, opts);\n\t}\n\tfunction assertV8IntrinsicIdentifier(node, opts) {\n\t assert$1(\"V8IntrinsicIdentifier\", node, opts);\n\t}\n\tfunction assertArgumentPlaceholder(node, opts) {\n\t assert$1(\"ArgumentPlaceholder\", node, opts);\n\t}\n\tfunction assertBindExpression(node, opts) {\n\t assert$1(\"BindExpression\", node, opts);\n\t}\n\tfunction assertImportAttribute(node, opts) {\n\t assert$1(\"ImportAttribute\", node, opts);\n\t}\n\tfunction assertDecorator(node, opts) {\n\t assert$1(\"Decorator\", node, opts);\n\t}\n\tfunction assertDoExpression(node, opts) {\n\t assert$1(\"DoExpression\", node, opts);\n\t}\n\tfunction assertExportDefaultSpecifier(node, opts) {\n\t assert$1(\"ExportDefaultSpecifier\", node, opts);\n\t}\n\tfunction assertRecordExpression(node, opts) {\n\t assert$1(\"RecordExpression\", node, opts);\n\t}\n\tfunction assertTupleExpression(node, opts) {\n\t assert$1(\"TupleExpression\", node, opts);\n\t}\n\tfunction assertDecimalLiteral(node, opts) {\n\t assert$1(\"DecimalLiteral\", node, opts);\n\t}\n\tfunction assertStaticBlock(node, opts) {\n\t assert$1(\"StaticBlock\", node, opts);\n\t}\n\tfunction assertModuleExpression(node, opts) {\n\t assert$1(\"ModuleExpression\", node, opts);\n\t}\n\tfunction assertTopicReference(node, opts) {\n\t assert$1(\"TopicReference\", node, opts);\n\t}\n\tfunction assertPipelineTopicExpression(node, opts) {\n\t assert$1(\"PipelineTopicExpression\", node, opts);\n\t}\n\tfunction assertPipelineBareFunction(node, opts) {\n\t assert$1(\"PipelineBareFunction\", node, opts);\n\t}\n\tfunction assertPipelinePrimaryTopicReference(node, opts) {\n\t assert$1(\"PipelinePrimaryTopicReference\", node, opts);\n\t}\n\tfunction assertTSParameterProperty(node, opts) {\n\t assert$1(\"TSParameterProperty\", node, opts);\n\t}\n\tfunction assertTSDeclareFunction(node, opts) {\n\t assert$1(\"TSDeclareFunction\", node, opts);\n\t}\n\tfunction assertTSDeclareMethod(node, opts) {\n\t assert$1(\"TSDeclareMethod\", node, opts);\n\t}\n\tfunction assertTSQualifiedName(node, opts) {\n\t assert$1(\"TSQualifiedName\", node, opts);\n\t}\n\tfunction assertTSCallSignatureDeclaration(node, opts) {\n\t assert$1(\"TSCallSignatureDeclaration\", node, opts);\n\t}\n\tfunction assertTSConstructSignatureDeclaration(node, opts) {\n\t assert$1(\"TSConstructSignatureDeclaration\", node, opts);\n\t}\n\tfunction assertTSPropertySignature(node, opts) {\n\t assert$1(\"TSPropertySignature\", node, opts);\n\t}\n\tfunction assertTSMethodSignature(node, opts) {\n\t assert$1(\"TSMethodSignature\", node, opts);\n\t}\n\tfunction assertTSIndexSignature(node, opts) {\n\t assert$1(\"TSIndexSignature\", node, opts);\n\t}\n\tfunction assertTSAnyKeyword(node, opts) {\n\t assert$1(\"TSAnyKeyword\", node, opts);\n\t}\n\tfunction assertTSBooleanKeyword(node, opts) {\n\t assert$1(\"TSBooleanKeyword\", node, opts);\n\t}\n\tfunction assertTSBigIntKeyword(node, opts) {\n\t assert$1(\"TSBigIntKeyword\", node, opts);\n\t}\n\tfunction assertTSIntrinsicKeyword(node, opts) {\n\t assert$1(\"TSIntrinsicKeyword\", node, opts);\n\t}\n\tfunction assertTSNeverKeyword(node, opts) {\n\t assert$1(\"TSNeverKeyword\", node, opts);\n\t}\n\tfunction assertTSNullKeyword(node, opts) {\n\t assert$1(\"TSNullKeyword\", node, opts);\n\t}\n\tfunction assertTSNumberKeyword(node, opts) {\n\t assert$1(\"TSNumberKeyword\", node, opts);\n\t}\n\tfunction assertTSObjectKeyword(node, opts) {\n\t assert$1(\"TSObjectKeyword\", node, opts);\n\t}\n\tfunction assertTSStringKeyword(node, opts) {\n\t assert$1(\"TSStringKeyword\", node, opts);\n\t}\n\tfunction assertTSSymbolKeyword(node, opts) {\n\t assert$1(\"TSSymbolKeyword\", node, opts);\n\t}\n\tfunction assertTSUndefinedKeyword(node, opts) {\n\t assert$1(\"TSUndefinedKeyword\", node, opts);\n\t}\n\tfunction assertTSUnknownKeyword(node, opts) {\n\t assert$1(\"TSUnknownKeyword\", node, opts);\n\t}\n\tfunction assertTSVoidKeyword(node, opts) {\n\t assert$1(\"TSVoidKeyword\", node, opts);\n\t}\n\tfunction assertTSThisType(node, opts) {\n\t assert$1(\"TSThisType\", node, opts);\n\t}\n\tfunction assertTSFunctionType(node, opts) {\n\t assert$1(\"TSFunctionType\", node, opts);\n\t}\n\tfunction assertTSConstructorType(node, opts) {\n\t assert$1(\"TSConstructorType\", node, opts);\n\t}\n\tfunction assertTSTypeReference(node, opts) {\n\t assert$1(\"TSTypeReference\", node, opts);\n\t}\n\tfunction assertTSTypePredicate(node, opts) {\n\t assert$1(\"TSTypePredicate\", node, opts);\n\t}\n\tfunction assertTSTypeQuery(node, opts) {\n\t assert$1(\"TSTypeQuery\", node, opts);\n\t}\n\tfunction assertTSTypeLiteral(node, opts) {\n\t assert$1(\"TSTypeLiteral\", node, opts);\n\t}\n\tfunction assertTSArrayType(node, opts) {\n\t assert$1(\"TSArrayType\", node, opts);\n\t}\n\tfunction assertTSTupleType(node, opts) {\n\t assert$1(\"TSTupleType\", node, opts);\n\t}\n\tfunction assertTSOptionalType(node, opts) {\n\t assert$1(\"TSOptionalType\", node, opts);\n\t}\n\tfunction assertTSRestType(node, opts) {\n\t assert$1(\"TSRestType\", node, opts);\n\t}\n\tfunction assertTSNamedTupleMember(node, opts) {\n\t assert$1(\"TSNamedTupleMember\", node, opts);\n\t}\n\tfunction assertTSUnionType(node, opts) {\n\t assert$1(\"TSUnionType\", node, opts);\n\t}\n\tfunction assertTSIntersectionType(node, opts) {\n\t assert$1(\"TSIntersectionType\", node, opts);\n\t}\n\tfunction assertTSConditionalType(node, opts) {\n\t assert$1(\"TSConditionalType\", node, opts);\n\t}\n\tfunction assertTSInferType(node, opts) {\n\t assert$1(\"TSInferType\", node, opts);\n\t}\n\tfunction assertTSParenthesizedType(node, opts) {\n\t assert$1(\"TSParenthesizedType\", node, opts);\n\t}\n\tfunction assertTSTypeOperator(node, opts) {\n\t assert$1(\"TSTypeOperator\", node, opts);\n\t}\n\tfunction assertTSIndexedAccessType(node, opts) {\n\t assert$1(\"TSIndexedAccessType\", node, opts);\n\t}\n\tfunction assertTSMappedType(node, opts) {\n\t assert$1(\"TSMappedType\", node, opts);\n\t}\n\tfunction assertTSLiteralType(node, opts) {\n\t assert$1(\"TSLiteralType\", node, opts);\n\t}\n\tfunction assertTSExpressionWithTypeArguments(node, opts) {\n\t assert$1(\"TSExpressionWithTypeArguments\", node, opts);\n\t}\n\tfunction assertTSInterfaceDeclaration(node, opts) {\n\t assert$1(\"TSInterfaceDeclaration\", node, opts);\n\t}\n\tfunction assertTSInterfaceBody(node, opts) {\n\t assert$1(\"TSInterfaceBody\", node, opts);\n\t}\n\tfunction assertTSTypeAliasDeclaration(node, opts) {\n\t assert$1(\"TSTypeAliasDeclaration\", node, opts);\n\t}\n\tfunction assertTSAsExpression(node, opts) {\n\t assert$1(\"TSAsExpression\", node, opts);\n\t}\n\tfunction assertTSTypeAssertion(node, opts) {\n\t assert$1(\"TSTypeAssertion\", node, opts);\n\t}\n\tfunction assertTSEnumDeclaration(node, opts) {\n\t assert$1(\"TSEnumDeclaration\", node, opts);\n\t}\n\tfunction assertTSEnumMember(node, opts) {\n\t assert$1(\"TSEnumMember\", node, opts);\n\t}\n\tfunction assertTSModuleDeclaration(node, opts) {\n\t assert$1(\"TSModuleDeclaration\", node, opts);\n\t}\n\tfunction assertTSModuleBlock(node, opts) {\n\t assert$1(\"TSModuleBlock\", node, opts);\n\t}\n\tfunction assertTSImportType(node, opts) {\n\t assert$1(\"TSImportType\", node, opts);\n\t}\n\tfunction assertTSImportEqualsDeclaration(node, opts) {\n\t assert$1(\"TSImportEqualsDeclaration\", node, opts);\n\t}\n\tfunction assertTSExternalModuleReference(node, opts) {\n\t assert$1(\"TSExternalModuleReference\", node, opts);\n\t}\n\tfunction assertTSNonNullExpression(node, opts) {\n\t assert$1(\"TSNonNullExpression\", node, opts);\n\t}\n\tfunction assertTSExportAssignment(node, opts) {\n\t assert$1(\"TSExportAssignment\", node, opts);\n\t}\n\tfunction assertTSNamespaceExportDeclaration(node, opts) {\n\t assert$1(\"TSNamespaceExportDeclaration\", node, opts);\n\t}\n\tfunction assertTSTypeAnnotation(node, opts) {\n\t assert$1(\"TSTypeAnnotation\", node, opts);\n\t}\n\tfunction assertTSTypeParameterInstantiation(node, opts) {\n\t assert$1(\"TSTypeParameterInstantiation\", node, opts);\n\t}\n\tfunction assertTSTypeParameterDeclaration(node, opts) {\n\t assert$1(\"TSTypeParameterDeclaration\", node, opts);\n\t}\n\tfunction assertTSTypeParameter(node, opts) {\n\t assert$1(\"TSTypeParameter\", node, opts);\n\t}\n\tfunction assertExpression$1(node, opts) {\n\t assert$1(\"Expression\", node, opts);\n\t}\n\tfunction assertBinary(node, opts) {\n\t assert$1(\"Binary\", node, opts);\n\t}\n\tfunction assertScopable(node, opts) {\n\t assert$1(\"Scopable\", node, opts);\n\t}\n\tfunction assertBlockParent(node, opts) {\n\t assert$1(\"BlockParent\", node, opts);\n\t}\n\tfunction assertBlock(node, opts) {\n\t assert$1(\"Block\", node, opts);\n\t}\n\tfunction assertStatement(node, opts) {\n\t assert$1(\"Statement\", node, opts);\n\t}\n\tfunction assertTerminatorless(node, opts) {\n\t assert$1(\"Terminatorless\", node, opts);\n\t}\n\tfunction assertCompletionStatement(node, opts) {\n\t assert$1(\"CompletionStatement\", node, opts);\n\t}\n\tfunction assertConditional(node, opts) {\n\t assert$1(\"Conditional\", node, opts);\n\t}\n\tfunction assertLoop(node, opts) {\n\t assert$1(\"Loop\", node, opts);\n\t}\n\tfunction assertWhile(node, opts) {\n\t assert$1(\"While\", node, opts);\n\t}\n\tfunction assertExpressionWrapper(node, opts) {\n\t assert$1(\"ExpressionWrapper\", node, opts);\n\t}\n\tfunction assertFor(node, opts) {\n\t assert$1(\"For\", node, opts);\n\t}\n\tfunction assertForXStatement(node, opts) {\n\t assert$1(\"ForXStatement\", node, opts);\n\t}\n\tfunction assertFunction$1(node, opts) {\n\t assert$1(\"Function\", node, opts);\n\t}\n\tfunction assertFunctionParent(node, opts) {\n\t assert$1(\"FunctionParent\", node, opts);\n\t}\n\tfunction assertPureish(node, opts) {\n\t assert$1(\"Pureish\", node, opts);\n\t}\n\tfunction assertDeclaration(node, opts) {\n\t assert$1(\"Declaration\", node, opts);\n\t}\n\tfunction assertPatternLike(node, opts) {\n\t assert$1(\"PatternLike\", node, opts);\n\t}\n\tfunction assertLVal(node, opts) {\n\t assert$1(\"LVal\", node, opts);\n\t}\n\tfunction assertTSEntityName(node, opts) {\n\t assert$1(\"TSEntityName\", node, opts);\n\t}\n\tfunction assertLiteral(node, opts) {\n\t assert$1(\"Literal\", node, opts);\n\t}\n\tfunction assertImmutable(node, opts) {\n\t assert$1(\"Immutable\", node, opts);\n\t}\n\tfunction assertUserWhitespacable(node, opts) {\n\t assert$1(\"UserWhitespacable\", node, opts);\n\t}\n\tfunction assertMethod(node, opts) {\n\t assert$1(\"Method\", node, opts);\n\t}\n\tfunction assertObjectMember(node, opts) {\n\t assert$1(\"ObjectMember\", node, opts);\n\t}\n\tfunction assertProperty(node, opts) {\n\t assert$1(\"Property\", node, opts);\n\t}\n\tfunction assertUnaryLike(node, opts) {\n\t assert$1(\"UnaryLike\", node, opts);\n\t}\n\tfunction assertPattern(node, opts) {\n\t assert$1(\"Pattern\", node, opts);\n\t}\n\tfunction assertClass(node, opts) {\n\t assert$1(\"Class\", node, opts);\n\t}\n\tfunction assertModuleDeclaration(node, opts) {\n\t assert$1(\"ModuleDeclaration\", node, opts);\n\t}\n\tfunction assertExportDeclaration(node, opts) {\n\t assert$1(\"ExportDeclaration\", node, opts);\n\t}\n\tfunction assertModuleSpecifier(node, opts) {\n\t assert$1(\"ModuleSpecifier\", node, opts);\n\t}\n\tfunction assertPrivate(node, opts) {\n\t assert$1(\"Private\", node, opts);\n\t}\n\tfunction assertFlow(node, opts) {\n\t assert$1(\"Flow\", node, opts);\n\t}\n\tfunction assertFlowType(node, opts) {\n\t assert$1(\"FlowType\", node, opts);\n\t}\n\tfunction assertFlowBaseAnnotation(node, opts) {\n\t assert$1(\"FlowBaseAnnotation\", node, opts);\n\t}\n\tfunction assertFlowDeclaration(node, opts) {\n\t assert$1(\"FlowDeclaration\", node, opts);\n\t}\n\tfunction assertFlowPredicate(node, opts) {\n\t assert$1(\"FlowPredicate\", node, opts);\n\t}\n\tfunction assertEnumBody(node, opts) {\n\t assert$1(\"EnumBody\", node, opts);\n\t}\n\tfunction assertEnumMember(node, opts) {\n\t assert$1(\"EnumMember\", node, opts);\n\t}\n\tfunction assertJSX(node, opts) {\n\t assert$1(\"JSX\", node, opts);\n\t}\n\tfunction assertTSTypeElement(node, opts) {\n\t assert$1(\"TSTypeElement\", node, opts);\n\t}\n\tfunction assertTSType(node, opts) {\n\t assert$1(\"TSType\", node, opts);\n\t}\n\tfunction assertTSBaseType(node, opts) {\n\t assert$1(\"TSBaseType\", node, opts);\n\t}\n\tfunction assertNumberLiteral(node, opts) {\n\t console.trace(\"The node type NumberLiteral has been renamed to NumericLiteral\");\n\t assert$1(\"NumberLiteral\", node, opts);\n\t}\n\tfunction assertRegexLiteral(node, opts) {\n\t console.trace(\"The node type RegexLiteral has been renamed to RegExpLiteral\");\n\t assert$1(\"RegexLiteral\", node, opts);\n\t}\n\tfunction assertRestProperty(node, opts) {\n\t console.trace(\"The node type RestProperty has been renamed to RestElement\");\n\t assert$1(\"RestProperty\", node, opts);\n\t}\n\tfunction assertSpreadProperty(node, opts) {\n\t console.trace(\"The node type SpreadProperty has been renamed to SpreadElement\");\n\t assert$1(\"SpreadProperty\", node, opts);\n\t}\n\n\tfunction createTypeAnnotationBasedOnTypeof$1(type) {\n\t if (type === \"string\") {\n\t return stringTypeAnnotation$2();\n\t } else if (type === \"number\") {\n\t return numberTypeAnnotation$2();\n\t } else if (type === \"undefined\") {\n\t return voidTypeAnnotation$3();\n\t } else if (type === \"boolean\") {\n\t return booleanTypeAnnotation$1();\n\t } else if (type === \"function\") {\n\t return genericTypeAnnotation$1(identifier$j(\"Function\"));\n\t } else if (type === \"object\") {\n\t return genericTypeAnnotation$1(identifier$j(\"Object\"));\n\t } else if (type === \"symbol\") {\n\t return genericTypeAnnotation$1(identifier$j(\"Symbol\"));\n\t } else if (type === \"bigint\") {\n\t return anyTypeAnnotation$2();\n\t } else {\n\t throw new Error(\"Invalid typeof value: \" + type);\n\t }\n\t}\n\n\tfunction getQualifiedName(node) {\n\t return isIdentifier$g(node) ? node.name : node.id.name + \".\" + getQualifiedName(node.qualification);\n\t}\n\n\tfunction removeTypeDuplicates$1(nodes) {\n\t var generics = {};\n\t var bases = {};\n\t var typeGroups = new Set();\n\t var types = [];\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t var node = nodes[i];\n\t if (!node) continue;\n\n\t if (types.indexOf(node) >= 0) {\n\t continue;\n\t }\n\n\t if (isAnyTypeAnnotation$1(node)) {\n\t return [node];\n\t }\n\n\t if (isFlowBaseAnnotation$1(node)) {\n\t bases[node.type] = node;\n\t continue;\n\t }\n\n\t if (isUnionTypeAnnotation$2(node)) {\n\t if (!typeGroups.has(node.types)) {\n\t nodes = nodes.concat(node.types);\n\t typeGroups.add(node.types);\n\t }\n\n\t continue;\n\t }\n\n\t if (isGenericTypeAnnotation$1(node)) {\n\t var name = getQualifiedName(node.id);\n\n\t if (generics[name]) {\n\t var existing = generics[name];\n\n\t if (existing.typeParameters) {\n\t if (node.typeParameters) {\n\t existing.typeParameters.params = removeTypeDuplicates$1(existing.typeParameters.params.concat(node.typeParameters.params));\n\t }\n\t } else {\n\t existing = node.typeParameters;\n\t }\n\t } else {\n\t generics[name] = node;\n\t }\n\n\t continue;\n\t }\n\n\t types.push(node);\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(bases); _i < _Object$keys.length; _i++) {\n\t var type = _Object$keys[_i];\n\t types.push(bases[type]);\n\t }\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(generics); _i2 < _Object$keys2.length; _i2++) {\n\t var _name = _Object$keys2[_i2];\n\t types.push(generics[_name]);\n\t }\n\n\t return types;\n\t}\n\n\tfunction createFlowUnionType$2(types) {\n\t var flattened = removeTypeDuplicates$1(types);\n\n\t if (flattened.length === 1) {\n\t return flattened[0];\n\t } else {\n\t return unionTypeAnnotation$1(flattened);\n\t }\n\t}\n\n\tfunction removeTypeDuplicates(nodes) {\n\t var generics = {};\n\t var bases = {};\n\t var typeGroups = new Set();\n\t var types = [];\n\n\t for (var i = 0; i < nodes.length; i++) {\n\t var node = nodes[i];\n\t if (!node) continue;\n\n\t if (types.indexOf(node) >= 0) {\n\t continue;\n\t }\n\n\t if (isTSAnyKeyword(node)) {\n\t return [node];\n\t }\n\n\t if (isTSBaseType(node)) {\n\t bases[node.type] = node;\n\t continue;\n\t }\n\n\t if (isTSUnionType$1(node)) {\n\t if (!typeGroups.has(node.types)) {\n\t nodes.push.apply(nodes, _toConsumableArray(node.types));\n\t typeGroups.add(node.types);\n\t }\n\n\t continue;\n\t }\n\n\t types.push(node);\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(bases); _i < _Object$keys.length; _i++) {\n\t var type = _Object$keys[_i];\n\t types.push(bases[type]);\n\t }\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(generics); _i2 < _Object$keys2.length; _i2++) {\n\t var name = _Object$keys2[_i2];\n\t types.push(generics[name]);\n\t }\n\n\t return types;\n\t}\n\n\tfunction createTSUnionType$2(typeAnnotations) {\n\t var types = typeAnnotations.map(function (type) {\n\t return type.typeAnnotation;\n\t });\n\t var flattened = removeTypeDuplicates(types);\n\n\t if (flattened.length === 1) {\n\t return flattened[0];\n\t } else {\n\t return tsUnionType(flattened);\n\t }\n\t}\n\n\tvar has$c = Function.call.bind(Object.prototype.hasOwnProperty);\n\n\tfunction cloneIfNode(obj, deep, withoutLoc) {\n\t if (obj && typeof obj.type === \"string\") {\n\t return cloneNode$i(obj, deep, withoutLoc);\n\t }\n\n\t return obj;\n\t}\n\n\tfunction cloneIfNodeOrArray(obj, deep, withoutLoc) {\n\t if (Array.isArray(obj)) {\n\t return obj.map(function (node) {\n\t return cloneIfNode(node, deep, withoutLoc);\n\t });\n\t }\n\n\t return cloneIfNode(obj, deep, withoutLoc);\n\t}\n\n\tfunction cloneNode$i(node, deep, withoutLoc) {\n\t if (deep === void 0) {\n\t deep = true;\n\t }\n\n\t if (withoutLoc === void 0) {\n\t withoutLoc = false;\n\t }\n\n\t if (!node) return node;\n\t var type = node.type;\n\t var newNode = {\n\t type: node.type\n\t };\n\n\t if (isIdentifier$g(node)) {\n\t newNode.name = node.name;\n\n\t if (has$c(node, \"optional\") && typeof node.optional === \"boolean\") {\n\t newNode.optional = node.optional;\n\t }\n\n\t if (has$c(node, \"typeAnnotation\")) {\n\t newNode.typeAnnotation = deep ? cloneIfNodeOrArray(node.typeAnnotation, true, withoutLoc) : node.typeAnnotation;\n\t }\n\t } else if (!has$c(NODE_FIELDS, type)) {\n\t throw new Error(\"Unknown node type: \\\"\" + type + \"\\\"\");\n\t } else {\n\t for (var _i = 0, _Object$keys = Object.keys(NODE_FIELDS[type]); _i < _Object$keys.length; _i++) {\n\t var field = _Object$keys[_i];\n\n\t if (has$c(node, field)) {\n\t if (deep) {\n\t newNode[field] = isFile$1(node) && field === \"comments\" ? maybeCloneComments(node.comments, deep, withoutLoc) : cloneIfNodeOrArray(node[field], true, withoutLoc);\n\t } else {\n\t newNode[field] = node[field];\n\t }\n\t }\n\t }\n\t }\n\n\t if (has$c(node, \"loc\")) {\n\t if (withoutLoc) {\n\t newNode.loc = null;\n\t } else {\n\t newNode.loc = node.loc;\n\t }\n\t }\n\n\t if (has$c(node, \"leadingComments\")) {\n\t newNode.leadingComments = maybeCloneComments(node.leadingComments, deep, withoutLoc);\n\t }\n\n\t if (has$c(node, \"innerComments\")) {\n\t newNode.innerComments = maybeCloneComments(node.innerComments, deep, withoutLoc);\n\t }\n\n\t if (has$c(node, \"trailingComments\")) {\n\t newNode.trailingComments = maybeCloneComments(node.trailingComments, deep, withoutLoc);\n\t }\n\n\t if (has$c(node, \"extra\")) {\n\t newNode.extra = Object.assign({}, node.extra);\n\t }\n\n\t return newNode;\n\t}\n\n\tfunction maybeCloneComments(comments, deep, withoutLoc) {\n\t if (!comments || !deep) {\n\t return comments;\n\t }\n\n\t return comments.map(function (_ref) {\n\t var type = _ref.type,\n\t value = _ref.value,\n\t loc = _ref.loc;\n\n\t if (withoutLoc) {\n\t return {\n\t type: type,\n\t value: value,\n\t loc: null\n\t };\n\t }\n\n\t return {\n\t type: type,\n\t value: value,\n\t loc: loc\n\t };\n\t });\n\t}\n\n\tfunction clone(node) {\n\t return cloneNode$i(node, false);\n\t}\n\n\tfunction cloneDeep$1(node) {\n\t return cloneNode$i(node);\n\t}\n\n\tfunction cloneDeepWithoutLoc(node) {\n\t return cloneNode$i(node, true, true);\n\t}\n\n\tfunction cloneWithoutLoc(node) {\n\t return cloneNode$i(node, false, true);\n\t}\n\n\tfunction addComments$1(node, type, comments) {\n\t if (!comments || !node) return node;\n\t var key = type + \"Comments\";\n\n\t if (node[key]) {\n\t if (type === \"leading\") {\n\t node[key] = comments.concat(node[key]);\n\t } else {\n\t var _node$key;\n\n\t (_node$key = node[key]).push.apply(_node$key, _toConsumableArray(comments));\n\t }\n\t } else {\n\t node[key] = comments;\n\t }\n\n\t return node;\n\t}\n\n\tfunction addComment$2(node, type, content, line) {\n\t return addComments$1(node, type, [{\n\t type: line ? \"CommentLine\" : \"CommentBlock\",\n\t value: content\n\t }]);\n\t}\n\n\tfunction inherit(key, child, parent) {\n\t if (child && parent) {\n\t child[key] = Array.from(new Set([].concat(child[key], parent[key]).filter(Boolean)));\n\t }\n\t}\n\n\tfunction inheritInnerComments(child, parent) {\n\t inherit(\"innerComments\", child, parent);\n\t}\n\n\tfunction inheritLeadingComments$1(child, parent) {\n\t inherit(\"leadingComments\", child, parent);\n\t}\n\n\tfunction inheritTrailingComments$1(child, parent) {\n\t inherit(\"trailingComments\", child, parent);\n\t}\n\n\tfunction inheritsComments$2(child, parent) {\n\t inheritTrailingComments$1(child, parent);\n\t inheritLeadingComments$1(child, parent);\n\t inheritInnerComments(child, parent);\n\t return child;\n\t}\n\n\tfunction removeComments$2(node) {\n\t COMMENT_KEYS.forEach(function (key) {\n\t node[key] = null;\n\t });\n\t return node;\n\t}\n\n\tvar EXPRESSION_TYPES = FLIPPED_ALIAS_KEYS$3[\"Expression\"];\n\tvar BINARY_TYPES = FLIPPED_ALIAS_KEYS$3[\"Binary\"];\n\tvar SCOPABLE_TYPES = FLIPPED_ALIAS_KEYS$3[\"Scopable\"];\n\tvar BLOCKPARENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"BlockParent\"];\n\tvar BLOCK_TYPES = FLIPPED_ALIAS_KEYS$3[\"Block\"];\n\tvar STATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"Statement\"];\n\tvar TERMINATORLESS_TYPES = FLIPPED_ALIAS_KEYS$3[\"Terminatorless\"];\n\tvar COMPLETIONSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"CompletionStatement\"];\n\tvar CONDITIONAL_TYPES = FLIPPED_ALIAS_KEYS$3[\"Conditional\"];\n\tvar LOOP_TYPES = FLIPPED_ALIAS_KEYS$3[\"Loop\"];\n\tvar WHILE_TYPES = FLIPPED_ALIAS_KEYS$3[\"While\"];\n\tvar EXPRESSIONWRAPPER_TYPES = FLIPPED_ALIAS_KEYS$3[\"ExpressionWrapper\"];\n\tvar FOR_TYPES = FLIPPED_ALIAS_KEYS$3[\"For\"];\n\tvar FORXSTATEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"ForXStatement\"];\n\tvar FUNCTION_TYPES$1 = FLIPPED_ALIAS_KEYS$3[\"Function\"];\n\tvar FUNCTIONPARENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"FunctionParent\"];\n\tvar PUREISH_TYPES = FLIPPED_ALIAS_KEYS$3[\"Pureish\"];\n\tvar DECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"Declaration\"];\n\tvar PATTERNLIKE_TYPES = FLIPPED_ALIAS_KEYS$3[\"PatternLike\"];\n\tvar LVAL_TYPES = FLIPPED_ALIAS_KEYS$3[\"LVal\"];\n\tvar TSENTITYNAME_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSEntityName\"];\n\tvar LITERAL_TYPES = FLIPPED_ALIAS_KEYS$3[\"Literal\"];\n\tvar IMMUTABLE_TYPES = FLIPPED_ALIAS_KEYS$3[\"Immutable\"];\n\tvar USERWHITESPACABLE_TYPES = FLIPPED_ALIAS_KEYS$3[\"UserWhitespacable\"];\n\tvar METHOD_TYPES = FLIPPED_ALIAS_KEYS$3[\"Method\"];\n\tvar OBJECTMEMBER_TYPES = FLIPPED_ALIAS_KEYS$3[\"ObjectMember\"];\n\tvar PROPERTY_TYPES = FLIPPED_ALIAS_KEYS$3[\"Property\"];\n\tvar UNARYLIKE_TYPES = FLIPPED_ALIAS_KEYS$3[\"UnaryLike\"];\n\tvar PATTERN_TYPES = FLIPPED_ALIAS_KEYS$3[\"Pattern\"];\n\tvar CLASS_TYPES = FLIPPED_ALIAS_KEYS$3[\"Class\"];\n\tvar MODULEDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"ModuleDeclaration\"];\n\tvar EXPORTDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"ExportDeclaration\"];\n\tvar MODULESPECIFIER_TYPES = FLIPPED_ALIAS_KEYS$3[\"ModuleSpecifier\"];\n\tvar PRIVATE_TYPES = FLIPPED_ALIAS_KEYS$3[\"Private\"];\n\tvar FLOW_TYPES = FLIPPED_ALIAS_KEYS$3[\"Flow\"];\n\tvar FLOWTYPE_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowType\"];\n\tvar FLOWBASEANNOTATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowBaseAnnotation\"];\n\tvar FLOWDECLARATION_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowDeclaration\"];\n\tvar FLOWPREDICATE_TYPES = FLIPPED_ALIAS_KEYS$3[\"FlowPredicate\"];\n\tvar ENUMBODY_TYPES = FLIPPED_ALIAS_KEYS$3[\"EnumBody\"];\n\tvar ENUMMEMBER_TYPES = FLIPPED_ALIAS_KEYS$3[\"EnumMember\"];\n\tvar JSX_TYPES = FLIPPED_ALIAS_KEYS$3[\"JSX\"];\n\tvar TSTYPEELEMENT_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSTypeElement\"];\n\tvar TSTYPE_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSType\"];\n\tvar TSBASETYPE_TYPES = FLIPPED_ALIAS_KEYS$3[\"TSBaseType\"];\n\n\tfunction toBlock(node, parent) {\n\t if (isBlockStatement$2(node)) {\n\t return node;\n\t }\n\n\t var blockNodes = [];\n\n\t if (isEmptyStatement$1(node)) {\n\t blockNodes = [];\n\t } else {\n\t if (!isStatement$7(node)) {\n\t if (isFunction$4(parent)) {\n\t node = returnStatement$3(node);\n\t } else {\n\t node = expressionStatement$a(node);\n\t }\n\t }\n\n\t blockNodes = [node];\n\t }\n\n\t return blockStatement$6(blockNodes);\n\t}\n\n\tfunction ensureBlock$1(node, key) {\n\t if (key === void 0) {\n\t key = \"body\";\n\t }\n\n\t return node[key] = toBlock(node[key], node);\n\t}\n\n\tfunction toIdentifier$1(input) {\n\t input = input + \"\";\n\t var name = \"\";\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(input), _step; !(_step = _iterator()).done;) {\n\t var c = _step.value;\n\t name += isIdentifierChar(c.codePointAt(0)) ? c : \"-\";\n\t }\n\n\t name = name.replace(/^[-0-9]+/, \"\");\n\t name = name.replace(/[-\\s]+(.)?/g, function (match, c) {\n\t return c ? c.toUpperCase() : \"\";\n\t });\n\n\t if (!isValidIdentifier$1(name)) {\n\t name = \"_\" + name;\n\t }\n\n\t return name || \"_\";\n\t}\n\n\tfunction toBindingIdentifierName$1(name) {\n\t name = toIdentifier$1(name);\n\t if (name === \"eval\" || name === \"arguments\") name = \"_\" + name;\n\t return name;\n\t}\n\n\tfunction toComputedKey$3(node, key) {\n\t if (key === void 0) {\n\t key = node.key || node.property;\n\t }\n\n\t if (!node.computed && isIdentifier$g(key)) key = stringLiteral$8(key.name);\n\t return key;\n\t}\n\n\tfunction toExpression(node) {\n\t if (isExpressionStatement$4(node)) {\n\t node = node.expression;\n\t }\n\n\t if (isExpression$4(node)) {\n\t return node;\n\t }\n\n\t if (isClass$1(node)) {\n\t node.type = \"ClassExpression\";\n\t } else if (isFunction$4(node)) {\n\t node.type = \"FunctionExpression\";\n\t }\n\n\t if (!isExpression$4(node)) {\n\t throw new Error(\"cannot turn \" + node.type + \" to an expression\");\n\t }\n\n\t return node;\n\t}\n\n\tfunction traverseFast$2(node, enter, opts) {\n\t if (!node) return;\n\t var keys = VISITOR_KEYS$6[node.type];\n\t if (!keys) return;\n\t opts = opts || {};\n\t enter(node, opts);\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {\n\t var key = _step.value;\n\t var subNode = node[key];\n\n\t if (Array.isArray(subNode)) {\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(subNode), _step2; !(_step2 = _iterator2()).done;) {\n\t var _node = _step2.value;\n\t traverseFast$2(_node, enter, opts);\n\t }\n\t } else {\n\t traverseFast$2(subNode, enter, opts);\n\t }\n\t }\n\t}\n\n\tvar CLEAR_KEYS = [\"tokens\", \"start\", \"end\", \"loc\", \"raw\", \"rawValue\"];\n\tvar CLEAR_KEYS_PLUS_COMMENTS = COMMENT_KEYS.concat([\"comments\"]).concat(CLEAR_KEYS);\n\tfunction removeProperties$1(node, opts) {\n\t if (opts === void 0) {\n\t opts = {};\n\t }\n\n\t var map = opts.preserveComments ? CLEAR_KEYS : CLEAR_KEYS_PLUS_COMMENTS;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(map), _step; !(_step = _iterator()).done;) {\n\t var _key = _step.value;\n\t if (node[_key] != null) node[_key] = undefined;\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(node); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t if (key[0] === \"_\" && node[key] != null) node[key] = undefined;\n\t }\n\n\t var symbols = Object.getOwnPropertySymbols(node);\n\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(symbols), _step2; !(_step2 = _iterator2()).done;) {\n\t var sym = _step2.value;\n\t node[sym] = null;\n\t }\n\t}\n\n\tfunction removePropertiesDeep$1(tree, opts) {\n\t traverseFast$2(tree, removeProperties$1, opts);\n\t return tree;\n\t}\n\n\tfunction toKeyAlias$1(node, key) {\n\t if (key === void 0) {\n\t key = node.key;\n\t }\n\n\t var alias;\n\n\t if (node.kind === \"method\") {\n\t return toKeyAlias$1.increment() + \"\";\n\t } else if (isIdentifier$g(key)) {\n\t alias = key.name;\n\t } else if (isStringLiteral$7(key)) {\n\t alias = JSON.stringify(key.value);\n\t } else {\n\t alias = JSON.stringify(removePropertiesDeep$1(cloneNode$i(key)));\n\t }\n\n\t if (node.computed) {\n\t alias = \"[\" + alias + \"]\";\n\t }\n\n\t if (node[\"static\"]) {\n\t alias = \"static:\" + alias;\n\t }\n\n\t return alias;\n\t}\n\ttoKeyAlias$1.uid = 0;\n\n\ttoKeyAlias$1.increment = function () {\n\t if (toKeyAlias$1.uid >= Number.MAX_SAFE_INTEGER) {\n\t return toKeyAlias$1.uid = 0;\n\t } else {\n\t return toKeyAlias$1.uid++;\n\t }\n\t};\n\n\tfunction getBindingIdentifiers$2(node, duplicates, outerOnly) {\n\t var search = [].concat(node);\n\t var ids = Object.create(null);\n\n\t while (search.length) {\n\t var id = search.shift();\n\t if (!id) continue;\n\t var keys = getBindingIdentifiers$2.keys[id.type];\n\n\t if (isIdentifier$g(id)) {\n\t if (duplicates) {\n\t var _ids = ids[id.name] = ids[id.name] || [];\n\n\t _ids.push(id);\n\t } else {\n\t ids[id.name] = id;\n\t }\n\n\t continue;\n\t }\n\n\t if (isExportDeclaration$2(id) && !isExportAllDeclaration$1(id)) {\n\t if (isDeclaration$1(id.declaration)) {\n\t search.push(id.declaration);\n\t }\n\n\t continue;\n\t }\n\n\t if (outerOnly) {\n\t if (isFunctionDeclaration$1(id)) {\n\t search.push(id.id);\n\t continue;\n\t }\n\n\t if (isFunctionExpression$1(id)) {\n\t continue;\n\t }\n\t }\n\n\t if (keys) {\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\n\t if (id[key]) {\n\t search = search.concat(id[key]);\n\t }\n\t }\n\t }\n\t }\n\n\t return ids;\n\t}\n\n\tgetBindingIdentifiers$2.keys = {\n\t DeclareClass: [\"id\"],\n\t DeclareFunction: [\"id\"],\n\t DeclareModule: [\"id\"],\n\t DeclareVariable: [\"id\"],\n\t DeclareInterface: [\"id\"],\n\t DeclareTypeAlias: [\"id\"],\n\t DeclareOpaqueType: [\"id\"],\n\t InterfaceDeclaration: [\"id\"],\n\t TypeAlias: [\"id\"],\n\t OpaqueType: [\"id\"],\n\t CatchClause: [\"param\"],\n\t LabeledStatement: [\"label\"],\n\t UnaryExpression: [\"argument\"],\n\t AssignmentExpression: [\"left\"],\n\t ImportSpecifier: [\"local\"],\n\t ImportNamespaceSpecifier: [\"local\"],\n\t ImportDefaultSpecifier: [\"local\"],\n\t ImportDeclaration: [\"specifiers\"],\n\t ExportSpecifier: [\"exported\"],\n\t ExportNamespaceSpecifier: [\"exported\"],\n\t ExportDefaultSpecifier: [\"exported\"],\n\t FunctionDeclaration: [\"id\", \"params\"],\n\t FunctionExpression: [\"id\", \"params\"],\n\t ArrowFunctionExpression: [\"params\"],\n\t ObjectMethod: [\"params\"],\n\t ClassMethod: [\"params\"],\n\t ClassPrivateMethod: [\"params\"],\n\t ForInStatement: [\"left\"],\n\t ForOfStatement: [\"left\"],\n\t ClassDeclaration: [\"id\"],\n\t ClassExpression: [\"id\"],\n\t RestElement: [\"argument\"],\n\t UpdateExpression: [\"argument\"],\n\t ObjectProperty: [\"value\"],\n\t AssignmentPattern: [\"left\"],\n\t ArrayPattern: [\"elements\"],\n\t ObjectPattern: [\"properties\"],\n\t VariableDeclaration: [\"declarations\"],\n\t VariableDeclarator: [\"id\"]\n\t};\n\n\tfunction gatherSequenceExpressions(nodes, scope, declars) {\n\t var exprs = [];\n\t var ensureLastUndefined = true;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(nodes), _step; !(_step = _iterator()).done;) {\n\t var node = _step.value;\n\n\t if (!isEmptyStatement$1(node)) {\n\t ensureLastUndefined = false;\n\t }\n\n\t if (isExpression$4(node)) {\n\t exprs.push(node);\n\t } else if (isExpressionStatement$4(node)) {\n\t exprs.push(node.expression);\n\t } else if (isVariableDeclaration$3(node)) {\n\t if (node.kind !== \"var\") return;\n\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(node.declarations), _step2; !(_step2 = _iterator2()).done;) {\n\t var declar = _step2.value;\n\t var bindings = getBindingIdentifiers$2(declar);\n\n\t for (var _i = 0, _Object$keys = Object.keys(bindings); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t declars.push({\n\t kind: node.kind,\n\t id: cloneNode$i(bindings[key])\n\t });\n\t }\n\n\t if (declar.init) {\n\t exprs.push(assignmentExpression$c(\"=\", declar.id, declar.init));\n\t }\n\t }\n\n\t ensureLastUndefined = true;\n\t } else if (isIfStatement$2(node)) {\n\t var consequent = node.consequent ? gatherSequenceExpressions([node.consequent], scope, declars) : scope.buildUndefinedNode();\n\t var alternate = node.alternate ? gatherSequenceExpressions([node.alternate], scope, declars) : scope.buildUndefinedNode();\n\t if (!consequent || !alternate) return;\n\t exprs.push(conditionalExpression$3(node.test, consequent, alternate));\n\t } else if (isBlockStatement$2(node)) {\n\t var body = gatherSequenceExpressions(node.body, scope, declars);\n\t if (!body) return;\n\t exprs.push(body);\n\t } else if (isEmptyStatement$1(node)) {\n\t if (nodes.indexOf(node) === 0) {\n\t ensureLastUndefined = true;\n\t }\n\t } else {\n\t return;\n\t }\n\t }\n\n\t if (ensureLastUndefined) {\n\t exprs.push(scope.buildUndefinedNode());\n\t }\n\n\t if (exprs.length === 1) {\n\t return exprs[0];\n\t } else {\n\t return sequenceExpression$7(exprs);\n\t }\n\t}\n\n\tfunction toSequenceExpression$1(nodes, scope) {\n\t if (!(nodes != null && nodes.length)) return;\n\t var declars = [];\n\t var result = gatherSequenceExpressions(nodes, scope, declars);\n\t if (!result) return;\n\n\t for (var _i = 0, _declars = declars; _i < _declars.length; _i++) {\n\t var declar = _declars[_i];\n\t scope.push(declar);\n\t }\n\n\t return result;\n\t}\n\n\tfunction toStatement(node, ignore) {\n\t if (isStatement$7(node)) {\n\t return node;\n\t }\n\n\t var mustHaveId = false;\n\t var newType;\n\n\t if (isClass$1(node)) {\n\t mustHaveId = true;\n\t newType = \"ClassDeclaration\";\n\t } else if (isFunction$4(node)) {\n\t mustHaveId = true;\n\t newType = \"FunctionDeclaration\";\n\t } else if (isAssignmentExpression$3(node)) {\n\t return expressionStatement$a(node);\n\t }\n\n\t if (mustHaveId && !node.id) {\n\t newType = false;\n\t }\n\n\t if (!newType) {\n\t if (ignore) {\n\t return false;\n\t } else {\n\t throw new Error(\"cannot turn \" + node.type + \" to a statement\");\n\t }\n\t }\n\n\t node.type = newType;\n\t return node;\n\t}\n\n\tvar objectToString = Function.call.bind(Object.prototype.toString);\n\n\tfunction isRegExp(value) {\n\t return objectToString(value) === \"[object RegExp]\";\n\t}\n\n\tfunction isPlainObject(value) {\n\t if (typeof value !== \"object\" || value === null || Object.prototype.toString.call(value) !== \"[object Object]\") {\n\t return false;\n\t }\n\n\t var proto = Object.getPrototypeOf(value);\n\t return proto === null || Object.getPrototypeOf(proto) === null;\n\t}\n\n\tfunction valueToNode$1(value) {\n\t if (value === undefined) {\n\t return identifier$j(\"undefined\");\n\t }\n\n\t if (value === true || value === false) {\n\t return booleanLiteral$5(value);\n\t }\n\n\t if (value === null) {\n\t return nullLiteral$2();\n\t }\n\n\t if (typeof value === \"string\") {\n\t return stringLiteral$8(value);\n\t }\n\n\t if (typeof value === \"number\") {\n\t var result;\n\n\t if (Number.isFinite(value)) {\n\t result = numericLiteral$8(Math.abs(value));\n\t } else {\n\t var numerator;\n\n\t if (Number.isNaN(value)) {\n\t numerator = numericLiteral$8(0);\n\t } else {\n\t numerator = numericLiteral$8(1);\n\t }\n\n\t result = binaryExpression$4(\"/\", numerator, numericLiteral$8(0));\n\t }\n\n\t if (value < 0 || Object.is(value, -0)) {\n\t result = unaryExpression$7(\"-\", result);\n\t }\n\n\t return result;\n\t }\n\n\t if (isRegExp(value)) {\n\t var pattern = value.source;\n\t var flags = value.toString().match(/\\/([a-z]+|)$/)[1];\n\t return regExpLiteral(pattern, flags);\n\t }\n\n\t if (Array.isArray(value)) {\n\t return arrayExpression$2(value.map(valueToNode$1));\n\t }\n\n\t if (isPlainObject(value)) {\n\t var props = [];\n\n\t for (var _i = 0, _Object$keys = Object.keys(value); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t var nodeKey = void 0;\n\n\t if (isValidIdentifier$1(key)) {\n\t nodeKey = identifier$j(key);\n\t } else {\n\t nodeKey = stringLiteral$8(key);\n\t }\n\n\t props.push(objectProperty$2(nodeKey, valueToNode$1(value[key])));\n\t }\n\n\t return objectExpression$4(props);\n\t }\n\n\t throw new Error(\"don't know how to turn this value into a node\");\n\t}\n\n\tfunction appendToMemberExpression(member, append, computed) {\n\t if (computed === void 0) {\n\t computed = false;\n\t }\n\n\t member.object = memberExpression$b(member.object, member.property, member.computed);\n\t member.property = append;\n\t member.computed = !!computed;\n\t return member;\n\t}\n\n\tfunction inherits$1(child, parent) {\n\t if (!child || !parent) return child;\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(INHERIT_KEYS.optional), _step; !(_step = _iterator()).done;) {\n\t var _key = _step.value;\n\n\t if (child[_key] == null) {\n\t child[_key] = parent[_key];\n\t }\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(parent); _i < _Object$keys.length; _i++) {\n\t var key = _Object$keys[_i];\n\t if (key[0] === \"_\" && key !== \"__clone\") child[key] = parent[key];\n\t }\n\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(INHERIT_KEYS.force), _step2; !(_step2 = _iterator2()).done;) {\n\t var _key2 = _step2.value;\n\t child[_key2] = parent[_key2];\n\t }\n\n\t inheritsComments$2(child, parent);\n\t return child;\n\t}\n\n\tfunction prependToMemberExpression(member, prepend) {\n\t member.object = memberExpression$b(prepend, member.object);\n\t return member;\n\t}\n\n\tfunction getOuterBindingIdentifiers$2(node, duplicates) {\n\t return getBindingIdentifiers$2(node, duplicates, true);\n\t}\n\n\tfunction traverse$2(node, handlers, state) {\n\t if (typeof handlers === \"function\") {\n\t handlers = {\n\t enter: handlers\n\t };\n\t }\n\n\t var _ref = handlers,\n\t enter = _ref.enter,\n\t exit = _ref.exit;\n\t traverseSimpleImpl(node, enter, exit, state, []);\n\t}\n\n\tfunction traverseSimpleImpl(node, enter, exit, state, ancestors) {\n\t var keys = VISITOR_KEYS$6[node.type];\n\t if (!keys) return;\n\t if (enter) enter(node, ancestors, state);\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {\n\t var key = _step.value;\n\t var subNode = node[key];\n\n\t if (Array.isArray(subNode)) {\n\t for (var i = 0; i < subNode.length; i++) {\n\t var child = subNode[i];\n\t if (!child) continue;\n\t ancestors.push({\n\t node: node,\n\t key: key,\n\t index: i\n\t });\n\t traverseSimpleImpl(child, enter, exit, state, ancestors);\n\t ancestors.pop();\n\t }\n\t } else if (subNode) {\n\t ancestors.push({\n\t node: node,\n\t key: key\n\t });\n\t traverseSimpleImpl(subNode, enter, exit, state, ancestors);\n\t ancestors.pop();\n\t }\n\t }\n\n\t if (exit) exit(node, ancestors, state);\n\t}\n\n\tfunction isBinding$1(node, parent, grandparent) {\n\t if (grandparent && node.type === \"Identifier\" && parent.type === \"ObjectProperty\" && grandparent.type === \"ObjectExpression\") {\n\t return false;\n\t }\n\n\t var keys = getBindingIdentifiers$2.keys[parent.type];\n\n\t if (keys) {\n\t for (var i = 0; i < keys.length; i++) {\n\t var key = keys[i];\n\t var val = parent[key];\n\n\t if (Array.isArray(val)) {\n\t if (val.indexOf(node) >= 0) return true;\n\t } else {\n\t if (val === node) return true;\n\t }\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction isLet(node) {\n\t return isVariableDeclaration$3(node) && (node.kind !== \"var\" || node[BLOCK_SCOPED_SYMBOL]);\n\t}\n\n\tfunction isBlockScoped$2(node) {\n\t return isFunctionDeclaration$1(node) || isClassDeclaration$3(node) || isLet(node);\n\t}\n\n\tfunction isImmutable(node) {\n\t if (isType$2(node.type, \"Immutable\")) return true;\n\n\t if (isIdentifier$g(node)) {\n\t if (node.name === \"undefined\") {\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tfunction isNodesEquivalent(a, b) {\n\t if (typeof a !== \"object\" || typeof b !== \"object\" || a == null || b == null) {\n\t return a === b;\n\t }\n\n\t if (a.type !== b.type) {\n\t return false;\n\t }\n\n\t var fields = Object.keys(NODE_FIELDS[a.type] || a.type);\n\t var visitorKeys = VISITOR_KEYS$6[a.type];\n\n\t for (var _i = 0, _fields = fields; _i < _fields.length; _i++) {\n\t var field = _fields[_i];\n\n\t if (typeof a[field] !== typeof b[field]) {\n\t return false;\n\t }\n\n\t if (a[field] == null && b[field] == null) {\n\t continue;\n\t } else if (a[field] == null || b[field] == null) {\n\t return false;\n\t }\n\n\t if (Array.isArray(a[field])) {\n\t if (!Array.isArray(b[field])) {\n\t return false;\n\t }\n\n\t if (a[field].length !== b[field].length) {\n\t return false;\n\t }\n\n\t for (var i = 0; i < a[field].length; i++) {\n\t if (!isNodesEquivalent(a[field][i], b[field][i])) {\n\t return false;\n\t }\n\t }\n\n\t continue;\n\t }\n\n\t if (typeof a[field] === \"object\" && !(visitorKeys != null && visitorKeys.includes(field))) {\n\t for (var _i2 = 0, _Object$keys = Object.keys(a[field]); _i2 < _Object$keys.length; _i2++) {\n\t var key = _Object$keys[_i2];\n\n\t if (a[field][key] !== b[field][key]) {\n\t return false;\n\t }\n\t }\n\n\t continue;\n\t }\n\n\t if (!isNodesEquivalent(a[field], b[field])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t}\n\n\tfunction isReferenced$2(node, parent, grandparent) {\n\t switch (parent.type) {\n\t case \"MemberExpression\":\n\t case \"OptionalMemberExpression\":\n\t if (parent.property === node) {\n\t return !!parent.computed;\n\t }\n\n\t return parent.object === node;\n\n\t case \"JSXMemberExpression\":\n\t return parent.object === node;\n\n\t case \"VariableDeclarator\":\n\t return parent.init === node;\n\n\t case \"ArrowFunctionExpression\":\n\t return parent.body === node;\n\n\t case \"PrivateName\":\n\t return false;\n\n\t case \"ClassMethod\":\n\t case \"ClassPrivateMethod\":\n\t case \"ObjectMethod\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return false;\n\n\t case \"ObjectProperty\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return !grandparent || grandparent.type !== \"ObjectPattern\";\n\n\t case \"ClassProperty\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return true;\n\n\t case \"ClassPrivateProperty\":\n\t return parent.key !== node;\n\n\t case \"ClassDeclaration\":\n\t case \"ClassExpression\":\n\t return parent.superClass === node;\n\n\t case \"AssignmentExpression\":\n\t return parent.right === node;\n\n\t case \"AssignmentPattern\":\n\t return parent.right === node;\n\n\t case \"LabeledStatement\":\n\t return false;\n\n\t case \"CatchClause\":\n\t return false;\n\n\t case \"RestElement\":\n\t return false;\n\n\t case \"BreakStatement\":\n\t case \"ContinueStatement\":\n\t return false;\n\n\t case \"FunctionDeclaration\":\n\t case \"FunctionExpression\":\n\t return false;\n\n\t case \"ExportNamespaceSpecifier\":\n\t case \"ExportDefaultSpecifier\":\n\t return false;\n\n\t case \"ExportSpecifier\":\n\t if (grandparent != null && grandparent.source) {\n\t return false;\n\t }\n\n\t return parent.local === node;\n\n\t case \"ImportDefaultSpecifier\":\n\t case \"ImportNamespaceSpecifier\":\n\t case \"ImportSpecifier\":\n\t return false;\n\n\t case \"ImportAttribute\":\n\t return false;\n\n\t case \"JSXAttribute\":\n\t return false;\n\n\t case \"ObjectPattern\":\n\t case \"ArrayPattern\":\n\t return false;\n\n\t case \"MetaProperty\":\n\t return false;\n\n\t case \"ObjectTypeProperty\":\n\t return parent.key !== node;\n\n\t case \"TSEnumMember\":\n\t return parent.id !== node;\n\n\t case \"TSPropertySignature\":\n\t if (parent.key === node) {\n\t return !!parent.computed;\n\t }\n\n\t return true;\n\t }\n\n\t return true;\n\t}\n\n\tfunction isScope$1(node, parent) {\n\t if (isBlockStatement$2(node) && (isFunction$4(parent) || isCatchClause(parent))) {\n\t return false;\n\t }\n\n\t if (isPattern(node) && (isFunction$4(parent) || isCatchClause(parent))) {\n\t return true;\n\t }\n\n\t return isScopable(node);\n\t}\n\n\tfunction isSpecifierDefault(specifier) {\n\t return isImportDefaultSpecifier$1(specifier) || isIdentifier$g(specifier.imported || specifier.exported, {\n\t name: \"default\"\n\t });\n\t}\n\n\tvar RESERVED_WORDS_ES3_ONLY = new Set([\"abstract\", \"boolean\", \"byte\", \"char\", \"double\", \"enum\", \"final\", \"float\", \"goto\", \"implements\", \"int\", \"interface\", \"long\", \"native\", \"package\", \"private\", \"protected\", \"public\", \"short\", \"static\", \"synchronized\", \"throws\", \"transient\", \"volatile\"]);\n\tfunction isValidES3Identifier(name) {\n\t return isValidIdentifier$1(name) && !RESERVED_WORDS_ES3_ONLY.has(name);\n\t}\n\n\tfunction isVar$2(node) {\n\t return isVariableDeclaration$3(node, {\n\t kind: \"var\"\n\t }) && !node[BLOCK_SCOPED_SYMBOL];\n\t}\n\n\tvar react$3 = {\n\t isReactComponent: isReactComponent,\n\t isCompatTag: isCompatTag$1,\n\t buildChildren: buildChildren\n\t};\n\n\tvar t$f = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\treact: react$3,\n\t\tassertNode: assertNode,\n\t\tcreateTypeAnnotationBasedOnTypeof: createTypeAnnotationBasedOnTypeof$1,\n\t\tcreateUnionTypeAnnotation: createFlowUnionType$2,\n\t\tcreateFlowUnionType: createFlowUnionType$2,\n\t\tcreateTSUnionType: createTSUnionType$2,\n\t\tcloneNode: cloneNode$i,\n\t\tclone: clone,\n\t\tcloneDeep: cloneDeep$1,\n\t\tcloneDeepWithoutLoc: cloneDeepWithoutLoc,\n\t\tcloneWithoutLoc: cloneWithoutLoc,\n\t\taddComment: addComment$2,\n\t\taddComments: addComments$1,\n\t\tinheritInnerComments: inheritInnerComments,\n\t\tinheritLeadingComments: inheritLeadingComments$1,\n\t\tinheritsComments: inheritsComments$2,\n\t\tinheritTrailingComments: inheritTrailingComments$1,\n\t\tremoveComments: removeComments$2,\n\t\tensureBlock: ensureBlock$1,\n\t\ttoBindingIdentifierName: toBindingIdentifierName$1,\n\t\ttoBlock: toBlock,\n\t\ttoComputedKey: toComputedKey$3,\n\t\ttoExpression: toExpression,\n\t\ttoIdentifier: toIdentifier$1,\n\t\ttoKeyAlias: toKeyAlias$1,\n\t\ttoSequenceExpression: toSequenceExpression$1,\n\t\ttoStatement: toStatement,\n\t\tvalueToNode: valueToNode$1,\n\t\tappendToMemberExpression: appendToMemberExpression,\n\t\tinherits: inherits$1,\n\t\tprependToMemberExpression: prependToMemberExpression,\n\t\tremoveProperties: removeProperties$1,\n\t\tremovePropertiesDeep: removePropertiesDeep$1,\n\t\tremoveTypeDuplicates: removeTypeDuplicates$1,\n\t\tgetBindingIdentifiers: getBindingIdentifiers$2,\n\t\tgetOuterBindingIdentifiers: getOuterBindingIdentifiers$2,\n\t\ttraverse: traverse$2,\n\t\ttraverseFast: traverseFast$2,\n\t\tshallowEqual: shallowEqual,\n\t\tis: is$1,\n\t\tisBinding: isBinding$1,\n\t\tisBlockScoped: isBlockScoped$2,\n\t\tisImmutable: isImmutable,\n\t\tisLet: isLet,\n\t\tisNode: isNode,\n\t\tisNodesEquivalent: isNodesEquivalent,\n\t\tisPlaceholderType: isPlaceholderType,\n\t\tisReferenced: isReferenced$2,\n\t\tisScope: isScope$1,\n\t\tisSpecifierDefault: isSpecifierDefault,\n\t\tisType: isType$2,\n\t\tisValidES3Identifier: isValidES3Identifier,\n\t\tisValidIdentifier: isValidIdentifier$1,\n\t\tisVar: isVar$2,\n\t\tmatchesPattern: matchesPattern$2,\n\t\tvalidate: validate$6,\n\t\tbuildMatchMemberExpression: buildMatchMemberExpression$1,\n\t\tassertArrayExpression: assertArrayExpression,\n\t\tassertAssignmentExpression: assertAssignmentExpression,\n\t\tassertBinaryExpression: assertBinaryExpression,\n\t\tassertInterpreterDirective: assertInterpreterDirective,\n\t\tassertDirective: assertDirective,\n\t\tassertDirectiveLiteral: assertDirectiveLiteral,\n\t\tassertBlockStatement: assertBlockStatement,\n\t\tassertBreakStatement: assertBreakStatement,\n\t\tassertCallExpression: assertCallExpression,\n\t\tassertCatchClause: assertCatchClause,\n\t\tassertConditionalExpression: assertConditionalExpression,\n\t\tassertContinueStatement: assertContinueStatement,\n\t\tassertDebuggerStatement: assertDebuggerStatement,\n\t\tassertDoWhileStatement: assertDoWhileStatement,\n\t\tassertEmptyStatement: assertEmptyStatement,\n\t\tassertExpressionStatement: assertExpressionStatement$1,\n\t\tassertFile: assertFile,\n\t\tassertForInStatement: assertForInStatement,\n\t\tassertForStatement: assertForStatement,\n\t\tassertFunctionDeclaration: assertFunctionDeclaration,\n\t\tassertFunctionExpression: assertFunctionExpression,\n\t\tassertIdentifier: assertIdentifier,\n\t\tassertIfStatement: assertIfStatement,\n\t\tassertLabeledStatement: assertLabeledStatement,\n\t\tassertStringLiteral: assertStringLiteral,\n\t\tassertNumericLiteral: assertNumericLiteral,\n\t\tassertNullLiteral: assertNullLiteral,\n\t\tassertBooleanLiteral: assertBooleanLiteral,\n\t\tassertRegExpLiteral: assertRegExpLiteral,\n\t\tassertLogicalExpression: assertLogicalExpression,\n\t\tassertMemberExpression: assertMemberExpression,\n\t\tassertNewExpression: assertNewExpression,\n\t\tassertProgram: assertProgram,\n\t\tassertObjectExpression: assertObjectExpression,\n\t\tassertObjectMethod: assertObjectMethod,\n\t\tassertObjectProperty: assertObjectProperty,\n\t\tassertRestElement: assertRestElement,\n\t\tassertReturnStatement: assertReturnStatement,\n\t\tassertSequenceExpression: assertSequenceExpression,\n\t\tassertParenthesizedExpression: assertParenthesizedExpression,\n\t\tassertSwitchCase: assertSwitchCase,\n\t\tassertSwitchStatement: assertSwitchStatement,\n\t\tassertThisExpression: assertThisExpression,\n\t\tassertThrowStatement: assertThrowStatement,\n\t\tassertTryStatement: assertTryStatement,\n\t\tassertUnaryExpression: assertUnaryExpression,\n\t\tassertUpdateExpression: assertUpdateExpression,\n\t\tassertVariableDeclaration: assertVariableDeclaration,\n\t\tassertVariableDeclarator: assertVariableDeclarator,\n\t\tassertWhileStatement: assertWhileStatement,\n\t\tassertWithStatement: assertWithStatement,\n\t\tassertAssignmentPattern: assertAssignmentPattern,\n\t\tassertArrayPattern: assertArrayPattern,\n\t\tassertArrowFunctionExpression: assertArrowFunctionExpression,\n\t\tassertClassBody: assertClassBody,\n\t\tassertClassExpression: assertClassExpression,\n\t\tassertClassDeclaration: assertClassDeclaration,\n\t\tassertExportAllDeclaration: assertExportAllDeclaration,\n\t\tassertExportDefaultDeclaration: assertExportDefaultDeclaration,\n\t\tassertExportNamedDeclaration: assertExportNamedDeclaration,\n\t\tassertExportSpecifier: assertExportSpecifier$1,\n\t\tassertForOfStatement: assertForOfStatement,\n\t\tassertImportDeclaration: assertImportDeclaration,\n\t\tassertImportDefaultSpecifier: assertImportDefaultSpecifier,\n\t\tassertImportNamespaceSpecifier: assertImportNamespaceSpecifier,\n\t\tassertImportSpecifier: assertImportSpecifier,\n\t\tassertMetaProperty: assertMetaProperty,\n\t\tassertClassMethod: assertClassMethod,\n\t\tassertObjectPattern: assertObjectPattern,\n\t\tassertSpreadElement: assertSpreadElement,\n\t\tassertSuper: assertSuper,\n\t\tassertTaggedTemplateExpression: assertTaggedTemplateExpression,\n\t\tassertTemplateElement: assertTemplateElement,\n\t\tassertTemplateLiteral: assertTemplateLiteral,\n\t\tassertYieldExpression: assertYieldExpression,\n\t\tassertAwaitExpression: assertAwaitExpression,\n\t\tassertImport: assertImport,\n\t\tassertBigIntLiteral: assertBigIntLiteral,\n\t\tassertExportNamespaceSpecifier: assertExportNamespaceSpecifier,\n\t\tassertOptionalMemberExpression: assertOptionalMemberExpression,\n\t\tassertOptionalCallExpression: assertOptionalCallExpression,\n\t\tassertClassProperty: assertClassProperty,\n\t\tassertClassPrivateProperty: assertClassPrivateProperty,\n\t\tassertClassPrivateMethod: assertClassPrivateMethod,\n\t\tassertPrivateName: assertPrivateName,\n\t\tassertAnyTypeAnnotation: assertAnyTypeAnnotation,\n\t\tassertArrayTypeAnnotation: assertArrayTypeAnnotation,\n\t\tassertBooleanTypeAnnotation: assertBooleanTypeAnnotation,\n\t\tassertBooleanLiteralTypeAnnotation: assertBooleanLiteralTypeAnnotation,\n\t\tassertNullLiteralTypeAnnotation: assertNullLiteralTypeAnnotation,\n\t\tassertClassImplements: assertClassImplements,\n\t\tassertDeclareClass: assertDeclareClass,\n\t\tassertDeclareFunction: assertDeclareFunction,\n\t\tassertDeclareInterface: assertDeclareInterface,\n\t\tassertDeclareModule: assertDeclareModule,\n\t\tassertDeclareModuleExports: assertDeclareModuleExports,\n\t\tassertDeclareTypeAlias: assertDeclareTypeAlias,\n\t\tassertDeclareOpaqueType: assertDeclareOpaqueType,\n\t\tassertDeclareVariable: assertDeclareVariable,\n\t\tassertDeclareExportDeclaration: assertDeclareExportDeclaration,\n\t\tassertDeclareExportAllDeclaration: assertDeclareExportAllDeclaration,\n\t\tassertDeclaredPredicate: assertDeclaredPredicate,\n\t\tassertExistsTypeAnnotation: assertExistsTypeAnnotation,\n\t\tassertFunctionTypeAnnotation: assertFunctionTypeAnnotation,\n\t\tassertFunctionTypeParam: assertFunctionTypeParam,\n\t\tassertGenericTypeAnnotation: assertGenericTypeAnnotation,\n\t\tassertInferredPredicate: assertInferredPredicate,\n\t\tassertInterfaceExtends: assertInterfaceExtends,\n\t\tassertInterfaceDeclaration: assertInterfaceDeclaration,\n\t\tassertInterfaceTypeAnnotation: assertInterfaceTypeAnnotation,\n\t\tassertIntersectionTypeAnnotation: assertIntersectionTypeAnnotation,\n\t\tassertMixedTypeAnnotation: assertMixedTypeAnnotation,\n\t\tassertEmptyTypeAnnotation: assertEmptyTypeAnnotation,\n\t\tassertNullableTypeAnnotation: assertNullableTypeAnnotation,\n\t\tassertNumberLiteralTypeAnnotation: assertNumberLiteralTypeAnnotation,\n\t\tassertNumberTypeAnnotation: assertNumberTypeAnnotation,\n\t\tassertObjectTypeAnnotation: assertObjectTypeAnnotation,\n\t\tassertObjectTypeInternalSlot: assertObjectTypeInternalSlot,\n\t\tassertObjectTypeCallProperty: assertObjectTypeCallProperty,\n\t\tassertObjectTypeIndexer: assertObjectTypeIndexer,\n\t\tassertObjectTypeProperty: assertObjectTypeProperty,\n\t\tassertObjectTypeSpreadProperty: assertObjectTypeSpreadProperty,\n\t\tassertOpaqueType: assertOpaqueType,\n\t\tassertQualifiedTypeIdentifier: assertQualifiedTypeIdentifier,\n\t\tassertStringLiteralTypeAnnotation: assertStringLiteralTypeAnnotation,\n\t\tassertStringTypeAnnotation: assertStringTypeAnnotation,\n\t\tassertSymbolTypeAnnotation: assertSymbolTypeAnnotation,\n\t\tassertThisTypeAnnotation: assertThisTypeAnnotation,\n\t\tassertTupleTypeAnnotation: assertTupleTypeAnnotation,\n\t\tassertTypeofTypeAnnotation: assertTypeofTypeAnnotation,\n\t\tassertTypeAlias: assertTypeAlias,\n\t\tassertTypeAnnotation: assertTypeAnnotation,\n\t\tassertTypeCastExpression: assertTypeCastExpression,\n\t\tassertTypeParameter: assertTypeParameter,\n\t\tassertTypeParameterDeclaration: assertTypeParameterDeclaration,\n\t\tassertTypeParameterInstantiation: assertTypeParameterInstantiation,\n\t\tassertUnionTypeAnnotation: assertUnionTypeAnnotation,\n\t\tassertVariance: assertVariance,\n\t\tassertVoidTypeAnnotation: assertVoidTypeAnnotation,\n\t\tassertEnumDeclaration: assertEnumDeclaration,\n\t\tassertEnumBooleanBody: assertEnumBooleanBody,\n\t\tassertEnumNumberBody: assertEnumNumberBody,\n\t\tassertEnumStringBody: assertEnumStringBody,\n\t\tassertEnumSymbolBody: assertEnumSymbolBody,\n\t\tassertEnumBooleanMember: assertEnumBooleanMember,\n\t\tassertEnumNumberMember: assertEnumNumberMember,\n\t\tassertEnumStringMember: assertEnumStringMember,\n\t\tassertEnumDefaultedMember: assertEnumDefaultedMember,\n\t\tassertIndexedAccessType: assertIndexedAccessType,\n\t\tassertOptionalIndexedAccessType: assertOptionalIndexedAccessType,\n\t\tassertJSXAttribute: assertJSXAttribute,\n\t\tassertJSXClosingElement: assertJSXClosingElement,\n\t\tassertJSXElement: assertJSXElement,\n\t\tassertJSXEmptyExpression: assertJSXEmptyExpression,\n\t\tassertJSXExpressionContainer: assertJSXExpressionContainer,\n\t\tassertJSXSpreadChild: assertJSXSpreadChild,\n\t\tassertJSXIdentifier: assertJSXIdentifier,\n\t\tassertJSXMemberExpression: assertJSXMemberExpression,\n\t\tassertJSXNamespacedName: assertJSXNamespacedName,\n\t\tassertJSXOpeningElement: assertJSXOpeningElement,\n\t\tassertJSXSpreadAttribute: assertJSXSpreadAttribute,\n\t\tassertJSXText: assertJSXText,\n\t\tassertJSXFragment: assertJSXFragment,\n\t\tassertJSXOpeningFragment: assertJSXOpeningFragment,\n\t\tassertJSXClosingFragment: assertJSXClosingFragment,\n\t\tassertNoop: assertNoop,\n\t\tassertPlaceholder: assertPlaceholder,\n\t\tassertV8IntrinsicIdentifier: assertV8IntrinsicIdentifier,\n\t\tassertArgumentPlaceholder: assertArgumentPlaceholder,\n\t\tassertBindExpression: assertBindExpression,\n\t\tassertImportAttribute: assertImportAttribute,\n\t\tassertDecorator: assertDecorator,\n\t\tassertDoExpression: assertDoExpression,\n\t\tassertExportDefaultSpecifier: assertExportDefaultSpecifier,\n\t\tassertRecordExpression: assertRecordExpression,\n\t\tassertTupleExpression: assertTupleExpression,\n\t\tassertDecimalLiteral: assertDecimalLiteral,\n\t\tassertStaticBlock: assertStaticBlock,\n\t\tassertModuleExpression: assertModuleExpression,\n\t\tassertTopicReference: assertTopicReference,\n\t\tassertPipelineTopicExpression: assertPipelineTopicExpression,\n\t\tassertPipelineBareFunction: assertPipelineBareFunction,\n\t\tassertPipelinePrimaryTopicReference: assertPipelinePrimaryTopicReference,\n\t\tassertTSParameterProperty: assertTSParameterProperty,\n\t\tassertTSDeclareFunction: assertTSDeclareFunction,\n\t\tassertTSDeclareMethod: assertTSDeclareMethod,\n\t\tassertTSQualifiedName: assertTSQualifiedName,\n\t\tassertTSCallSignatureDeclaration: assertTSCallSignatureDeclaration,\n\t\tassertTSConstructSignatureDeclaration: assertTSConstructSignatureDeclaration,\n\t\tassertTSPropertySignature: assertTSPropertySignature,\n\t\tassertTSMethodSignature: assertTSMethodSignature,\n\t\tassertTSIndexSignature: assertTSIndexSignature,\n\t\tassertTSAnyKeyword: assertTSAnyKeyword,\n\t\tassertTSBooleanKeyword: assertTSBooleanKeyword,\n\t\tassertTSBigIntKeyword: assertTSBigIntKeyword,\n\t\tassertTSIntrinsicKeyword: assertTSIntrinsicKeyword,\n\t\tassertTSNeverKeyword: assertTSNeverKeyword,\n\t\tassertTSNullKeyword: assertTSNullKeyword,\n\t\tassertTSNumberKeyword: assertTSNumberKeyword,\n\t\tassertTSObjectKeyword: assertTSObjectKeyword,\n\t\tassertTSStringKeyword: assertTSStringKeyword,\n\t\tassertTSSymbolKeyword: assertTSSymbolKeyword,\n\t\tassertTSUndefinedKeyword: assertTSUndefinedKeyword,\n\t\tassertTSUnknownKeyword: assertTSUnknownKeyword,\n\t\tassertTSVoidKeyword: assertTSVoidKeyword,\n\t\tassertTSThisType: assertTSThisType,\n\t\tassertTSFunctionType: assertTSFunctionType,\n\t\tassertTSConstructorType: assertTSConstructorType,\n\t\tassertTSTypeReference: assertTSTypeReference,\n\t\tassertTSTypePredicate: assertTSTypePredicate,\n\t\tassertTSTypeQuery: assertTSTypeQuery,\n\t\tassertTSTypeLiteral: assertTSTypeLiteral,\n\t\tassertTSArrayType: assertTSArrayType,\n\t\tassertTSTupleType: assertTSTupleType,\n\t\tassertTSOptionalType: assertTSOptionalType,\n\t\tassertTSRestType: assertTSRestType,\n\t\tassertTSNamedTupleMember: assertTSNamedTupleMember,\n\t\tassertTSUnionType: assertTSUnionType,\n\t\tassertTSIntersectionType: assertTSIntersectionType,\n\t\tassertTSConditionalType: assertTSConditionalType,\n\t\tassertTSInferType: assertTSInferType,\n\t\tassertTSParenthesizedType: assertTSParenthesizedType,\n\t\tassertTSTypeOperator: assertTSTypeOperator,\n\t\tassertTSIndexedAccessType: assertTSIndexedAccessType,\n\t\tassertTSMappedType: assertTSMappedType,\n\t\tassertTSLiteralType: assertTSLiteralType,\n\t\tassertTSExpressionWithTypeArguments: assertTSExpressionWithTypeArguments,\n\t\tassertTSInterfaceDeclaration: assertTSInterfaceDeclaration,\n\t\tassertTSInterfaceBody: assertTSInterfaceBody,\n\t\tassertTSTypeAliasDeclaration: assertTSTypeAliasDeclaration,\n\t\tassertTSAsExpression: assertTSAsExpression,\n\t\tassertTSTypeAssertion: assertTSTypeAssertion,\n\t\tassertTSEnumDeclaration: assertTSEnumDeclaration,\n\t\tassertTSEnumMember: assertTSEnumMember,\n\t\tassertTSModuleDeclaration: assertTSModuleDeclaration,\n\t\tassertTSModuleBlock: assertTSModuleBlock,\n\t\tassertTSImportType: assertTSImportType,\n\t\tassertTSImportEqualsDeclaration: assertTSImportEqualsDeclaration,\n\t\tassertTSExternalModuleReference: assertTSExternalModuleReference,\n\t\tassertTSNonNullExpression: assertTSNonNullExpression,\n\t\tassertTSExportAssignment: assertTSExportAssignment,\n\t\tassertTSNamespaceExportDeclaration: assertTSNamespaceExportDeclaration,\n\t\tassertTSTypeAnnotation: assertTSTypeAnnotation,\n\t\tassertTSTypeParameterInstantiation: assertTSTypeParameterInstantiation,\n\t\tassertTSTypeParameterDeclaration: assertTSTypeParameterDeclaration,\n\t\tassertTSTypeParameter: assertTSTypeParameter,\n\t\tassertExpression: assertExpression$1,\n\t\tassertBinary: assertBinary,\n\t\tassertScopable: assertScopable,\n\t\tassertBlockParent: assertBlockParent,\n\t\tassertBlock: assertBlock,\n\t\tassertStatement: assertStatement,\n\t\tassertTerminatorless: assertTerminatorless,\n\t\tassertCompletionStatement: assertCompletionStatement,\n\t\tassertConditional: assertConditional,\n\t\tassertLoop: assertLoop,\n\t\tassertWhile: assertWhile,\n\t\tassertExpressionWrapper: assertExpressionWrapper,\n\t\tassertFor: assertFor,\n\t\tassertForXStatement: assertForXStatement,\n\t\tassertFunction: assertFunction$1,\n\t\tassertFunctionParent: assertFunctionParent,\n\t\tassertPureish: assertPureish,\n\t\tassertDeclaration: assertDeclaration,\n\t\tassertPatternLike: assertPatternLike,\n\t\tassertLVal: assertLVal,\n\t\tassertTSEntityName: assertTSEntityName,\n\t\tassertLiteral: assertLiteral,\n\t\tassertImmutable: assertImmutable,\n\t\tassertUserWhitespacable: assertUserWhitespacable,\n\t\tassertMethod: assertMethod,\n\t\tassertObjectMember: assertObjectMember,\n\t\tassertProperty: assertProperty,\n\t\tassertUnaryLike: assertUnaryLike,\n\t\tassertPattern: assertPattern,\n\t\tassertClass: assertClass,\n\t\tassertModuleDeclaration: assertModuleDeclaration,\n\t\tassertExportDeclaration: assertExportDeclaration,\n\t\tassertModuleSpecifier: assertModuleSpecifier,\n\t\tassertPrivate: assertPrivate,\n\t\tassertFlow: assertFlow,\n\t\tassertFlowType: assertFlowType,\n\t\tassertFlowBaseAnnotation: assertFlowBaseAnnotation,\n\t\tassertFlowDeclaration: assertFlowDeclaration,\n\t\tassertFlowPredicate: assertFlowPredicate,\n\t\tassertEnumBody: assertEnumBody,\n\t\tassertEnumMember: assertEnumMember,\n\t\tassertJSX: assertJSX,\n\t\tassertTSTypeElement: assertTSTypeElement,\n\t\tassertTSType: assertTSType,\n\t\tassertTSBaseType: assertTSBaseType,\n\t\tassertNumberLiteral: assertNumberLiteral,\n\t\tassertRegexLiteral: assertRegexLiteral,\n\t\tassertRestProperty: assertRestProperty,\n\t\tassertSpreadProperty: assertSpreadProperty,\n\t\tarrayExpression: arrayExpression$2,\n\t\tassignmentExpression: assignmentExpression$c,\n\t\tbinaryExpression: binaryExpression$4,\n\t\tinterpreterDirective: interpreterDirective$1,\n\t\tdirective: directive$1,\n\t\tdirectiveLiteral: directiveLiteral$1,\n\t\tblockStatement: blockStatement$6,\n\t\tbreakStatement: breakStatement,\n\t\tcallExpression: callExpression$e,\n\t\tcatchClause: catchClause,\n\t\tconditionalExpression: conditionalExpression$3,\n\t\tcontinueStatement: continueStatement,\n\t\tdebuggerStatement: debuggerStatement,\n\t\tdoWhileStatement: doWhileStatement,\n\t\temptyStatement: emptyStatement$1,\n\t\texpressionStatement: expressionStatement$a,\n\t\tfile: file$1,\n\t\tforInStatement: forInStatement,\n\t\tforStatement: forStatement,\n\t\tfunctionDeclaration: functionDeclaration,\n\t\tfunctionExpression: functionExpression$3,\n\t\tidentifier: identifier$j,\n\t\tifStatement: ifStatement,\n\t\tlabeledStatement: labeledStatement,\n\t\tstringLiteral: stringLiteral$8,\n\t\tnumericLiteral: numericLiteral$8,\n\t\tnullLiteral: nullLiteral$2,\n\t\tbooleanLiteral: booleanLiteral$5,\n\t\tregExpLiteral: regExpLiteral,\n\t\tlogicalExpression: logicalExpression$2,\n\t\tmemberExpression: memberExpression$b,\n\t\tnewExpression: newExpression,\n\t\tprogram: program$3,\n\t\tobjectExpression: objectExpression$4,\n\t\tobjectMethod: objectMethod,\n\t\tobjectProperty: objectProperty$2,\n\t\trestElement: restElement$1,\n\t\treturnStatement: returnStatement$3,\n\t\tsequenceExpression: sequenceExpression$7,\n\t\tparenthesizedExpression: parenthesizedExpression,\n\t\tswitchCase: switchCase,\n\t\tswitchStatement: switchStatement,\n\t\tthisExpression: thisExpression$3,\n\t\tthrowStatement: throwStatement,\n\t\ttryStatement: tryStatement,\n\t\tunaryExpression: unaryExpression$7,\n\t\tupdateExpression: updateExpression,\n\t\tvariableDeclaration: variableDeclaration$8,\n\t\tvariableDeclarator: variableDeclarator$8,\n\t\twhileStatement: whileStatement,\n\t\twithStatement: withStatement,\n\t\tassignmentPattern: assignmentPattern,\n\t\tarrayPattern: arrayPattern,\n\t\tarrowFunctionExpression: arrowFunctionExpression$4,\n\t\tclassBody: classBody,\n\t\tclassExpression: classExpression,\n\t\tclassDeclaration: classDeclaration,\n\t\texportAllDeclaration: exportAllDeclaration,\n\t\texportDefaultDeclaration: exportDefaultDeclaration,\n\t\texportNamedDeclaration: exportNamedDeclaration$2,\n\t\texportSpecifier: exportSpecifier$2,\n\t\tforOfStatement: forOfStatement,\n\t\timportDeclaration: importDeclaration$1,\n\t\timportDefaultSpecifier: importDefaultSpecifier$1,\n\t\timportNamespaceSpecifier: importNamespaceSpecifier$1,\n\t\timportSpecifier: importSpecifier$1,\n\t\tmetaProperty: metaProperty$1,\n\t\tclassMethod: classMethod,\n\t\tobjectPattern: objectPattern,\n\t\tspreadElement: spreadElement$2,\n\t\t'super': _super$1,\n\t\ttaggedTemplateExpression: taggedTemplateExpression,\n\t\ttemplateElement: templateElement,\n\t\ttemplateLiteral: templateLiteral,\n\t\tyieldExpression: yieldExpression$2,\n\t\tawaitExpression: awaitExpression$1,\n\t\t'import': _import,\n\t\tbigIntLiteral: bigIntLiteral,\n\t\texportNamespaceSpecifier: exportNamespaceSpecifier,\n\t\toptionalMemberExpression: optionalMemberExpression$2,\n\t\toptionalCallExpression: optionalCallExpression$2,\n\t\tclassProperty: classProperty,\n\t\tclassPrivateProperty: classPrivateProperty,\n\t\tclassPrivateMethod: classPrivateMethod,\n\t\tprivateName: privateName,\n\t\tanyTypeAnnotation: anyTypeAnnotation$2,\n\t\tarrayTypeAnnotation: arrayTypeAnnotation$1,\n\t\tbooleanTypeAnnotation: booleanTypeAnnotation$1,\n\t\tbooleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation,\n\t\tnullLiteralTypeAnnotation: nullLiteralTypeAnnotation$1,\n\t\tclassImplements: classImplements,\n\t\tdeclareClass: declareClass,\n\t\tdeclareFunction: declareFunction,\n\t\tdeclareInterface: declareInterface,\n\t\tdeclareModule: declareModule,\n\t\tdeclareModuleExports: declareModuleExports,\n\t\tdeclareTypeAlias: declareTypeAlias,\n\t\tdeclareOpaqueType: declareOpaqueType,\n\t\tdeclareVariable: declareVariable,\n\t\tdeclareExportDeclaration: declareExportDeclaration,\n\t\tdeclareExportAllDeclaration: declareExportAllDeclaration,\n\t\tdeclaredPredicate: declaredPredicate,\n\t\texistsTypeAnnotation: existsTypeAnnotation,\n\t\tfunctionTypeAnnotation: functionTypeAnnotation,\n\t\tfunctionTypeParam: functionTypeParam,\n\t\tgenericTypeAnnotation: genericTypeAnnotation$1,\n\t\tinferredPredicate: inferredPredicate,\n\t\tinterfaceExtends: interfaceExtends,\n\t\tinterfaceDeclaration: interfaceDeclaration,\n\t\tinterfaceTypeAnnotation: interfaceTypeAnnotation,\n\t\tintersectionTypeAnnotation: intersectionTypeAnnotation,\n\t\tmixedTypeAnnotation: mixedTypeAnnotation,\n\t\temptyTypeAnnotation: emptyTypeAnnotation,\n\t\tnullableTypeAnnotation: nullableTypeAnnotation,\n\t\tnumberLiteralTypeAnnotation: numberLiteralTypeAnnotation,\n\t\tnumberTypeAnnotation: numberTypeAnnotation$2,\n\t\tobjectTypeAnnotation: objectTypeAnnotation,\n\t\tobjectTypeInternalSlot: objectTypeInternalSlot,\n\t\tobjectTypeCallProperty: objectTypeCallProperty,\n\t\tobjectTypeIndexer: objectTypeIndexer,\n\t\tobjectTypeProperty: objectTypeProperty,\n\t\tobjectTypeSpreadProperty: objectTypeSpreadProperty,\n\t\topaqueType: opaqueType,\n\t\tqualifiedTypeIdentifier: qualifiedTypeIdentifier,\n\t\tstringLiteralTypeAnnotation: stringLiteralTypeAnnotation,\n\t\tstringTypeAnnotation: stringTypeAnnotation$2,\n\t\tsymbolTypeAnnotation: symbolTypeAnnotation,\n\t\tthisTypeAnnotation: thisTypeAnnotation,\n\t\ttupleTypeAnnotation: tupleTypeAnnotation$1,\n\t\ttypeofTypeAnnotation: typeofTypeAnnotation,\n\t\ttypeAlias: typeAlias,\n\t\ttypeAnnotation: typeAnnotation,\n\t\ttypeCastExpression: typeCastExpression,\n\t\ttypeParameter: typeParameter,\n\t\ttypeParameterDeclaration: typeParameterDeclaration,\n\t\ttypeParameterInstantiation: typeParameterInstantiation,\n\t\tunionTypeAnnotation: unionTypeAnnotation$1,\n\t\tvariance: variance,\n\t\tvoidTypeAnnotation: voidTypeAnnotation$3,\n\t\tenumDeclaration: enumDeclaration,\n\t\tenumBooleanBody: enumBooleanBody,\n\t\tenumNumberBody: enumNumberBody,\n\t\tenumStringBody: enumStringBody,\n\t\tenumSymbolBody: enumSymbolBody,\n\t\tenumBooleanMember: enumBooleanMember,\n\t\tenumNumberMember: enumNumberMember,\n\t\tenumStringMember: enumStringMember,\n\t\tenumDefaultedMember: enumDefaultedMember,\n\t\tindexedAccessType: indexedAccessType,\n\t\toptionalIndexedAccessType: optionalIndexedAccessType,\n\t\tjsxAttribute: jsxAttribute,\n\t\tjSXAttribute: jsxAttribute,\n\t\tjsxClosingElement: jsxClosingElement,\n\t\tjSXClosingElement: jsxClosingElement,\n\t\tjsxElement: jsxElement,\n\t\tjSXElement: jsxElement,\n\t\tjsxEmptyExpression: jsxEmptyExpression,\n\t\tjSXEmptyExpression: jsxEmptyExpression,\n\t\tjsxExpressionContainer: jsxExpressionContainer$1,\n\t\tjSXExpressionContainer: jsxExpressionContainer$1,\n\t\tjsxSpreadChild: jsxSpreadChild,\n\t\tjSXSpreadChild: jsxSpreadChild,\n\t\tjsxIdentifier: jsxIdentifier$2,\n\t\tjSXIdentifier: jsxIdentifier$2,\n\t\tjsxMemberExpression: jsxMemberExpression$1,\n\t\tjSXMemberExpression: jsxMemberExpression$1,\n\t\tjsxNamespacedName: jsxNamespacedName,\n\t\tjSXNamespacedName: jsxNamespacedName,\n\t\tjsxOpeningElement: jsxOpeningElement,\n\t\tjSXOpeningElement: jsxOpeningElement,\n\t\tjsxSpreadAttribute: jsxSpreadAttribute,\n\t\tjSXSpreadAttribute: jsxSpreadAttribute,\n\t\tjsxText: jsxText,\n\t\tjSXText: jsxText,\n\t\tjsxFragment: jsxFragment,\n\t\tjSXFragment: jsxFragment,\n\t\tjsxOpeningFragment: jsxOpeningFragment,\n\t\tjSXOpeningFragment: jsxOpeningFragment,\n\t\tjsxClosingFragment: jsxClosingFragment,\n\t\tjSXClosingFragment: jsxClosingFragment,\n\t\tnoop: noop$1,\n\t\tplaceholder: placeholder,\n\t\tv8IntrinsicIdentifier: v8IntrinsicIdentifier,\n\t\targumentPlaceholder: argumentPlaceholder,\n\t\tbindExpression: bindExpression,\n\t\timportAttribute: importAttribute,\n\t\tdecorator: decorator,\n\t\tdoExpression: doExpression,\n\t\texportDefaultSpecifier: exportDefaultSpecifier,\n\t\trecordExpression: recordExpression,\n\t\ttupleExpression: tupleExpression,\n\t\tdecimalLiteral: decimalLiteral,\n\t\tstaticBlock: staticBlock$1,\n\t\tmoduleExpression: moduleExpression,\n\t\ttopicReference: topicReference,\n\t\tpipelineTopicExpression: pipelineTopicExpression,\n\t\tpipelineBareFunction: pipelineBareFunction,\n\t\tpipelinePrimaryTopicReference: pipelinePrimaryTopicReference,\n\t\ttsParameterProperty: tsParameterProperty,\n\t\ttSParameterProperty: tsParameterProperty,\n\t\ttsDeclareFunction: tsDeclareFunction,\n\t\ttSDeclareFunction: tsDeclareFunction,\n\t\ttsDeclareMethod: tsDeclareMethod,\n\t\ttSDeclareMethod: tsDeclareMethod,\n\t\ttsQualifiedName: tsQualifiedName,\n\t\ttSQualifiedName: tsQualifiedName,\n\t\ttsCallSignatureDeclaration: tsCallSignatureDeclaration,\n\t\ttSCallSignatureDeclaration: tsCallSignatureDeclaration,\n\t\ttsConstructSignatureDeclaration: tsConstructSignatureDeclaration,\n\t\ttSConstructSignatureDeclaration: tsConstructSignatureDeclaration,\n\t\ttsPropertySignature: tsPropertySignature,\n\t\ttSPropertySignature: tsPropertySignature,\n\t\ttsMethodSignature: tsMethodSignature,\n\t\ttSMethodSignature: tsMethodSignature,\n\t\ttsIndexSignature: tsIndexSignature,\n\t\ttSIndexSignature: tsIndexSignature,\n\t\ttsAnyKeyword: tsAnyKeyword,\n\t\ttSAnyKeyword: tsAnyKeyword,\n\t\ttsBooleanKeyword: tsBooleanKeyword,\n\t\ttSBooleanKeyword: tsBooleanKeyword,\n\t\ttsBigIntKeyword: tsBigIntKeyword,\n\t\ttSBigIntKeyword: tsBigIntKeyword,\n\t\ttsIntrinsicKeyword: tsIntrinsicKeyword,\n\t\ttSIntrinsicKeyword: tsIntrinsicKeyword,\n\t\ttsNeverKeyword: tsNeverKeyword,\n\t\ttSNeverKeyword: tsNeverKeyword,\n\t\ttsNullKeyword: tsNullKeyword,\n\t\ttSNullKeyword: tsNullKeyword,\n\t\ttsNumberKeyword: tsNumberKeyword,\n\t\ttSNumberKeyword: tsNumberKeyword,\n\t\ttsObjectKeyword: tsObjectKeyword,\n\t\ttSObjectKeyword: tsObjectKeyword,\n\t\ttsStringKeyword: tsStringKeyword,\n\t\ttSStringKeyword: tsStringKeyword,\n\t\ttsSymbolKeyword: tsSymbolKeyword,\n\t\ttSSymbolKeyword: tsSymbolKeyword,\n\t\ttsUndefinedKeyword: tsUndefinedKeyword,\n\t\ttSUndefinedKeyword: tsUndefinedKeyword,\n\t\ttsUnknownKeyword: tsUnknownKeyword,\n\t\ttSUnknownKeyword: tsUnknownKeyword,\n\t\ttsVoidKeyword: tsVoidKeyword,\n\t\ttSVoidKeyword: tsVoidKeyword,\n\t\ttsThisType: tsThisType,\n\t\ttSThisType: tsThisType,\n\t\ttsFunctionType: tsFunctionType,\n\t\ttSFunctionType: tsFunctionType,\n\t\ttsConstructorType: tsConstructorType,\n\t\ttSConstructorType: tsConstructorType,\n\t\ttsTypeReference: tsTypeReference,\n\t\ttSTypeReference: tsTypeReference,\n\t\ttsTypePredicate: tsTypePredicate,\n\t\ttSTypePredicate: tsTypePredicate,\n\t\ttsTypeQuery: tsTypeQuery,\n\t\ttSTypeQuery: tsTypeQuery,\n\t\ttsTypeLiteral: tsTypeLiteral,\n\t\ttSTypeLiteral: tsTypeLiteral,\n\t\ttsArrayType: tsArrayType,\n\t\ttSArrayType: tsArrayType,\n\t\ttsTupleType: tsTupleType,\n\t\ttSTupleType: tsTupleType,\n\t\ttsOptionalType: tsOptionalType,\n\t\ttSOptionalType: tsOptionalType,\n\t\ttsRestType: tsRestType,\n\t\ttSRestType: tsRestType,\n\t\ttsNamedTupleMember: tsNamedTupleMember,\n\t\ttSNamedTupleMember: tsNamedTupleMember,\n\t\ttsUnionType: tsUnionType,\n\t\ttSUnionType: tsUnionType,\n\t\ttsIntersectionType: tsIntersectionType,\n\t\ttSIntersectionType: tsIntersectionType,\n\t\ttsConditionalType: tsConditionalType,\n\t\ttSConditionalType: tsConditionalType,\n\t\ttsInferType: tsInferType,\n\t\ttSInferType: tsInferType,\n\t\ttsParenthesizedType: tsParenthesizedType,\n\t\ttSParenthesizedType: tsParenthesizedType,\n\t\ttsTypeOperator: tsTypeOperator,\n\t\ttSTypeOperator: tsTypeOperator,\n\t\ttsIndexedAccessType: tsIndexedAccessType,\n\t\ttSIndexedAccessType: tsIndexedAccessType,\n\t\ttsMappedType: tsMappedType,\n\t\ttSMappedType: tsMappedType,\n\t\ttsLiteralType: tsLiteralType,\n\t\ttSLiteralType: tsLiteralType,\n\t\ttsExpressionWithTypeArguments: tsExpressionWithTypeArguments,\n\t\ttSExpressionWithTypeArguments: tsExpressionWithTypeArguments,\n\t\ttsInterfaceDeclaration: tsInterfaceDeclaration,\n\t\ttSInterfaceDeclaration: tsInterfaceDeclaration,\n\t\ttsInterfaceBody: tsInterfaceBody,\n\t\ttSInterfaceBody: tsInterfaceBody,\n\t\ttsTypeAliasDeclaration: tsTypeAliasDeclaration,\n\t\ttSTypeAliasDeclaration: tsTypeAliasDeclaration,\n\t\ttsAsExpression: tsAsExpression,\n\t\ttSAsExpression: tsAsExpression,\n\t\ttsTypeAssertion: tsTypeAssertion,\n\t\ttSTypeAssertion: tsTypeAssertion,\n\t\ttsEnumDeclaration: tsEnumDeclaration,\n\t\ttSEnumDeclaration: tsEnumDeclaration,\n\t\ttsEnumMember: tsEnumMember,\n\t\ttSEnumMember: tsEnumMember,\n\t\ttsModuleDeclaration: tsModuleDeclaration,\n\t\ttSModuleDeclaration: tsModuleDeclaration,\n\t\ttsModuleBlock: tsModuleBlock,\n\t\ttSModuleBlock: tsModuleBlock,\n\t\ttsImportType: tsImportType,\n\t\ttSImportType: tsImportType,\n\t\ttsImportEqualsDeclaration: tsImportEqualsDeclaration,\n\t\ttSImportEqualsDeclaration: tsImportEqualsDeclaration,\n\t\ttsExternalModuleReference: tsExternalModuleReference,\n\t\ttSExternalModuleReference: tsExternalModuleReference,\n\t\ttsNonNullExpression: tsNonNullExpression,\n\t\ttSNonNullExpression: tsNonNullExpression,\n\t\ttsExportAssignment: tsExportAssignment,\n\t\ttSExportAssignment: tsExportAssignment,\n\t\ttsNamespaceExportDeclaration: tsNamespaceExportDeclaration,\n\t\ttSNamespaceExportDeclaration: tsNamespaceExportDeclaration,\n\t\ttsTypeAnnotation: tsTypeAnnotation,\n\t\ttSTypeAnnotation: tsTypeAnnotation,\n\t\ttsTypeParameterInstantiation: tsTypeParameterInstantiation,\n\t\ttSTypeParameterInstantiation: tsTypeParameterInstantiation,\n\t\ttsTypeParameterDeclaration: tsTypeParameterDeclaration,\n\t\ttSTypeParameterDeclaration: tsTypeParameterDeclaration,\n\t\ttsTypeParameter: tsTypeParameter,\n\t\ttSTypeParameter: tsTypeParameter,\n\t\tnumberLiteral: NumberLiteral,\n\t\tregexLiteral: RegexLiteral,\n\t\trestProperty: RestProperty$1,\n\t\tspreadProperty: SpreadProperty$1,\n\t\tArrayExpression: arrayExpression$2,\n\t\tAssignmentExpression: assignmentExpression$c,\n\t\tBinaryExpression: binaryExpression$4,\n\t\tInterpreterDirective: interpreterDirective$1,\n\t\tDirective: directive$1,\n\t\tDirectiveLiteral: directiveLiteral$1,\n\t\tBlockStatement: blockStatement$6,\n\t\tBreakStatement: breakStatement,\n\t\tCallExpression: callExpression$e,\n\t\tCatchClause: catchClause,\n\t\tConditionalExpression: conditionalExpression$3,\n\t\tContinueStatement: continueStatement,\n\t\tDebuggerStatement: debuggerStatement,\n\t\tDoWhileStatement: doWhileStatement,\n\t\tEmptyStatement: emptyStatement$1,\n\t\tExpressionStatement: expressionStatement$a,\n\t\tFile: file$1,\n\t\tForInStatement: forInStatement,\n\t\tForStatement: forStatement,\n\t\tFunctionDeclaration: functionDeclaration,\n\t\tFunctionExpression: functionExpression$3,\n\t\tIdentifier: identifier$j,\n\t\tIfStatement: ifStatement,\n\t\tLabeledStatement: labeledStatement,\n\t\tStringLiteral: stringLiteral$8,\n\t\tNumericLiteral: numericLiteral$8,\n\t\tNullLiteral: nullLiteral$2,\n\t\tBooleanLiteral: booleanLiteral$5,\n\t\tRegExpLiteral: regExpLiteral,\n\t\tLogicalExpression: logicalExpression$2,\n\t\tMemberExpression: memberExpression$b,\n\t\tNewExpression: newExpression,\n\t\tProgram: program$3,\n\t\tObjectExpression: objectExpression$4,\n\t\tObjectMethod: objectMethod,\n\t\tObjectProperty: objectProperty$2,\n\t\tRestElement: restElement$1,\n\t\tReturnStatement: returnStatement$3,\n\t\tSequenceExpression: sequenceExpression$7,\n\t\tParenthesizedExpression: parenthesizedExpression,\n\t\tSwitchCase: switchCase,\n\t\tSwitchStatement: switchStatement,\n\t\tThisExpression: thisExpression$3,\n\t\tThrowStatement: throwStatement,\n\t\tTryStatement: tryStatement,\n\t\tUnaryExpression: unaryExpression$7,\n\t\tUpdateExpression: updateExpression,\n\t\tVariableDeclaration: variableDeclaration$8,\n\t\tVariableDeclarator: variableDeclarator$8,\n\t\tWhileStatement: whileStatement,\n\t\tWithStatement: withStatement,\n\t\tAssignmentPattern: assignmentPattern,\n\t\tArrayPattern: arrayPattern,\n\t\tArrowFunctionExpression: arrowFunctionExpression$4,\n\t\tClassBody: classBody,\n\t\tClassExpression: classExpression,\n\t\tClassDeclaration: classDeclaration,\n\t\tExportAllDeclaration: exportAllDeclaration,\n\t\tExportDefaultDeclaration: exportDefaultDeclaration,\n\t\tExportNamedDeclaration: exportNamedDeclaration$2,\n\t\tExportSpecifier: exportSpecifier$2,\n\t\tForOfStatement: forOfStatement,\n\t\tImportDeclaration: importDeclaration$1,\n\t\tImportDefaultSpecifier: importDefaultSpecifier$1,\n\t\tImportNamespaceSpecifier: importNamespaceSpecifier$1,\n\t\tImportSpecifier: importSpecifier$1,\n\t\tMetaProperty: metaProperty$1,\n\t\tClassMethod: classMethod,\n\t\tObjectPattern: objectPattern,\n\t\tSpreadElement: spreadElement$2,\n\t\tSuper: _super$1,\n\t\tTaggedTemplateExpression: taggedTemplateExpression,\n\t\tTemplateElement: templateElement,\n\t\tTemplateLiteral: templateLiteral,\n\t\tYieldExpression: yieldExpression$2,\n\t\tAwaitExpression: awaitExpression$1,\n\t\tImport: _import,\n\t\tBigIntLiteral: bigIntLiteral,\n\t\tExportNamespaceSpecifier: exportNamespaceSpecifier,\n\t\tOptionalMemberExpression: optionalMemberExpression$2,\n\t\tOptionalCallExpression: optionalCallExpression$2,\n\t\tClassProperty: classProperty,\n\t\tClassPrivateProperty: classPrivateProperty,\n\t\tClassPrivateMethod: classPrivateMethod,\n\t\tPrivateName: privateName,\n\t\tAnyTypeAnnotation: anyTypeAnnotation$2,\n\t\tArrayTypeAnnotation: arrayTypeAnnotation$1,\n\t\tBooleanTypeAnnotation: booleanTypeAnnotation$1,\n\t\tBooleanLiteralTypeAnnotation: booleanLiteralTypeAnnotation,\n\t\tNullLiteralTypeAnnotation: nullLiteralTypeAnnotation$1,\n\t\tClassImplements: classImplements,\n\t\tDeclareClass: declareClass,\n\t\tDeclareFunction: declareFunction,\n\t\tDeclareInterface: declareInterface,\n\t\tDeclareModule: declareModule,\n\t\tDeclareModuleExports: declareModuleExports,\n\t\tDeclareTypeAlias: declareTypeAlias,\n\t\tDeclareOpaqueType: declareOpaqueType,\n\t\tDeclareVariable: declareVariable,\n\t\tDeclareExportDeclaration: declareExportDeclaration,\n\t\tDeclareExportAllDeclaration: declareExportAllDeclaration,\n\t\tDeclaredPredicate: declaredPredicate,\n\t\tExistsTypeAnnotation: existsTypeAnnotation,\n\t\tFunctionTypeAnnotation: functionTypeAnnotation,\n\t\tFunctionTypeParam: functionTypeParam,\n\t\tGenericTypeAnnotation: genericTypeAnnotation$1,\n\t\tInferredPredicate: inferredPredicate,\n\t\tInterfaceExtends: interfaceExtends,\n\t\tInterfaceDeclaration: interfaceDeclaration,\n\t\tInterfaceTypeAnnotation: interfaceTypeAnnotation,\n\t\tIntersectionTypeAnnotation: intersectionTypeAnnotation,\n\t\tMixedTypeAnnotation: mixedTypeAnnotation,\n\t\tEmptyTypeAnnotation: emptyTypeAnnotation,\n\t\tNullableTypeAnnotation: nullableTypeAnnotation,\n\t\tNumberLiteralTypeAnnotation: numberLiteralTypeAnnotation,\n\t\tNumberTypeAnnotation: numberTypeAnnotation$2,\n\t\tObjectTypeAnnotation: objectTypeAnnotation,\n\t\tObjectTypeInternalSlot: objectTypeInternalSlot,\n\t\tObjectTypeCallProperty: objectTypeCallProperty,\n\t\tObjectTypeIndexer: objectTypeIndexer,\n\t\tObjectTypeProperty: objectTypeProperty,\n\t\tObjectTypeSpreadProperty: objectTypeSpreadProperty,\n\t\tOpaqueType: opaqueType,\n\t\tQualifiedTypeIdentifier: qualifiedTypeIdentifier,\n\t\tStringLiteralTypeAnnotation: stringLiteralTypeAnnotation,\n\t\tStringTypeAnnotation: stringTypeAnnotation$2,\n\t\tSymbolTypeAnnotation: symbolTypeAnnotation,\n\t\tThisTypeAnnotation: thisTypeAnnotation,\n\t\tTupleTypeAnnotation: tupleTypeAnnotation$1,\n\t\tTypeofTypeAnnotation: typeofTypeAnnotation,\n\t\tTypeAlias: typeAlias,\n\t\tTypeAnnotation: typeAnnotation,\n\t\tTypeCastExpression: typeCastExpression,\n\t\tTypeParameter: typeParameter,\n\t\tTypeParameterDeclaration: typeParameterDeclaration,\n\t\tTypeParameterInstantiation: typeParameterInstantiation,\n\t\tUnionTypeAnnotation: unionTypeAnnotation$1,\n\t\tVariance: variance,\n\t\tVoidTypeAnnotation: voidTypeAnnotation$3,\n\t\tEnumDeclaration: enumDeclaration,\n\t\tEnumBooleanBody: enumBooleanBody,\n\t\tEnumNumberBody: enumNumberBody,\n\t\tEnumStringBody: enumStringBody,\n\t\tEnumSymbolBody: enumSymbolBody,\n\t\tEnumBooleanMember: enumBooleanMember,\n\t\tEnumNumberMember: enumNumberMember,\n\t\tEnumStringMember: enumStringMember,\n\t\tEnumDefaultedMember: enumDefaultedMember,\n\t\tIndexedAccessType: indexedAccessType,\n\t\tOptionalIndexedAccessType: optionalIndexedAccessType,\n\t\tJSXAttribute: jsxAttribute,\n\t\tJSXClosingElement: jsxClosingElement,\n\t\tJSXElement: jsxElement,\n\t\tJSXEmptyExpression: jsxEmptyExpression,\n\t\tJSXExpressionContainer: jsxExpressionContainer$1,\n\t\tJSXSpreadChild: jsxSpreadChild,\n\t\tJSXIdentifier: jsxIdentifier$2,\n\t\tJSXMemberExpression: jsxMemberExpression$1,\n\t\tJSXNamespacedName: jsxNamespacedName,\n\t\tJSXOpeningElement: jsxOpeningElement,\n\t\tJSXSpreadAttribute: jsxSpreadAttribute,\n\t\tJSXText: jsxText,\n\t\tJSXFragment: jsxFragment,\n\t\tJSXOpeningFragment: jsxOpeningFragment,\n\t\tJSXClosingFragment: jsxClosingFragment,\n\t\tNoop: noop$1,\n\t\tPlaceholder: placeholder,\n\t\tV8IntrinsicIdentifier: v8IntrinsicIdentifier,\n\t\tArgumentPlaceholder: argumentPlaceholder,\n\t\tBindExpression: bindExpression,\n\t\tImportAttribute: importAttribute,\n\t\tDecorator: decorator,\n\t\tDoExpression: doExpression,\n\t\tExportDefaultSpecifier: exportDefaultSpecifier,\n\t\tRecordExpression: recordExpression,\n\t\tTupleExpression: tupleExpression,\n\t\tDecimalLiteral: decimalLiteral,\n\t\tStaticBlock: staticBlock$1,\n\t\tModuleExpression: moduleExpression,\n\t\tTopicReference: topicReference,\n\t\tPipelineTopicExpression: pipelineTopicExpression,\n\t\tPipelineBareFunction: pipelineBareFunction,\n\t\tPipelinePrimaryTopicReference: pipelinePrimaryTopicReference,\n\t\tTSParameterProperty: tsParameterProperty,\n\t\tTSDeclareFunction: tsDeclareFunction,\n\t\tTSDeclareMethod: tsDeclareMethod,\n\t\tTSQualifiedName: tsQualifiedName,\n\t\tTSCallSignatureDeclaration: tsCallSignatureDeclaration,\n\t\tTSConstructSignatureDeclaration: tsConstructSignatureDeclaration,\n\t\tTSPropertySignature: tsPropertySignature,\n\t\tTSMethodSignature: tsMethodSignature,\n\t\tTSIndexSignature: tsIndexSignature,\n\t\tTSAnyKeyword: tsAnyKeyword,\n\t\tTSBooleanKeyword: tsBooleanKeyword,\n\t\tTSBigIntKeyword: tsBigIntKeyword,\n\t\tTSIntrinsicKeyword: tsIntrinsicKeyword,\n\t\tTSNeverKeyword: tsNeverKeyword,\n\t\tTSNullKeyword: tsNullKeyword,\n\t\tTSNumberKeyword: tsNumberKeyword,\n\t\tTSObjectKeyword: tsObjectKeyword,\n\t\tTSStringKeyword: tsStringKeyword,\n\t\tTSSymbolKeyword: tsSymbolKeyword,\n\t\tTSUndefinedKeyword: tsUndefinedKeyword,\n\t\tTSUnknownKeyword: tsUnknownKeyword,\n\t\tTSVoidKeyword: tsVoidKeyword,\n\t\tTSThisType: tsThisType,\n\t\tTSFunctionType: tsFunctionType,\n\t\tTSConstructorType: tsConstructorType,\n\t\tTSTypeReference: tsTypeReference,\n\t\tTSTypePredicate: tsTypePredicate,\n\t\tTSTypeQuery: tsTypeQuery,\n\t\tTSTypeLiteral: tsTypeLiteral,\n\t\tTSArrayType: tsArrayType,\n\t\tTSTupleType: tsTupleType,\n\t\tTSOptionalType: tsOptionalType,\n\t\tTSRestType: tsRestType,\n\t\tTSNamedTupleMember: tsNamedTupleMember,\n\t\tTSUnionType: tsUnionType,\n\t\tTSIntersectionType: tsIntersectionType,\n\t\tTSConditionalType: tsConditionalType,\n\t\tTSInferType: tsInferType,\n\t\tTSParenthesizedType: tsParenthesizedType,\n\t\tTSTypeOperator: tsTypeOperator,\n\t\tTSIndexedAccessType: tsIndexedAccessType,\n\t\tTSMappedType: tsMappedType,\n\t\tTSLiteralType: tsLiteralType,\n\t\tTSExpressionWithTypeArguments: tsExpressionWithTypeArguments,\n\t\tTSInterfaceDeclaration: tsInterfaceDeclaration,\n\t\tTSInterfaceBody: tsInterfaceBody,\n\t\tTSTypeAliasDeclaration: tsTypeAliasDeclaration,\n\t\tTSAsExpression: tsAsExpression,\n\t\tTSTypeAssertion: tsTypeAssertion,\n\t\tTSEnumDeclaration: tsEnumDeclaration,\n\t\tTSEnumMember: tsEnumMember,\n\t\tTSModuleDeclaration: tsModuleDeclaration,\n\t\tTSModuleBlock: tsModuleBlock,\n\t\tTSImportType: tsImportType,\n\t\tTSImportEqualsDeclaration: tsImportEqualsDeclaration,\n\t\tTSExternalModuleReference: tsExternalModuleReference,\n\t\tTSNonNullExpression: tsNonNullExpression,\n\t\tTSExportAssignment: tsExportAssignment,\n\t\tTSNamespaceExportDeclaration: tsNamespaceExportDeclaration,\n\t\tTSTypeAnnotation: tsTypeAnnotation,\n\t\tTSTypeParameterInstantiation: tsTypeParameterInstantiation,\n\t\tTSTypeParameterDeclaration: tsTypeParameterDeclaration,\n\t\tTSTypeParameter: tsTypeParameter,\n\t\tNumberLiteral: NumberLiteral,\n\t\tRegexLiteral: RegexLiteral,\n\t\tRestProperty: RestProperty$1,\n\t\tSpreadProperty: SpreadProperty$1,\n\t\tEXPRESSION_TYPES: EXPRESSION_TYPES,\n\t\tBINARY_TYPES: BINARY_TYPES,\n\t\tSCOPABLE_TYPES: SCOPABLE_TYPES,\n\t\tBLOCKPARENT_TYPES: BLOCKPARENT_TYPES,\n\t\tBLOCK_TYPES: BLOCK_TYPES,\n\t\tSTATEMENT_TYPES: STATEMENT_TYPES,\n\t\tTERMINATORLESS_TYPES: TERMINATORLESS_TYPES,\n\t\tCOMPLETIONSTATEMENT_TYPES: COMPLETIONSTATEMENT_TYPES,\n\t\tCONDITIONAL_TYPES: CONDITIONAL_TYPES,\n\t\tLOOP_TYPES: LOOP_TYPES,\n\t\tWHILE_TYPES: WHILE_TYPES,\n\t\tEXPRESSIONWRAPPER_TYPES: EXPRESSIONWRAPPER_TYPES,\n\t\tFOR_TYPES: FOR_TYPES,\n\t\tFORXSTATEMENT_TYPES: FORXSTATEMENT_TYPES,\n\t\tFUNCTION_TYPES: FUNCTION_TYPES$1,\n\t\tFUNCTIONPARENT_TYPES: FUNCTIONPARENT_TYPES,\n\t\tPUREISH_TYPES: PUREISH_TYPES,\n\t\tDECLARATION_TYPES: DECLARATION_TYPES,\n\t\tPATTERNLIKE_TYPES: PATTERNLIKE_TYPES,\n\t\tLVAL_TYPES: LVAL_TYPES,\n\t\tTSENTITYNAME_TYPES: TSENTITYNAME_TYPES,\n\t\tLITERAL_TYPES: LITERAL_TYPES,\n\t\tIMMUTABLE_TYPES: IMMUTABLE_TYPES,\n\t\tUSERWHITESPACABLE_TYPES: USERWHITESPACABLE_TYPES,\n\t\tMETHOD_TYPES: METHOD_TYPES,\n\t\tOBJECTMEMBER_TYPES: OBJECTMEMBER_TYPES,\n\t\tPROPERTY_TYPES: PROPERTY_TYPES,\n\t\tUNARYLIKE_TYPES: UNARYLIKE_TYPES,\n\t\tPATTERN_TYPES: PATTERN_TYPES,\n\t\tCLASS_TYPES: CLASS_TYPES,\n\t\tMODULEDECLARATION_TYPES: MODULEDECLARATION_TYPES,\n\t\tEXPORTDECLARATION_TYPES: EXPORTDECLARATION_TYPES,\n\t\tMODULESPECIFIER_TYPES: MODULESPECIFIER_TYPES,\n\t\tPRIVATE_TYPES: PRIVATE_TYPES,\n\t\tFLOW_TYPES: FLOW_TYPES,\n\t\tFLOWTYPE_TYPES: FLOWTYPE_TYPES,\n\t\tFLOWBASEANNOTATION_TYPES: FLOWBASEANNOTATION_TYPES,\n\t\tFLOWDECLARATION_TYPES: FLOWDECLARATION_TYPES,\n\t\tFLOWPREDICATE_TYPES: FLOWPREDICATE_TYPES,\n\t\tENUMBODY_TYPES: ENUMBODY_TYPES,\n\t\tENUMMEMBER_TYPES: ENUMMEMBER_TYPES,\n\t\tJSX_TYPES: JSX_TYPES,\n\t\tTSTYPEELEMENT_TYPES: TSTYPEELEMENT_TYPES,\n\t\tTSTYPE_TYPES: TSTYPE_TYPES,\n\t\tTSBASETYPE_TYPES: TSBASETYPE_TYPES,\n\t\tSTATEMENT_OR_BLOCK_KEYS: STATEMENT_OR_BLOCK_KEYS$1,\n\t\tFLATTENABLE_KEYS: FLATTENABLE_KEYS,\n\t\tFOR_INIT_KEYS: FOR_INIT_KEYS,\n\t\tCOMMENT_KEYS: COMMENT_KEYS,\n\t\tLOGICAL_OPERATORS: LOGICAL_OPERATORS$2,\n\t\tUPDATE_OPERATORS: UPDATE_OPERATORS,\n\t\tBOOLEAN_NUMBER_BINARY_OPERATORS: BOOLEAN_NUMBER_BINARY_OPERATORS$1,\n\t\tEQUALITY_BINARY_OPERATORS: EQUALITY_BINARY_OPERATORS,\n\t\tCOMPARISON_BINARY_OPERATORS: COMPARISON_BINARY_OPERATORS,\n\t\tBOOLEAN_BINARY_OPERATORS: BOOLEAN_BINARY_OPERATORS$1,\n\t\tNUMBER_BINARY_OPERATORS: NUMBER_BINARY_OPERATORS$1,\n\t\tBINARY_OPERATORS: BINARY_OPERATORS,\n\t\tASSIGNMENT_OPERATORS: ASSIGNMENT_OPERATORS,\n\t\tBOOLEAN_UNARY_OPERATORS: BOOLEAN_UNARY_OPERATORS$1,\n\t\tNUMBER_UNARY_OPERATORS: NUMBER_UNARY_OPERATORS$1,\n\t\tSTRING_UNARY_OPERATORS: STRING_UNARY_OPERATORS$1,\n\t\tUNARY_OPERATORS: UNARY_OPERATORS,\n\t\tINHERIT_KEYS: INHERIT_KEYS,\n\t\tBLOCK_SCOPED_SYMBOL: BLOCK_SCOPED_SYMBOL,\n\t\tNOT_LOCAL_BINDING: NOT_LOCAL_BINDING$2,\n\t\tVISITOR_KEYS: VISITOR_KEYS$6,\n\t\tALIAS_KEYS: ALIAS_KEYS,\n\t\tFLIPPED_ALIAS_KEYS: FLIPPED_ALIAS_KEYS$3,\n\t\tNODE_FIELDS: NODE_FIELDS,\n\t\tBUILDER_KEYS: BUILDER_KEYS,\n\t\tDEPRECATED_KEYS: DEPRECATED_KEYS$1,\n\t\tNODE_PARENT_VALIDATIONS: NODE_PARENT_VALIDATIONS,\n\t\tPLACEHOLDERS: PLACEHOLDERS,\n\t\tPLACEHOLDERS_ALIAS: PLACEHOLDERS_ALIAS,\n\t\tPLACEHOLDERS_FLIPPED_ALIAS: PLACEHOLDERS_FLIPPED_ALIAS,\n\t\tTYPES: TYPES$1,\n\t\tisArrayExpression: isArrayExpression$2,\n\t\tisAssignmentExpression: isAssignmentExpression$3,\n\t\tisBinaryExpression: isBinaryExpression$1,\n\t\tisInterpreterDirective: isInterpreterDirective,\n\t\tisDirective: isDirective,\n\t\tisDirectiveLiteral: isDirectiveLiteral,\n\t\tisBlockStatement: isBlockStatement$2,\n\t\tisBreakStatement: isBreakStatement,\n\t\tisCallExpression: isCallExpression$6,\n\t\tisCatchClause: isCatchClause,\n\t\tisConditionalExpression: isConditionalExpression$1,\n\t\tisContinueStatement: isContinueStatement,\n\t\tisDebuggerStatement: isDebuggerStatement,\n\t\tisDoWhileStatement: isDoWhileStatement,\n\t\tisEmptyStatement: isEmptyStatement$1,\n\t\tisExpressionStatement: isExpressionStatement$4,\n\t\tisFile: isFile$1,\n\t\tisForInStatement: isForInStatement$1,\n\t\tisForStatement: isForStatement$3,\n\t\tisFunctionDeclaration: isFunctionDeclaration$1,\n\t\tisFunctionExpression: isFunctionExpression$1,\n\t\tisIdentifier: isIdentifier$g,\n\t\tisIfStatement: isIfStatement$2,\n\t\tisLabeledStatement: isLabeledStatement,\n\t\tisStringLiteral: isStringLiteral$7,\n\t\tisNumericLiteral: isNumericLiteral,\n\t\tisNullLiteral: isNullLiteral$1,\n\t\tisBooleanLiteral: isBooleanLiteral,\n\t\tisRegExpLiteral: isRegExpLiteral$1,\n\t\tisLogicalExpression: isLogicalExpression$1,\n\t\tisMemberExpression: isMemberExpression$8,\n\t\tisNewExpression: isNewExpression$4,\n\t\tisProgram: isProgram$2,\n\t\tisObjectExpression: isObjectExpression$3,\n\t\tisObjectMethod: isObjectMethod$2,\n\t\tisObjectProperty: isObjectProperty$2,\n\t\tisRestElement: isRestElement$2,\n\t\tisReturnStatement: isReturnStatement$1,\n\t\tisSequenceExpression: isSequenceExpression$1,\n\t\tisParenthesizedExpression: isParenthesizedExpression$1,\n\t\tisSwitchCase: isSwitchCase,\n\t\tisSwitchStatement: isSwitchStatement$1,\n\t\tisThisExpression: isThisExpression$2,\n\t\tisThrowStatement: isThrowStatement$1,\n\t\tisTryStatement: isTryStatement,\n\t\tisUnaryExpression: isUnaryExpression$1,\n\t\tisUpdateExpression: isUpdateExpression$1,\n\t\tisVariableDeclaration: isVariableDeclaration$3,\n\t\tisVariableDeclarator: isVariableDeclarator$2,\n\t\tisWhileStatement: isWhileStatement$1,\n\t\tisWithStatement: isWithStatement,\n\t\tisAssignmentPattern: isAssignmentPattern$3,\n\t\tisArrayPattern: isArrayPattern,\n\t\tisArrowFunctionExpression: isArrowFunctionExpression$1,\n\t\tisClassBody: isClassBody$1,\n\t\tisClassExpression: isClassExpression$1,\n\t\tisClassDeclaration: isClassDeclaration$3,\n\t\tisExportAllDeclaration: isExportAllDeclaration$1,\n\t\tisExportDefaultDeclaration: isExportDefaultDeclaration$3,\n\t\tisExportNamedDeclaration: isExportNamedDeclaration$2,\n\t\tisExportSpecifier: isExportSpecifier,\n\t\tisForOfStatement: isForOfStatement$1,\n\t\tisImportDeclaration: isImportDeclaration$2,\n\t\tisImportDefaultSpecifier: isImportDefaultSpecifier$1,\n\t\tisImportNamespaceSpecifier: isImportNamespaceSpecifier$1,\n\t\tisImportSpecifier: isImportSpecifier$1,\n\t\tisMetaProperty: isMetaProperty,\n\t\tisClassMethod: isClassMethod$1,\n\t\tisObjectPattern: isObjectPattern$1,\n\t\tisSpreadElement: isSpreadElement$1,\n\t\tisSuper: isSuper$2,\n\t\tisTaggedTemplateExpression: isTaggedTemplateExpression$2,\n\t\tisTemplateElement: isTemplateElement,\n\t\tisTemplateLiteral: isTemplateLiteral$2,\n\t\tisYieldExpression: isYieldExpression$1,\n\t\tisAwaitExpression: isAwaitExpression$1,\n\t\tisImport: isImport,\n\t\tisBigIntLiteral: isBigIntLiteral,\n\t\tisExportNamespaceSpecifier: isExportNamespaceSpecifier$1,\n\t\tisOptionalMemberExpression: isOptionalMemberExpression$3,\n\t\tisOptionalCallExpression: isOptionalCallExpression$3,\n\t\tisClassProperty: isClassProperty,\n\t\tisClassPrivateProperty: isClassPrivateProperty,\n\t\tisClassPrivateMethod: isClassPrivateMethod,\n\t\tisPrivateName: isPrivateName$1,\n\t\tisAnyTypeAnnotation: isAnyTypeAnnotation$1,\n\t\tisArrayTypeAnnotation: isArrayTypeAnnotation$1,\n\t\tisBooleanTypeAnnotation: isBooleanTypeAnnotation$1,\n\t\tisBooleanLiteralTypeAnnotation: isBooleanLiteralTypeAnnotation,\n\t\tisNullLiteralTypeAnnotation: isNullLiteralTypeAnnotation,\n\t\tisClassImplements: isClassImplements,\n\t\tisDeclareClass: isDeclareClass,\n\t\tisDeclareFunction: isDeclareFunction,\n\t\tisDeclareInterface: isDeclareInterface,\n\t\tisDeclareModule: isDeclareModule,\n\t\tisDeclareModuleExports: isDeclareModuleExports,\n\t\tisDeclareTypeAlias: isDeclareTypeAlias,\n\t\tisDeclareOpaqueType: isDeclareOpaqueType,\n\t\tisDeclareVariable: isDeclareVariable,\n\t\tisDeclareExportDeclaration: isDeclareExportDeclaration$1,\n\t\tisDeclareExportAllDeclaration: isDeclareExportAllDeclaration,\n\t\tisDeclaredPredicate: isDeclaredPredicate,\n\t\tisExistsTypeAnnotation: isExistsTypeAnnotation,\n\t\tisFunctionTypeAnnotation: isFunctionTypeAnnotation,\n\t\tisFunctionTypeParam: isFunctionTypeParam,\n\t\tisGenericTypeAnnotation: isGenericTypeAnnotation$1,\n\t\tisInferredPredicate: isInferredPredicate,\n\t\tisInterfaceExtends: isInterfaceExtends,\n\t\tisInterfaceDeclaration: isInterfaceDeclaration,\n\t\tisInterfaceTypeAnnotation: isInterfaceTypeAnnotation,\n\t\tisIntersectionTypeAnnotation: isIntersectionTypeAnnotation$1,\n\t\tisMixedTypeAnnotation: isMixedTypeAnnotation$1,\n\t\tisEmptyTypeAnnotation: isEmptyTypeAnnotation$1,\n\t\tisNullableTypeAnnotation: isNullableTypeAnnotation$1,\n\t\tisNumberLiteralTypeAnnotation: isNumberLiteralTypeAnnotation,\n\t\tisNumberTypeAnnotation: isNumberTypeAnnotation$1,\n\t\tisObjectTypeAnnotation: isObjectTypeAnnotation,\n\t\tisObjectTypeInternalSlot: isObjectTypeInternalSlot,\n\t\tisObjectTypeCallProperty: isObjectTypeCallProperty,\n\t\tisObjectTypeIndexer: isObjectTypeIndexer,\n\t\tisObjectTypeProperty: isObjectTypeProperty,\n\t\tisObjectTypeSpreadProperty: isObjectTypeSpreadProperty,\n\t\tisOpaqueType: isOpaqueType,\n\t\tisQualifiedTypeIdentifier: isQualifiedTypeIdentifier,\n\t\tisStringLiteralTypeAnnotation: isStringLiteralTypeAnnotation,\n\t\tisStringTypeAnnotation: isStringTypeAnnotation$1,\n\t\tisSymbolTypeAnnotation: isSymbolTypeAnnotation,\n\t\tisThisTypeAnnotation: isThisTypeAnnotation,\n\t\tisTupleTypeAnnotation: isTupleTypeAnnotation,\n\t\tisTypeofTypeAnnotation: isTypeofTypeAnnotation,\n\t\tisTypeAlias: isTypeAlias,\n\t\tisTypeAnnotation: isTypeAnnotation$2,\n\t\tisTypeCastExpression: isTypeCastExpression$1,\n\t\tisTypeParameter: isTypeParameter,\n\t\tisTypeParameterDeclaration: isTypeParameterDeclaration,\n\t\tisTypeParameterInstantiation: isTypeParameterInstantiation,\n\t\tisUnionTypeAnnotation: isUnionTypeAnnotation$2,\n\t\tisVariance: isVariance,\n\t\tisVoidTypeAnnotation: isVoidTypeAnnotation$1,\n\t\tisEnumDeclaration: isEnumDeclaration,\n\t\tisEnumBooleanBody: isEnumBooleanBody,\n\t\tisEnumNumberBody: isEnumNumberBody,\n\t\tisEnumStringBody: isEnumStringBody,\n\t\tisEnumSymbolBody: isEnumSymbolBody,\n\t\tisEnumBooleanMember: isEnumBooleanMember,\n\t\tisEnumNumberMember: isEnumNumberMember,\n\t\tisEnumStringMember: isEnumStringMember,\n\t\tisEnumDefaultedMember: isEnumDefaultedMember,\n\t\tisIndexedAccessType: isIndexedAccessType$1,\n\t\tisOptionalIndexedAccessType: isOptionalIndexedAccessType,\n\t\tisJSXAttribute: isJSXAttribute,\n\t\tisJSXClosingElement: isJSXClosingElement,\n\t\tisJSXElement: isJSXElement,\n\t\tisJSXEmptyExpression: isJSXEmptyExpression,\n\t\tisJSXExpressionContainer: isJSXExpressionContainer$1,\n\t\tisJSXSpreadChild: isJSXSpreadChild,\n\t\tisJSXIdentifier: isJSXIdentifier$3,\n\t\tisJSXMemberExpression: isJSXMemberExpression$2,\n\t\tisJSXNamespacedName: isJSXNamespacedName$1,\n\t\tisJSXOpeningElement: isJSXOpeningElement,\n\t\tisJSXSpreadAttribute: isJSXSpreadAttribute$1,\n\t\tisJSXText: isJSXText,\n\t\tisJSXFragment: isJSXFragment,\n\t\tisJSXOpeningFragment: isJSXOpeningFragment,\n\t\tisJSXClosingFragment: isJSXClosingFragment,\n\t\tisNoop: isNoop,\n\t\tisPlaceholder: isPlaceholder$1,\n\t\tisV8IntrinsicIdentifier: isV8IntrinsicIdentifier,\n\t\tisArgumentPlaceholder: isArgumentPlaceholder,\n\t\tisBindExpression: isBindExpression,\n\t\tisImportAttribute: isImportAttribute,\n\t\tisDecorator: isDecorator,\n\t\tisDoExpression: isDoExpression,\n\t\tisExportDefaultSpecifier: isExportDefaultSpecifier$1,\n\t\tisRecordExpression: isRecordExpression,\n\t\tisTupleExpression: isTupleExpression,\n\t\tisDecimalLiteral: isDecimalLiteral,\n\t\tisStaticBlock: isStaticBlock,\n\t\tisModuleExpression: isModuleExpression,\n\t\tisTopicReference: isTopicReference,\n\t\tisPipelineTopicExpression: isPipelineTopicExpression,\n\t\tisPipelineBareFunction: isPipelineBareFunction,\n\t\tisPipelinePrimaryTopicReference: isPipelinePrimaryTopicReference,\n\t\tisTSParameterProperty: isTSParameterProperty,\n\t\tisTSDeclareFunction: isTSDeclareFunction,\n\t\tisTSDeclareMethod: isTSDeclareMethod,\n\t\tisTSQualifiedName: isTSQualifiedName,\n\t\tisTSCallSignatureDeclaration: isTSCallSignatureDeclaration,\n\t\tisTSConstructSignatureDeclaration: isTSConstructSignatureDeclaration,\n\t\tisTSPropertySignature: isTSPropertySignature,\n\t\tisTSMethodSignature: isTSMethodSignature,\n\t\tisTSIndexSignature: isTSIndexSignature,\n\t\tisTSAnyKeyword: isTSAnyKeyword,\n\t\tisTSBooleanKeyword: isTSBooleanKeyword,\n\t\tisTSBigIntKeyword: isTSBigIntKeyword,\n\t\tisTSIntrinsicKeyword: isTSIntrinsicKeyword,\n\t\tisTSNeverKeyword: isTSNeverKeyword,\n\t\tisTSNullKeyword: isTSNullKeyword,\n\t\tisTSNumberKeyword: isTSNumberKeyword,\n\t\tisTSObjectKeyword: isTSObjectKeyword,\n\t\tisTSStringKeyword: isTSStringKeyword,\n\t\tisTSSymbolKeyword: isTSSymbolKeyword,\n\t\tisTSUndefinedKeyword: isTSUndefinedKeyword,\n\t\tisTSUnknownKeyword: isTSUnknownKeyword,\n\t\tisTSVoidKeyword: isTSVoidKeyword,\n\t\tisTSThisType: isTSThisType,\n\t\tisTSFunctionType: isTSFunctionType,\n\t\tisTSConstructorType: isTSConstructorType,\n\t\tisTSTypeReference: isTSTypeReference,\n\t\tisTSTypePredicate: isTSTypePredicate,\n\t\tisTSTypeQuery: isTSTypeQuery,\n\t\tisTSTypeLiteral: isTSTypeLiteral,\n\t\tisTSArrayType: isTSArrayType$1,\n\t\tisTSTupleType: isTSTupleType,\n\t\tisTSOptionalType: isTSOptionalType$1,\n\t\tisTSRestType: isTSRestType$1,\n\t\tisTSNamedTupleMember: isTSNamedTupleMember,\n\t\tisTSUnionType: isTSUnionType$1,\n\t\tisTSIntersectionType: isTSIntersectionType$1,\n\t\tisTSConditionalType: isTSConditionalType,\n\t\tisTSInferType: isTSInferType,\n\t\tisTSParenthesizedType: isTSParenthesizedType,\n\t\tisTSTypeOperator: isTSTypeOperator,\n\t\tisTSIndexedAccessType: isTSIndexedAccessType,\n\t\tisTSMappedType: isTSMappedType,\n\t\tisTSLiteralType: isTSLiteralType,\n\t\tisTSExpressionWithTypeArguments: isTSExpressionWithTypeArguments,\n\t\tisTSInterfaceDeclaration: isTSInterfaceDeclaration,\n\t\tisTSInterfaceBody: isTSInterfaceBody,\n\t\tisTSTypeAliasDeclaration: isTSTypeAliasDeclaration,\n\t\tisTSAsExpression: isTSAsExpression$2,\n\t\tisTSTypeAssertion: isTSTypeAssertion$2,\n\t\tisTSEnumDeclaration: isTSEnumDeclaration,\n\t\tisTSEnumMember: isTSEnumMember,\n\t\tisTSModuleDeclaration: isTSModuleDeclaration,\n\t\tisTSModuleBlock: isTSModuleBlock,\n\t\tisTSImportType: isTSImportType,\n\t\tisTSImportEqualsDeclaration: isTSImportEqualsDeclaration,\n\t\tisTSExternalModuleReference: isTSExternalModuleReference,\n\t\tisTSNonNullExpression: isTSNonNullExpression$2,\n\t\tisTSExportAssignment: isTSExportAssignment,\n\t\tisTSNamespaceExportDeclaration: isTSNamespaceExportDeclaration,\n\t\tisTSTypeAnnotation: isTSTypeAnnotation$2,\n\t\tisTSTypeParameterInstantiation: isTSTypeParameterInstantiation,\n\t\tisTSTypeParameterDeclaration: isTSTypeParameterDeclaration,\n\t\tisTSTypeParameter: isTSTypeParameter,\n\t\tisExpression: isExpression$4,\n\t\tisBinary: isBinary$3,\n\t\tisScopable: isScopable,\n\t\tisBlockParent: isBlockParent,\n\t\tisBlock: isBlock,\n\t\tisStatement: isStatement$7,\n\t\tisTerminatorless: isTerminatorless,\n\t\tisCompletionStatement: isCompletionStatement,\n\t\tisConditional: isConditional$1,\n\t\tisLoop: isLoop$1,\n\t\tisWhile: isWhile,\n\t\tisExpressionWrapper: isExpressionWrapper,\n\t\tisFor: isFor$2,\n\t\tisForXStatement: isForXStatement$1,\n\t\tisFunction: isFunction$4,\n\t\tisFunctionParent: isFunctionParent,\n\t\tisPureish: isPureish$2,\n\t\tisDeclaration: isDeclaration$1,\n\t\tisPatternLike: isPatternLike,\n\t\tisLVal: isLVal,\n\t\tisTSEntityName: isTSEntityName,\n\t\tisLiteral: isLiteral$7,\n\t\tisUserWhitespacable: isUserWhitespacable,\n\t\tisMethod: isMethod$1,\n\t\tisObjectMember: isObjectMember,\n\t\tisProperty: isProperty$2,\n\t\tisUnaryLike: isUnaryLike$1,\n\t\tisPattern: isPattern,\n\t\tisClass: isClass$1,\n\t\tisModuleDeclaration: isModuleDeclaration$1,\n\t\tisExportDeclaration: isExportDeclaration$2,\n\t\tisModuleSpecifier: isModuleSpecifier$1,\n\t\tisPrivate: isPrivate,\n\t\tisFlow: isFlow$1,\n\t\tisFlowType: isFlowType,\n\t\tisFlowBaseAnnotation: isFlowBaseAnnotation$1,\n\t\tisFlowDeclaration: isFlowDeclaration,\n\t\tisFlowPredicate: isFlowPredicate,\n\t\tisEnumBody: isEnumBody,\n\t\tisEnumMember: isEnumMember,\n\t\tisJSX: isJSX,\n\t\tisTSTypeElement: isTSTypeElement,\n\t\tisTSType: isTSType,\n\t\tisTSBaseType: isTSBaseType,\n\t\tisNumberLiteral: isNumberLiteral,\n\t\tisRegexLiteral: isRegexLiteral,\n\t\tisRestProperty: isRestProperty,\n\t\tisSpreadProperty: isSpreadProperty\n\t});\n\n\tvar isBinding = isBinding$1,\n\t isBlockScoped$1 = isBlockScoped$2,\n\t isExportDeclaration$1 = isExportDeclaration$2,\n\t isExpression$3 = isExpression$4,\n\t isFlow = isFlow$1,\n\t isForStatement$2 = isForStatement$3,\n\t isForXStatement = isForXStatement$1,\n\t isIdentifier$f = isIdentifier$g,\n\t isImportDeclaration$1 = isImportDeclaration$2,\n\t isImportSpecifier = isImportSpecifier$1,\n\t isJSXIdentifier$2 = isJSXIdentifier$3,\n\t isJSXMemberExpression$1 = isJSXMemberExpression$2,\n\t isMemberExpression$7 = isMemberExpression$8,\n\t isReferenced$1 = isReferenced$2,\n\t isScope = isScope$1,\n\t isStatement$6 = isStatement$7,\n\t isVar$1 = isVar$2,\n\t isVariableDeclaration$2 = isVariableDeclaration$3,\n\t react$2 = react$3;\n\tvar isCompatTag = react$2.isCompatTag;\n\tvar ReferencedIdentifier = {\n\t types: [\"Identifier\", \"JSXIdentifier\"],\n\t checkPath: function checkPath(path, opts) {\n\t var node = path.node,\n\t parent = path.parent;\n\n\t if (!isIdentifier$f(node, opts) && !isJSXMemberExpression$1(parent, opts)) {\n\t if (isJSXIdentifier$2(node, opts)) {\n\t if (isCompatTag(node.name)) return false;\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return isReferenced$1(node, parent, path.parentPath.parent);\n\t }\n\t};\n\tvar ReferencedMemberExpression = {\n\t types: [\"MemberExpression\"],\n\t checkPath: function checkPath(_ref) {\n\t var node = _ref.node,\n\t parent = _ref.parent;\n\t return isMemberExpression$7(node) && isReferenced$1(node, parent);\n\t }\n\t};\n\tvar BindingIdentifier = {\n\t types: [\"Identifier\"],\n\t checkPath: function checkPath(path) {\n\t var node = path.node,\n\t parent = path.parent;\n\t var grandparent = path.parentPath.parent;\n\t return isIdentifier$f(node) && isBinding(node, parent, grandparent);\n\t }\n\t};\n\tvar Statement = {\n\t types: [\"Statement\"],\n\t checkPath: function checkPath(_ref2) {\n\t var node = _ref2.node,\n\t parent = _ref2.parent;\n\n\t if (isStatement$6(node)) {\n\t if (isVariableDeclaration$2(node)) {\n\t if (isForXStatement(parent, {\n\t left: node\n\t })) return false;\n\t if (isForStatement$2(parent, {\n\t init: node\n\t })) return false;\n\t }\n\n\t return true;\n\t } else {\n\t return false;\n\t }\n\t }\n\t};\n\tvar Expression = {\n\t types: [\"Expression\"],\n\t checkPath: function checkPath(path) {\n\t if (path.isIdentifier()) {\n\t return path.isReferencedIdentifier();\n\t } else {\n\t return isExpression$3(path.node);\n\t }\n\t }\n\t};\n\tvar Scope$2 = {\n\t types: [\"Scopable\", \"Pattern\"],\n\t checkPath: function checkPath(path) {\n\t return isScope(path.node, path.parent);\n\t }\n\t};\n\tvar Referenced = {\n\t checkPath: function checkPath(path) {\n\t return isReferenced$1(path.node, path.parent);\n\t }\n\t};\n\tvar BlockScoped = {\n\t checkPath: function checkPath(path) {\n\t return isBlockScoped$1(path.node);\n\t }\n\t};\n\tvar Var = {\n\t types: [\"VariableDeclaration\"],\n\t checkPath: function checkPath(path) {\n\t return isVar$1(path.node);\n\t }\n\t};\n\tvar User = {\n\t checkPath: function checkPath(path) {\n\t return path.node && !!path.node.loc;\n\t }\n\t};\n\tvar Generated = {\n\t checkPath: function checkPath(path) {\n\t return !path.isUser();\n\t }\n\t};\n\tvar Pure = {\n\t checkPath: function checkPath(path, opts) {\n\t return path.scope.isPure(path.node, opts);\n\t }\n\t};\n\tvar Flow = {\n\t types: [\"Flow\", \"ImportDeclaration\", \"ExportDeclaration\", \"ImportSpecifier\"],\n\t checkPath: function checkPath(_ref3) {\n\t var node = _ref3.node;\n\n\t if (isFlow(node)) {\n\t return true;\n\t } else if (isImportDeclaration$1(node)) {\n\t return node.importKind === \"type\" || node.importKind === \"typeof\";\n\t } else if (isExportDeclaration$1(node)) {\n\t return node.exportKind === \"type\";\n\t } else if (isImportSpecifier(node)) {\n\t return node.importKind === \"type\" || node.importKind === \"typeof\";\n\t } else {\n\t return false;\n\t }\n\t }\n\t};\n\tvar RestProperty = {\n\t types: [\"RestElement\"],\n\t checkPath: function checkPath(path) {\n\t return path.parentPath && path.parentPath.isObjectPattern();\n\t }\n\t};\n\tvar SpreadProperty = {\n\t types: [\"RestElement\"],\n\t checkPath: function checkPath(path) {\n\t return path.parentPath && path.parentPath.isObjectExpression();\n\t }\n\t};\n\tvar ExistentialTypeParam = {\n\t types: [\"ExistsTypeAnnotation\"]\n\t};\n\tvar NumericLiteralTypeAnnotation = {\n\t types: [\"NumberLiteralTypeAnnotation\"]\n\t};\n\tvar ForAwaitStatement = {\n\t types: [\"ForOfStatement\"],\n\t checkPath: function checkPath(_ref4) {\n\t var node = _ref4.node;\n\t return node[\"await\"] === true;\n\t }\n\t};\n\n\tvar virtualTypes = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tReferencedIdentifier: ReferencedIdentifier,\n\t\tReferencedMemberExpression: ReferencedMemberExpression,\n\t\tBindingIdentifier: BindingIdentifier,\n\t\tStatement: Statement,\n\t\tExpression: Expression,\n\t\tScope: Scope$2,\n\t\tReferenced: Referenced,\n\t\tBlockScoped: BlockScoped,\n\t\tVar: Var,\n\t\tUser: User,\n\t\tGenerated: Generated,\n\t\tPure: Pure,\n\t\tFlow: Flow,\n\t\tRestProperty: RestProperty,\n\t\tSpreadProperty: SpreadProperty,\n\t\tExistentialTypeParam: ExistentialTypeParam,\n\t\tNumericLiteralTypeAnnotation: NumericLiteralTypeAnnotation,\n\t\tForAwaitStatement: ForAwaitStatement\n\t});\n\n\tvar s = 1000;\n\tvar m$1 = s * 60;\n\tvar h = m$1 * 60;\n\tvar d = h * 24;\n\tvar w = d * 7;\n\tvar y = d * 365.25;\n\n\tvar ms = function ms(val, options) {\n\t options = options || {};\n\t var type = typeof val;\n\n\t if (type === 'string' && val.length > 0) {\n\t return parse$6(val);\n\t } else if (type === 'number' && isFinite(val)) {\n\t return options[\"long\"] ? fmtLong(val) : fmtShort(val);\n\t }\n\n\t throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));\n\t};\n\n\tfunction parse$6(str) {\n\t str = String(str);\n\n\t if (str.length > 100) {\n\t return;\n\t }\n\n\t var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);\n\n\t if (!match) {\n\t return;\n\t }\n\n\t var n = parseFloat(match[1]);\n\t var type = (match[2] || 'ms').toLowerCase();\n\n\t switch (type) {\n\t case 'years':\n\t case 'year':\n\t case 'yrs':\n\t case 'yr':\n\t case 'y':\n\t return n * y;\n\n\t case 'weeks':\n\t case 'week':\n\t case 'w':\n\t return n * w;\n\n\t case 'days':\n\t case 'day':\n\t case 'd':\n\t return n * d;\n\n\t case 'hours':\n\t case 'hour':\n\t case 'hrs':\n\t case 'hr':\n\t case 'h':\n\t return n * h;\n\n\t case 'minutes':\n\t case 'minute':\n\t case 'mins':\n\t case 'min':\n\t case 'm':\n\t return n * m$1;\n\n\t case 'seconds':\n\t case 'second':\n\t case 'secs':\n\t case 'sec':\n\t case 's':\n\t return n * s;\n\n\t case 'milliseconds':\n\t case 'millisecond':\n\t case 'msecs':\n\t case 'msec':\n\t case 'ms':\n\t return n;\n\n\t default:\n\t return undefined;\n\t }\n\t}\n\n\tfunction fmtShort(ms) {\n\t var msAbs = Math.abs(ms);\n\n\t if (msAbs >= d) {\n\t return Math.round(ms / d) + 'd';\n\t }\n\n\t if (msAbs >= h) {\n\t return Math.round(ms / h) + 'h';\n\t }\n\n\t if (msAbs >= m$1) {\n\t return Math.round(ms / m$1) + 'm';\n\t }\n\n\t if (msAbs >= s) {\n\t return Math.round(ms / s) + 's';\n\t }\n\n\t return ms + 'ms';\n\t}\n\n\tfunction fmtLong(ms) {\n\t var msAbs = Math.abs(ms);\n\n\t if (msAbs >= d) {\n\t return plural(ms, msAbs, d, 'day');\n\t }\n\n\t if (msAbs >= h) {\n\t return plural(ms, msAbs, h, 'hour');\n\t }\n\n\t if (msAbs >= m$1) {\n\t return plural(ms, msAbs, m$1, 'minute');\n\t }\n\n\t if (msAbs >= s) {\n\t return plural(ms, msAbs, s, 'second');\n\t }\n\n\t return ms + ' ms';\n\t}\n\n\tfunction plural(ms, msAbs, n, name) {\n\t var isPlural = msAbs >= n * 1.5;\n\t return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n\t}\n\n\tfunction setup$1(env) {\n\t createDebug.debug = createDebug;\n\t createDebug[\"default\"] = createDebug;\n\t createDebug.coerce = coerce;\n\t createDebug.disable = disable;\n\t createDebug.enable = enable;\n\t createDebug.enabled = enabled;\n\t createDebug.humanize = ms;\n\t createDebug.destroy = destroy;\n\t Object.keys(env).forEach(function (key) {\n\t createDebug[key] = env[key];\n\t });\n\t createDebug.names = [];\n\t createDebug.skips = [];\n\t createDebug.formatters = {};\n\n\t function selectColor(namespace) {\n\t var hash = 0;\n\n\t for (var i = 0; i < namespace.length; i++) {\n\t hash = (hash << 5) - hash + namespace.charCodeAt(i);\n\t hash |= 0;\n\t }\n\n\t return createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t }\n\n\t createDebug.selectColor = selectColor;\n\n\t function createDebug(namespace) {\n\t var prevTime;\n\t var enableOverride = null;\n\t var namespacesCache;\n\t var enabledCache;\n\n\t function debug() {\n\t for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\n\t if (!debug.enabled) {\n\t return;\n\t }\n\n\t var self = debug;\n\t var curr = Number(new Date());\n\t var ms = curr - (prevTime || curr);\n\t self.diff = ms;\n\t self.prev = prevTime;\n\t self.curr = curr;\n\t prevTime = curr;\n\t args[0] = createDebug.coerce(args[0]);\n\n\t if (typeof args[0] !== 'string') {\n\t args.unshift('%O');\n\t }\n\n\t var index = 0;\n\t args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {\n\t if (match === '%%') {\n\t return '%';\n\t }\n\n\t index++;\n\t var formatter = createDebug.formatters[format];\n\n\t if (typeof formatter === 'function') {\n\t var val = args[index];\n\t match = formatter.call(self, val);\n\t args.splice(index, 1);\n\t index--;\n\t }\n\n\t return match;\n\t });\n\t createDebug.formatArgs.call(self, args);\n\t var logFn = self.log || createDebug.log;\n\t logFn.apply(self, args);\n\t }\n\n\t debug.namespace = namespace;\n\t debug.useColors = createDebug.useColors();\n\t debug.color = createDebug.selectColor(namespace);\n\t debug.extend = extend;\n\t debug.destroy = createDebug.destroy;\n\t Object.defineProperty(debug, 'enabled', {\n\t enumerable: true,\n\t configurable: false,\n\t get: function get() {\n\t if (enableOverride !== null) {\n\t return enableOverride;\n\t }\n\n\t if (namespacesCache !== createDebug.namespaces) {\n\t namespacesCache = createDebug.namespaces;\n\t enabledCache = createDebug.enabled(namespace);\n\t }\n\n\t return enabledCache;\n\t },\n\t set: function set(v) {\n\t enableOverride = v;\n\t }\n\t });\n\n\t if (typeof createDebug.init === 'function') {\n\t createDebug.init(debug);\n\t }\n\n\t return debug;\n\t }\n\n\t function extend(namespace, delimiter) {\n\t var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t newDebug.log = this.log;\n\t return newDebug;\n\t }\n\n\t function enable(namespaces) {\n\t createDebug.save(namespaces);\n\t createDebug.namespaces = namespaces;\n\t createDebug.names = [];\n\t createDebug.skips = [];\n\t var i;\n\t var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t var len = split.length;\n\n\t for (i = 0; i < len; i++) {\n\t if (!split[i]) {\n\t continue;\n\t }\n\n\t namespaces = split[i].replace(/\\*/g, '.*?');\n\n\t if (namespaces[0] === '-') {\n\t createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));\n\t } else {\n\t createDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t }\n\t }\n\t }\n\n\t function disable() {\n\t var namespaces = [].concat(_toConsumableArray(createDebug.names.map(toNamespace)), _toConsumableArray(createDebug.skips.map(toNamespace).map(function (namespace) {\n\t return '-' + namespace;\n\t }))).join(',');\n\t createDebug.enable('');\n\t return namespaces;\n\t }\n\n\t function enabled(name) {\n\t if (name[name.length - 1] === '*') {\n\t return true;\n\t }\n\n\t var i;\n\t var len;\n\n\t for (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t if (createDebug.skips[i].test(name)) {\n\t return false;\n\t }\n\t }\n\n\t for (i = 0, len = createDebug.names.length; i < len; i++) {\n\t if (createDebug.names[i].test(name)) {\n\t return true;\n\t }\n\t }\n\n\t return false;\n\t }\n\n\t function toNamespace(regexp) {\n\t return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\\.\\*\\?$/, '*');\n\t }\n\n\t function coerce(val) {\n\t if (val instanceof Error) {\n\t return val.stack || val.message;\n\t }\n\n\t return val;\n\t }\n\n\t function destroy() {\n\t console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t }\n\n\t createDebug.enable(createDebug.load());\n\t return createDebug;\n\t}\n\n\tvar common = setup$1;\n\n\tvar browser$3 = createCommonjsModule(function (module, exports) {\n\t exports.formatArgs = formatArgs;\n\t exports.save = save;\n\t exports.load = load;\n\t exports.useColors = useColors;\n\t exports.storage = localstorage();\n\n\t exports.destroy = function () {\n\t var warned = false;\n\t return function () {\n\t if (!warned) {\n\t warned = true;\n\t console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t }\n\t };\n\t }();\n\n\t exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];\n\n\t function useColors() {\n\t if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t return true;\n\t }\n\n\t if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t return false;\n\t }\n\n\t return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/);\n\t }\n\n\t function formatArgs(args) {\n\t args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);\n\n\t if (!this.useColors) {\n\t return;\n\t }\n\n\t var c = 'color: ' + this.color;\n\t args.splice(1, 0, c, 'color: inherit');\n\t var index = 0;\n\t var lastC = 0;\n\t args[0].replace(/%[a-zA-Z%]/g, function (match) {\n\t if (match === '%%') {\n\t return;\n\t }\n\n\t index++;\n\n\t if (match === '%c') {\n\t lastC = index;\n\t }\n\t });\n\t args.splice(lastC, 0, c);\n\t }\n\n\t exports.log = console.debug || console.log || function () {};\n\n\t function save(namespaces) {\n\t try {\n\t if (namespaces) {\n\t exports.storage.setItem('debug', namespaces);\n\t } else {\n\t exports.storage.removeItem('debug');\n\t }\n\t } catch (error) {}\n\t }\n\n\t function load() {\n\t var r;\n\n\t try {\n\t r = exports.storage.getItem('debug');\n\t } catch (error) {}\n\n\t if (!r && typeof browser$4 !== 'undefined' && 'env' in browser$4) {\n\t r = browser$4.env.DEBUG;\n\t }\n\n\t return r;\n\t }\n\n\t function localstorage() {\n\t try {\n\t return localStorage;\n\t } catch (error) {}\n\t }\n\n\t module.exports = common(exports);\n\t var formatters = module.exports.formatters;\n\n\t formatters.j = function (v) {\n\t try {\n\t return JSON.stringify(v);\n\t } catch (error) {\n\t return '[UnexpectedJSONParseError]: ' + error.message;\n\t }\n\t };\n\t}, \"/$$rollup_base$$/node_modules/debug/src\");\n\n\tvar Binding = function () {\n\t function Binding(_ref) {\n\t var identifier = _ref.identifier,\n\t scope = _ref.scope,\n\t path = _ref.path,\n\t kind = _ref.kind;\n\t this.identifier = void 0;\n\t this.scope = void 0;\n\t this.path = void 0;\n\t this.kind = void 0;\n\t this.constantViolations = [];\n\t this.constant = true;\n\t this.referencePaths = [];\n\t this.referenced = false;\n\t this.references = 0;\n\t this.identifier = identifier;\n\t this.scope = scope;\n\t this.path = path;\n\t this.kind = kind;\n\t this.clearValue();\n\t }\n\n\t var _proto = Binding.prototype;\n\n\t _proto.deoptValue = function deoptValue() {\n\t this.clearValue();\n\t this.hasDeoptedValue = true;\n\t };\n\n\t _proto.setValue = function setValue(value) {\n\t if (this.hasDeoptedValue) return;\n\t this.hasValue = true;\n\t this.value = value;\n\t };\n\n\t _proto.clearValue = function clearValue() {\n\t this.hasDeoptedValue = false;\n\t this.hasValue = false;\n\t this.value = null;\n\t };\n\n\t _proto.reassign = function reassign(path) {\n\t this.constant = false;\n\n\t if (this.constantViolations.indexOf(path) !== -1) {\n\t return;\n\t }\n\n\t this.constantViolations.push(path);\n\t };\n\n\t _proto.reference = function reference(path) {\n\t if (this.referencePaths.indexOf(path) !== -1) {\n\t return;\n\t }\n\n\t this.referenced = true;\n\t this.references++;\n\t this.referencePaths.push(path);\n\t };\n\n\t _proto.dereference = function dereference() {\n\t this.references--;\n\t this.referenced = !!this.references;\n\t };\n\n\t return Binding;\n\t}();\n\n\tvar cloneNode$h = cloneNode$i,\n\t exportNamedDeclaration$1 = exportNamedDeclaration$2,\n\t exportSpecifier$1 = exportSpecifier$2,\n\t identifier$i = identifier$j,\n\t variableDeclaration$7 = variableDeclaration$8,\n\t variableDeclarator$7 = variableDeclarator$8;\n\tfunction splitExportDeclaration(exportDeclaration) {\n\t if (!exportDeclaration.isExportDeclaration()) {\n\t throw new Error(\"Only export declarations can be split.\");\n\t }\n\n\t var isDefault = exportDeclaration.isExportDefaultDeclaration();\n\t var declaration = exportDeclaration.get(\"declaration\");\n\t var isClassDeclaration = declaration.isClassDeclaration();\n\n\t if (isDefault) {\n\t var standaloneDeclaration = declaration.isFunctionDeclaration() || isClassDeclaration;\n\t var scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;\n\t var id = declaration.node.id;\n\t var needBindingRegistration = false;\n\n\t if (!id) {\n\t needBindingRegistration = true;\n\t id = scope.generateUidIdentifier(\"default\");\n\n\t if (standaloneDeclaration || declaration.isFunctionExpression() || declaration.isClassExpression()) {\n\t declaration.node.id = cloneNode$h(id);\n\t }\n\t }\n\n\t var updatedDeclaration = standaloneDeclaration ? declaration : variableDeclaration$7(\"var\", [variableDeclarator$7(cloneNode$h(id), declaration.node)]);\n\t var updatedExportDeclaration = exportNamedDeclaration$1(null, [exportSpecifier$1(cloneNode$h(id), identifier$i(\"default\"))]);\n\t exportDeclaration.insertAfter(updatedExportDeclaration);\n\t exportDeclaration.replaceWith(updatedDeclaration);\n\n\t if (needBindingRegistration) {\n\t scope.registerDeclaration(exportDeclaration);\n\t }\n\n\t return exportDeclaration;\n\t }\n\n\t if (exportDeclaration.get(\"specifiers\").length > 0) {\n\t throw new Error(\"It doesn't make sense to split exported specifiers.\");\n\t }\n\n\t var bindingIdentifiers = declaration.getOuterBindingIdentifiers();\n\t var specifiers = Object.keys(bindingIdentifiers).map(function (name) {\n\t return exportSpecifier$1(identifier$i(name), identifier$i(name));\n\t });\n\t var aliasDeclar = exportNamedDeclaration$1(null, specifiers);\n\t exportDeclaration.insertAfter(aliasDeclar);\n\t exportDeclaration.replaceWith(declaration.node);\n\t return exportDeclaration;\n\t}\n\n\tvar VISITOR_KEYS$5 = VISITOR_KEYS$6;\n\tvar renameVisitor = {\n\t ReferencedIdentifier: function ReferencedIdentifier(_ref, state) {\n\t var node = _ref.node;\n\n\t if (node.name === state.oldName) {\n\t node.name = state.newName;\n\t }\n\t },\n\t Scope: function Scope(path, state) {\n\t if (!path.scope.bindingIdentifierEquals(state.oldName, state.binding.identifier)) {\n\t skipAllButComputedMethodKey(path);\n\t }\n\t },\n\t \"AssignmentExpression|Declaration|VariableDeclarator\": function AssignmentExpressionDeclarationVariableDeclarator(path, state) {\n\t if (path.isVariableDeclaration()) return;\n\t var ids = path.getOuterBindingIdentifiers();\n\n\t for (var name in ids) {\n\t if (name === state.oldName) ids[name].name = state.newName;\n\t }\n\t }\n\t};\n\n\tvar Renamer = function () {\n\t function Renamer(binding, oldName, newName) {\n\t this.newName = newName;\n\t this.oldName = oldName;\n\t this.binding = binding;\n\t }\n\n\t var _proto = Renamer.prototype;\n\n\t _proto.maybeConvertFromExportDeclaration = function maybeConvertFromExportDeclaration(parentDeclar) {\n\t var maybeExportDeclar = parentDeclar.parentPath;\n\n\t if (!maybeExportDeclar.isExportDeclaration()) {\n\t return;\n\t }\n\n\t if (maybeExportDeclar.isExportDefaultDeclaration() && !maybeExportDeclar.get(\"declaration\").node.id) {\n\t return;\n\t }\n\n\t splitExportDeclaration(maybeExportDeclar);\n\t };\n\n\t _proto.maybeConvertFromClassFunctionDeclaration = function maybeConvertFromClassFunctionDeclaration(path) {\n\t return;\n\t };\n\n\t _proto.maybeConvertFromClassFunctionExpression = function maybeConvertFromClassFunctionExpression(path) {\n\t return;\n\t };\n\n\t _proto.rename = function rename(block) {\n\t var _this = this;\n\n\t var binding = this.binding,\n\t oldName = this.oldName,\n\t newName = this.newName;\n\t var scope = binding.scope,\n\t path = binding.path;\n\t var parentDeclar = path.find(function (path) {\n\t return path.isDeclaration() || path.isFunctionExpression() || path.isClassExpression();\n\t });\n\n\t if (parentDeclar) {\n\t var bindingIds = parentDeclar.getOuterBindingIdentifiers();\n\n\t if (bindingIds[oldName] === binding.identifier) {\n\t this.maybeConvertFromExportDeclaration(parentDeclar);\n\t }\n\t }\n\n\t var blockToTraverse = block || scope.block;\n\n\t if ((blockToTraverse == null ? void 0 : blockToTraverse.type) === \"SwitchStatement\") {\n\t blockToTraverse.cases.forEach(function (c) {\n\t scope.traverse(c, renameVisitor, _this);\n\t });\n\t } else {\n\t scope.traverse(blockToTraverse, renameVisitor, this);\n\t }\n\n\t if (!block) {\n\t scope.removeOwnBinding(oldName);\n\t scope.bindings[newName] = binding;\n\t this.binding.identifier.name = newName;\n\t }\n\n\t if (parentDeclar) {\n\t this.maybeConvertFromClassFunctionDeclaration(parentDeclar);\n\t this.maybeConvertFromClassFunctionExpression(parentDeclar);\n\t }\n\t };\n\n\t return Renamer;\n\t}();\n\n\tfunction skipAllButComputedMethodKey(path) {\n\t if (!path.isMethod() || !path.node.computed) {\n\t path.skip();\n\t return;\n\t }\n\n\t var keys = VISITOR_KEYS$5[path.type];\n\n\t for (var _iterator = _createForOfIteratorHelperLoose(keys), _step; !(_step = _iterator()).done;) {\n\t var key = _step.value;\n\t if (key !== \"key\") path.skipKey(key);\n\t }\n\t}\n\n\tvar builtin = {\n\t\t\"Array\": false,\n\t\t\"ArrayBuffer\": false,\n\t\tAtomics: false,\n\t\tBigInt: false,\n\t\tBigInt64Array: false,\n\t\tBigUint64Array: false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"DataView\": false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Float32Array\": false,\n\t\t\"Float64Array\": false,\n\t\t\"Function\": false,\n\t\tglobalThis: false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"Int16Array\": false,\n\t\t\"Int32Array\": false,\n\t\t\"Int8Array\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Map\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\t\"Promise\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"Proxy\": false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"Reflect\": false,\n\t\t\"RegExp\": false,\n\t\t\"Set\": false,\n\t\tSharedArrayBuffer: false,\n\t\t\"String\": false,\n\t\t\"Symbol\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"Uint16Array\": false,\n\t\t\"Uint32Array\": false,\n\t\t\"Uint8Array\": false,\n\t\t\"Uint8ClampedArray\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false,\n\t\t\"WeakMap\": false,\n\t\t\"WeakSet\": false\n\t};\n\tvar es5 = {\n\t\t\"Array\": false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Function\": false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"RegExp\": false,\n\t\t\"String\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false\n\t};\n\tvar es2015 = {\n\t\t\"Array\": false,\n\t\t\"ArrayBuffer\": false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"DataView\": false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Float32Array\": false,\n\t\t\"Float64Array\": false,\n\t\t\"Function\": false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"Int16Array\": false,\n\t\t\"Int32Array\": false,\n\t\t\"Int8Array\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Map\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\t\"Promise\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"Proxy\": false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"Reflect\": false,\n\t\t\"RegExp\": false,\n\t\t\"Set\": false,\n\t\t\"String\": false,\n\t\t\"Symbol\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"Uint16Array\": false,\n\t\t\"Uint32Array\": false,\n\t\t\"Uint8Array\": false,\n\t\t\"Uint8ClampedArray\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false,\n\t\t\"WeakMap\": false,\n\t\t\"WeakSet\": false\n\t};\n\tvar es2017 = {\n\t\t\"Array\": false,\n\t\t\"ArrayBuffer\": false,\n\t\tAtomics: false,\n\t\t\"Boolean\": false,\n\t\tconstructor: false,\n\t\t\"DataView\": false,\n\t\t\"Date\": false,\n\t\t\"decodeURI\": false,\n\t\t\"decodeURIComponent\": false,\n\t\t\"encodeURI\": false,\n\t\t\"encodeURIComponent\": false,\n\t\t\"Error\": false,\n\t\t\"escape\": false,\n\t\t\"eval\": false,\n\t\t\"EvalError\": false,\n\t\t\"Float32Array\": false,\n\t\t\"Float64Array\": false,\n\t\t\"Function\": false,\n\t\thasOwnProperty: false,\n\t\t\"Infinity\": false,\n\t\t\"Int16Array\": false,\n\t\t\"Int32Array\": false,\n\t\t\"Int8Array\": false,\n\t\t\"isFinite\": false,\n\t\t\"isNaN\": false,\n\t\tisPrototypeOf: false,\n\t\t\"JSON\": false,\n\t\t\"Map\": false,\n\t\t\"Math\": false,\n\t\t\"NaN\": false,\n\t\t\"Number\": false,\n\t\t\"Object\": false,\n\t\t\"parseFloat\": false,\n\t\t\"parseInt\": false,\n\t\t\"Promise\": false,\n\t\tpropertyIsEnumerable: false,\n\t\t\"Proxy\": false,\n\t\t\"RangeError\": false,\n\t\t\"ReferenceError\": false,\n\t\t\"Reflect\": false,\n\t\t\"RegExp\": false,\n\t\t\"Set\": false,\n\t\tSharedArrayBuffer: false,\n\t\t\"String\": false,\n\t\t\"Symbol\": false,\n\t\t\"SyntaxError\": false,\n\t\ttoLocaleString: false,\n\t\ttoString: false,\n\t\t\"TypeError\": false,\n\t\t\"Uint16Array\": false,\n\t\t\"Uint32Array\": false,\n\t\t\"Uint8Array\": false,\n\t\t\"Uint8ClampedArray\": false,\n\t\t\"undefined\": false,\n\t\t\"unescape\": false,\n\t\t\"URIError\": false,\n\t\tvalueOf: false,\n\t\t\"WeakMap\": false,\n\t\t\"WeakSet\": false\n\t};\n\tvar browser$2 = {\n\t\tAbortController: false,\n\t\tAbortSignal: false,\n\t\taddEventListener: false,\n\t\talert: false,\n\t\tAnalyserNode: false,\n\t\tAnimation: false,\n\t\tAnimationEffectReadOnly: false,\n\t\tAnimationEffectTiming: false,\n\t\tAnimationEffectTimingReadOnly: false,\n\t\tAnimationEvent: false,\n\t\tAnimationPlaybackEvent: false,\n\t\tAnimationTimeline: false,\n\t\tapplicationCache: false,\n\t\tApplicationCache: false,\n\t\tApplicationCacheErrorEvent: false,\n\t\tatob: false,\n\t\tAttr: false,\n\t\tAudio: false,\n\t\tAudioBuffer: false,\n\t\tAudioBufferSourceNode: false,\n\t\tAudioContext: false,\n\t\tAudioDestinationNode: false,\n\t\tAudioListener: false,\n\t\tAudioNode: false,\n\t\tAudioParam: false,\n\t\tAudioProcessingEvent: false,\n\t\tAudioScheduledSourceNode: false,\n\t\t\"AudioWorkletGlobalScope \": false,\n\t\tAudioWorkletNode: false,\n\t\tAudioWorkletProcessor: false,\n\t\tBarProp: false,\n\t\tBaseAudioContext: false,\n\t\tBatteryManager: false,\n\t\tBeforeUnloadEvent: false,\n\t\tBiquadFilterNode: false,\n\t\tBlob: false,\n\t\tBlobEvent: false,\n\t\tblur: false,\n\t\tBroadcastChannel: false,\n\t\tbtoa: false,\n\t\tBudgetService: false,\n\t\tByteLengthQueuingStrategy: false,\n\t\tCache: false,\n\t\tcaches: false,\n\t\tCacheStorage: false,\n\t\tcancelAnimationFrame: false,\n\t\tcancelIdleCallback: false,\n\t\tCanvasCaptureMediaStreamTrack: false,\n\t\tCanvasGradient: false,\n\t\tCanvasPattern: false,\n\t\tCanvasRenderingContext2D: false,\n\t\tChannelMergerNode: false,\n\t\tChannelSplitterNode: false,\n\t\tCharacterData: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tclientInformation: false,\n\t\tClipboardEvent: false,\n\t\tclose: false,\n\t\tclosed: false,\n\t\tCloseEvent: false,\n\t\tComment: false,\n\t\tCompositionEvent: false,\n\t\tconfirm: false,\n\t\tconsole: false,\n\t\tConstantSourceNode: false,\n\t\tConvolverNode: false,\n\t\tCountQueuingStrategy: false,\n\t\tcreateImageBitmap: false,\n\t\tCredential: false,\n\t\tCredentialsContainer: false,\n\t\tcrypto: false,\n\t\tCrypto: false,\n\t\tCryptoKey: false,\n\t\tCSS: false,\n\t\tCSSConditionRule: false,\n\t\tCSSFontFaceRule: false,\n\t\tCSSGroupingRule: false,\n\t\tCSSImportRule: false,\n\t\tCSSKeyframeRule: false,\n\t\tCSSKeyframesRule: false,\n\t\tCSSMediaRule: false,\n\t\tCSSNamespaceRule: false,\n\t\tCSSPageRule: false,\n\t\tCSSRule: false,\n\t\tCSSRuleList: false,\n\t\tCSSStyleDeclaration: false,\n\t\tCSSStyleRule: false,\n\t\tCSSStyleSheet: false,\n\t\tCSSSupportsRule: false,\n\t\tCustomElementRegistry: false,\n\t\tcustomElements: false,\n\t\tCustomEvent: false,\n\t\tDataTransfer: false,\n\t\tDataTransferItem: false,\n\t\tDataTransferItemList: false,\n\t\tdefaultstatus: false,\n\t\tdefaultStatus: false,\n\t\tDelayNode: false,\n\t\tDeviceMotionEvent: false,\n\t\tDeviceOrientationEvent: false,\n\t\tdevicePixelRatio: false,\n\t\tdispatchEvent: false,\n\t\tdocument: false,\n\t\tDocument: false,\n\t\tDocumentFragment: false,\n\t\tDocumentType: false,\n\t\tDOMError: false,\n\t\tDOMException: false,\n\t\tDOMImplementation: false,\n\t\tDOMMatrix: false,\n\t\tDOMMatrixReadOnly: false,\n\t\tDOMParser: false,\n\t\tDOMPoint: false,\n\t\tDOMPointReadOnly: false,\n\t\tDOMQuad: false,\n\t\tDOMRect: false,\n\t\tDOMRectReadOnly: false,\n\t\tDOMStringList: false,\n\t\tDOMStringMap: false,\n\t\tDOMTokenList: false,\n\t\tDragEvent: false,\n\t\tDynamicsCompressorNode: false,\n\t\tElement: false,\n\t\tErrorEvent: false,\n\t\tevent: false,\n\t\tEvent: false,\n\t\tEventSource: false,\n\t\tEventTarget: false,\n\t\texternal: false,\n\t\tfetch: false,\n\t\tFile: false,\n\t\tFileList: false,\n\t\tFileReader: false,\n\t\tfind: false,\n\t\tfocus: false,\n\t\tFocusEvent: false,\n\t\tFontFace: false,\n\t\tFontFaceSetLoadEvent: false,\n\t\tFormData: false,\n\t\tframeElement: false,\n\t\tframes: false,\n\t\tGainNode: false,\n\t\tGamepad: false,\n\t\tGamepadButton: false,\n\t\tGamepadEvent: false,\n\t\tgetComputedStyle: false,\n\t\tgetSelection: false,\n\t\tHashChangeEvent: false,\n\t\tHeaders: false,\n\t\thistory: false,\n\t\tHistory: false,\n\t\tHTMLAllCollection: false,\n\t\tHTMLAnchorElement: false,\n\t\tHTMLAreaElement: false,\n\t\tHTMLAudioElement: false,\n\t\tHTMLBaseElement: false,\n\t\tHTMLBodyElement: false,\n\t\tHTMLBRElement: false,\n\t\tHTMLButtonElement: false,\n\t\tHTMLCanvasElement: false,\n\t\tHTMLCollection: false,\n\t\tHTMLContentElement: false,\n\t\tHTMLDataElement: false,\n\t\tHTMLDataListElement: false,\n\t\tHTMLDetailsElement: false,\n\t\tHTMLDialogElement: false,\n\t\tHTMLDirectoryElement: false,\n\t\tHTMLDivElement: false,\n\t\tHTMLDListElement: false,\n\t\tHTMLDocument: false,\n\t\tHTMLElement: false,\n\t\tHTMLEmbedElement: false,\n\t\tHTMLFieldSetElement: false,\n\t\tHTMLFontElement: false,\n\t\tHTMLFormControlsCollection: false,\n\t\tHTMLFormElement: false,\n\t\tHTMLFrameElement: false,\n\t\tHTMLFrameSetElement: false,\n\t\tHTMLHeadElement: false,\n\t\tHTMLHeadingElement: false,\n\t\tHTMLHRElement: false,\n\t\tHTMLHtmlElement: false,\n\t\tHTMLIFrameElement: false,\n\t\tHTMLImageElement: false,\n\t\tHTMLInputElement: false,\n\t\tHTMLLabelElement: false,\n\t\tHTMLLegendElement: false,\n\t\tHTMLLIElement: false,\n\t\tHTMLLinkElement: false,\n\t\tHTMLMapElement: false,\n\t\tHTMLMarqueeElement: false,\n\t\tHTMLMediaElement: false,\n\t\tHTMLMenuElement: false,\n\t\tHTMLMetaElement: false,\n\t\tHTMLMeterElement: false,\n\t\tHTMLModElement: false,\n\t\tHTMLObjectElement: false,\n\t\tHTMLOListElement: false,\n\t\tHTMLOptGroupElement: false,\n\t\tHTMLOptionElement: false,\n\t\tHTMLOptionsCollection: false,\n\t\tHTMLOutputElement: false,\n\t\tHTMLParagraphElement: false,\n\t\tHTMLParamElement: false,\n\t\tHTMLPictureElement: false,\n\t\tHTMLPreElement: false,\n\t\tHTMLProgressElement: false,\n\t\tHTMLQuoteElement: false,\n\t\tHTMLScriptElement: false,\n\t\tHTMLSelectElement: false,\n\t\tHTMLShadowElement: false,\n\t\tHTMLSlotElement: false,\n\t\tHTMLSourceElement: false,\n\t\tHTMLSpanElement: false,\n\t\tHTMLStyleElement: false,\n\t\tHTMLTableCaptionElement: false,\n\t\tHTMLTableCellElement: false,\n\t\tHTMLTableColElement: false,\n\t\tHTMLTableElement: false,\n\t\tHTMLTableRowElement: false,\n\t\tHTMLTableSectionElement: false,\n\t\tHTMLTemplateElement: false,\n\t\tHTMLTextAreaElement: false,\n\t\tHTMLTimeElement: false,\n\t\tHTMLTitleElement: false,\n\t\tHTMLTrackElement: false,\n\t\tHTMLUListElement: false,\n\t\tHTMLUnknownElement: false,\n\t\tHTMLVideoElement: false,\n\t\tIDBCursor: false,\n\t\tIDBCursorWithValue: false,\n\t\tIDBDatabase: false,\n\t\tIDBFactory: false,\n\t\tIDBIndex: false,\n\t\tIDBKeyRange: false,\n\t\tIDBObjectStore: false,\n\t\tIDBOpenDBRequest: false,\n\t\tIDBRequest: false,\n\t\tIDBTransaction: false,\n\t\tIDBVersionChangeEvent: false,\n\t\tIdleDeadline: false,\n\t\tIIRFilterNode: false,\n\t\tImage: false,\n\t\tImageBitmap: false,\n\t\tImageBitmapRenderingContext: false,\n\t\tImageCapture: false,\n\t\tImageData: false,\n\t\tindexedDB: false,\n\t\tinnerHeight: false,\n\t\tinnerWidth: false,\n\t\tInputEvent: false,\n\t\tIntersectionObserver: false,\n\t\tIntersectionObserverEntry: false,\n\t\t\"Intl\": false,\n\t\tisSecureContext: false,\n\t\tKeyboardEvent: false,\n\t\tKeyframeEffect: false,\n\t\tKeyframeEffectReadOnly: false,\n\t\tlength: false,\n\t\tlocalStorage: false,\n\t\tlocation: true,\n\t\tLocation: false,\n\t\tlocationbar: false,\n\t\tmatchMedia: false,\n\t\tMediaDeviceInfo: false,\n\t\tMediaDevices: false,\n\t\tMediaElementAudioSourceNode: false,\n\t\tMediaEncryptedEvent: false,\n\t\tMediaError: false,\n\t\tMediaKeyMessageEvent: false,\n\t\tMediaKeySession: false,\n\t\tMediaKeyStatusMap: false,\n\t\tMediaKeySystemAccess: false,\n\t\tMediaList: false,\n\t\tMediaQueryList: false,\n\t\tMediaQueryListEvent: false,\n\t\tMediaRecorder: false,\n\t\tMediaSettingsRange: false,\n\t\tMediaSource: false,\n\t\tMediaStream: false,\n\t\tMediaStreamAudioDestinationNode: false,\n\t\tMediaStreamAudioSourceNode: false,\n\t\tMediaStreamEvent: false,\n\t\tMediaStreamTrack: false,\n\t\tMediaStreamTrackEvent: false,\n\t\tmenubar: false,\n\t\tMessageChannel: false,\n\t\tMessageEvent: false,\n\t\tMessagePort: false,\n\t\tMIDIAccess: false,\n\t\tMIDIConnectionEvent: false,\n\t\tMIDIInput: false,\n\t\tMIDIInputMap: false,\n\t\tMIDIMessageEvent: false,\n\t\tMIDIOutput: false,\n\t\tMIDIOutputMap: false,\n\t\tMIDIPort: false,\n\t\tMimeType: false,\n\t\tMimeTypeArray: false,\n\t\tMouseEvent: false,\n\t\tmoveBy: false,\n\t\tmoveTo: false,\n\t\tMutationEvent: false,\n\t\tMutationObserver: false,\n\t\tMutationRecord: false,\n\t\tname: false,\n\t\tNamedNodeMap: false,\n\t\tNavigationPreloadManager: false,\n\t\tnavigator: false,\n\t\tNavigator: false,\n\t\tNetworkInformation: false,\n\t\tNode: false,\n\t\tNodeFilter: false,\n\t\tNodeIterator: false,\n\t\tNodeList: false,\n\t\tNotification: false,\n\t\tOfflineAudioCompletionEvent: false,\n\t\tOfflineAudioContext: false,\n\t\toffscreenBuffering: false,\n\t\tOffscreenCanvas: true,\n\t\tonabort: true,\n\t\tonafterprint: true,\n\t\tonanimationend: true,\n\t\tonanimationiteration: true,\n\t\tonanimationstart: true,\n\t\tonappinstalled: true,\n\t\tonauxclick: true,\n\t\tonbeforeinstallprompt: true,\n\t\tonbeforeprint: true,\n\t\tonbeforeunload: true,\n\t\tonblur: true,\n\t\toncancel: true,\n\t\toncanplay: true,\n\t\toncanplaythrough: true,\n\t\tonchange: true,\n\t\tonclick: true,\n\t\tonclose: true,\n\t\toncontextmenu: true,\n\t\toncuechange: true,\n\t\tondblclick: true,\n\t\tondevicemotion: true,\n\t\tondeviceorientation: true,\n\t\tondeviceorientationabsolute: true,\n\t\tondrag: true,\n\t\tondragend: true,\n\t\tondragenter: true,\n\t\tondragleave: true,\n\t\tondragover: true,\n\t\tondragstart: true,\n\t\tondrop: true,\n\t\tondurationchange: true,\n\t\tonemptied: true,\n\t\tonended: true,\n\t\tonerror: true,\n\t\tonfocus: true,\n\t\tongotpointercapture: true,\n\t\tonhashchange: true,\n\t\toninput: true,\n\t\toninvalid: true,\n\t\tonkeydown: true,\n\t\tonkeypress: true,\n\t\tonkeyup: true,\n\t\tonlanguagechange: true,\n\t\tonload: true,\n\t\tonloadeddata: true,\n\t\tonloadedmetadata: true,\n\t\tonloadstart: true,\n\t\tonlostpointercapture: true,\n\t\tonmessage: true,\n\t\tonmessageerror: true,\n\t\tonmousedown: true,\n\t\tonmouseenter: true,\n\t\tonmouseleave: true,\n\t\tonmousemove: true,\n\t\tonmouseout: true,\n\t\tonmouseover: true,\n\t\tonmouseup: true,\n\t\tonmousewheel: true,\n\t\tonoffline: true,\n\t\tononline: true,\n\t\tonpagehide: true,\n\t\tonpageshow: true,\n\t\tonpause: true,\n\t\tonplay: true,\n\t\tonplaying: true,\n\t\tonpointercancel: true,\n\t\tonpointerdown: true,\n\t\tonpointerenter: true,\n\t\tonpointerleave: true,\n\t\tonpointermove: true,\n\t\tonpointerout: true,\n\t\tonpointerover: true,\n\t\tonpointerup: true,\n\t\tonpopstate: true,\n\t\tonprogress: true,\n\t\tonratechange: true,\n\t\tonrejectionhandled: true,\n\t\tonreset: true,\n\t\tonresize: true,\n\t\tonscroll: true,\n\t\tonsearch: true,\n\t\tonseeked: true,\n\t\tonseeking: true,\n\t\tonselect: true,\n\t\tonstalled: true,\n\t\tonstorage: true,\n\t\tonsubmit: true,\n\t\tonsuspend: true,\n\t\tontimeupdate: true,\n\t\tontoggle: true,\n\t\tontransitionend: true,\n\t\tonunhandledrejection: true,\n\t\tonunload: true,\n\t\tonvolumechange: true,\n\t\tonwaiting: true,\n\t\tonwheel: true,\n\t\topen: false,\n\t\topenDatabase: false,\n\t\topener: false,\n\t\tOption: false,\n\t\torigin: false,\n\t\tOscillatorNode: false,\n\t\touterHeight: false,\n\t\touterWidth: false,\n\t\tPageTransitionEvent: false,\n\t\tpageXOffset: false,\n\t\tpageYOffset: false,\n\t\tPannerNode: false,\n\t\tparent: false,\n\t\tPath2D: false,\n\t\tPaymentAddress: false,\n\t\tPaymentRequest: false,\n\t\tPaymentRequestUpdateEvent: false,\n\t\tPaymentResponse: false,\n\t\tperformance: false,\n\t\tPerformance: false,\n\t\tPerformanceEntry: false,\n\t\tPerformanceLongTaskTiming: false,\n\t\tPerformanceMark: false,\n\t\tPerformanceMeasure: false,\n\t\tPerformanceNavigation: false,\n\t\tPerformanceNavigationTiming: false,\n\t\tPerformanceObserver: false,\n\t\tPerformanceObserverEntryList: false,\n\t\tPerformancePaintTiming: false,\n\t\tPerformanceResourceTiming: false,\n\t\tPerformanceTiming: false,\n\t\tPeriodicWave: false,\n\t\tPermissions: false,\n\t\tPermissionStatus: false,\n\t\tpersonalbar: false,\n\t\tPhotoCapabilities: false,\n\t\tPlugin: false,\n\t\tPluginArray: false,\n\t\tPointerEvent: false,\n\t\tPopStateEvent: false,\n\t\tpostMessage: false,\n\t\tPresentation: false,\n\t\tPresentationAvailability: false,\n\t\tPresentationConnection: false,\n\t\tPresentationConnectionAvailableEvent: false,\n\t\tPresentationConnectionCloseEvent: false,\n\t\tPresentationConnectionList: false,\n\t\tPresentationReceiver: false,\n\t\tPresentationRequest: false,\n\t\tprint: false,\n\t\tProcessingInstruction: false,\n\t\tProgressEvent: false,\n\t\tPromiseRejectionEvent: false,\n\t\tprompt: false,\n\t\tPushManager: false,\n\t\tPushSubscription: false,\n\t\tPushSubscriptionOptions: false,\n\t\tqueueMicrotask: false,\n\t\tRadioNodeList: false,\n\t\tRange: false,\n\t\tReadableStream: false,\n\t\tregisterProcessor: false,\n\t\tRemotePlayback: false,\n\t\tremoveEventListener: false,\n\t\tRequest: false,\n\t\trequestAnimationFrame: false,\n\t\trequestIdleCallback: false,\n\t\tresizeBy: false,\n\t\tResizeObserver: false,\n\t\tResizeObserverEntry: false,\n\t\tresizeTo: false,\n\t\tResponse: false,\n\t\tRTCCertificate: false,\n\t\tRTCDataChannel: false,\n\t\tRTCDataChannelEvent: false,\n\t\tRTCDtlsTransport: false,\n\t\tRTCIceCandidate: false,\n\t\tRTCIceGatherer: false,\n\t\tRTCIceTransport: false,\n\t\tRTCPeerConnection: false,\n\t\tRTCPeerConnectionIceEvent: false,\n\t\tRTCRtpContributingSource: false,\n\t\tRTCRtpReceiver: false,\n\t\tRTCRtpSender: false,\n\t\tRTCSctpTransport: false,\n\t\tRTCSessionDescription: false,\n\t\tRTCStatsReport: false,\n\t\tRTCTrackEvent: false,\n\t\tscreen: false,\n\t\tScreen: false,\n\t\tscreenLeft: false,\n\t\tScreenOrientation: false,\n\t\tscreenTop: false,\n\t\tscreenX: false,\n\t\tscreenY: false,\n\t\tScriptProcessorNode: false,\n\t\tscroll: false,\n\t\tscrollbars: false,\n\t\tscrollBy: false,\n\t\tscrollTo: false,\n\t\tscrollX: false,\n\t\tscrollY: false,\n\t\tSecurityPolicyViolationEvent: false,\n\t\tSelection: false,\n\t\tself: false,\n\t\tServiceWorker: false,\n\t\tServiceWorkerContainer: false,\n\t\tServiceWorkerRegistration: false,\n\t\tsessionStorage: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tShadowRoot: false,\n\t\tSharedWorker: false,\n\t\tSourceBuffer: false,\n\t\tSourceBufferList: false,\n\t\tspeechSynthesis: false,\n\t\tSpeechSynthesisEvent: false,\n\t\tSpeechSynthesisUtterance: false,\n\t\tStaticRange: false,\n\t\tstatus: false,\n\t\tstatusbar: false,\n\t\tStereoPannerNode: false,\n\t\tstop: false,\n\t\tStorage: false,\n\t\tStorageEvent: false,\n\t\tStorageManager: false,\n\t\tstyleMedia: false,\n\t\tStyleSheet: false,\n\t\tStyleSheetList: false,\n\t\tSubtleCrypto: false,\n\t\tSVGAElement: false,\n\t\tSVGAngle: false,\n\t\tSVGAnimatedAngle: false,\n\t\tSVGAnimatedBoolean: false,\n\t\tSVGAnimatedEnumeration: false,\n\t\tSVGAnimatedInteger: false,\n\t\tSVGAnimatedLength: false,\n\t\tSVGAnimatedLengthList: false,\n\t\tSVGAnimatedNumber: false,\n\t\tSVGAnimatedNumberList: false,\n\t\tSVGAnimatedPreserveAspectRatio: false,\n\t\tSVGAnimatedRect: false,\n\t\tSVGAnimatedString: false,\n\t\tSVGAnimatedTransformList: false,\n\t\tSVGAnimateElement: false,\n\t\tSVGAnimateMotionElement: false,\n\t\tSVGAnimateTransformElement: false,\n\t\tSVGAnimationElement: false,\n\t\tSVGCircleElement: false,\n\t\tSVGClipPathElement: false,\n\t\tSVGComponentTransferFunctionElement: false,\n\t\tSVGDefsElement: false,\n\t\tSVGDescElement: false,\n\t\tSVGDiscardElement: false,\n\t\tSVGElement: false,\n\t\tSVGEllipseElement: false,\n\t\tSVGFEBlendElement: false,\n\t\tSVGFEColorMatrixElement: false,\n\t\tSVGFEComponentTransferElement: false,\n\t\tSVGFECompositeElement: false,\n\t\tSVGFEConvolveMatrixElement: false,\n\t\tSVGFEDiffuseLightingElement: false,\n\t\tSVGFEDisplacementMapElement: false,\n\t\tSVGFEDistantLightElement: false,\n\t\tSVGFEDropShadowElement: false,\n\t\tSVGFEFloodElement: false,\n\t\tSVGFEFuncAElement: false,\n\t\tSVGFEFuncBElement: false,\n\t\tSVGFEFuncGElement: false,\n\t\tSVGFEFuncRElement: false,\n\t\tSVGFEGaussianBlurElement: false,\n\t\tSVGFEImageElement: false,\n\t\tSVGFEMergeElement: false,\n\t\tSVGFEMergeNodeElement: false,\n\t\tSVGFEMorphologyElement: false,\n\t\tSVGFEOffsetElement: false,\n\t\tSVGFEPointLightElement: false,\n\t\tSVGFESpecularLightingElement: false,\n\t\tSVGFESpotLightElement: false,\n\t\tSVGFETileElement: false,\n\t\tSVGFETurbulenceElement: false,\n\t\tSVGFilterElement: false,\n\t\tSVGForeignObjectElement: false,\n\t\tSVGGElement: false,\n\t\tSVGGeometryElement: false,\n\t\tSVGGradientElement: false,\n\t\tSVGGraphicsElement: false,\n\t\tSVGImageElement: false,\n\t\tSVGLength: false,\n\t\tSVGLengthList: false,\n\t\tSVGLinearGradientElement: false,\n\t\tSVGLineElement: false,\n\t\tSVGMarkerElement: false,\n\t\tSVGMaskElement: false,\n\t\tSVGMatrix: false,\n\t\tSVGMetadataElement: false,\n\t\tSVGMPathElement: false,\n\t\tSVGNumber: false,\n\t\tSVGNumberList: false,\n\t\tSVGPathElement: false,\n\t\tSVGPatternElement: false,\n\t\tSVGPoint: false,\n\t\tSVGPointList: false,\n\t\tSVGPolygonElement: false,\n\t\tSVGPolylineElement: false,\n\t\tSVGPreserveAspectRatio: false,\n\t\tSVGRadialGradientElement: false,\n\t\tSVGRect: false,\n\t\tSVGRectElement: false,\n\t\tSVGScriptElement: false,\n\t\tSVGSetElement: false,\n\t\tSVGStopElement: false,\n\t\tSVGStringList: false,\n\t\tSVGStyleElement: false,\n\t\tSVGSVGElement: false,\n\t\tSVGSwitchElement: false,\n\t\tSVGSymbolElement: false,\n\t\tSVGTextContentElement: false,\n\t\tSVGTextElement: false,\n\t\tSVGTextPathElement: false,\n\t\tSVGTextPositioningElement: false,\n\t\tSVGTitleElement: false,\n\t\tSVGTransform: false,\n\t\tSVGTransformList: false,\n\t\tSVGTSpanElement: false,\n\t\tSVGUnitTypes: false,\n\t\tSVGUseElement: false,\n\t\tSVGViewElement: false,\n\t\tTaskAttributionTiming: false,\n\t\tText: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tTextEvent: false,\n\t\tTextMetrics: false,\n\t\tTextTrack: false,\n\t\tTextTrackCue: false,\n\t\tTextTrackCueList: false,\n\t\tTextTrackList: false,\n\t\tTimeRanges: false,\n\t\ttoolbar: false,\n\t\ttop: false,\n\t\tTouch: false,\n\t\tTouchEvent: false,\n\t\tTouchList: false,\n\t\tTrackEvent: false,\n\t\tTransitionEvent: false,\n\t\tTreeWalker: false,\n\t\tUIEvent: false,\n\t\tURL: false,\n\t\tURLSearchParams: false,\n\t\tValidityState: false,\n\t\tvisualViewport: false,\n\t\tVisualViewport: false,\n\t\tVTTCue: false,\n\t\tWaveShaperNode: false,\n\t\tWebAssembly: false,\n\t\tWebGL2RenderingContext: false,\n\t\tWebGLActiveInfo: false,\n\t\tWebGLBuffer: false,\n\t\tWebGLContextEvent: false,\n\t\tWebGLFramebuffer: false,\n\t\tWebGLProgram: false,\n\t\tWebGLQuery: false,\n\t\tWebGLRenderbuffer: false,\n\t\tWebGLRenderingContext: false,\n\t\tWebGLSampler: false,\n\t\tWebGLShader: false,\n\t\tWebGLShaderPrecisionFormat: false,\n\t\tWebGLSync: false,\n\t\tWebGLTexture: false,\n\t\tWebGLTransformFeedback: false,\n\t\tWebGLUniformLocation: false,\n\t\tWebGLVertexArrayObject: false,\n\t\tWebSocket: false,\n\t\tWheelEvent: false,\n\t\twindow: false,\n\t\tWindow: false,\n\t\tWorker: false,\n\t\tWritableStream: false,\n\t\tXMLDocument: false,\n\t\tXMLHttpRequest: false,\n\t\tXMLHttpRequestEventTarget: false,\n\t\tXMLHttpRequestUpload: false,\n\t\tXMLSerializer: false,\n\t\tXPathEvaluator: false,\n\t\tXPathExpression: false,\n\t\tXPathResult: false,\n\t\tXSLTProcessor: false\n\t};\n\tvar worker = {\n\t\taddEventListener: false,\n\t\tapplicationCache: false,\n\t\tatob: false,\n\t\tBlob: false,\n\t\tBroadcastChannel: false,\n\t\tbtoa: false,\n\t\tCache: false,\n\t\tcaches: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tclose: true,\n\t\tconsole: false,\n\t\tfetch: false,\n\t\tFileReaderSync: false,\n\t\tFormData: false,\n\t\tHeaders: false,\n\t\tIDBCursor: false,\n\t\tIDBCursorWithValue: false,\n\t\tIDBDatabase: false,\n\t\tIDBFactory: false,\n\t\tIDBIndex: false,\n\t\tIDBKeyRange: false,\n\t\tIDBObjectStore: false,\n\t\tIDBOpenDBRequest: false,\n\t\tIDBRequest: false,\n\t\tIDBTransaction: false,\n\t\tIDBVersionChangeEvent: false,\n\t\tImageData: false,\n\t\timportScripts: true,\n\t\tindexedDB: false,\n\t\tlocation: false,\n\t\tMessageChannel: false,\n\t\tMessagePort: false,\n\t\tname: false,\n\t\tnavigator: false,\n\t\tNotification: false,\n\t\tonclose: true,\n\t\tonconnect: true,\n\t\tonerror: true,\n\t\tonlanguagechange: true,\n\t\tonmessage: true,\n\t\tonoffline: true,\n\t\tononline: true,\n\t\tonrejectionhandled: true,\n\t\tonunhandledrejection: true,\n\t\tperformance: false,\n\t\tPerformance: false,\n\t\tPerformanceEntry: false,\n\t\tPerformanceMark: false,\n\t\tPerformanceMeasure: false,\n\t\tPerformanceNavigation: false,\n\t\tPerformanceResourceTiming: false,\n\t\tPerformanceTiming: false,\n\t\tpostMessage: true,\n\t\t\"Promise\": false,\n\t\tqueueMicrotask: false,\n\t\tremoveEventListener: false,\n\t\tRequest: false,\n\t\tResponse: false,\n\t\tself: true,\n\t\tServiceWorkerRegistration: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tURL: false,\n\t\tURLSearchParams: false,\n\t\tWebSocket: false,\n\t\tWorker: false,\n\t\tWorkerGlobalScope: false,\n\t\tXMLHttpRequest: false\n\t};\n\tvar node = {\n\t\t__dirname: false,\n\t\t__filename: false,\n\t\tBuffer: false,\n\t\tclearImmediate: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tconsole: false,\n\t\texports: true,\n\t\tglobal: false,\n\t\t\"Intl\": false,\n\t\tmodule: false,\n\t\tprocess: false,\n\t\tqueueMicrotask: false,\n\t\trequire: false,\n\t\tsetImmediate: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tURL: false,\n\t\tURLSearchParams: false\n\t};\n\tvar commonjs = {\n\t\texports: true,\n\t\tglobal: false,\n\t\tmodule: false,\n\t\trequire: false\n\t};\n\tvar amd = {\n\t\tdefine: false,\n\t\trequire: false\n\t};\n\tvar mocha = {\n\t\tafter: false,\n\t\tafterEach: false,\n\t\tbefore: false,\n\t\tbeforeEach: false,\n\t\tcontext: false,\n\t\tdescribe: false,\n\t\tit: false,\n\t\tmocha: false,\n\t\trun: false,\n\t\tsetup: false,\n\t\tspecify: false,\n\t\tsuite: false,\n\t\tsuiteSetup: false,\n\t\tsuiteTeardown: false,\n\t\tteardown: false,\n\t\ttest: false,\n\t\txcontext: false,\n\t\txdescribe: false,\n\t\txit: false,\n\t\txspecify: false\n\t};\n\tvar jasmine = {\n\t\tafterAll: false,\n\t\tafterEach: false,\n\t\tbeforeAll: false,\n\t\tbeforeEach: false,\n\t\tdescribe: false,\n\t\texpect: false,\n\t\tfail: false,\n\t\tfdescribe: false,\n\t\tfit: false,\n\t\tit: false,\n\t\tjasmine: false,\n\t\tpending: false,\n\t\truns: false,\n\t\tspyOn: false,\n\t\tspyOnProperty: false,\n\t\twaits: false,\n\t\twaitsFor: false,\n\t\txdescribe: false,\n\t\txit: false\n\t};\n\tvar jest = {\n\t\tafterAll: false,\n\t\tafterEach: false,\n\t\tbeforeAll: false,\n\t\tbeforeEach: false,\n\t\tdescribe: false,\n\t\texpect: false,\n\t\tfdescribe: false,\n\t\tfit: false,\n\t\tit: false,\n\t\tjest: false,\n\t\tpit: false,\n\t\trequire: false,\n\t\ttest: false,\n\t\txdescribe: false,\n\t\txit: false,\n\t\txtest: false\n\t};\n\tvar qunit = {\n\t\tasyncTest: false,\n\t\tdeepEqual: false,\n\t\tequal: false,\n\t\texpect: false,\n\t\tmodule: false,\n\t\tnotDeepEqual: false,\n\t\tnotEqual: false,\n\t\tnotOk: false,\n\t\tnotPropEqual: false,\n\t\tnotStrictEqual: false,\n\t\tok: false,\n\t\tpropEqual: false,\n\t\tQUnit: false,\n\t\traises: false,\n\t\tstart: false,\n\t\tstop: false,\n\t\tstrictEqual: false,\n\t\ttest: false,\n\t\tthrows: false\n\t};\n\tvar phantomjs = {\n\t\tconsole: true,\n\t\texports: true,\n\t\tphantom: true,\n\t\trequire: true,\n\t\tWebPage: true\n\t};\n\tvar couch = {\n\t\temit: false,\n\t\texports: false,\n\t\tgetRow: false,\n\t\tlog: false,\n\t\tmodule: false,\n\t\tprovides: false,\n\t\trequire: false,\n\t\trespond: false,\n\t\tsend: false,\n\t\tstart: false,\n\t\tsum: false\n\t};\n\tvar rhino = {\n\t\tdefineClass: false,\n\t\tdeserialize: false,\n\t\tgc: false,\n\t\thelp: false,\n\t\timportClass: false,\n\t\timportPackage: false,\n\t\tjava: false,\n\t\tload: false,\n\t\tloadClass: false,\n\t\tPackages: false,\n\t\tprint: false,\n\t\tquit: false,\n\t\treadFile: false,\n\t\treadUrl: false,\n\t\trunCommand: false,\n\t\tseal: false,\n\t\tserialize: false,\n\t\tspawn: false,\n\t\tsync: false,\n\t\ttoint32: false,\n\t\tversion: false\n\t};\n\tvar nashorn = {\n\t\t__DIR__: false,\n\t\t__FILE__: false,\n\t\t__LINE__: false,\n\t\tcom: false,\n\t\tedu: false,\n\t\texit: false,\n\t\tjava: false,\n\t\tJava: false,\n\t\tjavafx: false,\n\t\tJavaImporter: false,\n\t\tjavax: false,\n\t\tJSAdapter: false,\n\t\tload: false,\n\t\tloadWithNewGlobal: false,\n\t\torg: false,\n\t\tPackages: false,\n\t\tprint: false,\n\t\tquit: false\n\t};\n\tvar wsh = {\n\t\tActiveXObject: true,\n\t\tEnumerator: true,\n\t\tGetObject: true,\n\t\tScriptEngine: true,\n\t\tScriptEngineBuildVersion: true,\n\t\tScriptEngineMajorVersion: true,\n\t\tScriptEngineMinorVersion: true,\n\t\tVBArray: true,\n\t\tWScript: true,\n\t\tWSH: true,\n\t\tXDomainRequest: true\n\t};\n\tvar jquery = {\n\t\t$: false,\n\t\tjQuery: false\n\t};\n\tvar yui = {\n\t\tYAHOO: false,\n\t\tYAHOO_config: false,\n\t\tYUI: false,\n\t\tYUI_config: false\n\t};\n\tvar shelljs = {\n\t\tcat: false,\n\t\tcd: false,\n\t\tchmod: false,\n\t\tconfig: false,\n\t\tcp: false,\n\t\tdirs: false,\n\t\techo: false,\n\t\tenv: false,\n\t\terror: false,\n\t\texec: false,\n\t\texit: false,\n\t\tfind: false,\n\t\tgrep: false,\n\t\tln: false,\n\t\tls: false,\n\t\tmkdir: false,\n\t\tmv: false,\n\t\tpopd: false,\n\t\tpushd: false,\n\t\tpwd: false,\n\t\trm: false,\n\t\tsed: false,\n\t\tset: false,\n\t\ttarget: false,\n\t\ttempdir: false,\n\t\ttest: false,\n\t\ttouch: false,\n\t\twhich: false\n\t};\n\tvar prototypejs = {\n\t\t$: false,\n\t\t$$: false,\n\t\t$A: false,\n\t\t$break: false,\n\t\t$continue: false,\n\t\t$F: false,\n\t\t$H: false,\n\t\t$R: false,\n\t\t$w: false,\n\t\tAbstract: false,\n\t\tAjax: false,\n\t\tAutocompleter: false,\n\t\tBuilder: false,\n\t\tClass: false,\n\t\tControl: false,\n\t\tDraggable: false,\n\t\tDraggables: false,\n\t\tDroppables: false,\n\t\tEffect: false,\n\t\tElement: false,\n\t\tEnumerable: false,\n\t\tEvent: false,\n\t\tField: false,\n\t\tForm: false,\n\t\tHash: false,\n\t\tInsertion: false,\n\t\tObjectRange: false,\n\t\tPeriodicalExecuter: false,\n\t\tPosition: false,\n\t\tPrototype: false,\n\t\tScriptaculous: false,\n\t\tSelector: false,\n\t\tSortable: false,\n\t\tSortableObserver: false,\n\t\tSound: false,\n\t\tTemplate: false,\n\t\tToggle: false,\n\t\tTry: false\n\t};\n\tvar meteor = {\n\t\t_: false,\n\t\t$: false,\n\t\tAccounts: false,\n\t\tAccountsClient: false,\n\t\tAccountsCommon: false,\n\t\tAccountsServer: false,\n\t\tApp: false,\n\t\tAssets: false,\n\t\tBlaze: false,\n\t\tcheck: false,\n\t\tCordova: false,\n\t\tDDP: false,\n\t\tDDPRateLimiter: false,\n\t\tDDPServer: false,\n\t\tDeps: false,\n\t\tEJSON: false,\n\t\tEmail: false,\n\t\tHTTP: false,\n\t\tLog: false,\n\t\tMatch: false,\n\t\tMeteor: false,\n\t\tMongo: false,\n\t\tMongoInternals: false,\n\t\tNpm: false,\n\t\tPackage: false,\n\t\tPlugin: false,\n\t\tprocess: false,\n\t\tRandom: false,\n\t\tReactiveDict: false,\n\t\tReactiveVar: false,\n\t\tRouter: false,\n\t\tServiceConfiguration: false,\n\t\tSession: false,\n\t\tshare: false,\n\t\tSpacebars: false,\n\t\tTemplate: false,\n\t\tTinytest: false,\n\t\tTracker: false,\n\t\tUI: false,\n\t\tUtils: false,\n\t\tWebApp: false,\n\t\tWebAppInternals: false\n\t};\n\tvar mongo = {\n\t\t_isWindows: false,\n\t\t_rand: false,\n\t\tBulkWriteResult: false,\n\t\tcat: false,\n\t\tcd: false,\n\t\tconnect: false,\n\t\tdb: false,\n\t\tgetHostName: false,\n\t\tgetMemInfo: false,\n\t\thostname: false,\n\t\tISODate: false,\n\t\tlistFiles: false,\n\t\tload: false,\n\t\tls: false,\n\t\tmd5sumFile: false,\n\t\tmkdir: false,\n\t\tMongo: false,\n\t\tNumberInt: false,\n\t\tNumberLong: false,\n\t\tObjectId: false,\n\t\tPlanCache: false,\n\t\tprint: false,\n\t\tprintjson: false,\n\t\tpwd: false,\n\t\tquit: false,\n\t\tremoveFile: false,\n\t\trs: false,\n\t\tsh: false,\n\t\tUUID: false,\n\t\tversion: false,\n\t\tWriteResult: false\n\t};\n\tvar applescript = {\n\t\t$: false,\n\t\tApplication: false,\n\t\tAutomation: false,\n\t\tconsole: false,\n\t\tdelay: false,\n\t\tLibrary: false,\n\t\tObjC: false,\n\t\tObjectSpecifier: false,\n\t\tPath: false,\n\t\tProgress: false,\n\t\tRef: false\n\t};\n\tvar serviceworker = {\n\t\taddEventListener: false,\n\t\tapplicationCache: false,\n\t\tatob: false,\n\t\tBlob: false,\n\t\tBroadcastChannel: false,\n\t\tbtoa: false,\n\t\tCache: false,\n\t\tcaches: false,\n\t\tCacheStorage: false,\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tClient: false,\n\t\tclients: false,\n\t\tClients: false,\n\t\tclose: true,\n\t\tconsole: false,\n\t\tExtendableEvent: false,\n\t\tExtendableMessageEvent: false,\n\t\tfetch: false,\n\t\tFetchEvent: false,\n\t\tFileReaderSync: false,\n\t\tFormData: false,\n\t\tHeaders: false,\n\t\tIDBCursor: false,\n\t\tIDBCursorWithValue: false,\n\t\tIDBDatabase: false,\n\t\tIDBFactory: false,\n\t\tIDBIndex: false,\n\t\tIDBKeyRange: false,\n\t\tIDBObjectStore: false,\n\t\tIDBOpenDBRequest: false,\n\t\tIDBRequest: false,\n\t\tIDBTransaction: false,\n\t\tIDBVersionChangeEvent: false,\n\t\tImageData: false,\n\t\timportScripts: false,\n\t\tindexedDB: false,\n\t\tlocation: false,\n\t\tMessageChannel: false,\n\t\tMessagePort: false,\n\t\tname: false,\n\t\tnavigator: false,\n\t\tNotification: false,\n\t\tonclose: true,\n\t\tonconnect: true,\n\t\tonerror: true,\n\t\tonfetch: true,\n\t\toninstall: true,\n\t\tonlanguagechange: true,\n\t\tonmessage: true,\n\t\tonmessageerror: true,\n\t\tonnotificationclick: true,\n\t\tonnotificationclose: true,\n\t\tonoffline: true,\n\t\tononline: true,\n\t\tonpush: true,\n\t\tonpushsubscriptionchange: true,\n\t\tonrejectionhandled: true,\n\t\tonsync: true,\n\t\tonunhandledrejection: true,\n\t\tperformance: false,\n\t\tPerformance: false,\n\t\tPerformanceEntry: false,\n\t\tPerformanceMark: false,\n\t\tPerformanceMeasure: false,\n\t\tPerformanceNavigation: false,\n\t\tPerformanceResourceTiming: false,\n\t\tPerformanceTiming: false,\n\t\tpostMessage: true,\n\t\t\"Promise\": false,\n\t\tqueueMicrotask: false,\n\t\tregistration: false,\n\t\tremoveEventListener: false,\n\t\tRequest: false,\n\t\tResponse: false,\n\t\tself: false,\n\t\tServiceWorker: false,\n\t\tServiceWorkerContainer: false,\n\t\tServiceWorkerGlobalScope: false,\n\t\tServiceWorkerMessageEvent: false,\n\t\tServiceWorkerRegistration: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tskipWaiting: false,\n\t\tTextDecoder: false,\n\t\tTextEncoder: false,\n\t\tURL: false,\n\t\tURLSearchParams: false,\n\t\tWebSocket: false,\n\t\tWindowClient: false,\n\t\tWorker: false,\n\t\tWorkerGlobalScope: false,\n\t\tXMLHttpRequest: false\n\t};\n\tvar atomtest = {\n\t\tadvanceClock: false,\n\t\tfakeClearInterval: false,\n\t\tfakeClearTimeout: false,\n\t\tfakeSetInterval: false,\n\t\tfakeSetTimeout: false,\n\t\tresetTimeouts: false,\n\t\twaitsForPromise: false\n\t};\n\tvar embertest = {\n\t\tandThen: false,\n\t\tclick: false,\n\t\tcurrentPath: false,\n\t\tcurrentRouteName: false,\n\t\tcurrentURL: false,\n\t\tfillIn: false,\n\t\tfind: false,\n\t\tfindAll: false,\n\t\tfindWithAssert: false,\n\t\tkeyEvent: false,\n\t\tpauseTest: false,\n\t\tresumeTest: false,\n\t\ttriggerEvent: false,\n\t\tvisit: false,\n\t\twait: false\n\t};\n\tvar protractor = {\n\t\t$: false,\n\t\t$$: false,\n\t\tbrowser: false,\n\t\tby: false,\n\t\tBy: false,\n\t\tDartObject: false,\n\t\telement: false,\n\t\tprotractor: false\n\t};\n\tvar webextensions = {\n\t\tbrowser: false,\n\t\tchrome: false,\n\t\topr: false\n\t};\n\tvar greasemonkey = {\n\t\tcloneInto: false,\n\t\tcreateObjectIn: false,\n\t\texportFunction: false,\n\t\tGM: false,\n\t\tGM_addStyle: false,\n\t\tGM_deleteValue: false,\n\t\tGM_getResourceText: false,\n\t\tGM_getResourceURL: false,\n\t\tGM_getValue: false,\n\t\tGM_info: false,\n\t\tGM_listValues: false,\n\t\tGM_log: false,\n\t\tGM_openInTab: false,\n\t\tGM_registerMenuCommand: false,\n\t\tGM_setClipboard: false,\n\t\tGM_setValue: false,\n\t\tGM_xmlhttpRequest: false,\n\t\tunsafeWindow: false\n\t};\n\tvar devtools = {\n\t\t$: false,\n\t\t$_: false,\n\t\t$$: false,\n\t\t$0: false,\n\t\t$1: false,\n\t\t$2: false,\n\t\t$3: false,\n\t\t$4: false,\n\t\t$x: false,\n\t\tchrome: false,\n\t\tclear: false,\n\t\tcopy: false,\n\t\tdebug: false,\n\t\tdir: false,\n\t\tdirxml: false,\n\t\tgetEventListeners: false,\n\t\tinspect: false,\n\t\tkeys: false,\n\t\tmonitor: false,\n\t\tmonitorEvents: false,\n\t\tprofile: false,\n\t\tprofileEnd: false,\n\t\tqueryObjects: false,\n\t\ttable: false,\n\t\tundebug: false,\n\t\tunmonitor: false,\n\t\tunmonitorEvents: false,\n\t\tvalues: false\n\t};\n\tvar require$$0$7 = {\n\t\tbuiltin: builtin,\n\t\tes5: es5,\n\t\tes2015: es2015,\n\t\tes2017: es2017,\n\t\tbrowser: browser$2,\n\t\tworker: worker,\n\t\tnode: node,\n\t\tcommonjs: commonjs,\n\t\tamd: amd,\n\t\tmocha: mocha,\n\t\tjasmine: jasmine,\n\t\tjest: jest,\n\t\tqunit: qunit,\n\t\tphantomjs: phantomjs,\n\t\tcouch: couch,\n\t\trhino: rhino,\n\t\tnashorn: nashorn,\n\t\twsh: wsh,\n\t\tjquery: jquery,\n\t\tyui: yui,\n\t\tshelljs: shelljs,\n\t\tprototypejs: prototypejs,\n\t\tmeteor: meteor,\n\t\tmongo: mongo,\n\t\tapplescript: applescript,\n\t\tserviceworker: serviceworker,\n\t\tatomtest: atomtest,\n\t\tembertest: embertest,\n\t\tprotractor: protractor,\n\t\t\"shared-node-browser\": {\n\t\tclearInterval: false,\n\t\tclearTimeout: false,\n\t\tconsole: false,\n\t\tsetInterval: false,\n\t\tsetTimeout: false,\n\t\tURL: false,\n\t\tURLSearchParams: false\n\t},\n\t\twebextensions: webextensions,\n\t\tgreasemonkey: greasemonkey,\n\t\tdevtools: devtools\n\t};\n\n\tvar globalsBABEL_8_BREAKINGFalse = require$$0$7;\n\n\tvar globals = globalsBABEL_8_BREAKINGFalse;\n\n\tvar path$3 = new WeakMap();\n\tvar scope = new WeakMap();\n\tfunction clear() {\n\t clearPath();\n\t clearScope();\n\t}\n\tfunction clearPath() {\n\t path$3 = new WeakMap();\n\t}\n\tfunction clearScope() {\n\t scope = new WeakMap();\n\t}\n\n\tvar cache$2 = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tget path () { return path$3; },\n\t\tget scope () { return scope; },\n\t\tclear: clear,\n\t\tclearPath: clearPath,\n\t\tclearScope: clearScope\n\t});\n\n\tvar NOT_LOCAL_BINDING$1 = NOT_LOCAL_BINDING$2,\n\t callExpression$d = callExpression$e,\n\t cloneNode$g = cloneNode$i,\n\t getBindingIdentifiers$1 = getBindingIdentifiers$2,\n\t identifier$h = identifier$j,\n\t isArrayExpression$1 = isArrayExpression$2,\n\t isBinary$2 = isBinary$3,\n\t isClass = isClass$1,\n\t isClassBody = isClassBody$1,\n\t isClassDeclaration$2 = isClassDeclaration$3,\n\t isExportAllDeclaration = isExportAllDeclaration$1,\n\t isExportDefaultDeclaration$2 = isExportDefaultDeclaration$3,\n\t isExportNamedDeclaration$1 = isExportNamedDeclaration$2,\n\t isFunctionDeclaration = isFunctionDeclaration$1,\n\t isIdentifier$e = isIdentifier$g,\n\t isImportDeclaration = isImportDeclaration$2,\n\t isLiteral$6 = isLiteral$7,\n\t isMethod = isMethod$1,\n\t isModuleDeclaration = isModuleDeclaration$1,\n\t isModuleSpecifier = isModuleSpecifier$1,\n\t isObjectExpression$2 = isObjectExpression$3,\n\t isProperty$1 = isProperty$2,\n\t isPureish$1 = isPureish$2,\n\t isSuper$1 = isSuper$2,\n\t isTaggedTemplateExpression$1 = isTaggedTemplateExpression$2,\n\t isTemplateLiteral$1 = isTemplateLiteral$2,\n\t isThisExpression$1 = isThisExpression$2,\n\t isUnaryExpression = isUnaryExpression$1,\n\t isVariableDeclaration$1 = isVariableDeclaration$3,\n\t matchesPattern$1 = matchesPattern$2,\n\t memberExpression$a = memberExpression$b,\n\t numericLiteral$7 = numericLiteral$8,\n\t toIdentifier = toIdentifier$1,\n\t unaryExpression$6 = unaryExpression$7,\n\t variableDeclaration$6 = variableDeclaration$8,\n\t variableDeclarator$6 = variableDeclarator$8;\n\n\tfunction gatherNodeParts(node, parts) {\n\t switch (node == null ? void 0 : node.type) {\n\t default:\n\t if (isModuleDeclaration(node)) {\n\t if ((isExportAllDeclaration(node) || isExportNamedDeclaration$1(node) || isImportDeclaration(node)) && node.source) {\n\t gatherNodeParts(node.source, parts);\n\t } else if ((isExportNamedDeclaration$1(node) || isImportDeclaration(node)) && node.specifiers && node.specifiers.length) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(node.specifiers), _step; !(_step = _iterator()).done;) {\n\t var e = _step.value;\n\t gatherNodeParts(e, parts);\n\t }\n\t } else if ((isExportDefaultDeclaration$2(node) || isExportNamedDeclaration$1(node)) && node.declaration) {\n\t gatherNodeParts(node.declaration, parts);\n\t }\n\t } else if (isModuleSpecifier(node)) {\n\t gatherNodeParts(node.local, parts);\n\t } else if (isLiteral$6(node)) {\n\t parts.push(node.value);\n\t }\n\n\t break;\n\n\t case \"MemberExpression\":\n\t case \"OptionalMemberExpression\":\n\t case \"JSXMemberExpression\":\n\t gatherNodeParts(node.object, parts);\n\t gatherNodeParts(node.property, parts);\n\t break;\n\n\t case \"Identifier\":\n\t case \"JSXIdentifier\":\n\t parts.push(node.name);\n\t break;\n\n\t case \"CallExpression\":\n\t case \"OptionalCallExpression\":\n\t case \"NewExpression\":\n\t gatherNodeParts(node.callee, parts);\n\t break;\n\n\t case \"ObjectExpression\":\n\t case \"ObjectPattern\":\n\t for (var _iterator2 = _createForOfIteratorHelperLoose(node.properties), _step2; !(_step2 = _iterator2()).done;) {\n\t var _e = _step2.value;\n\t gatherNodeParts(_e, parts);\n\t }\n\n\t break;\n\n\t case \"SpreadElement\":\n\t case \"RestElement\":\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"ObjectProperty\":\n\t case \"ObjectMethod\":\n\t case \"ClassProperty\":\n\t case \"ClassMethod\":\n\t case \"ClassPrivateProperty\":\n\t case \"ClassPrivateMethod\":\n\t gatherNodeParts(node.key, parts);\n\t break;\n\n\t case \"ThisExpression\":\n\t parts.push(\"this\");\n\t break;\n\n\t case \"Super\":\n\t parts.push(\"super\");\n\t break;\n\n\t case \"Import\":\n\t parts.push(\"import\");\n\t break;\n\n\t case \"DoExpression\":\n\t parts.push(\"do\");\n\t break;\n\n\t case \"YieldExpression\":\n\t parts.push(\"yield\");\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"AwaitExpression\":\n\t parts.push(\"await\");\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"AssignmentExpression\":\n\t gatherNodeParts(node.left, parts);\n\t break;\n\n\t case \"VariableDeclarator\":\n\t gatherNodeParts(node.id, parts);\n\t break;\n\n\t case \"FunctionExpression\":\n\t case \"FunctionDeclaration\":\n\t case \"ClassExpression\":\n\t case \"ClassDeclaration\":\n\t gatherNodeParts(node.id, parts);\n\t break;\n\n\t case \"PrivateName\":\n\t gatherNodeParts(node.id, parts);\n\t break;\n\n\t case \"ParenthesizedExpression\":\n\t gatherNodeParts(node.expression, parts);\n\t break;\n\n\t case \"UnaryExpression\":\n\t case \"UpdateExpression\":\n\t gatherNodeParts(node.argument, parts);\n\t break;\n\n\t case \"MetaProperty\":\n\t gatherNodeParts(node.meta, parts);\n\t gatherNodeParts(node.property, parts);\n\t break;\n\n\t case \"JSXElement\":\n\t gatherNodeParts(node.openingElement, parts);\n\t break;\n\n\t case \"JSXOpeningElement\":\n\t parts.push(node.name);\n\t break;\n\n\t case \"JSXFragment\":\n\t gatherNodeParts(node.openingFragment, parts);\n\t break;\n\n\t case \"JSXOpeningFragment\":\n\t parts.push(\"Fragment\");\n\t break;\n\n\t case \"JSXNamespacedName\":\n\t gatherNodeParts(node.namespace, parts);\n\t gatherNodeParts(node.name, parts);\n\t break;\n\t }\n\t}\n\n\tvar collectorVisitor = {\n\t ForStatement: function ForStatement(path) {\n\t var declar = path.get(\"init\");\n\n\t if (declar.isVar()) {\n\t var scope = path.scope;\n\t var parentScope = scope.getFunctionParent() || scope.getProgramParent();\n\t parentScope.registerBinding(\"var\", declar);\n\t }\n\t },\n\t Declaration: function Declaration(path) {\n\t if (path.isBlockScoped()) return;\n\t if (path.isImportDeclaration()) return;\n\t if (path.isExportDeclaration()) return;\n\t var parent = path.scope.getFunctionParent() || path.scope.getProgramParent();\n\t parent.registerDeclaration(path);\n\t },\n\t ImportDeclaration: function ImportDeclaration(path) {\n\t var parent = path.scope.getBlockParent();\n\t parent.registerDeclaration(path);\n\t },\n\t ReferencedIdentifier: function ReferencedIdentifier(path, state) {\n\t state.references.push(path);\n\t },\n\t ForXStatement: function ForXStatement(path, state) {\n\t var left = path.get(\"left\");\n\n\t if (left.isPattern() || left.isIdentifier()) {\n\t state.constantViolations.push(path);\n\t } else if (left.isVar()) {\n\t var scope = path.scope;\n\t var parentScope = scope.getFunctionParent() || scope.getProgramParent();\n\t parentScope.registerBinding(\"var\", left);\n\t }\n\t },\n\t ExportDeclaration: {\n\t exit: function exit(path) {\n\t var node = path.node,\n\t scope = path.scope;\n\t if (isExportAllDeclaration(node)) return;\n\t var declar = node.declaration;\n\n\t if (isClassDeclaration$2(declar) || isFunctionDeclaration(declar)) {\n\t var id = declar.id;\n\t if (!id) return;\n\t var binding = scope.getBinding(id.name);\n\t binding == null ? void 0 : binding.reference(path);\n\t } else if (isVariableDeclaration$1(declar)) {\n\t for (var _iterator3 = _createForOfIteratorHelperLoose(declar.declarations), _step3; !(_step3 = _iterator3()).done;) {\n\t var decl = _step3.value;\n\n\t for (var _i = 0, _Object$keys = Object.keys(getBindingIdentifiers$1(decl)); _i < _Object$keys.length; _i++) {\n\t var _name = _Object$keys[_i];\n\n\t var _binding = scope.getBinding(_name);\n\n\t _binding == null ? void 0 : _binding.reference(path);\n\t }\n\t }\n\t }\n\t }\n\t },\n\t LabeledStatement: function LabeledStatement(path) {\n\t path.scope.getBlockParent().registerDeclaration(path);\n\t },\n\t AssignmentExpression: function AssignmentExpression(path, state) {\n\t state.assignments.push(path);\n\t },\n\t UpdateExpression: function UpdateExpression(path, state) {\n\t state.constantViolations.push(path);\n\t },\n\t UnaryExpression: function UnaryExpression(path, state) {\n\t if (path.node.operator === \"delete\") {\n\t state.constantViolations.push(path);\n\t }\n\t },\n\t BlockScoped: function BlockScoped(path) {\n\t var scope = path.scope;\n\t if (scope.path === path) scope = scope.parent;\n\t var parent = scope.getBlockParent();\n\t parent.registerDeclaration(path);\n\n\t if (path.isClassDeclaration() && path.node.id) {\n\t var id = path.node.id;\n\t var _name2 = id.name;\n\t path.scope.bindings[_name2] = path.scope.parent.getBinding(_name2);\n\t }\n\t },\n\t CatchClause: function CatchClause(path) {\n\t path.scope.registerBinding(\"let\", path);\n\t },\n\t Function: function Function(path) {\n\t if (path.isFunctionExpression() && path.has(\"id\") && !path.get(\"id\").node[NOT_LOCAL_BINDING$1]) {\n\t path.scope.registerBinding(\"local\", path.get(\"id\"), path);\n\t }\n\n\t var params = path.get(\"params\");\n\n\t for (var _iterator4 = _createForOfIteratorHelperLoose(params), _step4; !(_step4 = _iterator4()).done;) {\n\t var param = _step4.value;\n\t path.scope.registerBinding(\"param\", param);\n\t }\n\t },\n\t ClassExpression: function ClassExpression(path) {\n\t if (path.has(\"id\") && !path.get(\"id\").node[NOT_LOCAL_BINDING$1]) {\n\t path.scope.registerBinding(\"local\", path);\n\t }\n\t }\n\t};\n\tvar uid = 0;\n\n\tvar Scope$1 = function () {\n\t function Scope(path) {\n\t this.uid = void 0;\n\t this.path = void 0;\n\t this.block = void 0;\n\t this.labels = void 0;\n\t this.inited = void 0;\n\t this.bindings = void 0;\n\t this.references = void 0;\n\t this.globals = void 0;\n\t this.uids = void 0;\n\t this.data = void 0;\n\t this.crawling = void 0;\n\t var node = path.node;\n\t var cached = scope.get(node);\n\n\t if ((cached == null ? void 0 : cached.path) === path) {\n\t return cached;\n\t }\n\n\t scope.set(node, this);\n\t this.uid = uid++;\n\t this.block = node;\n\t this.path = path;\n\t this.labels = new Map();\n\t this.inited = false;\n\t }\n\n\t var _proto = Scope.prototype;\n\n\t _proto.traverse = function traverse$1(node, opts, state) {\n\t traverse(node, opts, this, state, this.path);\n\t };\n\n\t _proto.generateDeclaredUidIdentifier = function generateDeclaredUidIdentifier(name) {\n\t var id = this.generateUidIdentifier(name);\n\t this.push({\n\t id: id\n\t });\n\t return cloneNode$g(id);\n\t };\n\n\t _proto.generateUidIdentifier = function generateUidIdentifier(name) {\n\t return identifier$h(this.generateUid(name));\n\t };\n\n\t _proto.generateUid = function generateUid(name) {\n\t if (name === void 0) {\n\t name = \"temp\";\n\t }\n\n\t name = toIdentifier(name).replace(/^_+/, \"\").replace(/[0-9]+$/g, \"\");\n\t var uid;\n\t var i = 1;\n\n\t do {\n\t uid = this._generateUid(name, i);\n\t i++;\n\t } while (this.hasLabel(uid) || this.hasBinding(uid) || this.hasGlobal(uid) || this.hasReference(uid));\n\n\t var program = this.getProgramParent();\n\t program.references[uid] = true;\n\t program.uids[uid] = true;\n\t return uid;\n\t };\n\n\t _proto._generateUid = function _generateUid(name, i) {\n\t var id = name;\n\t if (i > 1) id += i;\n\t return \"_\" + id;\n\t };\n\n\t _proto.generateUidBasedOnNode = function generateUidBasedOnNode(node, defaultName) {\n\t var parts = [];\n\t gatherNodeParts(node, parts);\n\t var id = parts.join(\"$\");\n\t id = id.replace(/^_/, \"\") || defaultName || \"ref\";\n\t return this.generateUid(id.slice(0, 20));\n\t };\n\n\t _proto.generateUidIdentifierBasedOnNode = function generateUidIdentifierBasedOnNode(node, defaultName) {\n\t return identifier$h(this.generateUidBasedOnNode(node, defaultName));\n\t };\n\n\t _proto.isStatic = function isStatic(node) {\n\t if (isThisExpression$1(node) || isSuper$1(node)) {\n\t return true;\n\t }\n\n\t if (isIdentifier$e(node)) {\n\t var binding = this.getBinding(node.name);\n\n\t if (binding) {\n\t return binding.constant;\n\t } else {\n\t return this.hasBinding(node.name);\n\t }\n\t }\n\n\t return false;\n\t };\n\n\t _proto.maybeGenerateMemoised = function maybeGenerateMemoised(node, dontPush) {\n\t if (this.isStatic(node)) {\n\t return null;\n\t } else {\n\t var id = this.generateUidIdentifierBasedOnNode(node);\n\n\t if (!dontPush) {\n\t this.push({\n\t id: id\n\t });\n\t return cloneNode$g(id);\n\t }\n\n\t return id;\n\t }\n\t };\n\n\t _proto.checkBlockScopedCollisions = function checkBlockScopedCollisions(local, kind, name, id) {\n\t if (kind === \"param\") return;\n\t if (local.kind === \"local\") return;\n\t var duplicate = kind === \"let\" || local.kind === \"let\" || local.kind === \"const\" || local.kind === \"module\" || local.kind === \"param\" && (kind === \"let\" || kind === \"const\");\n\n\t if (duplicate) {\n\t throw this.hub.buildError(id, \"Duplicate declaration \\\"\" + name + \"\\\"\", TypeError);\n\t }\n\t };\n\n\t _proto.rename = function rename(oldName, newName, block) {\n\t var binding = this.getBinding(oldName);\n\n\t if (binding) {\n\t newName = newName || this.generateUidIdentifier(oldName).name;\n\t return new Renamer(binding, oldName, newName).rename(block);\n\t }\n\t };\n\n\t _proto._renameFromMap = function _renameFromMap(map, oldName, newName, value) {\n\t if (map[oldName]) {\n\t map[newName] = value;\n\t map[oldName] = null;\n\t }\n\t };\n\n\t _proto.dump = function dump() {\n\t var sep = \"-\".repeat(60);\n\t console.log(sep);\n\t var scope = this;\n\n\t do {\n\t console.log(\"#\", scope.block.type);\n\n\t for (var _i2 = 0, _Object$keys2 = Object.keys(scope.bindings); _i2 < _Object$keys2.length; _i2++) {\n\t var _name3 = _Object$keys2[_i2];\n\t var binding = scope.bindings[_name3];\n\t console.log(\" -\", _name3, {\n\t constant: binding.constant,\n\t references: binding.references,\n\t violations: binding.constantViolations.length,\n\t kind: binding.kind\n\t });\n\t }\n\t } while (scope = scope.parent);\n\n\t console.log(sep);\n\t };\n\n\t _proto.toArray = function toArray(node, i, arrayLikeIsIterable) {\n\t if (isIdentifier$e(node)) {\n\t var binding = this.getBinding(node.name);\n\n\t if (binding != null && binding.constant && binding.path.isGenericType(\"Array\")) {\n\t return node;\n\t }\n\t }\n\n\t if (isArrayExpression$1(node)) {\n\t return node;\n\t }\n\n\t if (isIdentifier$e(node, {\n\t name: \"arguments\"\n\t })) {\n\t return callExpression$d(memberExpression$a(memberExpression$a(memberExpression$a(identifier$h(\"Array\"), identifier$h(\"prototype\")), identifier$h(\"slice\")), identifier$h(\"call\")), [node]);\n\t }\n\n\t var helperName;\n\t var args = [node];\n\n\t if (i === true) {\n\t helperName = \"toConsumableArray\";\n\t } else if (i) {\n\t args.push(numericLiteral$7(i));\n\t helperName = \"slicedToArray\";\n\t } else {\n\t helperName = \"toArray\";\n\t }\n\n\t if (arrayLikeIsIterable) {\n\t args.unshift(this.hub.addHelper(helperName));\n\t helperName = \"maybeArrayLike\";\n\t }\n\n\t return callExpression$d(this.hub.addHelper(helperName), args);\n\t };\n\n\t _proto.hasLabel = function hasLabel(name) {\n\t return !!this.getLabel(name);\n\t };\n\n\t _proto.getLabel = function getLabel(name) {\n\t return this.labels.get(name);\n\t };\n\n\t _proto.registerLabel = function registerLabel(path) {\n\t this.labels.set(path.node.label.name, path);\n\t };\n\n\t _proto.registerDeclaration = function registerDeclaration(path) {\n\t if (path.isLabeledStatement()) {\n\t this.registerLabel(path);\n\t } else if (path.isFunctionDeclaration()) {\n\t this.registerBinding(\"hoisted\", path.get(\"id\"), path);\n\t } else if (path.isVariableDeclaration()) {\n\t var declarations = path.get(\"declarations\");\n\n\t for (var _iterator5 = _createForOfIteratorHelperLoose(declarations), _step5; !(_step5 = _iterator5()).done;) {\n\t var declar = _step5.value;\n\t this.registerBinding(path.node.kind, declar);\n\t }\n\t } else if (path.isClassDeclaration()) {\n\t this.registerBinding(\"let\", path);\n\t } else if (path.isImportDeclaration()) {\n\t var specifiers = path.get(\"specifiers\");\n\n\t for (var _iterator6 = _createForOfIteratorHelperLoose(specifiers), _step6; !(_step6 = _iterator6()).done;) {\n\t var specifier = _step6.value;\n\t this.registerBinding(\"module\", specifier);\n\t }\n\t } else if (path.isExportDeclaration()) {\n\t var _declar = path.get(\"declaration\");\n\n\t if (_declar.isClassDeclaration() || _declar.isFunctionDeclaration() || _declar.isVariableDeclaration()) {\n\t this.registerDeclaration(_declar);\n\t }\n\t } else {\n\t this.registerBinding(\"unknown\", path);\n\t }\n\t };\n\n\t _proto.buildUndefinedNode = function buildUndefinedNode() {\n\t return unaryExpression$6(\"void\", numericLiteral$7(0), true);\n\t };\n\n\t _proto.registerConstantViolation = function registerConstantViolation(path) {\n\t var ids = path.getBindingIdentifiers();\n\n\t for (var _i3 = 0, _Object$keys3 = Object.keys(ids); _i3 < _Object$keys3.length; _i3++) {\n\t var _name4 = _Object$keys3[_i3];\n\t var binding = this.getBinding(_name4);\n\t if (binding) binding.reassign(path);\n\t }\n\t };\n\n\t _proto.registerBinding = function registerBinding(kind, path, bindingPath) {\n\t if (bindingPath === void 0) {\n\t bindingPath = path;\n\t }\n\n\t if (!kind) throw new ReferenceError(\"no `kind`\");\n\n\t if (path.isVariableDeclaration()) {\n\t var declarators = path.get(\"declarations\");\n\n\t for (var _iterator7 = _createForOfIteratorHelperLoose(declarators), _step7; !(_step7 = _iterator7()).done;) {\n\t var declar = _step7.value;\n\t this.registerBinding(kind, declar);\n\t }\n\n\t return;\n\t }\n\n\t var parent = this.getProgramParent();\n\t var ids = path.getOuterBindingIdentifiers(true);\n\n\t for (var _i4 = 0, _Object$keys4 = Object.keys(ids); _i4 < _Object$keys4.length; _i4++) {\n\t var _name5 = _Object$keys4[_i4];\n\t parent.references[_name5] = true;\n\n\t for (var _iterator8 = _createForOfIteratorHelperLoose(ids[_name5]), _step8; !(_step8 = _iterator8()).done;) {\n\t var id = _step8.value;\n\t var local = this.getOwnBinding(_name5);\n\n\t if (local) {\n\t if (local.identifier === id) continue;\n\t this.checkBlockScopedCollisions(local, kind, _name5, id);\n\t }\n\n\t if (local) {\n\t this.registerConstantViolation(bindingPath);\n\t } else {\n\t this.bindings[_name5] = new Binding({\n\t identifier: id,\n\t scope: this,\n\t path: bindingPath,\n\t kind: kind\n\t });\n\t }\n\t }\n\t }\n\t };\n\n\t _proto.addGlobal = function addGlobal(node) {\n\t this.globals[node.name] = node;\n\t };\n\n\t _proto.hasUid = function hasUid(name) {\n\t var scope = this;\n\n\t do {\n\t if (scope.uids[name]) return true;\n\t } while (scope = scope.parent);\n\n\t return false;\n\t };\n\n\t _proto.hasGlobal = function hasGlobal(name) {\n\t var scope = this;\n\n\t do {\n\t if (scope.globals[name]) return true;\n\t } while (scope = scope.parent);\n\n\t return false;\n\t };\n\n\t _proto.hasReference = function hasReference(name) {\n\t return !!this.getProgramParent().references[name];\n\t };\n\n\t _proto.isPure = function isPure(node, constantsOnly) {\n\t if (isIdentifier$e(node)) {\n\t var binding = this.getBinding(node.name);\n\t if (!binding) return false;\n\t if (constantsOnly) return binding.constant;\n\t return true;\n\t } else if (isClass(node)) {\n\t if (node.superClass && !this.isPure(node.superClass, constantsOnly)) {\n\t return false;\n\t }\n\n\t return this.isPure(node.body, constantsOnly);\n\t } else if (isClassBody(node)) {\n\t for (var _iterator9 = _createForOfIteratorHelperLoose(node.body), _step9; !(_step9 = _iterator9()).done;) {\n\t var method = _step9.value;\n\t if (!this.isPure(method, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else if (isBinary$2(node)) {\n\t return this.isPure(node.left, constantsOnly) && this.isPure(node.right, constantsOnly);\n\t } else if (isArrayExpression$1(node)) {\n\t for (var _iterator10 = _createForOfIteratorHelperLoose(node.elements), _step10; !(_step10 = _iterator10()).done;) {\n\t var elem = _step10.value;\n\t if (!this.isPure(elem, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else if (isObjectExpression$2(node)) {\n\t for (var _iterator11 = _createForOfIteratorHelperLoose(node.properties), _step11; !(_step11 = _iterator11()).done;) {\n\t var prop = _step11.value;\n\t if (!this.isPure(prop, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else if (isMethod(node)) {\n\t if (node.computed && !this.isPure(node.key, constantsOnly)) return false;\n\t if (node.kind === \"get\" || node.kind === \"set\") return false;\n\t return true;\n\t } else if (isProperty$1(node)) {\n\t if (node.computed && !this.isPure(node.key, constantsOnly)) return false;\n\t return this.isPure(node.value, constantsOnly);\n\t } else if (isUnaryExpression(node)) {\n\t return this.isPure(node.argument, constantsOnly);\n\t } else if (isTaggedTemplateExpression$1(node)) {\n\t return matchesPattern$1(node.tag, \"String.raw\") && !this.hasBinding(\"String\", true) && this.isPure(node.quasi, constantsOnly);\n\t } else if (isTemplateLiteral$1(node)) {\n\t for (var _iterator12 = _createForOfIteratorHelperLoose(node.expressions), _step12; !(_step12 = _iterator12()).done;) {\n\t var expression = _step12.value;\n\t if (!this.isPure(expression, constantsOnly)) return false;\n\t }\n\n\t return true;\n\t } else {\n\t return isPureish$1(node);\n\t }\n\t };\n\n\t _proto.setData = function setData(key, val) {\n\t return this.data[key] = val;\n\t };\n\n\t _proto.getData = function getData(key) {\n\t var scope = this;\n\n\t do {\n\t var data = scope.data[key];\n\t if (data != null) return data;\n\t } while (scope = scope.parent);\n\t };\n\n\t _proto.removeData = function removeData(key) {\n\t var scope = this;\n\n\t do {\n\t var data = scope.data[key];\n\t if (data != null) scope.data[key] = null;\n\t } while (scope = scope.parent);\n\t };\n\n\t _proto.init = function init() {\n\t if (!this.inited) {\n\t this.inited = true;\n\t this.crawl();\n\t }\n\t };\n\n\t _proto.crawl = function crawl() {\n\t var path = this.path;\n\t this.references = Object.create(null);\n\t this.bindings = Object.create(null);\n\t this.globals = Object.create(null);\n\t this.uids = Object.create(null);\n\t this.data = Object.create(null);\n\t var programParent = this.getProgramParent();\n\t if (programParent.crawling) return;\n\t var state = {\n\t references: [],\n\t constantViolations: [],\n\t assignments: []\n\t };\n\t this.crawling = true;\n\n\t if (path.type !== \"Program\" && collectorVisitor._exploded) {\n\t for (var _iterator13 = _createForOfIteratorHelperLoose(collectorVisitor.enter), _step13; !(_step13 = _iterator13()).done;) {\n\t var _visit = _step13.value;\n\n\t _visit(path, state);\n\t }\n\n\t var typeVisitors = collectorVisitor[path.type];\n\n\t if (typeVisitors) {\n\t for (var _iterator14 = _createForOfIteratorHelperLoose(typeVisitors.enter), _step14; !(_step14 = _iterator14()).done;) {\n\t var visit = _step14.value;\n\t visit(path, state);\n\t }\n\t }\n\t }\n\n\t path.traverse(collectorVisitor, state);\n\t this.crawling = false;\n\n\t for (var _iterator15 = _createForOfIteratorHelperLoose(state.assignments), _step15; !(_step15 = _iterator15()).done;) {\n\t var _path = _step15.value;\n\n\t var ids = _path.getBindingIdentifiers();\n\n\t for (var _i5 = 0, _Object$keys5 = Object.keys(ids); _i5 < _Object$keys5.length; _i5++) {\n\t var _name6 = _Object$keys5[_i5];\n\t if (_path.scope.getBinding(_name6)) continue;\n\t programParent.addGlobal(ids[_name6]);\n\t }\n\n\t _path.scope.registerConstantViolation(_path);\n\t }\n\n\t for (var _iterator16 = _createForOfIteratorHelperLoose(state.references), _step16; !(_step16 = _iterator16()).done;) {\n\t var ref = _step16.value;\n\t var binding = ref.scope.getBinding(ref.node.name);\n\n\t if (binding) {\n\t binding.reference(ref);\n\t } else {\n\t programParent.addGlobal(ref.node);\n\t }\n\t }\n\n\t for (var _iterator17 = _createForOfIteratorHelperLoose(state.constantViolations), _step17; !(_step17 = _iterator17()).done;) {\n\t var _path2 = _step17.value;\n\n\t _path2.scope.registerConstantViolation(_path2);\n\t }\n\t };\n\n\t _proto.push = function push(opts) {\n\t var path = this.path;\n\n\t if (!path.isBlockStatement() && !path.isProgram()) {\n\t path = this.getBlockParent().path;\n\t }\n\n\t if (path.isSwitchStatement()) {\n\t path = (this.getFunctionParent() || this.getProgramParent()).path;\n\t }\n\n\t if (path.isLoop() || path.isCatchClause() || path.isFunction()) {\n\t path.ensureBlock();\n\t path = path.get(\"body\");\n\t }\n\n\t var unique = opts.unique;\n\t var kind = opts.kind || \"var\";\n\t var blockHoist = opts._blockHoist == null ? 2 : opts._blockHoist;\n\t var dataKey = \"declaration:\" + kind + \":\" + blockHoist;\n\t var declarPath = !unique && path.getData(dataKey);\n\n\t if (!declarPath) {\n\t var declar = variableDeclaration$6(kind, []);\n\t declar._blockHoist = blockHoist;\n\n\t var _path$unshiftContaine = path.unshiftContainer(\"body\", [declar]);\n\n\t var _path$unshiftContaine2 = _slicedToArray$1(_path$unshiftContaine, 1);\n\n\t declarPath = _path$unshiftContaine2[0];\n\t if (!unique) path.setData(dataKey, declarPath);\n\t }\n\n\t var declarator = variableDeclarator$6(opts.id, opts.init);\n\t declarPath.node.declarations.push(declarator);\n\t this.registerBinding(kind, declarPath.get(\"declarations\").pop());\n\t };\n\n\t _proto.getProgramParent = function getProgramParent() {\n\t var scope = this;\n\n\t do {\n\t if (scope.path.isProgram()) {\n\t return scope;\n\t }\n\t } while (scope = scope.parent);\n\n\t throw new Error(\"Couldn't find a Program\");\n\t };\n\n\t _proto.getFunctionParent = function getFunctionParent() {\n\t var scope = this;\n\n\t do {\n\t if (scope.path.isFunctionParent()) {\n\t return scope;\n\t }\n\t } while (scope = scope.parent);\n\n\t return null;\n\t };\n\n\t _proto.getBlockParent = function getBlockParent() {\n\t var scope = this;\n\n\t do {\n\t if (scope.path.isBlockParent()) {\n\t return scope;\n\t }\n\t } while (scope = scope.parent);\n\n\t throw new Error(\"We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...\");\n\t };\n\n\t _proto.getAllBindings = function getAllBindings() {\n\t var ids = Object.create(null);\n\t var scope = this;\n\n\t do {\n\t for (var _i6 = 0, _Object$keys6 = Object.keys(scope.bindings); _i6 < _Object$keys6.length; _i6++) {\n\t var key = _Object$keys6[_i6];\n\n\t if (key in ids === false) {\n\t ids[key] = scope.bindings[key];\n\t }\n\t }\n\n\t scope = scope.parent;\n\t } while (scope);\n\n\t return ids;\n\t };\n\n\t _proto.getAllBindingsOfKind = function getAllBindingsOfKind() {\n\t var ids = Object.create(null);\n\n\t for (var _len = arguments.length, kinds = new Array(_len), _key = 0; _key < _len; _key++) {\n\t kinds[_key] = arguments[_key];\n\t }\n\n\t for (var _i7 = 0, _kinds = kinds; _i7 < _kinds.length; _i7++) {\n\t var kind = _kinds[_i7];\n\t var scope = this;\n\n\t do {\n\t for (var _i8 = 0, _Object$keys7 = Object.keys(scope.bindings); _i8 < _Object$keys7.length; _i8++) {\n\t var _name7 = _Object$keys7[_i8];\n\t var binding = scope.bindings[_name7];\n\t if (binding.kind === kind) ids[_name7] = binding;\n\t }\n\n\t scope = scope.parent;\n\t } while (scope);\n\t }\n\n\t return ids;\n\t };\n\n\t _proto.bindingIdentifierEquals = function bindingIdentifierEquals(name, node) {\n\t return this.getBindingIdentifier(name) === node;\n\t };\n\n\t _proto.getBinding = function getBinding(name) {\n\t var scope = this;\n\t var previousPath;\n\n\t do {\n\t var binding = scope.getOwnBinding(name);\n\n\t if (binding) {\n\t var _previousPath;\n\n\t if ((_previousPath = previousPath) != null && _previousPath.isPattern() && binding.kind !== \"param\") ; else {\n\t return binding;\n\t }\n\t }\n\n\t previousPath = scope.path;\n\t } while (scope = scope.parent);\n\t };\n\n\t _proto.getOwnBinding = function getOwnBinding(name) {\n\t return this.bindings[name];\n\t };\n\n\t _proto.getBindingIdentifier = function getBindingIdentifier(name) {\n\t var _this$getBinding;\n\n\t return (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.identifier;\n\t };\n\n\t _proto.getOwnBindingIdentifier = function getOwnBindingIdentifier(name) {\n\t var binding = this.bindings[name];\n\t return binding == null ? void 0 : binding.identifier;\n\t };\n\n\t _proto.hasOwnBinding = function hasOwnBinding(name) {\n\t return !!this.getOwnBinding(name);\n\t };\n\n\t _proto.hasBinding = function hasBinding(name, noGlobals) {\n\t if (!name) return false;\n\t if (this.hasOwnBinding(name)) return true;\n\t if (this.parentHasBinding(name, noGlobals)) return true;\n\t if (this.hasUid(name)) return true;\n\t if (!noGlobals && Scope.globals.includes(name)) return true;\n\t if (!noGlobals && Scope.contextVariables.includes(name)) return true;\n\t return false;\n\t };\n\n\t _proto.parentHasBinding = function parentHasBinding(name, noGlobals) {\n\t var _this$parent;\n\n\t return (_this$parent = this.parent) == null ? void 0 : _this$parent.hasBinding(name, noGlobals);\n\t };\n\n\t _proto.moveBindingTo = function moveBindingTo(name, scope) {\n\t var info = this.getBinding(name);\n\n\t if (info) {\n\t info.scope.removeOwnBinding(name);\n\t info.scope = scope;\n\t scope.bindings[name] = info;\n\t }\n\t };\n\n\t _proto.removeOwnBinding = function removeOwnBinding(name) {\n\t delete this.bindings[name];\n\t };\n\n\t _proto.removeBinding = function removeBinding(name) {\n\t var _this$getBinding2;\n\n\t (_this$getBinding2 = this.getBinding(name)) == null ? void 0 : _this$getBinding2.scope.removeOwnBinding(name);\n\t var scope = this;\n\n\t do {\n\t if (scope.uids[name]) {\n\t scope.uids[name] = false;\n\t }\n\t } while (scope = scope.parent);\n\t };\n\n\t _createClass(Scope, [{\n\t key: \"parent\",\n\t get: function get() {\n\t var _parent;\n\n\t var parent,\n\t path = this.path;\n\n\t do {\n\t var isKey = path.key === \"key\";\n\t path = path.parentPath;\n\t if (isKey && path.isMethod()) path = path.parentPath;\n\t if (path && path.isScope()) parent = path;\n\t } while (path && !parent);\n\n\t return (_parent = parent) == null ? void 0 : _parent.scope;\n\t }\n\t }, {\n\t key: \"parentBlock\",\n\t get: function get() {\n\t return this.path.parent;\n\t }\n\t }, {\n\t key: \"hub\",\n\t get: function get() {\n\t return this.path.hub;\n\t }\n\t }]);\n\n\t return Scope;\n\t}();\n\n\tScope$1.globals = Object.keys(globals.builtin);\n\tScope$1.contextVariables = [\"arguments\", \"undefined\", \"Infinity\", \"NaN\"];\n\n\tvar intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n\tvar encode$1 = function encode(number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t};\n\n\tvar decode$1 = function decode(charCode) {\n\t var bigA = 65;\n\t var bigZ = 90;\n\t var littleA = 97;\n\t var littleZ = 122;\n\t var zero = 48;\n\t var nine = 57;\n\t var plus = 43;\n\t var slash = 47;\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return charCode - bigA;\n\t }\n\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return charCode - littleA + littleOffset;\n\t }\n\n\t if (zero <= charCode && charCode <= nine) {\n\t return charCode - zero + numberOffset;\n\t }\n\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\n\t return -1;\n\t};\n\n\tvar base64 = {\n\t encode: encode$1,\n\t decode: decode$1\n\t};\n\n\tvar VLQ_BASE_SHIFT = 5;\n\tvar VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\tvar VLQ_BASE_MASK = VLQ_BASE - 1;\n\tvar VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n\tfunction toVLQSigned(aValue) {\n\t return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0;\n\t}\n\n\tfunction fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative ? -shifted : shifted;\n\t}\n\n\tvar encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t var vlq = toVLQSigned(aValue);\n\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\n\t if (vlq > 0) {\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\n\t return encoded;\n\t};\n\n\tvar decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t};\n\n\tvar base64Vlq = {\n\t encode: encode,\n\t decode: decode\n\t};\n\n\tvar util$5 = createCommonjsModule(function (module, exports) {\n\t function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }\n\n\t exports.getArg = getArg;\n\t var urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\t var dataUrlRegexp = /^data:.+\\,.+$/;\n\n\t function urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\n\t if (!match) {\n\t return null;\n\t }\n\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t }\n\n\t exports.urlParse = urlParse;\n\n\t function urlGenerate(aParsedUrl) {\n\t var url = '';\n\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\n\t url += '//';\n\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port;\n\t }\n\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\n\t return url;\n\t }\n\n\t exports.urlGenerate = urlGenerate;\n\n\t function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\n\t path = url.path;\n\t }\n\n\t var isAbsolute = exports.isAbsolute(path);\n\t var parts = path.split(/\\/+/);\n\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\n\t path = parts.join('/');\n\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\n\t return path;\n\t }\n\n\t exports.normalize = normalize;\n\n\t function join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\n\t return urlGenerate(aPathUrl);\n\t }\n\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\n\t var joined = aPath.charAt(0) === '/' ? aPath : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\n\t return joined;\n\t }\n\n\t exports.join = join;\n\n\t exports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t };\n\n\t function relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t var level = 0;\n\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\n\t if (index < 0) {\n\t return aPath;\n\t }\n\n\t aRoot = aRoot.slice(0, index);\n\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\n\t ++level;\n\t }\n\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t }\n\n\t exports.relative = relative;\n\n\t var supportsNullProto = function () {\n\t var obj = Object.create(null);\n\t return !('__proto__' in obj);\n\t }();\n\n\t function identity(s) {\n\t return s;\n\t }\n\n\t function toSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return '$' + aStr;\n\t }\n\n\t return aStr;\n\t }\n\n\t exports.toSetString = supportsNullProto ? identity : toSetString;\n\n\t function fromSetString(aStr) {\n\t if (isProtoString(aStr)) {\n\t return aStr.slice(1);\n\t }\n\n\t return aStr;\n\t }\n\n\t exports.fromSetString = supportsNullProto ? identity : fromSetString;\n\n\t function isProtoString(s) {\n\t if (!s) {\n\t return false;\n\t }\n\n\t var length = s.length;\n\n\t if (length < 9) {\n\t return false;\n\t }\n\n\t if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) {\n\t return false;\n\t }\n\n\t for (var i = length - 10; i >= 0; i--) {\n\t if (s.charCodeAt(i) !== 36) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t return mappingA.name - mappingB.name;\n\t }\n\n\t exports.compareByOriginalPositions = compareByOriginalPositions;\n\n\t function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.source - mappingB.source;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t return mappingA.name - mappingB.name;\n\t }\n\n\t exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\n\t function strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\n\t return -1;\n\t }\n\n\t function compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\n\t return strcmp(mappingA.name, mappingB.name);\n\t }\n\n\t exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t}, \"/$$rollup_base$$/node_modules/source-map/lib\");\n\n\tvar has$b = Object.prototype.hasOwnProperty;\n\tvar hasNativeMap = typeof Map !== \"undefined\";\n\n\tfunction ArraySet$2() {\n\t this._array = [];\n\t this._set = hasNativeMap ? new Map() : Object.create(null);\n\t}\n\n\tArraySet$2.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet$2();\n\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\n\t return set;\n\t};\n\n\tArraySet$2.prototype.size = function ArraySet_size() {\n\t return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;\n\t};\n\n\tArraySet$2.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = hasNativeMap ? aStr : util$5.toSetString(aStr);\n\t var isDuplicate = hasNativeMap ? this.has(aStr) : has$b.call(this._set, sStr);\n\t var idx = this._array.length;\n\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\n\t if (!isDuplicate) {\n\t if (hasNativeMap) {\n\t this._set.set(aStr, idx);\n\t } else {\n\t this._set[sStr] = idx;\n\t }\n\t }\n\t};\n\n\tArraySet$2.prototype.has = function ArraySet_has(aStr) {\n\t if (hasNativeMap) {\n\t return this._set.has(aStr);\n\t } else {\n\t var sStr = util$5.toSetString(aStr);\n\t return has$b.call(this._set, sStr);\n\t }\n\t};\n\n\tArraySet$2.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t if (hasNativeMap) {\n\t var idx = this._set.get(aStr);\n\n\t if (idx >= 0) {\n\t return idx;\n\t }\n\t } else {\n\t var sStr = util$5.toSetString(aStr);\n\n\t if (has$b.call(this._set, sStr)) {\n\t return this._set[sStr];\n\t }\n\t }\n\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t};\n\n\tArraySet$2.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\n\t throw new Error('No element indexed by ' + aIdx);\n\t};\n\n\tArraySet$2.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t};\n\n\tvar ArraySet_1 = ArraySet$2;\n\tvar arraySet = {\n\t ArraySet: ArraySet_1\n\t};\n\n\tfunction generatedPositionAfter(mappingA, mappingB) {\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA || util$5.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t}\n\n\tfunction MappingList$1() {\n\t this._array = [];\n\t this._sorted = true;\n\t this._last = {\n\t generatedLine: -1,\n\t generatedColumn: 0\n\t };\n\t}\n\n\tMappingList$1.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t};\n\n\tMappingList$1.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\n\t this._array.push(aMapping);\n\t }\n\t};\n\n\tMappingList$1.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util$5.compareByGeneratedPositionsInflated);\n\n\t this._sorted = true;\n\t }\n\n\t return this._array;\n\t};\n\n\tvar MappingList_1 = MappingList$1;\n\tvar mappingList = {\n\t MappingList: MappingList_1\n\t};\n\n\tvar ArraySet$1 = arraySet.ArraySet;\n\tvar MappingList = mappingList.MappingList;\n\n\tfunction SourceMapGenerator$2(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\n\t this._file = util$5.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util$5.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util$5.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet$1();\n\t this._names = new ArraySet$1();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t}\n\n\tSourceMapGenerator$2.prototype._version = 3;\n\n\tSourceMapGenerator$2.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator$2({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\n\t if (sourceRoot != null) {\n\t newMapping.source = util$5.relative(sourceRoot, newMapping.source);\n\t }\n\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t};\n\n\tSourceMapGenerator$2.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util$5.getArg(aArgs, 'generated');\n\t var original = util$5.getArg(aArgs, 'original', null);\n\t var source = util$5.getArg(aArgs, 'source', null);\n\t var name = util$5.getArg(aArgs, 'name', null);\n\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\n\t if (source != null) {\n\t source = String(source);\n\n\t if (!this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t }\n\n\t if (name != null) {\n\t name = String(name);\n\n\t if (!this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t }\n\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t};\n\n\tSourceMapGenerator$2.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\n\t if (this._sourceRoot != null) {\n\t source = util$5.relative(this._sourceRoot, source);\n\t }\n\n\t if (aSourceContent != null) {\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = Object.create(null);\n\t }\n\n\t this._sourcesContents[util$5.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t delete this._sourcesContents[util$5.toSetString(source)];\n\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t};\n\n\tSourceMapGenerator$2.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + 'or the source map\\'s \"file\" property. Both were omitted.');\n\t }\n\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\n\t var sourceRoot = this._sourceRoot;\n\n\t if (sourceRoot != null) {\n\t sourceFile = util$5.relative(sourceRoot, sourceFile);\n\t }\n\n\t var newSources = new ArraySet$1();\n\t var newNames = new ArraySet$1();\n\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\n\t if (original.source != null) {\n\t mapping.source = original.source;\n\n\t if (aSourceMapPath != null) {\n\t mapping.source = util$5.join(aSourceMapPath, mapping.source);\n\t }\n\n\t if (sourceRoot != null) {\n\t mapping.source = util$5.relative(sourceRoot, mapping.source);\n\t }\n\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\n\t var source = mapping.source;\n\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\n\t var name = mapping.name;\n\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t }, this);\n\n\t this._sources = newSources;\n\t this._names = newNames;\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util$5.join(aSourceMapPath, sourceFile);\n\t }\n\n\t if (sourceRoot != null) {\n\t sourceFile = util$5.relative(sourceRoot, sourceFile);\n\t }\n\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t};\n\n\tSourceMapGenerator$2.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) {\n\t if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {\n\t throw new Error('original.line and original.column are not numbers -- you probably meant to omit ' + 'the original mapping entirely and only map the generated position. If so, pass ' + 'null for the original mapping instead of an object with empty or null values.');\n\t }\n\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) {\n\t return;\n\t } else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated && aOriginal && 'line' in aOriginal && 'column' in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) {\n\t return;\n\t } else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t};\n\n\tSourceMapGenerator$2.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var next;\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\n\t var mappings = this._mappings.toArray();\n\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t next = '';\n\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t next += ';';\n\t previousGeneratedLine++;\n\t }\n\t } else {\n\t if (i > 0) {\n\t if (!util$5.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\n\t next += ',';\n\t }\n\t }\n\n\t next += base64Vlq.encode(mapping.generatedColumn - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t next += base64Vlq.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t next += base64Vlq.encode(mapping.originalLine - 1 - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t next += base64Vlq.encode(mapping.originalColumn - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t next += base64Vlq.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\n\t result += next;\n\t }\n\n\t return result;\n\t};\n\n\tSourceMapGenerator$2.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\n\t if (aSourceRoot != null) {\n\t source = util$5.relative(aSourceRoot, source);\n\t }\n\n\t var key = util$5.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null;\n\t }, this);\n\t};\n\n\tSourceMapGenerator$2.prototype.toJSON = function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\n\t return map;\n\t};\n\n\tSourceMapGenerator$2.prototype.toString = function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t};\n\n\tvar SourceMapGenerator_1 = SourceMapGenerator$2;\n\tvar sourceMapGenerator = {\n\t SourceMapGenerator: SourceMapGenerator_1\n\t};\n\n\tvar binarySearch = createCommonjsModule(function (module, exports) {\n\t exports.GREATEST_LOWER_BOUND = 1;\n\t exports.LEAST_UPPER_BOUND = 2;\n\n\t function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\n\t if (cmp === 0) {\n\t return mid;\n\t } else if (cmp > 0) {\n\t if (aHigh - mid > 1) {\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t } else {\n\t if (mid - aLow > 1) {\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t }\n\n\t exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\n\t if (index < 0) {\n\t return -1;\n\t }\n\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\n\t --index;\n\t }\n\n\t return index;\n\t };\n\t}, \"/$$rollup_base$$/node_modules/source-map/lib\");\n\n\tfunction swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t}\n\n\tfunction randomIntInRange(low, high) {\n\t return Math.round(low + Math.random() * (high - low));\n\t}\n\n\tfunction doQuickSort(ary, comparator, p, r) {\n\t if (p < r) {\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t}\n\n\tvar quickSort_1 = function quickSort_1(ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t};\n\n\tvar quickSort$1 = {\n\t quickSort: quickSort_1\n\t};\n\n\tvar ArraySet = arraySet.ArraySet;\n\tvar quickSort = quickSort$1.quickSort;\n\n\tfunction SourceMapConsumer$1(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\n\t return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap) : new BasicSourceMapConsumer(sourceMap);\n\t}\n\n\tSourceMapConsumer$1.fromSourceMap = function (aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t};\n\n\tSourceMapConsumer$1.prototype._version = 3;\n\tSourceMapConsumer$1.prototype.__generatedMappings = null;\n\tObject.defineProperty(SourceMapConsumer$1.prototype, '_generatedMappings', {\n\t get: function get() {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\n\t return this.__generatedMappings;\n\t }\n\t});\n\tSourceMapConsumer$1.prototype.__originalMappings = null;\n\tObject.defineProperty(SourceMapConsumer$1.prototype, '_originalMappings', {\n\t get: function get() {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\n\t return this.__originalMappings;\n\t }\n\t});\n\n\tSourceMapConsumer$1.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t};\n\n\tSourceMapConsumer$1.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t};\n\n\tSourceMapConsumer$1.GENERATED_ORDER = 1;\n\tSourceMapConsumer$1.ORIGINAL_ORDER = 2;\n\tSourceMapConsumer$1.GREATEST_LOWER_BOUND = 1;\n\tSourceMapConsumer$1.LEAST_UPPER_BOUND = 2;\n\n\tSourceMapConsumer$1.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer$1.GENERATED_ORDER;\n\t var mappings;\n\n\t switch (order) {\n\t case SourceMapConsumer$1.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\n\t case SourceMapConsumer$1.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\n\t if (source != null && sourceRoot != null) {\n\t source = util$5.join(sourceRoot, source);\n\t }\n\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t};\n\n\tSourceMapConsumer$1.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util$5.getArg(aArgs, 'line');\n\t var needle = {\n\t source: util$5.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util$5.getArg(aArgs, 'column', 0)\n\t };\n\n\t if (this.sourceRoot != null) {\n\t needle.source = util$5.relative(this.sourceRoot, needle.source);\n\t }\n\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\n\t needle.source = this._sources.indexOf(needle.source);\n\t var mappings = [];\n\n\t var index = this._findMapping(needle, this._originalMappings, \"originalLine\", \"originalColumn\", util$5.compareByOriginalPositions, binarySearch.LEAST_UPPER_BOUND);\n\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util$5.getArg(mapping, 'generatedLine', null),\n\t column: util$5.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util$5.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\n\t while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util$5.getArg(mapping, 'generatedLine', null),\n\t column: util$5.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util$5.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\n\t return mappings;\n\t};\n\n\tvar SourceMapConsumer_1 = SourceMapConsumer$1;\n\n\tfunction BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\n\t var version = util$5.getArg(sourceMap, 'version');\n\t var sources = util$5.getArg(sourceMap, 'sources');\n\t var names = util$5.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util$5.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util$5.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util$5.getArg(sourceMap, 'mappings');\n\t var file = util$5.getArg(sourceMap, 'file', null);\n\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\n\t sources = sources.map(String).map(util$5.normalize).map(function (source) {\n\t return sourceRoot && util$5.isAbsolute(sourceRoot) && util$5.isAbsolute(source) ? util$5.relative(sourceRoot, source) : source;\n\t });\n\t this._names = ArraySet.fromArray(names.map(String), true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t}\n\n\tBasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);\n\tBasicSourceMapConsumer.prototype.consumer = SourceMapConsumer$1;\n\n\tBasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping();\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\n\t destOriginalMappings.push(destMapping);\n\t }\n\n\t destGeneratedMappings.push(destMapping);\n\t }\n\n\t quickSort(smc.__originalMappings, util$5.compareByOriginalPositions);\n\t return smc;\n\t};\n\n\tBasicSourceMapConsumer.prototype._version = 3;\n\tObject.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function get() {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util$5.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t});\n\n\tfunction Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t}\n\n\tBasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t } else if (aStr.charAt(index) === ',') {\n\t index++;\n\t } else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\n\t str = aStr.slice(index, end);\n\t segment = cachedSegments[str];\n\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\n\t while (index < end) {\n\t base64Vlq.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\n\t cachedSegments[str] = segment;\n\t }\n\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\n\t if (segment.length > 1) {\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t mapping.originalLine += 1;\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\n\t if (segment.length > 4) {\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\n\t generatedMappings.push(mapping);\n\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\n\t quickSort(generatedMappings, util$5.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t quickSort(originalMappings, util$5.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t};\n\n\tBasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) {\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got ' + aNeedle[aLineName]);\n\t }\n\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got ' + aNeedle[aColumnName]);\n\t }\n\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t};\n\n\tBasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t};\n\n\tBasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util$5.getArg(aArgs, 'line'),\n\t generatedColumn: util$5.getArg(aArgs, 'column')\n\t };\n\n\t var index = this._findMapping(needle, this._generatedMappings, \"generatedLine\", \"generatedColumn\", util$5.compareByGeneratedPositionsDeflated, util$5.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND));\n\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util$5.getArg(mapping, 'source', null);\n\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\n\t if (this.sourceRoot != null) {\n\t source = util$5.join(this.sourceRoot, source);\n\t }\n\t }\n\n\t var name = util$5.getArg(mapping, 'name', null);\n\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\n\t return {\n\t source: source,\n\t line: util$5.getArg(mapping, 'originalLine', null),\n\t column: util$5.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t};\n\n\tBasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\n\t return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function (sc) {\n\t return sc == null;\n\t });\n\t};\n\n\tBasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\n\t if (this.sourceRoot != null) {\n\t aSource = util$5.relative(this.sourceRoot, aSource);\n\t }\n\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\n\t var url;\n\n\t if (this.sourceRoot != null && (url = util$5.urlParse(this.sourceRoot))) {\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\n\t if (url.scheme == \"file\" && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)];\n\t }\n\n\t if ((!url.path || url.path == \"/\") && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\n\t if (nullOnMissing) {\n\t return null;\n\t } else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t};\n\n\tBasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util$5.getArg(aArgs, 'source');\n\n\t if (this.sourceRoot != null) {\n\t source = util$5.relative(this.sourceRoot, source);\n\t }\n\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\n\t source = this._sources.indexOf(source);\n\t var needle = {\n\t source: source,\n\t originalLine: util$5.getArg(aArgs, 'line'),\n\t originalColumn: util$5.getArg(aArgs, 'column')\n\t };\n\n\t var index = this._findMapping(needle, this._originalMappings, \"originalLine\", \"originalColumn\", util$5.compareByOriginalPositions, util$5.getArg(aArgs, 'bias', SourceMapConsumer$1.GREATEST_LOWER_BOUND));\n\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util$5.getArg(mapping, 'generatedLine', null),\n\t column: util$5.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util$5.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t};\n\n\tvar BasicSourceMapConsumer_1 = BasicSourceMapConsumer;\n\n\tfunction IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\n\t var version = util$5.getArg(sourceMap, 'version');\n\t var sections = util$5.getArg(sourceMap, 'sections');\n\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\n\t var offset = util$5.getArg(s, 'offset');\n\t var offsetLine = util$5.getArg(offset, 'line');\n\t var offsetColumn = util$5.getArg(offset, 'column');\n\n\t if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\n\t lastOffset = offset;\n\t return {\n\t generatedOffset: {\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer$1(util$5.getArg(s, 'map'))\n\t };\n\t });\n\t}\n\n\tIndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer$1.prototype);\n\tIndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer$1;\n\tIndexedSourceMapConsumer.prototype._version = 3;\n\tObject.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function get() {\n\t var sources = [];\n\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\n\t return sources;\n\t }\n\t});\n\n\tIndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util$5.getArg(aArgs, 'line'),\n\t generatedColumn: util$5.getArg(aArgs, 'column')\n\t };\n\t var sectionIndex = binarySearch.search(needle, this._sections, function (needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\n\t if (cmp) {\n\t return cmp;\n\t }\n\n\t return needle.generatedColumn - section.generatedOffset.generatedColumn;\n\t });\n\t var section = this._sections[sectionIndex];\n\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine - (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),\n\t bias: aArgs.bias\n\t });\n\t};\n\n\tIndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t};\n\n\tIndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\n\t if (content) {\n\t return content;\n\t }\n\t }\n\n\t if (nullOnMissing) {\n\t return null;\n\t } else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t};\n\n\tIndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\n\t if (section.consumer.sources.indexOf(util$5.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line + (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t};\n\n\tIndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\n\t var source = section.consumer._sources.at(mapping.source);\n\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util$5.join(section.consumer.sourceRoot, source);\n\t }\n\n\t this._sources.add(source);\n\n\t source = this._sources.indexOf(source);\n\n\t var name = section.consumer._names.at(mapping.name);\n\n\t this._names.add(name);\n\n\t name = this._names.indexOf(name);\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\n\t this.__generatedMappings.push(adjustedMapping);\n\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\n\t quickSort(this.__generatedMappings, util$5.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util$5.compareByOriginalPositions);\n\t};\n\n\tvar IndexedSourceMapConsumer_1 = IndexedSourceMapConsumer;\n\tvar sourceMapConsumer = {\n\t SourceMapConsumer: SourceMapConsumer_1,\n\t BasicSourceMapConsumer: BasicSourceMapConsumer_1,\n\t IndexedSourceMapConsumer: IndexedSourceMapConsumer_1\n\t};\n\n\tvar SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator;\n\tvar REGEX_NEWLINE = /(\\r?\\n)/;\n\tvar NEWLINE_CODE = 10;\n\tvar isSourceNode = \"$$$isSourceNode$$$\";\n\n\tfunction SourceNode$1(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t}\n\n\tSourceNode$1.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t var node = new SourceNode$1();\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var remainingLinesIndex = 0;\n\n\t var shiftNextLine = function shiftNextLine() {\n\t var lineContents = getNextLine();\n\t var newLine = getNextLine() || \"\";\n\t return lineContents + newLine;\n\n\t function getNextLine() {\n\t return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : undefined;\n\t }\n\t };\n\n\t var lastGeneratedLine = 1,\n\t lastGeneratedColumn = 0;\n\t var lastMapping = null;\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t } else {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn);\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[remainingLinesIndex];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\n\t lastMapping = mapping;\n\t }, this);\n\n\t if (remainingLinesIndex < remainingLines.length) {\n\t if (lastMapping) {\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\n\t node.add(remainingLines.splice(remainingLinesIndex).join(\"\"));\n\t }\n\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util$5.join(aRelativePath, sourceFile);\n\t }\n\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return node;\n\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath ? util$5.join(aRelativePath, mapping.source) : mapping.source;\n\t node.add(new SourceNode$1(mapping.originalLine, mapping.originalColumn, source, code, mapping.name));\n\t }\n\t }\n\t};\n\n\tSourceNode$1.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t } else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t } else {\n\t throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk);\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length - 1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t } else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t } else {\n\t throw new TypeError(\"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk);\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t } else {\n\t if (chunk !== '') {\n\t aFn(chunk, {\n\t source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name\n\t });\n\t }\n\t }\n\t }\n\t};\n\n\tSourceNode$1.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\n\t if (len > 0) {\n\t newChildren = [];\n\n\t for (i = 0; i < len - 1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t } else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t } else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\n\t return this;\n\t};\n\n\tSourceNode$1.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util$5.toSetString(aSourceFile)] = aSourceContent;\n\t};\n\n\tSourceNode$1.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\n\t var sources = Object.keys(this.sourceContents);\n\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util$5.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t};\n\n\tSourceNode$1.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t};\n\n\tSourceNode$1.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator$1(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\n\t if (original.source !== null && original.line !== null && original.column !== null) {\n\t if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t return {\n\t code: generated.code,\n\t map: map\n\t };\n\t};\n\n\tvar SourceNode_1 = SourceNode$1;\n\tvar sourceNode = {\n\t SourceNode: SourceNode_1\n\t};\n\n\tvar SourceMapGenerator = sourceMapGenerator.SourceMapGenerator;\n\tvar SourceMapConsumer = sourceMapConsumer.SourceMapConsumer;\n\tvar SourceNode = sourceNode.SourceNode;\n\tvar sourceMap = {\n\t SourceMapGenerator: SourceMapGenerator,\n\t SourceMapConsumer: SourceMapConsumer,\n\t SourceNode: SourceNode\n\t};\n\n\tvar SourceMap = function () {\n\t function SourceMap(opts, code) {\n\t this._cachedMap = void 0;\n\t this._code = void 0;\n\t this._opts = void 0;\n\t this._rawMappings = void 0;\n\t this._lastGenLine = void 0;\n\t this._lastSourceLine = void 0;\n\t this._lastSourceColumn = void 0;\n\t this._cachedMap = null;\n\t this._code = code;\n\t this._opts = opts;\n\t this._rawMappings = [];\n\t }\n\n\t var _proto = SourceMap.prototype;\n\n\t _proto.get = function get() {\n\t if (!this._cachedMap) {\n\t var map = this._cachedMap = new sourceMap.SourceMapGenerator({\n\t sourceRoot: this._opts.sourceRoot\n\t });\n\t var code = this._code;\n\n\t if (typeof code === \"string\") {\n\t map.setSourceContent(this._opts.sourceFileName.replace(/\\\\/g, \"/\"), code);\n\t } else if (typeof code === \"object\") {\n\t Object.keys(code).forEach(function (sourceFileName) {\n\t map.setSourceContent(sourceFileName.replace(/\\\\/g, \"/\"), code[sourceFileName]);\n\t });\n\t }\n\n\t this._rawMappings.forEach(function (mapping) {\n\t return map.addMapping(mapping);\n\t }, map);\n\t }\n\n\t return this._cachedMap.toJSON();\n\t };\n\n\t _proto.getRawMappings = function getRawMappings() {\n\t return this._rawMappings.slice();\n\t };\n\n\t _proto.mark = function mark(generatedLine, generatedColumn, line, column, identifierName, filename, force) {\n\t if (this._lastGenLine !== generatedLine && line === null) return;\n\n\t if (!force && this._lastGenLine === generatedLine && this._lastSourceLine === line && this._lastSourceColumn === column) {\n\t return;\n\t }\n\n\t this._cachedMap = null;\n\t this._lastGenLine = generatedLine;\n\t this._lastSourceLine = line;\n\t this._lastSourceColumn = column;\n\n\t this._rawMappings.push({\n\t name: identifierName || undefined,\n\t generated: {\n\t line: generatedLine,\n\t column: generatedColumn\n\t },\n\t source: line == null ? undefined : (filename || this._opts.sourceFileName).replace(/\\\\/g, \"/\"),\n\t original: line == null ? undefined : {\n\t line: line,\n\t column: column\n\t }\n\t });\n\t };\n\n\t return SourceMap;\n\t}();\n\n\tvar SPACES_RE = /^[ \\t]+$/;\n\n\tvar Buffer = function () {\n\t function Buffer(map) {\n\t this._map = null;\n\t this._buf = \"\";\n\t this._last = 0;\n\t this._queue = [];\n\t this._position = {\n\t line: 1,\n\t column: 0\n\t };\n\t this._sourcePosition = {\n\t identifierName: null,\n\t line: null,\n\t column: null,\n\t filename: null\n\t };\n\t this._disallowedPop = null;\n\t this._map = map;\n\t }\n\n\t var _proto = Buffer.prototype;\n\n\t _proto.get = function get() {\n\t this._flush();\n\n\t var map = this._map;\n\t var result = {\n\t code: this._buf.trimRight(),\n\t map: null,\n\t rawMappings: map == null ? void 0 : map.getRawMappings()\n\t };\n\n\t if (map) {\n\t Object.defineProperty(result, \"map\", {\n\t configurable: true,\n\t enumerable: true,\n\t get: function get() {\n\t return this.map = map.get();\n\t },\n\t set: function set(value) {\n\t Object.defineProperty(this, \"map\", {\n\t value: value,\n\t writable: true\n\t });\n\t }\n\t });\n\t }\n\n\t return result;\n\t };\n\n\t _proto.append = function append(str) {\n\t this._flush();\n\n\t var _this$_sourcePosition = this._sourcePosition,\n\t line = _this$_sourcePosition.line,\n\t column = _this$_sourcePosition.column,\n\t filename = _this$_sourcePosition.filename,\n\t identifierName = _this$_sourcePosition.identifierName,\n\t force = _this$_sourcePosition.force;\n\n\t this._append(str, line, column, identifierName, filename, force);\n\t };\n\n\t _proto.queue = function queue(str) {\n\t if (str === \"\\n\") {\n\t while (this._queue.length > 0 && SPACES_RE.test(this._queue[0][0])) {\n\t this._queue.shift();\n\t }\n\t }\n\n\t var _this$_sourcePosition2 = this._sourcePosition,\n\t line = _this$_sourcePosition2.line,\n\t column = _this$_sourcePosition2.column,\n\t filename = _this$_sourcePosition2.filename,\n\t identifierName = _this$_sourcePosition2.identifierName,\n\t force = _this$_sourcePosition2.force;\n\n\t this._queue.unshift([str, line, column, identifierName, filename, force]);\n\t };\n\n\t _proto._flush = function _flush() {\n\t var item;\n\n\t while (item = this._queue.pop()) {\n\t this._append.apply(this, _toConsumableArray(item));\n\t }\n\t };\n\n\t _proto._append = function _append(str, line, column, identifierName, filename, force) {\n\t this._buf += str;\n\t this._last = str.charCodeAt(str.length - 1);\n\t var i = str.indexOf(\"\\n\");\n\t var last = 0;\n\n\t if (i !== 0) {\n\t this._mark(line, column, identifierName, filename, force);\n\t }\n\n\t while (i !== -1) {\n\t this._position.line++;\n\t this._position.column = 0;\n\t last = i + 1;\n\n\t if (last < str.length) {\n\t this._mark(++line, 0, identifierName, filename, force);\n\t }\n\n\t i = str.indexOf(\"\\n\", last);\n\t }\n\n\t this._position.column += str.length - last;\n\t };\n\n\t _proto._mark = function _mark(line, column, identifierName, filename, force) {\n\t var _this$_map;\n\n\t (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position.line, this._position.column, line, column, identifierName, filename, force);\n\t };\n\n\t _proto.removeTrailingNewline = function removeTrailingNewline() {\n\t if (this._queue.length > 0 && this._queue[0][0] === \"\\n\") {\n\t this._queue.shift();\n\t }\n\t };\n\n\t _proto.removeLastSemicolon = function removeLastSemicolon() {\n\t if (this._queue.length > 0 && this._queue[0][0] === \";\") {\n\t this._queue.shift();\n\t }\n\t };\n\n\t _proto.getLastChar = function getLastChar() {\n\t var last;\n\n\t if (this._queue.length > 0) {\n\t var _str = this._queue[0][0];\n\t last = _str.charCodeAt(0);\n\t } else {\n\t last = this._last;\n\t }\n\n\t return last;\n\t };\n\n\t _proto.endsWithCharAndNewline = function endsWithCharAndNewline() {\n\t var queue = this._queue;\n\n\t if (queue.length > 0) {\n\t var last = queue[0][0];\n\t var lastCp = last.charCodeAt(0);\n\t if (lastCp !== 10) return;\n\n\t if (queue.length > 1) {\n\t var secondLast = queue[1][0];\n\t return secondLast.charCodeAt(0);\n\t } else {\n\t return this._last;\n\t }\n\t }\n\t };\n\n\t _proto.hasContent = function hasContent() {\n\t return this._queue.length > 0 || !!this._last;\n\t };\n\n\t _proto.exactSource = function exactSource(loc, cb) {\n\t this.source(\"start\", loc, true);\n\t cb();\n\t this.source(\"end\", loc);\n\n\t this._disallowPop(\"start\", loc);\n\t };\n\n\t _proto.source = function source(prop, loc, force) {\n\t if (prop && !loc) return;\n\n\t this._normalizePosition(prop, loc, this._sourcePosition, force);\n\t };\n\n\t _proto.withSource = function withSource(prop, loc, cb) {\n\t if (!this._map) return cb();\n\t var originalLine = this._sourcePosition.line;\n\t var originalColumn = this._sourcePosition.column;\n\t var originalFilename = this._sourcePosition.filename;\n\t var originalIdentifierName = this._sourcePosition.identifierName;\n\t this.source(prop, loc);\n\t cb();\n\n\t if ((!this._sourcePosition.force || this._sourcePosition.line !== originalLine || this._sourcePosition.column !== originalColumn || this._sourcePosition.filename !== originalFilename) && (!this._disallowedPop || this._disallowedPop.line !== originalLine || this._disallowedPop.column !== originalColumn || this._disallowedPop.filename !== originalFilename)) {\n\t this._sourcePosition.line = originalLine;\n\t this._sourcePosition.column = originalColumn;\n\t this._sourcePosition.filename = originalFilename;\n\t this._sourcePosition.identifierName = originalIdentifierName;\n\t this._sourcePosition.force = false;\n\t this._disallowedPop = null;\n\t }\n\t };\n\n\t _proto._disallowPop = function _disallowPop(prop, loc) {\n\t if (prop && !loc) return;\n\t this._disallowedPop = this._normalizePosition(prop, loc);\n\t };\n\n\t _proto._normalizePosition = function _normalizePosition(prop, loc, targetObj, force) {\n\t var pos = loc ? loc[prop] : null;\n\n\t if (targetObj === undefined) {\n\t targetObj = {\n\t identifierName: null,\n\t line: null,\n\t column: null,\n\t filename: null,\n\t force: false\n\t };\n\t }\n\n\t var origLine = targetObj.line;\n\t var origColumn = targetObj.column;\n\t var origFilename = targetObj.filename;\n\t targetObj.identifierName = prop === \"start\" && (loc == null ? void 0 : loc.identifierName) || null;\n\t targetObj.line = pos == null ? void 0 : pos.line;\n\t targetObj.column = pos == null ? void 0 : pos.column;\n\t targetObj.filename = loc == null ? void 0 : loc.filename;\n\n\t if (force || targetObj.line !== origLine || targetObj.column !== origColumn || targetObj.filename !== origFilename) {\n\t targetObj.force = force;\n\t }\n\n\t return targetObj;\n\t };\n\n\t _proto.getCurrentColumn = function getCurrentColumn() {\n\t var extra = this._queue.reduce(function (acc, item) {\n\t return item[0] + acc;\n\t }, \"\");\n\n\t var lastIndex = extra.lastIndexOf(\"\\n\");\n\t return lastIndex === -1 ? this._position.column + extra.length : extra.length - 1 - lastIndex;\n\t };\n\n\t _proto.getCurrentLine = function getCurrentLine() {\n\t var extra = this._queue.reduce(function (acc, item) {\n\t return item[0] + acc;\n\t }, \"\");\n\n\t var count = 0;\n\n\t for (var i = 0; i < extra.length; i++) {\n\t if (extra[i] === \"\\n\") count++;\n\t }\n\n\t return this._position.line + count;\n\t };\n\n\t return Buffer;\n\t}();\n\n\tvar FLIPPED_ALIAS_KEYS$2 = FLIPPED_ALIAS_KEYS$3,\n\t isArrayExpression = isArrayExpression$2,\n\t isAssignmentExpression$2 = isAssignmentExpression$3,\n\t isBinary$1 = isBinary$3,\n\t isBlockStatement$1 = isBlockStatement$2,\n\t isCallExpression$5 = isCallExpression$6,\n\t isFunction$3 = isFunction$4,\n\t isIdentifier$d = isIdentifier$g,\n\t isLiteral$5 = isLiteral$7,\n\t isMemberExpression$6 = isMemberExpression$8,\n\t isObjectExpression$1 = isObjectExpression$3,\n\t isOptionalCallExpression$2 = isOptionalCallExpression$3,\n\t isOptionalMemberExpression$2 = isOptionalMemberExpression$3,\n\t isStringLiteral$6 = isStringLiteral$7;\n\n\tfunction crawl(node, state) {\n\t if (state === void 0) {\n\t state = {};\n\t }\n\n\t if (isMemberExpression$6(node) || isOptionalMemberExpression$2(node)) {\n\t crawl(node.object, state);\n\t if (node.computed) crawl(node.property, state);\n\t } else if (isBinary$1(node) || isAssignmentExpression$2(node)) {\n\t crawl(node.left, state);\n\t crawl(node.right, state);\n\t } else if (isCallExpression$5(node) || isOptionalCallExpression$2(node)) {\n\t state.hasCall = true;\n\t crawl(node.callee, state);\n\t } else if (isFunction$3(node)) {\n\t state.hasFunction = true;\n\t } else if (isIdentifier$d(node)) {\n\t state.hasHelper = state.hasHelper || isHelper(node.callee);\n\t }\n\n\t return state;\n\t}\n\n\tfunction isHelper(node) {\n\t if (isMemberExpression$6(node)) {\n\t return isHelper(node.object) || isHelper(node.property);\n\t } else if (isIdentifier$d(node)) {\n\t return node.name === \"require\" || node.name[0] === \"_\";\n\t } else if (isCallExpression$5(node)) {\n\t return isHelper(node.callee);\n\t } else if (isBinary$1(node) || isAssignmentExpression$2(node)) {\n\t return isIdentifier$d(node.left) && isHelper(node.left) || isHelper(node.right);\n\t } else {\n\t return false;\n\t }\n\t}\n\n\tfunction isType$1(node) {\n\t return isLiteral$5(node) || isObjectExpression$1(node) || isArrayExpression(node) || isIdentifier$d(node) || isMemberExpression$6(node);\n\t}\n\n\tvar nodes = {\n\t AssignmentExpression: function (_AssignmentExpression) {\n\t function AssignmentExpression(_x) {\n\t return _AssignmentExpression.apply(this, arguments);\n\t }\n\n\t AssignmentExpression.toString = function () {\n\t return _AssignmentExpression.toString();\n\t };\n\n\t return AssignmentExpression;\n\t }(function (node) {\n\t var state = crawl(node.right);\n\n\t if (state.hasCall && state.hasHelper || state.hasFunction) {\n\t return {\n\t before: state.hasFunction,\n\t after: true\n\t };\n\t }\n\t }),\n\t SwitchCase: function (_SwitchCase) {\n\t function SwitchCase(_x2, _x3) {\n\t return _SwitchCase.apply(this, arguments);\n\t }\n\n\t SwitchCase.toString = function () {\n\t return _SwitchCase.toString();\n\t };\n\n\t return SwitchCase;\n\t }(function (node, parent) {\n\t return {\n\t before: !!node.consequent.length || parent.cases[0] === node,\n\t after: !node.consequent.length && parent.cases[parent.cases.length - 1] === node\n\t };\n\t }),\n\t LogicalExpression: function (_LogicalExpression) {\n\t function LogicalExpression(_x4) {\n\t return _LogicalExpression.apply(this, arguments);\n\t }\n\n\t LogicalExpression.toString = function () {\n\t return _LogicalExpression.toString();\n\t };\n\n\t return LogicalExpression;\n\t }(function (node) {\n\t if (isFunction$3(node.left) || isFunction$3(node.right)) {\n\t return {\n\t after: true\n\t };\n\t }\n\t }),\n\t Literal: function (_Literal) {\n\t function Literal(_x5) {\n\t return _Literal.apply(this, arguments);\n\t }\n\n\t Literal.toString = function () {\n\t return _Literal.toString();\n\t };\n\n\t return Literal;\n\t }(function (node) {\n\t if (isStringLiteral$6(node) && node.value === \"use strict\") {\n\t return {\n\t after: true\n\t };\n\t }\n\t }),\n\t CallExpression: function (_CallExpression) {\n\t function CallExpression(_x6) {\n\t return _CallExpression.apply(this, arguments);\n\t }\n\n\t CallExpression.toString = function () {\n\t return _CallExpression.toString();\n\t };\n\n\t return CallExpression;\n\t }(function (node) {\n\t if (isFunction$3(node.callee) || isHelper(node)) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t }),\n\t OptionalCallExpression: function (_OptionalCallExpression) {\n\t function OptionalCallExpression(_x7) {\n\t return _OptionalCallExpression.apply(this, arguments);\n\t }\n\n\t OptionalCallExpression.toString = function () {\n\t return _OptionalCallExpression.toString();\n\t };\n\n\t return OptionalCallExpression;\n\t }(function (node) {\n\t if (isFunction$3(node.callee)) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t }),\n\t VariableDeclaration: function (_VariableDeclaration) {\n\t function VariableDeclaration(_x8) {\n\t return _VariableDeclaration.apply(this, arguments);\n\t }\n\n\t VariableDeclaration.toString = function () {\n\t return _VariableDeclaration.toString();\n\t };\n\n\t return VariableDeclaration;\n\t }(function (node) {\n\t for (var i = 0; i < node.declarations.length; i++) {\n\t var declar = node.declarations[i];\n\t var enabled = isHelper(declar.id) && !isType$1(declar.init);\n\n\t if (!enabled) {\n\t var state = crawl(declar.init);\n\t enabled = isHelper(declar.init) && state.hasCall || state.hasFunction;\n\t }\n\n\t if (enabled) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t }\n\t }),\n\t IfStatement: function (_IfStatement) {\n\t function IfStatement(_x9) {\n\t return _IfStatement.apply(this, arguments);\n\t }\n\n\t IfStatement.toString = function () {\n\t return _IfStatement.toString();\n\t };\n\n\t return IfStatement;\n\t }(function (node) {\n\t if (isBlockStatement$1(node.consequent)) {\n\t return {\n\t before: true,\n\t after: true\n\t };\n\t }\n\t })\n\t};\n\n\tnodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) {\n\t if (parent.properties[0] === node) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tnodes.ObjectTypeCallProperty = function (node, parent) {\n\t var _parent$properties;\n\n\t if (parent.callProperties[0] === node && !((_parent$properties = parent.properties) != null && _parent$properties.length)) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tnodes.ObjectTypeIndexer = function (node, parent) {\n\t var _parent$properties2, _parent$callPropertie;\n\n\t if (parent.indexers[0] === node && !((_parent$properties2 = parent.properties) != null && _parent$properties2.length) && !((_parent$callPropertie = parent.callProperties) != null && _parent$callPropertie.length)) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tnodes.ObjectTypeInternalSlot = function (node, parent) {\n\t var _parent$properties3, _parent$callPropertie2, _parent$indexers;\n\n\t if (parent.internalSlots[0] === node && !((_parent$properties3 = parent.properties) != null && _parent$properties3.length) && !((_parent$callPropertie2 = parent.callProperties) != null && _parent$callPropertie2.length) && !((_parent$indexers = parent.indexers) != null && _parent$indexers.length)) {\n\t return {\n\t before: true\n\t };\n\t }\n\t};\n\n\tvar list$1 = {\n\t VariableDeclaration: function (_VariableDeclaration2) {\n\t function VariableDeclaration(_x10) {\n\t return _VariableDeclaration2.apply(this, arguments);\n\t }\n\n\t VariableDeclaration.toString = function () {\n\t return _VariableDeclaration2.toString();\n\t };\n\n\t return VariableDeclaration;\n\t }(function (node) {\n\t return node.declarations.map(function (decl) {\n\t return decl.init;\n\t });\n\t }),\n\t ArrayExpression: function (_ArrayExpression) {\n\t function ArrayExpression(_x11) {\n\t return _ArrayExpression.apply(this, arguments);\n\t }\n\n\t ArrayExpression.toString = function () {\n\t return _ArrayExpression.toString();\n\t };\n\n\t return ArrayExpression;\n\t }(function (node) {\n\t return node.elements;\n\t }),\n\t ObjectExpression: function (_ObjectExpression) {\n\t function ObjectExpression(_x12) {\n\t return _ObjectExpression.apply(this, arguments);\n\t }\n\n\t ObjectExpression.toString = function () {\n\t return _ObjectExpression.toString();\n\t };\n\n\t return ObjectExpression;\n\t }(function (node) {\n\t return node.properties;\n\t })\n\t};\n\t[[\"Function\", true], [\"Class\", true], [\"Loop\", true], [\"LabeledStatement\", true], [\"SwitchStatement\", true], [\"TryStatement\", true]].forEach(function (_ref) {\n\t var _ref2 = _slicedToArray$1(_ref, 2),\n\t type = _ref2[0],\n\t amounts = _ref2[1];\n\n\t if (typeof amounts === \"boolean\") {\n\t amounts = {\n\t after: amounts,\n\t before: amounts\n\t };\n\t }\n\n\t [type].concat(FLIPPED_ALIAS_KEYS$2[type] || []).forEach(function (type) {\n\t nodes[type] = function () {\n\t return amounts;\n\t };\n\t });\n\t});\n\n\tvar isArrayTypeAnnotation = isArrayTypeAnnotation$1,\n\t isArrowFunctionExpression = isArrowFunctionExpression$1,\n\t isAssignmentExpression$1 = isAssignmentExpression$3,\n\t isAwaitExpression = isAwaitExpression$1,\n\t isBinary = isBinary$3,\n\t isBinaryExpression = isBinaryExpression$1,\n\t isCallExpression$4 = isCallExpression$6,\n\t isClassDeclaration$1 = isClassDeclaration$3,\n\t isClassExpression = isClassExpression$1,\n\t isConditional = isConditional$1,\n\t isConditionalExpression = isConditionalExpression$1,\n\t isExportDeclaration = isExportDeclaration$2,\n\t isExportDefaultDeclaration$1 = isExportDefaultDeclaration$3,\n\t isExpressionStatement$3 = isExpressionStatement$4,\n\t isFor$1 = isFor$2,\n\t isForInStatement = isForInStatement$1,\n\t isForOfStatement = isForOfStatement$1,\n\t isForStatement$1 = isForStatement$3,\n\t isIfStatement$1 = isIfStatement$2,\n\t isIndexedAccessType = isIndexedAccessType$1,\n\t isIntersectionTypeAnnotation = isIntersectionTypeAnnotation$1,\n\t isLogicalExpression = isLogicalExpression$1,\n\t isMemberExpression$5 = isMemberExpression$8,\n\t isNewExpression$3 = isNewExpression$4,\n\t isNullableTypeAnnotation = isNullableTypeAnnotation$1,\n\t isObjectPattern = isObjectPattern$1,\n\t isOptionalCallExpression$1 = isOptionalCallExpression$3,\n\t isOptionalMemberExpression$1 = isOptionalMemberExpression$3,\n\t isReturnStatement = isReturnStatement$1,\n\t isSequenceExpression = isSequenceExpression$1,\n\t isSwitchStatement = isSwitchStatement$1,\n\t isTSArrayType = isTSArrayType$1,\n\t isTSAsExpression$1 = isTSAsExpression$2,\n\t isTSIntersectionType = isTSIntersectionType$1,\n\t isTSNonNullExpression$1 = isTSNonNullExpression$2,\n\t isTSOptionalType = isTSOptionalType$1,\n\t isTSRestType = isTSRestType$1,\n\t isTSTypeAssertion$1 = isTSTypeAssertion$2,\n\t isTSUnionType = isTSUnionType$1,\n\t isTaggedTemplateExpression = isTaggedTemplateExpression$2,\n\t isThrowStatement = isThrowStatement$1,\n\t isTypeAnnotation$1 = isTypeAnnotation$2,\n\t isUnaryLike = isUnaryLike$1,\n\t isUnionTypeAnnotation$1 = isUnionTypeAnnotation$2,\n\t isVariableDeclarator$1 = isVariableDeclarator$2,\n\t isWhileStatement = isWhileStatement$1,\n\t isYieldExpression = isYieldExpression$1;\n\tvar PRECEDENCE = {\n\t \"||\": 0,\n\t \"??\": 0,\n\t \"&&\": 1,\n\t \"|\": 2,\n\t \"^\": 3,\n\t \"&\": 4,\n\t \"==\": 5,\n\t \"===\": 5,\n\t \"!=\": 5,\n\t \"!==\": 5,\n\t \"<\": 6,\n\t \">\": 6,\n\t \"<=\": 6,\n\t \">=\": 6,\n\t \"in\": 6,\n\t \"instanceof\": 6,\n\t \">>\": 7,\n\t \"<<\": 7,\n\t \">>>\": 7,\n\t \"+\": 8,\n\t \"-\": 8,\n\t \"*\": 9,\n\t \"/\": 9,\n\t \"%\": 9,\n\t \"**\": 10\n\t};\n\n\tvar isClassExtendsClause = function isClassExtendsClause(node, parent) {\n\t return (isClassDeclaration$1(parent) || isClassExpression(parent)) && parent.superClass === node;\n\t};\n\n\tvar hasPostfixPart = function hasPostfixPart(node, parent) {\n\t return (isMemberExpression$5(parent) || isOptionalMemberExpression$1(parent)) && parent.object === node || (isCallExpression$4(parent) || isOptionalCallExpression$1(parent) || isNewExpression$3(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression$1(parent);\n\t};\n\n\tfunction NullableTypeAnnotation$1(node, parent) {\n\t return isArrayTypeAnnotation(parent);\n\t}\n\tfunction FunctionTypeAnnotation$1(node, parent, printStack) {\n\t return isUnionTypeAnnotation$1(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation$1(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]);\n\t}\n\tfunction UpdateExpression$2(node, parent) {\n\t return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);\n\t}\n\tfunction ObjectExpression$2(node, parent, printStack) {\n\t return isFirstInContext(printStack, {\n\t expressionStatement: true,\n\t arrowBody: true\n\t });\n\t}\n\tfunction DoExpression$1(node, parent, printStack) {\n\t return !node.async && isFirstInContext(printStack, {\n\t expressionStatement: true\n\t });\n\t}\n\tfunction Binary(node, parent) {\n\t if (node.operator === \"**\" && isBinaryExpression(parent, {\n\t operator: \"**\"\n\t })) {\n\t return parent.left === node;\n\t }\n\n\t if (isClassExtendsClause(node, parent)) {\n\t return true;\n\t }\n\n\t if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) {\n\t return true;\n\t }\n\n\t if (isBinary(parent)) {\n\t var parentOp = parent.operator;\n\t var parentPos = PRECEDENCE[parentOp];\n\t var nodeOp = node.operator;\n\t var nodePos = PRECEDENCE[nodeOp];\n\n\t if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) {\n\t return true;\n\t }\n\t }\n\t}\n\tfunction UnionTypeAnnotation$1(node, parent) {\n\t return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation$1(parent);\n\t}\n\tfunction OptionalIndexedAccessType$1(node, parent) {\n\t return isIndexedAccessType(parent, {\n\t objectType: node\n\t });\n\t}\n\tfunction TSAsExpression$1() {\n\t return true;\n\t}\n\tfunction TSTypeAssertion$1() {\n\t return true;\n\t}\n\tfunction TSUnionType$1(node, parent) {\n\t return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent);\n\t}\n\tfunction TSInferType$1(node, parent) {\n\t return isTSArrayType(parent) || isTSOptionalType(parent);\n\t}\n\tfunction BinaryExpression$1(node, parent) {\n\t return node.operator === \"in\" && (isVariableDeclarator$1(parent) || isFor$1(parent));\n\t}\n\tfunction SequenceExpression$2(node, parent) {\n\t if (isForStatement$1(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement$1(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement$3(parent) && parent.expression === node) {\n\t return false;\n\t }\n\n\t return true;\n\t}\n\tfunction YieldExpression$1(node, parent) {\n\t return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent);\n\t}\n\tfunction ClassExpression(node, parent, printStack) {\n\t return isFirstInContext(printStack, {\n\t expressionStatement: true,\n\t exportDefault: true\n\t });\n\t}\n\tfunction UnaryLike(node, parent) {\n\t return hasPostfixPart(node, parent) || isBinaryExpression(parent, {\n\t operator: \"**\",\n\t left: node\n\t }) || isClassExtendsClause(node, parent);\n\t}\n\tfunction FunctionExpression$1(node, parent, printStack) {\n\t return isFirstInContext(printStack, {\n\t expressionStatement: true,\n\t exportDefault: true\n\t });\n\t}\n\tfunction ArrowFunctionExpression$1(node, parent) {\n\t return isExportDeclaration(parent) || ConditionalExpression$2(node, parent);\n\t}\n\tfunction ConditionalExpression$2(node, parent) {\n\t if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, {\n\t test: node\n\t }) || isAwaitExpression(parent) || isTSTypeAssertion$1(parent) || isTSAsExpression$1(parent)) {\n\t return true;\n\t }\n\n\t return UnaryLike(node, parent);\n\t}\n\tfunction OptionalMemberExpression$1(node, parent) {\n\t return isCallExpression$4(parent, {\n\t callee: node\n\t }) || isMemberExpression$5(parent, {\n\t object: node\n\t });\n\t}\n\tfunction AssignmentExpression$2(node, parent) {\n\t if (isObjectPattern(node.left)) {\n\t return true;\n\t } else {\n\t return ConditionalExpression$2(node, parent);\n\t }\n\t}\n\tfunction LogicalExpression$1(node, parent) {\n\t switch (node.operator) {\n\t case \"||\":\n\t if (!isLogicalExpression(parent)) return false;\n\t return parent.operator === \"??\" || parent.operator === \"&&\";\n\n\t case \"&&\":\n\t return isLogicalExpression(parent, {\n\t operator: \"??\"\n\t });\n\n\t case \"??\":\n\t return isLogicalExpression(parent) && parent.operator !== \"??\";\n\t }\n\t}\n\tfunction Identifier$1(node, parent, printStack) {\n\t if (node.name === \"let\") {\n\t var isFollowedByBracket = isMemberExpression$5(parent, {\n\t object: node,\n\t computed: true\n\t }) || isOptionalMemberExpression$1(parent, {\n\t object: node,\n\t computed: true,\n\t optional: false\n\t });\n\t return isFirstInContext(printStack, {\n\t expressionStatement: isFollowedByBracket,\n\t forHead: isFollowedByBracket,\n\t forInHead: isFollowedByBracket,\n\t forOfHead: true\n\t });\n\t }\n\n\t return node.name === \"async\" && isForOfStatement(parent) && node === parent.left;\n\t}\n\n\tfunction isFirstInContext(printStack, _ref) {\n\t var _ref$expressionStatem = _ref.expressionStatement,\n\t expressionStatement = _ref$expressionStatem === void 0 ? false : _ref$expressionStatem,\n\t _ref$arrowBody = _ref.arrowBody,\n\t arrowBody = _ref$arrowBody === void 0 ? false : _ref$arrowBody,\n\t _ref$exportDefault = _ref.exportDefault,\n\t exportDefault = _ref$exportDefault === void 0 ? false : _ref$exportDefault,\n\t _ref$forHead = _ref.forHead,\n\t forHead = _ref$forHead === void 0 ? false : _ref$forHead,\n\t _ref$forInHead = _ref.forInHead,\n\t forInHead = _ref$forInHead === void 0 ? false : _ref$forInHead,\n\t _ref$forOfHead = _ref.forOfHead,\n\t forOfHead = _ref$forOfHead === void 0 ? false : _ref$forOfHead;\n\t var i = printStack.length - 1;\n\t var node = printStack[i];\n\t i--;\n\t var parent = printStack[i];\n\n\t while (i >= 0) {\n\t if (expressionStatement && isExpressionStatement$3(parent, {\n\t expression: node\n\t }) || exportDefault && isExportDefaultDeclaration$1(parent, {\n\t declaration: node\n\t }) || arrowBody && isArrowFunctionExpression(parent, {\n\t body: node\n\t }) || forHead && isForStatement$1(parent, {\n\t init: node\n\t }) || forInHead && isForInStatement(parent, {\n\t left: node\n\t }) || forOfHead && isForOfStatement(parent, {\n\t left: node\n\t })) {\n\t return true;\n\t }\n\n\t if (hasPostfixPart(node, parent) && !isNewExpression$3(parent) || isSequenceExpression(parent) && parent.expressions[0] === node || isConditional(parent, {\n\t test: node\n\t }) || isBinary(parent, {\n\t left: node\n\t }) || isAssignmentExpression$1(parent, {\n\t left: node\n\t })) {\n\t node = parent;\n\t i--;\n\t parent = printStack[i];\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t return false;\n\t}\n\n\tvar parens = /*#__PURE__*/Object.freeze({\n\t\t__proto__: null,\n\t\tNullableTypeAnnotation: NullableTypeAnnotation$1,\n\t\tFunctionTypeAnnotation: FunctionTypeAnnotation$1,\n\t\tUpdateExpression: UpdateExpression$2,\n\t\tObjectExpression: ObjectExpression$2,\n\t\tDoExpression: DoExpression$1,\n\t\tBinary: Binary,\n\t\tUnionTypeAnnotation: UnionTypeAnnotation$1,\n\t\tIntersectionTypeAnnotation: UnionTypeAnnotation$1,\n\t\tOptionalIndexedAccessType: OptionalIndexedAccessType$1,\n\t\tTSAsExpression: TSAsExpression$1,\n\t\tTSTypeAssertion: TSTypeAssertion$1,\n\t\tTSUnionType: TSUnionType$1,\n\t\tTSIntersectionType: TSUnionType$1,\n\t\tTSInferType: TSInferType$1,\n\t\tBinaryExpression: BinaryExpression$1,\n\t\tSequenceExpression: SequenceExpression$2,\n\t\tYieldExpression: YieldExpression$1,\n\t\tAwaitExpression: YieldExpression$1,\n\t\tClassExpression: ClassExpression,\n\t\tUnaryLike: UnaryLike,\n\t\tFunctionExpression: FunctionExpression$1,\n\t\tArrowFunctionExpression: ArrowFunctionExpression$1,\n\t\tConditionalExpression: ConditionalExpression$2,\n\t\tOptionalMemberExpression: OptionalMemberExpression$1,\n\t\tOptionalCallExpression: OptionalMemberExpression$1,\n\t\tAssignmentExpression: AssignmentExpression$2,\n\t\tLogicalExpression: LogicalExpression$1,\n\t\tIdentifier: Identifier$1\n\t});\n\n\tvar FLIPPED_ALIAS_KEYS$1 = FLIPPED_ALIAS_KEYS$3,\n\t isCallExpression$3 = isCallExpression$6,\n\t isExpressionStatement$2 = isExpressionStatement$4,\n\t isMemberExpression$4 = isMemberExpression$8,\n\t isNewExpression$2 = isNewExpression$4;\n\n\tfunction expandAliases(obj) {\n\t var newObj = {};\n\n\t function add(type, func) {\n\t var fn = newObj[type];\n\t newObj[type] = fn ? function (node, parent, stack) {\n\t var result = fn(node, parent, stack);\n\t return result == null ? func(node, parent, stack) : result;\n\t } : func;\n\t }\n\n\t for (var _i = 0, _Object$keys = Object.keys(obj); _i < _Object$keys.length; _i++) {\n\t var type = _Object$keys[_i];\n\t var aliases = FLIPPED_ALIAS_KEYS$1[type];\n\n\t if (aliases) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(aliases), _step; !(_step = _iterator()).done;) {\n\t var alias = _step.value;\n\t add(alias, obj[type]);\n\t }\n\t } else {\n\t add(type, obj[type]);\n\t }\n\t }\n\n\t return newObj;\n\t}\n\n\tvar expandedParens = expandAliases(parens);\n\tvar expandedWhitespaceNodes = expandAliases(nodes);\n\tvar expandedWhitespaceList = expandAliases(list$1);\n\n\tfunction find$2(obj, node, parent, printStack) {\n\t var fn = obj[node.type];\n\t return fn ? fn(node, parent, printStack) : null;\n\t}\n\n\tfunction isOrHasCallExpression(node) {\n\t if (isCallExpression$3(node)) {\n\t return true;\n\t }\n\n\t return isMemberExpression$4(node) && isOrHasCallExpression(node.object);\n\t}\n\n\tfunction needsWhitespace(node, parent, type) {\n\t if (!node) return 0;\n\n\t if (isExpressionStatement$2(node)) {\n\t node = node.expression;\n\t }\n\n\t var linesInfo = find$2(expandedWhitespaceNodes, node, parent);\n\n\t if (!linesInfo) {\n\t var items = find$2(expandedWhitespaceList, node, parent);\n\n\t if (items) {\n\t for (var i = 0; i < items.length; i++) {\n\t linesInfo = needsWhitespace(items[i], node, type);\n\t if (linesInfo) break;\n\t }\n\t }\n\t }\n\n\t if (typeof linesInfo === \"object\" && linesInfo !== null) {\n\t return linesInfo[type] || 0;\n\t }\n\n\t return 0;\n\t}\n\tfunction needsWhitespaceBefore$1(node, parent) {\n\t return needsWhitespace(node, parent, \"before\");\n\t}\n\tfunction needsWhitespaceAfter$1(node, parent) {\n\t return needsWhitespace(node, parent, \"after\");\n\t}\n\tfunction needsParens$1(node, parent, printStack) {\n\t if (!parent) return false;\n\n\t if (isNewExpression$2(parent) && parent.callee === node) {\n\t if (isOrHasCallExpression(node)) return true;\n\t }\n\n\t return find$2(expandedParens, node, parent, printStack);\n\t}\n\n\tfunction TaggedTemplateExpression$1(node) {\n\t this.print(node.tag, node);\n\t this.print(node.typeParameters, node);\n\t this.print(node.quasi, node);\n\t}\n\tfunction TemplateElement(node, parent) {\n\t var isFirst = parent.quasis[0] === node;\n\t var isLast = parent.quasis[parent.quasis.length - 1] === node;\n\t var value = (isFirst ? \"`\" : \"}\") + node.value.raw + (isLast ? \"`\" : \"${\");\n\t this.token(value);\n\t}\n\tfunction TemplateLiteral$1(node) {\n\t var quasis = node.quasis;\n\n\t for (var i = 0; i < quasis.length; i++) {\n\t this.print(quasis[i], node);\n\n\t if (i + 1 < quasis.length) {\n\t this.print(node.expressions[i], node);\n\t }\n\t }\n\t}\n\n\tvar isCallExpression$2 = isCallExpression$6,\n\t isLiteral$4 = isLiteral$7,\n\t isMemberExpression$3 = isMemberExpression$8,\n\t isNewExpression$1 = isNewExpression$4;\n\tfunction UnaryExpression$1(node) {\n\t if (node.operator === \"void\" || node.operator === \"delete\" || node.operator === \"typeof\" || node.operator === \"throw\") {\n\t this.word(node.operator);\n\t this.space();\n\t } else {\n\t this.token(node.operator);\n\t }\n\n\t this.print(node.argument, node);\n\t}\n\tfunction DoExpression(node) {\n\t if (node.async) {\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t this.word(\"do\");\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ParenthesizedExpression$1(node) {\n\t this.token(\"(\");\n\t this.print(node.expression, node);\n\t this.token(\")\");\n\t}\n\tfunction UpdateExpression$1(node) {\n\t if (node.prefix) {\n\t this.token(node.operator);\n\t this.print(node.argument, node);\n\t } else {\n\t this.startTerminatorless(true);\n\t this.print(node.argument, node);\n\t this.endTerminatorless();\n\t this.token(node.operator);\n\t }\n\t}\n\tfunction ConditionalExpression$1(node) {\n\t this.print(node.test, node);\n\t this.space();\n\t this.token(\"?\");\n\t this.space();\n\t this.print(node.consequent, node);\n\t this.space();\n\t this.token(\":\");\n\t this.space();\n\t this.print(node.alternate, node);\n\t}\n\tfunction NewExpression$1(node, parent) {\n\t this.word(\"new\");\n\t this.space();\n\t this.print(node.callee, node);\n\n\t if (this.format.minified && node.arguments.length === 0 && !node.optional && !isCallExpression$2(parent, {\n\t callee: node\n\t }) && !isMemberExpression$3(parent) && !isNewExpression$1(parent)) {\n\t return;\n\t }\n\n\t this.print(node.typeArguments, node);\n\t this.print(node.typeParameters, node);\n\n\t if (node.optional) {\n\t this.token(\"?.\");\n\t }\n\n\t this.token(\"(\");\n\t this.printList(node.arguments, node);\n\t this.token(\")\");\n\t}\n\tfunction SequenceExpression$1(node) {\n\t this.printList(node.expressions, node);\n\t}\n\tfunction ThisExpression() {\n\t this.word(\"this\");\n\t}\n\tfunction Super() {\n\t this.word(\"super\");\n\t}\n\tfunction Decorator(node) {\n\t this.token(\"@\");\n\t this.print(node.expression, node);\n\t this.newline();\n\t}\n\tfunction OptionalMemberExpression(node) {\n\t this.print(node.object, node);\n\n\t if (!node.computed && isMemberExpression$3(node.property)) {\n\t throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n\t }\n\n\t var computed = node.computed;\n\n\t if (isLiteral$4(node.property) && typeof node.property.value === \"number\") {\n\t computed = true;\n\t }\n\n\t if (node.optional) {\n\t this.token(\"?.\");\n\t }\n\n\t if (computed) {\n\t this.token(\"[\");\n\t this.print(node.property, node);\n\t this.token(\"]\");\n\t } else {\n\t if (!node.optional) {\n\t this.token(\".\");\n\t }\n\n\t this.print(node.property, node);\n\t }\n\t}\n\tfunction OptionalCallExpression(node) {\n\t this.print(node.callee, node);\n\t this.print(node.typeArguments, node);\n\t this.print(node.typeParameters, node);\n\n\t if (node.optional) {\n\t this.token(\"?.\");\n\t }\n\n\t this.token(\"(\");\n\t this.printList(node.arguments, node);\n\t this.token(\")\");\n\t}\n\tfunction CallExpression$1(node) {\n\t this.print(node.callee, node);\n\t this.print(node.typeArguments, node);\n\t this.print(node.typeParameters, node);\n\t this.token(\"(\");\n\t this.printList(node.arguments, node);\n\t this.token(\")\");\n\t}\n\tfunction Import() {\n\t this.word(\"import\");\n\t}\n\n\tfunction buildYieldAwait(keyword) {\n\t return function (node) {\n\t this.word(keyword);\n\n\t if (node.delegate) {\n\t this.token(\"*\");\n\t }\n\n\t if (node.argument) {\n\t this.space();\n\t var terminatorState = this.startTerminatorless();\n\t this.print(node.argument, node);\n\t this.endTerminatorless(terminatorState);\n\t }\n\t };\n\t}\n\n\tvar YieldExpression = buildYieldAwait(\"yield\");\n\tvar AwaitExpression = buildYieldAwait(\"await\");\n\tfunction EmptyStatement() {\n\t this.semicolon(true);\n\t}\n\tfunction ExpressionStatement(node) {\n\t this.print(node.expression, node);\n\t this.semicolon();\n\t}\n\tfunction AssignmentPattern(node) {\n\t this.print(node.left, node);\n\t if (node.left.optional) this.token(\"?\");\n\t this.print(node.left.typeAnnotation, node);\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.right, node);\n\t}\n\tfunction AssignmentExpression$1(node, parent) {\n\t var parens = this.inForStatementInitCounter && node.operator === \"in\" && !needsParens$1(node, parent);\n\n\t if (parens) {\n\t this.token(\"(\");\n\t }\n\n\t this.print(node.left, node);\n\t this.space();\n\n\t if (node.operator === \"in\" || node.operator === \"instanceof\") {\n\t this.word(node.operator);\n\t } else {\n\t this.token(node.operator);\n\t }\n\n\t this.space();\n\t this.print(node.right, node);\n\n\t if (parens) {\n\t this.token(\")\");\n\t }\n\t}\n\tfunction BindExpression(node) {\n\t this.print(node.object, node);\n\t this.token(\"::\");\n\t this.print(node.callee, node);\n\t}\n\tfunction MemberExpression(node) {\n\t this.print(node.object, node);\n\n\t if (!node.computed && isMemberExpression$3(node.property)) {\n\t throw new TypeError(\"Got a MemberExpression for MemberExpression property\");\n\t }\n\n\t var computed = node.computed;\n\n\t if (isLiteral$4(node.property) && typeof node.property.value === \"number\") {\n\t computed = true;\n\t }\n\n\t if (computed) {\n\t this.token(\"[\");\n\t this.print(node.property, node);\n\t this.token(\"]\");\n\t } else {\n\t this.token(\".\");\n\t this.print(node.property, node);\n\t }\n\t}\n\tfunction MetaProperty(node) {\n\t this.print(node.meta, node);\n\t this.token(\".\");\n\t this.print(node.property, node);\n\t}\n\tfunction PrivateName(node) {\n\t this.token(\"#\");\n\t this.print(node.id, node);\n\t}\n\tfunction V8IntrinsicIdentifier(node) {\n\t this.token(\"%\");\n\t this.word(node.name);\n\t}\n\tfunction ModuleExpression(node) {\n\t this.word(\"module\");\n\t this.space();\n\t this.token(\"{\");\n\n\t if (node.body.body.length === 0) {\n\t this.token(\"}\");\n\t } else {\n\t this.newline();\n\t this.printSequence(node.body.body, node, {\n\t indent: true\n\t });\n\t this.rightBrace();\n\t }\n\t}\n\n\tvar isFor = isFor$2,\n\t isForStatement = isForStatement$3,\n\t isIfStatement = isIfStatement$2,\n\t isStatement$5 = isStatement$7;\n\tfunction WithStatement(node) {\n\t this.word(\"with\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.object, node);\n\t this.token(\")\");\n\t this.printBlock(node);\n\t}\n\tfunction IfStatement(node) {\n\t this.word(\"if\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.test, node);\n\t this.token(\")\");\n\t this.space();\n\t var needsBlock = node.alternate && isIfStatement(getLastStatement(node.consequent));\n\n\t if (needsBlock) {\n\t this.token(\"{\");\n\t this.newline();\n\t this.indent();\n\t }\n\n\t this.printAndIndentOnComments(node.consequent, node);\n\n\t if (needsBlock) {\n\t this.dedent();\n\t this.newline();\n\t this.token(\"}\");\n\t }\n\n\t if (node.alternate) {\n\t if (this.endsWith(125)) this.space();\n\t this.word(\"else\");\n\t this.space();\n\t this.printAndIndentOnComments(node.alternate, node);\n\t }\n\t}\n\n\tfunction getLastStatement(statement) {\n\t if (!isStatement$5(statement.body)) return statement;\n\t return getLastStatement(statement.body);\n\t}\n\n\tfunction ForStatement(node) {\n\t this.word(\"for\");\n\t this.space();\n\t this.token(\"(\");\n\t this.inForStatementInitCounter++;\n\t this.print(node.init, node);\n\t this.inForStatementInitCounter--;\n\t this.token(\";\");\n\n\t if (node.test) {\n\t this.space();\n\t this.print(node.test, node);\n\t }\n\n\t this.token(\";\");\n\n\t if (node.update) {\n\t this.space();\n\t this.print(node.update, node);\n\t }\n\n\t this.token(\")\");\n\t this.printBlock(node);\n\t}\n\tfunction WhileStatement(node) {\n\t this.word(\"while\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.test, node);\n\t this.token(\")\");\n\t this.printBlock(node);\n\t}\n\n\tvar buildForXStatement = function buildForXStatement(op) {\n\t return function (node) {\n\t this.word(\"for\");\n\t this.space();\n\n\t if (op === \"of\" && node[\"await\"]) {\n\t this.word(\"await\");\n\t this.space();\n\t }\n\n\t this.token(\"(\");\n\t this.print(node.left, node);\n\t this.space();\n\t this.word(op);\n\t this.space();\n\t this.print(node.right, node);\n\t this.token(\")\");\n\t this.printBlock(node);\n\t };\n\t};\n\n\tvar ForInStatement = buildForXStatement(\"in\");\n\tvar ForOfStatement = buildForXStatement(\"of\");\n\tfunction DoWhileStatement(node) {\n\t this.word(\"do\");\n\t this.space();\n\t this.print(node.body, node);\n\t this.space();\n\t this.word(\"while\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.test, node);\n\t this.token(\")\");\n\t this.semicolon();\n\t}\n\n\tfunction buildLabelStatement(prefix, key) {\n\t if (key === void 0) {\n\t key = \"label\";\n\t }\n\n\t return function (node) {\n\t this.word(prefix);\n\t var label = node[key];\n\n\t if (label) {\n\t this.space();\n\t var isLabel = key == \"label\";\n\t var terminatorState = this.startTerminatorless(isLabel);\n\t this.print(label, node);\n\t this.endTerminatorless(terminatorState);\n\t }\n\n\t this.semicolon();\n\t };\n\t}\n\n\tvar ContinueStatement = buildLabelStatement(\"continue\");\n\tvar ReturnStatement = buildLabelStatement(\"return\", \"argument\");\n\tvar BreakStatement = buildLabelStatement(\"break\");\n\tvar ThrowStatement = buildLabelStatement(\"throw\", \"argument\");\n\tfunction LabeledStatement(node) {\n\t this.print(node.label, node);\n\t this.token(\":\");\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction TryStatement(node) {\n\t this.word(\"try\");\n\t this.space();\n\t this.print(node.block, node);\n\t this.space();\n\n\t if (node.handlers) {\n\t this.print(node.handlers[0], node);\n\t } else {\n\t this.print(node.handler, node);\n\t }\n\n\t if (node.finalizer) {\n\t this.space();\n\t this.word(\"finally\");\n\t this.space();\n\t this.print(node.finalizer, node);\n\t }\n\t}\n\tfunction CatchClause(node) {\n\t this.word(\"catch\");\n\t this.space();\n\n\t if (node.param) {\n\t this.token(\"(\");\n\t this.print(node.param, node);\n\t this.print(node.param.typeAnnotation, node);\n\t this.token(\")\");\n\t this.space();\n\t }\n\n\t this.print(node.body, node);\n\t}\n\tfunction SwitchStatement(node) {\n\t this.word(\"switch\");\n\t this.space();\n\t this.token(\"(\");\n\t this.print(node.discriminant, node);\n\t this.token(\")\");\n\t this.space();\n\t this.token(\"{\");\n\t this.printSequence(node.cases, node, {\n\t indent: true,\n\t addNewlines: function addNewlines(leading, cas) {\n\t if (!leading && node.cases[node.cases.length - 1] === cas) return -1;\n\t }\n\t });\n\t this.token(\"}\");\n\t}\n\tfunction SwitchCase(node) {\n\t if (node.test) {\n\t this.word(\"case\");\n\t this.space();\n\t this.print(node.test, node);\n\t this.token(\":\");\n\t } else {\n\t this.word(\"default\");\n\t this.token(\":\");\n\t }\n\n\t if (node.consequent.length) {\n\t this.newline();\n\t this.printSequence(node.consequent, node, {\n\t indent: true\n\t });\n\t }\n\t}\n\tfunction DebuggerStatement() {\n\t this.word(\"debugger\");\n\t this.semicolon();\n\t}\n\n\tfunction variableDeclarationIndent() {\n\t this.token(\",\");\n\t this.newline();\n\n\t if (this.endsWith(10)) {\n\t for (var i = 0; i < 4; i++) {\n\t this.space(true);\n\t }\n\t }\n\t}\n\n\tfunction constDeclarationIndent() {\n\t this.token(\",\");\n\t this.newline();\n\n\t if (this.endsWith(10)) {\n\t for (var i = 0; i < 6; i++) {\n\t this.space(true);\n\t }\n\t }\n\t}\n\n\tfunction VariableDeclaration(node, parent) {\n\t if (node.declare) {\n\t this.word(\"declare\");\n\t this.space();\n\t }\n\n\t this.word(node.kind);\n\t this.space();\n\t var hasInits = false;\n\n\t if (!isFor(parent)) {\n\t for (var _iterator = _createForOfIteratorHelperLoose(node.declarations), _step; !(_step = _iterator()).done;) {\n\t var declar = _step.value;\n\n\t if (declar.init) {\n\t hasInits = true;\n\t }\n\t }\n\t }\n\n\t var separator;\n\n\t if (hasInits) {\n\t separator = node.kind === \"const\" ? constDeclarationIndent : variableDeclarationIndent;\n\t }\n\n\t this.printList(node.declarations, node, {\n\t separator: separator\n\t });\n\n\t if (isFor(parent)) {\n\t if (isForStatement(parent)) {\n\t if (parent.init === node) return;\n\t } else {\n\t if (parent.left === node) return;\n\t }\n\t }\n\n\t this.semicolon();\n\t}\n\tfunction VariableDeclarator$1(node) {\n\t this.print(node.id, node);\n\t if (node.definite) this.token(\"!\");\n\t this.print(node.id.typeAnnotation, node);\n\n\t if (node.init) {\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.init, node);\n\t }\n\t}\n\n\tvar isExportDefaultDeclaration = isExportDefaultDeclaration$3,\n\t isExportNamedDeclaration = isExportNamedDeclaration$2;\n\tfunction ClassDeclaration(node, parent) {\n\t if (!this.format.decoratorsBeforeExport || !isExportDefaultDeclaration(parent) && !isExportNamedDeclaration(parent)) {\n\t this.printJoin(node.decorators, node);\n\t }\n\n\t if (node.declare) {\n\t this.word(\"declare\");\n\t this.space();\n\t }\n\n\t if (node[\"abstract\"]) {\n\t this.word(\"abstract\");\n\t this.space();\n\t }\n\n\t this.word(\"class\");\n\n\t if (node.id) {\n\t this.space();\n\t this.print(node.id, node);\n\t }\n\n\t this.print(node.typeParameters, node);\n\n\t if (node.superClass) {\n\t this.space();\n\t this.word(\"extends\");\n\t this.space();\n\t this.print(node.superClass, node);\n\t this.print(node.superTypeParameters, node);\n\t }\n\n\t if (node[\"implements\"]) {\n\t this.space();\n\t this.word(\"implements\");\n\t this.space();\n\t this.printList(node[\"implements\"], node);\n\t }\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ClassBody(node) {\n\t this.token(\"{\");\n\t this.printInnerComments(node);\n\n\t if (node.body.length === 0) {\n\t this.token(\"}\");\n\t } else {\n\t this.newline();\n\t this.indent();\n\t this.printSequence(node.body, node);\n\t this.dedent();\n\t if (!this.endsWith(10)) this.newline();\n\t this.rightBrace();\n\t }\n\t}\n\tfunction ClassProperty(node) {\n\t this.printJoin(node.decorators, node);\n\t this.source(\"end\", node.key.loc);\n\t this.tsPrintClassMemberModifiers(node, true);\n\n\t if (node.computed) {\n\t this.token(\"[\");\n\t this.print(node.key, node);\n\t this.token(\"]\");\n\t } else {\n\t this._variance(node);\n\n\t this.print(node.key, node);\n\t }\n\n\t if (node.optional) {\n\t this.token(\"?\");\n\t }\n\n\t if (node.definite) {\n\t this.token(\"!\");\n\t }\n\n\t this.print(node.typeAnnotation, node);\n\n\t if (node.value) {\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.value, node);\n\t }\n\n\t this.semicolon();\n\t}\n\tfunction ClassPrivateProperty(node) {\n\t this.printJoin(node.decorators, node);\n\n\t if (node[\"static\"]) {\n\t this.word(\"static\");\n\t this.space();\n\t }\n\n\t this.print(node.key, node);\n\t this.print(node.typeAnnotation, node);\n\n\t if (node.value) {\n\t this.space();\n\t this.token(\"=\");\n\t this.space();\n\t this.print(node.value, node);\n\t }\n\n\t this.semicolon();\n\t}\n\tfunction ClassMethod(node) {\n\t this._classMethodHead(node);\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ClassPrivateMethod(node) {\n\t this._classMethodHead(node);\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction _classMethodHead(node) {\n\t this.printJoin(node.decorators, node);\n\t this.source(\"end\", node.key.loc);\n\t this.tsPrintClassMemberModifiers(node, false);\n\n\t this._methodHead(node);\n\t}\n\tfunction StaticBlock(node) {\n\t this.word(\"static\");\n\t this.space();\n\t this.token(\"{\");\n\n\t if (node.body.length === 0) {\n\t this.token(\"}\");\n\t } else {\n\t this.newline();\n\t this.printSequence(node.body, node, {\n\t indent: true\n\t });\n\t this.rightBrace();\n\t }\n\t}\n\n\tvar isIdentifier$c = isIdentifier$g;\n\tfunction _params(node) {\n\t this.print(node.typeParameters, node);\n\t this.token(\"(\");\n\n\t this._parameters(node.params, node);\n\n\t this.token(\")\");\n\t this.print(node.returnType, node);\n\t}\n\tfunction _parameters(parameters, parent) {\n\t for (var i = 0; i < parameters.length; i++) {\n\t this._param(parameters[i], parent);\n\n\t if (i < parameters.length - 1) {\n\t this.token(\",\");\n\t this.space();\n\t }\n\t }\n\t}\n\tfunction _param(parameter, parent) {\n\t this.printJoin(parameter.decorators, parameter);\n\t this.print(parameter, parent);\n\t if (parameter.optional) this.token(\"?\");\n\t this.print(parameter.typeAnnotation, parameter);\n\t}\n\tfunction _methodHead(node) {\n\t var kind = node.kind;\n\t var key = node.key;\n\n\t if (kind === \"get\" || kind === \"set\") {\n\t this.word(kind);\n\t this.space();\n\t }\n\n\t if (node.async) {\n\t this._catchUp(\"start\", key.loc);\n\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t if (kind === \"method\" || kind === \"init\") {\n\t if (node.generator) {\n\t this.token(\"*\");\n\t }\n\t }\n\n\t if (node.computed) {\n\t this.token(\"[\");\n\t this.print(key, node);\n\t this.token(\"]\");\n\t } else {\n\t this.print(key, node);\n\t }\n\n\t if (node.optional) {\n\t this.token(\"?\");\n\t }\n\n\t this._params(node);\n\t}\n\tfunction _predicate(node) {\n\t if (node.predicate) {\n\t if (!node.returnType) {\n\t this.token(\":\");\n\t }\n\n\t this.space();\n\t this.print(node.predicate, node);\n\t }\n\t}\n\tfunction _functionHead(node) {\n\t if (node.async) {\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t this.word(\"function\");\n\t if (node.generator) this.token(\"*\");\n\t this.space();\n\n\t if (node.id) {\n\t this.print(node.id, node);\n\t }\n\n\t this._params(node);\n\n\t this._predicate(node);\n\t}\n\tfunction FunctionExpression(node) {\n\t this._functionHead(node);\n\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\tfunction ArrowFunctionExpression(node) {\n\t if (node.async) {\n\t this.word(\"async\");\n\t this.space();\n\t }\n\n\t var firstParam = node.params[0];\n\n\t if (!this.format.retainLines && !this.format.auxiliaryCommentBefore && !this.format.auxiliaryCommentAfter && node.params.length === 1 && isIdentifier$c(firstParam) && !hasTypesOrComments(node, firstParam)) {\n\t this.print(firstParam, node);\n\t } else {\n\t this._params(node);\n\t }\n\n\t this._predicate(node);\n\n\t this.space();\n\t this.token(\"=>\");\n\t this.space();\n\t this.print(node.body, node);\n\t}\n\n\tfunction hasTypesOrComments(node, param) {\n\t var _param$leadingComment, _param$trailingCommen;\n\n\t return !!(node.typeParameters || node.returnType || node.predicate || param.typeAnnotation || param.optional || (_param$leadingComment = param.leadingComments) != null && _param$leadingComment.length || (_param$trailingCommen = param.trailingComments) != null && _param$trailingCommen.length);\n\t}\n\n\tvar isClassDeclaration = isClassDeclaration$3,\n\t isExportDefaultSpecifier = isExportDefaultSpecifier$1,\n\t isExportNamespaceSpecifier = isExportNamespaceSpecifier$1,\n\t isImportDefaultSpecifier = isImportDefaultSpecifier$1,\n\t isImportNamespaceSpecifier = isImportNamespaceSpecifier$1,\n\t isStatement$4 = isStatement$7;\n\tfunction ImportSpecifier(node) {\n\t if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n\t this.word(node.importKind);\n\t this.space();\n\t }\n\n\t this.print(node.imported, node);\n\n\t if (node.local && node.local.name !== node.imported.name) {\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.local, node);\n\t }\n\t}\n\tfunction ImportDefaultSpecifier(node) {\n\t this.print(node.local, node);\n\t}\n\tfunction ExportDefaultSpecifier(node) {\n\t this.print(node.exported, node);\n\t}\n\tfunction ExportSpecifier(node) {\n\t this.print(node.local, node);\n\n\t if (node.exported && node.local.name !== node.exported.name) {\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.exported, node);\n\t }\n\t}\n\tfunction ExportNamespaceSpecifier(node) {\n\t this.token(\"*\");\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.exported, node);\n\t}\n\tfunction ExportAllDeclaration(node) {\n\t this.word(\"export\");\n\t this.space();\n\n\t if (node.exportKind === \"type\") {\n\t this.word(\"type\");\n\t this.space();\n\t }\n\n\t this.token(\"*\");\n\t this.space();\n\t this.word(\"from\");\n\t this.space();\n\t this.print(node.source, node);\n\t this.printAssertions(node);\n\t this.semicolon();\n\t}\n\tfunction ExportNamedDeclaration(node) {\n\t if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {\n\t this.printJoin(node.declaration.decorators, node);\n\t }\n\n\t this.word(\"export\");\n\t this.space();\n\t ExportDeclaration.apply(this, arguments);\n\t}\n\tfunction ExportDefaultDeclaration(node) {\n\t if (this.format.decoratorsBeforeExport && isClassDeclaration(node.declaration)) {\n\t this.printJoin(node.declaration.decorators, node);\n\t }\n\n\t this.word(\"export\");\n\t this.space();\n\t this.word(\"default\");\n\t this.space();\n\t ExportDeclaration.apply(this, arguments);\n\t}\n\n\tfunction ExportDeclaration(node) {\n\t if (node.declaration) {\n\t var declar = node.declaration;\n\t this.print(declar, node);\n\t if (!isStatement$4(declar)) this.semicolon();\n\t } else {\n\t if (node.exportKind === \"type\") {\n\t this.word(\"type\");\n\t this.space();\n\t }\n\n\t var specifiers = node.specifiers.slice(0);\n\t var hasSpecial = false;\n\n\t for (;;) {\n\t var first = specifiers[0];\n\n\t if (isExportDefaultSpecifier(first) || isExportNamespaceSpecifier(first)) {\n\t hasSpecial = true;\n\t this.print(specifiers.shift(), node);\n\n\t if (specifiers.length) {\n\t this.token(\",\");\n\t this.space();\n\t }\n\t } else {\n\t break;\n\t }\n\t }\n\n\t if (specifiers.length || !specifiers.length && !hasSpecial) {\n\t this.token(\"{\");\n\n\t if (specifiers.length) {\n\t this.space();\n\t this.printList(specifiers, node);\n\t this.space();\n\t }\n\n\t this.token(\"}\");\n\t }\n\n\t if (node.source) {\n\t this.space();\n\t this.word(\"from\");\n\t this.space();\n\t this.print(node.source, node);\n\t this.printAssertions(node);\n\t }\n\n\t this.semicolon();\n\t }\n\t}\n\n\tfunction ImportDeclaration(node) {\n\t this.word(\"import\");\n\t this.space();\n\n\t if (node.importKind === \"type\" || node.importKind === \"typeof\") {\n\t this.word(node.importKind);\n\t this.space();\n\t }\n\n\t var specifiers = node.specifiers.slice(0);\n\n\t if (specifiers != null && specifiers.length) {\n\t for (;;) {\n\t var first = specifiers[0];\n\n\t if (isImportDefaultSpecifier(first) || isImportNamespaceSpecifier(first)) {\n\t this.print(specifiers.shift(), node);\n\n\t if (specifiers.length) {\n\t this.token(\",\");\n\t this.space();\n\t }\n\t } else {\n\t break;\n\t }\n\t }\n\n\t if (specifiers.length) {\n\t this.token(\"{\");\n\t this.space();\n\t this.printList(specifiers, node);\n\t this.space();\n\t this.token(\"}\");\n\t }\n\n\t this.space();\n\t this.word(\"from\");\n\t this.space();\n\t }\n\n\t this.print(node.source, node);\n\t this.printAssertions(node);\n\t {\n\t var _node$attributes;\n\n\t if ((_node$attributes = node.attributes) != null && _node$attributes.length) {\n\t this.space();\n\t this.word(\"with\");\n\t this.space();\n\t this.printList(node.attributes, node);\n\t }\n\t }\n\t this.semicolon();\n\t}\n\tfunction ImportAttribute(node) {\n\t this.print(node.key);\n\t this.token(\":\");\n\t this.space();\n\t this.print(node.value);\n\t}\n\tfunction ImportNamespaceSpecifier(node) {\n\t this.token(\"*\");\n\t this.space();\n\t this.word(\"as\");\n\t this.space();\n\t this.print(node.local, node);\n\t}\n\n\tvar byteLength_1 = byteLength;\n\tvar toByteArray_1 = toByteArray;\n\tvar fromByteArray_1 = fromByteArray;\n\tvar lookup = [];\n\tvar revLookup = [];\n\tvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array;\n\tvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\n\tfor (var i = 0, len = code.length; i < len; ++i) {\n\t lookup[i] = code[i];\n\t revLookup[code.charCodeAt(i)] = i;\n\t}\n\n\trevLookup['-'.charCodeAt(0)] = 62;\n\trevLookup['_'.charCodeAt(0)] = 63;\n\n\tfunction getLens(b64) {\n\t var len = b64.length;\n\n\t if (len % 4 > 0) {\n\t throw new Error('Invalid string. Length must be a multiple of 4');\n\t }\n\n\t var validLen = b64.indexOf('=');\n\t if (validLen === -1) validLen = len;\n\t var placeHoldersLen = validLen === len ? 0 : 4 - validLen % 4;\n\t return [validLen, placeHoldersLen];\n\t}\n\n\tfunction byteLength(b64) {\n\t var lens = getLens(b64);\n\t var validLen = lens[0];\n\t var placeHoldersLen = lens[1];\n\t return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n\t}\n\n\tfunction _byteLength(b64, validLen, placeHoldersLen) {\n\t return (validLen + placeHoldersLen) * 3 / 4 - placeHoldersLen;\n\t}\n\n\tfunction toByteArray(b64) {\n\t var tmp;\n\t var lens = getLens(b64);\n\t var validLen = lens[0];\n\t var placeHoldersLen = lens[1];\n\t var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen));\n\t var curByte = 0;\n\t var len = placeHoldersLen > 0 ? validLen - 4 : validLen;\n\t var i;\n\n\t for (i = 0; i < len; i += 4) {\n\t tmp = revLookup[b64.charCodeAt(i)] << 18 | revLookup[b64.charCodeAt(i + 1)] << 12 | revLookup[b64.charCodeAt(i + 2)] << 6 | revLookup[b64.charCodeAt(i + 3)];\n\t arr[curByte++] = tmp >> 16 & 0xFF;\n\t arr[curByte++] = tmp >> 8 & 0xFF;\n\t arr[curByte++] = tmp & 0xFF;\n\t }\n\n\t if (placeHoldersLen === 2) {\n\t tmp = revLookup[b64.charCodeAt(i)] << 2 | revLookup[b64.charCodeAt(i + 1)] >> 4;\n\t arr[curByte++] = tmp & 0xFF;\n\t }\n\n\t if (placeHoldersLen === 1) {\n\t tmp = revLookup[b64.charCodeAt(i)] << 10 | revLookup[b64.charCodeAt(i + 1)] << 4 | revLookup[b64.charCodeAt(i + 2)] >> 2;\n\t arr[curByte++] = tmp >> 8 & 0xFF;\n\t arr[curByte++] = tmp & 0xFF;\n\t }\n\n\t return arr;\n\t}\n\n\tfunction tripletToBase64(num) {\n\t return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F];\n\t}\n\n\tfunction encodeChunk(uint8, start, end) {\n\t var tmp;\n\t var output = [];\n\n\t for (var i = start; i < end; i += 3) {\n\t tmp = (uint8[i] << 16 & 0xFF0000) + (uint8[i + 1] << 8 & 0xFF00) + (uint8[i + 2] & 0xFF);\n\t output.push(tripletToBase64(tmp));\n\t }\n\n\t return output.join('');\n\t}\n\n\tfunction fromByteArray(uint8) {\n\t var tmp;\n\t var len = uint8.length;\n\t var extraBytes = len % 3;\n\t var parts = [];\n\t var maxChunkLength = 16383;\n\n\t for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n\t parts.push(encodeChunk(uint8, i, i + maxChunkLength > len2 ? len2 : i + maxChunkLength));\n\t }\n\n\t if (extraBytes === 1) {\n\t tmp = uint8[len - 1];\n\t parts.push(lookup[tmp >> 2] + lookup[tmp << 4 & 0x3F] + '==');\n\t } else if (extraBytes === 2) {\n\t tmp = (uint8[len - 2] << 8) + uint8[len - 1];\n\t parts.push(lookup[tmp >> 10] + lookup[tmp >> 4 & 0x3F] + lookup[tmp << 2 & 0x3F] + '=');\n\t }\n\n\t return parts.join('');\n\t}\n\n\tvar base64Js = {\n\t byteLength: byteLength_1,\n\t toByteArray: toByteArray_1,\n\t fromByteArray: fromByteArray_1\n\t};\n\n\tvar read = function read(buffer, offset, isLE, mLen, nBytes) {\n\t var e, m;\n\t var eLen = nBytes * 8 - mLen - 1;\n\t var eMax = (1 << eLen) - 1;\n\t var eBias = eMax >> 1;\n\t var nBits = -7;\n\t var i = isLE ? nBytes - 1 : 0;\n\t var d = isLE ? -1 : 1;\n\t var s = buffer[offset + i];\n\t i += d;\n\t e = s & (1 << -nBits) - 1;\n\t s >>= -nBits;\n\t nBits += eLen;\n\n\t for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n\t m = e & (1 << -nBits) - 1;\n\t e >>= -nBits;\n\t nBits += mLen;\n\n\t for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\n\n\t if (e === 0) {\n\t e = 1 - eBias;\n\t } else if (e === eMax) {\n\t return m ? NaN : (s ? -1 : 1) * Infinity;\n\t } else {\n\t m = m + Math.pow(2, mLen);\n\t e = e - eBias;\n\t }\n\n\t return (s ? -1 : 1) * m * Math.pow(2, e - mLen);\n\t};\n\n\tvar write = function write(buffer, value, offset, isLE, mLen, nBytes) {\n\t var e, m, c;\n\t var eLen = nBytes * 8 - mLen - 1;\n\t var eMax = (1 << eLen) - 1;\n\t var eBias = eMax >> 1;\n\t var rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;\n\t var i = isLE ? 0 : nBytes - 1;\n\t var d = isLE ? 1 : -1;\n\t var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;\n\t value = Math.abs(value);\n\n\t if (isNaN(value) || value === Infinity) {\n\t m = isNaN(value) ? 1 : 0;\n\t e = eMax;\n\t } else {\n\t e = Math.floor(Math.log(value) / Math.LN2);\n\n\t if (value * (c = Math.pow(2, -e)) < 1) {\n\t e--;\n\t c *= 2;\n\t }\n\n\t if (e + eBias >= 1) {\n\t value += rt / c;\n\t } else {\n\t value += rt * Math.pow(2, 1 - eBias);\n\t }\n\n\t if (value * c >= 2) {\n\t e++;\n\t c /= 2;\n\t }\n\n\t if (e + eBias >= eMax) {\n\t m = 0;\n\t e = eMax;\n\t } else if (e + eBias >= 1) {\n\t m = (value * c - 1) * Math.pow(2, mLen);\n\t e = e + eBias;\n\t } else {\n\t m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);\n\t e = 0;\n\t }\n\t }\n\n\t for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n\t e = e << mLen | m;\n\t eLen += mLen;\n\n\t for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n\t buffer[offset + i - d] |= s * 128;\n\t};\n\n\tvar ieee754 = {\n\t read: read,\n\t write: write\n\t};\n\n\t/*!\n\t * The buffer module from node.js, for the browser.\n\t *\n\t * @author Feross Aboukhadijeh \n\t * @license MIT\n\t */\n\tvar buffer = createCommonjsModule(function (module, exports) {\n\n\t exports.Buffer = Buffer;\n\t exports.SlowBuffer = SlowBuffer;\n\t exports.INSPECT_MAX_BYTES = 50;\n\t var K_MAX_LENGTH = 0x7fffffff;\n\t exports.kMaxLength = K_MAX_LENGTH;\n\t Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();\n\n\t if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') {\n\t 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.');\n\t }\n\n\t function typedArraySupport() {\n\t try {\n\t var arr = new Uint8Array(1);\n\t arr.__proto__ = {\n\t __proto__: Uint8Array.prototype,\n\t foo: function foo() {\n\t return 42;\n\t }\n\t };\n\t return arr.foo() === 42;\n\t } catch (e) {\n\t return false;\n\t }\n\t }\n\n\t Object.defineProperty(Buffer.prototype, 'parent', {\n\t enumerable: true,\n\t get: function get() {\n\t if (!Buffer.isBuffer(this)) return undefined;\n\t return this.buffer;\n\t }\n\t });\n\t Object.defineProperty(Buffer.prototype, 'offset', {\n\t enumerable: true,\n\t get: function get() {\n\t if (!Buffer.isBuffer(this)) return undefined;\n\t return this.byteOffset;\n\t }\n\t });\n\n\t function createBuffer(length) {\n\t if (length > K_MAX_LENGTH) {\n\t throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"');\n\t }\n\n\t var buf = new Uint8Array(length);\n\t buf.__proto__ = Buffer.prototype;\n\t return buf;\n\t }\n\n\t function Buffer(arg, encodingOrOffset, length) {\n\t if (typeof arg === 'number') {\n\t if (typeof encodingOrOffset === 'string') {\n\t throw new TypeError('The \"string\" argument must be of type string. Received type number');\n\t }\n\n\t return allocUnsafe(arg);\n\t }\n\n\t return from(arg, encodingOrOffset, length);\n\t }\n\n\t if (typeof Symbol !== 'undefined' && Symbol.species != null && Buffer[Symbol.species] === Buffer) {\n\t Object.defineProperty(Buffer, Symbol.species, {\n\t value: null,\n\t configurable: true,\n\t enumerable: false,\n\t writable: false\n\t });\n\t }\n\n\t Buffer.poolSize = 8192;\n\n\t function from(value, encodingOrOffset, length) {\n\t if (typeof value === 'string') {\n\t return fromString(value, encodingOrOffset);\n\t }\n\n\t if (ArrayBuffer.isView(value)) {\n\t return fromArrayLike(value);\n\t }\n\n\t if (value == null) {\n\t throw TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);\n\t }\n\n\t if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {\n\t return fromArrayBuffer(value, encodingOrOffset, length);\n\t }\n\n\t if (typeof value === 'number') {\n\t throw new TypeError('The \"value\" argument must not be of type number. Received type number');\n\t }\n\n\t var valueOf = value.valueOf && value.valueOf();\n\n\t if (valueOf != null && valueOf !== value) {\n\t return Buffer.from(valueOf, encodingOrOffset, length);\n\t }\n\n\t var b = fromObject(value);\n\t if (b) return b;\n\n\t if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') {\n\t return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);\n\t }\n\n\t throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);\n\t }\n\n\t Buffer.from = function (value, encodingOrOffset, length) {\n\t return from(value, encodingOrOffset, length);\n\t };\n\n\t Buffer.prototype.__proto__ = Uint8Array.prototype;\n\t Buffer.__proto__ = Uint8Array;\n\n\t function assertSize(size) {\n\t if (typeof size !== 'number') {\n\t throw new TypeError('\"size\" argument must be of type number');\n\t } else if (size < 0) {\n\t throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"');\n\t }\n\t }\n\n\t function alloc(size, fill, encoding) {\n\t assertSize(size);\n\n\t if (size <= 0) {\n\t return createBuffer(size);\n\t }\n\n\t if (fill !== undefined) {\n\t return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);\n\t }\n\n\t return createBuffer(size);\n\t }\n\n\t Buffer.alloc = function (size, fill, encoding) {\n\t return alloc(size, fill, encoding);\n\t };\n\n\t function allocUnsafe(size) {\n\t assertSize(size);\n\t return createBuffer(size < 0 ? 0 : checked(size) | 0);\n\t }\n\n\t Buffer.allocUnsafe = function (size) {\n\t return allocUnsafe(size);\n\t };\n\n\t Buffer.allocUnsafeSlow = function (size) {\n\t return allocUnsafe(size);\n\t };\n\n\t function fromString(string, encoding) {\n\t if (typeof encoding !== 'string' || encoding === '') {\n\t encoding = 'utf8';\n\t }\n\n\t if (!Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding);\n\t }\n\n\t var length = byteLength(string, encoding) | 0;\n\t var buf = createBuffer(length);\n\t var actual = buf.write(string, encoding);\n\n\t if (actual !== length) {\n\t buf = buf.slice(0, actual);\n\t }\n\n\t return buf;\n\t }\n\n\t function fromArrayLike(array) {\n\t var length = array.length < 0 ? 0 : checked(array.length) | 0;\n\t var buf = createBuffer(length);\n\n\t for (var i = 0; i < length; i += 1) {\n\t buf[i] = array[i] & 255;\n\t }\n\n\t return buf;\n\t }\n\n\t function fromArrayBuffer(array, byteOffset, length) {\n\t if (byteOffset < 0 || array.byteLength < byteOffset) {\n\t throw new RangeError('\"offset\" is outside of buffer bounds');\n\t }\n\n\t if (array.byteLength < byteOffset + (length || 0)) {\n\t throw new RangeError('\"length\" is outside of buffer bounds');\n\t }\n\n\t var buf;\n\n\t if (byteOffset === undefined && length === undefined) {\n\t buf = new Uint8Array(array);\n\t } else if (length === undefined) {\n\t buf = new Uint8Array(array, byteOffset);\n\t } else {\n\t buf = new Uint8Array(array, byteOffset, length);\n\t }\n\n\t buf.__proto__ = Buffer.prototype;\n\t return buf;\n\t }\n\n\t function fromObject(obj) {\n\t if (Buffer.isBuffer(obj)) {\n\t var len = checked(obj.length) | 0;\n\t var buf = createBuffer(len);\n\n\t if (buf.length === 0) {\n\t return buf;\n\t }\n\n\t obj.copy(buf, 0, 0, len);\n\t return buf;\n\t }\n\n\t if (obj.length !== undefined) {\n\t if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n\t return createBuffer(0);\n\t }\n\n\t return fromArrayLike(obj);\n\t }\n\n\t if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n\t return fromArrayLike(obj.data);\n\t }\n\t }\n\n\t function checked(length) {\n\t if (length >= K_MAX_LENGTH) {\n\t throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');\n\t }\n\n\t return length | 0;\n\t }\n\n\t function SlowBuffer(length) {\n\t if (+length != length) {\n\t length = 0;\n\t }\n\n\t return Buffer.alloc(+length);\n\t }\n\n\t Buffer.isBuffer = function isBuffer(b) {\n\t return b != null && b._isBuffer === true && b !== Buffer.prototype;\n\t };\n\n\t Buffer.compare = function compare(a, b) {\n\t if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);\n\t if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);\n\n\t if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n\t throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');\n\t }\n\n\t if (a === b) return 0;\n\t var x = a.length;\n\t var y = b.length;\n\n\t for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n\t if (a[i] !== b[i]) {\n\t x = a[i];\n\t y = b[i];\n\t break;\n\t }\n\t }\n\n\t if (x < y) return -1;\n\t if (y < x) return 1;\n\t return 0;\n\t };\n\n\t Buffer.isEncoding = function isEncoding(encoding) {\n\t switch (String(encoding).toLowerCase()) {\n\t case 'hex':\n\t case 'utf8':\n\t case 'utf-8':\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t case 'base64':\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return true;\n\n\t default:\n\t return false;\n\t }\n\t };\n\n\t Buffer.concat = function concat(list, length) {\n\t if (!Array.isArray(list)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers');\n\t }\n\n\t if (list.length === 0) {\n\t return Buffer.alloc(0);\n\t }\n\n\t var i;\n\n\t if (length === undefined) {\n\t length = 0;\n\n\t for (i = 0; i < list.length; ++i) {\n\t length += list[i].length;\n\t }\n\t }\n\n\t var buffer = Buffer.allocUnsafe(length);\n\t var pos = 0;\n\n\t for (i = 0; i < list.length; ++i) {\n\t var buf = list[i];\n\n\t if (isInstance(buf, Uint8Array)) {\n\t buf = Buffer.from(buf);\n\t }\n\n\t if (!Buffer.isBuffer(buf)) {\n\t throw new TypeError('\"list\" argument must be an Array of Buffers');\n\t }\n\n\t buf.copy(buffer, pos);\n\t pos += buf.length;\n\t }\n\n\t return buffer;\n\t };\n\n\t function byteLength(string, encoding) {\n\t if (Buffer.isBuffer(string)) {\n\t return string.length;\n\t }\n\n\t if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n\t return string.byteLength;\n\t }\n\n\t if (typeof string !== 'string') {\n\t throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + typeof string);\n\t }\n\n\t var len = string.length;\n\t var mustMatch = arguments.length > 2 && arguments[2] === true;\n\t if (!mustMatch && len === 0) return 0;\n\t var loweredCase = false;\n\n\t for (;;) {\n\t switch (encoding) {\n\t case 'ascii':\n\t case 'latin1':\n\t case 'binary':\n\t return len;\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8ToBytes(string).length;\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return len * 2;\n\n\t case 'hex':\n\t return len >>> 1;\n\n\t case 'base64':\n\t return base64ToBytes(string).length;\n\n\t default:\n\t if (loweredCase) {\n\t return mustMatch ? -1 : utf8ToBytes(string).length;\n\t }\n\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t }\n\n\t Buffer.byteLength = byteLength;\n\n\t function slowToString(encoding, start, end) {\n\t var loweredCase = false;\n\n\t if (start === undefined || start < 0) {\n\t start = 0;\n\t }\n\n\t if (start > this.length) {\n\t return '';\n\t }\n\n\t if (end === undefined || end > this.length) {\n\t end = this.length;\n\t }\n\n\t if (end <= 0) {\n\t return '';\n\t }\n\n\t end >>>= 0;\n\t start >>>= 0;\n\n\t if (end <= start) {\n\t return '';\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\n\t while (true) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexSlice(this, start, end);\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Slice(this, start, end);\n\n\t case 'ascii':\n\t return asciiSlice(this, start, end);\n\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Slice(this, start, end);\n\n\t case 'base64':\n\t return base64Slice(this, start, end);\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return utf16leSlice(this, start, end);\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n\t encoding = (encoding + '').toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t }\n\n\t Buffer.prototype._isBuffer = true;\n\n\t function swap(b, n, m) {\n\t var i = b[n];\n\t b[n] = b[m];\n\t b[m] = i;\n\t }\n\n\t Buffer.prototype.swap16 = function swap16() {\n\t var len = this.length;\n\n\t if (len % 2 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 16-bits');\n\t }\n\n\t for (var i = 0; i < len; i += 2) {\n\t swap(this, i, i + 1);\n\t }\n\n\t return this;\n\t };\n\n\t Buffer.prototype.swap32 = function swap32() {\n\t var len = this.length;\n\n\t if (len % 4 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 32-bits');\n\t }\n\n\t for (var i = 0; i < len; i += 4) {\n\t swap(this, i, i + 3);\n\t swap(this, i + 1, i + 2);\n\t }\n\n\t return this;\n\t };\n\n\t Buffer.prototype.swap64 = function swap64() {\n\t var len = this.length;\n\n\t if (len % 8 !== 0) {\n\t throw new RangeError('Buffer size must be a multiple of 64-bits');\n\t }\n\n\t for (var i = 0; i < len; i += 8) {\n\t swap(this, i, i + 7);\n\t swap(this, i + 1, i + 6);\n\t swap(this, i + 2, i + 5);\n\t swap(this, i + 3, i + 4);\n\t }\n\n\t return this;\n\t };\n\n\t Buffer.prototype.toString = function toString() {\n\t var length = this.length;\n\t if (length === 0) return '';\n\t if (arguments.length === 0) return utf8Slice(this, 0, length);\n\t return slowToString.apply(this, arguments);\n\t };\n\n\t Buffer.prototype.toLocaleString = Buffer.prototype.toString;\n\n\t Buffer.prototype.equals = function equals(b) {\n\t if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');\n\t if (this === b) return true;\n\t return Buffer.compare(this, b) === 0;\n\t };\n\n\t Buffer.prototype.inspect = function inspect() {\n\t var str = '';\n\t var max = exports.INSPECT_MAX_BYTES;\n\t str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();\n\t if (this.length > max) str += ' ... ';\n\t return '';\n\t };\n\n\t Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {\n\t if (isInstance(target, Uint8Array)) {\n\t target = Buffer.from(target, target.offset, target.byteLength);\n\t }\n\n\t if (!Buffer.isBuffer(target)) {\n\t throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + typeof target);\n\t }\n\n\t if (start === undefined) {\n\t start = 0;\n\t }\n\n\t if (end === undefined) {\n\t end = target ? target.length : 0;\n\t }\n\n\t if (thisStart === undefined) {\n\t thisStart = 0;\n\t }\n\n\t if (thisEnd === undefined) {\n\t thisEnd = this.length;\n\t }\n\n\t if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n\t throw new RangeError('out of range index');\n\t }\n\n\t if (thisStart >= thisEnd && start >= end) {\n\t return 0;\n\t }\n\n\t if (thisStart >= thisEnd) {\n\t return -1;\n\t }\n\n\t if (start >= end) {\n\t return 1;\n\t }\n\n\t start >>>= 0;\n\t end >>>= 0;\n\t thisStart >>>= 0;\n\t thisEnd >>>= 0;\n\t if (this === target) return 0;\n\t var x = thisEnd - thisStart;\n\t var y = end - start;\n\t var len = Math.min(x, y);\n\t var thisCopy = this.slice(thisStart, thisEnd);\n\t var targetCopy = target.slice(start, end);\n\n\t for (var i = 0; i < len; ++i) {\n\t if (thisCopy[i] !== targetCopy[i]) {\n\t x = thisCopy[i];\n\t y = targetCopy[i];\n\t break;\n\t }\n\t }\n\n\t if (x < y) return -1;\n\t if (y < x) return 1;\n\t return 0;\n\t };\n\n\t function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {\n\t if (buffer.length === 0) return -1;\n\n\t if (typeof byteOffset === 'string') {\n\t encoding = byteOffset;\n\t byteOffset = 0;\n\t } else if (byteOffset > 0x7fffffff) {\n\t byteOffset = 0x7fffffff;\n\t } else if (byteOffset < -0x80000000) {\n\t byteOffset = -0x80000000;\n\t }\n\n\t byteOffset = +byteOffset;\n\n\t if (numberIsNaN(byteOffset)) {\n\t byteOffset = dir ? 0 : buffer.length - 1;\n\t }\n\n\t if (byteOffset < 0) byteOffset = buffer.length + byteOffset;\n\n\t if (byteOffset >= buffer.length) {\n\t if (dir) return -1;else byteOffset = buffer.length - 1;\n\t } else if (byteOffset < 0) {\n\t if (dir) byteOffset = 0;else return -1;\n\t }\n\n\t if (typeof val === 'string') {\n\t val = Buffer.from(val, encoding);\n\t }\n\n\t if (Buffer.isBuffer(val)) {\n\t if (val.length === 0) {\n\t return -1;\n\t }\n\n\t return arrayIndexOf(buffer, val, byteOffset, encoding, dir);\n\t } else if (typeof val === 'number') {\n\t val = val & 0xFF;\n\n\t if (typeof Uint8Array.prototype.indexOf === 'function') {\n\t if (dir) {\n\t return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);\n\t } else {\n\t return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);\n\t }\n\t }\n\n\t return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);\n\t }\n\n\t throw new TypeError('val must be string, number or Buffer');\n\t }\n\n\t function arrayIndexOf(arr, val, byteOffset, encoding, dir) {\n\t var indexSize = 1;\n\t var arrLength = arr.length;\n\t var valLength = val.length;\n\n\t if (encoding !== undefined) {\n\t encoding = String(encoding).toLowerCase();\n\n\t if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {\n\t if (arr.length < 2 || val.length < 2) {\n\t return -1;\n\t }\n\n\t indexSize = 2;\n\t arrLength /= 2;\n\t valLength /= 2;\n\t byteOffset /= 2;\n\t }\n\t }\n\n\t function read(buf, i) {\n\t if (indexSize === 1) {\n\t return buf[i];\n\t } else {\n\t return buf.readUInt16BE(i * indexSize);\n\t }\n\t }\n\n\t var i;\n\n\t if (dir) {\n\t var foundIndex = -1;\n\n\t for (i = byteOffset; i < arrLength; i++) {\n\t if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n\t if (foundIndex === -1) foundIndex = i;\n\t if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;\n\t } else {\n\t if (foundIndex !== -1) i -= i - foundIndex;\n\t foundIndex = -1;\n\t }\n\t }\n\t } else {\n\t if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;\n\n\t for (i = byteOffset; i >= 0; i--) {\n\t var found = true;\n\n\t for (var j = 0; j < valLength; j++) {\n\t if (read(arr, i + j) !== read(val, j)) {\n\t found = false;\n\t break;\n\t }\n\t }\n\n\t if (found) return i;\n\t }\n\t }\n\n\t return -1;\n\t }\n\n\t Buffer.prototype.includes = function includes(val, byteOffset, encoding) {\n\t return this.indexOf(val, byteOffset, encoding) !== -1;\n\t };\n\n\t Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, true);\n\t };\n\n\t Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {\n\t return bidirectionalIndexOf(this, val, byteOffset, encoding, false);\n\t };\n\n\t function hexWrite(buf, string, offset, length) {\n\t offset = Number(offset) || 0;\n\t var remaining = buf.length - offset;\n\n\t if (!length) {\n\t length = remaining;\n\t } else {\n\t length = Number(length);\n\n\t if (length > remaining) {\n\t length = remaining;\n\t }\n\t }\n\n\t var strLen = string.length;\n\n\t if (length > strLen / 2) {\n\t length = strLen / 2;\n\t }\n\n\t for (var i = 0; i < length; ++i) {\n\t var parsed = parseInt(string.substr(i * 2, 2), 16);\n\t if (numberIsNaN(parsed)) return i;\n\t buf[offset + i] = parsed;\n\t }\n\n\t return i;\n\t }\n\n\t function utf8Write(buf, string, offset, length) {\n\t return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);\n\t }\n\n\t function asciiWrite(buf, string, offset, length) {\n\t return blitBuffer(asciiToBytes(string), buf, offset, length);\n\t }\n\n\t function latin1Write(buf, string, offset, length) {\n\t return asciiWrite(buf, string, offset, length);\n\t }\n\n\t function base64Write(buf, string, offset, length) {\n\t return blitBuffer(base64ToBytes(string), buf, offset, length);\n\t }\n\n\t function ucs2Write(buf, string, offset, length) {\n\t return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);\n\t }\n\n\t Buffer.prototype.write = function write(string, offset, length, encoding) {\n\t if (offset === undefined) {\n\t encoding = 'utf8';\n\t length = this.length;\n\t offset = 0;\n\t } else if (length === undefined && typeof offset === 'string') {\n\t encoding = offset;\n\t length = this.length;\n\t offset = 0;\n\t } else if (isFinite(offset)) {\n\t offset = offset >>> 0;\n\n\t if (isFinite(length)) {\n\t length = length >>> 0;\n\t if (encoding === undefined) encoding = 'utf8';\n\t } else {\n\t encoding = length;\n\t length = undefined;\n\t }\n\t } else {\n\t throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');\n\t }\n\n\t var remaining = this.length - offset;\n\t if (length === undefined || length > remaining) length = remaining;\n\n\t if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {\n\t throw new RangeError('Attempt to write outside buffer bounds');\n\t }\n\n\t if (!encoding) encoding = 'utf8';\n\t var loweredCase = false;\n\n\t for (;;) {\n\t switch (encoding) {\n\t case 'hex':\n\t return hexWrite(this, string, offset, length);\n\n\t case 'utf8':\n\t case 'utf-8':\n\t return utf8Write(this, string, offset, length);\n\n\t case 'ascii':\n\t return asciiWrite(this, string, offset, length);\n\n\t case 'latin1':\n\t case 'binary':\n\t return latin1Write(this, string, offset, length);\n\n\t case 'base64':\n\t return base64Write(this, string, offset, length);\n\n\t case 'ucs2':\n\t case 'ucs-2':\n\t case 'utf16le':\n\t case 'utf-16le':\n\t return ucs2Write(this, string, offset, length);\n\n\t default:\n\t if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);\n\t encoding = ('' + encoding).toLowerCase();\n\t loweredCase = true;\n\t }\n\t }\n\t };\n\n\t Buffer.prototype.toJSON = function toJSON() {\n\t return {\n\t type: 'Buffer',\n\t data: Array.prototype.slice.call(this._arr || this, 0)\n\t };\n\t };\n\n\t function base64Slice(buf, start, end) {\n\t if (start === 0 && end === buf.length) {\n\t return base64Js.fromByteArray(buf);\n\t } else {\n\t return base64Js.fromByteArray(buf.slice(start, end));\n\t }\n\t }\n\n\t function utf8Slice(buf, start, end) {\n\t end = Math.min(buf.length, end);\n\t var res = [];\n\t var i = start;\n\n\t while (i < end) {\n\t var firstByte = buf[i];\n\t var codePoint = null;\n\t var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;\n\n\t if (i + bytesPerSequence <= end) {\n\t var secondByte, thirdByte, fourthByte, tempCodePoint;\n\n\t switch (bytesPerSequence) {\n\t case 1:\n\t if (firstByte < 0x80) {\n\t codePoint = firstByte;\n\t }\n\n\t break;\n\n\t case 2:\n\t secondByte = buf[i + 1];\n\n\t if ((secondByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;\n\n\t if (tempCodePoint > 0x7F) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\n\t break;\n\n\t case 3:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;\n\n\t if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\n\t break;\n\n\t case 4:\n\t secondByte = buf[i + 1];\n\t thirdByte = buf[i + 2];\n\t fourthByte = buf[i + 3];\n\n\t if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n\t tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;\n\n\t if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n\t codePoint = tempCodePoint;\n\t }\n\t }\n\n\t }\n\t }\n\n\t if (codePoint === null) {\n\t codePoint = 0xFFFD;\n\t bytesPerSequence = 1;\n\t } else if (codePoint > 0xFFFF) {\n\t codePoint -= 0x10000;\n\t res.push(codePoint >>> 10 & 0x3FF | 0xD800);\n\t codePoint = 0xDC00 | codePoint & 0x3FF;\n\t }\n\n\t res.push(codePoint);\n\t i += bytesPerSequence;\n\t }\n\n\t return decodeCodePointsArray(res);\n\t }\n\n\t var MAX_ARGUMENTS_LENGTH = 0x1000;\n\n\t function decodeCodePointsArray(codePoints) {\n\t var len = codePoints.length;\n\n\t if (len <= MAX_ARGUMENTS_LENGTH) {\n\t return String.fromCharCode.apply(String, codePoints);\n\t }\n\n\t var res = '';\n\t var i = 0;\n\n\t while (i < len) {\n\t res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));\n\t }\n\n\t return res;\n\t }\n\n\t function asciiSlice(buf, start, end) {\n\t var ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i] & 0x7F);\n\t }\n\n\t return ret;\n\t }\n\n\t function latin1Slice(buf, start, end) {\n\t var ret = '';\n\t end = Math.min(buf.length, end);\n\n\t for (var i = start; i < end; ++i) {\n\t ret += String.fromCharCode(buf[i]);\n\t }\n\n\t return ret;\n\t }\n\n\t function hexSlice(buf, start, end) {\n\t var len = buf.length;\n\t if (!start || start < 0) start = 0;\n\t if (!end || end < 0 || end > len) end = len;\n\t var out = '';\n\n\t for (var i = start; i < end; ++i) {\n\t out += toHex(buf[i]);\n\t }\n\n\t return out;\n\t }\n\n\t function utf16leSlice(buf, start, end) {\n\t var bytes = buf.slice(start, end);\n\t var res = '';\n\n\t for (var i = 0; i < bytes.length; i += 2) {\n\t res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);\n\t }\n\n\t return res;\n\t }\n\n\t Buffer.prototype.slice = function slice(start, end) {\n\t var len = this.length;\n\t start = ~~start;\n\t end = end === undefined ? len : ~~end;\n\n\t if (start < 0) {\n\t start += len;\n\t if (start < 0) start = 0;\n\t } else if (start > len) {\n\t start = len;\n\t }\n\n\t if (end < 0) {\n\t end += len;\n\t if (end < 0) end = 0;\n\t } else if (end > len) {\n\t end = len;\n\t }\n\n\t if (end < start) end = start;\n\t var newBuf = this.subarray(start, end);\n\t newBuf.__proto__ = Buffer.prototype;\n\t return newBuf;\n\t };\n\n\t function checkOffset(offset, ext, length) {\n\t if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');\n\t if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');\n\t }\n\n\t Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\t var val = this[offset];\n\t var mul = 1;\n\t var i = 0;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\n\t return val;\n\t };\n\n\t Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\n\t if (!noAssert) {\n\t checkOffset(offset, byteLength, this.length);\n\t }\n\n\t var val = this[offset + --byteLength];\n\t var mul = 1;\n\n\t while (byteLength > 0 && (mul *= 0x100)) {\n\t val += this[offset + --byteLength] * mul;\n\t }\n\n\t return val;\n\t };\n\n\t Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t return this[offset];\n\t };\n\n\t Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return this[offset] | this[offset + 1] << 8;\n\t };\n\n\t Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t return this[offset] << 8 | this[offset + 1];\n\t };\n\n\t Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;\n\t };\n\n\t Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);\n\t };\n\n\t Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\t var val = this[offset];\n\t var mul = 1;\n\t var i = 0;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t val += this[offset + i] * mul;\n\t }\n\n\t mul *= 0x80;\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\t return val;\n\t };\n\n\t Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\t if (!noAssert) checkOffset(offset, byteLength, this.length);\n\t var i = byteLength;\n\t var mul = 1;\n\t var val = this[offset + --i];\n\n\t while (i > 0 && (mul *= 0x100)) {\n\t val += this[offset + --i] * mul;\n\t }\n\n\t mul *= 0x80;\n\t if (val >= mul) val -= Math.pow(2, 8 * byteLength);\n\t return val;\n\t };\n\n\t Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 1, this.length);\n\t if (!(this[offset] & 0x80)) return this[offset];\n\t return (0xff - this[offset] + 1) * -1;\n\t };\n\n\t Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t var val = this[offset] | this[offset + 1] << 8;\n\t return val & 0x8000 ? val | 0xFFFF0000 : val;\n\t };\n\n\t Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 2, this.length);\n\t var val = this[offset + 1] | this[offset] << 8;\n\t return val & 0x8000 ? val | 0xFFFF0000 : val;\n\t };\n\n\t Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;\n\t };\n\n\t Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];\n\t };\n\n\t Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754.read(this, offset, true, 23, 4);\n\t };\n\n\t Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 4, this.length);\n\t return ieee754.read(this, offset, false, 23, 4);\n\t };\n\n\t Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754.read(this, offset, true, 52, 8);\n\t };\n\n\t Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {\n\t offset = offset >>> 0;\n\t if (!noAssert) checkOffset(offset, 8, this.length);\n\t return ieee754.read(this, offset, false, 52, 8);\n\t };\n\n\t function checkInt(buf, value, offset, ext, max, min) {\n\t if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance');\n\t if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds');\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range');\n\t }\n\n\t Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t var mul = 1;\n\t var i = 0;\n\t this[offset] = value & 0xFF;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t this[offset + i] = value / mul & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t byteLength = byteLength >>> 0;\n\n\t if (!noAssert) {\n\t var maxBytes = Math.pow(2, 8 * byteLength) - 1;\n\t checkInt(this, value, offset, byteLength, maxBytes, 0);\n\t }\n\n\t var i = byteLength - 1;\n\t var mul = 1;\n\t this[offset + i] = value & 0xFF;\n\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t this[offset + i] = value / mul & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);\n\t this[offset] = value & 0xff;\n\t return offset + 1;\n\t };\n\n\t Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = value & 0xff;\n\t this[offset + 1] = value >>> 8;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);\n\t this[offset] = value >>> 8;\n\t this[offset + 1] = value & 0xff;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset + 3] = value >>> 24;\n\t this[offset + 2] = value >>> 16;\n\t this[offset + 1] = value >>> 8;\n\t this[offset] = value & 0xff;\n\t return offset + 4;\n\t };\n\n\t Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);\n\t this[offset] = value >>> 24;\n\t this[offset + 1] = value >>> 16;\n\t this[offset + 2] = value >>> 8;\n\t this[offset + 3] = value & 0xff;\n\t return offset + 4;\n\t };\n\n\t Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1);\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t var i = 0;\n\t var mul = 1;\n\t var sub = 0;\n\t this[offset] = value & 0xFF;\n\n\t while (++i < byteLength && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n\t sub = 1;\n\t }\n\n\t this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t var limit = Math.pow(2, 8 * byteLength - 1);\n\t checkInt(this, value, offset, byteLength, limit - 1, -limit);\n\t }\n\n\t var i = byteLength - 1;\n\t var mul = 1;\n\t var sub = 0;\n\t this[offset + i] = value & 0xFF;\n\n\t while (--i >= 0 && (mul *= 0x100)) {\n\t if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n\t sub = 1;\n\t }\n\n\t this[offset + i] = (value / mul >> 0) - sub & 0xFF;\n\t }\n\n\t return offset + byteLength;\n\t };\n\n\t Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);\n\t if (value < 0) value = 0xff + value + 1;\n\t this[offset] = value & 0xff;\n\t return offset + 1;\n\t };\n\n\t Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = value & 0xff;\n\t this[offset + 1] = value >>> 8;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);\n\t this[offset] = value >>> 8;\n\t this[offset + 1] = value & 0xff;\n\t return offset + 2;\n\t };\n\n\t Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t this[offset] = value & 0xff;\n\t this[offset + 1] = value >>> 8;\n\t this[offset + 2] = value >>> 16;\n\t this[offset + 3] = value >>> 24;\n\t return offset + 4;\n\t };\n\n\t Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\t if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);\n\t if (value < 0) value = 0xffffffff + value + 1;\n\t this[offset] = value >>> 24;\n\t this[offset + 1] = value >>> 16;\n\t this[offset + 2] = value >>> 8;\n\t this[offset + 3] = value & 0xff;\n\t return offset + 4;\n\t };\n\n\t function checkIEEE754(buf, value, offset, ext, max, min) {\n\t if (offset + ext > buf.length) throw new RangeError('Index out of range');\n\t if (offset < 0) throw new RangeError('Index out of range');\n\t }\n\n\t function writeFloat(buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 4);\n\t }\n\n\t ieee754.write(buf, value, offset, littleEndian, 23, 4);\n\t return offset + 4;\n\t }\n\n\t Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {\n\t return writeFloat(this, value, offset, true, noAssert);\n\t };\n\n\t Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {\n\t return writeFloat(this, value, offset, false, noAssert);\n\t };\n\n\t function writeDouble(buf, value, offset, littleEndian, noAssert) {\n\t value = +value;\n\t offset = offset >>> 0;\n\n\t if (!noAssert) {\n\t checkIEEE754(buf, value, offset, 8);\n\t }\n\n\t ieee754.write(buf, value, offset, littleEndian, 52, 8);\n\t return offset + 8;\n\t }\n\n\t Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {\n\t return writeDouble(this, value, offset, true, noAssert);\n\t };\n\n\t Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {\n\t return writeDouble(this, value, offset, false, noAssert);\n\t };\n\n\t Buffer.prototype.copy = function copy(target, targetStart, start, end) {\n\t if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');\n\t if (!start) start = 0;\n\t if (!end && end !== 0) end = this.length;\n\t if (targetStart >= target.length) targetStart = target.length;\n\t if (!targetStart) targetStart = 0;\n\t if (end > 0 && end < start) end = start;\n\t if (end === start) return 0;\n\t if (target.length === 0 || this.length === 0) return 0;\n\n\t if (targetStart < 0) {\n\t throw new RangeError('targetStart out of bounds');\n\t }\n\n\t if (start < 0 || start >= this.length) throw new RangeError('Index out of range');\n\t if (end < 0) throw new RangeError('sourceEnd out of bounds');\n\t if (end > this.length) end = this.length;\n\n\t if (target.length - targetStart < end - start) {\n\t end = target.length - targetStart + start;\n\t }\n\n\t var len = end - start;\n\n\t if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n\t this.copyWithin(targetStart, start, end);\n\t } else if (this === target && start < targetStart && targetStart < end) {\n\t for (var i = len - 1; i >= 0; --i) {\n\t target[i + targetStart] = this[i + start];\n\t }\n\t } else {\n\t Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);\n\t }\n\n\t return len;\n\t };\n\n\t Buffer.prototype.fill = function fill(val, start, end, encoding) {\n\t if (typeof val === 'string') {\n\t if (typeof start === 'string') {\n\t encoding = start;\n\t start = 0;\n\t end = this.length;\n\t } else if (typeof end === 'string') {\n\t encoding = end;\n\t end = this.length;\n\t }\n\n\t if (encoding !== undefined && typeof encoding !== 'string') {\n\t throw new TypeError('encoding must be a string');\n\t }\n\n\t if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n\t throw new TypeError('Unknown encoding: ' + encoding);\n\t }\n\n\t if (val.length === 1) {\n\t var code = val.charCodeAt(0);\n\n\t if (encoding === 'utf8' && code < 128 || encoding === 'latin1') {\n\t val = code;\n\t }\n\t }\n\t } else if (typeof val === 'number') {\n\t val = val & 255;\n\t }\n\n\t if (start < 0 || this.length < start || this.length < end) {\n\t throw new RangeError('Out of range index');\n\t }\n\n\t if (end <= start) {\n\t return this;\n\t }\n\n\t start = start >>> 0;\n\t end = end === undefined ? this.length : end >>> 0;\n\t if (!val) val = 0;\n\t var i;\n\n\t if (typeof val === 'number') {\n\t for (i = start; i < end; ++i) {\n\t this[i] = val;\n\t }\n\t } else {\n\t var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);\n\t var len = bytes.length;\n\n\t if (len === 0) {\n\t throw new TypeError('The value \"' + val + '\" is invalid for argument \"value\"');\n\t }\n\n\t for (i = 0; i < end - start; ++i) {\n\t this[i + start] = bytes[i % len];\n\t }\n\t }\n\n\t return this;\n\t };\n\n\t var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;\n\n\t function base64clean(str) {\n\t str = str.split('=')[0];\n\t str = str.trim().replace(INVALID_BASE64_RE, '');\n\t if (str.length < 2) return '';\n\n\t while (str.length % 4 !== 0) {\n\t str = str + '=';\n\t }\n\n\t return str;\n\t }\n\n\t function toHex(n) {\n\t if (n < 16) return '0' + n.toString(16);\n\t return n.toString(16);\n\t }\n\n\t function utf8ToBytes(string, units) {\n\t units = units || Infinity;\n\t var codePoint;\n\t var length = string.length;\n\t var leadSurrogate = null;\n\t var bytes = [];\n\n\t for (var i = 0; i < length; ++i) {\n\t codePoint = string.charCodeAt(i);\n\n\t if (codePoint > 0xD7FF && codePoint < 0xE000) {\n\t if (!leadSurrogate) {\n\t if (codePoint > 0xDBFF) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue;\n\t } else if (i + 1 === length) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t continue;\n\t }\n\n\t leadSurrogate = codePoint;\n\t continue;\n\t }\n\n\t if (codePoint < 0xDC00) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t leadSurrogate = codePoint;\n\t continue;\n\t }\n\n\t codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;\n\t } else if (leadSurrogate) {\n\t if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);\n\t }\n\n\t leadSurrogate = null;\n\n\t if (codePoint < 0x80) {\n\t if ((units -= 1) < 0) break;\n\t bytes.push(codePoint);\n\t } else if (codePoint < 0x800) {\n\t if ((units -= 2) < 0) break;\n\t bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);\n\t } else if (codePoint < 0x10000) {\n\t if ((units -= 3) < 0) break;\n\t bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n\t } else if (codePoint < 0x110000) {\n\t if ((units -= 4) < 0) break;\n\t bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);\n\t } else {\n\t throw new Error('Invalid code point');\n\t }\n\t }\n\n\t return bytes;\n\t }\n\n\t function asciiToBytes(str) {\n\t var byteArray = [];\n\n\t for (var i = 0; i < str.length; ++i) {\n\t byteArray.push(str.charCodeAt(i) & 0xFF);\n\t }\n\n\t return byteArray;\n\t }\n\n\t function utf16leToBytes(str, units) {\n\t var c, hi, lo;\n\t var byteArray = [];\n\n\t for (var i = 0; i < str.length; ++i) {\n\t if ((units -= 2) < 0) break;\n\t c = str.charCodeAt(i);\n\t hi = c >> 8;\n\t lo = c % 256;\n\t byteArray.push(lo);\n\t byteArray.push(hi);\n\t }\n\n\t return byteArray;\n\t }\n\n\t function base64ToBytes(str) {\n\t return base64Js.toByteArray(base64clean(str));\n\t }\n\n\t function blitBuffer(src, dst, offset, length) {\n\t for (var i = 0; i < length; ++i) {\n\t if (i + offset >= dst.length || i >= src.length) break;\n\t dst[i + offset] = src[i];\n\t }\n\n\t return i;\n\t }\n\n\t function isInstance(obj, type) {\n\t return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n\t }\n\n\t function numberIsNaN(obj) {\n\t return obj !== obj;\n\t }\n\t}, \"/$$rollup_base$$/node_modules/buffer\");\n\n\tvar object = {};\n\tvar hasOwnProperty$2 = object.hasOwnProperty;\n\n\tvar forOwn = function forOwn(object, callback) {\n\t for (var key in object) {\n\t if (hasOwnProperty$2.call(object, key)) {\n\t callback(key, object[key]);\n\t }\n\t }\n\t};\n\n\tvar extend = function extend(destination, source) {\n\t if (!source) {\n\t return destination;\n\t }\n\n\t forOwn(source, function (key, value) {\n\t destination[key] = value;\n\t });\n\t return destination;\n\t};\n\n\tvar forEach = function forEach(array, callback) {\n\t var length = array.length;\n\t var index = -1;\n\n\t while (++index < length) {\n\t callback(array[index]);\n\t }\n\t};\n\n\tvar toString = object.toString;\n\tvar isArray$1 = Array.isArray;\n\tvar isBuffer = buffer.Buffer.isBuffer;\n\n\tvar isObject = function isObject(value) {\n\t return toString.call(value) == '[object Object]';\n\t};\n\n\tvar isString = function isString(value) {\n\t return typeof value == 'string' || toString.call(value) == '[object String]';\n\t};\n\n\tvar isNumber = function isNumber(value) {\n\t return typeof value == 'number' || toString.call(value) == '[object Number]';\n\t};\n\n\tvar isFunction$2 = function isFunction(value) {\n\t return typeof value == 'function';\n\t};\n\n\tvar isMap = function isMap(value) {\n\t return toString.call(value) == '[object Map]';\n\t};\n\n\tvar isSet = function isSet(value) {\n\t return toString.call(value) == '[object Set]';\n\t};\n\n\tvar singleEscapes = {\n\t '\"': '\\\\\"',\n\t '\\'': '\\\\\\'',\n\t '\\\\': '\\\\\\\\',\n\t '\\b': '\\\\b',\n\t '\\f': '\\\\f',\n\t '\\n': '\\\\n',\n\t '\\r': '\\\\r',\n\t '\\t': '\\\\t'\n\t};\n\tvar regexSingleEscape = /[\"'\\\\\\b\\f\\n\\r\\t]/;\n\tvar regexDigit = /[0-9]/;\n\tvar regexWhitelist = /[ !#-&\\(-\\[\\]-_a-~]/;\n\n\tvar jsesc$1 = function jsesc(argument, options) {\n\t var increaseIndentation = function increaseIndentation() {\n\t oldIndent = indent;\n\t ++options.indentLevel;\n\t indent = options.indent.repeat(options.indentLevel);\n\t };\n\n\t var defaults = {\n\t 'escapeEverything': false,\n\t 'minimal': false,\n\t 'isScriptContext': false,\n\t 'quotes': 'single',\n\t 'wrap': false,\n\t 'es6': false,\n\t 'json': false,\n\t 'compact': true,\n\t 'lowercaseHex': false,\n\t 'numbers': 'decimal',\n\t 'indent': '\\t',\n\t 'indentLevel': 0,\n\t '__inline1__': false,\n\t '__inline2__': false\n\t };\n\t var json = options && options.json;\n\n\t if (json) {\n\t defaults.quotes = 'double';\n\t defaults.wrap = true;\n\t }\n\n\t options = extend(defaults, options);\n\n\t if (options.quotes != 'single' && options.quotes != 'double' && options.quotes != 'backtick') {\n\t options.quotes = 'single';\n\t }\n\n\t var quote = options.quotes == 'double' ? '\"' : options.quotes == 'backtick' ? '`' : '\\'';\n\t var compact = options.compact;\n\t var lowercaseHex = options.lowercaseHex;\n\t var indent = options.indent.repeat(options.indentLevel);\n\t var oldIndent = '';\n\t var inline1 = options.__inline1__;\n\t var inline2 = options.__inline2__;\n\t var newLine = compact ? '' : '\\n';\n\t var result;\n\t var isEmpty = true;\n\t var useBinNumbers = options.numbers == 'binary';\n\t var useOctNumbers = options.numbers == 'octal';\n\t var useDecNumbers = options.numbers == 'decimal';\n\t var useHexNumbers = options.numbers == 'hexadecimal';\n\n\t if (json && argument && isFunction$2(argument.toJSON)) {\n\t argument = argument.toJSON();\n\t }\n\n\t if (!isString(argument)) {\n\t if (isMap(argument)) {\n\t if (argument.size == 0) {\n\t return 'new Map()';\n\t }\n\n\t if (!compact) {\n\t options.__inline1__ = true;\n\t options.__inline2__ = false;\n\t }\n\n\t return 'new Map(' + jsesc(Array.from(argument), options) + ')';\n\t }\n\n\t if (isSet(argument)) {\n\t if (argument.size == 0) {\n\t return 'new Set()';\n\t }\n\n\t return 'new Set(' + jsesc(Array.from(argument), options) + ')';\n\t }\n\n\t if (isBuffer(argument)) {\n\t if (argument.length == 0) {\n\t return 'Buffer.from([])';\n\t }\n\n\t return 'Buffer.from(' + jsesc(Array.from(argument), options) + ')';\n\t }\n\n\t if (isArray$1(argument)) {\n\t result = [];\n\t options.wrap = true;\n\n\t if (inline1) {\n\t options.__inline1__ = false;\n\t options.__inline2__ = true;\n\t }\n\n\t if (!inline2) {\n\t increaseIndentation();\n\t }\n\n\t forEach(argument, function (value) {\n\t isEmpty = false;\n\n\t if (inline2) {\n\t options.__inline2__ = false;\n\t }\n\n\t result.push((compact || inline2 ? '' : indent) + jsesc(value, options));\n\t });\n\n\t if (isEmpty) {\n\t return '[]';\n\t }\n\n\t if (inline2) {\n\t return '[' + result.join(', ') + ']';\n\t }\n\n\t return '[' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + ']';\n\t } else if (isNumber(argument)) {\n\t if (json) {\n\t return JSON.stringify(argument);\n\t }\n\n\t if (useDecNumbers) {\n\t return String(argument);\n\t }\n\n\t if (useHexNumbers) {\n\t var hexadecimal = argument.toString(16);\n\n\t if (!lowercaseHex) {\n\t hexadecimal = hexadecimal.toUpperCase();\n\t }\n\n\t return '0x' + hexadecimal;\n\t }\n\n\t if (useBinNumbers) {\n\t return '0b' + argument.toString(2);\n\t }\n\n\t if (useOctNumbers) {\n\t return '0o' + argument.toString(8);\n\t }\n\t } else if (!isObject(argument)) {\n\t if (json) {\n\t return JSON.stringify(argument) || 'null';\n\t }\n\n\t return String(argument);\n\t } else {\n\t result = [];\n\t options.wrap = true;\n\t increaseIndentation();\n\t forOwn(argument, function (key, value) {\n\t isEmpty = false;\n\t result.push((compact ? '' : indent) + jsesc(key, options) + ':' + (compact ? '' : ' ') + jsesc(value, options));\n\t });\n\n\t if (isEmpty) {\n\t return '{}';\n\t }\n\n\t return '{' + newLine + result.join(',' + newLine) + newLine + (compact ? '' : oldIndent) + '}';\n\t }\n\t }\n\n\t var string = argument;\n\t var index = -1;\n\t var length = string.length;\n\t result = '';\n\n\t while (++index < length) {\n\t var character = string.charAt(index);\n\n\t if (options.es6) {\n\t var first = string.charCodeAt(index);\n\n\t if (first >= 0xD800 && first <= 0xDBFF && length > index + 1) {\n\t var second = string.charCodeAt(index + 1);\n\n\t if (second >= 0xDC00 && second <= 0xDFFF) {\n\t var codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n\n\t var _hexadecimal2 = codePoint.toString(16);\n\n\t if (!lowercaseHex) {\n\t _hexadecimal2 = _hexadecimal2.toUpperCase();\n\t }\n\n\t result += \"\\\\u{\" + _hexadecimal2 + '}';\n\t ++index;\n\t continue;\n\t }\n\t }\n\t }\n\n\t if (!options.escapeEverything) {\n\t if (regexWhitelist.test(character)) {\n\t result += character;\n\t continue;\n\t }\n\n\t if (character == '\"') {\n\t result += quote == character ? '\\\\\"' : character;\n\t continue;\n\t }\n\n\t if (character == '`') {\n\t result += quote == character ? '\\\\`' : character;\n\t continue;\n\t }\n\n\t if (character == '\\'') {\n\t result += quote == character ? '\\\\\\'' : character;\n\t continue;\n\t }\n\t }\n\n\t if (character == '\\0' && !json && !regexDigit.test(string.charAt(index + 1))) {\n\t result += '\\\\0';\n\t continue;\n\t }\n\n\t if (regexSingleEscape.test(character)) {\n\t result += singleEscapes[character];\n\t continue;\n\t }\n\n\t var charCode = character.charCodeAt(0);\n\n\t if (options.minimal && charCode != 0x2028 && charCode != 0x2029) {\n\t result += character;\n\t continue;\n\t }\n\n\t var _hexadecimal = charCode.toString(16);\n\n\t if (!lowercaseHex) {\n\t _hexadecimal = _hexadecimal.toUpperCase();\n\t }\n\n\t var longhand = _hexadecimal.length > 2 || json;\n\n\t var escaped = '\\\\' + (longhand ? 'u' : 'x') + ('0000' + _hexadecimal).slice(longhand ? -4 : -2);\n\n\t result += escaped;\n\t continue;\n\t }\n\n\t if (options.wrap) {\n\t result = quote + result + quote;\n\t }\n\n\t if (quote == '`') {\n\t result = result.replace(/\\$\\{/g, '\\\\\\$\\{');\n\t }\n\n\t if (options.isScriptContext) {\n\t return result.replace(/<\\/(script|style)/gi, '<\\\\/$1').replace(/\n * \n * \n * \n * \n * \n * \n * \n *\n * uiViews: [\n * { fqn: \"$default\", creationContext: { name: \"\" } },\n * { fqn: \"$default.foo\", creationContext: { name: \"A\" } },\n * { fqn: \"$default.foo.$default\", creationContext: { name: \"A.B\" } }\n * { fqn: \"$default.foo.$default.bar\", creationContext: { name: \"A.B.C\" } }\n * ]\n *\n * These four view configs all match the ui-view with the fqn: \"$default.foo.$default.bar\":\n *\n * - ViewConfig1: { uiViewName: \"bar\", uiViewContextAnchor: \"A.B.C\" }\n * - ViewConfig2: { uiViewName: \"$default.bar\", uiViewContextAnchor: \"A.B\" }\n * - ViewConfig3: { uiViewName: \"foo.$default.bar\", uiViewContextAnchor: \"A\" }\n * - ViewConfig4: { uiViewName: \"$default.foo.$default.bar\", uiViewContextAnchor: \"\" }\n *\n * Using ViewConfig3 as an example, it matches the ui-view with fqn \"$default.foo.$default.bar\" because:\n * - The ViewConfig's segmented target name is: [ \"foo\", \"$default\", \"bar\" ]\n * - There exists a parent ui-view (which has fqn: \"$default.foo\") where:\n * - the parent ui-view's name \"foo\" matches the first segment \"foo\" of the ViewConfig's target name\n * - the parent ui-view's context \"A\" matches the ViewConfig's anchor context \"A\"\n * - And the remaining segments [ \"$default\", \"bar\" ].join(\".\"_ of the ViewConfig's target name match\n * the tail of the ui-view's fqn \"default.bar\"\n *\n * @internal\n */\n ViewService.matches = function (uiViewsByFqn, uiView) { return function (viewConfig) {\n // Don't supply an ng1 ui-view with an ng2 ViewConfig, etc\n if (uiView.$type !== viewConfig.viewDecl.$type)\n return false;\n // Split names apart from both viewConfig and uiView into segments\n var vc = viewConfig.viewDecl;\n var vcSegments = vc.$uiViewName.split('.');\n var uivSegments = uiView.fqn.split('.');\n // Check if the tails of the segment arrays match. ex, these arrays' tails match:\n // vc: [\"foo\", \"bar\"], uiv fqn: [\"$default\", \"foo\", \"bar\"]\n if (!equals(vcSegments, uivSegments.slice(0 - vcSegments.length)))\n return false;\n // Now check if the fqn ending at the first segment of the viewConfig matches the context:\n // [\"$default\", \"foo\"].join(\".\") == \"$default.foo\", does the ui-view $default.foo context match?\n var negOffset = 1 - vcSegments.length || undefined;\n var fqnToFirstSegment = uivSegments.slice(0, negOffset).join('.');\n var uiViewContext = uiViewsByFqn[fqnToFirstSegment].creationContext;\n return vc.$uiViewContextAnchor === (uiViewContext && uiViewContext.name);\n }; };\n return ViewService;\n }());\n\n /**\n * Global router state\n *\n * This is where we hold the global mutable state such as current state, current\n * params, current transition, etc.\n */\n var UIRouterGlobals = /** @class */ (function () {\n function UIRouterGlobals() {\n /**\n * Current parameter values\n *\n * The parameter values from the latest successful transition\n */\n this.params = new StateParams();\n /** @internal */\n this.lastStartedTransitionId = -1;\n /** @internal */\n this.transitionHistory = new Queue([], 1);\n /** @internal */\n this.successfulTransitions = new Queue([], 1);\n }\n UIRouterGlobals.prototype.dispose = function () {\n this.transitionHistory.clear();\n this.successfulTransitions.clear();\n this.transition = null;\n };\n return UIRouterGlobals;\n }());\n\n var prioritySort = function (a, b) { return (b.priority || 0) - (a.priority || 0); };\n var typeSort = function (a, b) {\n var weights = { STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1 };\n return (weights[a.type] || 0) - (weights[b.type] || 0);\n };\n var urlMatcherSort = function (a, b) {\n return !a.urlMatcher || !b.urlMatcher ? 0 : UrlMatcher.compare(a.urlMatcher, b.urlMatcher);\n };\n var idSort = function (a, b) {\n // Identically sorted STATE and URLMATCHER best rule will be chosen by `matchPriority` after each rule matches the URL\n var useMatchPriority = { STATE: true, URLMATCHER: true };\n var equal = useMatchPriority[a.type] && useMatchPriority[b.type];\n return equal ? 0 : (a.$id || 0) - (b.$id || 0);\n };\n /**\n * Default rule priority sorting function.\n *\n * Sorts rules by:\n *\n * - Explicit priority (set rule priority using [[UrlRules.when]])\n * - Rule type (STATE: 4, URLMATCHER: 4, REGEXP: 3, RAW: 2, OTHER: 1)\n * - `UrlMatcher` specificity ([[UrlMatcher.compare]]): works for STATE and URLMATCHER types to pick the most specific rule.\n * - Rule registration order (for rule types other than STATE and URLMATCHER)\n * - Equally sorted State and UrlMatcher rules will each match the URL.\n * Then, the *best* match is chosen based on how many parameter values were matched.\n */\n var defaultRuleSortFn;\n defaultRuleSortFn = function (a, b) {\n var cmp = prioritySort(a, b);\n if (cmp !== 0)\n return cmp;\n cmp = typeSort(a, b);\n if (cmp !== 0)\n return cmp;\n cmp = urlMatcherSort(a, b);\n if (cmp !== 0)\n return cmp;\n return idSort(a, b);\n };\n function getHandlerFn(handler) {\n if (!isFunction(handler) && !isString(handler) && !is(TargetState)(handler) && !TargetState.isDef(handler)) {\n throw new Error(\"'handler' must be a string, function, TargetState, or have a state: 'newtarget' property\");\n }\n return isFunction(handler) ? handler : val(handler);\n }\n /**\n * API for managing URL rules\n *\n * This API is used to create and manage URL rules.\n * URL rules are a mechanism to respond to specific URL patterns.\n *\n * The most commonly used methods are [[otherwise]] and [[when]].\n *\n * This API is found at `router.urlService.rules` (see: [[UIRouter.urlService]], [[URLService.rules]])\n */\n var UrlRules = /** @class */ (function () {\n /** @internal */\n function UrlRules(/** @internal */ router) {\n this.router = router;\n /** @internal */ this._sortFn = defaultRuleSortFn;\n /** @internal */ this._rules = [];\n /** @internal */ this._id = 0;\n this.urlRuleFactory = new UrlRuleFactory(router);\n }\n /** @internal */\n UrlRules.prototype.dispose = function (router) {\n this._rules = [];\n delete this._otherwiseFn;\n };\n /**\n * Defines the initial state, path, or behavior to use when the app starts.\n *\n * This rule defines the initial/starting state for the application.\n *\n * This rule is triggered the first time the URL is checked (when the app initially loads).\n * The rule is triggered only when the url matches either `\"\"` or `\"/\"`.\n *\n * Note: The rule is intended to be used when the root of the application is directly linked to.\n * When the URL is *not* `\"\"` or `\"/\"` and doesn't match other rules, the [[otherwise]] rule is triggered.\n * This allows 404-like behavior when an unknown URL is deep-linked.\n *\n * #### Example:\n * Start app at `home` state.\n * ```js\n * .initial({ state: 'home' });\n * ```\n *\n * #### Example:\n * Start app at `/home` (by url)\n * ```js\n * .initial('/home');\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .initial((matchValue, url, router) => {\n * console.log('initial state');\n * return { state: 'home' };\n * })\n * ```\n *\n * @param handler The initial state or url path, or a function which returns the state or url path (or performs custom logic).\n */\n UrlRules.prototype.initial = function (handler) {\n var handlerFn = getHandlerFn(handler);\n var matchFn = function (urlParts, router) {\n return router.globals.transitionHistory.size() === 0 && !!/^\\/?$/.exec(urlParts.path);\n };\n this.rule(this.urlRuleFactory.create(matchFn, handlerFn));\n };\n /**\n * Defines the state, url, or behavior to use when no other rule matches the URL.\n *\n * This rule is matched when *no other rule* matches.\n * It is generally used to handle unknown URLs (similar to \"404\" behavior, but on the client side).\n *\n * - If `handler` a string, it is treated as a url redirect\n *\n * #### Example:\n * When no other url rule matches, redirect to `/index`\n * ```js\n * .otherwise('/index');\n * ```\n *\n * - If `handler` is an object with a `state` property, the state is activated.\n *\n * #### Example:\n * When no other url rule matches, redirect to `home` and provide a `dashboard` parameter value.\n * ```js\n * .otherwise({ state: 'home', params: { dashboard: 'default' } });\n * ```\n *\n * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object.\n * The function can perform actions, and/or return a value.\n *\n * #### Example:\n * When no other url rule matches, manually trigger a transition to the `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * router.stateService.go('home');\n * });\n * ```\n *\n * #### Example:\n * When no other url rule matches, go to `home` state\n * ```js\n * .otherwise((matchValue, urlParts, router) => {\n * return { state: 'home' };\n * });\n * ```\n *\n * @param handler The url path to redirect to, or a function which returns the url path (or performs custom logic).\n */\n UrlRules.prototype.otherwise = function (handler) {\n var handlerFn = getHandlerFn(handler);\n this._otherwiseFn = this.urlRuleFactory.create(val(true), handlerFn);\n this._sorted = false;\n };\n /**\n * Remove a rule previously registered\n *\n * @param rule the matcher rule that was previously registered using [[rule]]\n */\n UrlRules.prototype.removeRule = function (rule) {\n removeFrom(this._rules, rule);\n };\n /**\n * Manually adds a URL Rule.\n *\n * Usually, a url rule is added using [[StateDeclaration.url]] or [[when]].\n * This api can be used directly for more control (to register a [[BaseUrlRule]], for example).\n * Rules can be created using [[urlRuleFactory]], or created manually as simple objects.\n *\n * A rule should have a `match` function which returns truthy if the rule matched.\n * It should also have a `handler` function which is invoked if the rule is the best match.\n *\n * @return a function that deregisters the rule\n */\n UrlRules.prototype.rule = function (rule) {\n var _this = this;\n if (!UrlRuleFactory.isUrlRule(rule))\n throw new Error('invalid rule');\n rule.$id = this._id++;\n rule.priority = rule.priority || 0;\n this._rules.push(rule);\n this._sorted = false;\n return function () { return _this.removeRule(rule); };\n };\n /**\n * Gets all registered rules\n *\n * @returns an array of all the registered rules\n */\n UrlRules.prototype.rules = function () {\n this.ensureSorted();\n return this._rules.concat(this._otherwiseFn ? [this._otherwiseFn] : []);\n };\n /**\n * Defines URL Rule priorities\n *\n * More than one rule ([[UrlRule]]) might match a given URL.\n * This `compareFn` is used to sort the rules by priority.\n * Higher priority rules should sort earlier.\n *\n * The [[defaultRuleSortFn]] is used by default.\n *\n * You only need to call this function once.\n * The `compareFn` will be used to sort the rules as each is registered.\n *\n * If called without any parameter, it will re-sort the rules.\n *\n * ---\n *\n * Url rules may come from multiple sources: states's urls ([[StateDeclaration.url]]), [[when]], and [[rule]].\n * Each rule has a (user-provided) [[UrlRule.priority]], a [[UrlRule.type]], and a [[UrlRule.$id]]\n * The `$id` is is the order in which the rule was registered.\n *\n * The sort function should use these data, or data found on a specific type\n * of [[UrlRule]] (such as [[StateRule.state]]), to order the rules as desired.\n *\n * #### Example:\n * This compare function prioritizes rules by the order in which the rules were registered.\n * A rule registered earlier has higher priority.\n *\n * ```js\n * function compareFn(a, b) {\n * return a.$id - b.$id;\n * }\n * ```\n *\n * @param compareFn a function that compares to [[UrlRule]] objects.\n * The `compareFn` should abide by the `Array.sort` compare function rules.\n * Given two rules, `a` and `b`, return a negative number if `a` should be higher priority.\n * Return a positive number if `b` should be higher priority.\n * Return `0` if the rules are identical.\n *\n * See the [mozilla reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Description)\n * for details.\n */\n UrlRules.prototype.sort = function (compareFn) {\n var sorted = this.stableSort(this._rules, (this._sortFn = compareFn || this._sortFn));\n // precompute _sortGroup values and apply to each rule\n var group = 0;\n for (var i = 0; i < sorted.length; i++) {\n sorted[i]._group = group;\n if (i < sorted.length - 1 && this._sortFn(sorted[i], sorted[i + 1]) !== 0) {\n group++;\n }\n }\n this._rules = sorted;\n this._sorted = true;\n };\n /** @internal */\n UrlRules.prototype.ensureSorted = function () {\n this._sorted || this.sort();\n };\n /** @internal */\n UrlRules.prototype.stableSort = function (arr, compareFn) {\n var arrOfWrapper = arr.map(function (elem, idx) { return ({ elem: elem, idx: idx }); });\n arrOfWrapper.sort(function (wrapperA, wrapperB) {\n var cmpDiff = compareFn(wrapperA.elem, wrapperB.elem);\n return cmpDiff === 0 ? wrapperA.idx - wrapperB.idx : cmpDiff;\n });\n return arrOfWrapper.map(function (wrapper) { return wrapper.elem; });\n };\n /**\n * Registers a `matcher` and `handler` for custom URLs handling.\n *\n * The `matcher` can be:\n *\n * - a [[UrlMatcher]]: See: [[UrlMatcherFactory.compile]]\n * - a `string`: The string is compiled to a [[UrlMatcher]]\n * - a `RegExp`: The regexp is used to match the url.\n *\n * The `handler` can be:\n *\n * - a string: The url is redirected to the value of the string.\n * - a function: The url is redirected to the return value of the function.\n *\n * ---\n *\n * When the `handler` is a `string` and the `matcher` is a `UrlMatcher` (or string), the redirect\n * string is interpolated with parameter values.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(\"/foo/:param1\", \"/bar/:param1\")\n * ```\n *\n * ---\n *\n * When the `handler` is a string and the `matcher` is a `RegExp`, the redirect string is\n * interpolated with capture groups from the RegExp.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), \"/bar/$1\");\n * ```\n *\n * ---\n *\n * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]).\n * The \"matched value\" differs based on the `matcher`.\n * For [[UrlMatcher]]s, it will be the matched state params.\n * For `RegExp`, it will be the match array from `regexp.exec()`.\n *\n * If the handler returns a string, the URL is redirected to the string.\n *\n * #### Example:\n * When the URL is `/foo/123` the rule will redirect to `/bar/123`.\n * ```js\n * .when(new RegExp(\"^/foo/(.*)$\"), match => \"/bar/\" + match[1]);\n * ```\n *\n * Note: the `handler` may also invoke arbitrary code, such as `$state.go()`\n *\n * @param matcher A pattern `string` to match, compiled as a [[UrlMatcher]], or a `RegExp`.\n * @param handler The path to redirect to, or a function that returns the path.\n * @param options `{ priority: number }`\n *\n * @return the registered [[UrlRule]]\n */\n UrlRules.prototype.when = function (matcher, handler, options) {\n var rule = this.urlRuleFactory.create(matcher, handler);\n if (isDefined(options && options.priority))\n rule.priority = options.priority;\n this.rule(rule);\n return rule;\n };\n return UrlRules;\n }());\n\n /**\n * An API to customize the URL behavior and retrieve URL configuration\n *\n * This API is used to customize the behavior of the URL.\n * This includes optional trailing slashes ([[strictMode]]), case sensitivity ([[caseInsensitive]]),\n * and custom parameter encoding (custom [[type]]).\n *\n * It also has information about the location (url) configuration such as [[port]] and [[baseHref]].\n * This information can be used to build absolute URLs, such as\n * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`;\n *\n * This API is found at `router.urlService.config` (see: [[UIRouter.urlService]], [[URLService.config]])\n */\n var UrlConfig = /** @class */ (function () {\n /** @internal */ function UrlConfig(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** @internal */ this.paramTypes = new ParamTypes();\n /** @internal */ this._decodeParams = true;\n /** @internal */ this._isCaseInsensitive = false;\n /** @internal */ this._isStrictMode = true;\n /** @internal */ this._defaultSquashPolicy = false;\n /** @internal */ this.dispose = function () { return _this.paramTypes.dispose(); };\n // Delegate these calls to the current LocationConfig implementation\n /**\n * Gets the base Href, e.g., `http://localhost/approot/`\n *\n * @return the application's base href\n */\n this.baseHref = function () { return _this.router.locationConfig.baseHref(); };\n /**\n * Gets or sets the hashPrefix\n *\n * This only applies when not running in [[html5Mode]] (pushstate mode)\n *\n * If the current url is `http://localhost/app#!/uirouter/path/#anchor`, it returns `!` which is the prefix for the \"hashbang\" portion.\n *\n * @return the hash prefix\n */\n this.hashPrefix = function (newprefix) { return _this.router.locationConfig.hashPrefix(newprefix); };\n /**\n * Gets the host, e.g., `localhost`\n *\n * @return the protocol\n */\n this.host = function () { return _this.router.locationConfig.host(); };\n /**\n * Returns true when running in pushstate mode\n *\n * @return true when running in html5 mode (pushstate mode).\n */\n this.html5Mode = function () { return _this.router.locationConfig.html5Mode(); };\n /**\n * Gets the port, e.g., `80`\n *\n * @return the port number\n */\n this.port = function () { return _this.router.locationConfig.port(); };\n /**\n * Gets the protocol, e.g., `http`\n *\n * @return the protocol\n */\n this.protocol = function () { return _this.router.locationConfig.protocol(); };\n }\n /**\n * Defines whether URL matching should be case sensitive (the default behavior), or not.\n *\n * #### Example:\n * ```js\n * // Allow case insensitive url matches\n * urlService.config.caseInsensitive(true);\n * ```\n *\n * @param value `false` to match URL in a case sensitive manner; otherwise `true`;\n * @returns the current value of caseInsensitive\n */\n UrlConfig.prototype.caseInsensitive = function (value) {\n return (this._isCaseInsensitive = isDefined(value) ? value : this._isCaseInsensitive);\n };\n /**\n * Sets the default behavior when generating or matching URLs with default parameter values.\n *\n * #### Example:\n * ```js\n * // Remove default parameter values from the url\n * urlService.config.defaultSquashPolicy(true);\n * ```\n *\n * @param value A string that defines the default parameter URL squashing behavior.\n * - `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n * - `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n * parameter is surrounded by slashes, squash (remove) one slash from the URL\n * - any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n * the parameter value from the URL and replace it with this string.\n * @returns the current value of defaultSquashPolicy\n */\n UrlConfig.prototype.defaultSquashPolicy = function (value) {\n if (isDefined(value) && value !== true && value !== false && !isString(value))\n throw new Error(\"Invalid squash policy: \" + value + \". Valid policies: false, true, arbitrary-string\");\n return (this._defaultSquashPolicy = isDefined(value) ? value : this._defaultSquashPolicy);\n };\n /**\n * Defines whether URLs should match trailing slashes, or not (the default behavior).\n *\n * #### Example:\n * ```js\n * // Allow optional trailing slashes\n * urlService.config.strictMode(false);\n * ```\n *\n * @param value `false` to match trailing slashes in URLs, otherwise `true`.\n * @returns the current value of strictMode\n */\n UrlConfig.prototype.strictMode = function (value) {\n return (this._isStrictMode = isDefined(value) ? value : this._isStrictMode);\n };\n /**\n * Creates and registers a custom [[ParamType]] object\n *\n * A custom parameter type can be used to generate URLs with typed parameters or custom encoding/decoding.\n *\n * #### Note: Register custom types *before using them* in a state definition.\n *\n * #### Example:\n * ```js\n * // Encode object parameter as JSON string\n * urlService.config.type('myjson', {\n * encode: (obj) => JSON.stringify(obj),\n * decode: (str) => JSON.parse(str),\n * is: (val) => typeof(val) === 'object',\n * pattern: /[^/]+/,\n * equals: (a, b) => _.isEqual(a, b),\n * });\n * ```\n *\n * See [[ParamTypeDefinition]] for more examples\n *\n * @param name The type name.\n * @param definition The type definition. See [[ParamTypeDefinition]] for information on the values accepted.\n * @param definitionFn A function that is injected before the app runtime starts.\n * The result of this function should be a [[ParamTypeDefinition]].\n * The result is merged into the existing `definition`.\n * See [[ParamType]] for information on the values accepted.\n *\n * @returns if only the `name` parameter was specified: the currently registered [[ParamType]] object, or undefined\n */\n UrlConfig.prototype.type = function (name, definition, definitionFn) {\n var type = this.paramTypes.type(name, definition, definitionFn);\n return !isDefined(definition) ? type : this;\n };\n return UrlConfig;\n }());\n\n /**\n * API for URL management\n */\n var UrlService = /** @class */ (function () {\n /** @internal */\n function UrlService(/** @internal */ router) {\n var _this = this;\n this.router = router;\n /** @internal */ this.interceptDeferred = false;\n /**\n * The nested [[UrlRules]] API for managing URL rules and rewrites\n *\n * See: [[UrlRules]] for details\n */\n this.rules = new UrlRules(this.router);\n /**\n * The nested [[UrlConfig]] API to configure the URL and retrieve URL information\n *\n * See: [[UrlConfig]] for details\n */\n this.config = new UrlConfig(this.router);\n // Delegate these calls to the current LocationServices implementation\n /**\n * Gets the current url, or updates the url\n *\n * ### Getting the current URL\n *\n * When no arguments are passed, returns the current URL.\n * The URL is normalized using the internal [[path]]/[[search]]/[[hash]] values.\n *\n * For example, the URL may be stored in the hash ([[HashLocationServices]]) or\n * have a base HREF prepended ([[PushStateLocationServices]]).\n *\n * The raw URL in the browser might be:\n *\n * ```\n * http://mysite.com/somepath/index.html#/internal/path/123?param1=foo#anchor\n * ```\n *\n * or\n *\n * ```\n * http://mysite.com/basepath/internal/path/123?param1=foo#anchor\n * ```\n *\n * then this method returns:\n *\n * ```\n * /internal/path/123?param1=foo#anchor\n * ```\n *\n *\n * #### Example:\n * ```js\n * locationServices.url(); // \"/some/path?query=value#anchor\"\n * ```\n *\n * ### Updating the URL\n *\n * When `newurl` arguments is provided, changes the URL to reflect `newurl`\n *\n * #### Example:\n * ```js\n * locationServices.url(\"/some/path?query=value#anchor\", true);\n * ```\n *\n * @param newurl The new value for the URL.\n * This url should reflect only the new internal [[path]], [[search]], and [[hash]] values.\n * It should not include the protocol, site, port, or base path of an absolute HREF.\n * @param replace When true, replaces the current history entry (instead of appending it) with this new url\n * @param state The history's state object, i.e., pushState (if the LocationServices implementation supports it)\n *\n * @return the url (after potentially being processed)\n */\n this.url = function (newurl, replace, state) {\n return _this.router.locationService.url(newurl, replace, state);\n };\n /**\n * Gets the path part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `/some/path`\n *\n * @return the path portion of the url\n */\n this.path = function () { return _this.router.locationService.path(); };\n /**\n * Gets the search part of the current url as an object\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `{ query: 'value' }`\n *\n * @return the search (query) portion of the url, as an object\n */\n this.search = function () { return _this.router.locationService.search(); };\n /**\n * Gets the hash part of the current url\n *\n * If the current URL is `/some/path?query=value#anchor`, this returns `anchor`\n *\n * @return the hash (anchor) portion of the url\n */\n this.hash = function () { return _this.router.locationService.hash(); };\n /**\n * @internal\n *\n * Registers a low level url change handler\n *\n * Note: Because this is a low level handler, it's not recommended for general use.\n *\n * #### Example:\n * ```js\n * let deregisterFn = locationServices.onChange((evt) => console.log(\"url change\", evt));\n * ```\n *\n * @param callback a function that will be called when the url is changing\n * @return a function that de-registers the callback\n */\n this.onChange = function (callback) { return _this.router.locationService.onChange(callback); };\n }\n /** @internal */\n UrlService.prototype.dispose = function () {\n this.listen(false);\n this.rules.dispose();\n };\n /**\n * Gets the current URL parts\n *\n * This method returns the different parts of the current URL (the [[path]], [[search]], and [[hash]]) as a [[UrlParts]] object.\n */\n UrlService.prototype.parts = function () {\n return { path: this.path(), search: this.search(), hash: this.hash() };\n };\n /**\n * Activates the best rule for the current URL\n *\n * Checks the current URL for a matching [[UrlRule]], then invokes that rule's handler.\n * This method is called internally any time the URL has changed.\n *\n * This effectively activates the state (or redirect, etc) which matches the current URL.\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * // Find the matching URL and invoke the handler.\n * urlService.sync();\n * });\n * ```\n */\n UrlService.prototype.sync = function (evt) {\n if (evt && evt.defaultPrevented)\n return;\n var _a = this.router, urlService = _a.urlService, stateService = _a.stateService;\n var url = { path: urlService.path(), search: urlService.search(), hash: urlService.hash() };\n var best = this.match(url);\n var applyResult = pattern([\n [isString, function (newurl) { return urlService.url(newurl, true); }],\n [TargetState.isDef, function (def) { return stateService.go(def.state, def.params, def.options); }],\n [is(TargetState), function (target) { return stateService.go(target.state(), target.params(), target.options()); }],\n ]);\n applyResult(best && best.rule.handler(best.match, url, this.router));\n };\n /**\n * Starts or stops listening for URL changes\n *\n * Call this sometime after calling [[deferIntercept]] to start monitoring the url.\n * This causes UI-Router to start listening for changes to the URL, if it wasn't already listening.\n *\n * If called with `false`, UI-Router will stop listening (call listen(true) to start listening again).\n *\n * #### Example:\n * ```js\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * // Start responding to URL changes\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param enabled `true` or `false` to start or stop listening to URL changes\n */\n UrlService.prototype.listen = function (enabled) {\n var _this = this;\n if (enabled === false) {\n this._stopListeningFn && this._stopListeningFn();\n delete this._stopListeningFn;\n }\n else {\n return (this._stopListeningFn =\n this._stopListeningFn || this.router.urlService.onChange(function (evt) { return _this.sync(evt); }));\n }\n };\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * // Prevent UI-Router from automatically intercepting URL changes when it starts;\n * urlService.deferIntercept();\n *\n * fetch('/states.json').then(resp => resp.json()).then(data => {\n * data.forEach(state => $stateRegistry.register(state));\n * urlService.listen();\n * urlService.sync();\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n UrlService.prototype.deferIntercept = function (defer) {\n if (defer === undefined)\n defer = true;\n this.interceptDeferred = defer;\n };\n /**\n * Matches a URL\n *\n * Given a URL (as a [[UrlParts]] object), check all rules and determine the best matching rule.\n * Return the result as a [[MatchResult]].\n */\n UrlService.prototype.match = function (url) {\n var _this = this;\n url = extend({ path: '', search: {}, hash: '' }, url);\n var rules = this.rules.rules();\n // Checks a single rule. Returns { rule: rule, match: match, weight: weight } if it matched, or undefined\n var checkRule = function (rule) {\n var match = rule.match(url, _this.router);\n return match && { match: match, rule: rule, weight: rule.matchPriority(match) };\n };\n // The rules are pre-sorted.\n // - Find the first matching rule.\n // - Find any other matching rule that sorted *exactly the same*, according to `.sort()`.\n // - Choose the rule with the highest match weight.\n var best;\n for (var i = 0; i < rules.length; i++) {\n // Stop when there is a 'best' rule and the next rule sorts differently than it.\n if (best && best.rule._group !== rules[i]._group)\n break;\n var current = checkRule(rules[i]);\n // Pick the best MatchResult\n best = !best || (current && current.weight > best.weight) ? current : best;\n }\n return best;\n };\n return UrlService;\n }());\n\n /** @internal */\n var _routerInstance = 0;\n /** @internal */\n var locSvcFns = ['url', 'path', 'search', 'hash', 'onChange'];\n /** @internal */\n var locCfgFns = ['port', 'protocol', 'host', 'baseHref', 'html5Mode', 'hashPrefix'];\n /** @internal */\n var locationServiceStub = makeStub('LocationServices', locSvcFns);\n /** @internal */\n var locationConfigStub = makeStub('LocationConfig', locCfgFns);\n /**\n * An instance of UI-Router.\n *\n * This object contains references to service APIs which define your application's routing behavior.\n */\n var UIRouter = /** @class */ (function () {\n /**\n * Creates a new `UIRouter` object\n *\n * @param locationService a [[LocationServices]] implementation\n * @param locationConfig a [[LocationConfig]] implementation\n * @internal\n */\n function UIRouter(locationService, locationConfig) {\n if (locationService === void 0) { locationService = locationServiceStub; }\n if (locationConfig === void 0) { locationConfig = locationConfigStub; }\n this.locationService = locationService;\n this.locationConfig = locationConfig;\n /** @internal */ this.$id = _routerInstance++;\n /** @internal */ this._disposed = false;\n /** @internal */ this._disposables = [];\n /** Enable/disable tracing to the javascript console */\n this.trace = trace;\n /** Provides services related to ui-view synchronization */\n this.viewService = new ViewService(this);\n /** An object that contains global router state, such as the current state and params */\n this.globals = new UIRouterGlobals();\n /** A service that exposes global Transition Hooks */\n this.transitionService = new TransitionService(this);\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n this.urlMatcherFactory = new UrlMatcherFactory(this);\n /**\n * Deprecated for public use. Use [[urlService]] instead.\n * @deprecated Use [[urlService]] instead\n */\n this.urlRouter = new UrlRouter(this);\n /** Provides services related to the URL */\n this.urlService = new UrlService(this);\n /** Provides a registry for states, and related registration services */\n this.stateRegistry = new StateRegistry(this);\n /** Provides services related to states */\n this.stateService = new StateService(this);\n /** @internal plugin instances are registered here */\n this._plugins = {};\n this.viewService._pluginapi._rootViewContext(this.stateRegistry.root());\n this.globals.$current = this.stateRegistry.root();\n this.globals.current = this.globals.$current.self;\n this.disposable(this.globals);\n this.disposable(this.stateService);\n this.disposable(this.stateRegistry);\n this.disposable(this.transitionService);\n this.disposable(this.urlService);\n this.disposable(locationService);\n this.disposable(locationConfig);\n }\n /** Registers an object to be notified when the router is disposed */\n UIRouter.prototype.disposable = function (disposable) {\n this._disposables.push(disposable);\n };\n /**\n * Disposes this router instance\n *\n * When called, clears resources retained by the router by calling `dispose(this)` on all\n * registered [[disposable]] objects.\n *\n * Or, if a `disposable` object is provided, calls `dispose(this)` on that object only.\n *\n * @internal\n * @param disposable (optional) the disposable to dispose\n */\n UIRouter.prototype.dispose = function (disposable) {\n var _this = this;\n if (disposable && isFunction(disposable.dispose)) {\n disposable.dispose(this);\n return undefined;\n }\n this._disposed = true;\n this._disposables.slice().forEach(function (d) {\n try {\n typeof d.dispose === 'function' && d.dispose(_this);\n removeFrom(_this._disposables, d);\n }\n catch (ignored) { }\n });\n };\n /**\n * Adds a plugin to UI-Router\n *\n * This method adds a UI-Router Plugin.\n * A plugin can enhance or change UI-Router behavior using any public API.\n *\n * #### Example:\n * ```js\n * import { MyCoolPlugin } from \"ui-router-cool-plugin\";\n *\n * var plugin = router.addPlugin(MyCoolPlugin);\n * ```\n *\n * ### Plugin authoring\n *\n * A plugin is simply a class (or constructor function) which accepts a [[UIRouter]] instance and (optionally) an options object.\n *\n * The plugin can implement its functionality using any of the public APIs of [[UIRouter]].\n * For example, it may configure router options or add a Transition Hook.\n *\n * The plugin can then be published as a separate module.\n *\n * #### Example:\n * ```js\n * export class MyAuthPlugin implements UIRouterPlugin {\n * constructor(router: UIRouter, options: any) {\n * this.name = \"MyAuthPlugin\";\n * let $transitions = router.transitionService;\n * let $state = router.stateService;\n *\n * let authCriteria = {\n * to: (state) => state.data && state.data.requiresAuth\n * };\n *\n * function authHook(transition: Transition) {\n * let authService = transition.injector().get('AuthService');\n * if (!authService.isAuthenticated()) {\n * return $state.target('login');\n * }\n * }\n *\n * $transitions.onStart(authCriteria, authHook);\n * }\n * }\n * ```\n *\n * @param plugin one of:\n * - a plugin class which implements [[UIRouterPlugin]]\n * - a constructor function for a [[UIRouterPlugin]] which accepts a [[UIRouter]] instance\n * - a factory function which accepts a [[UIRouter]] instance and returns a [[UIRouterPlugin]] instance\n * @param options options to pass to the plugin class/factory\n * @returns the registered plugin instance\n */\n UIRouter.prototype.plugin = function (plugin, options) {\n if (options === void 0) { options = {}; }\n var pluginInstance = new plugin(this, options);\n if (!pluginInstance.name)\n throw new Error('Required property `name` missing on plugin: ' + pluginInstance);\n this._disposables.push(pluginInstance);\n return (this._plugins[pluginInstance.name] = pluginInstance);\n };\n UIRouter.prototype.getPlugin = function (pluginName) {\n return pluginName ? this._plugins[pluginName] : values(this._plugins);\n };\n return UIRouter;\n }());\n\n function addCoreResolvables(trans) {\n trans.addResolvable(Resolvable.fromData(UIRouter, trans.router), '');\n trans.addResolvable(Resolvable.fromData(Transition, trans), '');\n trans.addResolvable(Resolvable.fromData('$transition$', trans), '');\n trans.addResolvable(Resolvable.fromData('$stateParams', trans.params()), '');\n trans.entering().forEach(function (state) {\n trans.addResolvable(Resolvable.fromData('$state$', state), state);\n });\n }\n var registerAddCoreResolvables = function (transitionService) {\n return transitionService.onCreate({}, addCoreResolvables);\n };\n var TRANSITION_TOKENS = ['$transition$', Transition];\n var isTransition = inArray(TRANSITION_TOKENS);\n // References to Transition in the treeChanges pathnodes makes all\n // previous Transitions reachable in memory, causing a memory leak\n // This function removes resolves for '$transition$' and `Transition` from the treeChanges.\n // Do not use this on current transitions, only on old ones.\n var treeChangesCleanup = function (trans) {\n var nodes = values(trans.treeChanges()).reduce(unnestR, []).reduce(uniqR, []);\n // If the resolvable is a Transition, return a new resolvable with null data\n var replaceTransitionWithNull = function (r) {\n return isTransition(r.token) ? Resolvable.fromData(r.token, null) : r;\n };\n nodes.forEach(function (node) {\n node.resolvables = node.resolvables.map(replaceTransitionWithNull);\n });\n };\n\n /**\n * A [[TransitionHookFn]] that redirects to a different state or params\n *\n * Registered using `transitionService.onStart({ to: (state) => !!state.redirectTo }, redirectHook);`\n *\n * See [[StateDeclaration.redirectTo]]\n */\n var redirectToHook = function (trans) {\n var redirect = trans.to().redirectTo;\n if (!redirect)\n return;\n var $state = trans.router.stateService;\n function handleResult(result) {\n if (!result)\n return;\n if (result instanceof TargetState)\n return result;\n if (isString(result))\n return $state.target(result, trans.params(), trans.options());\n if (result['state'] || result['params'])\n return $state.target(result['state'] || trans.to(), result['params'] || trans.params(), trans.options());\n }\n if (isFunction(redirect)) {\n return services.$q.when(redirect(trans)).then(handleResult);\n }\n return handleResult(redirect);\n };\n var registerRedirectToHook = function (transitionService) {\n return transitionService.onStart({ to: function (state) { return !!state.redirectTo; } }, redirectToHook);\n };\n\n /**\n * A factory which creates an onEnter, onExit or onRetain transition hook function\n *\n * The returned function invokes the (for instance) state.onEnter hook when the\n * state is being entered.\n */\n function makeEnterExitRetainHook(hookName) {\n return function (transition, state) {\n var _state = state.$$state();\n var hookFn = _state[hookName];\n return hookFn(transition, state);\n };\n }\n /**\n * The [[TransitionStateHookFn]] for onExit\n *\n * When the state is being exited, the state's .onExit function is invoked.\n *\n * Registered using `transitionService.onExit({ exiting: (state) => !!state.onExit }, onExitHook);`\n *\n * See: [[IHookRegistry.onExit]]\n */\n var onExitHook = makeEnterExitRetainHook('onExit');\n var registerOnExitHook = function (transitionService) {\n return transitionService.onExit({ exiting: function (state) { return !!state.onExit; } }, onExitHook);\n };\n /**\n * The [[TransitionStateHookFn]] for onRetain\n *\n * When the state was already entered, and is not being exited or re-entered, the state's .onRetain function is invoked.\n *\n * Registered using `transitionService.onRetain({ retained: (state) => !!state.onRetain }, onRetainHook);`\n *\n * See: [[IHookRegistry.onRetain]]\n */\n var onRetainHook = makeEnterExitRetainHook('onRetain');\n var registerOnRetainHook = function (transitionService) {\n return transitionService.onRetain({ retained: function (state) { return !!state.onRetain; } }, onRetainHook);\n };\n /**\n * The [[TransitionStateHookFn]] for onEnter\n *\n * When the state is being entered, the state's .onEnter function is invoked.\n *\n * Registered using `transitionService.onEnter({ entering: (state) => !!state.onEnter }, onEnterHook);`\n *\n * See: [[IHookRegistry.onEnter]]\n */\n var onEnterHook = makeEnterExitRetainHook('onEnter');\n var registerOnEnterHook = function (transitionService) {\n return transitionService.onEnter({ entering: function (state) { return !!state.onEnter; } }, onEnterHook);\n };\n\n var RESOLVE_HOOK_PRIORITY = 1000;\n /**\n * A [[TransitionHookFn]] which resolves all EAGER Resolvables in the To Path\n *\n * Registered using `transitionService.onStart({}, eagerResolvePath, { priority: 1000 });`\n *\n * When a Transition starts, this hook resolves all the EAGER Resolvables, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\n var eagerResolvePath = function (trans) {\n return new ResolveContext(trans.treeChanges().to).resolvePath('EAGER', trans).then(noop);\n };\n var registerEagerResolvePath = function (transitionService) {\n return transitionService.onStart({}, eagerResolvePath, { priority: RESOLVE_HOOK_PRIORITY });\n };\n /**\n * A [[TransitionHookFn]] which resolves all LAZY Resolvables for the state (and all its ancestors) in the To Path\n *\n * Registered using `transitionService.onEnter({ entering: () => true }, lazyResolveState, { priority: 1000 });`\n *\n * When a State is being entered, this hook resolves all the Resolvables for this state, which the transition then waits for.\n *\n * See [[StateDeclaration.resolve]]\n */\n var lazyResolveState = function (trans, state) {\n return new ResolveContext(trans.treeChanges().to).subContext(state.$$state()).resolvePath('LAZY', trans).then(noop);\n };\n var registerLazyResolveState = function (transitionService) {\n return transitionService.onEnter({ entering: val(true) }, lazyResolveState, { priority: RESOLVE_HOOK_PRIORITY });\n };\n /**\n * A [[TransitionHookFn]] which resolves any dynamically added (LAZY or EAGER) Resolvables.\n *\n * Registered using `transitionService.onFinish({}, eagerResolvePath, { priority: 1000 });`\n *\n * After all entering states have been entered, this hook resolves any remaining Resolvables.\n * These are typically dynamic resolves which were added by some Transition Hook using [[Transition.addResolvable]].\n *\n * See [[StateDeclaration.resolve]]\n */\n var resolveRemaining = function (trans) {\n return new ResolveContext(trans.treeChanges().to).resolvePath('LAZY', trans).then(noop);\n };\n var registerResolveRemaining = function (transitionService) {\n return transitionService.onFinish({}, resolveRemaining, { priority: RESOLVE_HOOK_PRIORITY });\n };\n\n /**\n * A [[TransitionHookFn]] which waits for the views to load\n *\n * Registered using `transitionService.onStart({}, loadEnteringViews);`\n *\n * Allows the views to do async work in [[ViewConfig.load]] before the transition continues.\n * In angular 1, this includes loading the templates.\n */\n var loadEnteringViews = function (transition) {\n var $q = services.$q;\n var enteringViews = transition.views('entering');\n if (!enteringViews.length)\n return;\n return $q.all(enteringViews.map(function (view) { return $q.when(view.load()); })).then(noop);\n };\n var registerLoadEnteringViews = function (transitionService) {\n return transitionService.onFinish({}, loadEnteringViews);\n };\n /**\n * A [[TransitionHookFn]] which activates the new views when a transition is successful.\n *\n * Registered using `transitionService.onSuccess({}, activateViews);`\n *\n * After a transition is complete, this hook deactivates the old views from the previous state,\n * and activates the new views from the destination state.\n *\n * See [[ViewService]]\n */\n var activateViews = function (transition) {\n var enteringViews = transition.views('entering');\n var exitingViews = transition.views('exiting');\n if (!enteringViews.length && !exitingViews.length)\n return;\n var $view = transition.router.viewService;\n exitingViews.forEach(function (vc) { return $view.deactivateViewConfig(vc); });\n enteringViews.forEach(function (vc) { return $view.activateViewConfig(vc); });\n $view.sync();\n };\n var registerActivateViews = function (transitionService) {\n return transitionService.onSuccess({}, activateViews);\n };\n\n /**\n * A [[TransitionHookFn]] which updates global UI-Router state\n *\n * Registered using `transitionService.onBefore({}, updateGlobalState);`\n *\n * Before a [[Transition]] starts, updates the global value of \"the current transition\" ([[Globals.transition]]).\n * After a successful [[Transition]], updates the global values of \"the current state\"\n * ([[Globals.current]] and [[Globals.$current]]) and \"the current param values\" ([[Globals.params]]).\n *\n * See also the deprecated properties:\n * [[StateService.transition]], [[StateService.current]], [[StateService.params]]\n */\n var updateGlobalState = function (trans) {\n var globals = trans.router.globals;\n var transitionSuccessful = function () {\n globals.successfulTransitions.enqueue(trans);\n globals.$current = trans.$to();\n globals.current = globals.$current.self;\n copy(trans.params(), globals.params);\n };\n var clearCurrentTransition = function () {\n // Do not clear globals.transition if a different transition has started in the meantime\n if (globals.transition === trans)\n globals.transition = null;\n };\n trans.onSuccess({}, transitionSuccessful, { priority: 10000 });\n trans.promise.then(clearCurrentTransition, clearCurrentTransition);\n };\n var registerUpdateGlobalState = function (transitionService) {\n return transitionService.onCreate({}, updateGlobalState);\n };\n\n /**\n * A [[TransitionHookFn]] which updates the URL after a successful transition\n *\n * Registered using `transitionService.onSuccess({}, updateUrl);`\n */\n var updateUrl = function (transition) {\n var options = transition.options();\n var $state = transition.router.stateService;\n var $urlRouter = transition.router.urlRouter;\n // Dont update the url in these situations:\n // The transition was triggered by a URL sync (options.source === 'url')\n // The user doesn't want the url to update (options.location === false)\n // The destination state, and all parents have no navigable url\n if (options.source !== 'url' && options.location && $state.$current.navigable) {\n var urlOptions = { replace: options.location === 'replace' };\n $urlRouter.push($state.$current.navigable.url, $state.params, urlOptions);\n }\n $urlRouter.update(true);\n };\n var registerUpdateUrl = function (transitionService) {\n return transitionService.onSuccess({}, updateUrl, { priority: 9999 });\n };\n\n /**\n * A [[TransitionHookFn]] that performs lazy loading\n *\n * When entering a state \"abc\" which has a `lazyLoad` function defined:\n * - Invoke the `lazyLoad` function (unless it is already in process)\n * - Flag the hook function as \"in process\"\n * - The function should return a promise (that resolves when lazy loading is complete)\n * - Wait for the promise to settle\n * - If the promise resolves to a [[LazyLoadResult]], then register those states\n * - Flag the hook function as \"not in process\"\n * - If the hook was successful\n * - Remove the `lazyLoad` function from the state declaration\n * - If all the hooks were successful\n * - Retry the transition (by returning a TargetState)\n *\n * ```\n * .state('abc', {\n * component: 'fooComponent',\n * lazyLoad: () => import('./fooComponent')\n * });\n * ```\n *\n * See [[StateDeclaration.lazyLoad]]\n */\n var lazyLoadHook = function (transition) {\n var router = transition.router;\n function retryTransition() {\n if (transition.originalTransition().options().source !== 'url') {\n // The original transition was not triggered via url sync\n // The lazy state should be loaded now, so re-try the original transition\n var orig = transition.targetState();\n return router.stateService.target(orig.identifier(), orig.params(), orig.options());\n }\n // The original transition was triggered via url sync\n // Run the URL rules and find the best match\n var $url = router.urlService;\n var result = $url.match($url.parts());\n var rule = result && result.rule;\n // If the best match is a state, redirect the transition (instead\n // of calling sync() which supersedes the current transition)\n if (rule && rule.type === 'STATE') {\n var state = rule.state;\n var params = result.match;\n return router.stateService.target(state, params, transition.options());\n }\n // No matching state found, so let .sync() choose the best non-state match/otherwise\n router.urlService.sync();\n }\n var promises = transition\n .entering()\n .filter(function (state) { return !!state.$$state().lazyLoad; })\n .map(function (state) { return lazyLoadState(transition, state); });\n return services.$q.all(promises).then(retryTransition);\n };\n var registerLazyLoadHook = function (transitionService) {\n return transitionService.onBefore({ entering: function (state) { return !!state.lazyLoad; } }, lazyLoadHook);\n };\n /**\n * Invokes a state's lazy load function\n *\n * @param transition a Transition context\n * @param state the state to lazy load\n * @returns A promise for the lazy load result\n */\n function lazyLoadState(transition, state) {\n var lazyLoadFn = state.$$state().lazyLoad;\n // Store/get the lazy load promise on/from the hookfn so it doesn't get re-invoked\n var promise = lazyLoadFn['_promise'];\n if (!promise) {\n var success = function (result) {\n delete state.lazyLoad;\n delete state.$$state().lazyLoad;\n delete lazyLoadFn['_promise'];\n return result;\n };\n var error = function (err) {\n delete lazyLoadFn['_promise'];\n return services.$q.reject(err);\n };\n promise = lazyLoadFn['_promise'] = services.$q\n .when(lazyLoadFn(transition, state))\n .then(updateStateRegistry)\n .then(success, error);\n }\n /** Register any lazy loaded state definitions */\n function updateStateRegistry(result) {\n if (result && Array.isArray(result.states)) {\n result.states.forEach(function (_state) { return transition.router.stateRegistry.register(_state); });\n }\n return result;\n }\n return promise;\n }\n\n /**\n * This class defines a type of hook, such as `onBefore` or `onEnter`.\n * Plugins can define custom hook types, such as sticky states does for `onInactive`.\n */\n var TransitionEventType = /** @class */ (function () {\n /* tslint:disable:no-inferrable-types */\n function TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) {\n if (reverseSort === void 0) { reverseSort = false; }\n if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; }\n if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; }\n if (synchronous === void 0) { synchronous = false; }\n this.name = name;\n this.hookPhase = hookPhase;\n this.hookOrder = hookOrder;\n this.criteriaMatchPath = criteriaMatchPath;\n this.reverseSort = reverseSort;\n this.getResultHandler = getResultHandler;\n this.getErrorHandler = getErrorHandler;\n this.synchronous = synchronous;\n }\n return TransitionEventType;\n }());\n\n /**\n * A [[TransitionHookFn]] that skips a transition if it should be ignored\n *\n * This hook is invoked at the end of the onBefore phase.\n *\n * If the transition should be ignored (because no parameter or states changed)\n * then the transition is ignored and not processed.\n */\n function ignoredHook(trans) {\n var ignoredReason = trans._ignoredReason();\n if (!ignoredReason)\n return;\n trace.traceTransitionIgnored(trans);\n var pending = trans.router.globals.transition;\n // The user clicked a link going back to the *current state* ('A')\n // However, there is also a pending transition in flight (to 'B')\n // Abort the transition to 'B' because the user now wants to be back at 'A'.\n if (ignoredReason === 'SameAsCurrent' && pending) {\n pending.abort();\n }\n return Rejection.ignored().toPromise();\n }\n var registerIgnoredTransitionHook = function (transitionService) {\n return transitionService.onBefore({}, ignoredHook, { priority: -9999 });\n };\n\n /**\n * A [[TransitionHookFn]] that rejects the Transition if it is invalid\n *\n * This hook is invoked at the end of the onBefore phase.\n * If the transition is invalid (for example, param values do not validate)\n * then the transition is rejected.\n */\n function invalidTransitionHook(trans) {\n if (!trans.valid()) {\n throw new Error(trans.error().toString());\n }\n }\n var registerInvalidTransitionHook = function (transitionService) {\n return transitionService.onBefore({}, invalidTransitionHook, { priority: -10000 });\n };\n\n /**\n * The default [[Transition]] options.\n *\n * Include this object when applying custom defaults:\n * let reloadOpts = { reload: true, notify: true }\n * let options = defaults(theirOpts, customDefaults, defaultOptions);\n */\n var defaultTransOpts = {\n location: true,\n relative: null,\n inherit: false,\n notify: true,\n reload: false,\n supercede: true,\n custom: {},\n current: function () { return null; },\n source: 'unknown',\n };\n /**\n * This class provides services related to Transitions.\n *\n * - Most importantly, it allows global Transition Hooks to be registered.\n * - It allows the default transition error handler to be set.\n * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).\n *\n * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.\n *\n * This API is located at `router.transitionService` ([[UIRouter.transitionService]])\n */\n var TransitionService = /** @class */ (function () {\n /** @internal */\n function TransitionService(_router) {\n /** @internal */\n this._transitionCount = 0;\n /** The transition hook types, such as `onEnter`, `onStart`, etc */\n this._eventTypes = [];\n /** @internal The registered transition hooks */\n this._registeredHooks = {};\n /** The paths on a criteria object */\n this._criteriaPaths = {};\n this._router = _router;\n this.$view = _router.viewService;\n this._deregisterHookFns = {};\n this._pluginapi = (createProxyFunctions(val(this), {}, val(this), [\n '_definePathType',\n '_defineEvent',\n '_getPathTypes',\n '_getEvents',\n 'getHooks',\n ]));\n this._defineCorePaths();\n this._defineCoreEvents();\n this._registerCoreTransitionHooks();\n _router.globals.successfulTransitions.onEvict(treeChangesCleanup);\n }\n /**\n * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.\n *\n * Registers a transition lifecycle hook, which is invoked during transition construction.\n *\n * This low level hook should only be used by plugins.\n * This can be a useful time for plugins to add resolves or mutate the transition as needed.\n * The Sticky States plugin uses this hook to modify the treechanges.\n *\n * ### Lifecycle\n *\n * `onCreate` hooks are invoked *while a transition is being constructed*.\n *\n * ### Return value\n *\n * The hook's return value is ignored\n *\n * @internal\n * @param criteria defines which Transitions the Hook should be invoked for.\n * @param callback the hook function which will be invoked.\n * @param options the registration options\n * @returns a function which deregisters the hook.\n */\n TransitionService.prototype.onCreate = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onBefore = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onStart = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onExit = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onRetain = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onEnter = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onFinish = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onSuccess = function (criteria, callback, options) {\n return;\n };\n /** @inheritdoc */\n TransitionService.prototype.onError = function (criteria, callback, options) {\n return;\n };\n /**\n * dispose\n * @internal\n */\n TransitionService.prototype.dispose = function (router) {\n values(this._registeredHooks).forEach(function (hooksArray) {\n return hooksArray.forEach(function (hook) {\n hook._deregistered = true;\n removeFrom(hooksArray, hook);\n });\n });\n };\n /**\n * Creates a new [[Transition]] object\n *\n * This is a factory function for creating new Transition objects.\n * It is used internally by the [[StateService]] and should generally not be called by application code.\n *\n * @internal\n * @param fromPath the path to the current state (the from state)\n * @param targetState the target state (destination)\n * @returns a Transition\n */\n TransitionService.prototype.create = function (fromPath, targetState) {\n return new Transition(fromPath, targetState, this._router);\n };\n /** @internal */\n TransitionService.prototype._defineCoreEvents = function () {\n var Phase = exports.TransitionHookPhase;\n var TH = TransitionHook;\n var paths = this._criteriaPaths;\n var NORMAL_SORT = false, REVERSE_SORT = true;\n var SYNCHRONOUS = true;\n this._defineEvent('onCreate', Phase.CREATE, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.THROW_ERROR, SYNCHRONOUS);\n this._defineEvent('onBefore', Phase.BEFORE, 0, paths.to);\n this._defineEvent('onStart', Phase.RUN, 0, paths.to);\n this._defineEvent('onExit', Phase.RUN, 100, paths.exiting, REVERSE_SORT);\n this._defineEvent('onRetain', Phase.RUN, 200, paths.retained);\n this._defineEvent('onEnter', Phase.RUN, 300, paths.entering);\n this._defineEvent('onFinish', Phase.RUN, 400, paths.to);\n this._defineEvent('onSuccess', Phase.SUCCESS, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n this._defineEvent('onError', Phase.ERROR, 0, paths.to, NORMAL_SORT, TH.LOG_REJECTED_RESULT, TH.LOG_ERROR, SYNCHRONOUS);\n };\n /** @internal */\n TransitionService.prototype._defineCorePaths = function () {\n var STATE = exports.TransitionHookScope.STATE, TRANSITION = exports.TransitionHookScope.TRANSITION;\n this._definePathType('to', TRANSITION);\n this._definePathType('from', TRANSITION);\n this._definePathType('exiting', STATE);\n this._definePathType('retained', STATE);\n this._definePathType('entering', STATE);\n };\n /** @internal */\n TransitionService.prototype._defineEvent = function (name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous) {\n if (reverseSort === void 0) { reverseSort = false; }\n if (getResultHandler === void 0) { getResultHandler = TransitionHook.HANDLE_RESULT; }\n if (getErrorHandler === void 0) { getErrorHandler = TransitionHook.REJECT_ERROR; }\n if (synchronous === void 0) { synchronous = false; }\n var eventType = new TransitionEventType(name, hookPhase, hookOrder, criteriaMatchPath, reverseSort, getResultHandler, getErrorHandler, synchronous);\n this._eventTypes.push(eventType);\n makeEvent(this, this, eventType);\n };\n /** @internal */\n TransitionService.prototype._getEvents = function (phase) {\n var transitionHookTypes = isDefined(phase)\n ? this._eventTypes.filter(function (type) { return type.hookPhase === phase; })\n : this._eventTypes.slice();\n return transitionHookTypes.sort(function (l, r) {\n var cmpByPhase = l.hookPhase - r.hookPhase;\n return cmpByPhase === 0 ? l.hookOrder - r.hookOrder : cmpByPhase;\n });\n };\n /**\n * Adds a Path to be used as a criterion against a TreeChanges path\n *\n * For example: the `exiting` path in [[HookMatchCriteria]] is a STATE scoped path.\n * It was defined by calling `defineTreeChangesCriterion('exiting', TransitionHookScope.STATE)`\n * Each state in the exiting path is checked against the criteria and returned as part of the match.\n *\n * Another example: the `to` path in [[HookMatchCriteria]] is a TRANSITION scoped path.\n * It was defined by calling `defineTreeChangesCriterion('to', TransitionHookScope.TRANSITION)`\n * Only the tail of the `to` path is checked against the criteria and returned as part of the match.\n *\n * @internal\n */\n TransitionService.prototype._definePathType = function (name, hookScope) {\n this._criteriaPaths[name] = { name: name, scope: hookScope };\n };\n /** @internal */\n // tslint:disable-next-line\n TransitionService.prototype._getPathTypes = function () {\n return this._criteriaPaths;\n };\n /** @internal */\n TransitionService.prototype.getHooks = function (hookName) {\n return this._registeredHooks[hookName];\n };\n /** @internal */\n TransitionService.prototype._registerCoreTransitionHooks = function () {\n var fns = this._deregisterHookFns;\n fns.addCoreResolves = registerAddCoreResolvables(this);\n fns.ignored = registerIgnoredTransitionHook(this);\n fns.invalid = registerInvalidTransitionHook(this);\n // Wire up redirectTo hook\n fns.redirectTo = registerRedirectToHook(this);\n // Wire up onExit/Retain/Enter state hooks\n fns.onExit = registerOnExitHook(this);\n fns.onRetain = registerOnRetainHook(this);\n fns.onEnter = registerOnEnterHook(this);\n // Wire up Resolve hooks\n fns.eagerResolve = registerEagerResolvePath(this);\n fns.lazyResolve = registerLazyResolveState(this);\n fns.resolveAll = registerResolveRemaining(this);\n // Wire up the View management hooks\n fns.loadViews = registerLoadEnteringViews(this);\n fns.activateViews = registerActivateViews(this);\n // Updates global state after a transition\n fns.updateGlobals = registerUpdateGlobalState(this);\n // After globals.current is updated at priority: 10000\n fns.updateUrl = registerUpdateUrl(this);\n // Lazy load state trees\n fns.lazyLoad = registerLazyLoadHook(this);\n };\n return TransitionService;\n }());\n\n /**\n * Provides services related to ui-router states.\n *\n * This API is located at `router.stateService` ([[UIRouter.stateService]])\n */\n var StateService = /** @class */ (function () {\n /** @internal */\n function StateService(/** @internal */ router) {\n this.router = router;\n /** @internal */\n this.invalidCallbacks = [];\n /** @internal */\n this._defaultErrorHandler = function $defaultErrorHandler($error$) {\n if ($error$ instanceof Error && $error$.stack) {\n console.error($error$);\n console.error($error$.stack);\n }\n else if ($error$ instanceof Rejection) {\n console.error($error$.toString());\n if ($error$.detail && $error$.detail.stack)\n console.error($error$.detail.stack);\n }\n else {\n console.error($error$);\n }\n };\n var getters = ['current', '$current', 'params', 'transition'];\n var boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n Object.defineProperty(StateService.prototype, \"transition\", {\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get: function () {\n return this.router.globals.transition;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"params\", {\n /**\n * The latest successful state parameters\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get: function () {\n return this.router.globals.params;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"current\", {\n /**\n * The current [[StateDeclaration]]\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get: function () {\n return this.router.globals.current;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(StateService.prototype, \"$current\", {\n /**\n * The current [[StateObject]] (an internal API)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get: function () {\n return this.router.globals.$current;\n },\n enumerable: false,\n configurable: true\n });\n /** @internal */\n StateService.prototype.dispose = function () {\n this.defaultErrorHandler(noop);\n this.invalidCallbacks = [];\n };\n /**\n * Handler for when [[transitionTo]] is called with an invalid state.\n *\n * Invokes the [[onInvalid]] callbacks, in natural order.\n * Each callback's return value is checked in sequence until one of them returns an instance of TargetState.\n * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises.\n *\n * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.\n *\n * @internal\n */\n StateService.prototype._handleInvalidTargetState = function (fromPath, toState) {\n var _this = this;\n var fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n var globals = this.router.globals;\n var latestThing = function () { return globals.transitionHistory.peekTail(); };\n var latest = latestThing();\n var callbackQueue = new Queue(this.invalidCallbacks.slice());\n var injector = new ResolveContext(fromPath).injector();\n var checkForRedirect = function (result) {\n if (!(result instanceof TargetState)) {\n return;\n }\n var target = result;\n // Recreate the TargetState, in case the state is now defined.\n target = _this.target(target.identifier(), target.params(), target.options());\n if (!target.valid()) {\n return Rejection.invalid(target.error()).toPromise();\n }\n if (latestThing() !== latest) {\n return Rejection.superseded().toPromise();\n }\n return _this.transitionTo(target.identifier(), target.params(), target.options());\n };\n function invokeNextCallback() {\n var nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined)\n return Rejection.invalid(toState.error()).toPromise();\n var callbackResult = services.$q.when(nextCallback(toState, fromState, injector));\n return callbackResult.then(checkForRedirect).then(function (result) { return result || invokeNextCallback(); });\n }\n return invokeNextCallback();\n };\n /**\n * Registers an Invalid State handler\n *\n * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]]\n * has been called with an invalid state reference parameter\n *\n * Example:\n * ```js\n * stateService.onInvalid(function(to, from, injector) {\n * if (to.name() === 'foo') {\n * let lazyLoader = injector.get('LazyLoadService');\n * return lazyLoader.load('foo')\n * .then(() => stateService.target('foo'));\n * }\n * });\n * ```\n *\n * @param {function} callback invoked when the toState is invalid\n * This function receives the (invalid) toState, the fromState, and an injector.\n * The function may optionally return a [[TargetState]] or a Promise for a TargetState.\n * If one is returned, it is treated as a redirect.\n *\n * @returns a function which deregisters the callback\n */\n StateService.prototype.onInvalid = function (callback) {\n this.invalidCallbacks.push(callback);\n return function deregisterListener() {\n removeFrom(this.invalidCallbacks)(callback);\n }.bind(this);\n };\n /**\n * Reloads the current state\n *\n * A method that force reloads the current state, or a partial state hierarchy.\n * All resolves are re-resolved, and components reinstantiated.\n *\n * #### Example:\n * ```js\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * $state.reload();\n * }\n * });\n * ```\n *\n * Note: `reload()` is just an alias for:\n *\n * ```js\n * $state.transitionTo($state.current, $state.params, {\n * reload: true, inherit: false\n * });\n * ```\n *\n * @param reloadState A state name or a state object.\n * If present, this state and all its children will be reloaded, but ancestors will not reload.\n *\n * #### Example:\n * ```js\n * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item'\n * //and current state is 'contacts.detail.item'\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * //will reload 'contact.detail' and nested 'contact.detail.item' states\n * $state.reload('contact.detail');\n * }\n * });\n * ```\n *\n * @returns A promise representing the state of the new transition. See [[StateService.go]]\n */\n StateService.prototype.reload = function (reloadState) {\n return this.transitionTo(this.current, this.params, {\n reload: isDefined(reloadState) ? reloadState : true,\n inherit: false,\n notify: false,\n });\n };\n /**\n * Transition to a different state and/or parameters\n *\n * Convenience method for transitioning to a new state.\n *\n * `$state.go` calls `$state.transitionTo` internally but automatically sets options to\n * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`.\n * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`).\n * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters\n * inherit from the current parameter values (because of `inherit: true`).\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.go('contact.detail');\n * };\n * });\n * ```\n *\n * @param to Absolute state name, state object, or relative state path (relative to current state).\n *\n * Some examples:\n *\n * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n * - `$state.go('^')` - will go to the parent state\n * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state\n * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state\n *\n * @param params A map of the parameters that will be sent to the state, will populate $stateParams.\n *\n * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`).\n * This allows, for example, going to a sibling state that shares parameters defined by a parent state.\n *\n * @param options Transition options\n *\n * @returns {promise} A promise representing the state of the new transition.\n */\n StateService.prototype.go = function (to, params, options) {\n var defautGoOpts = { relative: this.$current, inherit: true };\n var transOpts = defaults(options, defautGoOpts, defaultTransOpts);\n return this.transitionTo(to, params, transOpts);\n };\n /**\n * Creates a [[TargetState]]\n *\n * This is a factory method for creating a TargetState\n *\n * This may be returned from a Transition Hook to redirect a transition, for example.\n */\n StateService.prototype.target = function (identifier, params, options) {\n if (options === void 0) { options = {}; }\n // If we're reloading, find the state object to reload from\n if (isObject(options.reload) && !options.reload.name)\n throw new Error('Invalid reload state object');\n var reg = this.router.stateRegistry;\n options.reloadState =\n options.reload === true ? reg.root() : reg.matcher.find(options.reload, options.relative);\n if (options.reload && !options.reloadState)\n throw new Error(\"No such reload state '\" + (isString(options.reload) ? options.reload : options.reload.name) + \"'\");\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n };\n /** @internal */\n StateService.prototype.getCurrentPath = function () {\n var _this = this;\n var globals = this.router.globals;\n var latestSuccess = globals.successfulTransitions.peekTail();\n var rootPath = function () { return [new PathNode(_this.router.stateRegistry.root())]; };\n return latestSuccess ? latestSuccess.treeChanges().to : rootPath();\n };\n /**\n * Low-level method for transitioning to a new state.\n *\n * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations.\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.transitionTo('contact.detail');\n * };\n * });\n * ```\n *\n * @param to State name or state object.\n * @param toParams A map of the parameters that will be sent to the state,\n * will populate $stateParams.\n * @param options Transition options\n *\n * @returns A promise representing the state of the new transition. See [[go]]\n */\n StateService.prototype.transitionTo = function (to, toParams, options) {\n var _this = this;\n if (toParams === void 0) { toParams = {}; }\n if (options === void 0) { options = {}; }\n var router = this.router;\n var globals = router.globals;\n options = defaults(options, defaultTransOpts);\n var getCurrent = function () { return globals.transition; };\n options = extend(options, { current: getCurrent });\n var ref = this.target(to, toParams, options);\n var currentPath = this.getCurrentPath();\n if (!ref.exists())\n return this._handleInvalidTargetState(currentPath, ref);\n if (!ref.valid())\n return silentRejection(ref.error());\n if (options.supercede === false && getCurrent()) {\n return (Rejection.ignored('Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.').toPromise());\n }\n /**\n * Special handling for Ignored, Aborted, and Redirected transitions\n *\n * The semantics for the transition.run() promise and the StateService.transitionTo()\n * promise differ. For instance, the run() promise may be rejected because it was\n * IGNORED, but the transitionTo() promise is resolved because from the user perspective\n * no error occurred. Likewise, the transition.run() promise may be rejected because of\n * a Redirect, but the transitionTo() promise is chained to the new Transition's promise.\n */\n var rejectedTransitionHandler = function (trans) { return function (error) {\n if (error instanceof Rejection) {\n var isLatest = router.globals.lastStartedTransitionId <= trans.$id;\n if (error.type === exports.RejectType.IGNORED) {\n isLatest && router.urlRouter.update();\n // Consider ignored `Transition.run()` as a successful `transitionTo`\n return services.$q.when(globals.current);\n }\n var detail = error.detail;\n if (error.type === exports.RejectType.SUPERSEDED && error.redirected && detail instanceof TargetState) {\n // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully\n // by returning the promise for the new (redirect) `Transition.run()`.\n var redirect = trans.redirect(detail);\n return redirect.run().catch(rejectedTransitionHandler(redirect));\n }\n if (error.type === exports.RejectType.ABORTED) {\n isLatest && router.urlRouter.update();\n return services.$q.reject(error);\n }\n }\n var errorHandler = _this.defaultErrorHandler();\n errorHandler(error);\n return services.$q.reject(error);\n }; };\n var transition = this.router.transitionService.create(currentPath, ref);\n var transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition));\n silenceUncaughtInPromise(transitionToPromise); // issue #2676\n // Return a promise for the transition, which also has the transition object on it.\n return extend(transitionToPromise, { transition: transition });\n };\n /**\n * Checks if the current state *is* the provided state\n *\n * Similar to [[includes]] but only checks for the full state name.\n * If params is supplied then it will be tested for strict equality against the current\n * active params object, so all params must match with none missing and no extras.\n *\n * #### Example:\n * ```js\n * $state.$current.name = 'contacts.details.item';\n *\n * // absolute name\n * $state.is('contact.details.item'); // returns true\n * $state.is(contactDetailItemStateObject); // returns true\n * ```\n *\n * // relative name (. and ^), typically from a template\n * // E.g. from the 'contacts.details' template\n * ```html\n *
    Item
    \n * ```\n *\n * @param stateOrName The state name (absolute or relative) or state object you'd like to check.\n * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like\n * to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns Returns true if it is the state.\n */\n StateService.prototype.is = function (stateOrName, params, options) {\n options = defaults(options, { relative: this.$current });\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n if (!isDefined(state))\n return undefined;\n if (this.$current !== state)\n return false;\n if (!params)\n return true;\n var schema = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\n /**\n * Checks if the current state *includes* the provided state\n *\n * A method to determine if the current active state is equal to or is the child of the\n * state stateName. If any params are passed then they will be tested for a match as well.\n * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n *\n * #### Example when `$state.$current.name === 'contacts.details.item'`\n * ```js\n * // Using partial names\n * $state.includes(\"contacts\"); // returns true\n * $state.includes(\"contacts.details\"); // returns true\n * $state.includes(\"contacts.details.item\"); // returns true\n * $state.includes(\"contacts.list\"); // returns false\n * $state.includes(\"about\"); // returns false\n * ```\n *\n * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`:\n * ```js\n * $state.includes(\"*.details.*.*\"); // returns true\n * $state.includes(\"*.details.**\"); // returns true\n * $state.includes(\"**.item.**\"); // returns true\n * $state.includes(\"*.details.item.url\"); // returns true\n * $state.includes(\"*.details.*.url\"); // returns true\n * $state.includes(\"*.details.*\"); // returns false\n * $state.includes(\"item.**\"); // returns false\n * ```\n *\n * @param stateOrName A partial name, relative name, glob pattern,\n * or state object to be searched for within the current state name.\n * @param params A param object, e.g. `{sectionId: section.id}`,\n * that you'd like to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns {boolean} Returns true if it does include the state\n */\n StateService.prototype.includes = function (stateOrName, params, options) {\n options = defaults(options, { relative: this.$current });\n var glob = isString(stateOrName) && Glob.fromString(stateOrName);\n if (glob) {\n if (!glob.matches(this.$current.name))\n return false;\n stateOrName = this.$current.name;\n }\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative), include = this.$current.includes;\n if (!isDefined(state))\n return undefined;\n if (!isDefined(include[state.name]))\n return false;\n if (!params)\n return true;\n var schema = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n };\n /**\n * Generates a URL for a state and parameters\n *\n * Returns the url for the given state populated with the given params.\n *\n * #### Example:\n * ```js\n * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n * ```\n *\n * @param stateOrName The state name or state object you'd like to generate a url from.\n * @param params An object of parameter values to fill the state's required parameters.\n * @param options Options object. The options are:\n *\n * @returns {string} compiled state url\n */\n StateService.prototype.href = function (stateOrName, params, options) {\n var defaultHrefOpts = {\n lossy: true,\n inherit: true,\n absolute: false,\n relative: this.$current,\n };\n options = defaults(options, defaultHrefOpts);\n params = params || {};\n var state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n if (!isDefined(state))\n return null;\n if (options.inherit)\n params = this.params.$inherit(params, this.$current, state);\n var nav = state && options.lossy ? state.navigable : state;\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n return this.router.urlRouter.href(nav.url, params, { absolute: options.absolute });\n };\n /**\n * Sets or gets the default [[transitionTo]] error handler.\n *\n * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition.\n * This includes errors caused by resolves and transition hooks.\n *\n * Note:\n * This handler does not receive certain Transition rejections.\n * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]].\n *\n * The built-in default error handler logs the error to the console.\n *\n * You can provide your own custom handler.\n *\n * #### Example:\n * ```js\n * stateService.defaultErrorHandler(function() {\n * // Do not log transitionTo errors\n * });\n * ```\n *\n * @param handler a global error handler function\n * @returns the current global error handler\n */\n StateService.prototype.defaultErrorHandler = function (handler) {\n return (this._defaultErrorHandler = handler || this._defaultErrorHandler);\n };\n StateService.prototype.get = function (stateOrName, base) {\n var reg = this.router.stateRegistry;\n if (arguments.length === 0)\n return reg.get();\n return reg.get(stateOrName, base || this.$current);\n };\n /**\n * Lazy loads a state\n *\n * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function.\n *\n * @param stateOrName the state that should be lazy loaded\n * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc)\n * Note: If no transition is provided, a noop transition is created using the from the current state to the current state.\n * This noop transition is not actually run.\n *\n * @returns a promise to lazy load\n */\n StateService.prototype.lazyLoad = function (stateOrName, transition) {\n var state = this.get(stateOrName);\n if (!state || !state.lazyLoad)\n throw new Error('Can not lazy load ' + stateOrName);\n var currentPath = this.getCurrentPath();\n var target = PathUtils.makeTargetState(this.router.stateRegistry, currentPath);\n transition = transition || this.router.transitionService.create(currentPath, target);\n return lazyLoadState(transition, state);\n };\n return StateService;\n }());\n\n /**\n * An angular1-like promise api\n *\n * This object implements four methods similar to the\n * [angular 1 promise api](https://docs.angularjs.org/api/ng/service/$q)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This API provides native ES6 promise support wrapped as a $q-like API.\n * Internally, UI-Router uses this $q object to perform promise operations.\n * The `angular-ui-router` (ui-router for angular 1) uses the $q API provided by angular.\n *\n * $q-like promise api\n */\n var $q = {\n /** Normalizes a value as a promise */\n when: function (val) { return new Promise(function (resolve, reject) { return resolve(val); }); },\n /** Normalizes a value as a promise rejection */\n reject: function (val) {\n return new Promise(function (resolve, reject) {\n reject(val);\n });\n },\n /** @returns a deferred object, which has `resolve` and `reject` functions */\n defer: function () {\n var deferred = {};\n deferred.promise = new Promise(function (resolve, reject) {\n deferred.resolve = resolve;\n deferred.reject = reject;\n });\n return deferred;\n },\n /** Like Promise.all(), but also supports object key/promise notation like $q */\n all: function (promises) {\n if (isArray(promises)) {\n return Promise.all(promises);\n }\n if (isObject(promises)) {\n // Convert promises map to promises array.\n // When each promise resolves, map it to a tuple { key: key, val: val }\n var chain = Object.keys(promises).map(function (key) { return promises[key].then(function (val) { return ({ key: key, val: val }); }); });\n // Then wait for all promises to resolve, and convert them back to an object\n return $q.all(chain).then(function (values) {\n return values.reduce(function (acc, tuple) {\n acc[tuple.key] = tuple.val;\n return acc;\n }, {});\n });\n }\n },\n };\n\n // globally available injectables\n var globals = {};\n var STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/gm;\n var ARGUMENT_NAMES = /([^\\s,]+)/g;\n /**\n * A basic angular1-like injector api\n *\n * This object implements four methods similar to the\n * [angular 1 dependency injector](https://docs.angularjs.org/api/auto/service/$injector)\n *\n * UI-Router evolved from an angular 1 library to a framework agnostic library.\n * However, some of the `@uirouter/core` code uses these ng1 style APIs to support ng1 style dependency injection.\n *\n * This object provides a naive implementation of a globally scoped dependency injection system.\n * It supports the following DI approaches:\n *\n * ### Function parameter names\n *\n * A function's `.toString()` is called, and the parameter names are parsed.\n * This only works when the parameter names aren't \"mangled\" by a minifier such as UglifyJS.\n *\n * ```js\n * function injectedFunction(FooService, BarService) {\n * // FooService and BarService are injected\n * }\n * ```\n *\n * ### Function annotation\n *\n * A function may be annotated with an array of dependency names as the `$inject` property.\n *\n * ```js\n * injectedFunction.$inject = [ 'FooService', 'BarService' ];\n * function injectedFunction(fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }\n * ```\n *\n * ### Array notation\n *\n * An array provides the names of the dependencies to inject (as strings).\n * The function is the last element of the array.\n *\n * ```js\n * [ 'FooService', 'BarService', function (fs, bs) {\n * // FooService and BarService are injected as fs and bs parameters\n * }]\n * ```\n *\n * @type {$InjectorLike}\n */\n var $injector = {\n /** Gets an object from DI based on a string token */\n get: function (name) { return globals[name]; },\n /** Returns true if an object named `name` exists in global DI */\n has: function (name) { return $injector.get(name) != null; },\n /**\n * Injects a function\n *\n * @param fn the function to inject\n * @param context the function's `this` binding\n * @param locals An object with additional DI tokens and values, such as `{ someToken: { foo: 1 } }`\n */\n invoke: function (fn, context, locals) {\n var all = extend({}, globals, locals || {});\n var params = $injector.annotate(fn);\n var ensureExist = assertPredicate(function (key) { return all.hasOwnProperty(key); }, function (key) { return \"DI can't find injectable: '\" + key + \"'\"; });\n var args = params.filter(ensureExist).map(function (x) { return all[x]; });\n if (isFunction(fn))\n return fn.apply(context, args);\n else\n return fn.slice(-1)[0].apply(context, args);\n },\n /**\n * Returns a function's dependencies\n *\n * Analyzes a function (or array) and returns an array of DI tokens that the function requires.\n * @return an array of `string`s\n */\n annotate: function (fn) {\n if (!isInjectable(fn))\n throw new Error(\"Not an injectable function: \" + fn);\n if (fn && fn.$inject)\n return fn.$inject;\n if (isArray(fn))\n return fn.slice(0, -1);\n var fnStr = fn.toString().replace(STRIP_COMMENTS, '');\n var result = fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(ARGUMENT_NAMES);\n return result || [];\n },\n };\n\n var keyValsToObjectR = function (accum, _a) {\n var key = _a[0], val = _a[1];\n if (!accum.hasOwnProperty(key)) {\n accum[key] = val;\n }\n else if (isArray(accum[key])) {\n accum[key].push(val);\n }\n else {\n accum[key] = [accum[key], val];\n }\n return accum;\n };\n var getParams = function (queryString) {\n return queryString.split('&').filter(identity).map(splitEqual).reduce(keyValsToObjectR, {});\n };\n function parseUrl$1(url) {\n var orEmptyString = function (x) { return x || ''; };\n var _a = splitHash(url).map(orEmptyString), beforehash = _a[0], hash = _a[1];\n var _b = splitQuery(beforehash).map(orEmptyString), path = _b[0], search = _b[1];\n return { path: path, search: search, hash: hash, url: url };\n }\n var buildUrl = function (loc) {\n var path = loc.path();\n var searchObject = loc.search();\n var hash = loc.hash();\n var search = Object.keys(searchObject)\n .map(function (key) {\n var param = searchObject[key];\n var vals = isArray(param) ? param : [param];\n return vals.map(function (val) { return key + '=' + val; });\n })\n .reduce(unnestR, [])\n .join('&');\n return path + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n };\n function locationPluginFactory(name, isHtml5, serviceClass, configurationClass) {\n return function (uiRouter) {\n var service = (uiRouter.locationService = new serviceClass(uiRouter));\n var configuration = (uiRouter.locationConfig = new configurationClass(uiRouter, isHtml5));\n function dispose(router) {\n router.dispose(service);\n router.dispose(configuration);\n }\n return { name: name, service: service, configuration: configuration, dispose: dispose };\n };\n }\n\n /** A base `LocationServices` */\n var BaseLocationServices = /** @class */ (function () {\n function BaseLocationServices(router, fireAfterUpdate) {\n var _this = this;\n this.fireAfterUpdate = fireAfterUpdate;\n this._listeners = [];\n this._listener = function (evt) { return _this._listeners.forEach(function (cb) { return cb(evt); }); };\n this.hash = function () { return parseUrl$1(_this._get()).hash; };\n this.path = function () { return parseUrl$1(_this._get()).path; };\n this.search = function () { return getParams(parseUrl$1(_this._get()).search); };\n this._location = root.location;\n this._history = root.history;\n }\n BaseLocationServices.prototype.url = function (url, replace) {\n if (replace === void 0) { replace = true; }\n if (isDefined(url) && url !== this._get()) {\n this._set(null, null, url, replace);\n if (this.fireAfterUpdate) {\n this._listeners.forEach(function (cb) { return cb({ url: url }); });\n }\n }\n return buildUrl(this);\n };\n BaseLocationServices.prototype.onChange = function (cb) {\n var _this = this;\n this._listeners.push(cb);\n return function () { return removeFrom(_this._listeners, cb); };\n };\n BaseLocationServices.prototype.dispose = function (router) {\n deregAll(this._listeners);\n };\n return BaseLocationServices;\n }());\n\n var __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n /** A `LocationServices` that uses the browser hash \"#\" to get/set the current location */\n var HashLocationService = /** @class */ (function (_super) {\n __extends(HashLocationService, _super);\n function HashLocationService(router) {\n var _this = _super.call(this, router, false) || this;\n root.addEventListener('hashchange', _this._listener, false);\n return _this;\n }\n HashLocationService.prototype._get = function () {\n return trimHashVal(this._location.hash);\n };\n HashLocationService.prototype._set = function (state, title, url, replace) {\n this._location.hash = url;\n };\n HashLocationService.prototype.dispose = function (router) {\n _super.prototype.dispose.call(this, router);\n root.removeEventListener('hashchange', this._listener);\n };\n return HashLocationService;\n }(BaseLocationServices));\n\n var __extends$1 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n /** A `LocationServices` that gets/sets the current location from an in-memory object */\n var MemoryLocationService = /** @class */ (function (_super) {\n __extends$1(MemoryLocationService, _super);\n function MemoryLocationService(router) {\n return _super.call(this, router, true) || this;\n }\n MemoryLocationService.prototype._get = function () {\n return this._url;\n };\n MemoryLocationService.prototype._set = function (state, title, url, replace) {\n this._url = url;\n };\n return MemoryLocationService;\n }(BaseLocationServices));\n\n var __extends$2 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n })();\n /**\n * A `LocationServices` that gets/sets the current location using the browser's `location` and `history` apis\n *\n * Uses `history.pushState` and `history.replaceState`\n */\n var PushStateLocationService = /** @class */ (function (_super) {\n __extends$2(PushStateLocationService, _super);\n function PushStateLocationService(router) {\n var _this = _super.call(this, router, true) || this;\n _this._config = router.urlService.config;\n root.addEventListener('popstate', _this._listener, false);\n return _this;\n }\n /**\n * Gets the base prefix without:\n * - trailing slash\n * - trailing filename\n * - protocol and hostname\n *\n * If , this returns '/base'.\n * If , this returns '/foo/base'.\n * If , this returns '/base'.\n * If , this returns '/base'.\n * If , this returns ''.\n * If , this returns ''.\n * If , this returns ''.\n *\n * See: https://html.spec.whatwg.org/dev/semantics.html#the-base-element\n */\n PushStateLocationService.prototype._getBasePrefix = function () {\n return stripLastPathElement(this._config.baseHref());\n };\n PushStateLocationService.prototype._get = function () {\n var _a = this._location, pathname = _a.pathname, hash = _a.hash, search = _a.search;\n search = splitQuery(search)[1]; // strip ? if found\n hash = splitHash(hash)[1]; // strip # if found\n var basePrefix = this._getBasePrefix();\n var exactBaseHrefMatch = pathname === this._config.baseHref();\n var startsWithBase = pathname.substr(0, basePrefix.length) === basePrefix;\n pathname = exactBaseHrefMatch ? '/' : startsWithBase ? pathname.substring(basePrefix.length) : pathname;\n return pathname + (search ? '?' + search : '') + (hash ? '#' + hash : '');\n };\n PushStateLocationService.prototype._set = function (state, title, url, replace) {\n var basePrefix = this._getBasePrefix();\n var slash = url && url[0] !== '/' ? '/' : '';\n var fullUrl = url === '' || url === '/' ? this._config.baseHref() : basePrefix + slash + url;\n if (replace) {\n this._history.replaceState(state, title, fullUrl);\n }\n else {\n this._history.pushState(state, title, fullUrl);\n }\n };\n PushStateLocationService.prototype.dispose = function (router) {\n _super.prototype.dispose.call(this, router);\n root.removeEventListener('popstate', this._listener);\n };\n return PushStateLocationService;\n }(BaseLocationServices));\n\n /** A `LocationConfig` mock that gets/sets all config from an in-memory object */\n var MemoryLocationConfig = /** @class */ (function () {\n function MemoryLocationConfig() {\n var _this = this;\n this.dispose = noop;\n this._baseHref = '';\n this._port = 80;\n this._protocol = 'http';\n this._host = 'localhost';\n this._hashPrefix = '';\n this.port = function () { return _this._port; };\n this.protocol = function () { return _this._protocol; };\n this.host = function () { return _this._host; };\n this.baseHref = function () { return _this._baseHref; };\n this.html5Mode = function () { return false; };\n this.hashPrefix = function (newval) { return (isDefined(newval) ? (_this._hashPrefix = newval) : _this._hashPrefix); };\n }\n return MemoryLocationConfig;\n }());\n\n /** A `LocationConfig` that delegates to the browser's `location` object */\n var BrowserLocationConfig = /** @class */ (function () {\n function BrowserLocationConfig(router, _isHtml5) {\n if (_isHtml5 === void 0) { _isHtml5 = false; }\n this._isHtml5 = _isHtml5;\n this._baseHref = undefined;\n this._hashPrefix = '';\n }\n BrowserLocationConfig.prototype.port = function () {\n if (location.port) {\n return Number(location.port);\n }\n return this.protocol() === 'https' ? 443 : 80;\n };\n BrowserLocationConfig.prototype.protocol = function () {\n return location.protocol.replace(/:/g, '');\n };\n BrowserLocationConfig.prototype.host = function () {\n return location.hostname;\n };\n BrowserLocationConfig.prototype.html5Mode = function () {\n return this._isHtml5;\n };\n BrowserLocationConfig.prototype.hashPrefix = function (newprefix) {\n return isDefined(newprefix) ? (this._hashPrefix = newprefix) : this._hashPrefix;\n };\n BrowserLocationConfig.prototype.baseHref = function (href) {\n if (isDefined(href))\n this._baseHref = href;\n if (isUndefined(this._baseHref))\n this._baseHref = this.getBaseHref();\n return this._baseHref;\n };\n BrowserLocationConfig.prototype.getBaseHref = function () {\n var baseTag = document.getElementsByTagName('base')[0];\n if (baseTag && baseTag.href) {\n return baseTag.href.replace(/^([^/:]*:)?\\/\\/[^/]*/, '');\n }\n return this._isHtml5 ? '/' : location.pathname || '/';\n };\n BrowserLocationConfig.prototype.dispose = function () { };\n return BrowserLocationConfig;\n }());\n\n function servicesPlugin(router) {\n services.$injector = $injector;\n services.$q = $q;\n return { name: 'vanilla.services', $q: $q, $injector: $injector, dispose: function () { return null; } };\n }\n /** A `UIRouterPlugin` uses the browser hash to get/set the current location */\n var hashLocationPlugin = locationPluginFactory('vanilla.hashBangLocation', false, HashLocationService, BrowserLocationConfig);\n /** A `UIRouterPlugin` that gets/sets the current location using the browser's `location` and `history` apis */\n var pushStateLocationPlugin = locationPluginFactory('vanilla.pushStateLocation', true, PushStateLocationService, BrowserLocationConfig);\n /** A `UIRouterPlugin` that gets/sets the current location from an in-memory object */\n var memoryLocationPlugin = locationPluginFactory('vanilla.memoryLocation', false, MemoryLocationService, MemoryLocationConfig);\n\n var UIRouterPluginBase = /** @class */ (function () {\n function UIRouterPluginBase() {\n }\n UIRouterPluginBase.prototype.dispose = function (router) { };\n return UIRouterPluginBase;\n }());\n\n var index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n root: root,\n fromJson: fromJson,\n toJson: toJson,\n forEach: forEach,\n extend: extend,\n equals: equals,\n identity: identity,\n noop: noop,\n createProxyFunctions: createProxyFunctions,\n inherit: inherit,\n inArray: inArray,\n _inArray: _inArray,\n removeFrom: removeFrom,\n _removeFrom: _removeFrom,\n pushTo: pushTo,\n _pushTo: _pushTo,\n deregAll: deregAll,\n defaults: defaults,\n mergeR: mergeR,\n ancestors: ancestors,\n pick: pick,\n omit: omit,\n pluck: pluck,\n filter: filter,\n find: find,\n mapObj: mapObj,\n map: map,\n values: values,\n allTrueR: allTrueR,\n anyTrueR: anyTrueR,\n unnestR: unnestR,\n flattenR: flattenR,\n pushR: pushR,\n uniqR: uniqR,\n unnest: unnest,\n flatten: flatten,\n assertPredicate: assertPredicate,\n assertMap: assertMap,\n assertFn: assertFn,\n pairs: pairs,\n arrayTuples: arrayTuples,\n applyPairs: applyPairs,\n tail: tail,\n copy: copy,\n _extend: _extend,\n silenceUncaughtInPromise: silenceUncaughtInPromise,\n silentRejection: silentRejection,\n makeStub: makeStub,\n services: services,\n Glob: Glob,\n curry: curry,\n compose: compose,\n pipe: pipe,\n prop: prop,\n propEq: propEq,\n parse: parse,\n not: not,\n and: and,\n or: or,\n all: all,\n any: any,\n is: is,\n eq: eq,\n val: val,\n invoke: invoke,\n pattern: pattern,\n isUndefined: isUndefined,\n isDefined: isDefined,\n isNull: isNull,\n isNullOrUndefined: isNullOrUndefined,\n isFunction: isFunction,\n isNumber: isNumber,\n isString: isString,\n isObject: isObject,\n isArray: isArray,\n isDate: isDate,\n isRegExp: isRegExp,\n isInjectable: isInjectable,\n isPromise: isPromise,\n Queue: Queue,\n maxLength: maxLength,\n padString: padString,\n kebobString: kebobString,\n functionToString: functionToString,\n fnToString: fnToString,\n stringify: stringify,\n beforeAfterSubstr: beforeAfterSubstr,\n hostRegex: hostRegex,\n stripLastPathElement: stripLastPathElement,\n splitHash: splitHash,\n splitQuery: splitQuery,\n splitEqual: splitEqual,\n trimHashVal: trimHashVal,\n splitOnDelim: splitOnDelim,\n joinNeighborsR: joinNeighborsR,\n get Category () { return exports.Category; },\n Trace: Trace,\n trace: trace,\n get DefType () { return exports.DefType; },\n Param: Param,\n ParamTypes: ParamTypes,\n StateParams: StateParams,\n ParamType: ParamType,\n PathNode: PathNode,\n PathUtils: PathUtils,\n resolvePolicies: resolvePolicies,\n defaultResolvePolicy: defaultResolvePolicy,\n Resolvable: Resolvable,\n NATIVE_INJECTOR_TOKEN: NATIVE_INJECTOR_TOKEN,\n ResolveContext: ResolveContext,\n resolvablesBuilder: resolvablesBuilder,\n StateBuilder: StateBuilder,\n StateObject: StateObject,\n StateMatcher: StateMatcher,\n StateQueueManager: StateQueueManager,\n StateRegistry: StateRegistry,\n StateService: StateService,\n TargetState: TargetState,\n get TransitionHookPhase () { return exports.TransitionHookPhase; },\n get TransitionHookScope () { return exports.TransitionHookScope; },\n HookBuilder: HookBuilder,\n matchState: matchState,\n RegisteredHook: RegisteredHook,\n makeEvent: makeEvent,\n get RejectType () { return exports.RejectType; },\n Rejection: Rejection,\n Transition: Transition,\n TransitionHook: TransitionHook,\n TransitionEventType: TransitionEventType,\n defaultTransOpts: defaultTransOpts,\n TransitionService: TransitionService,\n UrlRules: UrlRules,\n UrlConfig: UrlConfig,\n UrlMatcher: UrlMatcher,\n ParamFactory: ParamFactory,\n UrlMatcherFactory: UrlMatcherFactory,\n UrlRouter: UrlRouter,\n UrlRuleFactory: UrlRuleFactory,\n BaseUrlRule: BaseUrlRule,\n UrlService: UrlService,\n ViewService: ViewService,\n UIRouterGlobals: UIRouterGlobals,\n UIRouter: UIRouter,\n $q: $q,\n $injector: $injector,\n BaseLocationServices: BaseLocationServices,\n HashLocationService: HashLocationService,\n MemoryLocationService: MemoryLocationService,\n PushStateLocationService: PushStateLocationService,\n MemoryLocationConfig: MemoryLocationConfig,\n BrowserLocationConfig: BrowserLocationConfig,\n keyValsToObjectR: keyValsToObjectR,\n getParams: getParams,\n parseUrl: parseUrl$1,\n buildUrl: buildUrl,\n locationPluginFactory: locationPluginFactory,\n servicesPlugin: servicesPlugin,\n hashLocationPlugin: hashLocationPlugin,\n pushStateLocationPlugin: pushStateLocationPlugin,\n memoryLocationPlugin: memoryLocationPlugin,\n UIRouterPluginBase: UIRouterPluginBase\n });\n\n /** @publicapi @module ng1 */ /** */\n /** @internalapi */\n function getNg1ViewConfigFactory() {\n var templateFactory = null;\n return function (path, view) {\n templateFactory = templateFactory || services.$injector.get('$templateFactory');\n return [new Ng1ViewConfig(path, view, templateFactory)];\n };\n }\n /** @internalapi */\n var hasAnyKey = function (keys, obj) { return keys.reduce(function (acc, key) { return acc || isDefined(obj[key]); }, false); };\n /**\n * This is a [[StateBuilder.builder]] function for angular1 `views`.\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * handles the `views` property with logic specific to @uirouter/angularjs (ng1).\n *\n * If no `views: {}` property exists on the [[StateDeclaration]], then it creates the `views` object\n * and applies the state-level configuration to a view named `$default`.\n *\n * @internalapi\n */\n function ng1ViewsBuilder(state) {\n // Do not process root state\n if (!state.parent)\n return {};\n var tplKeys = ['templateProvider', 'templateUrl', 'template', 'notify', 'async'], ctrlKeys = ['controller', 'controllerProvider', 'controllerAs', 'resolveAs'], compKeys = ['component', 'bindings', 'componentProvider'], nonCompKeys = tplKeys.concat(ctrlKeys), allViewKeys = compKeys.concat(nonCompKeys);\n // Do not allow a state to have both state-level props and also a `views: {}` property.\n // A state without a `views: {}` property can declare properties for the `$default` view as properties of the state.\n // However, the `$default` approach should not be mixed with a separate `views: ` block.\n if (isDefined(state.views) && hasAnyKey(allViewKeys, state)) {\n throw new Error(\"State '\" + state.name + \"' has a 'views' object. \" +\n \"It cannot also have \\\"view properties\\\" at the state level. \" +\n \"Move the following properties into a view (in the 'views' object): \" +\n (\" \" + allViewKeys.filter(function (key) { return isDefined(state[key]); }).join(', ')));\n }\n var views = {}, viewsObject = state.views || { $default: pick(state, allViewKeys) };\n forEach(viewsObject, function (config, name) {\n // Account for views: { \"\": { template... } }\n name = name || '$default';\n // Account for views: { header: \"headerComponent\" }\n if (isString(config))\n config = { component: config };\n // Make a shallow copy of the config object\n config = extend({}, config);\n // Do not allow a view to mix props for component-style view with props for template/controller-style view\n if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {\n throw new Error(\"Cannot combine: \" + compKeys.join('|') + \" with: \" + nonCompKeys.join('|') + \" in stateview: '\" + name + \"@\" + state.name + \"'\");\n }\n config.resolveAs = config.resolveAs || '$resolve';\n config.$type = 'ng1';\n config.$context = state;\n config.$name = name;\n var normalized = ViewService.normalizeUIViewTarget(config.$context, config.$name);\n config.$uiViewName = normalized.uiViewName;\n config.$uiViewContextAnchor = normalized.uiViewContextAnchor;\n views[name] = config;\n });\n return views;\n }\n /** @hidden */\n var id$1 = 0;\n /** @internalapi */\n var Ng1ViewConfig = /** @class */ (function () {\n function Ng1ViewConfig(path, viewDecl, factory) {\n var _this = this;\n this.path = path;\n this.viewDecl = viewDecl;\n this.factory = factory;\n this.$id = id$1++;\n this.loaded = false;\n this.getTemplate = function (uiView, context) {\n return _this.component\n ? _this.factory.makeComponentTemplate(uiView, context, _this.component, _this.viewDecl.bindings)\n : _this.template;\n };\n }\n Ng1ViewConfig.prototype.load = function () {\n var _this = this;\n var $q = services.$q;\n var context = new ResolveContext(this.path);\n var params = this.path.reduce(function (acc, node) { return extend(acc, node.paramValues); }, {});\n var promises = {\n template: $q.when(this.factory.fromConfig(this.viewDecl, params, context)),\n controller: $q.when(this.getController(context)),\n };\n return $q.all(promises).then(function (results) {\n trace.traceViewServiceEvent('Loaded', _this);\n _this.controller = results.controller;\n extend(_this, results.template); // Either { template: \"tpl\" } or { component: \"cmpName\" }\n return _this;\n });\n };\n /**\n * Gets the controller for a view configuration.\n *\n * @returns {Function|Promise.} Returns a controller, or a promise that resolves to a controller.\n */\n Ng1ViewConfig.prototype.getController = function (context) {\n var provider = this.viewDecl.controllerProvider;\n if (!isInjectable(provider))\n return this.viewDecl.controller;\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n return Ng1ViewConfig;\n }());\n\n /** @publicapi @module view */ /** */\n /**\n * Service which manages loading of templates from a ViewConfig.\n */\n var TemplateFactory = /** @class */ (function () {\n function TemplateFactory() {\n var _this = this;\n /** @hidden */ this._useHttp = ng.version.minor < 3;\n /** @hidden */ this.$get = [\n '$http',\n '$templateCache',\n '$injector',\n function ($http, $templateCache, $injector) {\n _this.$templateRequest = $injector.has && $injector.has('$templateRequest') && $injector.get('$templateRequest');\n _this.$http = $http;\n _this.$templateCache = $templateCache;\n return _this;\n },\n ];\n }\n /** @hidden */\n TemplateFactory.prototype.useHttpService = function (value) {\n this._useHttp = value;\n };\n /**\n * Creates a template from a configuration object.\n *\n * @param config Configuration object for which to load a template.\n * The following properties are search in the specified order, and the first one\n * that is defined is used to create the template:\n *\n * @param params Parameters to pass to the template function.\n * @param context The resolve context associated with the template's view\n *\n * @return {string|object} The template html as a string, or a promise for\n * that string,or `null` if no template is configured.\n */\n TemplateFactory.prototype.fromConfig = function (config, params, context) {\n var defaultTemplate = '';\n var asTemplate = function (result) { return services.$q.when(result).then(function (str) { return ({ template: str }); }); };\n var asComponent = function (result) { return services.$q.when(result).then(function (str) { return ({ component: str }); }); };\n return isDefined(config.template)\n ? asTemplate(this.fromString(config.template, params))\n : isDefined(config.templateUrl)\n ? asTemplate(this.fromUrl(config.templateUrl, params))\n : isDefined(config.templateProvider)\n ? asTemplate(this.fromProvider(config.templateProvider, params, context))\n : isDefined(config.component)\n ? asComponent(config.component)\n : isDefined(config.componentProvider)\n ? asComponent(this.fromComponentProvider(config.componentProvider, params, context))\n : asTemplate(defaultTemplate);\n };\n /**\n * Creates a template from a string or a function returning a string.\n *\n * @param template html template as a string or function that returns an html template as a string.\n * @param params Parameters to pass to the template function.\n *\n * @return {string|object} The template html as a string, or a promise for that\n * string.\n */\n TemplateFactory.prototype.fromString = function (template, params) {\n return isFunction(template) ? template(params) : template;\n };\n /**\n * Loads a template from the a URL via `$http` and `$templateCache`.\n *\n * @param {string|Function} url url of the template to load, or a function\n * that returns a url.\n * @param {Object} params Parameters to pass to the url function.\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n TemplateFactory.prototype.fromUrl = function (url, params) {\n if (isFunction(url))\n url = url(params);\n if (url == null)\n return null;\n if (this._useHttp) {\n return this.$http\n .get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } })\n .then(function (response) {\n return response.data;\n });\n }\n return this.$templateRequest(url);\n };\n /**\n * Creates a template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string|Promise.} The template html as a string, or a promise\n * for that string.\n */\n TemplateFactory.prototype.fromProvider = function (provider, params, context) {\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n /**\n * Creates a component's template by invoking an injectable provider function.\n *\n * @param provider Function to invoke via `locals`\n * @param {Function} injectFn a function used to invoke the template provider\n * @return {string} The template html as a string: \"\".\n */\n TemplateFactory.prototype.fromComponentProvider = function (provider, params, context) {\n var deps = services.$injector.annotate(provider);\n var providerFn = isArray(provider) ? tail(provider) : provider;\n var resolvable = new Resolvable('', providerFn, deps);\n return resolvable.get(context);\n };\n /**\n * Creates a template from a component's name\n *\n * This implements route-to-component.\n * It works by retrieving the component (directive) metadata from the injector.\n * It analyses the component's bindings, then constructs a template that instantiates the component.\n * The template wires input and output bindings to resolves or from the parent component.\n *\n * @param uiView {object} The parent ui-view (for binding outputs to callbacks)\n * @param context The ResolveContext (for binding outputs to callbacks returned from resolves)\n * @param component {string} Component's name in camel case.\n * @param bindings An object defining the component's bindings: {foo: '<'}\n * @return {string} The template as a string: \"\".\n */\n TemplateFactory.prototype.makeComponentTemplate = function (uiView, context, component, bindings) {\n bindings = bindings || {};\n // Bind once prefix\n var prefix = ng.version.minor >= 3 ? '::' : '';\n // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-`\n var kebob = function (camelCase) {\n var kebobed = kebobString(camelCase);\n return /^(x|data)-/.exec(kebobed) ? \"x-\" + kebobed : kebobed;\n };\n var attributeTpl = function (input) {\n var name = input.name, type = input.type;\n var attrName = kebob(name);\n // If the ui-view has an attribute which matches a binding on the routed component\n // then pass that attribute through to the routed component template.\n // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:`\n if (uiView.attr(attrName) && !bindings[name])\n return attrName + \"='\" + uiView.attr(attrName) + \"'\";\n var resolveName = bindings[name] || name;\n // Pre-evaluate the expression for \"@\" bindings by enclosing in {{ }}\n // some-attr=\"{{ ::$resolve.someResolveName }}\"\n if (type === '@')\n return attrName + \"='{{\" + prefix + \"$resolve.\" + resolveName + \"}}'\";\n // Wire \"&\" callbacks to resolves that return a callback function\n // Get the result of the resolve (should be a function) and annotate it to get its arguments.\n // some-attr=\"$resolve.someResolveResultName(foo, bar)\"\n if (type === '&') {\n var res = context.getResolvable(resolveName);\n var fn = res && res.data;\n var args = (fn && services.$injector.annotate(fn)) || [];\n // account for array style injection, i.e., ['foo', function(foo) {}]\n var arrayIdxStr = isArray(fn) ? \"[\" + (fn.length - 1) + \"]\" : '';\n return attrName + \"='$resolve.\" + resolveName + arrayIdxStr + \"(\" + args.join(',') + \")'\";\n }\n // some-attr=\"::$resolve.someResolveName\"\n return attrName + \"='\" + prefix + \"$resolve.\" + resolveName + \"'\";\n };\n var attrs = getComponentBindings(component).map(attributeTpl).join(' ');\n var kebobName = kebob(component);\n return \"<\" + kebobName + \" \" + attrs + \">\";\n };\n return TemplateFactory;\n }());\n // Gets all the directive(s)' inputs ('@', '=', and '<') and outputs ('&')\n function getComponentBindings(name) {\n var cmpDefs = services.$injector.get(name + 'Directive'); // could be multiple\n if (!cmpDefs || !cmpDefs.length)\n throw new Error(\"Unable to find component named '\" + name + \"'\");\n return cmpDefs.map(getBindings).reduce(unnestR, []);\n }\n // Given a directive definition, find its object input attributes\n // Use different properties, depending on the type of directive (component, bindToController, normal)\n var getBindings = function (def) {\n if (isObject(def.bindToController))\n return scopeBindings(def.bindToController);\n return scopeBindings(def.scope);\n };\n // for ng 1.2 style, process the scope: { input: \"=foo\" }\n // for ng 1.3 through ng 1.5, process the component's bindToController: { input: \"=foo\" } object\n var scopeBindings = function (bindingsObj) {\n return Object.keys(bindingsObj || {})\n // [ 'input', [ '=foo', '=', 'foo' ] ]\n .map(function (key) { return [key, /^([=<@&])[?]?(.*)/.exec(bindingsObj[key])]; })\n // skip malformed values\n .filter(function (tuple) { return isDefined(tuple) && isArray(tuple[1]); })\n // { name: ('foo' || 'input'), type: '=' }\n .map(function (tuple) { return ({ name: tuple[1][2] || tuple[0], type: tuple[1][1] }); });\n };\n\n /** @publicapi @module ng1 */ /** */\n /**\n * The Angular 1 `StateProvider`\n *\n * The `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\n var StateProvider = /** @class */ (function () {\n function StateProvider(stateRegistry, stateService) {\n this.stateRegistry = stateRegistry;\n this.stateService = stateService;\n createProxyFunctions(val(StateProvider.prototype), this, val(this));\n }\n /**\n * Decorates states when they are registered\n *\n * Allows you to extend (carefully) or override (at your own peril) the\n * `stateBuilder` object used internally by [[StateRegistry]].\n * This can be used to add custom functionality to ui-router,\n * for example inferring templateUrl based on the state name.\n *\n * When passing only a name, it returns the current (original or decorated) builder\n * function that matches `name`.\n *\n * The builder functions that can be decorated are listed below. Though not all\n * necessarily have a good use case for decoration, that is up to you to decide.\n *\n * In addition, users can attach custom decorators, which will generate new\n * properties within the state's internal definition. There is currently no clear\n * use-case for this beyond accessing internal states (i.e. $state.$current),\n * however, expect this to become increasingly relevant as we introduce additional\n * meta-programming features.\n *\n * **Warning**: Decorators should not be interdependent because the order of\n * execution of the builder functions in non-deterministic. Builder functions\n * should only be dependent on the state definition object and super function.\n *\n *\n * Existing builder functions and current return values:\n *\n * - **parent** `{object}` - returns the parent state object.\n * - **data** `{object}` - returns state data, including any inherited data that is not\n * overridden by own values (if any).\n * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n * or `null`.\n * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is\n * navigable).\n * - **params** `{object}` - returns an array of state params that are ensured to\n * be a super-set of parent's params.\n * - **views** `{object}` - returns a views object where each key is an absolute view\n * name (i.e. \"viewName@stateName\") and each value is the config object\n * (template, controller) for the view. Even when you don't use the views object\n * explicitly on a state config, one is still created for you internally.\n * So by decorating this builder function you have access to decorating template\n * and controller properties.\n * - **ownParams** `{object}` - returns an array of params that belong to the state,\n * not including any params defined by ancestor states.\n * - **path** `{string}` - returns the full path from the root down to this state.\n * Needed for state activation.\n * - **includes** `{object}` - returns an object that includes every state that\n * would pass a `$state.includes()` test.\n *\n * #### Example:\n * Override the internal 'views' builder with a function that takes the state\n * definition, and a reference to the internal function being overridden:\n * ```js\n * $stateProvider.decorator('views', function (state, parent) {\n * let result = {},\n * views = parent(state);\n *\n * angular.forEach(views, function (config, name) {\n * let autoName = (state.name + '.' + name).replace('.', '/');\n * config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n * result[name] = config;\n * });\n * return result;\n * });\n *\n * $stateProvider.state('home', {\n * views: {\n * 'contact.list': { controller: 'ListController' },\n * 'contact.item': { controller: 'ItemController' }\n * }\n * });\n * ```\n *\n *\n * ```js\n * // Auto-populates list and item views with /partials/home/contact/list.html,\n * // and /partials/home/contact/item.html, respectively.\n * $state.go('home');\n * ```\n *\n * @param {string} name The name of the builder function to decorate.\n * @param {object} func A function that is responsible for decorating the original\n * builder function. The function receives two parameters:\n *\n * - `{object}` - state - The state config object.\n * - `{object}` - super - The original builder function.\n *\n * @return {object} $stateProvider - $stateProvider instance\n */\n StateProvider.prototype.decorator = function (name, func) {\n return this.stateRegistry.decorator(name, func) || this;\n };\n StateProvider.prototype.state = function (name, definition) {\n if (isObject(name)) {\n definition = name;\n }\n else {\n definition.name = name;\n }\n this.stateRegistry.register(definition);\n return this;\n };\n /**\n * Registers an invalid state handler\n *\n * This is a passthrough to [[StateService.onInvalid]] for ng1.\n */\n StateProvider.prototype.onInvalid = function (callback) {\n return this.stateService.onInvalid(callback);\n };\n return StateProvider;\n }());\n\n /** @publicapi @module ng1 */ /** */\n /**\n * This is a [[StateBuilder.builder]] function for angular1 `onEnter`, `onExit`,\n * `onRetain` callback hooks on a [[Ng1StateDeclaration]].\n *\n * When the [[StateBuilder]] builds a [[StateObject]] object from a raw [[StateDeclaration]], this builder\n * ensures that those hooks are injectable for @uirouter/angularjs (ng1).\n *\n * @internalapi\n */\n var getStateHookBuilder = function (hookName) {\n return function stateHookBuilder(stateObject) {\n var hook = stateObject[hookName];\n var pathname = hookName === 'onExit' ? 'from' : 'to';\n function decoratedNg1Hook(trans, state) {\n var resolveContext = new ResolveContext(trans.treeChanges(pathname));\n var subContext = resolveContext.subContext(state.$$state());\n var locals = extend(getLocals(subContext), { $state$: state, $transition$: trans });\n return services.$injector.invoke(hook, this, locals);\n }\n return hook ? decoratedNg1Hook : undefined;\n };\n };\n\n /** @publicapi @module ng1 */ /** */\n /**\n * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service\n * @internalapi\n */\n var Ng1LocationServices = /** @class */ (function () {\n function Ng1LocationServices($locationProvider) {\n // .onChange() registry\n this._urlListeners = [];\n this.$locationProvider = $locationProvider;\n var _lp = val($locationProvider);\n createProxyFunctions(_lp, this, _lp, ['hashPrefix']);\n }\n /**\n * Applys ng1-specific path parameter encoding\n *\n * The Angular 1 `$location` service is a bit weird.\n * It doesn't allow slashes to be encoded/decoded bi-directionally.\n *\n * See the writeup at https://github.com/angular-ui/ui-router/issues/2598\n *\n * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F\n *\n * @param router\n */\n Ng1LocationServices.monkeyPatchPathParameterType = function (router) {\n var pathType = router.urlMatcherFactory.type('path');\n pathType.encode = function (x) {\n return x != null ? x.toString().replace(/(~|\\/)/g, function (m) { return ({ '~': '~~', '/': '~2F' }[m]); }) : x;\n };\n pathType.decode = function (x) {\n return x != null ? x.toString().replace(/(~~|~2F)/g, function (m) { return ({ '~~': '~', '~2F': '/' }[m]); }) : x;\n };\n };\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n Ng1LocationServices.prototype.dispose = function () { };\n Ng1LocationServices.prototype.onChange = function (callback) {\n var _this = this;\n this._urlListeners.push(callback);\n return function () { return removeFrom(_this._urlListeners)(callback); };\n };\n Ng1LocationServices.prototype.html5Mode = function () {\n var html5Mode = this.$locationProvider.html5Mode();\n html5Mode = isObject(html5Mode) ? html5Mode.enabled : html5Mode;\n return html5Mode && this.$sniffer.history;\n };\n Ng1LocationServices.prototype.baseHref = function () {\n return this._baseHref || (this._baseHref = this.$browser.baseHref() || this.$window.location.pathname);\n };\n Ng1LocationServices.prototype.url = function (newUrl, replace, state) {\n if (replace === void 0) { replace = false; }\n if (isDefined(newUrl))\n this.$location.url(newUrl);\n if (replace)\n this.$location.replace();\n if (state)\n this.$location.state(state);\n return this.$location.url();\n };\n Ng1LocationServices.prototype._runtimeServices = function ($rootScope, $location, $sniffer, $browser, $window) {\n var _this = this;\n this.$location = $location;\n this.$sniffer = $sniffer;\n this.$browser = $browser;\n this.$window = $window;\n // Bind $locationChangeSuccess to the listeners registered in LocationService.onChange\n $rootScope.$on('$locationChangeSuccess', function (evt) { return _this._urlListeners.forEach(function (fn) { return fn(evt); }); });\n var _loc = val($location);\n // Bind these LocationService functions to $location\n createProxyFunctions(_loc, this, _loc, ['replace', 'path', 'search', 'hash']);\n // Bind these LocationConfig functions to $location\n createProxyFunctions(_loc, this, _loc, ['port', 'protocol', 'host']);\n };\n return Ng1LocationServices;\n }());\n\n /** @publicapi @module url */ /** */\n /**\n * Manages rules for client-side URL\n *\n * ### Deprecation warning:\n * This class is now considered to be an internal API\n * Use the [[UrlService]] instead.\n * For configuring URL rules, use the [[UrlRulesApi]] which can be found as [[UrlService.rules]].\n *\n * This class manages the router rules for what to do when the URL changes.\n *\n * This provider remains for backwards compatibility.\n *\n * @internalapi\n * @deprecated\n */\n var UrlRouterProvider = /** @class */ (function () {\n /** @hidden */\n function UrlRouterProvider(/** @hidden */ router) {\n this.router = router;\n }\n UrlRouterProvider.injectableHandler = function (router, handler) {\n return function (match) { return services.$injector.invoke(handler, null, { $match: match, $stateParams: router.globals.params }); };\n };\n /** @hidden */\n UrlRouterProvider.prototype.$get = function () {\n var urlService = this.router.urlService;\n this.router.urlRouter.update(true);\n if (!urlService.interceptDeferred)\n urlService.listen();\n return this.router.urlRouter;\n };\n /**\n * Registers a url handler function.\n *\n * Registers a low level url handler (a `rule`).\n * A rule detects specific URL patterns and returns a redirect, or performs some action.\n *\n * If a rule returns a string, the URL is replaced with the string, and all rules are fired again.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Here's an example of how you might allow case insensitive urls\n * $urlRouterProvider.rule(function ($injector, $location) {\n * var path = $location.path(),\n * normalized = path.toLowerCase();\n *\n * if (path !== normalized) {\n * return normalized;\n * }\n * });\n * });\n * ```\n *\n * @param ruleFn\n * Handler function that takes `$injector` and `$location` services as arguments.\n * You can use them to detect a url and return a different url as a string.\n *\n * @return [[UrlRouterProvider]] (`this`)\n */\n UrlRouterProvider.prototype.rule = function (ruleFn) {\n var _this = this;\n if (!isFunction(ruleFn))\n throw new Error(\"'rule' must be a function\");\n var match = function () { return ruleFn(services.$injector, _this.router.locationService); };\n var rule = new BaseUrlRule(match, identity);\n this.router.urlService.rules.rule(rule);\n return this;\n };\n /**\n * Defines the path or behavior to use when no url can be matched.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // if the path doesn't match any of the urls you configured\n * // otherwise will take care of routing the user to the\n * // specified url\n * $urlRouterProvider.otherwise('/index');\n *\n * // Example of using function rule as param\n * $urlRouterProvider.otherwise(function ($injector, $location) {\n * return '/a/valid/url';\n * });\n * });\n * ```\n *\n * @param rule\n * The url path you want to redirect to or a function rule that returns the url path or performs a `$state.go()`.\n * The function version is passed two params: `$injector` and `$location` services, and should return a url string.\n *\n * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n */\n UrlRouterProvider.prototype.otherwise = function (rule) {\n var _this = this;\n var urlRules = this.router.urlService.rules;\n if (isString(rule)) {\n urlRules.otherwise(rule);\n }\n else if (isFunction(rule)) {\n urlRules.otherwise(function () { return rule(services.$injector, _this.router.locationService); });\n }\n else {\n throw new Error(\"'rule' must be a string or function\");\n }\n return this;\n };\n /**\n * Registers a handler for a given url matching.\n *\n * If the handler is a string, it is\n * treated as a redirect, and is interpolated according to the syntax of match\n * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n *\n * If the handler is a function, it is injectable.\n * It gets invoked if `$location` matches.\n * You have the option of inject the match object as `$match`.\n *\n * The handler can return\n *\n * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n * will continue trying to find another one that matches.\n * - **string** which is treated as a redirect and passed to `$location.url()`\n * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n * if ($state.$current.navigable !== state ||\n * !equalForKeys($match, $stateParams) {\n * $state.transitionTo(state, $match, false);\n * }\n * });\n * });\n * ```\n *\n * @param what A pattern string to match, compiled as a [[UrlMatcher]].\n * @param handler The path (or function that returns a path) that you want to redirect your user to.\n * @param ruleCallback [optional] A callback that receives the `rule` registered with [[UrlMatcher.rule]]\n *\n * Note: the handler may also invoke arbitrary code, such as `$state.go()`\n */\n UrlRouterProvider.prototype.when = function (what, handler) {\n if (isArray(handler) || isFunction(handler)) {\n handler = UrlRouterProvider.injectableHandler(this.router, handler);\n }\n this.router.urlService.rules.when(what, handler);\n return this;\n };\n /**\n * Disables monitoring of the URL.\n *\n * Call this method before UI-Router has bootstrapped.\n * It will stop UI-Router from performing the initial url sync.\n *\n * This can be useful to perform some asynchronous initialization before the router starts.\n * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.\n *\n * #### Example:\n * ```js\n * var app = angular.module('app', ['ui.router']);\n *\n * app.config(function ($urlRouterProvider) {\n * // Prevent $urlRouter from automatically intercepting URL changes;\n * $urlRouterProvider.deferIntercept();\n * })\n *\n * app.run(function (MyService, $urlRouter, $http) {\n * $http.get(\"/stuff\").then(function(resp) {\n * MyService.doStuff(resp.data);\n * $urlRouter.listen();\n * $urlRouter.sync();\n * });\n * });\n * ```\n *\n * @param defer Indicates whether to defer location change interception.\n * Passing no parameter is equivalent to `true`.\n */\n UrlRouterProvider.prototype.deferIntercept = function (defer) {\n this.router.urlService.deferIntercept(defer);\n };\n return UrlRouterProvider;\n }());\n\n /* eslint-disable @typescript-eslint/no-empty-function */\n ng.module('ui.router.angular1', []);\n var mod_init = ng.module('ui.router.init', ['ng']);\n var mod_util = ng.module('ui.router.util', ['ui.router.init']);\n var mod_rtr = ng.module('ui.router.router', ['ui.router.util']);\n var mod_state = ng.module('ui.router.state', ['ui.router.router', 'ui.router.util', 'ui.router.angular1']);\n var mod_main = ng.module('ui.router', ['ui.router.init', 'ui.router.state', 'ui.router.angular1']);\n var mod_cmpt = ng.module('ui.router.compat', ['ui.router']);\n var router = null;\n $uiRouterProvider.$inject = ['$locationProvider'];\n /** This angular 1 provider instantiates a Router and exposes its services via the angular injector */\n function $uiRouterProvider($locationProvider) {\n // Create a new instance of the Router when the $uiRouterProvider is initialized\n router = this.router = new UIRouter();\n router.stateProvider = new StateProvider(router.stateRegistry, router.stateService);\n // Apply ng1 specific StateBuilder code for `views`, `resolve`, and `onExit/Retain/Enter` properties\n router.stateRegistry.decorator('views', ng1ViewsBuilder);\n router.stateRegistry.decorator('onExit', getStateHookBuilder('onExit'));\n router.stateRegistry.decorator('onRetain', getStateHookBuilder('onRetain'));\n router.stateRegistry.decorator('onEnter', getStateHookBuilder('onEnter'));\n router.viewService._pluginapi._viewConfigFactory('ng1', getNg1ViewConfigFactory());\n // Disable decoding of params by UrlMatcherFactory because $location already handles this\n router.urlService.config._decodeParams = false;\n var ng1LocationService = (router.locationService = router.locationConfig = new Ng1LocationServices($locationProvider));\n Ng1LocationServices.monkeyPatchPathParameterType(router);\n // backwards compat: also expose router instance as $uiRouterProvider.router\n router['router'] = router;\n router['$get'] = $get;\n $get.$inject = ['$location', '$browser', '$window', '$sniffer', '$rootScope', '$http', '$templateCache'];\n function $get($location, $browser, $window, $sniffer, $rootScope, $http, $templateCache) {\n ng1LocationService._runtimeServices($rootScope, $location, $sniffer, $browser, $window);\n delete router['router'];\n delete router['$get'];\n return router;\n }\n return router;\n }\n var getProviderFor = function (serviceName) { return [\n '$uiRouterProvider',\n function ($urp) {\n var service = $urp.router[serviceName];\n service['$get'] = function () { return service; };\n return service;\n },\n ]; };\n // This effectively calls $get() on `$uiRouterProvider` to trigger init (when ng enters runtime)\n runBlock.$inject = ['$injector', '$q', '$uiRouter'];\n function runBlock($injector, $q, $uiRouter) {\n services.$injector = $injector;\n services.$q = $q;\n // https://github.com/angular-ui/ui-router/issues/3678\n if (!Object.prototype.hasOwnProperty.call($injector, 'strictDi')) {\n try {\n $injector.invoke(function (checkStrictDi) { });\n }\n catch (error) {\n $injector.strictDi = !!/strict mode/.exec(error && error.toString());\n }\n }\n // The $injector is now available.\n // Find any resolvables that had dependency annotation deferred\n $uiRouter.stateRegistry\n .get()\n .map(function (x) { return x.$$state().resolvables; })\n .reduce(unnestR, [])\n .filter(function (x) { return x.deps === 'deferred'; })\n .forEach(function (resolvable) { return (resolvable.deps = $injector.annotate(resolvable.resolveFn, $injector.strictDi)); });\n }\n // $urlRouter service and $urlRouterProvider\n var getUrlRouterProvider = function (uiRouter) { return (uiRouter.urlRouterProvider = new UrlRouterProvider(uiRouter)); };\n // $state service and $stateProvider\n // $urlRouter service and $urlRouterProvider\n var getStateProvider = function () { return extend(router.stateProvider, { $get: function () { return router.stateService; } }); };\n watchDigests.$inject = ['$rootScope'];\n function watchDigests($rootScope) {\n $rootScope.$watch(function () {\n trace.approximateDigests++;\n });\n }\n mod_init.provider('$uiRouter', $uiRouterProvider);\n mod_rtr.provider('$urlRouter', ['$uiRouterProvider', getUrlRouterProvider]);\n mod_util.provider('$urlService', getProviderFor('urlService'));\n mod_util.provider('$urlMatcherFactory', ['$uiRouterProvider', function () { return router.urlMatcherFactory; }]);\n mod_util.provider('$templateFactory', function () { return new TemplateFactory(); });\n mod_state.provider('$stateRegistry', getProviderFor('stateRegistry'));\n mod_state.provider('$uiRouterGlobals', getProviderFor('globals'));\n mod_state.provider('$transitions', getProviderFor('transitionService'));\n mod_state.provider('$state', ['$uiRouterProvider', getStateProvider]);\n mod_state.factory('$stateParams', ['$uiRouter', function ($uiRouter) { return $uiRouter.globals.params; }]);\n mod_main.factory('$view', function () { return router.viewService; });\n mod_main.service('$trace', function () { return trace; });\n mod_main.run(watchDigests);\n mod_util.run(['$urlMatcherFactory', function ($urlMatcherFactory) { }]);\n mod_state.run(['$state', function ($state) { }]);\n mod_rtr.run(['$urlRouter', function ($urlRouter) { }]);\n mod_init.run(runBlock);\n /** @hidden TODO: find a place to move this */\n var getLocals = function (ctx) {\n var tokens = ctx.getTokens().filter(isString);\n var tuples = tokens.map(function (key) {\n var resolvable = ctx.getResolvable(key);\n var waitPolicy = ctx.getPolicy(resolvable).async;\n return [key, waitPolicy === 'NOWAIT' ? resolvable.promise : resolvable.data];\n });\n return tuples.reduce(applyPairs, {});\n };\n\n /* eslint-disable @typescript-eslint/no-empty-interface */\n /** @hidden */\n function parseStateRef(ref) {\n var paramsOnly = ref.match(/^\\s*({[^}]*})\\s*$/);\n if (paramsOnly)\n ref = '(' + paramsOnly[1] + ')';\n var parsed = ref.replace(/\\n/g, ' ').match(/^\\s*([^(]*?)\\s*(\\((.*)\\))?\\s*$/);\n if (!parsed || parsed.length !== 4)\n throw new Error(\"Invalid state ref '\" + ref + \"'\");\n return { state: parsed[1] || null, paramExpr: parsed[3] || null };\n }\n /** @hidden */\n function stateContext(el) {\n var $uiView = el.parent().inheritedData('$uiView');\n var path = parse('$cfg.path')($uiView);\n return path ? tail(path).state.name : undefined;\n }\n /** @hidden */\n function processedDef($state, $element, def) {\n var uiState = def.uiState || $state.current.name;\n var uiStateOpts = extend(defaultOpts($element, $state), def.uiStateOpts || {});\n var href = $state.href(uiState, def.uiStateParams, uiStateOpts);\n return { uiState: uiState, uiStateParams: def.uiStateParams, uiStateOpts: uiStateOpts, href: href };\n }\n /** @hidden */\n function getTypeInfo(el) {\n // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n var isSvg = Object.prototype.toString.call(el.prop('href')) === '[object SVGAnimatedString]';\n var isForm = el[0].nodeName === 'FORM';\n return {\n attr: isForm ? 'action' : isSvg ? 'xlink:href' : 'href',\n isAnchor: el.prop('tagName').toUpperCase() === 'A',\n clickable: !isForm,\n };\n }\n /** @hidden */\n function clickHook(el, $state, $timeout, type, getDef) {\n return function (e) {\n var button = e.which || e.button, target = getDef();\n if (!(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || e.altKey || el.attr('target'))) {\n // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n var transition_1 = $timeout(function () {\n if (!el.attr('disabled')) {\n $state.go(target.uiState, target.uiStateParams, target.uiStateOpts);\n }\n });\n e.preventDefault();\n // if the state has no URL, ignore one preventDefault from the
    directive.\n var ignorePreventDefaultCount_1 = type.isAnchor && !target.href ? 1 : 0;\n e.preventDefault = function () {\n if (ignorePreventDefaultCount_1-- <= 0)\n $timeout.cancel(transition_1);\n };\n }\n };\n }\n /** @hidden */\n function defaultOpts(el, $state) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n }\n /** @hidden */\n function bindEvents(element, scope, hookFn, uiStateOpts) {\n var events;\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n if (!isArray(events)) {\n events = ['click'];\n }\n var on = element.on ? 'on' : 'bind';\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n element[on](event_1, hookFn);\n }\n scope.$on('$destroy', function () {\n var off = element.off ? 'off' : 'unbind';\n for (var _i = 0, events_2 = events; _i < events_2.length; _i++) {\n var event_2 = events_2[_i];\n element[off](event_2, hookFn);\n }\n });\n }\n /**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\n var uiSrefDirective;\n uiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n var hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n ];\n /**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\n var uiStateDirective;\n uiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var hookFn;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return ((acc[attr] = noop), acc); }, {});\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n inputAttrs.forEach(function (field) {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n attrs.$observe(field, function (expr) {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, function (newval) {\n rawDef[field] = newval;\n update();\n }, true);\n });\n });\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n ];\n /**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `
    ` and `` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\n var uiSrefActiveDirective;\n uiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function ($scope, $element, $attrs) {\n var states = [];\n var activeEqClass;\n var uiSrefActive;\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n }\n catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState, newParams) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n var deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n function setupEventListeners() {\n var deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n var deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n var deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n function setStatesFromDefinitionObject(statesDefinition) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function (stateOrName, activeClass) {\n // Helper function to abstract adding state.\n var addStateForClass = function (stateOrName, activeClass) {\n var ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName, activeClass);\n }\n else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function (stateOrName) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n function addState(stateName, stateParams, activeClass) {\n var state = $state.get(stateName, stateContext($element));\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n states.push(stateInfo);\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n // Update route state\n function update() {\n var splitClasses = function (str) { return str.split(/\\s/).filter(identity); };\n var getClasses = function (stateList) {\n return stateList\n .map(function (x) { return x.activeClass; })\n .map(splitClasses)\n .reduce(unnestR, []);\n };\n var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); }));\n var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length;\n var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n var addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n var removeClasses = allClasses.filter(function (cls) { return !inArray(addClasses, cls); });\n $scope.$evalAsync(function () {\n addClasses.forEach(function (className) { return $element.addClass(className); });\n removeClasses.forEach(function (className) { return $element.removeClass(className); });\n });\n }\n update();\n },\n ],\n };\n },\n ];\n ng\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n\n /** @publicapi @module ng1 */ /** */\n /**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n $IsStateFilter.$inject = ['$state'];\n function $IsStateFilter($state) {\n var isFilter = function (state, params, options) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n }\n /**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n $IncludedByStateFilter.$inject = ['$state'];\n function $IncludedByStateFilter($state) {\n var includesFilter = function (state, params, options) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n }\n ng.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);\n\n /** @publicapi @module directives */ /** */\n /**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\n var uiView;\n // eslint-disable-next-line prefer-const\n uiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) {\n function getRenderer() {\n return {\n enter: function (element, target, cb) {\n if (ng.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n }\n else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function (element, cb) {\n if (ng.version.minor > 2) {\n $animate.leave(element).then(cb);\n }\n else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n function configsEqual(config1, config2) {\n return config1 === config2;\n }\n var rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n var directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement, tAttrs, $transclude) {\n return function (scope, $element, attrs) {\n var onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(), inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n var previousEl, currentEl, currentScope, viewConfig;\n var activeUIView = {\n $type: 'ng1',\n id: directive.count++,\n name: name,\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name,\n config: null,\n configUpdated: configUpdatedCallback,\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n var fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n var fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n trace.traceUIViewEvent('Linking', activeUIView);\n function configUpdatedCallback(config) {\n if (config && !(config instanceof Ng1ViewConfig))\n return;\n if (configsEqual(viewConfig, config))\n return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n viewConfig = config;\n updateView(config);\n }\n $element.data('$uiView', { $uiView: activeUIView });\n updateView();\n var unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function () {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n if (currentEl) {\n var _viewData_1 = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData_1);\n renderer.leave(currentEl, function () {\n _viewData_1.$$animLeave.resolve();\n previousEl = null;\n });\n previousEl = currentEl;\n currentEl = null;\n }\n }\n function updateView(config) {\n var newScope = scope.$new();\n var animEnter = $q.defer(), animLeave = $q.defer();\n var $uiViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n var $uiViewAnim = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n var cloned = $transclude(newScope, function (clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope)\n currentScope.$emit('$viewContentAnimationEnded');\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n cleanupLastView();\n });\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n return directive;\n },\n ];\n $ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q'];\n /** @hidden */\n function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q) {\n var getControllerAs = parse('viewDecl.controllerAs');\n var getResolveAs = parse('viewDecl.resolveAs');\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement) {\n var initial = tElement.html();\n tElement.empty();\n return function (scope, $element) {\n var data = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n var cfg = data.$cfg || { viewDecl: {}, getTemplate: noop };\n var resolveCtx = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n var link = $compile($element.contents());\n var controller = cfg.controller;\n var controllerAs = getControllerAs(cfg);\n var resolveAs = getResolveAs(cfg);\n var locals = resolveCtx && getLocals(resolveCtx);\n scope[resolveAs] = locals;\n if (controller) {\n var controllerInstance = ($controller(controller, extend({}, locals, { $scope: scope, $element: $element })));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n var kebobName = kebobString(cfg.component);\n var tagRegexp_1 = new RegExp(\"^(x-|data-)?\" + kebobName + \"$\", 'i');\n var getComponentController = function () {\n var directiveEl = [].slice\n .call($element[0].children)\n .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); });\n return directiveEl && ng.element(directiveEl).data(\"$\" + cfg.component + \"Controller\");\n };\n var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) {\n if (!ctrlInstance)\n return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch_1();\n });\n }\n link(scope);\n };\n },\n };\n }\n /** @hidden */\n var hasComponentImpl = typeof ng.module('ui.router')['component'] === 'function';\n /** @hidden incrementing id */\n var _uiCanExitId = 0;\n /** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\n function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) &&\n !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n var viewState = tail(cfg.path).state.self;\n var hookOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n var resolveContext = new ResolveContext(cfg.path);\n var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data;\n // Fire callback on any successful transition\n var paramsUpdated = function ($transition$) {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1)\n return;\n var toParams = $transition$.params('to');\n var fromParams = $transition$.params('from');\n var getNodeSchema = function (node) { return node.paramSchema; };\n var toSchema = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\n var fromSchema = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\n // Find the to params that have different values than the from params\n var changedToParams = toSchema.filter(function (param) {\n var idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n var changedKeys_1 = changedToParams.map(function (x) { return x.id; });\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n var newValues = filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; });\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n var id_1 = _uiCanExitId++;\n var cacheProp_1 = '_uiCanExitIds';\n // Returns true if a redirect transition already answered truthy\n var prevTruthyAnswer_1 = function (trans) {\n return !!trans && ((trans[cacheProp_1] && trans[cacheProp_1][id_1] === true) || prevTruthyAnswer_1(trans.redirectedFrom()));\n };\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n var wrappedHook = function (trans) {\n var promise;\n var ids = (trans[cacheProp_1] = trans[cacheProp_1] || {});\n if (!prevTruthyAnswer_1(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(function (val) { return (ids[id_1] = val !== false); });\n }\n return promise;\n };\n var criteria = { exiting: viewState.name };\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n }\n ng.module('ui.router.state').directive('uiView', uiView);\n ng.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n\n /** @publicapi @module ng1 */ /** */\n /** @hidden */\n function $ViewScrollProvider() {\n var useAnchorScroll = false;\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function ($anchorScroll, $timeout) {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n return function ($element) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n },\n ];\n }\n ng.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n\n /**\n * Main entry point for angular 1.x build\n * @publicapi @module ng1\n */ /** */\n var index$1 = 'ui.router';\n\n exports.$injector = $injector;\n exports.$q = $q;\n exports.BaseLocationServices = BaseLocationServices;\n exports.BaseUrlRule = BaseUrlRule;\n exports.BrowserLocationConfig = BrowserLocationConfig;\n exports.Glob = Glob;\n exports.HashLocationService = HashLocationService;\n exports.HookBuilder = HookBuilder;\n exports.MemoryLocationConfig = MemoryLocationConfig;\n exports.MemoryLocationService = MemoryLocationService;\n exports.NATIVE_INJECTOR_TOKEN = NATIVE_INJECTOR_TOKEN;\n exports.Ng1ViewConfig = Ng1ViewConfig;\n exports.Param = Param;\n exports.ParamFactory = ParamFactory;\n exports.ParamType = ParamType;\n exports.ParamTypes = ParamTypes;\n exports.PathNode = PathNode;\n exports.PathUtils = PathUtils;\n exports.PushStateLocationService = PushStateLocationService;\n exports.Queue = Queue;\n exports.RegisteredHook = RegisteredHook;\n exports.Rejection = Rejection;\n exports.Resolvable = Resolvable;\n exports.ResolveContext = ResolveContext;\n exports.StateBuilder = StateBuilder;\n exports.StateMatcher = StateMatcher;\n exports.StateObject = StateObject;\n exports.StateParams = StateParams;\n exports.StateProvider = StateProvider;\n exports.StateQueueManager = StateQueueManager;\n exports.StateRegistry = StateRegistry;\n exports.StateService = StateService;\n exports.TargetState = TargetState;\n exports.Trace = Trace;\n exports.Transition = Transition;\n exports.TransitionEventType = TransitionEventType;\n exports.TransitionHook = TransitionHook;\n exports.TransitionService = TransitionService;\n exports.UIRouter = UIRouter;\n exports.UIRouterGlobals = UIRouterGlobals;\n exports.UIRouterPluginBase = UIRouterPluginBase;\n exports.UrlConfig = UrlConfig;\n exports.UrlMatcher = UrlMatcher;\n exports.UrlMatcherFactory = UrlMatcherFactory;\n exports.UrlRouter = UrlRouter;\n exports.UrlRouterProvider = UrlRouterProvider;\n exports.UrlRuleFactory = UrlRuleFactory;\n exports.UrlRules = UrlRules;\n exports.UrlService = UrlService;\n exports.ViewService = ViewService;\n exports._extend = _extend;\n exports._inArray = _inArray;\n exports._pushTo = _pushTo;\n exports._removeFrom = _removeFrom;\n exports.all = all;\n exports.allTrueR = allTrueR;\n exports.ancestors = ancestors;\n exports.and = and;\n exports.any = any;\n exports.anyTrueR = anyTrueR;\n exports.applyPairs = applyPairs;\n exports.arrayTuples = arrayTuples;\n exports.assertFn = assertFn;\n exports.assertMap = assertMap;\n exports.assertPredicate = assertPredicate;\n exports.beforeAfterSubstr = beforeAfterSubstr;\n exports.buildUrl = buildUrl;\n exports.compose = compose;\n exports.copy = copy;\n exports.core = index;\n exports.createProxyFunctions = createProxyFunctions;\n exports.curry = curry;\n exports.default = index$1;\n exports.defaultResolvePolicy = defaultResolvePolicy;\n exports.defaultTransOpts = defaultTransOpts;\n exports.defaults = defaults;\n exports.deregAll = deregAll;\n exports.eq = eq;\n exports.equals = equals;\n exports.extend = extend;\n exports.filter = filter;\n exports.find = find;\n exports.flatten = flatten;\n exports.flattenR = flattenR;\n exports.fnToString = fnToString;\n exports.forEach = forEach;\n exports.fromJson = fromJson;\n exports.functionToString = functionToString;\n exports.getLocals = getLocals;\n exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory;\n exports.getParams = getParams;\n exports.hashLocationPlugin = hashLocationPlugin;\n exports.hostRegex = hostRegex;\n exports.identity = identity;\n exports.inArray = inArray;\n exports.inherit = inherit;\n exports.invoke = invoke;\n exports.is = is;\n exports.isArray = isArray;\n exports.isDate = isDate;\n exports.isDefined = isDefined;\n exports.isFunction = isFunction;\n exports.isInjectable = isInjectable;\n exports.isNull = isNull;\n exports.isNullOrUndefined = isNullOrUndefined;\n exports.isNumber = isNumber;\n exports.isObject = isObject;\n exports.isPromise = isPromise;\n exports.isRegExp = isRegExp;\n exports.isString = isString;\n exports.isUndefined = isUndefined;\n exports.joinNeighborsR = joinNeighborsR;\n exports.kebobString = kebobString;\n exports.keyValsToObjectR = keyValsToObjectR;\n exports.locationPluginFactory = locationPluginFactory;\n exports.makeEvent = makeEvent;\n exports.makeStub = makeStub;\n exports.map = map;\n exports.mapObj = mapObj;\n exports.matchState = matchState;\n exports.maxLength = maxLength;\n exports.memoryLocationPlugin = memoryLocationPlugin;\n exports.mergeR = mergeR;\n exports.ng1ViewsBuilder = ng1ViewsBuilder;\n exports.noop = noop;\n exports.not = not;\n exports.omit = omit;\n exports.or = or;\n exports.padString = padString;\n exports.pairs = pairs;\n exports.parse = parse;\n exports.parseUrl = parseUrl$1;\n exports.pattern = pattern;\n exports.pick = pick;\n exports.pipe = pipe;\n exports.pluck = pluck;\n exports.prop = prop;\n exports.propEq = propEq;\n exports.pushR = pushR;\n exports.pushStateLocationPlugin = pushStateLocationPlugin;\n exports.pushTo = pushTo;\n exports.removeFrom = removeFrom;\n exports.resolvablesBuilder = resolvablesBuilder;\n exports.resolvePolicies = resolvePolicies;\n exports.root = root;\n exports.services = services;\n exports.servicesPlugin = servicesPlugin;\n exports.silenceUncaughtInPromise = silenceUncaughtInPromise;\n exports.silentRejection = silentRejection;\n exports.splitEqual = splitEqual;\n exports.splitHash = splitHash;\n exports.splitOnDelim = splitOnDelim;\n exports.splitQuery = splitQuery;\n exports.stringify = stringify;\n exports.stripLastPathElement = stripLastPathElement;\n exports.tail = tail;\n exports.toJson = toJson;\n exports.trace = trace;\n exports.trimHashVal = trimHashVal;\n exports.uniqR = uniqR;\n exports.unnest = unnest;\n exports.unnestR = unnestR;\n exports.val = val;\n exports.values = values;\n exports.watchDigests = watchDigests;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=angular-ui-router.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/global.js */ \"../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/global.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9AdWlyb3V0ZXIrYW5ndWxhcmpzQDEuMC4yOS9ub2RlX21vZHVsZXMvQHVpcm91dGVyL2FuZ3VsYXJqcy9yZWxlYXNlL2FuZ3VsYXItdWktcm91dGVyLmpzPzljNGUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLElB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gICAgKiBsZXQga2V5cyA9IFsgJ2ZvbycsICdiYXInLCAnYmF6JyBdXG4gICAgICogbGV0IHZhbHVlcyA9IGtleXMubWFwKGFzc2VydE1hcChrZXkgPT4gZGF0YVtrZXldLCBcIktleSBub3QgZm91bmRcIikpO1xuICAgICAqIC8vIHRocm93cyBFcnJvcihcIktleSBub3QgZm91bmRcIilcbiAgICAgKiBgYGBcbiAgICAgKi9cbiAgICB2YXIgYXNzZXJ0TWFwID0gYXNzZXJ0Rm47XG4gICAgZnVuY3Rpb24gYXNzZXJ0Rm4ocHJlZGljYXRlT3JNYXAsIGVyck1zZykge1xuICAgICAgICBpZiAoZXJyTXNnID09PSB2b2lkIDApIHsgZXJyTXNnID0gJ2Fzc2VydCBmYWlsdXJlJzsgfVxuICAgICAgICByZXR1cm4gZnVuY3Rpb24gKG9iaikge1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHByZWRpY2F0ZU9yTWFwKG9iaik7XG4gICAgICAgICAgICBpZiAoIXJlc3VsdCkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihpc0Z1bmN0aW9uKGVyck1zZykgPyBlcnJNc2cob2JqKSA6IGVyck1zZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICB9O1xuICAgIH1cbiAgICAvKipcbiAgICAgKiBMaWtlIF8ucGFpcnM6IEdpdmVuIGFuIG9iamVjdCwgcmV0dXJucyBhbiBhcnJheSBvZiBrZXkvdmFsdWUgcGFpcnNcbiAgICAgKlxuICAgICAqIEBleGFtcGxlXG4gICAgICogYGBgXG4gICAgICpcbiAgICAgKiBwYWlycyh7IGZvbzogXCJGT09cIiwgYmFyOiBcIkJBUiB9KSAvLyBbIFsgXCJmb29cIiwgXCJGT09cIiBdLCBbIFwiYmFyXCI6IFwiQkFSXCIgXSBdXG4gICAgICogYGBgXG4gICAgICovXG4gICAgdmFyIHBhaXJzID0gZnVuY3Rpb24gKG9ia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B7IHJldHVybiBNYXRoLm1pbihhcnIubGVuZ3RoLCBtaW4pOyB9LCA5MDA3MTk5MjU0NzQwOTkxKTsgLy8gYWthIDJeNTMg4oiSIDEgYWthIE51bWJlci5NQVhfU0FGRV9JTlRFR0VSXG4gICAgICAgIHZhciByZXN1bHQgPSBbXTtcbiAgICAgICAgdmFyIF9sb29wXzEgPSBmdW5jdGlvbiAoaSkge1xuICAgICAgICAgICAgLy8gVGhpcyBpcyBhIGhvdCBmdW5jdGlvblxuICAgICAgICAgICAgLy8gVW5yb2xsIHdoZW4gdGhlcmUgYXJlIDEtNCBhcmd1bWVudHNcbiAgICAgICAgICAgIHN3aXRjaCAoYXJncy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFthcmdzWzBdW2ldXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goW2FyZ3NbMF1baV0sIGFyZ3NbMV1baV1dKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChbYXJnc1swXVtpXSwgYXJnc1sxXVtpXSwgYXJnc1syXVtpXV0pO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFthcmdzWzBdW2ldLCBhcmdzWzFdW2ldLCBhcmdzWzJdW2ldLCBhcmdzWzNdW2ldXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKGFyZ3MubWFwKGZ1bmN0aW9uIChhcnJheSkge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kKGRlc3QsIHNyYyk7XG4gICAgfVxuICAgIC8qKiBOYWl2ZSBmb3JFYWNoIGltcGxlbWVudGF0aW9uIHdvcmtzIHdpdGggT2JqZWN0cyBvciBBcnJheXMgKi9cbiAgICBmdW5jdGlvbiBfZm9yRWFjaChvYmosIGNiLCBfdGhpcykge1xuICAgICAgICBpZiAoaXNBcnJheShvYmopKVxuICAgICAgICAgICAgcmV0dXJuIG9iai5mb3JFYWNoKGNiLCBfdGhpcyk7XG4gICAgICAgIE9iamVjdC5rZXlzKG9iaikuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiBjYihvYmpba2V5XSwga2V5KTsgfSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIF9leHRlbmQodG9PYmopIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBhcmd1bWVudHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBvYmogPSBhcmd1bWVudHNbaV07XG4gICAgICAgICAgICBpZiAoIW9iailcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMob2JqKTtcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwga2V5cy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHRvT2JqW2tleXNbal1dID0gb2JqW2tleXNbal1dO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0b09iajtcbiAgICB9XG4gICAgZnVuY3Rpb24gX2VxdWFscyhvMSwgbzIpIHtcbiAgICAgICAgaWYgKG8xID09PSBvMilcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICBpZiAobzEgPT09IG51bGwgfHwgbzIgPT09IG51bGwpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIGlmIChvMSAhPT0gbzEgJiYgbzIgIT09IG8yKVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7IC8vIE5hTiA9PT0gTmFOXG4gICAgICAgIHZhciB0MSA9IHR5cGVvZiBvMSwgdDIgPSB0eXBlb2YgbzI7XG4gICAgICAgIGlmICh0MSAhPT0gdDIgfHwgdDEgIT09ICdvYmplY3QnKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB2YXIgdHVwID0gW28xLCBvMl07XG4gICAgICAgIGlmIChhbGwoaXNBcnJheSkodHVwKSlcbiAgICAgICAgICAgIHJldHVybiBfYXJyYXlzRXEobzEsIG8yKTtcbiAgICAgICAgaWYgKGFsbChpc0RhdGUpKHR1cCkpXG4gICAgICAgICAgICByZXR1cm4gbzEuZ2V0VGltZSgpID09PSBvMi5nZXRUaW1lKCk7XG4gICAgICAgIGlmIChhbGwoaXNSZWdFeHApKHR1cCkpXG4gICAgICAgICAgICByZXR1cm4gbzEudG9TdHJpbmcoKSA9PT0gbzIudG9TdHJpbmcoKTtcbiAgICAgICAgaWYgKGFsbChpc0Z1bmN0aW9uKSh0dXApKVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7IC8vIG1laFxuICAgICAgICB2YXIgcHJlZGljYXRlcyA9IFtpc0Z1bmN0aW9uLCBpc0FycmF5LCBpc0RhdGUsIGlzUmVnRXhwXTtcbiAgICAgICAgaWYgKHByZWRpY2F0ZXMubWFwKGFueSkucmVkdWNlKGZ1bmN0aW9uIChiLCBmbikgeyByZXR1cm4gYiB8fCAhIWZuKHR1cCk7IH0sIGZhbHNlKSlcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgdmFyIGtleXMgPSB7fTtcbiAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOmZvcmluXG4gICAgICAgIGZvciAodmFyIGtleSBpbiBvMSkge1xuICAgICAgICAgICAgaWYgKCFfZXF1YWxzKG8xW2tleV0sIG8yW2tleV0pKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIGtleX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uc3BsaXQoJy4nKVxuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHNlZykge1xuICAgICAgICAgICAgICAgIGlmIChzZWcgPT09ICcqKicpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnKD86fCg/OlxcXFwuW14uXSopKiknO1xuICAgICAgICAgICAgICAgIGlmIChzZWcgPT09ICcqJylcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdcXFxcLlteLl0qJztcbiAgICAgICAgICAgICAgICByZXR1cm4gJ1xcXFwuJyArIHNlZztcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLmpvaW4oJycpO1xuICAgICAgICAgICAgdGhpcy5yZWdleHAgPSBuZXcgUmVnRXhwKCdeJyArIHJlZ2V4cFN0cmluZyArICckJyk7XG4gICAgICAgIH1cbiAgICAgICAgLyoqIFJldHVybnMgdHJ1ZSBpZiB0aGUgc3RyaW5nIGhhcyBnbG9iLWxpa2UgY2hhcmFjdGVycyBpbiBpdCAqL1xuICAgICAgICBHbG9iLmlzID0gZnVuY3Rpb24gKHRleHQpIHtcbiAgICAgICAgICAgIHJldHVybiAhIS9bISwqXSsvLmV4ZWModGV4dCk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBSZXR1cm5zIGEgZ2xvYiBmcm9tIHRoZSBzdHJpbmcsIG9yIG51bGwgaWYgdGhlIHN0cmluZyBpc24ndCBHbG9iLWxpa2UgKi9cbiAgICAgICAgR2xvYi5mcm9tU3RyaW5nID0gZnVuY3Rpb24gKHRleHQpIHtcbiAgICAgICAgICAgIHJldHVybiBHbG9iLmlzKHRleHQpID8gbmV3IEdsb2IodGV4dCkgOiBudWxsO1xuICAgICAgICB9O1xuICAgICAgICBHbG9iLnByb3RvdHlwZS5tYXRjaGVzID0gZnVuY3Rpb24gKG5hbWUpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnJlZ2V4cC50ZXN0KCcuJyArIG5hbWUpO1xuICAgICAgICB9O1xuICAgICA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hcnNlSW50KGssIDEwKTsgfSlcbiAgICAgICAgICAgICAgICAgICAgLmZpbHRlcihmdW5jdGlvbiAoaykgeyByZXR1cm4gIWlzTmFOKGspOyB9KVxuICAgICAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChrZXkpIHsgcmV0dXJuIGV4cG9ydHMuQ2F0ZWdvcnlba2V5XTsgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXRlZ29yaWVzLm1hcChub3JtYWxpemVkQ2F0KS5mb3JFYWNoKGZ1bmN0aW9uIChjYXRlZ29yeSkgeyByZXR1cm4gKF90aGlzLl9lbmFibGVkW2NhdGVnb3J5XSA9IGVuYWJsZWQpOyB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmVuYWJsZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBjYXRlZ29yaWVzID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgIGNhdGVnb3JpZXNbX2ldID0gYXJndW1lbnRzW19pXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX3NldCh0cnVlLCBjYXRlZ29yaWVzKTtcbiAgICAgICAgfTtcbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmRpc2FibGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgY2F0ZWdvcmllcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgICAgICBjYXRlZ29yaWVzW19pXSA9IGFyZ3VtZW50c1tfaV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLl9zZXQoZmFsc2UsIGNhdGVnb3JpZXMpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0cmlldmVzIHRoZSBlbmFibGVkIHN0YXRldXMgb2YgYSBbW0NhdGVnb3J5XV1cbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogdHJhY2UuZW5hYmxlZChcIlZJRVdDT05GSUdcIik7IC8vIHRydWUgb3IgZmFsc2VcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm5zIGJvb2xlYW4gdHJ1ZSBpZiB0aGUgY2F0ZWdvcnkgaXMgZW5hYmxlZFxuICAgICAgICAgKi9cbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmVuYWJsZWQgPSBmdW5jdGlvbiAoY2F0ZWdvcnkpIHtcbiAgICAgICAgICAgIHJldHVybiAhIXRoaXMuX2VuYWJsZWRbbm9ybWFsaXplZENhdChjYXRlZ29yeSldO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsIGNhbGxlZCBieSB1aS1yb3V0ZXIgY29kZSAqL1xuICAgICAgICBUcmFjZS5wcm90b3R5cGUudHJhY2VUcmFuc2l0aW9uU3RhcnQgPSBmdW5jdGlvbiAodHJhbnMpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5lbmFibGVkKGV4cG9ydHMuQ2F0ZWdvcnkuVFJBTlNJVElPTikpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgc2FmZUNvbnNvbGUubG9nKHRyYW5zTGJsKHRyYW5zKSArIFwiOiBTdGFydGVkICAtPiBcIiArIHN0cmluZ2lmeSh0cmFucykpO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsIGNhbGxlZCBieSB1aS1yb3V0ZXIgY29kZSAqL1xuICAgICAgICBUcmFjZS5wcm90b3R5cGUudHJhY2VUcmFuc2l0aW9uSWdub3JlZCA9IGZ1bmN0aW9uICh0cmFucykge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmVuYWJsZWQoZXhwb3J0cy5DYXRlZ29ye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dGVnb3J5LlVJVklFVykpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgdGhpcy50cmFjZVVJVmlld0V2ZW50KCdGaWxsJywgdmlld0RhdGEsIFwiIHdpdGg6IFwiICsgbWF4TGVuZ3RoKDIwMCwgaHRtbCkpO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsIGNhbGxlZCBieSB1aS1yb3V0ZXIgY29kZSAqL1xuICAgICAgICBUcmFjZS5wcm90b3R5cGUudHJhY2VWaWV3U3luYyA9IGZ1bmN0aW9uIChwYWlycykge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmVuYWJsZWQoZXhwb3J0cy5DYXRlZ29yeS5WSUVXQ09ORklHKSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB2YXIgdWl2aGVhZGVyID0gJ3VpdmlldyBjb21wb25lbnQgZnFuJztcbiAgICAgICAgICAgIHZhciBjZmdoZWFkZXIgPSAndmlldyBjb25maWcgc3RhdGUgKHZpZXcgbmFtZSknO1xuICAgICAgICAgICAgdmFyIG1hcHBpbmcgPSBwYWlyc1xuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgdmFyIF9iO1xuICAgICAgICAgICAgICAgIHZhciB1aVZpZXcgPSBfYS51aVZpZXcsIHZpZXdDb25maWcgPSBfYS52aWV3Q29uZmlnO1xuICAgICAgICAgICAgICAgIHZhciB1aXYgPSB1aVZpZXcgJiYgdWlWaWV3LmZxbjtcbiAgICAgICAgICAgICAgICB2YXIgY2ZnID0gdmlld0NvbmZpZyAmJiB2aWV3Q29uZmlnLnZpZXdEZWNsLiRjb250ZXh0Lm5hbWUgKyBcIjogKFwiICsgdmlld0NvbmZpZy52aWV3RGVjbC4kbmFtZSArIFwiKVwiO1xuICAgICAgICAgICAgICAgIHJldHVybiBfYiA9IHt9LCBfYlt1aXZoZWFkZXJdID0gdWl2LCBfYltjZmdoZW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AgIHRoaXMucGF0dGVybiA9IC8uKi87XG4gICAgICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgICAgIHRoaXMuaW5oZXJpdCA9IHRydWU7XG4gICAgICAgICAgICBleHRlbmQodGhpcywgZGVmKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBjb25zaWRlciB0aGVzZSBmb3VyIG1ldGhvZHMgdG8gYmUgXCJhYnN0cmFjdCBtZXRob2RzXCIgdGhhdCBzaG91bGQgYmUgb3ZlcnJpZGRlblxuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgUGFyYW1UeXBlLnByb3RvdHlwZS5pcyA9IGZ1bmN0aW9uICh2YWwsIGtleSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBQYXJhbVR5cGUucHJvdG90eXBlLmVuY29kZSA9IGZ1bmN0aW9uICh2YWwsIGtleSkge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIEBpbmhlcml0ZG9jICovXG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUuZGVjb2RlID0gZnVuY3Rpb24gKHZhbCwga2V5KSB7XG4gICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgUGFyYW1UeXBlLnByb3RvdHlwZS5lcXVhbHMgPSBmdW5jdGlvbiAoYSwgYikge1xuICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnRyaXBsZS1lcXVhbHNcbiAgICAgICAgICAgIHJldHVybiBhID09IGI7XG4gICAgICAgIH07XG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUuJHN1YlBhdHRlcm4gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgc3Vi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VmaW5lZCBmb3IgZW1wdHkgYXJyYXkuXG4gICAgICAgIGZ1bmN0aW9uIGFycmF5VW53cmFwKHZhbCkge1xuICAgICAgICAgICAgc3dpdGNoICh2YWwubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1vZGUgPT09ICdhdXRvJyA/IHZhbFswXSA6IHZhbDtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIFdyYXBzIHR5cGUgKC5pcy8uZW5jb2RlLy5kZWNvZGUpIGZ1bmN0aW9ucyB0byBvcGVyYXRlIG9uIGVhY2ggdmFsdWUgb2YgYW4gYXJyYXlcbiAgICAgICAgZnVuY3Rpb24gYXJyYXlIYW5kbGVyKGNhbGxiYWNrLCBhbGxUcnV0aHlNb2RlKSB7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gaGFuZGxlQXJyYXkodmFsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzQXJyYXkodmFsKSAmJiB2YWwubGVuZ3RoID09PSAwKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICAgICAgICAgIHZhciBhcnIgPSBhcnJheVdyYXAodmFsKTtcbiAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gbWFwKGFyciwgY2FsbGJhY2spO1xuICAgICAgICAgICAgICAgIHJldHVybiBhbGxUcnV0aHlNb2RlID09PSB0cnVlID8gZmlsdGVyKHJlc3VsdCwgZnVuY3Rpb24gKHgpIHsgcmV0dXJuICF4OyB9KS5sZW5ndGggPT09IDAgOiBhcnJheVVud3JhcChyZXN1bHQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICAvLyBXcmFwcyB0eXBlICguZXF1YWxzKSBmdW5jdGlvbnMgdG8gb3BlcmF0ZSBvbiBlYWNoIHZhbHVlIG9mIGFuIGFycmF5XG4gICAgICAgIGZ1bmN0aW9uIGFycmF5RXF1YWxzSGFuZGxlcihjYWxsYmFjaykge1xuICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIGhhbmRsZUFycmF5KHZhbDEsIHZhbDIpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGVmdCA9IGFycmF5V3JhcCh2YWwxKSwgcmlnaHQgPSBhcnJheVdyYXAodmFsMik7XG4gICAgICAgICAgICAgICAgaWYgKGxlZnQubGVuZ3RoICE9PSByaWdodC5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlZnQubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjYWxsYmFjayhsZWZ0W2ldLCByaWdodFtpXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBbJ2VuY29kZScsICdkZWNvZGUnLCAnZXF1YWxzJywgJyRub3JtYWxpemUnXS5mb3JFYWNoKGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICB2YXIgcGFyYW1UeXBlRm4gPSB0eXBlW25hbWVdLmJpbmQodHlwZSk7XG4gICAgICAgICAgICB2YXIgd3JhcHBlckZuID0gbmFtZSA9PT0gJ2VxdWFscycgPyBhcnJheUVxdWFsc0hhbmRsZXIgOiBhcnJheUhhbmRsZXI7XG4gICAgICAgICAgICBfdGhpc1tuYW1lXSA9IHdyYXBwZXJGbihwYXJhbVR5cGVGbik7XG4gICAgICAgIH0pO1xuICAgICAgICBleHRlbmQodGhpcywge1xuICAgICAgICAgICAgZHluYW1pYzogdHlwZS5keW5hbWljLFxuICAgICAgICAgICAgbmFtZTogdHlwZS5uYW1lLFxuICAgICAgICAgICAgcGF0dGVybjogdHlwZS5wYXR0ZXJuLFxuICAgICAgICAgICAgaW5oZXJpdDogdHlwZS5pbmhlcml0LFxuICAgICAgICAgICAgcmF3OiB0eXBlLnJhdyxcbiAgICAgICAgICAgIGlzOiBhcnJheUhhbmRsZXIodHlwZS5pcy5iaW5kKHR5cGUpLCB0cnVlKSxcbiAgICAgICAgICAgICRhcnJheU1vZGU6IG1vZGUsXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHZhciBoYXNPd24gPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O1xuICAgIHZhciBpc1Nob3J0aGFuZCA9IGZ1bmN0aW9uIChjZmcpIHtcbiAgICAgICAgcmV0dXJuIFsndmFsdWUnLCAndHlwZScsICdzcXVhc2gnLCAnYXJyYXknLCAnZHluYW1pYyddLmZpbHRlcihoYXNPd24uYmluZChjZmcgfHwge30pKS5sZW5ndGggPT09IDA7XG4gICAgfTtcblxuICAgIChmdW5jdGlvbiAoRGVmVHlwZSkge1xuICAgICAgICBEZWZUeXBlW0RlZlR5cGVbXCJQQVRIXCJdID0gMF0gPSBcIlBBVEhcIjtcbiAgICAgICAgRGVmVHlwZVtEZWZUeXBlW1wiU0VBUkNIXCJdID0gMV0gPSBcIlNFQVJDSFwiO1xuICAgICAgICBEZWZUeXBlW0RlZlR5cGVbXCJDT05GSUdcIl0gPSAyXSA9IFwiQ09ORklHXCI7XG4gICAgfSkoZXhwb3J0cy5EZWZUeXBlIHx8IChleHBvcnRzLkRlZlR5cGUgPSB7fSkpO1xuICAgIGZ1bmN0aW9uIGdldFBhcmFtRGVjbGFyYXRpb24ocGFyYW1OYW1lLCBsb2NhdGlvbiwgc3RhdGUpIHtcbiAgICAgICAgdmFyIG5vUmVsb2FkT25T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R5cGVzKSB7XG4gICAgICAgIGlmIChjZmcudHlwZSAmJiB1cmxUeXBlICYmIHVybFR5cGUubmFtZSAhPT0gJ3N0cmluZycpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJQYXJhbSAnXCIgKyBpZCArIFwiJyBoYXMgdHdvIHR5cGUgY29uZmlndXJhdGlvbnMuXCIpO1xuICAgICAgICBpZiAoY2ZnLnR5cGUgJiYgdXJsVHlwZSAmJiB1cmxUeXBlLm5hbWUgPT09ICdzdHJpbmcnICYmIHBhcmFtVHlwZXMudHlwZShjZmcudHlwZSkpXG4gICAgICAgICAgICByZXR1cm4gcGFyYW1UeXBlcy50eXBlKGNmZy50eXBlKTtcbiAgICAgICAgaWYgKHVybFR5cGUpXG4gICAgICAgICAgICByZXR1cm4gdXJsVHlwZTtcbiAgICAgICAgaWYgKCFjZmcudHlwZSkge1xuICAgICAgICAgICAgdmFyIHR5cGUgPSBsb2NhdGlvbiA9PT0gZXhwb3J0cy5EZWZUeXBlLkNPTkZJR1xuICAgICAgICAgICAgICAgID8gJ2FueSdcbiAgICAgICAgICAgICAgICA6IGxvY2F0aW9uID09PSBleHBvcnRzLkRlZlR5cGUuUEFUSFxuICAgICAgICAgICAgICAgICAgICA/ICdwYXRoJ1xuICAgICAgICAgICAgICAgICAgICA6IGxvY2F0aW9uID09PSBleHBvcnRzLkRlZlR5cGUuU0VBUkNIXG4gICAgICAgICAgICAgICAgICAgICAgICA/ICdxdWVyeSdcbiAgICAgICAgICAgICAgICAgICAgICAgIDogJ3N0cmluZyc7XG4gICAgICAgICAgICByZXR1cm4gcGFyYW1UeXBlcy50eXBlKHR5cGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjZmcudHlwZSBpbnN0YW5jZW9mIFBhcmFtVHlwZSA/IGNmZy50eXBlIDogcGFyYW1UeXBlcy50eXBlKGNmZy50eXBlKTtcbiAgICB9XG4gICAgLyoqIHJldHVybnMgZmFsc2UsIHRydWUsIG9yIHRo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IHRocm93IG5ldyBFcnJvcignSW5qZWN0YWJsZSBmdW5jdGlvbnMgY2Fubm90IGJlIGNhbGxlZCBhdCBjb25maWd1cmF0aW9uIHRpbWUnKTtcbiAgICAgICAgICAgICAgICB2YXIgZGVmYXVsdFZhbHVlID0gc2VydmljZXMuJGluamVjdG9yLmludm9rZShfdGhpcy5jb25maWcuJCRmbik7XG4gICAgICAgICAgICAgICAgaWYgKGRlZmF1bHRWYWx1ZSAhPT0gbnVsbCAmJiBkZWZhdWx0VmFsdWUgIT09IHVuZGVmaW5lZCAmJiAhX3RoaXMudHlwZS5pcyhkZWZhdWx0VmFsdWUpKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJEZWZhdWx0IHZhbHVlIChcIiArIGRlZmF1bHRWYWx1ZSArIFwiKSBmb3IgcGFyYW1ldGVyICdcIiArIF90aGlzLmlkICsgXCInIGlzIG5vdCBhbiBpbnN0YW5jZSBvZiBQYXJhbVR5cGUgKFwiICsgX3RoaXMudHlwZS5uYW1lICsgXCIpXCIpO1xuICAgICAgICAgICAgICAgIGlmIChfdGhpcy5jb25maWcuJCRmblsnX19jYWNoZWFibGUnXSkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5fZGVmYXVsdFZhbHVlQ2FjaGUgPSB7IGRlZmF1bHRWYWx1ZTogZGVmYXVsdFZhbHVlIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBkZWZhdWx0VmFsdWU7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIHJlcGxhY2VTcGVjaWFsVmFsdWVzID0gZnVuY3Rpb24gKHZhbCkge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIF9pID0gMCwgX2EgPSBfdGhpcy5yZXBsYWNlOyBfaSA8IF9hLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHVwbGUgPSBfYVtfaV07XG4gICAgICAgICAgICAgICAgICAg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2Jvb2xdXVxuICAgICAqIC0gW1tkYXRlXV1cbiAgICAgKiAtIFtbanNvbl1dXG4gICAgICogLSBbW2FueV1dXG4gICAgICpcbiAgICAgKiBUbyByZWdpc3RlciBjdXN0b20gcGFyYW1ldGVyIHR5cGVzLCB1c2UgW1tVcmxDb25maWcudHlwZV1dLCBpLmUuLFxuICAgICAqXG4gICAgICogYGBganNcbiAgICAgKiByb3V0ZXIudXJsU2VydmljZS5jb25maWcudHlwZShjdXN0b21UeXBlKVxuICAgICAqIGBgYFxuICAgICAqL1xuICAgIHZhciBQYXJhbVR5cGVzID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBQYXJhbVR5cGVzKCkge1xuICAgICAgICAgICAgdGhpcy5lbnF1ZXVlID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMudHlwZVF1ZXVlID0gW107XG4gICAgICAgICAgICB0aGlzLmRlZmF1bHRUeXBlcyA9IHBpY2soUGFyYW1UeXBlcy5wcm90b3R5cGUsIFtcbiAgICAgICAgICAgICAgICAnaGFzaCcsXG4gICAgICAgICAgICAgICAgJ3N0cmluZycsXG4gICAgICAgICAgICAgICAgJ3F1ZXJ5JyxcbiAgICAgICAgICAgICAgICAncGF0aCcsXG4gICAgICAgICAgICAgICAgJ2ludCcsXG4gICAgICAgICAgICAgICAgJ2Jvb2wnLFxuICAgICAgICAgICAgICAgICdkYXRlJyxcbiAgICAgICAgICAgICAgICAnanNvbicsXG4gICAgICAgICAgICAgICAgJ2FueScsXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIC8vIFJlZ2lzdGVyIGRlZmF1bHQgdHlwZXMuIFN0b3JlIHRoZW0gaW4gdGhlIHByb3RvdHlwZSBvZiB0aGlzLnR5cGVzLlxuICAgICAgICAgICAgdmFyIG1ha2VUeXBlID0gZnVuY3Rpb24gKGRlZmluaXRpb24sIG5hbWUpIHsgcmV0dXJuIG5ldyBQYXJhbVR5cGU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AgICAgICAgICAgICAgICBlbmNvZGU6IHZhbFRvU3RyaW5nLFxuICAgICAgICAgICAgICAgIGRlY29kZTogdmFsVG9TdHJpbmcsXG4gICAgICAgICAgICAgICAgaXM6IGlzKFN0cmluZyksXG4gICAgICAgICAgICAgICAgcGF0dGVybjogLy4qLyxcbiAgICAgICAgICAgICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6dHJpcGxlLWVxdWFsc1xuICAgICAgICAgICAgICAgIGVxdWFsczogZnVuY3Rpb24gKGEsIGIpIHsgcmV0dXJuIGEgPT0gYjsgfSxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gZXh0ZW5kKHt9LCBkZWZhdWx0VHlwZUJhc2UsIGRlZik7XG4gICAgICAgIH07XG4gICAgICAgIC8vIERlZmF1bHQgUGFyYW1ldGVyIFR5cGUgRGVmaW5pdGlvbnNcbiAgICAgICAgZXh0ZW5kKFBhcmFtVHlwZXMucHJvdG90eXBlLCB7XG4gICAgICAgICAgICBzdHJpbmc6IG1ha2VEZWZhdWx0VHlwZSh7fSksXG4gICAgICAgICAgICBwYXRoOiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIHBhdHRlcm46IC9bXi9dKi8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHF1ZXJ5OiBtYWtlRGVmYXVsdFR5cGUoe30pLFxuICAgICAgICAgICAgaGFzaDogbWFrZURlZmF1bHRUeXBlKHtcbiAgICAgICAgICAgICAgICBpbmhlcml0OiBmYWxzZSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgaW50OiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGRlY29kZTogZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gcGFyc2VJbnQodmFsLCAxMCk7IH0sXG4gICAgICAgICAgICAgICAgaXM6IGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFpc051bGxPclVuZGVmaW5lZCh2YWwpICYmIHRoaXMuZGVjb2RlKHZhbC50b1N0cmluZygpKSA9PT0gdmFsO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcGF0dGVybjogLy0/XFxkKy8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIGJvb2w6IG1ha2VEZWZhdWx0VHlwZSh7XG4gICAgICAgICAgICAgICAgZW5jb2RlOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiAodmFsICYmIDEpIHx8IDA7IH0sXG4gICAgICAgICAgICAgICAgZGVjb2RlOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiBwYXJzZUludCh2YWwsIDEwKSAhPT0gMDsgfSxcbiAgICAgICAgICAgICAgICBpczogaXMoQm9vbGVhbiksXG4gICAgICAgICAgICAgICAgcGF0dGVybjogLzB8MS8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIGRhdGU6IG1ha2VEZWZhdWx0VHlwZSh7XG4gICAgICAgICAgICAgICAgZW5jb2RlOiBmdW5jdGlvbiAodmFsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAhdGhpcy5pcyh2YWwpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBbdmFsLmdldEZ1bGxZZWFyKCksICgnMCcgKyAodmFsLmdldE1vbnRoKCkgKyAxKSkuc2xpY2UoLTIpLCAoJzAnICsgdmFsLmdldERhdGUoKSkuc2xpY2UoLTIpXS5qb2luKCctJyk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBkZWNvZGU6IGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaXModmFsKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IHRoaXMuY2FwdHVyZS5leGVjKHZhbCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXRjaCA/IG5ldyBEYXRlKG1hdGNoWzFdLCBtYXRjaFsyXSAtIDEsIG1hdGNoWzNdKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGlzOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiB2YWwgaW5zdGFuY2VvZiBEYXRlICYmICFpc05hTih2YWwudmFsdWVPZigpKTsgfSxcbiAgICAgICAgICAgICAgICBlcXVhbHM6IGZ1bmN0aW9uIChsLCByKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbJ2dldEZ1bGxZZWFyJywgJ2dldE1vbnRoJywgJ2dldERhdGUnXS5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgZm4pIHsgcmV0dXJuIGFjYyAmJiBsW2ZuXSgpID09PSByW2ZuXSgpOyB9LCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHBhdHRlcm46IC9bMC05XXs0fS0oPzowWzEtOV18MVswLTJdKS0oPzowWzEtOV18WzEtMl1bMC05XXwzWzAtMV0pLyxcbiAgICAgICAgICAgICAgICBjYXB0dXJlOiAvKFswLTldezR9KS0oMFsxLTldfDFbMC0yXSktKDBbMS05XXxbMS0yXVswLTldfDNbMC0xXSkvLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBqc29uOiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGVuY29kZTogdG9Kc29uLFxuICAgICAgICAgICAgICAgIGRlY29kZTogZnJvbUpzb24sXG4gICAgICAgICAgICAgICAgaXM6IGlzKE9iamVjdCksXG4gICAgICAgICAgICAgICAgZXF1YWxzOiBlcXVhbHMsXG4gICAgICAgICAgICAgICAgcGF0dGVybjogL1teL10qLyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgLy8gZG9lcyBub3QgZW5jb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SBjdXJyZW50IHN0YXRlLlxuICAgICAgICAgKiBAcGFyYW0ge09iamVjdH0gJHRvIEludGVybmFsIGRlZmluaXRpb24gb2Ygb2JqZWN0IHJlcHJlc2VudGluZyBzdGF0ZSB0byB0cmFuc2l0aW9uIHRvLlxuICAgICAgICAgKi9cbiAgICAgICAgU3RhdGVQYXJhbXMucHJvdG90eXBlLiRpbmhlcml0ID0gZnVuY3Rpb24gKG5ld1BhcmFtcywgJGN1cnJlbnQsICR0bykge1xuICAgICAgICAgICAgdmFyIHBhcmVudFBhcmFtcztcbiAgICAgICAgICAgIHZhciBwYXJlbnRzID0gYW5jZXN0b3JzKCRjdXJyZW50LCAkdG8pLCBpbmhlcml0ZWQgPSB7fSwgaW5oZXJpdExpc3QgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gcGFyZW50cykge1xuICAgICAgICAgICAgICAgIGlmICghcGFyZW50c1tpXSB8fCAhcGFyZW50c1tpXS5wYXJhbXMpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIHBhcmVudFBhcmFtcyA9IE9iamVjdC5rZXlzKHBhcmVudHNbaV0ucGFyYW1zKTtcbiAgICAgICAgICAgICAgICBpZiAoIXBhcmVudFBhcmFtcy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogaW4gcGFyZW50UGFyYW1zKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmhlcml0TGlzdC5pbmRleE9mKHBhcmVudFBhcmFtc1tqXSkgPj0gMClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICBpbmhlcml0TGlzdC5wdXNoKHBhcmVudFBhcmFtc1tqXSk7XG4gICAgICAgICAgICAgICAgICAgIGluaGVyaXRlZFtwYXJlbnRQYXJhbXNbal1dID0gdGhpc1twYXJlbnRQYXJhbXN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AgICAgICAgIHJldHVybiBfdGhpcy5kYXRhO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8vIFNldHMgdGhlIHByb21pc2UgcHJvcGVydHkgZmlyc3QsIHRoZW4gZ2V0c1Jlc29sdmFibGVEZXBlbmRlbmNpZXMgaW4gdGhlIGNvbnRleHQgb2YgdGhlIHByb21pc2UgY2hhaW4uIEFsd2F5cyB3YWl0cyBvbmUgdGljay5cbiAgICAgICAgICAgIHJldHVybiAodGhpcy5wcm9taXNlID0gJHFcbiAgICAgICAgICAgICAgICAud2hlbigpXG4gICAgICAgICAgICAgICAgLnRoZW4oZ2V0UmVzb2x2YWJsZURlcGVuZGVuY2llcylcbiAgICAgICAgICAgICAgICAudGhlbihpbnZva2VSZXNvbHZlRm4pXG4gICAgICAgICAgICAgICAgLnRoZW4oY3VzdG9tQXN5bmNQb2xpY3kpXG4gICAgICAgICAgICAgICAgLnRoZW4oYXBwbHlSZXNvbHZlZFZhbHVlKSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXRzIGEgcHJvbWlzZSBmb3IgdGhpcyBSZXNvbHZhYmxlJ3MgZGF0YS5cbiAgICAgICAgICpcbiAgICAgICAgICogRmV0Y2hlcyB0aGUgZGF0YSBhbmQgcmV0dXJucyBhIHByb21pc2UuXG4gICAgICAgICAqIFJldHVybnMgdGhlIGV4aXN0aW5nIHByb21pc2UgaWYgaXQgaGFzIGFscmVhZHkgYmVlbiBmZXRjaGVkIG9uY2UuXG4gICAgICAgICAqL1xuICAgICAgICBSZXNvbHZhYmxlLnByb3RvdHlwZS5nZXQgPSBmdW5jdGlvbiAocmVzb2x2ZUNvbnRleHQsIHRyYW5zKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wcm9taXNlIHx8IHRoaXMucmVzb2x2ZShyZXNvbHZlQ29udGV4dCwgdHJhbnMpO1xuICAgICAgICB9O1xuICAgICAgICBSZXNvbHZhYmxlLnByb3RvdHlwZS50b1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N0aW9uIChhY2MsIG5vZGUpIHtcbiAgICAgICAgICAgICAgICB2YXIgbm9kZVJlc29sdmFibGVzID0gbm9kZS5yZXNvbHZhYmxlcy5maWx0ZXIobWF0Y2hlc1BvbGljeShtYXRjaGVkV2hlbnMsICd3aGVuJykpO1xuICAgICAgICAgICAgICAgIHZhciBub3dhaXQgPSBub2RlUmVzb2x2YWJsZXMuZmlsdGVyKG1hdGNoZXNQb2xpY3koWydOT1dBSVQnXSwgJ2FzeW5jJykpO1xuICAgICAgICAgICAgICAgIHZhciB3YWl0ID0gbm9kZVJlc29sdmFibGVzLmZpbHRlcihub3QobWF0Y2hlc1BvbGljeShbJ05PV0FJVCddLCAnYXN5bmMnKSkpO1xuICAgICAgICAgICAgICAgIC8vIEZvciB0aGUgbWF0Y2hpbmcgUmVzb2x2YWJsZXMsIHN0YXJ0IHRoZWlyIGFzeW5jIGZldGNoIHByb2Nlc3MuXG4gICAgICAgICAgICAgICAgdmFyIHN1YkNvbnRleHQgPSBfdGhpcy5zdWJDb250ZXh0KG5vZGUuc3RhdGUpO1xuICAgICAgICAgICAgICAgIHZhciBnZXRSZXN1bHQgPSBmdW5jdGlvbiAocikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gclxuICAgICAgICAgICAgICAgICAgICAgICAgLmdldChzdWJDb250ZXh0LCB0cmFucylcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJldHVybiBhIHR1cGxlIHRoYXQgaW5jbHVkZXMgdGhlIFJlc29sdmFibGUncyB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKHZhbHVlKSB7IHJldHVybiAoeyB0b2tlbjogci50b2tlbiwgdmFsdWU6IHZhbHVlIH0pOyB9KTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG5vd2FpdC5mb3JFYWNoKGdldFJlc3VsdCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjYy5jb25jYXQod2FpdC5tYXAoZ2V0UmVzdWx0KSk7XG4gICAgICAgICAgICB9LCBbXSk7XG4gICAgICAgICAgICAvLyBXYWl0IGZvciBhbGwgdGhlIFwiV0FJVFwiIHJlc29sdmFibGVzXG4gICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEuYWxsKHByb21pc2VzKTtcbiAgICAgICAgfTtcbiAgICAgICAgUmVzb2x2ZUNvbnRleHQucHJvdG90eXBlLmluamVjdG9yID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2luamVjdG9yIHx8ICh0aGlzLl9pbmplY3RvciA9IG5ldyBVSUluamVjdG9ySW1wbCh0aGlzKSk7XG4gICAgICAgIH07XG4gICAgICAgIFJlc29sdmVDb250ZXh0LnByb3RvdHlwZS5maW5kTm9kZSA9IGZ1bmN0aW9uIChyZXNvbHZhYmxlKSB7XG4gICAgICAgICAgICByZXR1cm4gZmluZCh0aGlzLl9wYXRoLCBmdW5jdGlvbiAobm9kZSkgeyByZXR1cm4gaW5BcnJheShub2RlLnJlc29sdmFibGVzLCByZXNvbHZhYmxlKTsgfSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXRzIHRoZSBhc3luYyBkZXBlbmRlbmNpZXMgb2YgYSBSZXNvbHZhYmxlXG4gICAgICAgICAqXG4gICAgICAgICAqIEdpdmVuIGEgUmVzb2x2YWJsZSwgcmV0dXJucyBpdHMgZGVwZW5kZW5jaWVzIGFzIGEgUmVzb2x2YWJsZVtdXG4gICAgICAgICAqL1xuICAgICAgICBSZXNvbHZlQ29udGV4dC5wcm90b3R5cGUuZ2V0RGVwZW5kZW5jaWVzID0gZnVuY3Rpb24gKHJlc29sdmFibGUpIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICB2YXIgbm9kZSA9IHRoaXMuZmluZE5vZGUocmVzb2x2YWJsZSk7XG4gICAgICAgICAgICAvLyBGaW5kIHdoaWNoIG90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3RoaXMuaW5qZWN0b3IoKS5nZXROYXRpdmUodG9rZW4pO1xuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChmcm9tSW5qZWN0b3IpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ291bGQgbm90IGZpbmQgRGVwZW5kZW5jeSBJbmplY3Rpb24gdG9rZW46ICcgKyBzdHJpbmdpZnkodG9rZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBSZXNvbHZhYmxlKHRva2VuLCBmdW5jdGlvbiAoKSB7IHJldHVybiBmcm9tSW5qZWN0b3I7IH0sIFtdLCBmcm9tSW5qZWN0b3IpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmRlcHMubWFwKGdldERlcGVuZGVuY3kpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gUmVzb2x2ZUNvbnRleHQ7XG4gICAgfSgpKTtcbiAgICAvKiogQGludGVybmFsICovXG4gICAgdmFyIFVJSW5qZWN0b3JJbXBsID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBVSUluamVjdG9ySW1wbChjb250ZXh0KSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSBjb250ZXh0O1xuICAgICAgICAgICAgdGhpcy5uYXRpdmUgPSB0aGlzLmdldChOQVRJVkVfSU5KRUNUT1JfVE9LRU4pIHx8IHNlcnZpY2VzLiRpbmplY3RvcjtcbiAgICAgICAgfVxuICAgICAgICBVSUluamVjdG9ySW1wbC5wcm90b3R5cGUuZ2V0ID0gZnVuY3Rpb24gKHRva2VuKSB7XG4gICAgICAgICAgICB2YXIgcmVzb2x2YWJsZSA9IHRoaXMuY29udGV4dC5nZXRSZXNvbHZhYmxlKHRva2VuKTtcbiAgICAgICAgICAgIGlmIChyZXNvbHZhYmxlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY29udGV4dC5nZXRQb2xpY3kocmVzb2x2YWJsZSkuYXN5bmMgPT09ICdOT1dBSVQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmdldCh0aGlzLmNvbnRleHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIXJlc29sdmFibGUucmVzb2x2ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdSZXNvbHZhYmxlIGFzeW5jIC5nZXQoKSBub3QgY29tcGxldGU6JyArIHN0cmluZ2lmeShyZXNvbHZhYmxlLnRva2VuKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5nZXROYXRpdmUodG9rZW4pO1xuICAgICAgICB9O1xuICAgICAgICBVSUluamVjdG9ySW1wbC5wcm90b3R5cGUuZ2V0QXN5bmMgPSBmdW5jdGlvbiAodG9rZW4pIHtcbiAgICAgICAgICAgIHZhciByZXNvbHZhYmxlID0gdGhpcy5jb250ZXh0LmdldFJlc29sdmFibGUodG9rZW4pO1xuICAgICAgICAgICAgaWYgKHJlc29sdmFibGUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmFibGUuZ2V0KHRoaXMuY29udGV4dCk7XG4gICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbih0aGlzLm5hdGl2ZS5nZXQodG9rZW4pKTtcbiAgICAgICAgfTtcbiAgICAgICAgVUlJbmplY3RvckltcGwucHJvdG90eXBlLmdldE5hdGl2ZSA9IGZ1bmN0aW9uICh0b2tlbikge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMubmF0aXZlICYmIHRoaXMubmF0aXZlLmdldCh0b2tlbik7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybi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mVydCByZXNvbHZlOiB7fSBhbmQgcmVzb2x2ZVBvbGljeToge30gb2JqZWN0cyB0byBhbiBhcnJheSBvZiB0dXBsZXMgKi9cbiAgICAgICAgdmFyIG9iamVjdHMyVHVwbGVzID0gZnVuY3Rpb24gKHJlc29sdmVPYmosIHJlc29sdmVQb2xpY2llcykge1xuICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKHJlc29sdmVPYmogfHwge30pLm1hcChmdW5jdGlvbiAodG9rZW4pIHsgcmV0dXJuICh7XG4gICAgICAgICAgICAgICAgdG9rZW46IHRva2VuLFxuICAgICAgICAgICAgICAgIHZhbDogcmVzb2x2ZU9ialt0b2tlbl0sXG4gICAgICAgICAgICAgICAgZGVwczogdW5kZWZpbmVkLFxuICAgICAgICAgICAgICAgIHBvbGljeTogcmVzb2x2ZVBvbGljaWVzW3Rva2VuXSxcbiAgICAgICAgICAgIH0pOyB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIGZldGNoIERJIGFubm90YXRpb25zIGZyb20gYSBmdW5jdGlvbiBvciBuZzEtc3R5bGUgYXJyYXkgKi9cbiAgICAgICAgdmFyIGFubm90YXRlID0gZnVuY3Rpb24gKGZuKSB7XG4gICAgICAgICAgICB2YXIgJGluamVjdG9yID0gc2VydmljZXMuJGluamVjdG9yO1xuICAgICAgICAgICAgLy8gbmcxIGRvZXNuJ3QgaGF2ZSBhbiAkaW5qZWN0b3IgdW50aWwgcnVudGltZS5cbiAgICAgICAgICAgIC8vIElmIHRoZSAkaW5qZWN0b3IgZG9lc24ndCBleGlzdCwgdXNlIFwiZGVmZXJyZWRcIiBsaXRlcmFsIGFzIGFcbiAgICAgICAgICAgIC8vIG1hcmtlciBpbmRpY2F0aW5nIHRoZXkgc2hvdWxkIGJlIGFubm90YXRlZCB3aGVuIHJ1bnRpbWUgc3RhcnRzXG4gICAgICAgICAgICByZXR1cm4gZm5bJyRpbmplY3QnXSB8fCAoJGluamVjdG9yICYmICRpbmplY3Rvci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VpbGRlcnNbbmFtZV0uc3BsaWNlKGJ1aWxkZXJzW25hbWVdLmluZGV4T2YoZm4sIDEpKSAmJiBudWxsOyB9O1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQnVpbGRzIGFsbCBvZiB0aGUgcHJvcGVydGllcyBvbiBhbiBlc3NlbnRpYWxseSBibGFuayBTdGF0ZSBvYmplY3QsIHJldHVybmluZyBhIFN0YXRlIG9iamVjdCB3aGljaCBoYXMgYWxsIGl0c1xuICAgICAgICAgKiBwcm9wZXJ0aWVzIGFuZCBBUEkgYnVpbHQuXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBzdGF0ZSBhbiB1bmluaXRpYWxpemVkIFN0YXRlIG9iamVjdFxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgYnVpbHQgU3RhdGUgb2JqZWN0XG4gICAgICAgICAqL1xuICAgICAgICBTdGF0ZUJ1aWxkZXIucHJvdG90eXBlLmJ1aWxkID0gZnVuY3Rpb24gKHN0YXRlKSB7XG4gICAgICAgICAgICB2YXIgX2EgPSB0aGlzLCBtYXRjaGVyID0gX2EubWF0Y2hlciwgYnVpbGRlcnMgPSBfYS5idWlsZGVycztcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSB0aGlzLnBhcmVudE5hbWUoc3RhdGUpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCAmJiAhbWF0Y2hlci5maW5kKHBhcmVudCwgdW5kZWZpbmVkLCBmYWxzZSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBidWlsZGVycykge1xuICAgICAgICAgICAgICAgIGlmICghYnVpbGRlcnMuaGFzT3duUHJvcGVydHkoa2V5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgdmFyIGNoYWluID0gYnVpbGRlcnNba2V5XS5yZWR1Y2UoZnVuY3Rpb24gKHBhcmVudEZuLCBzdGVwKSB7IHJldHVybiBmdW5jdGlvbiAoX3N0YXRlKSB7IHJldHVybiBzdGVwKF9zdGF0ZSwgcGFyZW50Rm4pOyB9OyB9LCBub29wKTtcbiAgICAgICAgICAgICAgICBzdGF0ZVtrZXldID0gY2hhaW4oc3RhdGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICB9O1xuICAgICAgICBTdGF0ZUJ1aWxkZXIucHJvdG90eXBlLnBhcmVudE5hbWUgPSBmdW5jdGlvbiAoc3RhdGUpIHtcbiAgICAgICAgICAgIC8vIG5hbWUgPSAnZm9vLmJhci5iYXouKionXG4gICAgICAgICAgICB2YXIgbmFtZSA9IHN0YXRlLm5hbWUgfHwgJyc7XG4gICAgICAgICAgICAvLyBzZWdtZW50cyA9IFsnZm9vJywgJ2JhcicsICdiYXonLCAnLioqJ11cbiAgICAgICAgICAgIHZhciBzZWdtZW50cyA9IG5hbWUuc3BsaXQoJy4nKTtcbiAgICAgICAgICAgIC8vIHNlZ21lbnRzID0gWydmb28nLCAnYmFyJywgJ2JheiddXG4gICAgICAgICAgICB2YXIgbGFzdFNlZ21lbnQgPSBzZWdtZW50cy5wb3AoKTtcbiAgICAgICAgICAgIC8vIHNlZ21lbnRzID0gWydmb28nLCAnYmFyJ10gKGlnbm9yZSAuKiogc2VnbWVudCBmb3IgZnV0dXJlIHN0YXRlcylcbiAgICAgICAgICAgIGlmIChsYXN0U2VnbWVudCA9PT0gJyoqJylcbiAgICAgICAgICAgICAgICBzZWdtZW50cy5wb3AoKTtcbiAgICAgICAgICAgIGlmIChzZWdtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUucGFyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlN0YXRlcyB0aGF0IHNwZWNpZnkgdGhlICdwYXJlbnQ6JyBwcm9wZXJ0eSBzaG91bG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gc2FmZUNvbnNvbGUuZXJyb3IoXCJzdGF0ZU1hdGNoZXIuZmluZDogRm91bmQgbXVsdGlwbGUgbWF0Y2hlcyBmb3IgXCIgKyBuYW1lICsgXCIgdXNpbmcgZ2xvYjogXCIsIG1hdGNoZXMubWFwKGZ1bmN0aW9uIChtYXRjaCkgeyByZXR1cm4gbWF0Y2gubmFtZTsgfSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlc1swXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH07XG4gICAgICAgIFN0YXRlTWF0Y2hlci5wcm90b3R5cGUucmVzb2x2ZVBhdGggPSBmdW5jdGlvbiAobmFtZSwgYmFzZSkge1xuICAgICAgICAgICAgaWYgKCFiYXNlKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIk5vIHJlZmVyZW5jZSBwb2ludCBnaXZlbiBmb3IgcGF0aCAnXCIgKyBuYW1lICsgXCInXCIpO1xuICAgICAgICAgICAgdmFyIGJhc2VTdGF0ZSA9IHRoaXMuZmluZChiYXNlKTtcbiAgICAgICAgICAgIHZhciBzcGxpdE5hbWUgPSBuYW1lLnNwbGl0KCcuJyk7XG4gICAgICAgICAgICB2YXIgcGF0aExlbmd0aCA9IHNwbGl0TmFtZS5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgaSA9IDAsIGN1cnJlbnQgPSBiYXNlU3RhdGU7XG4gICAgICAgICAgICBmb3IgKDsgaSA8IHBhdGhMZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChzcGxpdE5hbWVbaV0gPT09ICcnICYmIGkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGJhc2VTdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzcGxpdE5hbWVbaV0gPT09ICdeJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWN1cnJlbnQucGFyZW50KVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiUGF0aCAnXCIgKyBuYW1lICsgXCInIG5vdCB2YWxpZCBmb3Igc3RhdGUgJ1wiICsgYmFzZVN0YXRlLm5hbWUgKyBcIidcIik7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBjdXJyZW50LnBhcmVudDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHJlbE5hbWUgPSBzcGxpdE5hbWUuc2xpY2UoaSkuam9pbignLicpO1xuICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnQubmFtZSArIChjdXJyZW50Lm5hbWUgJiYgcmVsTmFtZSA/ICcuJyA6ICcnKSArIHJlbE5hbWU7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBTdGF0ZU1hdGNoZXI7XG4gICAgfSgpKTtcblxuICAgIHZhciBTdGF0ZVF1ZXVlTWFuYWdlciA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZnVuY3Rpb24gU3RhdGVRdWV1ZU1hbmFnZXIocm91dGVyLCBzdGF0ZXMsIGJ1aWxkZXIsIGxpc3RlbmVycykge1xuICAgICAgICAgICAgdGhpcy5yb3V0ZXIgPSByb3V0ZXI7XG4gICAgICAgICAgICB0aGlzLnN0YXRlcyA9IHN0YXRlcztcbiAgICAgICAgICAgIHRoaXMuYnVpbGRlciA9IGJ1aWxkZXI7XG4gICAgICAgICAgICB0aGlzLmxpc3RlbmVycyA9IGxpc3RlbmVycztcbiAgICAgICAgICAgIHRoaXMucXVldWUgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICBTdGF0ZVF1ZXVlTWFu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ciByZXN1bHQgPSBidWlsZGVyLmJ1aWxkKHN0YXRlKTtcbiAgICAgICAgICAgICAgICB2YXIgb3JwaGFuSWR4ID0gb3JwaGFucy5pbmRleE9mKHN0YXRlKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBleGlzdGluZ1N0YXRlID0gZ2V0U3RhdGUobmFtZV8xKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4aXN0aW5nU3RhdGUgJiYgZXhpc3RpbmdTdGF0ZS5uYW1lID09PSBuYW1lXzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlN0YXRlICdcIiArIG5hbWVfMSArIFwiJyBpcyBhbHJlYWR5IGRlZmluZWRcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4aXN0aW5nRnV0dXJlU3RhdGUgPSBnZXRTdGF0ZShuYW1lXzEgKyAnLioqJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ0Z1dHVyZVN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmUgZnV0dXJlIHN0YXRlIG9mIHRoZSBzYW1lIG5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucm91dGVyLnN0YXRlUmVnaXN0cnkuZGVyZWdpc3RlcihleGlzdGluZ0Z1dHVyZVN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdGF0ZXNbbmFtZV8xXSA9IHN0YXRlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmF0dGFjaFJvdXRlKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9ycGhhbklkeCA+PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgb3JwaGFucy5zcGxpY2Uob3JwaGFuSWR4LCAxKTtcbiAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJlZC5wdXNoKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBwcmV2ID0gcHJldmlvdXNRdWV1ZUxlbmd0aFtuYW1lXzFdO1xuICAgICAgICAgICAgICAgIHByZXZpb3VzUXVldWVMZW5ndGhbbmFtZV8xXSA9IHF1ZXVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZiAob3JwaGFuSWR4ID49IDAgJiYgcHJldiA9PT0gcXVldWUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdhaXQgdW50aWwgdHdvIGNvbnNlY3V0aXZlIGl0ZXJhdGlvbnMgd2hlcmUgbm8gYWRkaXRpb25hbCBzdGF0ZXMgd2VyZSBkZXF1ZXVlZCBzdWNjZXNzZnVsbHkuXG4gICAgICAgICAgICAgICAgICAgIC8vIHRocm93IG5ldyBFcnJvcihgQ2Fubm90IHJlZ2lzdGVyIG9ycGhhbmVkIHN0YXRlICcke25hbWV9J2ApO1xuICAgICAgICAgICAgICAgICAgICBxdWV1ZS5wdXNoKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgbm90aWZ5TGlzdGVuZXJzKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZXM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKG9ycGhhbklkeCA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgb3JwaGFucy5wdXNoKHN0YXRlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcXVldWUucHVzaChzdGF0ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBub3RpZnlMaXN0ZW5lcnMoKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZXM7XG4gICAgICAgIH07XG4gICAgICAgIFN0YXRlUXVldWVNYW5hZ2VyLnBy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0gZG9uZUNhbGxiYWNrIGEgY2FsbGJhY2sgdGhhdCBpcyBpbnZva2VkIGFmdGVyIGFsbCB0aGUgaG9va3MgaGF2ZSBzdWNjZXNzZnVsbHkgY29tcGxldGVkXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm5zIGEgcHJvbWlzZSBmb3IgdGhlIGFzeW5jIHJlc3VsdCwgb3IgdGhlIHJlc3VsdCBvZiB0aGUgY2FsbGJhY2tcbiAgICAgICAgICovXG4gICAgICAgIFRyYW5zaXRpb25Ib29rLmludm9rZUhvb2tzID0gZnVuY3Rpb24gKGhvb2tzLCBkb25lQ2FsbGJhY2spIHtcbiAgICAgICAgICAgIGZvciAodmFyIGlkeCA9IDA7IGlkeCA8IGhvb2tzLmxlbmd0aDsgaWR4KyspIHtcbiAgICAgICAgICAgICAgICB2YXIgaG9va1Jlc3VsdCA9IGhvb2tzW2lkeF0uaW52b2tlSG9vaygpO1xuICAgICAgICAgICAgICAgIGlmIChpc1Byb21pc2UoaG9va1Jlc3VsdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbWFpbmluZ0hvb2tzID0gaG9va3Muc2xpY2UoaWR4ICsgMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBUcmFuc2l0aW9uSG9vay5jaGFpbihyZW1haW5pbmdIb29rcywgaG9va1Jlc3VsdCkudGhlbihkb25lQ2FsbGJhY2spO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkb25lQ2FsbGJhY2soKTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJ1biBhbGwgVHJhbnNpdGlvbkhvb2tzLCBpZ25vcmluZyB0aGVpciByZXR1cm4gdmFsdWUuXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5ydW5BbGxIb29rcyA9IGZ1bmN0aW9uIChob29rcykge1xuICAgICAgICAgICAgaG9va3MuZm9yRWFjaChmdW5jdGlvbiAoaG9vaykgeyByZXR1cm4gaG9vay5pbnZva2VIb29rKCk7IH0pO1xuICAgICAgICB9O1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5wcm90b3R5cGUubG9nRXJyb3IgPSBmdW5jdGlvbiAoZXJyKSB7XG4gICAgICAgICAgICB0aGlzLnRyYW5zaXRpb24ucm91dGVyLnN0YXRlU2VydmljZS5kZWZhdWx0RXJyb3JIYW5kbGVyKCkoZXJyKTtcbiAgICAgICAgfTtcbiAgICAgICAgVHJhbnNpdGlvbkhvb2sucHJvdG90eXBlLmludm9rZUhvb2sgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAgICAgdmFyIGhvb2sgPSB0aGlzLnJlZ2lzdGVyZWRIb29rO1xuICAgICAgICAgICAgaWYgKGhvb2suX2RlcmVnaXN0ZXJlZClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB2YXIgbm90Q3VycmVudCA9IHRoaXMuZ2V0Tm90Q3VycmVudFJlamVjdGlvbigpO1xuICAgICAgICAgICAgaWYgKG5vdEN1cnJlbnQpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vdEN1cnJlbnQ7XG4gICAgICAgICAgICB2YXIgb3B0aW9ucyA9IHRoaXMub3B0aW9ucztcbiAgICAgICAgICAgIHRyYWNlLnRyYWNlSG9va0ludm9jYXRpb24odGhpcywgdGhpcy50cmFuc2l0aW9uLCBvcHRpb25zKTtcbiAgICAgICAgICAgIHZhciBpbnZva2VDYWxsYmFjayA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGhvb2suY2FsbGJhY2suY2FsbChvcHRpb25zLmJpbmQsIF90aGlzLnRyYW5zaXRpb24sIF90aGlzLnN0YXRlQ29udGV4dCk7IH07XG4gICAgICAgICAgICB2YXIgbm9ybWFsaXplRXJyID0gZnVuY3Rpb24gKGVycikgeyByZXR1cm4gUmVqZWN0aW9uLm5vcm1hbGl6ZShlcnIpLnRvUHJvbWlzZSgpOyB9O1xuICAgICAgICAgICAgdmFyIGhhbmRsZUVycm9yID0gZnVuY3Rpb24gKGVycikgeyByZXR1cm4gaG9vay5ldmVudFR5cGUuZ2V0RXJyb3JIYW5kbGVyKF90aGlzKShlcnIpOyB9O1xuICAgICAgICAgICAgdmFyIGhhbmRsZVJlc3VsdCA9IGZ1bmN0aW9uIChyZXN1bHQpIHsgcmV0dXJuIGhvb2suZXZlbnRUeXBlLmdldFJlc3VsdEhhbmRsZXIoX3RoaXMpKHJlc3VsdCk7IH07XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBpbnZva2VDYWxsYmFjaygpO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy50eXBlLnN5bmNocm9ub3VzICYmIGlzUHJvbWlzZShyZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQuY2F0Y2gobm9ybWFsaXplRXJyKS50aGVuKGhhbmRsZVJlc3VsdCwgaGFuZGxlRXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZVJlc3VsdChyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBjYWxsYmFjayB0aHJvd3MgKHN5bmNocm9ub3VzbHkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZUVycm9yKFJlamVjdGlvbi5ub3JtYWxpemUoZXJyKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICBpZiAoaG9vay5pbnZva2VMaW1pdCAmJiArK2hvb2suaW52b2tlQ291bnQgPj0gaG9vay5pbnZva2VMaW1pdCkge1xuICAgICAgICAgICAgICAgICAgICBob29rLmRlcmVnaXN0ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBUaGlzIG1ldGhvZCBoYW5kbGVzIHRoZSByZXR1cm4gdmFsdWUgb2YgYSBUcmFuc2l0aW9uIEhvb2suXG4gICAgICAgICAqXG4gICAgICAgICAqIEEgaG9vayBjYW4gcmV0dXJuIGZhbHNlIChjYW5jZWwpLCBhIFRhcmdldFN0YXRlIChyZWRpcmVjdCksXG4gICAgICAgICAqIG9yIGEgcHJvbWlzZSAod2hpY2ggbWF5IGxhdGVyIHJlc29sdmUgdG8gZmFsc2Ugb3IgYSByZWRpcmVjdClcbiAgICAgICAgICpcbiAgICAgICAgICogVGhpcyBhbHNvIGhhbmRsZXMgXCJ0cmFuc2l0aW9uIHN1cGVyc2VkZWRcIiAtLSB3aGVuIGEgbmV3IHRyYW5zaXRpb25cbiAgICAgICAgICogd2FzIHN0YXJ0ZWQgd2hpbGUgdGhlIGhvb2sgd2FzIHN0aWxsIHJ1bm5pbmdcbiAgICAgICAgICovXG4gICAgICAgIFRyYW5zaXRpb25Ib29rLnByb3RvdHlwZS5oYW5kbGVIb29rUmVzdWx0ID0gZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHZhciBub3RDdXJyZW50ID0gdGhpcy5nZXROb3RDdXJyZW50UmVqZWN0aW9uKCk7XG4gICAgICAgICAgICBpZiAobm90Q3VycmVudClcbiAgICAgICAgICAgICAgICByZXR1cm4gbm90Q3VycmVudDtcbiAgICAgICAgICAgIC8vIEhvb2sgcmV0dXJuZWQgYSBwcm9taXNlXG4gICAgICAgICAgICBpZiAoaXNQcm9taXNlKHJlc3VsdCkpIHtcbiAgICAgICAgICAgICAgICAvLyBXYWl0IGZvciB0aGUgcHJvbWlzZSwgdGhlbiByZXByb2Nlc3Mgd2l0aCB0aGUgcmVzdWx0aW5nIHZhbHVlXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC50aGVuKGZ1bmN0aW9uICh2YWwpIHsgcmV0dXJuIF90aGlzLmhhbmRsZUhvb2tSZXN1bHQodmFsKTsgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0cmFjZS50cmFjZUhvb2tSZXN1bHQocmVzdWx0LCB0aGlzLnRyYW5zaXRpb24sIHRoaXMub3B0aW9ucyk7XG4gICAgICAgICAgICAvLyBIb29rIHJldHVybmVkIGZhbHNlXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBmYWxzZSkge1xuICAgICAgICAgICAgICAgIC8vIEFib3J0IHRoaXMgVHJhbnNpdGlvblxuICAgICAgICAgICAgICAgIHJldHVybiBSZWplY3Rpb24uYWJvcnRlZCgnSG9vayBhYm9ydGVkIHRyYW5zaXRpb24nKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBpc1RhcmdldFN0YXRlID0gaXMoVGFyZ2V0U3RhdGUpO1xuICAgICAgICAgICAgLy8gaG9vayByZXR1cm5lZCBhIFRhcmdldFN0YXRlXG4gICAgICAgICAgICBpZiAoaXNUYXJnZXRTdGF0ZShyZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgLy8gSGFsdCB0aGUgY3VycmVudCBUcmFuc2l0aW9uIGFuZCByZWRpcmVjdCAoYSBuZXcgVHJhbnNpdGlvbikgdG8gdGhlIFRhcmdldFN0YXRlLlxuICAgICAgICAgICAgICAgIHJldHVybiBSZWplY3Rpb24ucmVkaXJlY3RlZChyZXN1bHQpLnRvUHJvbWlzZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0dXJuIGEgUmVqZWN0aW9uIHByb21pc2UgaWYgdGhlIHRyYW5zaXRpb24gaXMgbm8gbG9uZ2VyIGN1cnJlbnQg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XRlLCBjcml0ZXJpb24sIHRyYW5zaXRpb24pOyB9KTtcbiAgICAgICAgICAgIHJldHVybiBtYXRjaGluZy5sZW5ndGggPyBtYXRjaGluZyA6IG51bGw7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXRzIHRoZSBkZWZhdWx0IG1hdGNoIGNyaXRlcmlhIChhbGwgYHRydWVgKVxuICAgICAgICAgKlxuICAgICAgICAgKiBSZXR1cm5zIGFuIG9iamVjdCB3aGljaCBoYXMgYWxsIHRoZSBjcml0ZXJpYSBtYXRjaCBwYXRocyBhcyBrZXlzIGFuZCBgdHJ1ZWAgYXMgdmFsdWVzLCBpLmUuOlxuICAgICAgICAgKlxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiB7XG4gICAgICAgICAqICAgdG86IHRydWUsXG4gICAgICAgICAqICAgZnJvbTogdHJ1ZSxcbiAgICAgICAgICogICBlbnRlcmluZzogdHJ1ZSxcbiAgICAgICAgICogICBleGl0aW5nOiB0cnVlLFxuICAgICAgICAgKiAgIHJldGFpbmVkOiB0cnVlLFxuICAgICAgICAgKiB9XG4gICAgICAgICAqL1xuICAgICAgICBSZWdpc3RlcmVkSG9vay5wcm90b3R5cGUuX2dldERlZmF1bHRNYXRjaENyaXRlcmlhID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIG1hcE9iaih0aGlzLnRyYW5TdmMuX3BsdWdpbmFwaS5fZ2V0UGF0aFR5cGVzKCksIGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRydWU7IH0pO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0cyBtYXRjaGluZyBub2RlcyBhcyBbW0lNYXRjaGluZ05vZGVzXV1cbiAgICAgICAgICpcbiAgICAgICAgICogQ3JlYXRlIGEgSU1hdGNoaW5nTm9kZXMgb2JqZWN0IGZyb20gdGhlIFRyYW5zaXRpb25Ib29rVHlwZXMgdGhhdCBpcyByb3VnaGx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9uSG9vayA9IG5ldyBUcmFuc2l0aW9uSG9vayh0cmFuc2l0aW9uLCBzdGF0ZSwgaG9vaywgX29wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBob29rOiBob29rLCBub2RlOiBub2RlLCB0cmFuc2l0aW9uSG9vazogdHJhbnNpdGlvbkhvb2sgfTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gbWF0Y2hpbmdIb29rc1xuICAgICAgICAgICAgICAgIC5tYXAobWFrZVRyYW5zaXRpb25Ib29rcylcbiAgICAgICAgICAgICAgICAucmVkdWNlKHVubmVzdFIsIFtdKVxuICAgICAgICAgICAgICAgIC5zb3J0KHR1cGxlU29ydChob29rVHlwZS5yZXZlcnNlU29ydCkpXG4gICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAodHVwbGUpIHsgcmV0dXJuIHR1cGxlLnRyYW5zaXRpb25Ib29rOyB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEZpbmRzIGFsbCBSZWdpc3RlcmVkSG9va3MgZnJvbTpcbiAgICAgICAgICogLSBUaGUgVHJhbnNpdGlvbiBvYmplY3QgaW5zdGFuY2UgaG9vayByZWdpc3RyeVxuICAgICAgICAgKiAtIFRoZSBUcmFuc2l0aW9uU2VydmljZSAoJHRyYW5zaXRpb25zKSBnbG9iYWwgaG9vayByZWdpc3RyeVxuICAgICAgICAgKlxuICAgICAgICAgKiB3aGljaCBtYXRjaGVkOlxuICAgICAgICAgKiAtIHRoZSBldmVudFR5cGVcbiAgICAgICAgICogLSB0aGUgbWF0Y2hDcml0ZXJpYSAodG8sIGZyb20sIGV4aXRpbmcsIHJldGFpbmVkLCBlbnRlcmluZylcbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgYW4gYXJyYXkgb2YgbWF0Y2hlZCBbW1JlZ2lzdGVyZWRIb29rXV1zXG4gICAgICAgICAqL1x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gICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUub25FeGl0ID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUub25SZXRhaW4gPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5vbkVudGVyID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUub25GaW5pc2ggPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5vblN1Y2Nlc3MgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5vbkVycm9yID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O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hbnNpdGlvbidzIChcImZyb20gc3RhdGVcIikuXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5mcm9tID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJGZyb20oKS5zZWxmO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0dXJucyB0aGUgXCJ0byBzdGF0ZVwiXG4gICAgICAgICAqXG4gICAgICAgICAqIFJldHVybnMgdGhlIHN0YXRlIHRoYXQgdGhlIHRyYW5zaXRpb24gaXMgZ29pbmcgKnRvKi5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgVGhlIHN0YXRlIGRlY2xhcmF0aW9uIG9iamVjdCBmb3IgdGhlIFRyYW5zaXRpb24ncyB0YXJnZXQgc3RhdGUgKFwidG8gc3RhdGVcIikuXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS50byA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLiR0bygpLnNlbGY7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBHZXRzIHRoZSBUYXJnZXQgU3RhdGVcbiAgICAgICAgICpcbiAgICAgICAgICogQSB0cmFuc2l0aW9uJ3MgW1tUYXJnZXRTdGF0ZV1dIGVuY2Fwc3VsYXRlcyB0aGUgW1t0b11dIHN0YXRlLCB0aGUgW1twYXJhbXNdXSwgYW5kIHRoZSBbW29wdGlvbnNdXSBhcyBhIHNpbmdsZSBvYmplY3QuXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm5zIHRoZSBbW1RhcmdldFN0YXRlXV0gb2YgdGhpcyBUcmFuc2l0aW9uXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS50YXJnZXRTdGF0ZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybi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KCdBJykudHJhbnNpdGlvblxuICAgICAgICAgKlxuICAgICAgICAgKiAkdHJhbnNpdGlvbnMub25TdWNjZXNzKHsgdG86ICdEJyB9LCAodHJhbnMpID0+IHtcbiAgICAgICAgICogICB0cmFucy50bygpLm5hbWUgPT09ICdEJzsgLy8gdHJ1ZVxuICAgICAgICAgKiAgIHRyYW5zLnJlZGlyZWN0ZWRGcm9tKCkudG8oKS5uYW1lID09PSAnQyc7IC8vIHRydWVcbiAgICAgICAgICogICB0cmFucy5vcmlnaW5hbFRyYW5zaXRpb24oKSA9PT0gdHJhbnNpdGlvbkE7IC8vIHRydWVcbiAgICAgICAgICogICB0cmFucy5vcmlnaW5hbFRyYW5zaXRpb24oKS50bygpLm5hbWUgPT09ICdBJzsgLy8gdHJ1ZVxuICAgICAgICAgKiB9KTtcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm5zIFRoZSBvcmlnaW5hbCBUcmFuc2l0aW9uIHRoYXQgc3RhcnRlZCBhIHJlZGlyZWN0IGNoYWluXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5vcmlnaW5hbFRyYW5zaXRpb24gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgcmYgPSB0aGlzLnJlZGlyZWN0ZWRGcm9tKCk7XG4gICAgICAgICAgICByZXR1cm4gKHJmICYmIHJmLm9yaWdpbmFsVHJhbnNpdGlvbigpKSB8fCB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0IHRoZSB0cmFuc2l0aW9uIG9wdGlvbnNcbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgdGhlIG9wdGlvbnMgZm9yIHRoaXMgVHJhbnNpdGlvbi5cbiAgICAgICAgICovXG4gICAgICAgIFRyYW5zaXRpb24ucHJvdG90eXBlLm9wdGlvbnMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZ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ICAgICAgICAgdmFyIHRjID0gdGhpcy5fdHJlZUNoYW5nZXM7XG4gICAgICAgICAgICAvKiogUmV0dXJuIHVuZGVmaW5lZCBpZiBpdCdzIG5vdCBhIFwiZHluYW1pY1wiIHRyYW5zaXRpb24sIGZvciB0aGUgZm9sbG93aW5nIHJlYXNvbnMgKi9cbiAgICAgICAgICAgIC8vIElmIHVzZXIgZXhwbGljaXRseSB3YW50cyBhIHJlbG9hZFxuICAgICAgICAgICAgaWYgKHRoaXMuX29wdGlvbnMucmVsb2FkKVxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAvLyBJZiBhbnkgc3RhdGVzIGFyZSBleGl0aW5nIG9yIGVudGVyaW5nXG4gICAgICAgICAgICBpZiAodGMuZXhpdGluZy5sZW5ndGggfHwgdGMuZW50ZXJpbmcubGVuZ3RoKVxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAvLyBJZiB0by9mcm9tIHBhdGggbGVuZ3RocyBkaWZmZXJcbiAgICAgICAgICAgIGlmICh0Yy50by5sZW5ndGggIT09IHRjLmZyb20ubGVuZ3RoKVxuICAgICAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdG8vZnJvbSBwYXRocyBhcmUgZGlmZmVyZW50XG4gICAgICAgICAgICB2YXIgcGF0aHNEaWZmZXIgPSBhcnJheVR1cGxlcyh0Yy50bywgdGMuZnJvbSlcbiAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uICh0dXBsZSkgeyByZXR1cm4gdHVwbGVbMF0uc3RhdGUgIT09IHR1cGxlWzFdLnN0YXRlOyB9KVxuICAgICAgICAgICAgICAgIC5yZWR1Y2UoYW55VHJ1ZVIsIGZhbHNlKTtcbiAgICAgICAgICAgIGlmIChwYXRoc0RpZmZlcilcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAg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rZUhvb2tzKGFsbFJ1bkhvb2tzLCBkb25lKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgc3RhcnRUcmFuc2l0aW9uID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIHZhciBnbG9iYWxzID0gX3RoaXMucm91dGVyLmdsb2JhbHM7XG4gICAgICAgICAgICAgICAgZ2xvYmFscy5sYXN0U3RhcnRlZFRyYW5zaXRpb25JZCA9IF90aGlzLiRpZDtcbiAgICAgICAgICAgICAgICBnbG9iYWxzLnRyYW5zaXRpb24gPSBfdGhpcztcbiAgICAgICAgICAgICAgICBnbG9iYWxzLnRyYW5zaXRpb25IaXN0b3J5LmVucXVldWUoX3RoaXMpO1xuICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVHJhbnNpdGlvblN0YXJ0KF90aGlzKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbih1bmRlZmluZWQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHZhciBhbGxCZWZvcmVIb29rcyA9IGdldEhvb2tzRm9yKGV4cG9ydHMuVHJhbnNpdGlvbkhvb2tQaGFzZS5CRUZPUkUpO1xuICAgICAgICAgICAgVHJhbnNpdGlvbkhvb2suaW52b2tlSG9va3MoYWxsQmVmb3JlSG9va3MsIHN0YXJ0VHJhbnNpdGlvbilcbiAgICAgICAgICAgICAgICAudGhlbihydW5UcmFuc2l0aW9uKVxuICAgICAgICAgICAgICAgIC50aGVuKHRyYW5zaXRpb25TdWNjZXNzLCB0cmFuc2l0aW9uRXJyb3IpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucHJvbWlzZTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIENoZWNrcyBpZiB0aGUgVHJhbnNpdGlvbiBpcyB2YWxpZFxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyB0cnVlIGlmIHRoZSBUcmFuc2l0aW9uIGlzIH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CcsICcpO1xuICAgICAgICAgICAgICAgIHZhciBkZXRhaWwgPSBcIlRoZSBmb2xsb3dpbmcgcGFyYW1ldGVyIHZhbHVlcyBhcmUgbm90IHZhbGlkIGZvciBzdGF0ZSAnXCIgKyBzdGF0ZS5uYW1lICsgXCInOiBcIiArIGludmFsaWRWYWx1ZXM7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFJlamVjdGlvbi5pbnZhbGlkKGRldGFpbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5zdWNjZXNzID09PSBmYWxzZSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5fZXJyb3I7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBBIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGUgVHJhbnNpdGlvblxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyBBIHN0cmluZyByZXByZXNlbnRhdGlvbiBvZiB0aGUgVHJhbnNpdGlvblxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZnJvbVN0YXRlT3JOYW1lID0gdGhpcy5mcm9tKCk7XG4gICAgICAgICAgICB2YXIgdG9TdGF0ZU9yTmFtZSA9IHRoaXMudG8oKTtcbiAgICAgICAgICAgIHZhciBhdm9pZEVtcHR5SGFzaCA9IGZ1bmN0aW9uIChwYXJhbXMpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyYW1zWycjJ10gIT09IG51bGwgJiYgcGFyYW1zWycjJ10gIT09IHVuZGVmaW5lZCA/IHBhcmFtcyA6IG9taXQocGFyYW1zLCBbJyMnXSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgLy8gKFgpIG1lYW5zIHRoZSB0byBzdGF0ZSBpcyBpbnZhbGlkLlxuICAgICAgICAgICAgdmFyIGlkID0gd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HBhcmFtLnNxdWFzaCkge1xuICAgICAgICAgICAgY2FzZSBmYWxzZTpcbiAgICAgICAgICAgICAgICBzdXJyb3VuZFBhdHRlcm4gPSBbJygnLCAnKScgKyAocGFyYW0uaXNPcHRpb25hbCA/ICc/JyA6ICcnKV07XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIHRydWU6XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gcmVzdWx0LnJlcGxhY2UoL1xcLyQvLCAnJyk7XG4gICAgICAgICAgICAgICAgc3Vycm91bmRQYXR0ZXJuID0gWycoPzovKCcsICcpfC8pPyddO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBzdXJyb3VuZFBhdHRlcm4gPSBbXCIoXCIgKyBwYXJhbS5zcXVhc2ggKyBcInxcIiwgJyk/J107XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdCArIHN1cnJvdW5kUGF0dGVyblswXSArIHBhcmFtLnR5cGUucGF0dGVybi5zb3VyY2UgKyBzdXJyb3VuZFBhdHRlcm5bMV07XG4gICAgfVxuICAgIHZhciBtZW1vaXplVG8gPSBmdW5jdGlvbiAob2JqLCBfcHJvcCwgZm4pIHsgcmV0dXJuIChvYmpbX3Byb3BdID0gb2JqW19wcm9wXSB8fCBmbigpKTsgfTtcbiAgICB2YXIgc3BsaXRPblNsYXNoID0gc3BsaXRPbkRlbGltKCcvJyk7XG4gICAgdmFyIGRlZmF1bHRDb25maWcgPSB7XG4gICAgICAgIHN0YXRlOiB7IHBhcmFtczoge30gfSxcbiAgICAgICAgc3RyaWN0OiB0cnVlLFxuICAgICAgICBjYXNlSW5zZW5zaXRpdmU6IHRydWUsXG4gICAgICAgIGRlY29kZVBhcmFtczogdHJ1ZSxcbiAgICB9O1xuICAgIC8qKlxuICAgICAqIE1hdGNoZXMgVVJM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KyBcIidcIik7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgLy8gU3BsaXQgaW50byBzdGF0aWMgc2VnbWVudHMgc2VwYXJhdGVkIGJ5IHBhdGggcGFyYW1ldGVyIHBsYWNlaG9sZGVycy5cbiAgICAgICAgICAgIC8vIFRoZSBudW1iZXIgb2Ygc2VnbWVudHMgaXMgYWx3YXlzIDEgbW9yZSB0aGFuIHRoZSBudW1iZXIgb2YgcGFyYW1ldGVycy5cbiAgICAgICAgICAgIHZhciBtYXRjaERldGFpbHMgPSBmdW5jdGlvbiAobSwgaXNTZWFyY2gpIHtcbiAgICAgICAgICAgICAgICAvLyBJRVs3OF0gcmV0dXJucyAnJyBmb3IgdW5tYXRjaGVkIGdyb3VwcyBpbnN0ZWFkIG9mIG51bGxcbiAgICAgICAgICAgICAgICB2YXIgaWQgPSBtWzJdIHx8IG1bM107XG4gICAgICAgICAgICAgICAgdmFyIHJlZ2V4cCA9IGlzU2VhcmNoID8gbVs0XSA6IG1bNF0gfHwgKG1bMV0gPT09ICcqJyA/ICdbXFxcXHNcXFxcU10qJyA6IG51bGwpO1xuICAgICAgICAgICAgICAgIHZhciBtYWtlUmVnZXhwVHlwZSA9IGZ1bmN0aW9uIChzdHIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluaGVyaXQocGFyYW1UeXBlcy50eXBlKGlzU2VhcmNoID8gJ3F1ZXJ5JyA6ICdwYXRoJyksIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IG5ldyBSZWdFeHAoc3RyLCBfdGhpcy5jb25maWcuY2FzZUluc2Vuc2l0aXZlID8gJ2knIDogdW5kZWZpbmVkKSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBpZDogaWQsXG4gICAgICAgICAgICAgICAgICAgIHJlZ2V4cDogcmVnZXhwLFxuICAgICAgICAgICAgICAgICAgICBzZWdtZW50OiBwYXR0ZXJuLnN1YnN0cmluZyhsYXN0LCBtLmluZGV4KSxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogIXJlZ2V4cCA/IG51bGwgOiBwYXJhbVR5cGVzLnR5cGUocmVnZXhwKSB8fCBtYWtlUmVnZXhwVHlwZShyZWdleHApLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGRldGFpbHM7XG4gICAgICAgICAgICB2YXIgc2VnbWVudDtcbiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpuby1jb25kaXRpb25hbC1hc3NpZ25tZW50XG4gICAgICAgICAgICB3aGlsZSAoKG1hdGNoQXJyYXkgPSBwbGFjZWhvbGRlci5leGVjKHBhdHRlcm4pKSkge1xuICAgICAgICAgICAgICAgIGRldGFpbHMgPSBtYXRjaERldGFpbHMobWF0Y2hBcnJheSwgZmFsc2UpO1xuICAgICAgICAgICAgICAgIGlmIChkZXRhaWxzLnNlZ21lbnQuaW5kZXhPZignPycpID49IDApXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrOyAvLyB3ZSdyZSBpbnRvIHRoZSBzZWFyY2ggcGFydFxuICAgICAgICAgICAgICAgIGNoZWNrUGFyYW1FcnJvcnMoZGV0YWlscy5pZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5fcGFyYW1zLnB1c2gocGFyYW1GYWN0b3J5LmZyb21QYXRoKGRldGFpbHMuaWQsIGRldGFpbHMudHlwZSwgY29uZmlnLnN0YXRlKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2VnbWVudHMucHVzaChkZXRhaWxzLnNlZ21lbnQpO1xuICAgICAgICAgICAgICAgIHBhdHRlcm5zLnB1c2goW2RldGFpbHMuc2VnbWVudCwgdGFpbCh0aGlzLl9wYXJhbXMpXSk7XG4gICAgICAgICAgICAgICAgbGFzdCA9IHBsYWNlaG9sZGVyLmxhc3RJbmRleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNlZ21lbnQgPSBwYXR0ZXJuLnN1YnN0cmluZyhsYXN0KTtcbiAgICAgICAgICAgIC8vIEZpbmQgYW55IHNlYXJjaCBwYXJhbWV0ZXIgbmFtZXMgYW5kIHJlbW92ZSB0aGVtIGZyb20gdGhlIGxhc3Qgc2VnbWVudFxuICAgICAgICAgICAgdmFyIGkgPSBzZWdtZW50LmluZGV4T2YoJz8nKTtcbiAgICAgICAgICAgIGlmIChpID49IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VnbWVudC5zdWJzdHJpbmcoaSk7XG4gICAgICAgICAgICAgICAgc2VnbWVudCA9IHNlZ21lbnQuc3Vic3RyaW5nKDAsIGkpO1xuICAgICAgICAgICAgICAgIGlmIChzZWFyY2gubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICBsYXN0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLWNvbmRpdGlvbmFsLWFzc2lnbm1lbnRcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChtYXRjaEFycmF5ID0gc2VhcmNoUGxhY2Vob2xkZXIuZXhlYyhzZWFyY2gpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWlscyA9IG1hdGNoRGV0YWlscyhtYXRjaEFycmF5LCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrUGFyYW1FcnJvcnMoZGV0YWlscy5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYXJhbXMucHVzaChwYXJhbUZhY3RvcnkuZnJvbVNlYXJjaChkZXRhaWxzLmlkLCBkZXRhaWxzLnR5cGUsIGNvbmZpZy5zdGF0ZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdCA9IHBsYWNlaG9sZGVyLmxhc3RJbmRleDtcbiAgICAgICAgICA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B7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChtYXRjaGVyLl9jYWNoZS5zZWdtZW50cyA9XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXIuX2NhY2hlLnNlZ21lbnRzIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVyLl9jYWNoZS5wYXRoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChVcmxNYXRjaGVyLnBhdGhTZWdtZW50c0FuZFBhcmFtcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVkdWNlKHVubmVzdFIsIFtdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2Uoam9pbk5laWdoYm9yc1IsIFtdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHgpIHsgcmV0dXJuIChpc1N0cmluZyh4KSA/IHNwbGl0T25TbGFzaCh4KSA6IHgpOyB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgdGhlIHNvcnQgd2VpZ2h0IGZvciBlYWNoIHNlZ21lbnQgb2YgYSBVcmxNYXRjaGVyXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQ2FjaGVzIHRoZSByZXN1bHQgYXMgYG1hdGNoZXIuX2NhY2hlLndlaWdodHNgXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHZhciB3ZWlnaHRzID0gZnVuY3Rpb24gKG1hdGNoZXIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKG1hdGNoZXIuX2NhY2hlLndlaWdodHMgPVxuICAgICAgICAgICAgICAgICAgICBtYXRjaGVyLl9jYWNoZS53ZWlnaHRzIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWdtZW50cyhtYXRjaGVyKS5tYXAoZnVuY3Rpb24gKHNlZ21lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb3J0IHNsYXNoZXMgZmlyc3QsIHRoZW4gc3RhdGljIHN0cmluZ3MsIHRoZSBQYXJhbXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VnbWVudCA9PT0gJy8nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNTdHJpbmcoc2VnbWVudCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWdtZW50IGluc3RhbmNlb2YgUGFyYW0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogUGFkcyBzaG9ydGVyIGFycmF5IGluLXBsYWNlIChtdXRhdGVzKVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB2YXIgcGFkQXJyYXlzID0gZnVuY3Rpb24gKGwsIHIsIHBhZFZhbCkge1xuICAgICAgICAgICAgICAgIHZhciBsZW4gPSBNYXRoLm1heChsLmxlbmd0aCwgci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIHdoaWxlIChsLmxlbmd0aCA8IGxlbilcbiAgICAgICAgICAgICAgICAgICAgbC5wdXNoKHBhZFZhbCk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHIubGVuZ3RoIDwgbGVuKVxuICAgICAgICAgICAgICAgICAgICByLnB1c2gocGFkVmFsKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgd2VpZ2h0c0EgPSB3ZWlnaHRzKGEpLCB3ZWlnaHRzQiA9IHdlaWdodHMoYik7XG4gICAgICAgICAgICBwYWRBcnJheXMod2VpZ2h0c0EsIHdlaWdodHNCLCAwKTtcbiAgICAgICAgICAgIHZhciBfcGFpcnMgPSBhcnJheVR1cGxlcyh3ZWlnaHRzQSwgd2VpZ2h0c0IpO1xuICAgICAgICAgICAgdmFyIGNtcCwgaTtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBfcGFpcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjbXAgPSBfcGFpcnNbaV1bMF0gLSBfcGFpcnNbaV1bMV07XG4gICAgICAgICAgICAgICAgaWYgKGNtcCAhPT0gMClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNtcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQ3JlYXRlcyBhIG5ldyBjb25jYXRlbmF0ZWQgVXJsTWF0Y2hlclxuICAgICAgICAgKlxuICAgICAgICAgKiBCdWlsZHMgYSBuZXcgVXJsTWF0Y2hlciBieSBhcHBlbmRpbmcgYW5vdGhlciBVcmxNYXRjaGVyIHRvIHRoaXMgb25lLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gdXJsIEEgYFVybE1hdGNoZXJgIGluc3RhbmNlIHRvIGFwcGVuZCBhcyBhIGNoaWxkIG9mIHRoZSBjdXJyZW50IGBVcmxNYXRjaGVyYC5cbiAgICAgICAgICovXG4gICAgICAgIFVybE1hdGNoZXIucHJvdG90eXBlLmFwcGVuZCA9IGZ1bmN0aW9uICh1cmwpIHtcbiAgICAgICAgICAgIHRoaXMuX2NoaWxkcmVuLnB1c2godXJsKTtcbiAgICAgICAgICAgIHVybC5fY2FjaGUgPSB7XG4gICAgICAgICAgICAgICAgcGF0aDogdGhpcy5fY2FjaGUucGF0aC5jb25jYXQodXJsKSxcbiAgICAgICAgICAgICAgICBwYXJlbnQ6IHRoaXMsXG4gICAgICAgICAgICAgICAgcGF0dGVybjogbnVsbCxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gdXJsO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsICovXG4gICAgICAgIFVybE1hdGNoZXIucHJvdG90eXBlLmlzUm9vdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jYWNoZS5wYXRoWzBdID09PSB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICAvKiogUmV0dXJucyB0aGUgaW5wdXQgcGF0dGVybiBzdHJpbmcgKi9cbiAgICAgICAgVXJsTWF0Y2hlci5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXR0ZXJuO1xuICAgICAgICB9O1xuICAgICAgICBVcmxNYXRjaGVyLnByb3RvdHlwZS5fZ2V0RGVjb2RlZFBhcmFtVmFsdWUgPSBmdW5jdGlvbiAodmFsdWUsIHBhcmFtKSB7XG4gICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHZhbHVlKSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNvbmZpZy5kZWNvZGVQYXJhbXMgJiYgIXBhcmFtLnR5cGUucmF3KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5tYXAoZnVuY3Rpb24gKHBhcmFtVmFsdWUpIHsgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudChwYXJhbVZhbHVlKTsgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IGRlY29kZVVSSUNvbXBvbmVudCh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJhbS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JldHVybnMgeyBpZDogJ2JvYicsIHE6ICdoZWxsbycsIHI6IG51bGwgfVxuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHBhdGggICAgVGhlIFVSTCBwYXRoIHRvIG1hdGNoLCBlLmcuIGAkbG9jYXRpb24ucGF0aCgpYC5cbiAgICAgICAgICogQHBhcmFtIHNlYXJjaCAgVVJMIHNlYXJjaCBwYXJhbWV0ZXJzLCBlLmcuIGAkbG9jYXRpb24uc2VhcmNoKClgLlxuICAgICAgICAgKiBAcGFyYW0gaGFzaCAgICBVUkwgaGFzaCBlLmcuIGAkbG9jYXRpb24uaGFzaCgpYC5cbiAgICAgICAgICogQHBhcmFtIG9wdGlvbnNcbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgVGhlIGNhcHR1cmVkIHBhcmFtZXRlciB2YWx1ZXMuXG4gICAgICAgICAqL1xuICAgICAgICBVcmxNYXRjaGVyLnByb3RvdHlwZS5leGVjID0gZnVuY3Rpb24gKHBhdGgsIHNlYXJjaCwgaGFzaCwgb3B0aW9ucykge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IHZvaWQgMCkgeyBzZWFyY2ggPSB7fTsgfVxuICAgICAgICAgICAgdmFyIG1hdGNoID0gbWVtb2l6ZVRvKHRoaXMuX2NhY2hlLCAncGF0dGVybicsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFJlZ0V4cChbXG4gICAgICAgICAgICAgICAgICAgICdeJyxcbiAgICAgICAgICAgICAgICAgICAgdW5uZXN0KF90aGlzLl9jYWNoZS5wYXRoLm1hcChwcm9wKCdfY29tcGlsZWQnKSkpLmpvaW4oJycpLFxuICAgICAgICAgICAgICAgICAgICBfdGhpcy5jb25maWcuc3RyaWN0ID09PSBmYWxzZSA/ICcvPycgOiAnJyxcbiAgICAgICAgICAgICAgICAgICAgJ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yYW0uYXJyYXkgPT09IHRydWUpXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gZGVjb2RlUGF0aEFycmF5KHZhbHVlKTtcbiAgICAgICAgICAgICAgICB2YWx1ZXNbcGFyYW0uaWRdID0gdGhpcy5fZ2V0RGVjb2RlZFBhcmFtVmFsdWUodmFsdWUsIHBhcmFtKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNlYXJjaFBhcmFtcy5mb3JFYWNoKGZ1bmN0aW9uIChwYXJhbSkge1xuICAgICAgICAgICAgICAgIHZhciB2YWx1ZSA9IHNlYXJjaFtwYXJhbS5pZF07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwYXJhbS5yZXBsYWNlLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbS5yZXBsYWNlW2pdLmZyb20gPT09IHZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJhbS5yZXBsYWNlW2pdLnRvO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWx1ZXNbcGFyYW0uaWRdID0gX3RoaXMuX2dldERlY29kZWRQYXJhbVZhbHVlKHZhbHVlLCBwYXJhbSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmIChoYXNoKVxuICAgICAgICAgICAgICAgIHZhbHVlc1snIyddID0gaGFzaDtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZXM7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICogUmV0dXJucyBhbGwgdGhlIFtbUGFyYW1dXSBvYmplY3RzIG9mIGFsbCBwYXRoIGFuZCBzZWFyY2ggcGFyYW1ldGVycyBvZiB0aGlzIHBhdHRlcm4gaW4gb3JkZXIgb2YgYXBwZWFyYW5jZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMge0FycmF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zID0gdXJsTWF0Y2hlcnNcbiAgICAgICAgICAgICAgICAubWFwKFVybE1hdGNoZXIucGF0aFNlZ21lbnRzQW5kUGFyYW1zKVxuICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pXG4gICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4gKGlzU3RyaW5nKHgpID8geCA6IGdldERldGFpbHMoeCkpOyB9KTtcbiAgICAgICAgICAgIC8vIEV4dHJhY3QgdGhlIHF1ZXJ5IHBhcmFtcyBpbnRvIGEgc2VwYXJhdGUgYXJyYXlcbiAgICAgICAgICAgIHZhciBxdWVyeVBhcmFtcyA9IHVybE1hdGNoZXJzXG4gICAgICAgICAgICAgICAgLm1hcChVcmxNYXRjaGVyLnF1ZXJ5UGFyYW1zKVxuICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pXG4gICAgICAgICAgICAgICAgLm1hcChnZXREZXRhaWxzKTtcbiAgICAgICAgICAgIHZhciBpc0ludmFsaWQgPSBmdW5jdGlvbiAocGFyYW0pIHsgcmV0dXJuIHBhcmFtLmlzVmFsaWQgPT09IGZhbHNlOyB9O1xuICAgICAgICAgICAgaWYgKHBhdGhTZWdtZW50c0FuZFBhcmFtcy5jb25jYXQocXVlcnlQYXJhbXMpLmZpbHRlcihpc0ludmFsaWQpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHaXZlbiBhIFBhcmFtLCBhcHBsaWVzIHRoZSBwYXJhbWV0ZXIgdmFsdWUsIHRoZW4gcmV0dXJucyBkZXRhaWxlZCBpbmZvcm1hdGlvbiBhYm91dCBpdFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBmdW5jdGlvbiBnZXREZXRhaWxzKHBhcmFtKSB7XG4gICAgICAgICAgICAgICAgLy8gTm9ybWFsaXplIHRvIHR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ZWdtZW50IChhIHJhdyBzdHJpbmcpOyBqdXN0IGFwcGVuZCBpdFxuICAgICAgICAgICAgICAgIGlmIChpc1N0cmluZyh4KSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIHg7XG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCBpdCdzIGEgUGFyYW1EZXRhaWxzLlxuICAgICAgICAgICAgICAgIHZhciBzcXVhc2ggPSB4LnNxdWFzaCwgZW5jb2RlZCA9IHguZW5jb2RlZCwgcGFyYW0gPSB4LnBhcmFtO1xuICAgICAgICAgICAgICAgIC8vIElmIHNxdWFzaCBpcyA9PT0gdHJ1ZSwgdHJ5IHRvIHJlbW92ZSBhIHNsYXNoIGZyb20gdGhlIHBhdGhcbiAgICAgICAgICAgICAgICBpZiAoc3F1YXNoID09PSB0cnVlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjLm1hdGNoKC9cXC8kLykgPyBhY2Muc2xpY2UoMCwgLTEpIDogYWNjO1xuICAgICAgICAgICAgICAgIC8vIElmIHNxdWFzaCBpcyBhIHN0cmluZywgdXNlIHRoZSBzdHJpbmcgZm9yIHRoZSBwYXJhbSB2YWx1ZVxuICAgICAgICAgICAgICAgIGlmIChpc1N0cmluZyhzcXVhc2gpKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjICsgc3F1YXNoO1xuICAgICAgICAgICAgICAgIGlmIChzcXVhc2ggIT09IGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjOyAvLyA/XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQgPT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIHBhcmFtZXRlciB2YWx1ZSBpcyBhbiBhcnJheSwgZW5jb2RlIHRoZSB2YWx1ZSB1c2luZyBlbmNvZGVEYXNoZXNcbiAgICAgICAgICAgICAgICBpZiAoaXNBcnJheShlbmNvZGVkKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIG1hcChlbmNvZGVkLCBVcmxNYXRjaGVyLmVuY29kZURhc2hlcykuam9pbignLScpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBwYXJhbWV0ZXIgdHlwZSBpcyBcInJhd1wiLCB0aGVuIGRvIG5vdCBlbmNvZGVVUklDb21wb25lbnRcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0ucmF3KVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjICsgZW5jb2RlZDtcbiAgICAgICAgICAgICAgICAvLyBFbmNvZGUgdGhlIHZhbHVlXG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIGVuY29kZVVSSUNvbXBvbmVudChlbmNvZGVkKTtcbiAgICAgICAgICAgIH0sICcnKTtcbiAgICAgICAgICAgIC8vIEJ1aWxkIHRoZSBxdWVyeSBzdHJpbmcgYnkgYXBwbHlpbmcgcGFyYW1ldGVyIHZhbHVlcyAoYXJyYXkgb3IgcmVndWxhcilcbiAgICAgICAgICAgIC8vIHRoZW4gbWFwcGluZyB0byBrZXk9dmFsdWUsIHRoZW4gZmxhdHRlbmluZyBhbmQgam9pbmluZyB1c2luZyBcIiZcIlxuICAgICAgICAgICAgdmFyIHF1ZXJ5U3RyaW5nID0gcXVlcnlQYXJhbXNcbiAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChwYXJhbURldGFpbHMpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFyYW0gPSBwYXJhbURldGFpbHMucGFyYW0sIHNxdWFzaCA9IHBhcmFtRGV0YWlscy5zcXVhc2gsIGVuY29kZWQgPSBwYXJhbURldGFpbHMuZW5jb2RlZCwgaXNEZWZhdWx0VmFsdWUgPSBwYXJhbURldGFpbHMuaXNEZWZhdWx0VmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQgPT0gbnVsbCB8fCAoaXNEZWZhdWx0VmFsdWUgJiYgc3F1YXNoICE9PSBmYWxzZSkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBpZiAoIWlzQXJyYXkoZW5jb2RlZCkpXG4gICAgICAgICAgICAgICAgICAgIGVuY29kZWQgPSBbZW5jb2RlZF07XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQubGVuZ3RoID09PSAwKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKCFwYXJhbS5yYXcpXG4gICAgICAgICAgICAgICAgICAgIGVuY29kZWQgPSBtYXAoZW5jb2RlZCwgZW5jb2RlVVJJQ29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlZC5tYXAoZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gcGFyYW0uaWQgKyBcIj1cIiArIHZhbDsgfSk7XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoaWRlbnRpdHkpXG4gICAgICAgICAgICAgICAgLnJlZHVjZSh1bm5lc3RSLCBbXSlcbiAgICAgICAgICAgICAgICAuam9pbignJicpO1xuICAgICAgICAgICAgLy8gQ29uY2F0IHRoZSBwYXRoc3RyaW5nIHdpdGggdGhlIHF1ZXJ5U3RyaW5nIChpZiBleGlzdHMpIGFuZCB0aGUgaGFzaFN0cmluZyAoaWYgZXhpc3RzKVxuICAgICAgICAgICAgcmV0dXJuIHBhdGhTdHJpbmcgKyAocXVlcnlTdHJpbmcgPyBcIj9cIiArIHF1ZXJ5U3RyaW5nIDogJycpICsgKHZhbHVlc1snIyddID8gJyMnICsgdmFsdWVzWycjJ10gOiAnJyk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgVXJsTWF0Y2hlci5uYW1lVmFsaWRhdG9yID0gL15cXHcrKFstLl0rXFx3KykqKD86XFxbXFxdKT8kLztcbiAgICAgICAgcmV0dXJuIF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Ckge1xuICAgICAgICAgICAgLy8gVE9ETzogdHlwZW9mP1xuICAgICAgICAgICAgaWYgKCFpc09iamVjdChvYmplY3QpKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSB0cnVlO1xuICAgICAgICAgICAgZm9yRWFjaChVcmxNYXRjaGVyLnByb3RvdHlwZSwgZnVuY3Rpb24gKHZhbCwgbmFtZSkge1xuICAgICAgICAgICAgICAgIGlmIChpc0Z1bmN0aW9uKHZhbCkpXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHJlc3VsdCAmJiBpc0RlZmluZWQob2JqZWN0W25hbWVdKSAmJiBpc0Z1bmN0aW9uKG9iamVjdFtuYW1lXSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgVXJsTWF0Y2hlckZhY3RvcnkucHJvdG90eXBlLiRnZXQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgdXJsQ29uZmlnID0gdGhpcy5yb3V0ZXIudXJsU2VydmljZS5jb25maWc7XG4gICAgICAgICAgICB1cmxDb25maWcucGFyYW1UeXBlcy5lbnF1ZXVlID0gZmFsc2U7XG4gICAgICAgICAgICB1cmxDb25maWcucGFyYW1UeXBlcy5fZmx1c2hUeXBlUXVldWUoKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gVXJsTWF0Y2hlckZhY3Rvcnk7XG4gICAgfSgpKTtcblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBbW1VybFJ1bGVdXVxuICAgICAqXG4gICAgICogQ3JlYXRlcyBhIFtbVXJsUnVsZV1dIGZyb20gYTpcbiAgICAgKlxuICAgICAqIC0gYHN0cmluZ2BcbiAgICAgKiAtIFtbVXJsTWF0Y2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0YXRlLnVybCwgaGFuZGxlciksIGRldGFpbHMpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQSBVcmxSdWxlIHdoaWNoIG1hdGNoZXMgYmFzZWQgb24gYSByZWd1bGFyIGV4cHJlc3Npb25cbiAgICAgICAgICpcbiAgICAgICAgICogVGhlIGBoYW5kbGVyYCBtYXkgYmUgZWl0aGVyIGEgW1tVcmxSdWxlSGFuZGxlckZuXV0gb3IgYSBzdHJpbmcuXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIEhhbmRsZXIgYXMgYSBmdW5jdGlvblxuICAgICAgICAgKlxuICAgICAgICAgKiBJZiBgaGFuZGxlcmAgaXMgYSBmdW5jdGlvbiwgdGhlIGZ1bmN0aW9uIGlzIGludm9rZWQgd2l0aDpcbiAgICAgICAgICpcbiAgICAgICAgICogLSByZWdleHAgbWF0Y2ggYXJyYXkgKGZyb20gYHJlZ2V4cGApXG4gICAgICAgICAqIC0gdXJsOiB0aGUgY3VycmVudCBVcmwgKFtbVXJsUGFydHNdXSlcbiAgICAgICAgICogLSByb3V0ZXI6IHRoZSByb3V0ZXIgb2JqZWN0IChbW1VJUm91dGVyXV0pXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogdmFyIHJ1bGUgPSBmYWN0b3J5LmZyb21SZWdFeHAoL15cXC9mb29cXC8oYmFyfGJheikkLywgbWF0Y2ggPT4gXCIvaG9tZS9cIiArIG1hdGNoWzFdKVxuICAgICAgICAgKiB2YXIgbWF0Y2ggPSBydWxlLm1hdGNoKCcvZm9vL2JhcicpOyAvLyByZXN1bHRzIGluIFsgJy9mb28vYmFyJywgJ2JhcicgXVxuICAgICAgICAgKiB2YXIgcmVzdWx0ID0gcnVsZS5oYW5kbGVyKG1hdGNoKTsgLy8gJy9ob21lL2JhcidcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIEh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GlzLndoZW4gPSBmdW5jdGlvbiAobWF0Y2hlciwgaGFuZGxlciwgb3B0aW9ucykgeyByZXR1cm4gX3RoaXMucm91dGVyLnVybFNlcnZpY2UucnVsZXMud2hlbihtYXRjaGVyLCBoYW5kbGVyLCBvcHRpb25zKTsgfTtcbiAgICAgICAgICAgIHRoaXMudXJsUnVsZUZhY3RvcnkgPSBuZXcgVXJsUnVsZUZhY3Rvcnkocm91dGVyKTtcbiAgICAgICAgfVxuICAgICAgICAvKiogSW50ZXJuYWwgQVBJLiAqL1xuICAgICAgICBVcmxSb3V0ZXIucHJvdG90eXBlLnVwZGF0ZSA9IGZ1bmN0aW9uIChyZWFkKSB7XG4gICAgICAgICAgICB2YXIgJHVybCA9IHRoaXMucm91dGVyLmxvY2F0aW9uU2VydmljZTtcbiAgICAgICAgICAgIGlmIChyZWFkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sb2NhdGlvbiA9ICR1cmwudXJsKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCR1cmwudXJsKCkgPT09IHRoaXMubG9jYXRpb24pXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgJHVybC51cmwodGhpcy5sb2NhdGlvbiwgdHJ1ZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBJbnRlcm5hbCBBUEkuXG4gICAgICAgICAqXG4gICAgICAgICAqIFB1c2hlcyBhIG5ldyBsb2NhdGlvbiB0byB0aGUgYnJvd3NlciBoaXN0b3J5LlxuICAgICAgICAgKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICogQHBhcmFtIHVybE1hdGNoZXJcbiAgICAgICAgICogQHBhcmFtIHBhcmFtc1xuICAgICAgICAgKiBAcGFyYW0gb3B0aW9uc1xuICAgICAgICAgKi9cbiAgICAgICAgVXJsUm91dGVyLnByb3RvdHlwZS5wdXNoID0gZnVuY3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LlxcXikqKVxcLiguKiQpLy5leGVjKHVpVmlld05hbWUpO1xuICAgICAgICAgICAgaWYgKHJlbGF0aXZlVmlld05hbWVTdWdhcikge1xuICAgICAgICAgICAgICAgIC8vIENsb2JiZXJzIGV4aXN0aW5nIGNvbnRleHRBbmNob3IgKHJhd1ZpZXdOYW1lIHZhbGlkYXRpb24gd2lsbCBmaXggdGhpcylcbiAgICAgICAgICAgICAgICB1aVZpZXdDb250ZXh0QW5jaG9yID0gcmVsYXRpdmVWaWV3TmFtZVN1Z2FyWzFdOyAvLyBzZXQgYW5jaG9yIHRvIFwiXi5eLl5cIlxuICAgICAgICAgICAgICAgIHVpVmlld05hbWUgPSByZWxhdGl2ZVZpZXdOYW1lU3VnYXJbMl07IC8vIHNldCB2aWV3LW5hbWUgdG8gXCJmb28uYmFyXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh1aVZpZXdOYW1lLmNoYXJBdCgwKSA9PT0gJyEnKSB7XG4gICAgICAgICAgICAgICAgdWlWaWV3TmFtZSA9IHVpVmlld05hbWUuc3Vic3RyKDEpO1xuICAgICAgICAgICAgICAgIHVpVmlld0NvbnRleHRBbmNob3IgPSAnJzsgLy8gdGFyZ2V0IGFic29sdXRlbHkgZnJvbSByb290XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBoYW5kbGUgcGFyZW50IHJlbGF0aXZlIHRhcmdldGluZyBcIl4uXi5eXCJcbiAgICAgICAgICAgIHZhciByZWxhdGl2ZU1hdGNoID0gL14oXFxeKD86XFwuXFxeKSopJC87XG4gICAgICAgICAgICBpZiAocmVsYXRpdmVNYXRjaC5leGVjKHVpVmlld0NvbnRleHRBbmNob3IpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGFuY2hvclN0YXRlID0gdWlWaWV3Q29udGV4dEFuY2hvci5zcGxpdCgnLicpLnJlZHVjZShmdW5jdGlvbiAoYW5jaG9yLCB4KSB7IHJldHVybiBhbmNob3IucGFyZW50OyB9LCBjb250ZXh0KTtcbiAgICAgICAgICAgICAgICB1aVZpZXdDb250ZXh0QW5jaG9yID0gYW5jaG9yU3RhdGUubmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHVpVmlld0NvbnRleHRBbmNob3IgPT09ICcuJykge1xuICAgICAgICAgICAgICAgIHVpVmlld0NvbnRleHRBbmNob3IgPSBjb250ZXh0Lm5hbWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4geyB1aVZpZXdOYW1lOiB1aVZpZXdOYW1lLCB1aVZpZXdDb250ZXh0QW5jaG9yOiB1aVZpZXdDb250ZXh0QW5jaG9yIH07XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgVmlld1NlcnZpY2UucHJvdG90eXBlLl9yb290Vmlld0NvbnRleHQgPSBmdW5jdGlvbiAoY29udGV4dCkge1xuICAgICAgICAgICAgcmV0dXJuICh0aGlzLl9yb290Q29udGV4dCA9IGNvbnRleHQgfHwgdGhpcy5fcm9vdENvbnRleHQpO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsICovXG4gICAgICAgIFZpZXdTZXJ2aWNlLnByb3RvdHlwZS5fdmlld0NvbmZpZ0ZhY3RvcnkgPSBmdW5jdGlvbiAodmlld1R5cGUsIGZhY3RvcnkpIHtcbiAgICAgICAgICAgIHRoaXMuX3ZpZXdDb25maWdGYWN0b3JpZXNbdmlld1R5cGVdID0gZmFjdG9yeTtcbiAgICAgICAgfTtcbiAgICAgICAgVmlld1NlcnZpY2UucHJvdG90eXBlLmNyZWF0ZVZpZXdDb25maWcgPSBmdW5jdGlvbiAocGF0aCwgZGVjbCkge1xuICAgICAgICAgICAgdmFyIGNmZ0ZhY3RvcnkgPSB0aGlzLl92aWV3Q29uZmlnRmFjdG9yaWVzW2RlY2wuJHR5cGVdO1xuICAgICAgICAgICAgaWYgKCFjZmdGYWN0b3J5KVxuICAgICAgICAgICAgIC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bnRleHQgbWF0Y2hlcyB0aGUgVmlld0NvbmZpZydzIGFuY2hvclxuICAgICAgICAgKlxuICAgICAgICAgKiBJZiB0aGUgVmlld0NvbmZpZydzIHRhcmdldCB1aS12aWV3IG5hbWUgaXMgYSBzZWdtZW50ZWQgbmFtZSAod2l0aCBkb3RzKSwgdGhlbiBhIHVpLXZpZXcgbWF0Y2hlcyBpZjpcbiAgICAgICAgICogLSBUaGVyZSBleGlzdHMgYSBwYXJlbnQgdWktdmlldyB3aGVyZTpcbiAgICAgICAgICogICAgLSB0aGUgcGFyZW50IHVpLXZpZXcncyBuYW1lIG1hdGNoZXMgdGhlIGZpcnN0IHNlZ21lbnQgKGluZGV4IDApIG9mIHRoZSBWaWV3Q29uZmlnJ3MgdGFyZ2V0IG5hbWVcbiAgICAgICAgICogICAgLSB0aGUgcGFyZW50IHVpLXZpZXcncyBjb250ZXh0IG1hdGNoZXMgdGhlIFZpZXdDb25maWcncyBhbmNob3JcbiAgICAgICAgICogLSBBbmQgdGhlIHJlbWFpbmluZyBzZWdtZW50cyAoaW5kZXggMS4ubikgb2YgdGhlIFZpZXdDb25maWcncyB0YXJnZXQgbmFtZSBtYXRjaCB0aGUgdGFpbCBvZiB0aGUgdWktdmlldydzIGZxblxuICAgICAgICAgKlxuICAgICAgICAgKiBFeGFtcGxlOlxuICAgICAgICAgKlxuICAgICAgICAgKiBET006XG4gICAgICAgICAqIDx1aS12aWV3PiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gY3JlYXRlZCBpbiB0aGUgcm9vdCBjb250ZXh0IChuYW1lOiBcIlwiKSAtLT5cbiAgICAgICAgICogICA8dWktdmlldyBuYW1lPVwiZm9vXCI+ICAgICAgICAgICAgICAgIDwhLS0gY3JlYXRlZCBpbiB0aGUgY29udGV4dCBuYW1lZDogXCJBXCIgICAgICAtLT5cbiAgICAgICAgICogICAgIDx1aS12aWV3PiAgICAgICAgICAgICAgICAgICAgPCEtLSBjcmVhdGVkIGluIHRoZSBjb250ZXh0IG5hbWVkOiBcIkEuQlwiICAgIC0tPlxuICAgICAgICAgKiAgICAgICA8dWktdmlldyBuYW1lPVwiYmFyXCI+ICAgICAgICAgICAgPCEtLSBjcmVhdGVkIGluIHRoZSBjb250ZXh0IG5hbWVkOiBcIkEuQi5DXCIgIC0tPlxuICAgICAgICAgKiAgICAgICA8L3VpLXZpZXc+XG4gICAgICAgICAqICAgICA8L3VpLXZpZXc+XG4gICAgICAgICAqICAgPC91aS12aWV3PlxuICAgICAgICAgKiA8L3VpLXZpZXc+XG4gICAgICAgICAqXG4gICAgICAgICAqIHVpVmlld3M6IFtcbiAgICAgICAgICogIHsgZnFuOiBcIiRkZWZhdWx0XCIsICAgICAgICAgICAgICAgICAgY3JlYXRpb25Db250ZXh0OiB7IG5hbWU6IFwiXCIgfSB9LFxuICAgICAgICAgKiAgeyBmcW46IFwiJGRlZmF1bHQuZm9vXCIsICAgICAgICAgICAgICBjcmVhdGlvbkNvbnRleHQ6IHsgbmFtZTogXCJBXCIgfSB9LFxuICAgICAgICAgKiAgeyBmcW46IFwiJGRlZmF1bHQuZm9vLiRkZWZhdWx0XCIsICAgICBjcmVhdGlvbkNvbnRleHQ6IHsgbmFtZTogXCJBLkJcIiB9IH1cbiAgICAgICAgICogIHsgZnFuOiBcIiRkZWZhdWx0LmZvby4kZGVmYXVsdC5iYXJcIiwgY3JlYXRpb25Db250ZXh0OiB7IG5hbWU6IFwiQS5CLkNcIiB9IH1cbiAgICAgICAgICogXVxuICAgICAgICAgKlxuICAgICAgICAgKiBUaGVzZSBmb3VyIHZpZXcgY29uZmlncyBhbGwgbWF0Y2ggdGhlIHVpLXZpZXcgd2l0aCB0aGUgZnFuOiBcIiRkZWZhdWx0LmZvby4kZGVmYXVsdC5iYXJcIjpcbiAgICAgICAgICpcbiAgICAgICAgICogLSBWaWV3Q29uZmlnMTogeyB1aVZpZXdOYW1lOiBcImJhclwiLCAgICAgICAgICAgICAgICAgICAgICAgdWlWaWV3Q29udGV4dEFuY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ICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgb3Igc2V0cyB0aGUgaGFzaFByZWZpeFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFRoaXMgb25seSBhcHBsaWVzIHdoZW4gbm90IHJ1bm5pbmcgaW4gW1todG1sNU1vZGVdXSAocHVzaHN0YXRlIG1vZGUpXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogSWYgdGhlIGN1cnJlbnQgdXJsIGlzIGBodHRwOi8vbG9jYWxob3N0L2FwcCMhL3Vpcm91dGVyL3BhdGgvI2FuY2hvcmAsIGl0IHJldHVybnMgYCFgIHdoaWNoIGlzIHRoZSBwcmVmaXggZm9yIHRoZSBcImhhc2hiYW5nXCIgcG9ydGlvbi5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBoYXNoIHByZWZpeFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmhhc2hQcmVmaXggPSBmdW5jdGlvbiAobmV3cHJlZml4KSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25Db25maWcuaGFzaFByZWZpeChuZXdwcmVmaXgpOyB9O1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBob3N0LCBlLmcuLCBgbG9jYWxob3N0YFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHByb3RvY29sXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuaG9zdCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvbkNvbmZpZy5ob3N0KCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFJldHVybnMgdHJ1ZSB3aGVuIHJ1bm5pbmcgaW4gcHVzaHN0YXRlIG1vZGVcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRydWUgd2hlbiBydW5uaW5nIGluIGh0bWw1IG1vZGUgKHB1c2hzdGF0ZSBtb2RlKS5cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5odG1sNU1vZGUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25Db25maWcuaHRtbDVNb2RlKCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgdGhlIHBvcnQsIGUuZy4sIGA4MGBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBwb3J0IG51bWJlclxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLnBvcnQgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25Db25maWcucG9ydCgpOyB9O1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBwcm90b2NvbCwgZS5nLiwgYGh0dHBgXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQHJldHVybiB0aGUgcHJvdG9jb2xcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5wcm90b2NvbCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvbkNvbmZpZy5wcm90b2NvbCgpOyB9O1xuICAgICAgICB9XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBEZWZpbmVzIHdoZXRoZXIgVVJMIG1hdGNoaW5nIHNob3VsZCBiZSBjYXNlIHNlbnNpdGl2ZSAodGhlIGRlZmF1bHQgYmVoYXZpb3IpLCBvciBub3QuXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLy8gQWxsb3cgY2FzZSBpbnNlbnNpdGl2ZSB1cmwgbWF0Y2hlc1xuICAgICAgICAgKiB1cmxTZXJ2aWNlLmN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AgICAgICAgICogQ3JlYXRlcyBhbmQgcmVnaXN0ZXJzIGEgY3VzdG9tIFtbUGFyYW1UeXBlXV0gb2JqZWN0XG4gICAgICAgICAqXG4gICAgICAgICAqIEEgY3VzdG9tIHBhcmFtZXRlciB0eXBlIGNhbiBiZSB1c2VkIHRvIGdlbmVyYXRlIFVSTHMgd2l0aCB0eXBlZCBwYXJhbWV0ZXJzIG9yIGN1c3RvbSBlbmNvZGluZy9kZWNvZGluZy5cbiAgICAgICAgICpcbiAgICAgICAgICogIyMjIyBOb3RlOiBSZWdpc3RlciBjdXN0b20gdHlwZXMgKmJlZm9yZSB1c2luZyB0aGVtKiBpbiBhIHN0YXRlIGRlZmluaXRpb24uXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLy8gRW5jb2RlIG9iamVjdCBwYXJhbWV0ZXIgYXMgSlNPTiBzdHJpbmdcbiAgICAgICAgICogdXJsU2VydmljZS5jb25maWcudHlwZSgnbXlqc29uJywge1xuICAgICAgICAgKiAgIGVuY29kZTogKG9iaikgPT4gSlNPTi5zdHJpbmdpZnkob2JqKSxcbiAgICAgICAgICogICBkZWNvZGU6IChzdHIpID0+IEpTT04ucGFyc2Uoc3RyKSxcbiAgICAgICAgICogICBpczogKHZhbCkgPT4gdHlwZW9mKHZhbCkgPT09ICdvYmplY3QnLFxuICAgICAgICAgKiAgIHBhdHRlcm46IC9bXi9dKy8sXG4gICAgICAgICAqICAgZXF1YWxzOiAoYSwgYikgPT4gXy5pc0VxdWFsKGEsIGIpLFxuICAgICAgICAgKiB9KTtcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqIFNlZSBbW1BhcmFtVHlwZURlZmluaXRpb25dXSBmb3IgbW9yZSBleGFtcGxlc1xuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gbmFtZSBUaGUgdHlwZSBuYW1lLlxuICAgICAgICAgKiBAcGF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ybiBVcmxDb25maWc7XG4gICAgfSgpKTtcblxuICAgIC8qKlxuICAgICAqIEFQSSBmb3IgVVJMIG1hbmFnZW1lbnRcbiAgICAgKi9cbiAgICB2YXIgVXJsU2VydmljZSA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgLyoqIEBpbnRlcm5hbCAqL1xuICAgICAgICBmdW5jdGlvbiBVcmxTZXJ2aWNlKC8qKiBAaW50ZXJuYWwgKi8gcm91dGVyKSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAgICAgdGhpcy5yb3V0ZXIgPSByb3V0ZXI7XG4gICAgICAgICAgICAvKiogQGludGVybmFsICovIHRoaXMuaW50ZXJjZXB0RGVmZXJyZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogVGhlIG5lc3RlZCBbW1VybFJ1bGVzXV0gQVBJIGZvciBtYW5hZ2luZyBVUkwgcnVsZXMgYW5kIHJld3JpdGVzXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogU2VlOiBbW1VybFJ1bGVzXV0gZm9yIGRldGFpbHNcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5ydWxlcyA9IG5ldyBVcmxSdWxlcyh0aGlzLnJvdXRlcik7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFRoZSBuZXN0ZWQgW1tVcmxDb25maWddXSBBUEkgdG8gY29uZmlndXJlIHRoZSBVUkwgYW5kIHJldHJpZXZlIFVSTCBpbmZvcm1hdGlvblxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFNlZTogW1tVcmxDb25maWddXSBmb3IgZGV0YWlsc1xuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmNvbmZpZyA9IG5ldyBVcmxDb25maWcodGhpcy5yb3V0ZXIpO1xuICAgICAgICAgICAgLy8gRGVsZWdhdGUgdGhlc2UgY2FsbHMgdG8gdGhlIGN1cnJlbnQgTG9jYXRpb25TZXJ2aWNlcyBpbXBsZW1lbnRhdGlvblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBjdXJyZW50IHVybCwgb3IgdXBkYXRlcyB0aGUgdXJsXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogIyMjIEdldHRpbmcgdGhlIGN1cnJlbnQgVVJMXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogV2hlbiBubyBhcmd1bWVudHMgYXJlIHBhc3NlZCwgcmV0dXJucyB0aGUgY3VycmVudCBVUkwuXG4gICAgICAgICAgICAgKiBUaGUgVVJMIGlzIG5vcm1hbGl6ZWQgdXNpbmcgdGhlIGludGVybmFsIFtbcGF0aF1dL1tbc2VhcmNoXV0vW1toYXNoXV0gdmFsdWVzLlxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEZvciBleGFtcGxlLCB0aGUgVVJMIG1heSBiZSBzdG9yZWQgaW4gdGhlIGhhc2ggKFtbSGFzaExvY2F0aW9uU2VydmljZXNdXSkgb3JcbiAgICAgICAgICAgICAqIGhhdmUgYSBiYXNlIEhSRUYgcHJlcGVuZGVkIChbW1B1c2hTdGF0ZUxvY2F0aW9uU2VydmljZXNdXSkuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogVGhlIHJhdyBVUkwgaW4gdGhlIGJyb3dzZXIgbWlnaHQgYmU6XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKiBodHRwOi8vbXlzaXRlLmNvbS9zb21lcGF0aC9pbmRleC5odG1sIy9pbnRlcm5hbC9wYXRoLzEyMz9wYXJhbTE9Zm9vI2FuY2hvclxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogb3JcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqIGh0dHA6Ly9teXNpdGUuY29tL2Jhc2VwYXRoL2ludGVybmFsL3BhdGgvMTIzP3BhcmFtMT1mb28jYW5jaG9yXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiB0aGVuIHRoaXMgbWV0aG9kIHJldHVybnM6XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKiAvaW50ZXJuYWwvcGF0aC8xMjM/cGFyYW0xPWZvbyNhbmNob3JcbiAgICAgICAgICAgICAqIGBgYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiAjIyMjIEV4YW1wbGU6XG4gICAgICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgICAgICogbG9jYXRpb25TZXJ2aWNlcy51cmwoKTsgLy8gXCIvc29tZS9wYXRoP3F1ZXJ5PXZhbHVlI2FuY2hvclwiXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiAjIyMgVXBkYXRpbmcgdGhlIFVSTFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFdoZW4gYG5ld3VybGAgYXJndW1lbnRzIGlzIHByb3ZpZGVkLCBjaGFuZ2VzIHRoZSBVUkwgdG8gcmVmbGVjdCBgbmV3dXJsYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICAgICAqIGBgYGpzXG4gICAgICAgICAgICAgKiBsb2NhdGlvblNlcnZpY2VzLnVybChcIi9zb21lL3BhdGg/cXVlcnk9dmFsdWUjYW5jaG9yXCIsIHRydWUpO1xuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQHBhcmFtIG5ld3VybCBUaGUgbmV3IHZhbHVlIGZvciB0aGUgVVJMLlxuICAgICAgICAgICAgICogICAgICAgICAgICAgICBUaGlzIHVybCBzaG91bGQgcmVmb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mFsdWUjYW5jaG9yYCwgdGhpcyByZXR1cm5zIGAvc29tZS9wYXRoYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHBhdGggcG9ydGlvbiBvZiB0aGUgdXJsXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMucGF0aCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvblNlcnZpY2UucGF0aCgpOyB9O1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBzZWFyY2ggcGFydCBvZiB0aGUgY3VycmVudCB1cmwgYXMgYW4gb2JqZWN0XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogSWYgdGhlIGN1cnJlbnQgVVJMIGlzIGAvc29tZS9wYXRoP3F1ZXJ5PXZhbHVlI2FuY2hvcmAsIHRoaXMgcmV0dXJucyBgeyBxdWVyeTogJ3ZhbHVlJyB9YFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHNlYXJjaCAocXVlcnkpIHBvcnRpb24gb2YgdGhlIHVybCwgYXMgYW4gb2JqZWN0XG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuc2VhcmNoID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMucm91dGVyLmxvY2F0aW9uU2VydmljZS5zZWFyY2goKTsgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogR2V0cyB0aGUgaGFzaCBwYXJ0IG9mIHRoZSBjdXJyZW50IHVybFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIElmIHRoZSBjdXJyZW50IFVSTCBpcyBgL3NvbWUvcGF0aD9xdWVyeT12YWx1ZSNhbmNob3JgLCB0aGlzIHJldHVybnMgYGFuY2hvcmBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBoYXNoIChhbmNob3IpIHBvcnRpb24gb2YgdGhlIHVybFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmhhc2ggPSBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25TZXJ2aWNlLmhhc2goKTsgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogQGludGVybmFsXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogUmVnaXN0ZXJzIGEgbG93IGxldmVsIHVybCBjaGFuZ2UgaGFuZGxlclxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIE5vdGU6IEJlY2F1c2UgdGhpcyBpcyBhIGxvdyBsZXZlbCBoYW5kbGVyLCBpdCdzIG5vdCByZWNvbW1lbmRlZCBmb3IgZ2VuZXJhbCB1c2UuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogIyMjIyBFeGFtcGxlOlxuICAgICAgICAgICAgICogYGBganNcbiAgICAgICAgICAgICAqIGxldCBkZXJlZ2lzdGVyRm4gPSBsb2NhdGlvblNlcnZpY2VzLm9uQ2hhbmdlKChldnQpID0+IGNvbnNvbGUubG9nKFwidXJsIGNoYW5nZVwiLCBldnQpKTtcbiAgICAgICAgICAgICAqIGBgYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBwYXJhbSBjYWxsYmFjayBhIGZ1bmN0aW9uIHRoYXQgd2lsbCBiZSBjYWxsZWQgd2hlbiB0aGUgdXJsIGlzIGNoYW5naW5nXG4gICAgICAgICAgICAgKiBAcmV0dXJuIGEgZnVuY3Rpb24gdGhhdCBkZS1yZWdpc3RlcnMgdGhlIGNhbGxiYWNrXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMub25DaGFuZ2UgPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvblNlcnZpY2Uub25DaGFuZ2UoY2FsbGJhY2spOyB9O1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RoZSBzdGF0ZSAob3IgcmVkaXJlY3QsIGV0Yykgd2hpY2ggbWF0Y2hlcyB0aGUgY3VycmVudCBVUkwuXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogdXJsU2VydmljZS5kZWZlckludGVyY2VwdCgpO1xuICAgICAgICAgKlxuICAgICAgICAgKiBmZXRjaCgnL3N0YXRlcy5qc29uJykudGhlbihyZXNwID0+IHJlc3AuanNvbigpKS50aGVuKGRhdGEgPT4ge1xuICAgICAgICAgKiAgIGRhdGEuZm9yRWFjaChzdGF0ZSA9PiAkc3RhdGVSZWdpc3RyeS5yZWdpc3RlcihzdGF0ZSkpO1xuICAgICAgICAgKiAgIHVybFNlcnZpY2UubGlzdGVuKCk7XG4gICAgICAgICAqICAgLy8gRmluZCB0aGUgbWF0Y2hpbmcgVVJMIGFuZCBpbnZva2UgdGhlIGhhbmRsZXIuXG4gICAgICAgICAqICAgdXJsU2VydmljZS5zeW5jKCk7XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICovXG4gICAgICAgIFVybFNlcnZpY2UucHJvdG90eXBlLnN5bmMgPSBmdW5jdGlvbiAoZXZ0KSB7XG4gICAgICAgICAgICBpZiAoZXZ0ICYmIGV2dC5kZWZhdWx0UHJldmVudGVkKVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIHZhciBfYSA9IHRoaXMucm91dGVyLCB1cmxTZXJ2aWNlID0gX2EudXJsU2VydmljZSwgc3RhdGVTZXJ2aWNlID0gX2Euc3RhdGVTZXJ2aWNlO1xuICAgICAgICAgICAgdmFyIHVybCA9IHsgcGF0aDogdXJsU2VydmljZS5wYXRoKCksIHNlYXJjaDogdXJsU2VydmljZS5zZWFyY2goKSwgaGFzaDogdXJsU2VydmljZS5oYXNoKCkgfTtcbiAgICAgICAgICAgIHZhciBiZXN0ID0gdGhpcy5tYXRjaCh1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ICAgICAgICAgICAgICAgIC8vIFRoZSBsYXp5IHN0YXRlIHNob3VsZCBiZSBsb2FkZWQgbm93LCBzbyByZS10cnkgdGhlIG9yaWdpbmFsIHRyYW5zaXRpb25cbiAgICAgICAgICAgICAgICB2YXIgb3JpZyA9IHRyYW5zaXRpb24udGFyZ2V0U3RhdGUoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcm91dGVyLnN0YXRlU2VydmljZS50YXJnZXQob3JpZy5pZGVudGlmaWVyKCksIG9yaWcucGFyYW1zKCksIG9yaWcub3B0aW9ucygpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFRoZSBvcmlnaW5hbCB0cmFuc2l0aW9uIHdhcyB0cmlnZ2VyZWQgdmlhIHVybCBzeW5jXG4gICAgICAgICAgICAvLyBSdW4gdGhlIFVSTCBydWxlcyBhbmQgZmluZCB0aGUgYmVzdCBtYXRjaFxuICAgICAgICAgICAgdmFyICR1cmwgPSByb3V0ZXIudXJsU2VydmljZTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSAkdXJsLm1hdGNoKCR1cmwucGFydHMoKSk7XG4gICAgICAgICAgICB2YXIgcnVsZSA9IHJlc3VsdCAmJiByZXN1bHQucnVsZTtcbiAgICAgICAgICAgIC8vIElmIHRoZSBiZXN0IG1hdGNoIGlzIGEgc3RhdGUsIHJlZGlyZWN0IHRoZSB0cmFuc2l0aW9uIChpbnN0ZWFkXG4gICAgICAgICAgICAvLyBvZiBjYWxsaW5nIHN5bmMoKSB3aGljaCBzdXBlcnNlZGVzIHRoZSBjdXJyZW50IHRyYW5zaXRpb24pXG4gICAgICAgICAgICBpZiAocnVsZSAmJiBydWxlLnR5cGUgPT09ICdTVEFURScpIHtcbiAgICAgICAgICAgICAgICB2YXIgc3RhdGUgPSBydWxlLnN0YXRlO1xuICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSByZXN1bHQubWF0Y2g7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJvdXRl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uICAgICAqIEBwYXJhbSBzdGF0ZSB0aGUgc3RhdGUgdG8gbGF6eSBsb2FkXG4gICAgICogQHJldHVybnMgQSBwcm9taXNlIGZvciB0aGUgbGF6eSBsb2FkIHJlc3VsdFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGxhenlMb2FkU3RhdGUodHJhbnNpdGlvbiwgc3RhdGUpIHtcbiAgICAgICAgdmFyIGxhenlMb2FkRm4gPSBzdGF0ZS4kJHN0YXRlKCkubGF6eUxvYWQ7XG4gICAgICAgIC8vIFN0b3JlL2dldCB0aGUgbGF6eSBsb2FkIHByb21pc2Ugb24vZnJvbSB0aGUgaG9va2ZuIHNvIGl0IGRvZXNuJ3QgZ2V0IHJlLWludm9rZWRcbiAgICAgICAgdmFyIHByb21pc2UgPSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICBpZiAoIXByb21pc2UpIHtcbiAgICAgICAgICAgIHZhciBzdWNjZXNzID0gZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBzdGF0ZS5sYXp5TG9hZDtcbiAgICAgICAgICAgICAgICBkZWxldGUgc3RhdGUuJCRzdGF0ZSgpLmxhenlMb2FkO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGVycm9yID0gZnVuY3Rpb24gKGVycikge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICAgICAgICAgIHJldHVybiBzZXJ2aWNlcy4kcS5yZWplY3QoZXJyKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBwcm9taXNlID0gbGF6eUxvYWRGblsnX3Byb21pc2UnXSA9IHNlcnZpY2VzLiRxXG4gICAgICAgICAgICAgICAgLndoZW4obGF6eU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doaWNoIGRlcmVnaXN0ZXJzIHRoZSBob29rLlxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uQ3JlYXRlID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uQmVmb3JlID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uU3RhcnQgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25FeGl0ID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uUmV0YWluID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uRW50ZXIgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25GaW5pc2ggPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25TdWNjZXNzID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uRXJyb3IgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBkaXNwb3NlXG4gICAgICAgICAqIEBpbnRlcm5hbFxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLmRpc3Bvc2UgPSBmdW5jdGlvbiAocm91dGVyKSB7XG4gICAgICAgICAgICB2YWx1ZXModGhpcy5fcmVnaXN0ZXJlZEhvb2tzKS5mb3JFYWNoKGZ1bmN0aW9uIChob29rc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhvb2tzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoaG9vaykge1xuICAgICAgICAgICAgICAgICAgICBob29rLl9kZXJlZ2lzdGVyZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZW1vdmVGcm9tK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N0YXRlU2VydmljZV1dKVxuICAgICAqL1xuICAgIHZhciBTdGF0ZVNlcnZpY2UgPSAvKiogQGNsYXNzICovIChmdW5jdGlvbiAoKSB7XG4gICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgZnVuY3Rpb24gU3RhdGVTZXJ2aWNlKC8qKiBAaW50ZXJuYWwgKi8gcm91dGVyKSB7XG4gICAgICAgICAgICB0aGlzLnJvdXRlciA9IHJvdXRlcjtcbiAgICAgICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgICAgIHRoaXMuaW52YWxpZENhbGxiYWNrcyA9IFtdO1xuICAgICAgICAgICAgLyoqIEBpbnRlcm5hbCAqL1xuICAgICAgICAgICAgdGhpcy5fZGVmYXVsdEVycm9ySGFuZGxlciA9IGZ1bmN0aW9uICRkZWZhdWx0RXJyb3JIYW5kbGVyKCRlcnJvciQpIHtcbiAgICAgICAgICAgICAgICBpZiAoJGVycm9yJCBpbnN0YW5jZW9mIEVycm9yICYmICRlcnJvciQuc3RhY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkLnN0YWNrKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoJGVycm9yJCBpbnN0YW5jZW9mIFJlamVjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCRlcnJvciQudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgkZXJyb3IkLmRldGFpbCAmJiAkZXJyb3IkLmRldGFpbC5zdGFjaylcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJGVycm9yJC5kZXRhaWwuc3RhY2spO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGdldHRlcnMgPSBbJ2N1cnJlbnQnLCAnJGN1cnJlbnQnLCAncGFyYW1zJywgJ3RyYW5zaXRpb24nXTtcbiAgICAgICAgICAgIHZhciBib3VuZEZucyA9IE9iamVjdC5rZXlzKFN0YXRlU2VydmljZS5wcm90b3R5cGUpLmZpbHRlcihub3QoaW5BcnJheShnZXR0ZXJzKSkpO1xuICAgICAgICAgICAgY3JlYXRlUHJveHlGdW5jdGlvbnModmFsKFN0YXRlU2VydmljZS5wcm90b3R5cGUpLCB0aGlzLCB2YWwodGhpcyksIGJvdW5kRm5zKTtcbiAgICAgICAgfVxuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoU3RhdGVTZXJ2aWNlLnByb3RvdHlwZSwgXCJ0cmFuc2l0aW9uXCIsIHtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogVGhlIFtbVHJhbnNpdGlvbl1dIGN1cnJlbnRseSBpbiBwcm9ncmVzcyAob3IgbnVsbClcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZGVwcmVjYXRlZCBUaGlzIGlzIGEgcGFzc3Rocm91Z2ggdGhyb3VnaCB0byBbW1VJUm91dGVyR2xvYmFscy50cmFuc2l0aW9uXV1cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMucm91dGVyLmdsb2JhbHMudHJhbnNpdGlvbjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcbiAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogdHJ1ZVxuICAgICAgICB9KTtcbiAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KFN0YXRlU2VydmljZS5wcm90b3R5cGUsIFwicGFyYW1zXCIsIHtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogVGhlIGxhdGVzdCBzdWNjZXNzZnVsIHN0YXRlIHBhcmFtZXRlcnNcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAZGVwcmVjYXRlZCBUaGlzIGlzIGEgcGFzc3Rocm91Z2ggdGhyb3VnaCB0byBbW1VJUm91dGVyR2xvYmFscy5wYXJhbXNdXVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yb3V0ZXIuZ2xvYmFscy5wYXJhbXM7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgICAgfSk7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShTdGF0ZVNlcnZpY2UucHJvdG90eXBlLCBcImN1cnJlbnRcIiwge1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBUaGUgY3VycmVudCBbW1N0YXRlRGVjbGFyYXRpb25dXVxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIFRoaXMgaXMgYSBwYXNzdGhyb3VnaCB0aHJvdWdoIHRvIFtbVUlSb3V0ZXJHbG9iYWxzLmN1cnJlbnRdXVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yb3V0ZXIuZ2xvYmFscy5jdXJyZW50O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHko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jdG9yID0gbmV3IFJlc29sdmVDb250ZXh0KGZyb21QYXRoKS5pbmplY3RvcigpO1xuICAgICAgICAgICAgdmFyIGNoZWNrRm9yUmVkaXJlY3QgPSBmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgaWYgKCEocmVzdWx0IGluc3RhbmNlb2YgVGFyZ2V0U3RhdGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IHJlc3VsdDtcbiAgICAgICAgICAgICAgICAvLyBSZWNyZWF0ZSB0aGUgVGFyZ2V0U3RhdGUsIGluIGNhc2UgdGhlIHN0YXRlIGlzIG5vdyBkZWZpbmVkLlxuICAgICAgICAgICAgICAgIHRhcmdldCA9IF90aGlzLnRhcmdldCh0YXJnZXQuaWRlbnRpZmllcigpLCB0YXJnZXQucGFyYW1zKCksIHRhcmdldC5vcHRpb25zKCkpO1xuICAgICAgICAgICAgICAgIGlmICghdGFyZ2V0LnZhbGlkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJlamVjdGlvbi5pbnZhbGlkKHRhcmdldC5lcnJvcigpKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGxhdGVzdFRoaW5nKCkgIT09IGxhdGVzdCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmVqZWN0aW9uLnN1cGVyc2VkZWQoKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLnRyYW5zaXRpb25Ubyh0YXJnZXQuaWRlbnRpZmllcigpLCB0YXJnZXQucGFyYW1zKCksIHRhcmdldC5vcHRpb25zKCkpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGludm9rZU5leHRDYWxsYmFjaygpIHtcbiAgICAgICAgIC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dGVyTGlzdGVuZXIoKSB7XG4gICAgICAgICAgICAgICAgcmVtb3ZlRnJvbSh0aGlzLmludmFsaWRDYWxsYmFja3MpKGNhbGxiYWNrKTtcbiAgICAgICAgICAgIH0uYmluZCh0aGlzKTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJlbG9hZHMgdGhlIGN1cnJlbnQgc3RhdGVcbiAgICAgICAgICpcbiAgICAgICAgICogQSBtZXRob2QgdGhhdCBmb3JjZSByZWxvYWRzIHRoZSBjdXJyZW50IHN0YXRlLCBvciBhIHBhcnRpYWwgc3RhdGUgaGllcmFyY2h5LlxuICAgICAgICAgKiBBbGwgcmVzb2x2ZXMgYXJlIHJlLXJlc29sdmVkLCBhbmQgY29tcG9uZW50cyByZWluc3RhbnRpYXRlZC5cbiAgICAgICAgICpcbiAgICAgICAgICogIyMjIyBFeGFtcGxlOlxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiBsZXQgYXBwIGFuZ3VsYXIubW9kdWxlKCdhcHAnLCBbJ3VpLnJvdXRlciddKTtcbiAgICAgICAgICpcbiAgICAgICAgICogYXBwLmNvbnRyb2xsZXIoJ2N0cmwnLCBmdW5jdGlvbiAoJHNjb3BlLCAkc3RhdGUpIHtcbiAgICAgICAgICogICAkc2NvcGUucmVsb2FkID0gZnVuY3Rpb24oKXtcbiAgICAgICAgICogICAgICRzdGF0ZS5yZWxvYWQoKTtcbiAgICAgICAgICogICB9XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogTm90ZTogYHJlbG9hZCgpYCBpcyBqdXN0IGFuIGFsaWFzIGZvcjpcbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogJHN0YXRlLnRyYW5zaXRpb25Ubygkc3RhdGUuY3VycmVudCwgJHN0YXRlLnBhcmFtcywge1xuICAgICAgICAgKiAgIHJlbG9hZDogdHJ1ZSwgaW5oZXJpdDogZ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XR1cm4gc2VydmljZXMuJHEud2hlbihnbG9iYWxzLmN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXRhaWwgPSBlcnJvci5kZXRhaWw7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvci50eXBlID09PSBleHBvcnRzLlJlamVjdFR5cGUuU1VQRVJTRURFRCAmJiBlcnJvci5yZWRpcmVjdGVkICYmIGRldGFpbCBpbnN0YW5jZW9mIFRhcmdldFN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBgVHJhbnNpdGlvbi5ydW4oKWAgd2FzIHJlZGlyZWN0ZWQsIGFsbG93IHRoZSBgdHJhbnNpdGlvblRvKClgIHByb21pc2UgdG8gcmVzb2x2ZSBzdWNjZXNzZnVsbHlcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJ5IHJldHVybmluZyB0aGUgcHJvbWlzZSBmb3IgdGhlIG5ldyAocmVkaXJlY3QpIGBUcmFuc2l0aW9uLnJ1bigpYC5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWRpcmVjdCA9IHRyYW5zLnJlZGlyZWN0KGRldGFpbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVkaXJlY3QucnVuKCkuY2F0Y2gocmVqZWN0ZWRUcmFuc2l0aW9uSGFuZGxlcihyZWRpcmVjdCkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvci50eXBlID09PSBleHBvcnRzLlJlamVjdFR5cGUuQUJPUlRFRCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaXNMYXRlc3QgJiYgcm91dGVyLnVybFJvdXRlci51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXJ2aWNlcy4kcS5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAg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ICAgICBpbmhlcml0OiB0cnVlLFxuICAgICAgICAgICAgICAgIGFic29sdXRlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICByZWxhdGl2ZTogdGhpcy4kY3VycmVudCxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBvcHRpb25zID0gZGVmYXVsdHMob3B0aW9ucywgZGVmYXVsdEhyZWZPcHRzKTtcbiAgICAgICAgICAgIHBhcmFtcyA9IHBhcmFtcyB8fCB7fTtcbiAgICAgICAgICAgIHZhciBzdGF0ZSA9IHRoaXMucm91dGVyLnN0YXRlUmVnaXN0cnkubWF0Y2hlci5maW5kKHN0YXRlT3JOYW1lLCBvcHRpb25zLnJlbGF0aXZlKTtcbiAgICAgICAgICAgIGlmICghaXNEZWZpbmVkKHN0YXRlKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLmluaGVyaXQpXG4gICAgICAgICAgICAgICAgcGFyYW1zID0gdGhpcy5wYXJhbXMuJGluaGVyaXQocGFyYW1zLCB0aGlzLiRjdXJyZW50LCBzdGF0ZSk7XG4gICAgICAgICAgICB2YXIgbmF2ID0gc3RhdGUgJiYgb3B0aW9ucy5sb3NzeSA/IHN0YXRlLm5hdmlnYWJsZSA6IHN0YXRlO1xuICAgICAgICAgICAgaWYgKCFuYXYgfHwgbmF2LnVybCA9PT0gdW5kZWZpbmVkIHx8IG5hdi51cmwgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiB0aGlzLnJvdXRlci51cmxSb3V0ZXIuaHJlZihuYXYudXJsLCBwYXJhbXMsIHsgYWJzb2x1dGU6IG9wdGlvbnMuYWJzb2x1dGUgfSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBTZXRzIG9yIGdldHMgdGhlIGRlZmF1bHQgW1t0cmFuc2l0aW9uVG9dXSBl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B7XG4gICAgICAgICAgICBpZiAoaXNBcnJheShwcm9taXNlcykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5hbGwocHJvbWlzZXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHByb21pc2VzKSkge1xuICAgICAgICAgICAgICAgIC8vIENvbnZlcnQgcHJvbWlzZXMgbWFwIHRvIHByb21pc2VzIGFycmF5LlxuICAgICAgICAgICAgICAgIC8vIFdoZW4gZWFjaCBwcm9taXNlIHJlc29sdmVzLCBtYXAgaXQgdG8gYSB0dXBsZSB7IGtleToga2V5LCB2YWw6IHZhbCB9XG4gICAgICAgICAgICAgICAgdmFyIGNoYWluID0gT2JqZWN0LmtleXMocHJvbWlzZXMpLm1hcChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiBwcm9taXNlc1trZXldLnRoZW4oZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gKHsga2V5OiBrZXksIHZhbDogdmFsIH0pOyB9KTsgfSk7XG4gICAgICAgICAgICAgICAgLy8gVGhlbiB3YWl0IGZvciBhbGwgcHJvbWlzZXMgdG8gcmVzb2x2ZSwgYW5kIGNvbnZlcnQgdGhlbSBiYWNrIHRvIGFuIG9iamVjdFxuICAgICAgICAgICAgICAgIHJldHVybiAkcS5hbGwoY2hhaW4pLnRoZW4oZnVuY3Rpb24gKHZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWVzLnJlZHVjZShmdW5jdGlvbiAoYWNjLCB0dXBsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWNjW3R1cGxlLmtleV0gPSB0dXBsZS52YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgICAgICB9LCB7fSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgfTtcblxuICAgIC8vIGdsb2JhbGx5IGF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ovXG4gICAgICAgIGFubm90YXRlOiBmdW5jdGlvbiAoZm4pIHtcbiAgICAgICAgICAgIGlmICghaXNJbmplY3RhYmxlKGZuKSlcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJOb3QgYW4gaW5qZWN0YWJsZSBmdW5jdGlvbjogXCIgKyBmbik7XG4gICAgICAgICAgICBpZiAoZm4gJiYgZm4uJGluamVjdClcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4uJGluamVjdDtcbiAgICAgICAgICAgIGlmIChpc0FycmF5KGZuKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4uc2xpY2UoMCwgLTEpO1xuICAgICAgICAgICAgdmFyIGZuU3RyID0gZm4udG9TdHJpbmcoKS5yZXBsYWNlKFNUUklQX0NPTU1FTlRTLCAnJyk7XG4gICAgICAgICAgICB2YXIgcmVzdWx0ID0gZm5TdHIuc2xpY2UoZm5TdHIuaW5kZXhPZignKCcpICsgMSwgZm5TdHIuaW5kZXhPZignKScpKS5tYXRjaChBUkdVTUVOVF9OQU1FUyk7XG4gICAgICAgICAgICByZXR1cm4gcmVzdWx0IHx8IFtdO1xuICAgICAgICB9LFxuICAgIH07XG5cbiAgICB2YXIga2V5VmFsc1RvT2JqZWN0UiA9IGZ1bmN0aW9uIChhY2N1bSwgX2EpIHtcbiAgICAgICAgdmFyIGtleSA9IF9hWzBdLCB2YWwgPSBfYVsxXTtcbiAgICAgICAgaWYgKCFhY2N1bS5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICBhY2N1bVtrZXldID0gdmFsO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGlzQXJyYXkoYWNjdW1ba2V5XSkpIHtcbiAgICAgICAgICAgIGFjY3VtW2tleV0ucHVzaCh2YWwpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgYWNjdW1ba2V5XSA9IFthY2N1bVtrZXldLCB2YWxdO1xuICAgICAgIC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VybCA9IGZ1bmN0aW9uICh1cmwsIHJlcGxhY2UpIHtcbiAgICAgICAgICAgIGlmIChyZXBsYWNlID09PSB2b2lkIDApIHsgcmVwbGFjZSA9IHRydWU7IH1cbiAgICAgICAgICAgIGlmIChpc0RlZmluZWQodXJsKSAmJiB1cmwgIT09IHRoaXMuX2dldCgpKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2V0KG51bGwsIG51bGwsIHVybCwgcmVwbGFjZSk7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuZmlyZUFmdGVyVXBkYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX2xpc3RlbmVycy5mb3JFYWNoKGZ1bmN0aW9uIChjYikgeyByZXR1cm4gY2IoeyB1cmw6IHVybCB9KTsgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGJ1aWxkVXJsKHRoaXMpO1xuICAgICAgICB9O1xuICAgICAgICBCYXNlTG9jYXRpb25TZXJ2aWNlcy5wcm90b3R5cGUub25DaGFuZ2UgPSBmdW5jdGlvbiAoY2IpIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICB0aGlzLl9saXN0ZW5lcnMucHVzaChjYik7XG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKCkgeyByZXR1cm4gcmVtb3ZlRnJvbShfdGhpcy5fbGlzdGVuZXJzLCBjYik7IH07XG4gICAgICAgIH07XG4gICAgICAgIEJhc2VMb2NhdGlvblNlcnZpY2VzLnByb3RvdHlwZS5kaXNwb3NlID0gZnVuY3Rpb24gKHJvdXRlcikge1xuICAgICAgICAgICAgZGVyZWdBbGwodGhpcy5fbGlzdGVuZXJzKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIEJhc2VMb2NhdGlvblNlcnZpY2VzO1xuICAgIH0oKSk7XG5cbiAgICB2YXIgX19leHRlbmRzID0gKHVuZGVmaW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ixcbiAgICAgICAgdW5pcVI6IHVuaXFSLFxuICAgICAgICB1bm5lc3Q6IHVubmVzdCxcbiAgICAgICAgZmxhdHRlbjogZmxhdHRlbixcbiAgICAgICAgYXNzZXJ0UHJlZGljYXRlOiBhc3NlcnRQcmVkaWNhdGUsXG4gICAgICAgIGFzc2VydE1hcDogYXNzZXJ0TWFwLFxuICAgICAgICBhc3NlcnRGbjogYXNzZXJ0Rm4sXG4gICAgICAgIHBhaXJzOiBwYWlycyxcbiAgICAgICAgYXJyYXlUdXBsZXM6IGFycmF5VHVwbGVzLFxuICAgICAgICBhcHBseVBhaXJzOiBhcHBseVBhaXJzLFxuICAgICAgICB0YWlsOiB0YWlsLFxuICAgICAgICBjb3B5OiBjb3B5LFxuICAgICAgICBfZXh0ZW5kOiBfZXh0ZW5kLFxuICAgICAgICBzaWxlbmNlVW5jYXVnaHRJblByb21pc2U6IHNpbGVuY2VVbmNhdWdodEluUHJvbWlzZSxcbiAgICAgICAgc2lsZW50UmVqZWN0aW9uOiBzaWxlbnRSZWplY3Rpb24sXG4gICAgICAgIG1ha2VTdHViOiBtYWtlU3R1YixcbiAgICAgICAgc2VydmljZXM6IHNlcnZpY2VzLFxuICAgICAgICBHbG9iOiBHbG9iLFxuICAgICAgICBjdXJyeTogY3VycnksXG4gICAgICAgIGNvbXBvc2U6IGNvbXBvc2UsXG4gICAgICAgIHBpcGU6IHBpcGUsXG4gICAgICAgIHByb3A6IHByb3AsXG4gICAgICAgIHByb3BFcTogcHJvcEVxLFxuICAgICAgICBwYXJzZTogcGFyc2UsXG4gICAgICAgIG5vdDogbm90LFxuICAgICAgICBhbmQ6IGFuZCxcbiAgICAgICAgb3I6IG9yLFxuICAgICAgICBhbGw6IGFsbCxcbiAgICAgICAgYW55OiBhbnksXG4gICAgICAgIGlzOiBpcyxcbiAgICAgICAgZXE6IGVxLFxuICAgICAgICB2YWw6IHZhbCxcbiAgICAgICAgaW52b2tlOiBpbnZva2UsXG4gICAgICAgIHBhdHRlc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Y29udHJvbGxlci1zdHlsZSB2aWV3XG4gICAgICAgICAgICBpZiAoaGFzQW55S2V5KGNvbXBLZXlzLCBjb25maWcpICYmIGhhc0FueUtleShub25Db21wS2V5cywgY29uZmlnKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkNhbm5vdCBjb21iaW5lOiBcIiArIGNvbXBLZXlzLmpvaW4oJ3wnKSArIFwiIHdpdGg6IFwiICsgbm9uQ29tcEtleXMuam9pbignfCcpICsgXCIgaW4gc3RhdGV2aWV3OiAnXCIgKyBuYW1lICsgXCJAXCIgKyBzdGF0ZS5uYW1lICsgXCInXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uZmlnLnJlc29sdmVBcyA9IGNvbmZpZy5yZXNvbHZlQXMgfHwgJyRyZXNvbHZlJztcbiAgICAgICAgICAgIGNvbmZpZy4kdHlwZSA9ICduZzEnO1xuICAgICAgICAgICAgY29uZmlnLiRjb250ZXh0ID0gc3RhdGU7XG4gICAgICAgICAgICBjb25maWcuJG5hbWUgPSBuYW1lO1xuICAgICAgICAgICAgdmFyIG5vcm1hbGl6ZWQgPSBWaWV3U2VydmljZS5ub3JtYWxpemVVSVZpZXdUYXJnZXQoY29uZmlnLiRjb250ZXh0LCBjb25maWcuJG5hbWUpO1xuICAgICAgICAgICAgY29uZmlnLiR1aVZpZXdOYW1lID0gbm9ybWFsaXplZC51aVZpZXdOYW1lO1xuICAgICAgICAgICAgY29uZmlnLiR1aVZpZXdDb250ZXh0QW5jaG9yID0gbm9ybWFsaXplZC51aVZpZXdDb250ZXh0QW5jaG9yO1xuICAgICAgICAgICAgdmlld3NbbmFtZV0gPSBjb25maWc7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdmlld3M7XG4gICAgfVxuICAgIC8qKiBAaGlkZGVuICovXG4gICAgdmFyIGlkJDEgPSAwO1xuICAgIC8qKiBAaW50ZXJuYWxhcGkgKi9cbiAgICB2YXIgTmcxVmlld0NvbmZ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G5vZGUucGFyYW1WYWx1ZXMpOyB9LCB7fSk7XG4gICAgICAgICAgICB2YXIgcHJvbWlzZXMgPSB7XG4gICAgICAgICAgICAgICAgdGVtcGxhdGU6ICRxLndoZW4odGhpcy5mYWN0b3J5LmZyb21Db25maWcodGhpcy52aWV3RGVjbCwgcGFyYW1zLCBjb250ZXh0KSksXG4gICAgICAgICAgICAgICAgY29udHJvbGxlcjogJHEud2hlbih0aGlzLmdldENvbnRyb2xsZXIoY29udGV4dCkpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiAkcS5hbGwocHJvbWlzZXMpLnRoZW4oZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVZpZXdTZXJ2aWNlRXZlbnQoJ0xvYWRlZCcsIF90aGlzKTtcbiAgICAgICAgICAgICAgICBfdGhpcy5jb250cm9sbGVyID0gcmVzdWx0cy5jb250cm9sbGVyO1xuICAgICAgICAgICAgICAgIGV4dGVuZChfdGhpcywgcmVzdWx0cy50ZW1wbGF0ZSk7IC8vIEVpdGhlciB7IHRlbXBsYXRlOiBcInRwbFwiIH0gb3IgeyBjb21wb25lbnQ6IFwiY21wTmFtZVwiIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXM7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIEdldHMgdGhlIGNvbnRyb2xsZXIgZm9yIGEgdmlldyBjb25maWd1cmF0aW9uLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb258UHJvbWlzZS48RnVuY3Rpb24+fSBSZXR1cm5zIGEgY29udHJvbGxlciwgb3IgYSBwcm9taXNlIHRoYXQgcmVzb2x2ZXMgdG8gYSBjb250cm9sbGVyLlxuICAgICAgICAgKi9cbiAgICAgICAgTmcxVmlld0NvbmZpZy5wcm90b3R5cGUuZ2V0Q29udHJvbGxlciA9IGZ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oaXMuJGdldCA9IFtcbiAgICAgICAgICAgICAgICAnJGh0dHAnLFxuICAgICAgICAgICAgICAgICckdGVtcGxhdGVDYWNoZScsXG4gICAgICAgICAgICAgICAgJyRpbmplY3RvcicsXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gKCRodHRwLCAkdGVtcGxhdGVDYWNoZSwgJGluamVjdG9yKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLiR0ZW1wbGF0ZVJlcXVlc3QgPSAkaW5qZWN0b3IuaGFzICYmICRpbmplY3Rvci5oYXMoJyR0ZW1wbGF0ZVJlcXVlc3QnKSAmJiAkaW5qZWN0b3IuZ2V0KCckdGVtcGxhdGVSZXF1ZXN0Jyk7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLiRodHRwID0gJGh0dHA7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLiR0ZW1wbGF0ZUNhY2hlID0gJHRlbXBsYXRlQ2FjaGU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcztcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgXTtcbiAgICAgICAgfVxuICAgICAgICAvKiogQGhpZGRlbiAqL1xuICAgICAgICBUZW1wbGF0ZUZhY3RvcnkucHJvdG90eXBlLnVzZUh0dHBTZXJ2aWNlID0gZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICB0aGlzLl91c2VIdHRwID0gdmFsdWU7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgdGVtcGxhdGUgZnJvbSBhIGNvbmZpZ3VyYXRpb24gb2JqZWN0LlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gY29uZmlnIENvbmZpZ3VyYXRpb24gb2JqZWN0IGZvciB3aGljaCB0byBsb2FkIGEgdGVtcGxhdGUuXG4gICAgICAgICAqIFRoZSBmb2xsb3dpbmcgcHJvcGVydGllcyBhcmUgc2VhcmNoIGluIHRoZSBzc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HIpIHsgcmV0dXJuICh7IGNvbXBvbmVudDogc3RyIH0pOyB9KTsgfTtcbiAgICAgICAgICAgIHJldHVybiBpc0RlZmluZWQoY29uZmlnLnRlbXBsYXRlKVxuICAgICAgICAgICAgICAgID8gYXNUZW1wbGF0ZSh0aGlzLmZyb21TdHJpbmcoY29uZmlnLnRlbXBsYXRlLCBwYXJhbXMpKVxuICAgICAgICAgICAgICAgIDogaXNEZWZpbmVkKGNvbmZpZy50ZW1wbGF0ZVVybClcbiAgICAgICAgICAgICAgICAgICAgPyBhc1RlbXBsYXRlKHRoaXMuZnJvbVVybChjb25maWcudGVtcGxhdGVVcmwsIHBhcmFtcykpXG4gICAgICAgICAgICAgICAgICAgIDogaXNEZWZpbmVkKGNvbmZpZy50ZW1wbGF0ZVByb3ZpZGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBhc1RlbXBsYXRlKHRoaXMuZnJvbVByb3ZpZGVyKGNvbmZpZy50ZW1wbGF0ZVByb3ZpZGVyLCBwYXJhbXMsIGNvbnRleHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBpc0RlZmluZWQoY29uZmlnLmNvbXBvbmVudClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFzQ29tcG9uZW50KGNvbmZpZy5jb21wb25lbnQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBpc0RlZmluZWQoY29uZmlnLmNvbXBvbmVudFByb3ZpZGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFzQ29tcG9uZW50KHRoaXMuZnJvbUNvbXBvbmVudFByb3ZpZGVyKGNvbmZpZy5jb21wb25lbnRQcm92aWRlciwgcGFyYW1zLCBjb250ZXh0KSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBhc1RlbXBsYXRlKGRlZmF1bHRUZW1wbGF0ZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgdGVtcG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GZ1bmN0aW9uLlxuICAgICAgICAgKiBAcmV0dXJuIHtzdHJpbmd8UHJvbWlzZS48c3RyaW5nPn0gVGhlIHRlbXBsYXRlIGh0bWwgYXMgYSBzdHJpbmcsIG9yIGEgcHJvbWlzZVxuICAgICAgICAgKiBmb3IgdGhhdCBzdHJpbmcuXG4gICAgICAgICAqL1xuICAgICAgICBUZW1wbGF0ZUZhY3RvcnkucHJvdG90eXBlLmZyb21VcmwgPSBmdW5jdGlvbiAodXJsLCBwYXJhbXMpIHtcbiAgICAgICAgICAgIGlmIChpc0Z1bmN0aW9uKHVybCkpXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsKHBhcmFtcyk7XG4gICAgICAgICAgICBpZiAodXJsID09IG51bGwpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICBpZiAodGhpcy5fdXNlSHR0cCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiRodHRwXG4gICAgICAgICAgICAgICAgICAgIC5nZXQodXJsLCB7IGNhY2hlOiB0aGlzLiR0ZW1wbGF0ZUNhY2hlLCBoZWFkZXJzOiB7IEFjY2VwdDogJ3RleHQvaHRtbCcgfSB9KVxuICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmRhdGE7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy4kdGVtcGxhdGVSZXF1ZXN0KHVybCk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgdGVtcGxhdGUgYnkgaW52b2tpbmcgYW4gaW5qZWN0YWJsZSBwcm92aWRlciBmdW5jdGlvbi5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHByb3ZpZGVyIEZ1bmN0aW9uIHRvIGludm9rZSB2aWEgY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XIgZm4gPSByZXMgJiYgcmVzLmRhdGE7XG4gICAgICAgICAgICAgICAgICAgIHZhciBhcmdzID0gKGZuICYmIHNlcnZpY2VzLiRpbmplY3Rvci5hbm5vdGF0ZShmbikpIHx8IFtdO1xuICAgICAgICAgICAgICAgICAgICAvLyBhY2NvdW50IGZvciBhcnJheSBzdHlsZSBpbmplY3Rpb24sIGkuZS4sIFsnZm9vJywgZnVuY3Rpb24oZm9vKSB7fV1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGFycmF5SWR4U3RyID0gaXNBcnJheShmbikgPyBcIltcIiArIChmbi5sZW5ndGggLSAxKSArIFwiXVwiIDogJyc7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhdHRyTmFtZSArIFwiPSckcmVzb2x2ZS5cIiArIHJlc29sdmVOYW1lICsgYXJyYXlJZHhTdHIgKyBcIihcIiArIGFyZ3Muam9pbignLCcpICsgXCIpJ1wiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBzb21lLWF0dHI9XCI6OiRyZXNvbHZlLnNvbWVSZXNvbHZlTmFtZVwiXG4gICAgICAgICAgICAgICAgcmV0dXJuIGF0dHJOYW1lICsgXCI9J1wiICsgcHJlZml4ICsgXCIkcmVzb2x2ZS5cIiArIHJlc29sdmVOYW1lICsgXCInXCI7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGF0dHJzID0gZ2V0Q29tcG9uZW50QmluZGluZ3MoY29tcG9uZW50KS5tYXAoYXR0cmlidXRlVHBsKS5qb2luKCcgJyk7XG4gICAgICAgICAgICB2YXIga2Vib2JOYW1lID0ga2Vib2IoY29tcG9uZW50KTtcbiAgICAgICAgICAgIHJldHVybiBcIjxcIiArIGtlYm9iTmFtZSArIFwiIFwiICsgYXR0cnMgKyBcIj48L1wiICsga2Vib2JOYW1lICsgXCI+XCI7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBUZW1wbGF0ZUZhY3Rvcnk7XG4gICAg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gdG8gdGhlIGludGVybmFsIGZ1bmN0aW9uIGJlaW5nIG92ZXJyaWRkZW46XG4gICAgICAgICAqIGBgYGpzXG4gICAgICAgICAqICRzdGF0ZVByb3ZpZGVyLmRlY29yYXRvcigndmlld3MnLCBmdW5jdGlvbiAoc3RhdGUsIHBhcmVudCkge1xuICAgICAgICAgKiAgIGxldCByZXN1bHQgPSB7fSxcbiAgICAgICAgICogICAgICAgdmlld3MgPSBwYXJlbnQoc3RhdGUpO1xuICAgICAgICAgKlxuICAgICAgICAgKiAgIGFuZ3VsYXIuZm9yRWFjaCh2aWV3cywgZnVuY3Rpb24gKGNvbmZpZywgbmFtZSkge1xuICAgICAgICAgKiAgICAgbGV0IGF1dG9OYW1lID0gKHN0YXRlLm5hbWUgKyAnLicgKyBuYW1lKS5yZXBsYWNlKCcuJywgJy8nKTtcbiAgICAgICAgICogICAgIGNvbmZpZy50ZW1wbGF0ZVVybCA9IGNvbmZpZy50ZW1wbGF0ZVVybCB8fCAnL3BhcnRpYWxzLycgKyBhdXRvTmFtZSArICcuaHRtbCc7XG4gICAgICAgICAqICAgICByZXN1bHRbbmFtZV0gPSBjb25maWc7XG4gICAgICAgICAqICAgfSk7XG4gICAgICAgICAqICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICogfSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICRzdGF0ZVByb3ZpZGVyLnN0YXRlKCdob21lJywge1xuICAgICAgICAgKiAgIHZpZXdzOiB7XG4gICAgICAgICAqICAgICAnY29udGFjdC5saXN0JzogeyBjb250cm9sbGVyOiAnTGlzdENvbnRyb2xsZXInIH0sXG4gICAgICAgICAqICAgICAnY29udGFjdC5pdGVtJzogeyBjb250cm9sbGVyOiAnSXRlbUNvbnRyb2xsZXInIH1cbiAgICAgICAgICogICB9XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLy8gQ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JvdG90eXBlLiRnZXQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgdXJsU2VydmljZSA9IHRoaXMucm91dGVyLnVybFNlcnZpY2U7XG4gICAgICAgICAgICB0aGlzLnJvdXRlci51cmxSb3V0ZXIudXBkYXRlKHRydWUpO1xuICAgICAgICAgICAgaWYgKCF1cmxTZXJ2aWNlLmludGVyY2VwdERlZmVycmVkKVxuICAgICAgICAgICAgICAgIHVybFNlcnZpY2UubGlzdGVuKCk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5yb3V0ZXIudXJsUm91dGVyO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmVnaXN0ZXJzIGEgdXJsIGhhbmRsZXIgZnVuY3Rpb24uXG4gICAgICAgICAqXG4gICAgICAgICAqIFJlZ2lzdGVycyBhIGxvdyBsZXZlbCB1cmwgaGFuZGxlciAoYSBgcnVsZWApLlxuICAgICAgICAgKiBBIHJ1bGUgZGV0ZWN0cyBzcGVjaWZpYyBVUkwgcGF0dGVybnMgYW5kIHJldHVybnMgYSByZWRpcmVjdCwgb3IgcGVyZm9ybXMgc29tZSBhY3Rpb24uXG4gICAgICAgICAqXG4gICAgICAgICAqIElmIGEgcnVsZSByZXR1cm5zIGEgc3RyaW5nLCB0aGUgVVJMIGlzIHJlcGxhY2VkIHdpdGggdGhlIHN0cmluZywgYW5kIGFsbCBydWxlcyBhcmUgZmlyZWQgYWdhaW4uXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogdmFyIGFwcCA9IGFuZ3VsYXIubW9kdWxlKCdhcHAnLCBbJ3VpLnJvdXRlci5yb3V0ZXInXSk7XG4gICAgICAgICAqXG4gICAgICAgICAqIGFwcC5jb25maWcoZnVuY3Rpb24gKCR1cmxSb3V0ZXJQcm92aWRlcikge1xuICAgICAgICAgKiAgIC8vIEhlcmUncyBhbiBleGFtcGxlIG9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24gcnVsZSBhcyBwYXJhbVxuICAgICAgICAgKiAgICR1cmxSb3V0ZXJQcm92aWRlci5vdGhlcndpc2UoZnVuY3Rpb24gKCRpbmplY3RvciwgJGxvY2F0aW9uKSB7XG4gICAgICAgICAqICAgICByZXR1cm4gJy9hL3ZhbGlkL3VybCc7XG4gICAgICAgICAqICAgfSk7XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHJ1bGVcbiAgICAgICAgICogVGhlIHVybCBwYXRoIHlvdSB3YW50IHRvIHJlZGlyZWN0IHRvIG9yIGEgZnVuY3Rpb24gcnVsZSB0aGF0IHJldHVybnMgdGhlIHVybCBwYXRoIG9yIHBlcmZvcm1zIGEgYCRzdGF0ZS5nbygpYC5cbiAgICAgICAgICogVGhlIGZ1bmN0aW9uIHZlcnNpb24gaXMgcGFzc2VkIHR3byBwYXJhbXM6IGAkaW5qZWN0b3JgIGFuZCBgJGxvY2F0aW9uYCBzZXJ2aWNlcywgYW5kIHNob3VsZCByZXR1cm4gYSB1cmwgc3RyaW5nLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJuIHtvYmplY3R9IGAkdXJsUm91dGVyUHJvdmlkZXJgIC0gYCR1cmxSb3V0ZXJQcm92aWRlcmAgaW5zdGFuY2VcbiAgICAgICAgICovXG4gICAgICAgIFVybFJvdXRlclByb3ZpZGVyLnByb3RvdHlwZS5vdGhlcndpc2UgPSBmdW5jdGlvbiAocnVsZSkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHZhciB1cmxSdWxlcyA9IHRoaXMucm91dGVyLnVybFNlcnZpY2UucnVsZXM7XG4gICAgICAgICAgICBpZiAoaXNTdHJpbmcocnVsZSkpIHtcbiAgICAgICAgICAgICAgICB1cmxSdWxlcy5vdGhlcndpc2UocnVsZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChp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Um91dGVyLCAkaHR0cCkge1xuICAgICAgICAgKiAgICRodHRwLmdldChcIi9zdHVmZlwiKS50aGVuKGZ1bmN0aW9uKHJlc3ApIHtcbiAgICAgICAgICogICAgIE15U2VydmljZS5kb1N0dWZmKHJlc3AuZGF0YSk7XG4gICAgICAgICAqICAgICAkdXJsUm91dGVyLmxpc3RlbigpO1xuICAgICAgICAgKiAgICAgJHVybFJvdXRlci5zeW5jKCk7XG4gICAgICAgICAqICAgfSk7XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIGRlZmVyIEluZGljYXRlcyB3aGV0aGVyIHRvIGRlZmVyIGxvY2F0aW9uIGNoYW5nZSBpbnRlcmNlcHRpb24uXG4gICAgICAgICAqICAgICAgICBQYXNzaW5nIG5vIHBhcmFtZXRlciBpcyBlcXVpdmFsZW50IHRvIGB0cnVlYC5cbiAgICAgICAgICovXG4gICAgICAgIFVybFJvdXRlclByb3ZpZGVyLnByb3RvdHlwZS5kZWZlckludGVyY2VwdCA9IGZ1bmN0aW9uIChkZWZlcikge1xuICAgICAgICAgICAgdGhpcy5yb3V0ZXIudXJsU2VydmljZS5kZWZlckludGVyY2VwdChkZWZlcik7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBVcmxSb3V0ZXJQcm92aWRlcjtcbiAgICB9KCkpO1xuXG4gICAgLyogZXNsaW50LWRpc2FibGUgQHR5cGVzY3JpcHQtZXNsaW50L25vLWVtcHR5LWZ1bmN0aW9uICovXG4gICAgbmcubW9kdWxlKCd1aS5yb3V0ZXIuYW5ndWxhcjEnLCBbXSk7XG4gICAgdmFyIG1vZF9pbml0ID0gbmcubW9kdWxlKCd1aS5yb3V0ZXIuaW5pdCcsIFsnbmcnXSk7XG4gICAgdmFyIG1vZF91dGlsID0gbmcubW9kdWxlKCd1aS5yb3V0ZXIudXRpbCcsIFsndWkucm91dGVyLmluaXQnXSk7XG4gICAgdmFyIG1vZF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2VydmljZSA9ICR1cnAucm91dGVyW3NlcnZpY2VOYW1lXTtcbiAgICAgICAgICAgIHNlcnZpY2VbJyRnZXQnXSA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHNlcnZpY2U7IH07XG4gICAgICAgICAgICByZXR1cm4gc2VydmljZTtcbiAgICAgICAgfSxcbiAgICBdOyB9O1xuICAgIC8vIFRoaXMgZWZmZWN0aXZlbHkgY2FsbHMgJGdldCgpIG9uIGAkdWlSb3V0ZXJQcm92aWRlcmAgdG8gdHJpZ2dlciBpbml0ICh3aGVuIG5nIGVudGVycyBydW50aW1lKVxuICAgIHJ1bkJsb2NrLiRpbmplY3QgPSBbJyRpbmplY3RvcicsICckcScsICckdWlSb3V0ZXInXTtcbiAgICBmdW5jdGlvbiBydW5CbG9jaygkaW5qZWN0b3IsICRxLCAkdWlSb3V0ZXIpIHtcbiAgICAgICAgc2VydmljZXMuJGluamVjdG9yID0gJGluamVjdG9yO1xuICAgICAgICBzZXJ2aWNlcy4kcSA9ICRxO1xuICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci11aS91aS1yb3V0ZXIvaXNzdWVzLzM2NzhcbiAgICAgICAgaWYgKCFPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoJGluamVjdG9yLCAnc3RyaWN0RGknKSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAkaW5qZWN0b3IuaW52b2tlKGZ1bmN0aW9uIChjaGVja1N0cmljdERpKSB7IH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgJGluamVjdG9yLnN0cmljdERpID0gISEvc3RyaWN0IG1vZGUvLmV4ZWMoZXJyb3IgJiYgZXJyb3IudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gVGhlICRpbmplY3RvciBpcyBub3cgYXZhaWxh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4gICAgICAgICAgICAgICAgICAgICAgICAkc3RhdGUuZ28odGFyZ2V0LnVpU3RhdGUsIHRhcmdldC51aVN0YXRlUGFyYW1zLCB0YXJnZXQudWlTdGF0ZU9wdHMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgICAgIC8vIGlmIHRoZSBzdGF0ZSBoYXMgbm8gVVJMLCBpZ25vcmUgb25lIHByZXZlbnREZWZhdWx0IGZyb20gdGhlIDxhPiBkaXJlY3RpdmUuXG4gICAgICAgICAgICAgICAgdmFyIGlnbm9yZVByZXZlbnREZWZhdWx0Q291bnRfMSA9IHR5cGUuaXNBbmNob3IgJiYgIXRhcmdldC5ocmVmID8gMSA6IDA7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlnbm9yZVByZXZlbnREZWZhdWx0Q291bnRfMS0tIDw9IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dC5jYW5jZWwodHJhbnNpdGlvbl8xKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH1cbiAgICAvKiogQGhpZGRlbiAqL1xuICAgIGZ1bmN0aW9uIGRlZmF1bHRPcHRzKGVsLCAkc3RhdGUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHJlbGF0aXZlOiBzdGF0ZUNvbnRleHQoZWwpIHx8ICRzdGF0ZS4kY3VycmVudCxcbiAgICAgICAgICAgIGluaGVyaXQ6IHRydWUsXG4gICAgICAgICAgICBzb3VyY2U6ICdzcmVmJyxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiBiaW5kRXZlbnRzKGVsZW1lbnQsIHNjb3BlLCBob29rRm4sIHVpU3RhdGVPcHRzKSB7XG4gICAgICAgIHZhciBldmVudHM7XG4gICAgICAgIGlmICh1aVN0YXRlT3B0cykge1xuICAgICAgICAgICAgZXZlbnRzID0gdWlTdGF0ZU9wdHMuZXZlbnRzO1xuICAgICAgICB9XG4gICAgICAgIGlmICghaXNBcnJheShldmVudHMpKSB7XG4gICAgICAgICAgICBldmVudHMgPSBbJ2NsaWNrJ107XG4gICAgICAgIH1cbiAgICAgICAgdmFyIG9uID0gZWxlbWVudC5vbiA/ICdvbicgOiAnYmluZCc7XG4gICAgICAgIGZvciAodmFyIF9pID0gMCwgZXZlbnRzXzEgPSBldmVudHM7IF9pIDwgZXZlbnRzXzEubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgICAgICB2YXIgZXZlbnRfMSA9IGV2ZW50c18xW19pXTtcbiAgICAgICAgICAgIGVsZW1lbnRbb25dKGV2ZW50XzEsIGhvb2tGbik7XG4gICAgICAgIH1cbiAgICAgICAgc2NvcGUuJG9uKCckZGVzdHJveScsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBvZmYgPSBlbGVtZW50Lm9mZiA/ICdvZmYnIDogJ3VuYmluZCc7XG4gICAgICAgICAgICBmb3IgKHZhciBfaSA9IDAsIGV2ZW50c18yID0gZXZlbnRzOyBfaSA8IGV2ZW50c18yLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgIHZhciBldmVudF8yID0gZXZlbnRzXzJbX2ldO1xuICAgICAgICAgICAgICAgIGVsZW1lbnRbb2ZmXShldmVudF8yLCBob29rRm4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogYHVpLXNyZWZgOiBBIGRpcmVjdGl2ZSBmb3IgbGlua2luZyB0byBhIHN0YXRlXG4gICAgICpcbiAgICAgKiBBIGRpcmVjdGl2ZSB3aGljaCBsaW5rcyB0byBhIHN0YXRlIChhbmQgb3B0aW9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5mbyhlbGVtZW50KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGFjdGl2ZSA9IHVpU3JlZkFjdGl2ZVsxXSB8fCB1aVNyZWZBY3RpdmVbMF07XG4gICAgICAgICAgICAgICAgICAgIHZhciB1bmxpbmtJbmZvRm4gPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB2YXIgcmF3RGVmID0ge307XG4gICAgICAgICAgICAgICAgICAgIHZhciBnZXREZWYgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBwcm9jZXNzZWREZWYoJHN0YXRlLCBlbGVtZW50LCByYXdEZWYpOyB9O1xuICAgICAgICAgICAgICAgICAgICB2YXIgcmVmID0gcGFyc2VTdGF0ZVJlZihhdHRycy51aVNyZWYpO1xuICAgICAgICAgICAgICAgICAgICByYXdEZWYudWlTdGF0ZSA9IHJlZi5zdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgcmF3RGVmLnVpU3RhdGVPcHRzID0gYXR0cnMudWlTcmVmT3B0cyA/IHNjb3BlLiRldmFsKGF0dHJzLnVpU3JlZk9wdHMpIDoge307XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWYgPSBnZXREZWYoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bmxpbmtJbmZvRm4pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5saW5rSW5mb0ZuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aXZlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGlua0luZm9GbiA9IGFjdGl2ZS4kJGFkZFN0YXRlSW5mbyhkZWYudWlTdGF0ZSwgZGVmLnVpU3RhdGVQYXJhbXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlZi5ocmVmICE9IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnMuJHNldCh0eXBlLmF0dHIsIGRlZi5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAocmVmLnBhcmFtRXhwcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuJHdhdGNoKHJlZi5wYXJhbUV4cHIsIGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdEZWYudWlTdGF0ZVBhcmFtcyA9IGV4dGVuZCh7fSwgdmFsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmF3RGVmLnVpU3RhdGVQYXJhbXMgPSBleHRlbmQoe30sIHNjb3BlLiRldmFsKHJlZi5wYXJhbUV4cHIpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuJG9uKCckZGVzdHJveScsICR1aVJvdXRlci5zdGF0ZVJlZ2lzdHJ5Lm9uU3RhdGVzQ2hhbmdlZCh1cGRhdGUpKTtcbiAgICAgICAgICAgICAgICAgICAgc2NvcGUuJG9uKCckZGVzdHJveScsICR1aVJvdXRlci50cmFuc2l0aW9uU2VydmljZS5vblN1Y2Nlc3Moe30sIHVwZGF0ZSkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXR5cGUuY2xpY2thYmxlKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaG9va0ZuID0gY2xpY2tIb29rKGVsZW1lbnQsICRzdGF0ZSwgJHRpbWVvdXQsIHR5cGUsIGdldERlZik7XG4gICAgICAgICAgICAgICAgICAgIGJpbmRFdmVudHMoZWxlbWVudCwgc2NvcGUsIGhvb2tGbiwgcmF3RGVmLnVpU3RhdGVPcHRzKTt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RpbWVvdXQpIHtcbiAgICAgICAgICAgIHZhciAkc3RhdGUgPSAkdWlSb3V0ZXIuc3RhdGVTZXJ2aWNlO1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICByZXN0cmljdDogJ0EnLFxuICAgICAgICAgICAgICAgIHJlcXVpcmU6IFsnP151aVNyZWZBY3RpdmUnLCAnP151aVNyZWZBY3RpdmVFcSddLFxuICAgICAgICAgICAgICAgIGxpbms6IGZ1bmN0aW9uIChzY29wZSwgZWxlbWVudCwgYXR0cnMsIHVpU3JlZkFjdGl2ZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IGdldFR5cGVJbmZvKGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgYWN0aXZlID0gdWlTcmVmQWN0aXZlWzFdIHx8IHVpU3JlZkFjdGl2ZVswXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVubGlua0luZm9GbiA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHZhciBob29rRm47XG4gICAgICAgICAgICAgICAgICAgIHZhciByYXdEZWYgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGdldERlZiA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHByb2Nlc3NlZERlZigkc3RhdGUsIGVsZW1lbnQsIHJhd0RlZik7IH07XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbnB1dEF0dHJzID0gWyd1aVN0YXRlJywgJ3VpU3RhdGVQYXJhbXMnLCAndWlTdGF0ZU9wdHMnXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHdhdGNoRGVyZWdGbnMgPSBpbnB1dEF0dHJzLnJlZHVjZShmdW5jdGlvbiAoYWNjLCBhdHRyKSB7IHJldHVybiAoKGFjY1thdHRyXSA9IG5vb3ApLCBhY2MpOyB9LCB7fSk7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWYgPSBnZXREZWYoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bmxpbmtJbmZvRm4pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5saW5rSW5mb0ZuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aXZlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGlua0luZm9GbiA9IGFjdGl2ZS4kJGFkZFN0YXRlSW5mbyhkZWYudWlTdGF0ZSwgZGVmLnVpU3RhdGVQYXJhbXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlZi5ocmVmICE9IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnMuJHNldCh0eXBlLmF0dHIsIGRlZi5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpbnB1dEF0dHJzLmZvckVhY2goZnVuY3Rpb24gKGZpZWxkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByYXdEZWZbZmllbGRdID0gYXR0cnNbZmllbGRdID8gc2NvcGUuJGV2YWwoYXR0cnNbZmllbGRdKSA6IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRycy4kb2JzZXJ2ZShmaWVsZCwgZnVuY3Rpb24gKGV4cHIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YXRjaERlcmVnRm5zW2ZpZWxkXSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhdGNoRGVyZWdGbnNbZmllbGRdID0gc2NvcGUuJHdhdGNoKGV4cHIsIGZ1bmN0aW9uIChuZXd2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3RGVmW2ZpZWxkXSA9IG5ld3ZhbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgd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ICovXG4gICAgdmFyIHVpU3JlZkFjdGl2ZURpcmVjdGl2ZTtcbiAgICB1aVNyZWZBY3RpdmVEaXJlY3RpdmUgPSBbXG4gICAgICAgICckc3RhdGUnLFxuICAgICAgICAnJHN0YXRlUGFyYW1zJyxcbiAgICAgICAgJyRpbnRlcnBvbGF0ZScsXG4gICAgICAgICckdWlSb3V0ZXInLFxuICAgICAgICBmdW5jdGlvbiAkU3RhdGVSZWZBY3RpdmVEaXJlY3RpdmUoJHN0YXRlLCAkc3RhdGVQYXJhbXMsICRpbnRlcnBvbGF0ZSwgJHVpUm91dGVyKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHJlc3RyaWN0OiAnQScsXG4gICAgICAgICAgICAgICAgY29udHJvbGxlcjogW1xuICAgICAgICAgICAgICAgICAgICAnJHNjb3BlJyxcbiAgICAgICAgICAgICAgICAgICAgJyRlbGVtZW50JyxcbiAgICAgICAgICAgICAgICAgICAgJyRhdHRycycsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgkc2NvcGUsICRlbGVtZW50LCAkYXR0cnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0ZXMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3RpdmVFcUNsYXNzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVpU3JlZkFjdGl2ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZXJlIHByb2JhYmx5IGlzbid0IG11Y2ggcG9pbnQgaW4gJG9ic2VydmluZyB0aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1aVNyZWZBY3RpdmUgYW5kIHVpU3JlZkFjdGl2ZUVxIHNoYXJlIHRoZSBzYW1lIGRpcmVjdGl2ZSBvYmplY3Qgd2l0aCBzb21lXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzbGlnaHQgZGlmZmVyZW5jZSBpbiBsb2dpYyByb3V0aW5nXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVFcUNsYXNzID0gJGludGVycG9sYXRlKCRhdHRycy51aVNyZWZBY3RpdmVFcSB8fCAnJywgZmFsc2UpKCRzY29wZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVpU3JlZkFjdGl2ZSA9ICRzY29wZS4kZXZhbCgkYXR0cnMudWlTcmVmQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRG8gbm90aGluZy4gdWlTcmVmQWN0aXZlIGlzIG5vdCBhIHZhbGlkIGV4cHJlc3Npb24uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmFsbCBiYWNrIHRvIHVzaW5nICRpbnRlcnBvbGF0ZSBiZWxvd1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdWlTcmVmQWN0aXZlID0gdWlTcmVmQWN0aXZlIHx8ICRpbnRlcnBvbGF0ZSgkYXR0cnMudWlTcmVmQWN0aXZlIHx8ICcnLCBmYWxzZSkoJHNjb3BlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0YXRlc0Zyb21EZWZpbml0aW9uT2JqZWN0KHVpU3JlZkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBbGxvdyB1aVNyZWYgdG8gY29tbXVuaWNhdGUgd2l0aCB1aVNyZWZBY3RpdmVbRXF1YWxzXVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy4kJGFkZFN0YXRlSW5mbyA9IGZ1bmN0aW9uIChuZXdTdGF0ZSwgbmV3UGFyYW1zKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2UgYWxyZWFkeSBnb3QgYW4gZXhwbGljaXQgc3RhdGUgcHJvdmlkZWQgYnkgdWktc3JlZi1hY3RpdmUsIHNvIHdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hhZG93IHRoZSBvbmUgdGhhdCBjb21lcyBmcm9tIHVpLXNyZWZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNPYmplY3QodWlTcmVmQWN0aXZlKSAmJiBzdGF0ZXMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXJlZ2lzdGVyID0gYWRkU3RhdGUobmV3U3RhdGUsIG5ld1BhcmFtcywgdWlTcmVmQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVyZWdpc3RlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB1cGRhdGVBZnRlclRyYW5zaXRpb24odHJhbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFucy5wcm9taXNlLnRoZW4odXBkYXRlLCBub29wKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICRzY29wZS4kb24oJyRkZXN0cm95Jywgc2V0dXBFdmVudExpc3RlbmVycygpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkdWlSb3V0ZXIuZ2xvYmFscy50cmFuc2l0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlQWZ0ZXJUcmFuc2l0aW9uKCR1aVJvdXRlci5nbG9iYWxzLnRyYW5zaXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0dXBFdmVudExpc3RlbmVycygpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVyZWdpc3RlclN0YXRlc0NoYW5nZWRMaXN0ZW5lciA9ICR1aVJvdXRlci5zdGF0ZVJlZ2lzdHJ5Lm9uU3RhdGVzQ2hhbmdlZChoYW5kbGVTdGF0ZXNDaGFuZ2VkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVyZWdpc3Rlck9uU3RhcnRMaXN0ZW5lciA9ICR1aVJvdXRlci50cmFuc2l0aW9uU2VydmljZS5vblN0YXJ0KHt9LCB1cGRhdGVBZnRlclRyYW5zaXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXJlZ2lzdGVyU3RhdGVDaGFuZ2VTdWNjZXNzTGlzdGVuZXIgPSAkc2NvcGUuJG9uKCckc3RhdGVDaGFuZ2VTdWNjZXNzJywgdXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gY2xlYW5VcCgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVyZWdpc3RlclN0YXRlc0NoYW5nZWRMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXJlZ2lzdGVyT25TdGFydExpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcmVnaXN0ZXJTdGF0ZUNoYW5nZVN1Y2Nlc3NMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBoYW5kbGVTdGF0ZXNDaGFuZ2VkKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0YXRlc0Zyb21EZWZpbml0aW9uT2JqZWN0KHVpU3JlZkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBzZXRTdGF0ZXNGcm9tRGVmaW5pdGlvbk9iamVjdChzdGF0ZXNEZWZpbml0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHN0YXRlc0RlZmluaXRpb24pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JFYWNoKHN0YXRlc0RlZmluaXRpb24sIGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSwgYWN0aXZlQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhlbHBlciBmdW5jdGlvbiB0byBhYnN0cmFjdCBhZGRpbmcgc3RhdGUuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWRkU3RhdGVGb3JDbGFzcyA9IGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSwgYWN0aXZlQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVmID0gcGFyc2VTdGF0ZVJlZihzdGF0ZU9yTmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkU3RhdGUocmVmLnN0YXRlLCAkc2NvcGUuJGV2YWwocmVmLnBhcmFtRXhwciksIGFjdGl2ZUNsYXNzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNTdHJpbmcoc3RhdGVPck5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgc3RhdGUgaXMgc3RyaW5nLCBqdXN0IGFkZCBpdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRTdGF0ZUZvckNsYXNzKHN0YXRlT3JOYW1lLCBhY3RpdmVDbGFzcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChpc0FycmF5KHN0YXRlT3JOYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHN0YXRlIGlzIGFuIGFycmF5LCBpdGVyYXRlIG92ZXIgaXQgYW5kIGFkZCBlYWNoIGFycmF5IGl0ZW0gaW5kaXZpZHVhbGx5LlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvckVhY2goc3RhdGVPck5hbWUsIGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRTdGF0ZUZvckNsYXNzKHN0YXRlT3JOYW1lLCBhY3RpdmVDbGFzcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkZFN0YXRlKHN0YXRlTmFtZSwgc3RhdGVQYXJhbXMsIGFjdGl2ZUNsYXNzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlID0gJHN0YXRlLmdldChzdGF0ZU5hbWUsIHN0YXRlQ29udGV4dCgkZWxlbWVudCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0ZUluZm8gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlOiBzdGF0ZSB8fCB7IG5hbWU6IHN0YXRlTmFtZSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHN0YXRlUGFyYW1zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVDbGFzczogYWN0aXZlQ2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZXMucHVzaChzdGF0ZUluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiByZW1vdmVTdGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlRnJvbShzdGF0ZXMpKHN0YXRlSW5mbyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSByb3V0ZSBzdGF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gdXBkYXRlKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzcGxpdENsYXNzZXMgPSBmdW5jdGlvbiAoc3RyKSB7IHJldHVybiBzdHIuc3BsaXQoL1xccy8pLmZpbHRlcihpZGVudGl0eSk7IH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGdldENsYXNzZXMgPSBmdW5jdGlvbiAoc3RhdGVMaXN0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZUxpc3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHgpIHsgcmV0dXJuIHguYWN0aXZlQ2xhc3M7IH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKHNwb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gkdmlldywgJGFuaW1hdGUsICR1aVZpZXdTY3JvbGwsICRpbnRlcnBvbGF0ZSwgJHEpIHtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldFJlbmRlcmVyKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGVudGVyOiBmdW5jdGlvbiAoZWxlbWVudCwgdGFyZ2V0LCBjYikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5nLnZlcnNpb24ubWlub3IgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGFuaW1hdGUuZW50ZXIoZWxlbWVudCwgbnVsbCwgdGFyZ2V0KS50aGVuKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmVudGVyKGVsZW1lbnQsIG51bGwsIHRhcmdldCwgY2IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBsZWF2ZTogZnVuY3Rpb24gKGVsZW1lbnQsIGNiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmcudmVyc2lvbi5taW5vciA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYW5pbWF0ZS5sZWF2ZShlbGVtZW50KS50aGVuKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmxlYXZlKGVsZW1lbnQsIGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29uZmlnc0VxdWFsKGNvbmZpZzEsIGNvbmZpZzIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnMSA9PT0gY29uZmlnMjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByb290RGF0YSA9IHtcbiAgICAgICAgICAgICAgICAkY2ZnOiB7IHZpZXdEZWNsOiB7ICRjb250ZXh0OiAkdmlldy5fcGx1Z2luYXBpLl9yb290Vmlld0NvbnRleHQoKSB9IH0sXG4gICAgICAgICAgICAgICAgJHVpVmlldzoge30sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGRpcmVjdGl2ZSA9IHtcbiAgICAgICAgICAgICAgICBjb3VudDogMCxcbiAgICAgICAgICAgICAgICByZXN0cmljdDogJ0VDQScsXG4gICAgICAgICAgICAgICAgdGVybWluYWw6IHRydWUsXG4gICAgICAgICAgICAgICAgcHJpb3JpdHk6IDQwMCxcbiAgICAgICAgICAgICAgICB0cmFuc2NsdWRlOiAnZWxlbWVudCcsXG4gICAgICAgICAgICAgICAgY29tcGlsZTogZnVuY3Rpb24gKHRFbGVtZW50LCB0QXR0cnMsICR0cmFuc2NsdWRlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2NvcGUsICRlbGVtZW50LCBhdHRycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9ubG9hZEV4cCA9IGF0dHJzWydvbmxvYWQnXSB8fCAnJywgYXV0b1Njcm9sbEV4cCA9IGF0dHJzWydhdXRvc2Nyb2xsJ10sIHJlbmRlcmVyID0gZ2V0UmVuZGVyZXIoKSwgaW5oZXJpdGVkID0gJGVsZW1lbnQuaW5oZXJpdGVkRGF0YSgnJHVpVmlldycpIHx8IHJvb3REYXRhLCBuYW1lID0gJGludGVycG9sYXRlKGF0dHJzWyd1aVZpZXcnXSB8fCBhdHRyc1snbmFtZSddIHx8ICcnKShzY29wZSkgfHwgJyRkZWZhdWx0JztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwcmV2aW91c0VsLCBjdXJyZW50RWwsIGN1cnJlbnRTY29wZSwgdmlld0NvbmZpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3RpdmVVSVZpZXcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHR5cGU6ICduZzEnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkaXJlY3RpdmUuY291bnQrKyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZxbjogaW5oZXJpdGVkLiR1aVZpZXcuZnFuID8gaW5oZXJpdGVkLiR1aVZpZXcuZnFuICsgJy4nICsgbmFtZSA6IG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ1VwZGF0ZWQ6IGNvbmZpZ1VwZGF0ZWRDYWxsYmFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXQgY3JlYXRpb25Db250ZXh0KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgY29udGV4dCBpbiB3aGljaCB0aGlzIHVpLXZpZXcgXCJ0YWdcIiB3YXMgY3JlYXRlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZnJvbVBhcmVudFRhZ0NvbmZpZyA9IHBhcnNlKCckY2ZnLnZpZXdEZWNsLiRjb250ZXh0JykoaW5oZXJpdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWxsb3cgPHVpLXZpZXcgbmFtZT1cImZvb1wiPjx1aS12aWV3IG5hbWU9XCJiYXJcIj48L3VpLXZpZXc+PC91aS12aWV3PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTZWUgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXItdWkvdWktcm91dGVyL2lzc3Vlcy8zMzU1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmcm9tUGFyZW50VGFnID0gcGFyc2UoJyR1aVZpZXcuY3JlYXRpb25Db250ZXh0JykoaW5oZXJpdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZyb21QYXJlbnRUYWdDb25maWcgfHwgZnJvbVBhcmVudFRhZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RXZlbnQoJ0xpbmtpbmcnLCBhY3RpdmVVSVZpZXcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY29uZmlnVXBkYXRlZENhbGxiYWNrKGNvbmZpZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcgJiYgIShjb25maWcgaW5zdGFuY2VvZiBOZzFWaWV3Q29uZmlnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWdzRXF1YWwodmlld0NvbmZpZywgY29uZmlnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3Q29uZmlnVXBkYXRlZChhY3RpdmVVSVZpZXcsIGNvbmZpZyAmJiBjb25maWcudmlld0RlY2wgJiYgY29uZmlnLnZpZXdEZWNsLiRjb250ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWV3Q29uZmlnID0gY29uZmlnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50LmRhdGEoJyR1aVZpZXcnLCB7ICR1aVZpZXc6IGFjdGl2ZVVJVmlldyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1bnJlZ2lzdGVyID0gJHZpZXcucmVnaXN0ZXJVSVZpZXcoYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLiRvbignJGRlc3Ryb3knLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2UudHJhY2VVSVZpZXdFdmVudCgnRGVzdHJveWluZy9VbnJlZ2lzdGVyaW5nJywgYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnJlZ2lzdGVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsZWFudXBMYXN0VmlldygpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJldmlvdXNFbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVVJVmlld0V2ZW50KCdSZW1vdmluZyAocHJldmlvdXMpIGVsJywgcHJldmlvdXNFbC5kYXRhKCckdWlWaWV3JykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c0VsLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c0VsID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRTY29wZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVVJVmlld0V2ZW50KCdEZXN0cm95aW5nIHNjb3BlJywgYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLiRkZXN0cm95KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50RWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF92aWV3RGF0YV8xID0gY3VycmVudEVsLmRhdGEoJyR1aVZpZXdBbmltJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RXZlbnQoJ0FuaW1hdGUgb3V0JywgX3ZpZXdEYXRhXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJlci5sZWF2ZShjdXJyZW50RWwsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92aWV3RGF0YV8xLiQkYW5pbUxlYXZlLnJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzRWwgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNFbCA9IGN1cnJlbnRFbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudEVsID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB1cGRhdGVWaWV3KGNvbmZpZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuZXdTY29wZSA9IHNjb3BlLiRuZXcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYW5pbUVudGVyID0gJHEuZGVmZXIoKSwgYW5pbUxlYXZlID0gJHEuZGVmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgJHVpVmlld0RhdGEgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRjZmc6IGNvbmZpZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHVpVmlldzogYWN0aXZlVUlWaWV3LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICR1aVZpZXdBbmltID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYW5pbUVudGVyOiBhbmltRW50ZXIucHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGFuaW1MZWF2ZTogYW5pbUxlYXZlLnByb21pc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkYW5pbUxlYXZlOiBhbmltTGVhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmdkb2MgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmFtZSB1aS5yb3V0ZXIuc3RhdGUuZGlyZWN0aXZlOnVpLXZpZXcjJHZpZXdDb250ZW50TG9hZGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBldmVudE9mIHVpLnJvdXRlci5zdGF0ZS5kaXJlY3RpdmU6dWktdmlld1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBldmVudFR5cGUgZW1pdHMgb24gdWktdmlldyBkaXJlY3RpdmUgc2NvcGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAZGVzY3JpcHRpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEZpcmVkIG9uY2UgdGhlIHZpZXcgKipiZWdpbnMgbG9hZGluZyoqLCAqYmVmb3JlKiB0aGUgRE9NIGlzIHJlbmRlcmVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IEV2ZW50IG9iamVjdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gdmlld05hbWUgTmFtZSBvZiB0aGUgdmlldy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdTY29wZS4kZW1pdCgnJHZpZXdDb250ZW50TG9hZGluZycsIG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9uZWQgPSAkdHJhbnNjbHVkZShuZXdTY29wZSwgZnVuY3Rpb24gKGNsb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb25lLmRhdGEoJyR1aVZpZXdBbmltJywgJHVpVmlld0FuaW0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9uZS5kYXRhKCckdWlWaWV3JywgJHVpVmlld0RhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJlci5lbnRlcihjbG9uZSwgJGVsZW1lbnQsIGZ1bmN0aW9uIG9uVUlWaWV3RW50ZXIoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltRW50ZXIucmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRTY29wZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGVtaXQoJyR2aWV3Q29udGVudEFuaW1hdGlvbkVuZGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGlzRGVmaW5lZChhdXRvU2Nyb2xsRXhwKSAmJiAhYXV0b1Njcm9sbEV4cCkgfHwgc2NvcGUuJGV2YWwoYXV0b1Njcm9sbEV4cCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdWlWaWV3U2Nyb2xsKGNsb25lKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFudXBMYXN0VmlldygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRFbCA9IGNsb25lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUgPSBuZXdTY29wZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmdkb2MgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmFtZSB1aS5yb3V0ZXIuc3RhdGUuZGlyZWN0aXZlOnVpLXZpZXcjJHZpZXdDb250ZW50TG9hZGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQGV2ZW50T2YgdWkucm91dGVyLnN0YXRlLmRpcmVjdGl2ZTp1aS12aWV3XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQGV2ZW50VHlwZSBlbWl0cyBvbiB1aS12aWV3IGRpcmVjdGl2ZSBzY29wZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBkZXNjcmlwdGlvbiAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEZpcmVkIG9uY2UgdGhlIHZpZXcgaXMgKipsb2FkZWQqKiwgKmFmdGVyKiB0aGUgRE9NIGlzIHJlbmRlcmVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IEV2ZW50IG9iamVjdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGVtaXQoJyR2aWV3Q29udGVudExvYWRlZCcsIGNvbmZpZyB8fCB2aWV3Q29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGV2YWwob25sb2FkRXhwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBkaXJlY3RpdmU7XG4gICAgICAgIH0sXG4gICAgXTtcbiAgICAkVmlld0RpcmVjdGl2ZUZpbGwuJGluamVjdCA9IFsnJGNvbXBpbGUnLCAnJGNvbnRyb2xsZXInLCAnJHRyYW5zaXRpb25zJywgJyR2aWV3JywgJyRxJ107XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiAkVmlld0RpcmVjdGl2ZUZpbGwoJGNvbXBpbGUsICRjb250cm9sbGVyLCAkdHJhbnNpdGlvbnMsICR2aWV3LCAkcSkge1xuICAgICAgICB2YXIgZ2V0Q29udHJvbGxlckFzID0gcGFyc2UoJ3ZpZXdEZWNsLmNvbnRyb2xsZXJBcycpO1xuICAgICAgICB2YXIgZ2V0UmVzb2x2ZUFzID0gcGFyc2UoJ3ZpZXdEZWNsLnJlc29sdmVBcycpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcmVzdHJpY3Q6ICdFQ0EnLFxuICAgICAgICAgICAgcHJpb3JpdHk6IC00MDAsXG4gICAgICAgICAgICBjb21waWxlOiBmdW5jdGlvbiAodEVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgaW5pdGlhbCA9IHRFbGVtZW50Lmh0bWwoKTtcbiAgICAgICAgICAgICAgICB0RWxlbWVudC5lbXB0eSgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2NvcGUsICRlbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gJGVsZW1lbnQuZGF0YSgnJHVpVmlldycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50Lmh0bWwoaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkY29tcGlsZSgkZWxlbWVudC5jb250ZW50cygpKShzY29wZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGNmZyA9IGRhdGEuJGNmZyB8fCB7IHZpZXdEZWNsOiB7fSwgZ2V0VGVtcGxhdGU6IG5vb3AgfTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVDdHggPSBjZmcucGF0aCAmJiBuZXcgUmVzb2x2ZUNvbnRleHQoY2ZnLnBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5odG1sKGNmZy5nZXRUZW1wbGF0ZSgkZWxlbWVudCwgcmVzb2x2ZUN0eCkgfHwgaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RmlsbChkYXRhLiR1aVZpZXcsICRlbGVtZW50Lmh0bWwoKSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gJGNvbXBpbGUoJGVsZW1lbnQuY29udGVudHMoKSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb250cm9sbGVyID0gY2ZnLmNvbnRyb2xsZXI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb250cm9sbGVyQXMgPSBnZXRDb250cm9sbGVyQXMoY2ZnKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVBcyA9IGdldFJlc29sdmVBcyhjZmcpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbG9jYWxzID0gcmVzb2x2ZUN0eCAmJiBnZXRMb2NhbHMocmVzb2x2ZUN0eCk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlW3Jlc29sdmVBc10gPSBsb2NhbHM7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cm9sbGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29udHJvbGxlckluc3RhbmNlID0gKCRjb250cm9sbGVyKGNvbnRyb2xsZXIsIGV4dGVuZCh7fSwgbG9jYWxzLCB7ICRzY29wZTogc2NvcGUsICRlbGVtZW50OiAkZWxlbWVudCB9KSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2xsZXJBcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlW2NvbnRyb2xsZXJBc10gPSBjb250cm9sbGVySW5zdGFuY2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGVbY29udHJvbGxlckFzXVtyZXNvbHZlQXNdID0gbG9jYWxzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogVXNlICR2aWV3IHNlcnZpY2UgYXMgYSBjZW50cmFsIHBvaW50IGZvciByZWdpc3RlcmluZyBjb21wb25lbnQtbGV2ZWwgaG9va3NcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZW4sIHdoZW4gYSBjb21wb25lbnQgaXMgY3JlYXRlZCwgdGVsbCB0aGUgJHZpZXcgc2VydmljZSwgc28gaXQgY2FuIGludm9rZSBob29rc1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gJHZpZXcuY29tcG9uZW50TG9hZGVkKGNvbnRyb2xsZXJJbnN0YW5jZSwgeyAkc2NvcGU6IHNjb3BlLCAkZWxlbWVudDogJGVsZW1lbnQgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzY29wZS4kb24oJyRkZXN0cm95JywgKCkgPT4gJHZpZXcuY29tcG9uZW50VW5sb2FkZWQoY29udHJvbGxlckluc3RhbmNlLCB7ICRzY29wZTogc2NvcGUsICRlbGVtZW50OiAkZWxlbWVudCB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5kYXRhKCckbmdDb250cm9sbGVyQ29udHJvbGxlcicsIGNvbnRyb2xsZXJJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5jaGlsZHJlbigpLmRhdGEoJyRuZ0NvbnRyb2xsZXJDb250cm9sbGVyJywgY29udHJvbGxlckluc3RhbmNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyQ29udHJvbGxlckNhbGxiYWNrcygkcSwgJHRyYW5zaXRpb25zLCBjb250cm9sbGVySW5zdGFuY2UsIHNjb3BlLCBjZmcpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIFdhaXQgZm9yIHRoZSBjb21wb25lbnQgdG8gYXBwZWFyIGluIHRoZSBET01cbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzU3RyaW5nKGNmZy5jb21wb25lbnQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIga2Vib2JOYW1lID0ga2Vib2JTdHJpbmcoY2ZnLmNvbXBvbmVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnUmVnZXhwXzEgPSBuZXcgUmVnRXhwKFwiXih4LXxkYXRhLSk/XCIgKyBrZWJvYk5hbWUgKyBcIiRcIiwgJ2knKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBnZXRDb21wb25lbnRDb250cm9sbGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkaXJlY3RpdmVFbCA9IFtdLnNsaWNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jYWxsKCRlbGVtZW50WzBdLmNoaWxkcmVuKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChlbCkgeyByZXR1cm4gZWwgJiYgZWwudGFnTmFtZSAmJiB0YWdSZWdleHBfMS5leGVjKGVsLnRhZ05hbWUpOyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGlyZWN0aXZlRWwgJiYgbmcuZWxlbWVudChkaXJlY3RpdmVFbCkuZGF0YShcIiRcIiArIGNmZy5jb21wb25lbnQgKyBcIkNvbnRyb2xsZXJcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRlcmVnaXN0ZXJXYXRjaF8xID0gc2NvcGUuJHdhdGNoKGdldENvbXBvbmVudENvbnRyb2xsZXIsIGZ1bmN0aW9uIChjdHJsSW5zdGFuY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWN0cmxJbnN0YW5jZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyQ29udHJvbGxlckNhbGxiYWNrcygkcSwgJHRyYW5zaXRpb25zLCBjdHJsSW5zdGFuY2UsIHNjb3BlLCBjZmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcmVnaXN0ZXJXYXRjaF8xKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsaW5rKHNjb3BlKTtcbiAgICAgICAgICAgIC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IHRyYW5zW2NhY2hlUHJvcF8xXVtpZF8xXSA9PT0gdHJ1ZSkgfHwgcHJldlRydXRoeUFuc3dlcl8xKHRyYW5zLnJlZGlyZWN0ZWRGcm9tKCkpKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAvLyBJZiBhIHVzZXIgYW5zd2VyZWQgeWVzLCBidXQgdGhlIHRyYW5zaXRpb24gd2FzIGxhdGVyIHJlZGlyZWN0ZWQsIGRvbid0IGFsc28gYXNrIGZvciB0aGUgbmV3IHJlZGlyZWN0IHRyYW5zaXRpb25cbiAgICAgICAgICAgIHZhciB3cmFwcGVkSG9vayA9IGZ1bmN0aW9uICh0cmFucykge1xuICAgICAgICAgICAgICAgIHZhciBwcm9taXNlO1xuICAgICAgICAgICAgICAgIHZhciBpZHMgPSAodHJhbnNbY2FjaGVQcm9wXzFdID0gdHJhbnNbY2FjaGVQcm9wXzFdIHx8IHt9KTtcbiAgICAgICAgICAgICAgICBpZiAoIXByZXZUcnV0aHlBbnN3ZXJfMSh0cmFucykpIHtcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZSA9ICRxLndoZW4oY29udHJvbGxlckluc3RhbmNlLnVpQ2FuRXhpdCh0cmFucykpO1xuICAgICAgICAgICAgICAgICAgICBwcm9taXNlLnRoZW4oZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gKGlkc1tpZF8xXSA9IHZhbCAhPT0gZmFsc2UpOyB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHByb21pc2U7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGNyaXRlcmlhID0geyBleGl0aW5nOiB2aWV3U3RhdGUubmFtZSB9O1xuICAgICAgICAgICAgJHNjb3BlLiRvbignJGRlc3Ryb3knLCAkdHJhbnNpdGlvbnMub25CZWZvcmUoY3JpdGVyaWEsIHdyYXBwZWRIb29rLCBob29rT3B0aW9ucykpO1xuICAgICAgICB9XG4gICAgfVxuICAgIG5nLm1vZHVsZSgndWkucm91dGVyLnN0YXRlJykuZGlyZWN0aXZlKCd1aVZpZXcnLCB1aVZpZXcpO1xuICAgIG5nLm1vZHVsZSgndWkucm91dGVyLnN0YXRlJykuZGlyZWN0aXZlKCd1aVZpZXcnLCAkVmlld0RpcmVjdGl2ZUZpbGwpO1xuXG4gICAgLyoqIEBwdWJsaWNhcGkgQG1vZHVsZSBuZzEgKi8gLyoqICovXG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiAkVmlld1Njcm9sbFByb3ZpZGVyKCkge1xuICAgICAgICB2YXIgdXNlQW5jaG9yU2Nyb2xsID0gZmFsc2U7XG4gICAgICAgIHRoaXMudXNlQW5jaG9yU2Nyb2xsID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdXNlQW5jaG9yU2Nyb2xsID0gdHJ1ZTtcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy4kZ2V0ID0gW1xuICAgICAgICAgICAgJyRhbmNob3JTY3JvbGwnLFxuICAgICAgICAgICAgJyR0aW1lb3V0JyxcbiAgICAgICAgICAgIGZ1bmN0aW9uICgkYW5jaG9yU2Nyb2xsLCAkdGltZW91dCkge1xuICAgICAgICAgICAgICAgIGlmICh1c2VBbmNob3JTY3JvbGwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRhbmNob3JTY3JvbGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoJGVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50WzBdLnNjcm9sbEludG9WaWV3KCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDAsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgXTtcbiAgICB9XG4gICAgbm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VzID0gdmFsdWVzO1xuICAgIGV4cG9ydHMud2F0Y2hEaWdlc3RzID0gd2F0Y2hEaWdlc3RzO1xuXG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcblxufSkpKTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFuZ3VsYXItdWktcm91dGVyLmpzLm1hcFxuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../@uirouter+angularjs@1.0.29/node_modules/@uirouter/angularjs/release/angular-ui-router.js\n"); +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_alert_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/alert.styl */ \"./src/webapp/styles/alert.styl\");\n/* harmony import */ var _alert_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./alert.html */ \"./src/webapp/scripts/components/alert/alert.html\");\n\n\n\nfunction controller(){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setThemeCssClass(buildThemeCssClass($ctrl.alert));\n };\n\n $ctrl.$onChanges = () => {\n setThemeCssClass(buildThemeCssClass($ctrl.alert));\n };\n\n $ctrl.retry = () => {\n const retryAction = getRetryAction();\n if(retryAction)\n retryAction();\n };\n\n function buildThemeCssClass(alert){\n return isValidTheme(alert) ? `p-alert-${alert.theme}` : '';\n }\n\n function isValidTheme(alert){\n return alert && ['danger', 'warn', 'success'].includes(alert.theme);\n }\n\n function setThemeCssClass(cssClass){\n $ctrl.themeCssClass = cssClass;\n }\n\n function getRetryAction(){\n return $ctrl.alert ? $ctrl.alert.retryAction : null;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n alert: '<'\n },\n controller,\n template: _alert_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9hbGVydC9hbGVydC5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBNEI7QUFDUTs7QUFFcEM7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSw0Q0FBNEMsWUFBWTtBQUN4RDs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLGlFQUFlO0FBQ2Y7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBLFVBQVU7QUFDVixDQUFDLEVBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvYWxlcnQvYWxlcnQuanM/NjU5OCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ0BzdHlsZXMvYWxlcnQuc3R5bCc7XG5pbXBvcnQgdGVtcGxhdGUgZnJvbSAnLi9hbGVydC5odG1sJztcblxuZnVuY3Rpb24gY29udHJvbGxlcigpe1xuICBjb25zdCAkY3RybCA9IHRoaXM7XG5cbiAgJGN0cmwuJG9uSW5pdCA9ICgpID0+IHtcbiAgICBzZXRUaGVtZUNzc0NsYXNzKGJ1aWxkVGhlbWVDc3NDbGFzcygkY3RybC5hbGVydCkpO1xuICB9O1xuXG4gICRjdHJsLiRvbkNoYW5nZXMgPSAoKSA9PiB7XG4gICAgc2V0VGhlbWVDc3NDbGFzcyhidWlsZFRoZW1lQ3NzQ2xhc3MoJGN0cmwuYWxlcnQpKTtcbiAgfTtcblxuICAkY3RybC5yZXRyeSA9ICgpID0+IHtcbiAgICBjb25zdCByZXRyeUFjdGlvbiA9IGdldFJldHJ5QWN0aW9uKCk7XG4gICAgaWYocmV0cnlBY3Rpb24pXG4gICAgICByZXRyeUFjdGlvbigpO1xuICB9O1xuXG4gIGZ1bmN0aW9uIGJ1aWxkVGhlbWVDc3NDbGFzcyhhbGVydCl7XG4gICAgcmV0dXJuIGlzVmFsaWRUaGVtZShhbGVydCkgPyBgcC1hbGVydC0ke2FsZXJ0LnRoZW1lfWAgOiAnJztcbiAgfVxuXG4gIGZ1bmN0aW9uIGlzVmFsaWRUaGVtZShhbGVydCl7XG4gICAgcmV0dXJuIGFsZXJ0ICYmIFsnZGFuZ2VyJywgJ3dhcm4nLCAnc3VjY2VzcyddLmluY2x1ZGVzKGFsZXJ0LnRoZW1lKTtcbiAgfVxuXG4gIGZ1bmN0aW9uIHNldFRoZW1lQ3NzQ2xhc3MoY3NzQ2xhc3Mpe1xuICAgICRjdHJsLnRoZW1lQ3NzQ2xhc3MgPSBjc3NDbGFzcztcbiAgfVxuXG4gIGZ1bmN0aW9uIGdldFJldHJ5QWN0aW9uKCl7XG4gICAgcmV0dXJuICRjdHJsLmFsZXJ0ID8gJGN0cmwuYWxlcnQucmV0cnlBY3Rpb24gOiBudWxsO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgYmluZGluZ3M6IHtcbiAgICBhbGVydDogJzwnXG4gIH0sXG4gIGNvbnRyb2xsZXIsXG4gIHRlbXBsYXRlXG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/alert/alert.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/index.js": -/*!*****************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/index.js ***! - \*****************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/back-trigger/back-trigger.js": +/*!********************************************************************!*\ + !*** ./src/webapp/scripts/components/back-trigger/back-trigger.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { -eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"../../../../axios@0.21.4/node_modules/axios/lib/axios.js\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2luZGV4LmpzPzExZTQiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsaUJBQWlCLG1CQUFPLENBQUMsNkVBQWEiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9pbmRleC5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZSgnLi9saWIvYXhpb3MnKTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/index.js\n"); +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_back_trigger_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/back-trigger.styl */ \"./src/webapp/styles/back-trigger.styl\");\n/* harmony import */ var _back_trigger_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./back-trigger.html */ \"./src/webapp/scripts/components/back-trigger/back-trigger.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n onClick: '<'\n },\n template: _back_trigger_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9iYWNrLXRyaWdnZXIvYmFjay10cmlnZ2VyLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUFtQztBQUNROztBQUUzQyxpRUFBZTtBQUNmO0FBQ0E7QUFDQSxHQUFHO0FBQ0gsVUFBVTtBQUNWLENBQUMsRUFBQyIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9iYWNrLXRyaWdnZXIvYmFjay10cmlnZ2VyLmpzPzExMDgiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICdAc3R5bGVzL2JhY2stdHJpZ2dlci5zdHlsJztcbmltcG9ydCB0ZW1wbGF0ZSBmcm9tICcuL2JhY2stdHJpZ2dlci5odG1sJztcblxuZXhwb3J0IGRlZmF1bHQge1xuICBiaW5kaW5nczoge1xuICAgIG9uQ2xpY2s6ICc8J1xuICB9LFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/back-trigger/back-trigger.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js": -/*!****************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/adapters/xhr.js ***! - \****************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/btn/btn.js": +/*!**************************************************!*\ + !*** ./src/webapp/scripts/components/btn/btn.js ***! + \**************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js\");\nvar cookies = __webpack_require__(/*! ./../helpers/cookies */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\");\nvar buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9hZGFwdGVycy94aHIuanM/NzFjNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsNEVBQVk7QUFDaEMsYUFBYSxtQkFBTyxDQUF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AgIH1cblxuICAgIGlmICghcmVxdWVzdERhdGEpIHtcbiAgICAgIHJlcXVlc3REYXRhID0gbnVsbDtcbiAgICB9XG5cbiAgICAvLyBTZW5kIHRoZSByZXF1ZXN0XG4gICAgcmVxdWVzdC5zZW5kKHJlcXVlc3REYXRhKTtcbiAgfSk7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_btn_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/btn.styl */ \"./src/webapp/styles/btn.styl\");\n/* harmony import */ var _btn_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./btn.html */ \"./src/webapp/scripts/components/btn/btn.html\");\n\n\n\nfunction controller(){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setThemeCssClass(buildThemeCssClass($ctrl.theme));\n setSizeCssClass(buildSizeCssClass($ctrl.size));\n };\n\n $ctrl.onButtonClick = () => {\n if($ctrl.onClick)\n $ctrl.onClick();\n };\n\n function buildThemeCssClass(theme){\n return buildCssClass(theme, ['danger']);\n }\n\n function buildSizeCssClass(size){\n return buildCssClass(size, ['small']);\n }\n\n function buildCssClass(cssClassModifier, validModifiers){\n return validModifiers.includes(cssClassModifier) ? `p-btn-${cssClassModifier}` : '';\n }\n\n function setThemeCssClass(cssClass){\n $ctrl.themeCssClass = cssClass;\n }\n\n function setSizeCssClass(cssClass){\n $ctrl.sizeCssClass = cssClass;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n transclude: true,\n bindings: {\n theme: '@',\n size: '@',\n onClick: '='\n },\n controller,\n template: _btn_html__WEBPACK_IMPORTED_MODULE_1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HJsLm9uQ2xpY2spXG4gICAgICAkY3RybC5vbkNsaWNrKCk7XG4gIH07XG5cbiAgZnVuY3Rpb24gYnVpbGRUaGVtZUNzc0NsYXNzKHRoZW1lKXtcbiAgICByZXR1cm4gYnVpbGRDc3NDbGFzcyh0aGVtZSwgWydkYW5nZXInXSk7XG4gIH1cblxuICBmdW5jdGlvbiBidWlsZFNpemVDc3NDbGFzcyhzaXplKXtcbiAgICByZXR1cm4gYnVpbGRDc3NDbGFzcyhzaXplLCBbJ3NtYWxsJ10pO1xuICB9XG5cbiAgZnVuY3Rpb24gYnVpbGRDc3NDbGFzcyhjc3NDbGFzc01vZGlmaWVyLCB2YWxpZE1vZGlmaWVycyl7XG4gICAgcmV0dXJuIHZhbGlkTW9kaWZpZXJzLmluY2x1ZGVzKGNzc0NsYXNzTW9kaWZpZXIpID8gYHAtYnRuLSR7Y3NzQ2xhc3NNb2RpZmllcn1gIDogJyc7XG4gIH1cblxuICBmdW5jdGlvbiBzZXRUaGVtZUNzc0NsYXNzKGNzc0NsYXNzKXtcbiAgICAkY3RybC50aGVtZUNzc0NsYXNzID0gY3NzQ2xhc3M7XG4gIH1cblxuICBmdW5jdGlvbiBzZXRTaXplQ3NzQ2xhc3MoY3NzQ2xhc3Mpe1xuICAgICRjdHJsLnNpemVDc3NDbGFzcyA9IGNzc0NsYXNzO1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgdHJhbnNjbHVkZTogdHJ1ZSxcbiAgYmluZGluZ3M6IHtcbiAgICB0aGVtZTogJ0AnLFxuICAgIHNpemU6ICdAJyxcbiAgICBvbkNsaWNrOiAnPSdcbiAgfSxcbiAgY29udHJvbGxlcixcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/btn/btn.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/axios.js": -/*!*********************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/axios.js ***! - \*********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/code-editor/code-editor.js": +/*!******************************************************************!*\ + !*** ./src/webapp/scripts/components/code-editor/code-editor.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\");\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js\");\n\n// Expose isAxiosError\naxios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9heGlvcy5qcz84MDU0Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyx5RUFBUztBQUM3QixXQUFXLG1CQUFPLENBQUMsdUZBQWdCO0FBQ25DLFlBQVksbUJBQU8sQ0FBQyxtRkFBYztBQUNsQyxrQkFBa0IsbUJBQU8sQ0FBQywrRkFBb0I7QUFDOUMsZUFBZSxtQkFBTyxDQUFDLCtFQUFZOztBQUVuQztBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsWUFBWSxNQUFNO0FBQ2xCO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLGVBQWUsbUJBQU8sQ0FBQyx5RkFBaUI7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9oZWxwZXJzL3NwcmVhZCcpO1xuXG4vLyBFeHBvc2UgaXNBeGlvc0Vycm9yXG5heGlvcy5pc0F4aW9zRXJyb3IgPSByZXF1aXJlKCcuL2hlbHBlcnMvaXNBeGlvc0Vycm9yJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gYXhpb3M7XG5cbi8vIEFsbG93IHVzZSBvZiBkZWZhdWx0IGltcG9ydCBzeW50YXggaW4gVHlwZVNjcmlwdFxubW9kdWxlLmV4cG9ydHMuZGVmYXVsdCA9IGF4aW9zO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/axios.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var brace__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! brace */ \"../../../../brace@0.11.1/node_modules/brace/index.js\");\n/* harmony import */ var brace__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(brace__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var brace_mode_javascript__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! brace/mode/javascript */ \"../../../../brace@0.11.1/node_modules/brace/mode/javascript.js\");\n/* harmony import */ var brace_mode_javascript__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(brace_mode_javascript__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var brace_mode_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! brace/mode/jsx */ \"../../../../brace@0.11.1/node_modules/brace/mode/jsx.js\");\n/* harmony import */ var brace_mode_jsx__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(brace_mode_jsx__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var brace_mode_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! brace/mode/html */ \"../../../../brace@0.11.1/node_modules/brace/mode/html.js\");\n/* harmony import */ var brace_mode_html__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(brace_mode_html__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var brace_mode_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! brace/mode/css */ \"../../../../brace@0.11.1/node_modules/brace/mode/css.js\");\n/* harmony import */ var brace_mode_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(brace_mode_css__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _styles_code_editor_styl__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @styles/code-editor.styl */ \"./src/webapp/styles/code-editor.styl\");\n/* harmony import */ var _code_editor_html__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./code-editor.html */ \"./src/webapp/scripts/components/code-editor/code-editor.html\");\n\n\n\n\n\n\n\n\nfunction controller($timeout, $element){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n $timeout(() => {\n setEditor(brace__WEBPACK_IMPORTED_MODULE_0__.edit(getEditorHostElement()));\n setEditorMode(buildModePath($ctrl.mode));\n setEditorOptions({ tabSize: 2 });\n setEditorCode($ctrl.code);\n listenChanges();\n });\n };\n\n $ctrl.handleChange = () => {\n if($ctrl.onChange)\n $ctrl.onChange(getSession().getValue());\n };\n\n $ctrl.$onDestroy = () => {\n if($ctrl.editor) {\n $ctrl.editor.destroy();\n $ctrl.editor.container.remove();\n }\n };\n\n function getEditorHostElement(){\n return $element[0].querySelector('[data-code-editor]');\n }\n\n function setEditor(editor){\n $ctrl.editor = editor;\n $ctrl.editor.$blockScrolling = Infinity;\n }\n\n function buildModePath(mode){\n return `ace/mode/${mode}`;\n }\n\n function setEditorCode(code){\n const value = code || '';\n getSession().setValue(value);\n }\n\n function setEditorMode(modePath){\n getSession().setMode(modePath);\n }\n\n function setEditorOptions(options){\n $ctrl.editor.setOptions(options);\n }\n\n function listenChanges(){\n const session = getSession();\n session.on('change', $ctrl.handleChange);\n }\n\n function getSession(){\n return $ctrl.editor && $ctrl.editor.getSession();\n }\n}\n\ncontroller.$inject = ['$timeout', '$element'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n code: '<',\n mode: '@',\n onChange: '='\n },\n controller,\n template: _code_editor_html__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9jb2RlLWVkaXRvci9jb2RlLWVkaXRvci5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQTZCO0FBQ0U7QUFDUDtBQUNDO0FBQ0Q7QUFDVTtBQUNROztBQUUxQztBQUNBOztBQUVBO0FBQ0E7QUFDQSxnQkFBZ0IsdUNBQVE7QUFDeEI7QUFDQSx5QkFBeUIsWUFBWTtBQUNyQztBQUNBO0FBQ0EsS0FBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSx1QkFBdUIsS0FBSztBQUM1Qjs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBLGlFQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQSxVQ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NoYW5nZSk7XG4gIH1cblxuICBmdW5jdGlvbiBnZXRTZXNzaW9uKCl7XG4gICAgcmV0dXJuICRjdHJsLmVkaXRvciAmJiAkY3RybC5lZGl0b3IuZ2V0U2Vzc2lvbigpO1xuICB9XG59XG5cbmNvbnRyb2xsZXIuJGluamVjdCA9IFsnJHRpbWVvdXQnLCAnJGVsZW1lbnQnXTtcblxuZXhwb3J0IGRlZmF1bHQge1xuICBiaW5kaW5nczoge1xuICAgIGNvZGU6ICc8JyxcbiAgICBtb2RlOiAnQCcsXG4gICAgb25DaGFuZ2U6ICc9J1xuICB9LFxuICBjb250cm9sbGVyLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/code-editor/code-editor.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js": -/*!*****************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js ***! - \*****************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/components-menu-item/components-menu-item.js": +/*!************************************************************************************!*\ + !*** ./src/webapp/scripts/components/components-menu-item/components-menu-item.js ***! + \************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hv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ack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_components_menu_item_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/components-menu-item.styl */ \"./src/webapp/styles/components-menu-item.styl\");\n/* harmony import */ var _components_menu_item_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components-menu-item.html */ \"./src/webapp/scripts/components/components-menu-item/components-menu-item.html\");\n\n\n\nfunction controller($timeout, $element, routeService){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setHasChildrenCssClass(buildHasChildrenCssClass());\n setChildrenVisibilityCssClass(buildChildrenVisibilityCssClass());\n };\n\n $ctrl.handleItemClick = () => {\n const item = $ctrl.item;\n handleNavigation(item.route);\n if($ctrl.onItemClick)\n $ctrl.onItemClick(item);\n };\n\n function handleNavigation(route){\n return route ?\n goToRoute({ name: route.name, params: route.params }) :\n setChildrenVisibilityCssClass(buildChildrenVisibilityCssClass());\n }\n\n function buildHasChildrenCssClass(){\n return $ctrl.item.children ? 'p-components-menu-item-has-children' : '';\n }\n\n function setHasChildrenCssClass(cssClass){\n $ctrl.hasChildrenCssClass = cssClass;\n }\n\n function goToRoute({ name, params }){\n routeService.go(name, params, { resetUrlPath: true });\n }\n\n function buildChildrenVisibilityCssClass(){\n return $ctrl.item.children && !$ctrl.childrenVisibilityCssClass ? 'p-components-menu-item-children-visible' : '';\n }\n\n function setChildrenVisibilityCssClass(cssClass){\n $ctrl.childrenVisibilityCssClass = cssClass;\n }\n}\n\ncontroller.$inject = ['$timeout', '$element', 'routeService'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n transclude: true,\n bindings: {\n item: '<',\n onItemClick: '<'\n },\n controller,\n template: _components_menu_item_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# s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gICByb3V0ZVNlcnZpY2UuZ28obmFtZSwgcGFyYW1zLCB7IHJlc2V0VXJsUGF0aDogdHJ1ZSB9KTtcbiAgfVxuXG4gIGZ1bmN0aW9uIGJ1aWxkQ2hpbGRyZW5WaXNpYmlsaXR5Q3NzQ2xhc3MoKXtcbiAgICByZXR1cm4gJGN0cmwuaXRlbS5jaGlsZHJlbiAmJiAhJGN0cmwuY2hpbGRyZW5WaXNpYmlsaXR5Q3NzQ2xhc3MgPyAncC1jb21wb25lbnRzLW1lbnUtaXRlbS1jaGlsZHJlbi12aXNpYmxlJyA6ICcnO1xuICB9XG5cbiAgZnVuY3Rpb24gc2V0Q2hpbGRyZW5WaXNpYmlsaXR5Q3NzQ2xhc3MoY3NzQ2xhc3Mpe1xuICAgICRjdHJsLmNoaWxkcmVuVmlzaWJpbGl0eUNzc0NsYXNzID0gY3NzQ2xhc3M7XG4gIH1cbn1cblxuY29udHJvbGxlci4kaW5qZWN0ID0gWyckdGltZW91dCcsICckZWxlbWVudCcsICdyb3V0ZVNlcnZpY2UnXTtcblxuZXhwb3J0IGRlZmF1bHQge1xuICB0cmFuc2NsdWRlOiB0cnVlLFxuICBiaW5kaW5nczoge1xuICAgIGl0ZW06ICc8JyxcbiAgICBvbkl0ZW1DbGljazogJzwnXG4gIH0sXG4gIGNvbnRyb2xsZXIsXG4gIHRlbXBsYXRlXG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/components-menu-item/components-menu-item.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js": -/*!**********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js ***! - \**********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/components-menu/components-menu.js": +/*!**************************************************************************!*\ + !*** ./src/webapp/scripts/components/components-menu/components-menu.js ***! + \**************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jYW5jZWwvQ2FuY2VsVG9rZW4uanM/MjMzMSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixhQUFhLG1CQUFPLENBQUMsa0ZBQVU7O0FBRS9CO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxTQUFTO0FBQ3BCO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tb2R1bGUuZXhwb3J0cyA9IENhbmNlbFRva2VuO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_components_menu_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/components-menu.styl */ \"./src/webapp/styles/components-menu.styl\");\n/* harmony import */ var _scripts_services_components_menu__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/services/components-menu */ \"./src/webapp/scripts/services/components-menu.js\");\n/* harmony import */ var _components_menu_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components-menu.html */ \"./src/webapp/scripts/components/components-menu/components-menu.html\");\n\n\n\n\nfunction controller($transitions, routeService){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setTransitions($transitions);\n listenRouteChange();\n };\n\n $ctrl.fetch = () => {\n return _scripts_services_components_menu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].build(routeService.getParams('engine'));\n };\n\n $ctrl.fetchSuccess = items => {\n setItems(items);\n configActiveItem(items);\n };\n\n $ctrl.onSearchTermChange = term => {\n _scripts_services_components_menu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].configItemsVisibilityByTerm($ctrl.items, term);\n configNoResultsMessageVisibility(getVisibleItems($ctrl.items));\n };\n\n function setTransitions(transitions){\n $ctrl.$transitions = transitions;\n }\n\n function listenRouteChange(){\n $ctrl.$transitions.onSuccess({}, () => {\n configActiveItem($ctrl.items);\n });\n }\n\n function setItems(items){\n $ctrl.items = items;\n }\n\n function configActiveItem(items = []){\n return items.forEach(item => {\n if(item.children)\n return configActiveItem(item.children);\n item.active = isCurrentRoute(item.route);\n });\n }\n\n function isCurrentRoute(route){\n return routeService.isCurrentRoute(route.name, route.params);\n }\n\n function getVisibleItems(items){\n return _scripts_services_components_menu__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getVisibleItems(items);\n }\n\n function configNoResultsMessageVisibility(visibleItems){\n const shouldShowNoResultsMessage = visibleItems.length === 0;\n setNoResultsMessageVisibility(shouldShowNoResultsMessage);\n }\n\n function setNoResultsMessageVisibility(shouldShow){\n $ctrl.shouldShowNoResultsMessage = shouldShow;\n }\n}\n\ncontroller.$inject = ['$transitions', 'routeService'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n onItemClick: '<'\n },\n controller,\n template: _components_menu_html__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9jb21wb25lbnRzLW1lbnUvY29tcG9uZW50cy1tZW51LmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBc0M7QUFDZ0M7QUFDeEI7O0FBRTlDO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxXQUFXLCtFQUEyQjtBQUN0Qzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLElBQUkscUdBQWlEO0FBQ3JEO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0EsbUNBQW1DO0FBQ25DO0FBQ0EsS0FBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSztBQUNMOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBLFdBQVcseUZBQXFDO0FBQ2hEOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOzt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ljZS5nZXRWaXNpYmxlSXRlbXMoaXRlbXMpO1xuICB9XG5cbiAgZnVuY3Rpb24gY29uZmlnTm9SZXN1bHRzTWVzc2FnZVZpc2liaWxpdHkodmlzaWJsZUl0ZW1zKXtcbiAgICBjb25zdCBzaG91bGRTaG93Tm9SZXN1bHRzTWVzc2FnZSA9IHZpc2libGVJdGVtcy5sZW5ndGggPT09IDA7XG4gICAgc2V0Tm9SZXN1bHRzTWVzc2FnZVZpc2liaWxpdHkoc2hvdWxkU2hvd05vUmVzdWx0c01lc3NhZ2UpO1xuICB9XG5cbiAgZnVuY3Rpb24gc2V0Tm9SZXN1bHRzTWVzc2FnZVZpc2liaWxpdHkoc2hvdWxkU2hvdyl7XG4gICAgJGN0cmwuc2hvdWxkU2hvd05vUmVzdWx0c01lc3NhZ2UgPSBzaG91bGRTaG93O1xuICB9XG59XG5cbmNvbnRyb2xsZXIuJGluamVjdCA9IFsnJHRyYW5zaXRpb25zJywgJ3JvdXRlU2VydmljZSddO1xuXG5leHBvcnQgZGVmYXVsdCB7XG4gIGJpbmRpbmdzOiB7XG4gICAgb25JdGVtQ2xpY2s6ICc8J1xuICB9LFxuICBjb250cm9sbGVyLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/components-menu/components-menu.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js": -/*!*******************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js ***! - \*******************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/credits/credits.js": +/*!**********************************************************!*\ + !*** ./src/webapp/scripts/components/credits/credits.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jYW5jZWwvaXNDYW5jZWwuanM/YWFjNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0EiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY2FuY2VsL2lzQ2FuY2VsLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQ2FuY2VsKHZhbHVlKSB7XG4gIHJldHVybiAhISh2YWx1ZSAmJiB2YWx1ZS5fX0NBTkNFTF9fKTtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_credits_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/credits.styl */ \"./src/webapp/styles/credits.styl\");\n/* harmony import */ var _credits_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./credits.html */ \"./src/webapp/scripts/components/credits/credits.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n template: _credits_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9jcmVkaXRzL2NyZWRpdHMuanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQThCO0FBQ1E7O0FBRXRDLGlFQUFlO0FBQ2YsVUFBVTtBQUNWLENBQUMsRUFBQyIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9jcmVkaXRzL2NyZWRpdHMuanM/Zjk5ZCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ0BzdHlsZXMvY3JlZGl0cy5zdHlsJztcbmltcG9ydCB0ZW1wbGF0ZSBmcm9tICcuL2NyZWRpdHMuaHRtbCc7XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/credits/credits.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js": -/*!**************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/Axios.js ***! - \**************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/engine-menu/engine-menu.js": +/*!******************************************************************!*\ + !*** ./src/webapp/scripts/components/engine-menu/engine-menu.js ***! + \******************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar buildURL = __webpack_require__(/*! ../helpers/buildURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js\");\nvar mergeConfig = __webpack_require__(/*! ./mergeConfig */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\");\nvar validator = __webpack_require__(/*! ../helpers/validator */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js\");\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbW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gvXlxcPy8sICcnKTtcbn07XG5cbi8vIFByb3ZpZGUgYWxpYXNlcyBmb3Igc3VwcG9ydGVkIHJlcXVlc3QgbWV0aG9kc1xudXRpbHMuZm9yRWFjaChbJ2RlbGV0ZScsICdnZXQnLCAnaGVhZCcsICdvcHRpb25zJ10sIGZ1bmN0aW9uIGZvckVhY2hNZXRob2ROb0RhdGEobWV0aG9kKSB7XG4gIC8qZXNsaW50IGZ1bmMtbmFtZXM6MCovXG4gIEF4aW9zLnByb3RvdHlwZVttZXRob2RdID0gZnVuY3Rpb24odXJsLCBjb25maWcpIHtcbiAgICByZXR1cm4gdGhpcy5yZXF1ZXN0KG1lcmdlQ29uZmlnKGNvbmZpZyB8fCB7fSwge1xuICAgICAgbWV0aG9kOiBtZXRob2QsXG4gICAgICB1cmw6IHVybCxcbiAgICAgIGRhdGE6IChjb25maWcgfHwge30pLmRhdGFcbiAgICB9KSk7XG4gIH07XG59KTtcblxudXRpbHMuZm9yRWFjaChbJ3Bvc3QnLCAncHV0JywgJ3BhdGNoJ10sIGZ1bmN0aW9uIGZvckVhY2hNZXRob2RXaXRoRGF0YShtZXRob2QpIHtcbiAgLyplc2xpbnQgZnVuYy1uYW1lczowKi9cbiAgQXhpb3MucHJvdG90eXBlW21ldGhvZF0gPSBmdW5jdGlvbih1cmwsIGRhdGEsIGNvbmZpZykge1xuICAgIHJldHVybiB0aGlzLnJlcXVlc3QobWVyZ2VDb25maWcoY29uZmlnIHx8IHt9LCB7XG4gICAgICBtZXRob2Q6IG1ldGhvZCxcbiAgICAgIHVybDogdXJsLFxuICAgICAgZGF0YTogZGF0YVxuICAgIH0pKTtcbiAgfTtcbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IEF4aW9zO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_engine_menu_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/engine-menu.styl */ \"./src/webapp/styles/engine-menu.styl\");\n/* harmony import */ var _scripts_resources_projects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/resources/projects */ \"./src/webapp/scripts/resources/projects.js\");\n/* harmony import */ var _engine_menu_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./engine-menu.html */ \"./src/webapp/scripts/components/engine-menu/engine-menu.html\");\n\n\n\n\nfunction controller() {\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n _scripts_resources_projects__WEBPACK_IMPORTED_MODULE_1__[\"default\"].get().then(onFetchProjectsSuccess, onFetchProjectsError);\n };\n\n function onFetchProjectsSuccess(projects){\n setProjects(projects);\n configMenuVisibility(projects);\n }\n\n function onFetchProjectsError(err){\n console.log('Failed to get projects', err);\n }\n\n function setProjects(projects){\n $ctrl.projects = projects;\n }\n\n function configMenuVisibility(projects){\n const shouldShow = projects.length > 1;\n setMenuVisibility(shouldShow);\n }\n\n function setMenuVisibility(shouldShow){\n $ctrl.shouldShowMenu = shouldShow;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n controller,\n template: _engine_menu_html__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9lbmdpbmUtbWVudS9lbmdpbmUtbWVudS5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQWtDO0FBQ3lCO0FBQ2pCOztBQUUxQztBQUNBOztBQUVBO0FBQ0EsSUFBSSx1RUFBb0I7QUFDeEI7O0FBRUE7QUF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G4gICAgJGN0cmwucHJvamVjdHMgPSBwcm9qZWN0cztcbiAgfVxuXG4gIGZ1bmN0aW9uIGNvbmZpZ01lbnVWaXNpYmlsaXR5KHByb2plY3RzKXtcbiAgICBjb25zdCBzaG91bGRTaG93ID0gcHJvamVjdHMubGVuZ3RoID4gMTtcbiAgICBzZXRNZW51VmlzaWJpbGl0eShzaG91bGRTaG93KTtcbiAgfVxuXG4gIGZ1bmN0aW9uIHNldE1lbnVWaXNpYmlsaXR5KHNob3VsZFNob3cpe1xuICAgICRjdHJsLnNob3VsZFNob3dNZW51ID0gc2hvdWxkU2hvdztcbiAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCB7XG4gIGNvbnRyb2xsZXIsXG4gIHRlbXBsYXRlXG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/engine-menu/engine-menu.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js": -/*!***************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js ***! - \***************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.js": +/*!****************************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.js ***! + \****************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL0ludGVyY2VwdG9yTWFuYWdlci5qcz85MTA1Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyw0RUFBWTs7QUFFaEM7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsU0FBUztBQUNwQixXQUFXLFNBQVM7QUFDcEI7QUFDQSxZQUFZLE9BQU87QUFDbkI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQU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jZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _external_component_attributes_list_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./external-component-attributes-list.html */ \"./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.html\");\n\n\nfunction controller(){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n parseAttributesRequiredProp($ctrl.attributes);\n };\n\n function parseAttributesRequiredProp(attributes){\n attributes.forEach(attr => {\n attr.required = attr.required === true || isRequiredAPositiveStringValue(attr.required);\n });\n }\n\n function isRequiredAPositiveStringValue(required){\n return typeof required == 'string' && required.toLowerCase() === 'yes';\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n attributes: '<',\n title: '@'\n },\n controller,\n template: _external_component_attributes_list_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtYXR0cmlidXRlcy1saXN0L2V4dGVybmFsLWNvbXBvbmVudC1hdHRyaWJ1dGVzLWxpc3QuanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBaUU7O0FBRWpFO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQSxpRUFBZTtBQUNmO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBLFVBQV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AnQCdcbiAgfSxcbiAgY29udHJvbGxlcixcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js": -/*!**********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js ***! - \**********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-code/external-component-code.js": +/*!******************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-code/external-component-code.js ***! + \******************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js\");\nvar combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js\");\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc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cXVlc3RlZFVSTCBBYnNvbHV0ZSBvciByZWxhdGl2ZSBVUkwgdG8gY29tYmluZVxuICogQHJldHVybnMge3N0cmluZ30gVGhlIGNvbWJpbmVkIGZ1bGwgcGF0aFxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGJ1aWxkRnVsbFBhdGgoYmFzZVVSTCwgcmVxdWVzdGVkVVJMKSB7XG4gIGlmIChiYXNlVVJMICYmICFpc0Fic29sdXRlVVJMKHJlcXVlc3RlZFVSTCkpIHtcbiAgICByZXR1cm4gY29tYmluZVVSTHMoYmFzZVVSTCwgcmVxdWVzdGVkVVJMKTtcbiAgfVxuICByZXR1cm4gcmVxdWVzdGVkVVJMO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_code_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component-code.styl */ \"./src/webapp/styles/external-component-code.styl\");\n/* harmony import */ var prismjs_themes_prism_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prismjs/themes/prism.css */ \"../../../../prismjs@1.28.0/node_modules/prismjs/themes/prism.css\");\n/* harmony import */ var prismjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prismjs */ \"../../../../prismjs@1.28.0/node_modules/prismjs/prism.js\");\n/* harmony import */ var prismjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prismjs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _scripts_services_code_indentation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @scripts/services/code-indentation */ \"./src/webapp/scripts/services/code-indentation.js\");\n/* harmony import */ var _scripts_services_vue_controller_syntax__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @scripts/services/vue-controller-syntax */ \"./src/webapp/scripts/services/vue-controller-syntax.js\");\n/* harmony import */ var _external_component_code_html__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./external-component-code.html */ \"./src/webapp/scripts/components/external-component-code/external-component-code.html\");\n\n\n\n\n\n\n\nfunction controller($element){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n injectCodeIntoPreElement(highlightCode(formatCode($ctrl.code), $ctrl.language));\n };\n\n function formatCode(code){\n if(typeof code == 'object') return _scripts_services_vue_controller_syntax__WEBPACK_IMPORTED_MODULE_4__[\"default\"].stringify(code);\n return _scripts_services_code_indentation__WEBPACK_IMPORTED_MODULE_3__[\"default\"].normalize(code);\n }\n\n function injectCodeIntoPreElement(code){\n const preElement = $element.find('pre')[0];\n preElement.innerHTML = code;\n }\n\n function highlightCode(code, language){\n return prismjs__WEBPACK_IMPORTED_MODULE_2___default().highlight(code, (prismjs__WEBPACK_IMPORTED_MODULE_2___default().languages)[language], language);\n }\n}\n\ncontroller.$inject = ['$element'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n code: '<',\n language: '@'\n },\n controller,\n template: _external_component_code_html__WEBPACK_IMPORTED_MODULE_5__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtY29kZS9leHRlcm5hbC1jb21wb25lbnQtY29kZS5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUE4QztBQUNaO0FBQ047QUFDNEM7QUFDUztBQUMzQjs7QUFFdEQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQS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Y3RybC5jb2RlKSwgJGN0cmwubGFuZ3VhZ2UpKTtcbiAgfTtcblxuICBmdW5jdGlvbiBmb3JtYXRDb2RlKGNvZGUpe1xuICAgIGlmKHR5cGVvZiBjb2RlID09ICdvYmplY3QnKSByZXR1cm4gdnVlQ29udHJvbGxlclN5bnRheFNlcnZpY2Uuc3RyaW5naWZ5KGNvZGUpO1xuICAgIHJldHVybiBjb2RlSW5kZW50YXRpb25TZXJ2aWNlLm5vcm1hbGl6ZShjb2RlKTtcbiAgfVxuXG4gIGZ1bmN0aW9uIGluamVjdENvZGVJbnRvUHJlRWxlbWVudChjb2RlKXtcbiAgICBjb25zdCBwcmVFbGVtZW50ID0gJGVsZW1lbnQuZmluZCgncHJlJylbMF07XG4gICAgcHJlRWxlbWVudC5pbm5lckhUTUwgPSBjb2RlO1xuICB9XG5cbiAgZnVuY3Rpb24gaGlnaGxpZ2h0Q29kZShjb2RlLCBsYW5ndWFnZSl7XG4gICAgcmV0dXJuIFByaXNtLmhpZ2hsaWdodChjb2RlLCBQcmlzbS5sYW5ndWFnZXNbbGFuZ3VhZ2VdLCBsYW5ndWFnZSk7XG4gIH1cbn1cblxuY29udHJvbGxlci4kaW5qZWN0ID0gWyckZWxlbWVudCddO1xuXG5leHBvcnQgZGVmYXVsdCB7XG4gIGJpbmRpbmdzOiB7XG4gICAgY29kZTogJzwnLFxuICAgIGxhbmd1YWdlOiAnQCdcbiAgfSxcbiAgY29udHJvbGxlcixcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-code/external-component-code.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js": +/***/ "./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.js": /*!********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/createError.js ***! + !*** ./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.js ***! \********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\");\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2NyZWF0ZUVycm9yLmpzPzc0ZmYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsbUJBQW1CLG1CQUFPLENBQUMsNEZBQWdCOztBQUUzQztBQUNBO0FBQ0E7QUFDQSxXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsTUFBTTtBQUNuQjtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvY3JlYXRlRXJyb3IuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBlbmhhbmNlRXJyb3IgPSByZXF1aXJlKCcuL2VuaGFuY2VFcnJvcicpO1xuXG4vKipcbiAqIENyZWF0ZSBhbiBFcnJvciB3aXRoIHRoZSBzcGVjaWZpZWQgbWVzc2FnZSwgY29uZmlnLCBlcnJvciBjb2RlLCByZXF1ZXN0IGFuZCByZXNwb25zZS5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gbWVzc2FnZSBUaGUgZXJyb3IgbWVzc2FnZS5cbiAqIEBwYXJhbSB7T2JqZWN0fSBjb25maWcgVGhlIGNvbmZpZy5cbiAqIEBwYXJhbSB7c3RyaW5nfSBbY29kZV0gVGhlIGVycm9yIGNvZGUgKGZvciBleGFtcGxlLCAnRUNPTk5BQk9SVEVEJykuXG4gKiBAcGFyYW0ge09iamVjdH0gW3JlcXVlc3RdIFRoZSByZXF1ZXN0LlxuICogQHBhcmFtIHtPYmplY3R9IFtyZXNwb25zZV0gVGhlIHJlc3BvbnNlLlxuICogQHJldHVybnMge0Vycm9yfSBUaGUgY3JlYXRlZCBlcnJvci5cbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjcmVhdGVFcnJvcihtZXNzYWdlLCBjb25maWcsIGNvZGUsIHJlcXVlc3QsIHJlc3BvbnNlKSB7XG4gIHZhciBlcnJvciA9IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgcmV0dXJuIGVuaGFuY2VFcnJvcihlcnJvciwgY29uZmlnLCBjb2RlLCByZXF1ZXN0LCByZXNwb25zZSk7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_example_edit_link_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component-example-edit-link.styl */ \"./src/webapp/styles/external-component-example-edit-link.styl\");\n/* harmony import */ var _scripts_services_playground_code_search_param__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/services/playground-code-search-param */ \"./src/webapp/scripts/services/playground-code-search-param.js\");\n/* harmony import */ var _scripts_services_code_indentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @scripts/services/code-indentation */ \"./src/webapp/scripts/services/code-indentation.js\");\n/* harmony import */ var _scripts_services_vue_controller_syntax__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @scripts/services/vue-controller-syntax */ \"./src/webapp/scripts/services/vue-controller-syntax.js\");\n/* harmony import */ var _external_component_example_edit_link_html__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./external-component-example-edit-link.html */ \"./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.html\");\n\n\n\n\n\n\nfunction controller(routeService){\n const $ctrl = this;\n\n $ctrl.goToPlayground = () => {\n routeService.go('app.external-components.playground', {\n code: buildPlaygroundCode($ctrl.engine, $ctrl.example),\n source: 'edit-link'\n });\n };\n\n function buildPlaygroundCode(engine, { template, controller, styles }){\n return _scripts_services_playground_code_search_param__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stringify(\n formatCode(template),\n getControllerFormatter(engine)(controller),\n formatCode(styles)\n );\n }\n\n function getControllerFormatter(engine){\n return {\n vue: formatVueController,\n angular: formatAngularController,\n vanilla: formatVanillaController\n }[engine] || formatCode;\n }\n\n function formatVueController(code){\n const ctrl = code ? _scripts_services_vue_controller_syntax__WEBPACK_IMPORTED_MODULE_3__[\"default\"].stringify(code) : buildBlankVueController();\n return `return ${ctrl};`;\n }\n\n function buildBlankVueController(){\n return '{\\n data(){\\n return {};\\n },\\n \"methods\":{}\\n}';\n }\n\n function formatAngularController(code = buildBlankAngularController()){\n return `${handleTopLevelFunction(handleAngularDependencies(code))}\\n\\nreturn controller;`;\n }\n\n function buildBlankAngularController(){\n return 'function controller(){\\n const $ctrl = this;\\n}';\n }\n\n function handleAngularDependencies(code){\n const regex = new RegExp(/^.*\\((.*)\\)\\s?{\\n/);\n const dependencies = regex.exec(code)[1].split(',').map(dep => {\n if(dep) return `'${dep}'`;\n });\n return `${code}\\n\\ncontroller.$inject = [${dependencies.join(', ')}];`;\n }\n\n function formatVanillaController(code = 'function controller(element){}'){\n return `${handleTopLevelFunction(code)}\\n\\nreturn controller;`;\n }\n\n function handleTopLevelFunction(code, engine){\n if(isAnonymousTopLevelFunction(code) && engine != 'react') return nameControllerFunction(code);\n return formatCode(code);\n }\n\n function isAnonymousTopLevelFunction(code){\n return buildAnonymousTopLevelFunctionRegex().test(code);\n }\n\n function nameControllerFunction(code){\n return formatCode(code.replace(buildAnonymousTopLevelFunctionRegex(), 'function controller($1){\\n'));\n }\n\n function buildAnonymousTopLevelFunctionRegex(){\n return new RegExp(/^function\\s?\\((.*)\\)\\s?\\{\\n/);\n }\n\n function formatCode(code){\n return code && _scripts_services_code_indentation__WEBPACK_IMPORTED_MODULE_2__[\"default\"].normalize(code) || '\\n';\n }\n}\n\ncontroller.$inject = ['routeService'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n engine: '@',\n example: '<'\n },\n controller,\n template: _external_component_example_edit_link_html__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS1lZGl0LWxpbmsvZXh0ZXJuYWwtY29tcG9uZW50LWV4YW1wbGUtZWRpdC1saW5rLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7OztBQUEyRDtBQUNtQztBQUN0QjtBQUNTO0F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lbEZ1bmN0aW9uKGNvZGUpe1xuICAgIHJldHVybiBidWlsZEFub255bW91c1RvcExldmVsRnVuY3Rpb25SZWdleCgpLnRlc3QoY29kZSk7XG4gIH1cblxuICBmdW5jdGlvbiBuYW1lQ29udHJvbGxlckZ1bmN0aW9uKGNvZGUpe1xuICAgIHJldHVybiBmb3JtYXRDb2RlKGNvZGUucmVwbGFjZShidWlsZEFub255bW91c1RvcExldmVsRnVuY3Rpb25SZWdleCgpLCAnZnVuY3Rpb24gY29udHJvbGxlcigkMSl7XFxuJykpO1xuICB9XG5cbiAgZnVuY3Rpb24gYnVpbGRBbm9ueW1vdXNUb3BMZXZlbEZ1bmN0aW9uUmVnZXgoKXtcbiAgICByZXR1cm4gbmV3IFJlZ0V4cCgvXmZ1bmN0aW9uXFxzP1xcKCguKilcXClcXHM/XFx7XFxuLyk7XG4gIH1cblxuICBmdW5jdGlvbiBmb3JtYXRDb2RlKGNvZGUpe1xuICAgIHJldHVybiBjb2RlICYmIGNvZGVJbmRlbnRhdGlvblNlcnZpY2Uubm9ybWFsaXplKGNvZGUpIHx8ICdcXG4nO1xuICB9XG59XG5cbmNvbnRyb2xsZXIuJGluamVjdCA9IFsncm91dGVTZXJ2aWNlJ107XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgYmluZGluZ3M6IHtcbiAgICBlbmdpbmU6ICdAJyxcbiAgICBleGFtcGxlOiAnPCdcbiAgfSxcbiAgY29udHJvbGxlcixcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js": -/*!************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js ***! - \************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-example/external-component-example.js": +/*!************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-example/external-component-example.js ***! + \************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2Rpc3BhdGNoUmVxdWVzdC5qcz84YWViIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyw0RUFBWTtBQUNoQyxvQkFBb0IsbUJBQU8sQ0FBQyw4RkFBaUI7QUFDN0MsZUFBZSxtQkFBTyxDQUFDLDhGQUFvQjtBQUMzQyxlQUFlLG1CQUFPLENBQUMsZ0ZBQWE7O0FBRXBDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsK0JBQStCO0FBQy9CLHVDQUF1QztBQUN2QztBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxHQUFHO0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lnLFxuICAgICAgcmVzcG9uc2UuZGF0YSxcbiAgICAgIHJlc3BvbnNlLmhlYWRlcnMsXG4gICAgICBjb25maWcudHJhbnNmb3JtUmVzcG9uc2VcbiAgICApO1xuXG4gICAgcmV0dXJuIHJlc3BvbnNlO1xuICB9LCBmdW5jdGlvbiBvbkFkYXB0ZXJSZWplY3Rpb24ocmVhc29uKSB7XG4gICAgaWYgKCFpc0NhbmNlbChyZWFzb24pKSB7XG4gICAgICB0aHJvd0lmQ2FuY2VsbGF0aW9uUmVxdWVzdGVkKGNvbmZpZyk7XG5cbiAgICAgIC8vIFRyYW5zZm9ybSByZXNwb25zZSBkYXRhXG4gICAgICBpZiAocmVhc29uICYmIHJlYXNvbi5yZXNwb25zZSkge1xuICAgICAgICByZWFzb24ucmVzcG9uc2UuZGF0YSA9IHRyYW5zZm9ybURhdGEuY2FsbChcbiAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgcmVhc29uLnJlc3BvbnNlLmRhdGEsXG4gICAgICAgICAgcmVhc29uLnJlc3BvbnNlLmhlYWRlcnMsXG4gICAgICAgICAgY29uZmlnLnRyYW5zZm9ybVJlc3BvbnNlXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIFByb21pc2UucmVqZWN0KHJlYXNvbik7XG4gIH0pO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_example_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component-example.styl */ \"./src/webapp/styles/external-component-example.styl\");\n/* harmony import */ var _scripts_constants_external_component_query_params__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/constants/external-component-query-params */ \"./src/webapp/scripts/constants/external-component-query-params.js\");\n/* harmony import */ var _external_component_example_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./external-component-example.html */ \"./src/webapp/scripts/components/external-component-example/external-component-example.html\");\n\n\n\n\nfunction controller(){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setTabQueryParamGroupKey(_scripts_constants_external_component_query_params__WEBPACK_IMPORTED_MODULE_1__[\"default\"].EXAMPLE_TABS_GROUP);\n setTabQueryParamKey(buildTabsQueryParamKey($ctrl.exampleIndex));\n setTemplateTabVisibility(getTemplateTabVisibility($ctrl.engine));\n };\n\n function setTabQueryParamGroupKey(key){\n $ctrl.tabQueryParamGroupKey = key;\n }\n\n function buildTabsQueryParamKey(exampleIndex){\n return `externalComponentExample${exampleIndex}Tab`;\n }\n\n function setTabQueryParamKey(key){\n $ctrl.tabQueryParamKey = key;\n }\n\n function getTemplateTabVisibility(engine){\n return engine != 'react';\n }\n\n function setTemplateTabVisibility(shouldShow){\n $ctrl.shouldShowTemplateTab = shouldShow;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n engine: '<',\n example: '<',\n exampleIndex: '<'\n },\n controller,\n template: _external_component_example_html__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQWlEO0FBQ2dEO0FBQ3hDOztBQUV6RDtBQUNBOztBQUVBO0FBQ0EsNkJBQTZCLDZHQUFrRDtBQUMvRTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQU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wuZW5naW5lKSk7XG4gIH07XG5cbiAgZnVuY3Rpb24gc2V0VGFiUXVlcnlQYXJhbUdyb3VwS2V5KGtleSl7XG4gICAgJGN0cmwudGFiUXVlcnlQYXJhbUdyb3VwS2V5ID0ga2V5O1xuICB9XG5cbiAgZnVuY3Rpb24gYnVpbGRUYWJzUXVlcnlQYXJhbUtleShleGFtcGxlSW5kZXgpe1xuICAgIHJldHVybiBgZXh0ZXJuYWxDb21wb25lbnRFeGFtcGxlJHtleGFtcGxlSW5kZXh9VGFiYDtcbiAgfVxuXG4gIGZ1bmN0aW9uIHNldFRhYlF1ZXJ5UGFyYW1LZXkoa2V5KXtcbiAgICAkY3RybC50YWJRdWVyeVBhcmFtS2V5ID0ga2V5O1xuICB9XG5cbiAgZnVuY3Rpb24gZ2V0VGVtcGxhdGVUYWJWaXNpYmlsaXR5KGVuZ2luZSl7XG4gICAgcmV0dXJuIGVuZ2luZSAhPSAncmVhY3QnO1xuICB9XG5cbiAgZnVuY3Rpb24gc2V0VGVtcGxhdGVUYWJWaXNpYmlsaXR5KHNob3VsZFNob3cpe1xuICAgICRjdHJsLnNob3VsZFNob3dUZW1wbGF0ZVRhYiA9IHNob3VsZFNob3c7XG4gIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQge1xuICBiaW5kaW5nczoge1xuICAgIGVuZ2luZTogJzwnLFxuICAgIGV4YW1wbGU6ICc8JyxcbiAgICBleGFtcGxlSW5kZXg6ICc8J1xuICB9LFxuICBjb250cm9sbGVyLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-example/external-component-example.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js": -/*!*********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/enhanceError.js ***! - \*********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.js": +/*!************************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.js ***! + \************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2VuaGFuY2VFcnJvci5qcz80NDY4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQTtBQUNBLFdBQVcsTUFBTTtBQUNqQixXQUFXLE9BQU87QUFDbEIsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixXQUFXLE9BQU87QUFDbEIsYUFBYSxNQUFNO0FBQ25CO0FBQ0E7QUFDQTtBQUNBO0F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3IucmVzcG9uc2UgPSByZXNwb25zZTtcbiAgZXJyb3IuaXNBeGlvc0Vycm9yID0gdHJ1ZTtcblxuICBlcnJvci50b0pTT04gPSBmdW5jdGlvbiB0b0pTT04oKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIC8vIFN0YW5kYXJkXG4gICAgICBtZXNzYWdlOiB0aGlzLm1lc3NhZ2UsXG4gICAgICBuYW1lOiB0aGlzLm5hbWUsXG4gICAgICAvLyBNaWNyb3NvZnRcbiAgICAgIGRlc2NyaXB0aW9uOiB0aGlzLmRlc2NyaXB0aW9uLFxuICAgICAgbnVtYmVyOiB0aGlzLm51bWJlcixcbiAgICAgIC8vIE1vemlsbGFcbiAgICAgIGZpbGVOYW1lOiB0aGlzLmZpbGVOYW1lLFxuICAgICAgbGluZU51bWJlcjogdGhpcy5saW5lTnVtYmVyLFxuICAgICAgY29sdW1uTnVtYmVyOiB0aGlzLmNvbHVtbk51bWJlcixcbiAgICAgIHN0YWNrOiB0aGlzLnN0YWNrLFxuICAgICAgLy8gQXhpb3NcbiAgICAgIGNvbmZpZzogdGhpcy5jb25maWcsXG4gICAgICBjb2RlOiB0aGlzLmNvZGVcbiAgICB9O1xuICB9O1xuICByZXR1cm4gZXJyb3I7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_examples_list_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component-examples-list.styl */ \"./src/webapp/styles/external-component-examples-list.styl\");\n/* harmony import */ var _external_component_examples_list_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./external-component-examples-list.html */ \"./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n examples: '<',\n engine: '<'\n },\n template: _external_component_examples_list_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBdUQ7QUFDUTs7QUFFL0QsaUVBQWU7QUFDZjtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0gsVUFBVTtBQUNWLENBQUMsRUFBQyIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC5qcz8wMTBmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC5zdHlsJztcbmltcG9ydCB0ZW1wbGF0ZSBmcm9tICcuL2V4dGVybmFsLWNvbXBvbmVudC1leGFtcGxlcy1saXN0Lmh0bWwnO1xuXG5leHBvcnQgZGVmYXVsdCB7XG4gIGJpbmRpbmdzOiB7XG4gICAgZXhhbXBsZXM6ICc8JyxcbiAgICBlbmdpbmU6ICc8J1xuICB9LFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js": -/*!********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js ***! - \********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.js": +/*!**********************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.js ***! + \**********************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL21lcmdlQ29uZmlnLmpzP2ZhYmYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsWUFBWSxtQkFBTyxDQUFDLDBFQUFVOztBQUU5QjtBQUNBO0FBQ0E7QUFDQTtBQUN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yS2V5cylcbiAgICAuY29uY2F0KGRpcmVjdE1lcmdlS2V5cyk7XG5cbiAgdmFyIG90aGVyS2V5cyA9IE9iamVjdFxuICAgIC5rZXlzKGNvbmZpZzEpXG4gICAgLmNvbmNhdChPYmplY3Qua2V5cyhjb25maWcyKSlcbiAgICAuZmlsdGVyKGZ1bmN0aW9uIGZpbHRlckF4aW9zS2V5cyhrZXkpIHtcbiAgICAgIHJldHVybiBheGlvc0tleXMuaW5kZXhPZihrZXkpID09PSAtMTtcbiAgICB9KTtcblxuICB1dGlscy5mb3JFYWNoKG90aGVyS2V5cywgbWVyZ2VEZWVwUHJvcGVydGllcyk7XG5cbiAgcmV0dXJuIGNvbmZpZztcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_methods_list_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component-methods-list.styl */ \"./src/webapp/styles/external-component-methods-list.styl\");\n/* harmony import */ var _external_component_methods_list_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./external-component-methods-list.html */ \"./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n methods: '<'\n },\n template: _external_component_methods_list_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtbWV0aG9kcy1saXN0L2V4dGVybmFsLWNvbXBvbmVudC1tZXRob2RzLWxpc3QuanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQXNEO0FBQ1E7O0FBRTlELGlFQUFlO0FBQ2Y7QUFDQTtBQUNBLEdBQUc7QUFDSCxVQUFVO0FBQ1YsQ0FBQyxFQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2V4dGVybmFsLWNvbXBvbmVudC1tZXRob2RzLWxpc3QvZXh0ZXJuYWwtY29tcG9uZW50LW1ldGhvZHMtbGlzdC5qcz81Mjc4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtbWV0aG9kcy1saXN0LnN0eWwnO1xuaW1wb3J0IHRlbXBsYXRlIGZyb20gJy4vZXh0ZXJuYWwtY29tcG9uZW50LW1ldGhvZHMtbGlzdC5odG1sJztcblxuZXhwb3J0IGRlZmF1bHQge1xuICBiaW5kaW5nczoge1xuICAgIG1ldGhvZHM6ICc8J1xuICB9LFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js": -/*!***************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/settle.js ***! - \***************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-preview/external-component-preview.js": +/*!************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-preview/external-component-preview.js ***! + \************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\");\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL3NldHRsZS5qcz9lNTNmIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLGtCQUFrQixtQkFBTyxDQUFDLDBGQUFlOztBQUV6QztBQUNBO0FBQ0E7QUFDQSxXQUFXLFNBQVM7QUFDcEIsV0FBVyxTQUFTO0FBQ3BCLFdBQVcsT0FBTztBQUNsQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL3NldHRsZS5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIGNyZWF0ZUVycm9yID0gcmVxdWlyZSgnLi9jcmVhdGVFcnJvcicpO1xuXG4vKipcbiAqIFJlc29sdmUgb3IgcmVqZWN0IGEgUHJvbWlzZSBiYXNlZCBvbiByZXNwb25zZSBzdGF0dXMuXG4gKlxuICogQHBhcmFtIHtGdW5jdGlvbn0gcmVzb2x2ZSBBIGZ1bmN0aW9uIHRoYXQgcmVzb2x2ZXMgdGhlIHByb21pc2UuXG4gKiBAcGFyYW0ge0Z1bmN0aW9ufSByZWplY3QgQSBmdW5jdGlvbiB0aGF0IHJlamVjdHMgdGhlIHByb21pc2UuXG4gKiBAcGFyYW0ge29iamVjdH0gcmVzcG9uc2UgVGhlIHJlc3BvbnNlLlxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIHNldHRsZShyZXNvbHZlLCByZWplY3QsIHJlc3BvbnNlKSB7XG4gIHZhciB2YWxpZGF0ZVN0YXR1cyA9IHJlc3BvbnNlLmNvbmZpZy52YWxpZGF0ZVN0YXR1cztcbiAgaWYgKCFyZXNwb25zZS5zdGF0dXMgfHwgIXZhbGlkYXRlU3RhdHVzIHx8IHZhbGlkYXRlU3RhdHVzKHJlc3BvbnNlLnN0YXR1cykpIHtcbiAgICByZXNvbHZlKHJlc3BvbnNlKTtcbiAgfSBlbHNlIHtcbiAgICByZWplY3QoY3JlYXRlRXJyb3IoXG4gICAgICAnUmVxdWVzdCBmYWlsZWQgd2l0aCBzdGF0dXMgY29kZSAnICsgcmVzcG9uc2Uuc3RhdHVzLFxuICAgICAgcmVzcG9uc2UuY29uZmlnLFxuICAgICAgbnVsbCxcbiAgICAgIHJlc3BvbnNlLnJlcXVlc3QsXG4gICAgICByZXNwb25zZVxuICAgICkpO1xuICB9XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _glorious_fyzer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @glorious/fyzer */ \"../../../../@glorious+fyzer@0.1.10/node_modules/@glorious/fyzer/dist/fyzer.min.js\");\n/* harmony import */ var _glorious_fyzer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_glorious_fyzer__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _scripts_services_external_components_preview_renderer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/services/external-components-preview-renderer */ \"./src/webapp/scripts/services/external-components-preview-renderer.js\");\n/* harmony import */ var _scripts_services_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @scripts/services/json */ \"./src/webapp/scripts/services/json.js\");\n/* harmony import */ var _external_component_preview_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./external-component-preview.html */ \"./src/webapp/scripts/components/external-component-preview/external-component-preview.html\");\n\n\n\n\n\nfunction controller($scope, $timeout, $element, angularComponentBuilder){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n $timeout(() => {\n const id = _glorious_fyzer__WEBPACK_IMPORTED_MODULE_0___default().subscribe($element[0], () => $scope.$apply(onShowUp));\n setPageFoldSubscriberId(id);\n });\n };\n\n $ctrl.$onDestroy = () => {\n const { engine, instance, pageFoldSubscriptionId } = $ctrl;\n if(pageFoldSubscriptionId)\n unsubscribeFromPageFoldService(pageFoldSubscriptionId);\n if(instance)\n _scripts_services_external_components_preview_renderer__WEBPACK_IMPORTED_MODULE_1__[\"default\"].destroy(engine, instance);\n };\n\n function onShowUp(){\n const { rendered, engine, example, pageFoldSubscriptionId } = $ctrl;\n if(!rendered)\n render(engine, angular.copy(example), pageFoldSubscriptionId);\n }\n\n function render(engine, example, pageFoldSubscriptionId){\n handleExampleStyles(getExampleStyles(example));\n buildComponent(engine, _scripts_services_json__WEBPACK_IMPORTED_MODULE_2__[\"default\"].handleFunctions(example, { engine: engine }));\n unsubscribeFromPageFoldService(pageFoldSubscriptionId);\n setPageFoldSubscriberId(null);\n setRendered(true);\n }\n\n function getExampleStyles(example){\n return example && example.styles;\n }\n\n function handleExampleStyles(styles){\n if(!styles)\n return;\n const styleTag = buildStyleTag(styles);\n $element.prepend(styleTag);\n }\n\n function buildStyleTag(styles){\n const tag = document.createElement('style');\n tag.innerHTML = styles;\n return tag;\n }\n\n function buildComponent(engine, component){\n const instance = _scripts_services_external_components_preview_renderer__WEBPACK_IMPORTED_MODULE_1__[\"default\"].render(engine, component, {\n container: getContainer()[0],\n scope: $scope,\n angularContainer: getContainer(),\n angularComponentBuilder\n });\n setInstance(instance);\n }\n\n function getContainer(){\n return $element.find('div');\n }\n\n function setPageFoldSubscriberId(id){\n $ctrl.pageFoldSubscriptionId = id;\n }\n\n function unsubscribeFromPageFoldService(subscriberId){\n _glorious_fyzer__WEBPACK_IMPORTED_MODULE_0___default().unsubscribe(subscriberId);\n }\n\n function setRendered(rendered){\n $ctrl.rendered = rendered;\n }\n\n function setInstance(instance){\n $ctrl.instance = instance;\n }\n}\n\ncontroller.$inject = ['$scope', '$timeout', '$element', 'angularComponentBuilder'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n example: '<',\n engine: '<'\n },\n controller,\n template: _external_component_preview_html__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJldmlldy9leHRlcm5hbC1jb21wb25lbnQtcHJldmlldy5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBb0M7QUFDbUU7QUFDdEQ7QUFDUTs7QUFFekQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsaUJBQWlCLGdFQUFlO0FBQ2hDO0FBQ0EsS0FBSztBQUNMOztBQ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XG4gIH0sXG4gIGNvbnRyb2xsZXIsXG4gIHRlbXBsYXRlXG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-preview/external-component-preview.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js": -/*!**********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/core/transformData.js ***! - \**********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.js": +/*!****************************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.js ***! + \****************************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar defaults = __webpack_require__(/*! ./../defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL3RyYW5zZm9ybURhd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sIGZucykge1xuICB2YXIgY29udGV4dCA9IHRoaXMgfHwgZGVmYXVsdHM7XG4gIC8qZXNsaW50IG5vLXBhcmFtLXJlYXNzaWduOjAqL1xuICB1dGlscy5mb3JFYWNoKGZucywgZnVuY3Rpb24gdHJhbnNmb3JtKGZuKSB7XG4gICAgZGF0YSA9IGZuLmNhbGwoY29udGV4dCwgZGF0YSwgaGVhZGVycyk7XG4gIH0pO1xuXG4gIHJldHVybiBkYXRhO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_props_list_item_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component-props-list-item.styl */ \"./src/webapp/styles/external-component-props-list-item.styl\");\n/* harmony import */ var _external_component_props_list_item_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./external-component-props-list-item.html */ \"./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n transclude: true,\n template: _external_component_props_list_item_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC1pdGVtL2V4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0LWl0ZW0uanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQXlEO0FBQ1E7O0FBRWpFLGlFQUFlO0FBQ2Y7QUFDQSxVQUFVO0FBQ1YsQ0FBQyxFQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2V4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0LWl0ZW0vZXh0ZXJuYWwtY29tcG9uZW50LXByb3BzLWxpc3QtaXRlbS5qcz83NWYyIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC1pdGVtLnN0eWwnO1xuaW1wb3J0IHRlbXBsYXRlIGZyb20gJy4vZXh0ZXJuYWwtY29tcG9uZW50LXByb3BzLWxpc3QtaXRlbS5odG1sJztcblxuZXhwb3J0IGRlZmF1bHQge1xuICB0cmFuc2NsdWRlOiB0cnVlLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/defaults.js": -/*!************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/defaults.js ***! - \************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component-props-list/external-component-props-list.js": +/*!******************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component-props-list/external-component-props-list.js ***! + \******************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(/*! ./utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js\");\nvar enhanceError = __webpack_require__(/*! ./core/enhanceError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(/*! ./adapters/xhr */ \"../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\");\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = __webpack_require__(/*! ./adapters/http */ \"../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\");\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../process@0.11.10/node_modules/process/browser.js */ \"../../../../process@0.11.10/node_modules/process/browser.js\")))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9kZWZhdW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uICBtYXhDb250ZW50TGVuZ3RoOiAtMSxcbiAgbWF4Qm9keUxlbmd0aDogLTEsXG5cbiAgdmFsaWRhdGVTdGF0dXM6IGZ1bmN0aW9uIHZhbGlkYXRlU3RhdHVzKHN0YXR1cykge1xuICAgIHJldHVybiBzdGF0dXMgPj0gMjAwICYmIHN0YXR1cyA8IDMwMDtcbiAgfVxufTtcblxuZGVmYXVsdHMuaGVhZGVycyA9IHtcbiAgY29tbW9uOiB7XG4gICAgJ0FjY2VwdCc6ICdhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L3BsYWluLCAqLyonXG4gIH1cbn07XG5cbnV0aWxzLmZvckVhY2goWydkZWxldGUnLCAnZ2V0JywgJ2hlYWQnXSwgZnVuY3Rpb24gZm9yRWFjaE1ldGhvZE5vRGF0YShtZXRob2QpIHtcbiAgZGVmYXVsdHMuaGVhZGVyc1ttZXRob2RdID0ge307XG59KTtcblxudXRpbHMuZm9yRWFjaChbJ3Bvc3QnLCAncHV0JywgJ3BhdGNoJ10sIGZ1bmN0aW9uIGZvckVhY2hNZXRob2RXaXRoRGF0YShtZXRob2QpIHtcbiAgZGVmYXVsdHMuaGVhZGVyc1ttZXRob2RdID0gdXRpbHMubWVyZ2UoREVGQVVMVF9DT05URU5UX1RZUEUpO1xufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gZGVmYXVsdHM7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_props_list_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component-props-list.styl */ \"./src/webapp/styles/external-component-props-list.styl\");\n/* harmony import */ var _external_component_props_list_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./external-component-props-list.html */ \"./src/webapp/scripts/components/external-component-props-list/external-component-props-list.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n transclude: true,\n bindings: {\n title: '@'\n },\n template: _external_component_props_list_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC5qcy5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7QUFBb0Q7QUFDUTs7QUFFNUQsaUVBQWU7QUFDZjtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0gsVUFBVTtBQUNWLENBQUMsRUFBQyIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC5qcz85YWI4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC5zdHlsJztcbmltcG9ydCB0ZW1wbGF0ZSBmcm9tICcuL2V4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0Lmh0bWwnO1xuXG5leHBvcnQgZGVmYXVsdCB7XG4gIHRyYW5zY2x1ZGU6IHRydWUsXG4gIGJpbmRpbmdzOiB7XG4gICAgdGl0bGU6ICdAJ1xuICB9LFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-props-list/external-component-props-list.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js": -/*!****************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/bind.js ***! - \****************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-component/external-component.js": +/*!********************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-component/external-component.js ***! + \********************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2JpbmQuanM/NzQyNiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQSxtQkFBbUIsaUJBQWlCO0FBQ3BDO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9iaW5kLmpzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGJpbmQoZm4sIHRoaXNBcmcpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHdyYXAoKSB7XG4gICAgdmFyIGFyZ3MgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCk7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmdzLmxlbmd0aDsgaSsrKSB7XG4gICAgICBhcmdzW2ldID0gYXJndW1lbnRzW2ldO1xuICAgIH1cbiAgICByZXR1cm4gZm4uYXBwbHkodGhpc0FyZywgYXJncyk7XG4gIH07XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_component_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-component.styl */ \"./src/webapp/styles/external-component.styl\");\n/* harmony import */ var _scripts_resources_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/resources/components */ \"./src/webapp/scripts/resources/components.js\");\n/* harmony import */ var _external_component_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./external-component.html */ \"./src/webapp/scripts/components/external-component/external-component.html\");\n\n\n\n\nfunction controller(routeService) {\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setEngine(routeService.getParams('engine'));\n };\n\n $ctrl.fetch = () => {\n return _scripts_resources_components__WEBPACK_IMPORTED_MODULE_1__[\"default\"].get(\n routeService.getParams('engine'),\n routeService.getParams('componentId')\n );\n };\n\n $ctrl.fetchSuccess = component => {\n setComponent(component);\n configAttributes(component);\n };\n\n function setEngine(engine){\n $ctrl.engine = engine;\n }\n\n function setComponent(component){\n $ctrl.component = component;\n }\n\n function configAttributes({ attributes, properties }){\n const attrs = attributes || properties;\n if(attrs) {\n setAttributes(attrs);\n setAttributesListTitle(buildAttributesListTitle(attributes));\n }\n }\n\n function setAttributes(attributes){\n $ctrl.attributes = attributes;\n }\n\n function buildAttributesListTitle(attributes){\n return attributes ? 'Attributes' : 'Properties';\n }\n\n function setAttributesListTitle(title){\n $ctrl.attributesListTitle = title;\n }\n}\n\ncontroller.$inject = ['routeService'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n controller,\n template: _external_component_html__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQvZXh0ZXJuYWwtY29tcG9uZW50LmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBeUM7QUFDc0I7QUFDZDs7QUFFakQ7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxXQUFXLHlFQUFzQjtBQUNqQztBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLDhCQUE4Qix3QkFBd0I7QUFDdEQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUEsaUVBQWU7QUFDZjtBQUNBLFVBQVU7QUFDVixDQUFDLEVBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvZXh0ZXJuYWwtY29tcG9uZW50L2V4dGVybmFsLWNvbXBvbmVudC5qcz80NTJiIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0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XR0cnMpIHtcbiAgICAgIHNldEF0dHJpYnV0ZXMoYXR0cnMpO1xuICAgICAgc2V0QXR0cmlidXRlc0xpc3RUaXRsZShidWlsZEF0dHJpYnV0ZXNMaXN0VGl0bGUoYXR0cmlidXRlcykpO1xuICAgIH1cbiAgfVxuXG4gIGZ1bmN0aW9uIHNldEF0dHJpYnV0ZXMoYXR0cmlidXRlcyl7XG4gICAgJGN0cmwuYXR0cmlidXRlcyA9IGF0dHJpYnV0ZXM7XG4gIH1cblxuICBmdW5jdGlvbiBidWlsZEF0dHJpYnV0ZXNMaXN0VGl0bGUoYXR0cmlidXRlcyl7XG4gICAgcmV0dXJuIGF0dHJpYnV0ZXMgPyAnQXR0cmlidXRlcycgOiAnUHJvcGVydGllcyc7XG4gIH1cblxuICBmdW5jdGlvbiBzZXRBdHRyaWJ1dGVzTGlzdFRpdGxlKHRpdGxlKXtcbiAgICAkY3RybC5hdHRyaWJ1dGVzTGlzdFRpdGxlID0gdGl0bGU7XG4gIH1cbn1cblxuY29udHJvbGxlci4kaW5qZWN0ID0gWydyb3V0ZVNlcnZpY2UnXTtcblxuZXhwb3J0IGRlZmF1bHQge1xuICBjb250cm9sbGVyLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component/external-component.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js": -/*!********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js ***! - \********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/external-components-playground/external-components-playground.js": +/*!********************************************************************************************************!*\ + !*** ./src/webapp/scripts/components/external-components-playground/external-components-playground.js ***! + \********************************************************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2J1aWxkVVJMLmpzP2I0OWYiX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gZWxzZSB7XG4gICAgICAgIHZhbCA9IFt2YWxdO1xuICAgICAgfVxuXG4gICAgICB1dGlscy5mb3JFYWNoKHZhbCwgZnVuY3Rpb24gcGFyc2VWYWx1ZSh2KSB7XG4gICAgICAgIGlmICh1dGlscy5pc0RhdGUodikpIHtcbiAgICAgICAgICB2ID0gdi50b0lTT1N0cmluZygpO1xuICAgICAgICB9IGVsc2UgaWYgKHV0aWxzLmlzT2JqZWN0KHYpKSB7XG4gICAgICAgICAgdiA9IEpTT04uc3RyaW5naWZ5KHYpO1xuICAgICAgICB9XG4gICAgICAgIHBhcnRzLnB1c2goZW5jb2RlKGtleSkgKyAnPScgKyBlbmNvZGUodikpO1xuICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICBzZXJpYWxpemVkUGFyYW1zID0gcGFydHMuam9pbignJicpO1xuICB9XG5cbiAgaWYgKHNlcmlhbGl6ZWRQYXJhbXMpIHtcbiAgICB2YXIgaGFzaG1hcmtJbmRleCA9IHVybC5pbmRleE9mKCcjJyk7XG4gICAgaWYgKGhhc2htYXJrSW5kZXggIT09IC0xKSB7XG4gICAgICB1cmwgPSB1cmwuc2xpY2UoMCwgaGFzaG1hcmtJbmRleCk7XG4gICAgfVxuXG4gICAgdXJsICs9ICh1cmwuaW5kZXhPZignPycpID09PSAtMSA/ICc/JyA6ICcmJykgKyBzZXJpYWxpemVkUGFyYW1zO1xuICB9XG5cbiAgcmV0dXJuIHVybDtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_external_components_playground_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/external-components-playground.styl */ \"./src/webapp/styles/external-components-playground.styl\");\n/* harmony import */ var _scripts_services_playground_code_search_param__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/services/playground-code-search-param */ \"./src/webapp/scripts/services/playground-code-search-param.js\");\n/* harmony import */ var _scripts_services_external_components_playground_code_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @scripts/services/external-components-playground-code-builder */ \"./src/webapp/scripts/services/external-components-playground-code-builder.js\");\n/* harmony import */ var _external_components_playground_html__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./external-components-playground.html */ \"./src/webapp/scripts/components/external-components-playground/external-components-playground.html\");\n\n\n\n\n\nfunction controller($timeout, $element, routeService){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setEngine(routeService.getParams('engine'));\n setTemplateTabVisibility(getTemplateTabVisibility());\n setControllerCodeEditorLanguage(($ctrl.engine == 'react' ? 'jsx' : 'javascript'));\n setCssClasses(buildCssClasses());\n handleCodeSearchParam(routeService.getParams('code'));\n };\n\n $ctrl.onPreviewRender = () => {\n const code = buildPreviewCode($ctrl);\n handlePreviewCodeParts(code);\n renderPreview($ctrl.engine, code);\n };\n\n $ctrl.onPreviewDestroy = () => {\n setPreviewVisibility(false);\n };\n\n $ctrl.setTemplate = template => {\n $ctrl.template = template;\n };\n\n $ctrl.setController = controller => {\n $ctrl.controller = controller;\n };\n\n $ctrl.setStyles = styles => {\n $ctrl.styles = styles;\n };\n\n function setEngine(engine){\n $ctrl.engine = engine;\n }\n\n function setTemplateTabVisibility(shouldShow){\n $ctrl.shouldShowTemplateTab = shouldShow;\n }\n\n function buildCssClasses(){\n const cssClasses = ['p-external-components-playground'];\n if(routeService.getParams('source') == 'edit-link') cssClasses.push('p-external-components-playground-padding');\n return cssClasses.join(' ');\n }\n\n function setCssClasses(cssClasses){\n $ctrl.cssClasses = cssClasses;\n }\n\n function getTemplateTabVisibility(){\n return $ctrl.engine != 'react';\n }\n\n function setControllerCodeEditorLanguage(language){\n $ctrl.controllerCodeLanguage = language;\n }\n\n function handleCodeSearchParam(code){\n const { parse } = _scripts_services_playground_code_search_param__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n const previewCode = code ? parse(code) : buildPreviewCode($ctrl);\n handlePreviewCodeParts(previewCode);\n renderPreview($ctrl.engine, previewCode);\n }\n\n function handlePreviewCodeParts({ controller, styles, template }){\n $ctrl.setTemplate(template);\n $ctrl.setController(controller);\n $ctrl.setStyles(styles);\n }\n\n function buildPreviewCode({ engine, template, controller, styles }){\n return _scripts_services_external_components_playground_code_builder__WEBPACK_IMPORTED_MODULE_2__[\"default\"].build(engine, template, controller, styles);\n }\n\n function renderPreview(engine, { template, controller, styles }){\n setPreview(buildPreview(engine, { template, controller, styles }));\n setPreviewVisibility(true);\n $timeout(() => routeService.setParam('code', _scripts_services_playground_code_search_param__WEBPACK_IMPORTED_MODULE_1__[\"default\"].stringify(template, controller, styles)));\n }\n\n function buildPreview(engine, { controller, template, styles }){\n return {\n controller: engine == 'react' ? controller : eval(`(function(){ ${controller} }())`),\n styles,\n template\n };\n }\n\n function setPreview(preview){\n $ctrl.preview = preview;\n }\n\n function setPreviewVisibility(shouldShow){\n $ctrl.shouldShowPreview = shouldShow;\n }\n}\n\ncontroller.$inject = ['$timeout', '$element', 'routeService'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n controller,\n template: _external_components_playground_html__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnRzLXBsYXlncm91bmQvZXh0ZXJuYWwtY29tcG9uZW50cy1wbGF5Z3JvdW5kLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBQXFEO0FBQ3lDO0FBQ3NCO0FBQ3ZEOztBQUU3RDtBQUNB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blxuY29udHJvbGxlci4kaW5qZWN0ID0gWyckdGltZW91dCcsICckZWxlbWVudCcsICdyb3V0ZVNlcnZpY2UnXTtcblxuZXhwb3J0IGRlZmF1bHQge1xuICBjb250cm9sbGVyLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-components-playground/external-components-playground.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js": -/*!***********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js ***! - \***********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/heading/heading.js": +/*!**********************************************************!*\ + !*** ./src/webapp/scripts/components/heading/heading.js ***! + \**********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2NvbWJpbmVVUkxzLmpzPzI5ZjYiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWI7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsT0FBTztBQUNsQixhQUFhLE9BQU87QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6Ii4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvY29tYmluZVVSTHMuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBVUkwgYnkgY29tYmluaW5nIHRoZSBzcGVjaWZpZWQgVVJMc1xuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBiYXNlVVJMIFRoZSBiYXNlIFVSTFxuICogQHBhcmFtIHtzdHJpbmd9IHJlbGF0aXZlVVJMIFRoZSByZWxhdGl2ZSBVUkxcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBjb21iaW5lZCBVUkxcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjb21iaW5lVVJMcyhiYXNlVVJMLCByZWxhdGl2ZVVSTCkge1xuICByZXR1cm4gcmVsYXRpdmVVUkxcbiAgICA/IGJhc2VVUkwucmVwbGFjZSgvXFwvKyQvLCAnJykgKyAnLycgKyByZWxhdGl2ZVVSTC5yZXBsYWNlKC9eXFwvKy8sICcnKVxuICAgIDogYmFzZVVSTDtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_heading_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/heading.styl */ \"./src/webapp/styles/heading.styl\");\n/* harmony import */ var _heading_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./heading.html */ \"./src/webapp/scripts/components/heading/heading.html\");\n\n\n\nfunction controller($element) {\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n const headingElement = buildHeading($ctrl.size, $ctrl.text);\n $element.find('div').append(headingElement);\n };\n\n function buildHeading(size, text){\n const tagName = isValidSize(size) ? `h${size}` : 'h1';\n const element = document.createElement(tagName);\n element.innerHTML = text;\n return element;\n }\n\n function isValidSize(size){\n return size && parseInt(size) <= 6;\n }\n}\n\ncontroller.$inject = ['$element'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n size: '@',\n text: '@'\n },\n controller,\n template: _heading_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9oZWFkaW5nL2hlYWRpbmcuanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQThCO0FBQ1E7O0FBRXRDO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSw0Q0FBNEMsS0FBSztBQUNqRDtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQSxpRUFBZTtBQUNmO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBLFVBQVU7QUFDVixDQUFDLEVBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvaGVhZGluZy9oZWFkaW5nLmpzPzE1ZGYiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICdAc3R5bGVzL2hlYWRpbmcuc3R5bCc7XG5pbXBvcnQgdGVtcGxhdGUgZnJvbSAnLi9oZWFkaW5nLmh0bWwnO1xuXG5mdW5jdGlvbiBjb250cm9sbGVyKCRlbGVtZW50KSB7XG4gIGNvbnN0ICRjdHJsID0gdGhpcztcblxuICAkY3RybC4kb25Jbml0ID0gKCkgPT4ge1xuICAgIGNvbnN0IGhlYWRpbmdFbGVtZW50ID0gYnVpbGRIZWFkaW5nKCRjdHJsLnNpemUsICRjdHJsLnRleHQpO1xuICAgICRlbGVtZW50LmZpbmQoJ2RpdicpLmFwcGVuZChoZWFkaW5nRWxlbWVudCk7XG4gIH07XG5cbiAgZnVuY3Rpb24gYnVpbGRIZWFkaW5nKHNpemUsIHRleHQpe1xuICAgIGNvbnN0IHRhZ05hbWUgPSBpc1ZhbGlkU2l6ZShzaXplKSA/IGBoJHtzaXplfWAgOiAnaDEnO1xuICAgIGNvbnN0IGVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHRhZ05hbWUpO1xuICAgIGVsZW1lbnQuaW5uZXJIVE1MID0gdGV4dDtcbiAgICByZXR1cm4gZWxlbWVudDtcbiAgfVxuXG4gIGZ1bmN0aW9uIGlzVmFsaWRTaXplKHNpemUpe1xuICAgIHJldHVybiBzaXplICYmIHBhcnNlSW50KHNpemUpIDw9IDY7XG4gIH1cbn1cblxuY29udHJvbGxlci4kaW5qZWN0ID0gWyckZWxlbWVudCddO1xuXG5leHBvcnQgZGVmYXVsdCB7XG4gIGJpbmRpbmdzOiB7XG4gICAgc2l6ZTogJ0AnLFxuICAgIHRleHQ6ICdAJ1xuICB9LFxuICBjb250cm9sbGVyLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/heading/heading.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js": -/*!*******************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/cookies.js ***! - \*******************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/index.js": +/*!************************************************!*\ + !*** ./src/webapp/scripts/components/index.js ***! + \************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2Nvb2tpZXMuanM/NjZmOSJdLCJuYW1lcyI6W10sIm1hcHBpbmdz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gICAgICAgICAgaWYgKHV0aWxzLmlzTnVtYmVyKGV4cGlyZXMpKSB7XG4gICAgICAgICAgICBjb29raWUucHVzaCgnZXhwaXJlcz0nICsgbmV3IERhdGUoZXhwaXJlcykudG9HTVRTdHJpbmcoKSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHV0aWxzLmlzU3RyaW5nKHBhdGgpKSB7XG4gICAgICAgICAgICBjb29raWUucHVzaCgncGF0aD0nICsgcGF0aCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHV0aWxzLmlzU3RyaW5nKGRvbWFpbikpIHtcbiAgICAgICAgICAgIGNvb2tpZS5wdXNoKCdkb21haW49JyArIGRvbWFpbik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHNlY3VyZSA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgY29va2llLnB1c2goJ3NlY3VyZScpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGRvY3VtZW50LmNvb2tpZSA9IGNvb2tpZS5qb2luKCc7ICcpO1xuICAgICAgICB9LFxuXG4gICAgICAgIHJlYWQ6IGZ1bmN0aW9uIHJlYWQobmFtZSkge1xuICAgICAgICAgIHZhciBtYXRjaCA9IGRvY3VtZW50LmNvb2tpZS5tYXRjaChuZXcgUmVnRXhwKCcoXnw7XFxcXHMqKSgnICsgbmFtZSArICcpPShbXjtdKiknKSk7XG4gICAgICAgICAgcmV0dXJuIChtYXRjaCA/IGRlY29kZVVSSUNvbXBvbmVudChtYXRjaFszXSkgOiBudWxsKTtcbiAgICAgICAgfSxcblxuICAgICAgICByZW1vdmU6IGZ1bmN0aW9uIHJlbW92ZShuYW1lKSB7XG4gICAgICAgICAgdGhpcy53cml0ZShuYW1lLCAnJywgRGF0ZS5ub3coKSAtIDg2NDAwMDAwKTtcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICB9KSgpIDpcblxuICAvLyBOb24gc3RhbmRhcmQgYnJvd3NlciBlbnYgKHdlYiB3b3JrZXJzLCByZWFjdC1uYXRpdmUpIGxhY2sgbmVlZGVkIHN1cHBvcnQuXG4gICAgKGZ1bmN0aW9uIG5vblN0YW5kYXJkQnJvd3NlckVudigpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHdyaXRlOiBmdW5jdGlvbiB3cml0ZSgpIHt9LFxuICAgICAgICByZWFkOiBmdW5jdGlvbiByZWFkKCkgeyByZXR1cm4gbnVsbDsgfSxcbiAgICAgICAgcmVtb3ZlOiBmdW5jdGlvbiByZW1vdmUoKSB7fVxuICAgICAgfTtcbiAgICB9KSgpXG4pO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var angular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! angular */ \"angular\");\n/* harmony import */ var angular__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(angular__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _scripts_components_alert_alert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @scripts/components/alert/alert */ \"./src/webapp/scripts/components/alert/alert.js\");\n/* harmony import */ var _scripts_components_back_trigger_back_trigger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @scripts/components/back-trigger/back-trigger */ \"./src/webapp/scripts/components/back-trigger/back-trigger.js\");\n/* harmony import */ var _scripts_components_btn_btn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @scripts/components/btn/btn */ \"./src/webapp/scripts/components/btn/btn.js\");\n/* harmony import */ var _scripts_components_code_editor_code_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @scripts/components/code-editor/code-editor */ \"./src/webapp/scripts/components/code-editor/code-editor.js\");\n/* harmony import */ var _scripts_components_components_menu_components_menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @scripts/components/components-menu/components-menu */ \"./src/webapp/scripts/components/components-menu/components-menu.js\");\n/* harmony import */ var _scripts_components_components_menu_item_components_menu_item__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @scripts/components/components-menu-item/components-menu-item */ \"./src/webapp/scripts/components/components-menu-item/components-menu-item.js\");\n/* harmony import */ var _scripts_components_credits_credits__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @scripts/components/credits/credits */ \"./src/webapp/scripts/components/credits/credits.js\");\n/* harmony import */ var _scripts_components_engine_menu_engine_menu__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @scripts/components/engine-menu/engine-menu */ \"./src/webapp/scripts/components/engine-menu/engine-menu.js\");\n/* harmony import */ var _scripts_components_external_component_external_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @scripts/components/external-component/external-component */ \"./src/webapp/scripts/components/external-component/external-component.js\");\n/* harmony import */ var _scripts_components_external_component_attributes_list_external_component_attributes_list__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @scripts/components/external-component-attributes-list/external-component-attributes-list */ \"./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.js\");\n/* harmony import */ var _scripts_components_external_component_example_external_component_example__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @scripts/components/external-component-example/external-component-example */ \"./src/webapp/scripts/components/external-component-example/external-component-example.js\");\n/* harmony import */ var _scripts_components_external_component_example_edit_link_external_component_example_edit_link__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @scripts/components/external-component-example-edit-link/external-component-example-edit-link */ \"./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.js\");\n/* harmony import */ var _scripts_components_external_component_examples_list_external_component_examples_list__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @scripts/components/external-component-examples-list/external-component-examples-list */ \"./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.js\");\n/* harmony import */ var _scripts_components_external_component_code_external_component_code__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @scripts/components/external-component-code/external-component-code */ \"./src/webapp/scripts/components/external-component-code/external-component-code.js\");\n/* harmony import */ var _scripts_components_external_component_methods_list_external_component_methods_list__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @scripts/components/external-component-methods-list/external-component-methods-list */ \"./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.js\");\n/* harmony import */ var _scripts_components_external_component_props_list_external_component_props_list__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @scripts/components/external-component-props-list/external-component-props-list */ \"./src/webapp/scripts/components/external-component-props-list/external-component-props-list.js\");\n/* harmony import */ var _scripts_components_external_component_props_list_item_external_component_props_list_item__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @scripts/components/external-component-props-list-item/external-component-props-list-item */ \"./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.js\");\n/* harmony import */ var _scripts_components_external_component_preview_external_component_preview__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @scripts/components/external-component-preview/external-component-preview */ \"./src/webapp/scripts/components/external-component-preview/external-component-preview.js\");\n/* harmony import */ var _scripts_components_external_components_playground_external_components_playground__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @scripts/components/external-components-playground/external-components-playground */ \"./src/webapp/scripts/components/external-components-playground/external-components-playground.js\");\n/* harmony import */ var _scripts_components_heading_heading__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @scripts/components/heading/heading */ \"./src/webapp/scripts/components/heading/heading.js\");\n/* harmony import */ var _scripts_components_input_input__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @scripts/components/input/input */ \"./src/webapp/scripts/components/input/input.js\");\n/* harmony import */ var _scripts_components_link_link__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @scripts/components/link/link */ \"./src/webapp/scripts/components/link/link.js\");\n/* harmony import */ var _scripts_components_list_item_list_item__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @scripts/components/list-item/list-item */ \"./src/webapp/scripts/components/list-item/list-item.js\");\n/* harmony import */ var _scripts_components_list_list__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @scripts/components/list/list */ \"./src/webapp/scripts/components/list/list.js\");\n/* harmony import */ var _scripts_components_loader_loader__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @scripts/components/loader/loader */ \"./src/webapp/scripts/components/loader/loader.js\");\n/* harmony import */ var _scripts_components_logo_logo__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @scripts/components/logo/logo */ \"./src/webapp/scripts/components/logo/logo.js\");\n/* harmony import */ var _scripts_components_main_main__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @scripts/components/main/main */ \"./src/webapp/scripts/components/main/main.js\");\n/* harmony import */ var _scripts_components_menu_trigger_menu_trigger__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @scripts/components/menu-trigger/menu-trigger */ \"./src/webapp/scripts/components/menu-trigger/menu-trigger.js\");\n/* harmony import */ var _scripts_components_paragraph_paragraph__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @scripts/components/paragraph/paragraph */ \"./src/webapp/scripts/components/paragraph/paragraph.js\");\n/* harmony import */ var _scripts_components_pre_pre__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @scripts/components/pre/pre */ \"./src/webapp/scripts/components/pre/pre.js\");\n/* harmony import */ var _scripts_components_requester_requester__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @scripts/components/requester/requester */ \"./src/webapp/scripts/components/requester/requester.js\");\n/* harmony import */ var _scripts_components_required_caption_required_caption__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @scripts/components/required-caption/required-caption */ \"./src/webapp/scripts/components/required-caption/required-caption.js\");\n/* harmony import */ var _scripts_components_required_symbol_required_symbol__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @scripts/components/required-symbol/required-symbol */ \"./src/webapp/scripts/components/required-symbol/required-symbol.js\");\n/* harmony import */ var _scripts_components_row_row__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @scripts/components/row/row */ \"./src/webapp/scripts/components/row/row.js\");\n/* harmony import */ var _scripts_components_row_item_row_item__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @scripts/components/row-item/row-item */ \"./src/webapp/scripts/components/row-item/row-item.js\");\n/* harmony import */ var _scripts_components_sidebar_sidebar__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @scripts/components/sidebar/sidebar */ \"./src/webapp/scripts/components/sidebar/sidebar.js\");\n/* harmony import */ var _scripts_components_search_input_search_input__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @scripts/components/search-input/search-input */ \"./src/webapp/scripts/components/search-input/search-input.js\");\n/* harmony import */ var _scripts_components_tabs_tabs__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @scripts/components/tabs/tabs */ \"./src/webapp/scripts/components/tabs/tabs.js\");\n/* harmony import */ var _scripts_components_tab_tab__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @scripts/components/tab/tab */ \"./src/webapp/scripts/components/tab/tab.js\");\n/* harmony import */ var _scripts_components_tag_tag__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @scripts/components/tag/tag */ \"./src/webapp/scripts/components/tag/tag.js\");\n/* harmony import */ var _scripts_components_topbar_topbar__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @scripts/components/topbar/topbar */ \"./src/webapp/scripts/components/topbar/topbar.js\");\n/* harmony import */ var _scripts_components_trigger_trigger__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! @scripts/components/trigger/trigger */ \"./src/webapp/scripts/components/trigger/trigger.js\");\n/* harmony import */ var _scripts_components_viewport_viewport__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! @scripts/components/viewport/viewport */ \"./src/webapp/scripts/components/viewport/viewport.js\");\n/* harmony import */ var _scripts_components_welcome_welcome__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! @scripts/components/welcome/welcome */ \"./src/webapp/scripts/components/welcome/welcome.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (angular__WEBPACK_IMPORTED_MODULE_0___default().module('pitsby-components', [])\n .component('pAlert', _scripts_components_alert_alert__WEBPACK_IMPORTED_MODULE_1__[\"default\"])\n .component('pBackTrigger', _scripts_components_back_trigger_back_trigger__WEBPACK_IMPORTED_MODULE_2__[\"default\"])\n .component('pBtn', _scripts_components_btn_btn__WEBPACK_IMPORTED_MODULE_3__[\"default\"])\n .component('pCodeEditor', _scripts_components_code_editor_code_editor__WEBPACK_IMPORTED_MODULE_4__[\"default\"])\n .component('pComponentsMenu', _scripts_components_components_menu_components_menu__WEBPACK_IMPORTED_MODULE_5__[\"default\"])\n .component('pComponentsMenuItem', _scripts_components_components_menu_item_components_menu_item__WEBPACK_IMPORTED_MODULE_6__[\"default\"])\n .component('pCredits', _scripts_components_credits_credits__WEBPACK_IMPORTED_MODULE_7__[\"default\"])\n .component('pEngineMenu', _scripts_components_engine_menu_engine_menu__WEBPACK_IMPORTED_MODULE_8__[\"default\"])\n .component('pExternalComponent', _scripts_components_external_component_external_component__WEBPACK_IMPORTED_MODULE_9__[\"default\"])\n .component('pExternalComponentAttributesList', _scripts_components_external_component_attributes_list_external_component_attributes_list__WEBPACK_IMPORTED_MODULE_10__[\"default\"])\n .component('pExternalComponentExample', _scripts_components_external_component_example_external_component_example__WEBPACK_IMPORTED_MODULE_11__[\"default\"])\n .component('pExternalComponentExampleEditLink', _scripts_components_external_component_example_edit_link_external_component_example_edit_link__WEBPACK_IMPORTED_MODULE_12__[\"default\"])\n .component('pExternalComponentExamplesList', _scripts_components_external_component_examples_list_external_component_examples_list__WEBPACK_IMPORTED_MODULE_13__[\"default\"])\n .component('pExternalComponentCode', _scripts_components_external_component_code_external_component_code__WEBPACK_IMPORTED_MODULE_14__[\"default\"])\n .component('pExternalComponentMethodsList', _scripts_components_external_component_methods_list_external_component_methods_list__WEBPACK_IMPORTED_MODULE_15__[\"default\"])\n .component('pExternalComponentPropsList', _scripts_components_external_component_props_list_external_component_props_list__WEBPACK_IMPORTED_MODULE_16__[\"default\"])\n .component('pExternalComponentPropsListItem', _scripts_components_external_component_props_list_item_external_component_props_list_item__WEBPACK_IMPORTED_MODULE_17__[\"default\"])\n .component('pExternalComponentPreview', _scripts_components_external_component_preview_external_component_preview__WEBPACK_IMPORTED_MODULE_18__[\"default\"])\n .component('pExternalComponentsPlayground', _scripts_components_external_components_playground_external_components_playground__WEBPACK_IMPORTED_MODULE_19__[\"default\"])\n .component('pHeading', _scripts_components_heading_heading__WEBPACK_IMPORTED_MODULE_20__[\"default\"])\n .component('pInput', _scripts_components_input_input__WEBPACK_IMPORTED_MODULE_21__[\"default\"])\n .component('pLink', _scripts_components_link_link__WEBPACK_IMPORTED_MODULE_22__[\"default\"])\n .component('pList', _scripts_components_list_list__WEBPACK_IMPORTED_MODULE_24__[\"default\"])\n .component('pListItem', _scripts_components_list_item_list_item__WEBPACK_IMPORTED_MODULE_23__[\"default\"])\n .component('pLoader', _scripts_components_loader_loader__WEBPACK_IMPORTED_MODULE_25__[\"default\"])\n .component('pLogo', _scripts_components_logo_logo__WEBPACK_IMPORTED_MODULE_26__[\"default\"])\n .component('pMain', _scripts_components_main_main__WEBPACK_IMPORTED_MODULE_27__[\"default\"])\n .component('pMenuTrigger', _scripts_components_menu_trigger_menu_trigger__WEBPACK_IMPORTED_MODULE_28__[\"default\"])\n .component('pParagraph', _scripts_components_paragraph_paragraph__WEBPACK_IMPORTED_MODULE_29__[\"default\"])\n .component('pPre', _scripts_components_pre_pre__WEBPACK_IMPORTED_MODULE_30__[\"default\"])\n .component('pRequester', _scripts_components_requester_requester__WEBPACK_IMPORTED_MODULE_31__[\"default\"])\n .component('pRequiredCaption', _scripts_components_required_caption_required_caption__WEBPACK_IMPORTED_MODULE_32__[\"default\"])\n .component('pRequiredSymbol', _scripts_components_required_symbol_required_symbol__WEBPACK_IMPORTED_MODULE_33__[\"default\"])\n .component('pRow', _scripts_components_row_row__WEBPACK_IMPORTED_MODULE_34__[\"default\"])\n .component('pRowItem', _scripts_components_row_item_row_item__WEBPACK_IMPORTED_MODULE_35__[\"default\"])\n .component('pSidebar', _scripts_components_sidebar_sidebar__WEBPACK_IMPORTED_MODULE_36__[\"default\"])\n .component('pSearchInput', _scripts_components_search_input_search_input__WEBPACK_IMPORTED_MODULE_37__[\"default\"])\n .component('pTabs', _scripts_components_tabs_tabs__WEBPACK_IMPORTED_MODULE_38__[\"default\"])\n .component('pTab', _scripts_components_tab_tab__WEBPACK_IMPORTED_MODULE_39__[\"default\"])\n .component('pTag', _scripts_components_tag_tag__WEBPACK_IMPORTED_MODULE_40__[\"default\"])\n .component('pTopbar', _scripts_components_topbar_topbar__WEBPACK_IMPORTED_MODULE_41__[\"default\"])\n .component('pTrigger', _scripts_components_trigger_trigger__WEBPACK_IMPORTED_MODULE_42__[\"default\"])\n .component('pViewport', _scripts_components_viewport_viewport__WEBPACK_IMPORTED_MODULE_43__[\"default\"])\n .component('pWelcome', _scripts_components_welcome_welcome__WEBPACK_IMPORTED_MODULE_44__[\"default\"])\n .name);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9pbmRleC5qcy5qcyIsIm1hcHBpb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CByb3cpXG4gIC5jb21wb25lbnQoJ3BSb3dJdGVtJywgcm93SXRlbSlcbiAgLmNvbXBvbmVudCgncFNpZGViYXInLCBzaWRlYmFyKVxuICAuY29tcG9uZW50KCdwU2VhcmNoSW5wdXQnLCBzZWFyY2hJbnB1dClcbiAgLmNvbXBvbmVudCgncFRhYnMnLCB0YWJzKVxuICAuY29tcG9uZW50KCdwVGFiJywgdGFiKVxuICAuY29tcG9uZW50KCdwVGFnJywgdGFnKVxuICAuY29tcG9uZW50KCdwVG9wYmFyJywgdG9wYmFyKVxuICAuY29tcG9uZW50KCdwVHJpZ2dlcicsIHRyaWdnZXIpXG4gIC5jb21wb25lbnQoJ3BWaWV3cG9ydCcsIHZpZXdwb3J0KVxuICAuY29tcG9uZW50KCdwV2VsY29tZScsIHdlbGNvbWUpXG4gIC5uYW1lO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/index.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!*************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \*************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/input/input.js": +/*!******************************************************!*\ + !*** ./src/webapp/scripts/components/input/input.js ***! + \******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\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gLy8gUkZDIDM5ODYgZGVmaW5lcyBzY2hlbWUgbmFtZSBhcyBhIHNlcXVlbmNlIG9mIGNoYXJhY3RlcnMgYmVnaW5uaW5nIHdpdGggYSBsZXR0ZXIgYW5kIGZvbGxvd2VkXG4gIC8vIGJ5IGFueSBjb21iaW5hdGlvbiBvZiBsZXR0ZXJzLCBkaWdpdHMsIHBsdXMsIHBlcmlvZCwgb3IgaHlwaGVuLlxuICByZXR1cm4gL14oW2Etel1bYS16XFxkXFwrXFwtXFwuXSo6KT9cXC9cXC8vaS50ZXN0KHVybCk7XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_input_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/input.styl */ \"./src/webapp/styles/input.styl\");\n/* harmony import */ var _input_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./input.html */ \"./src/webapp/scripts/components/input/input.html\");\n\n\n\nfunction controller($timeout){\n const $ctrl = this;\n\n $ctrl.onInputChange = () => {\n handleListener($ctrl.onChange);\n };\n\n $ctrl.onInputBlur = () => {\n handleListener($ctrl.onBlur);\n };\n\n function handleListener(listener){\n if(listener)\n $timeout(listener);\n }\n}\n\ncontroller.$inject = ['$timeout'];\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n controller,\n bindings: {\n value: '=',\n placeholder: '@',\n onChange: '=',\n onBlur: '=',\n },\n template: _input_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9z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ge1xuICAgIHZhbHVlOiAnPScsXG4gICAgcGxhY2Vob2xkZXI6ICdAJyxcbiAgICBvbkNoYW5nZTogJz0nLFxuICAgIG9uQmx1cjogJz0nLFxuICB9LFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/input/input.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js": -/*!************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js ***! - \************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/link/link.js": +/*!****************************************************!*\ + !*** ./src/webapp/scripts/components/link/link.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzQXhpb3NFcnJvci5qcz8wM2ZlIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQTtBQUNBLFdBQVcsRUFBRTtBQUNiLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzQXhpb3NFcnJvci5qcy5qcyIsInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgdGhlIHBheWxvYWQgaXMgYW4gZXJyb3IgdGhyb3duIGJ5IEF4aW9zXG4gKlxuICogQHBhcmFtIHsqfSBwYXlsb2FkIFRoZSB2YWx1ZSB0byB0ZXN0XG4gKiBAcmV0dXJucyB7Ym9vbGVhbn0gVHJ1ZSBpZiB0aGUgcGF5bG9hZCBpcyBhbiBlcnJvciB0aHJvd24gYnkgQXhpb3MsIG90aGVyd2lzZSBmYWxzZVxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQXhpb3NFcnJvcihwYXlsb2FkKSB7XG4gIHJldHVybiAodHlwZW9mIHBheWxvYWQgPT09ICdvYmplY3QnKSAmJiAocGF5bG9hZC5pc0F4aW9zRXJyb3IgPT09IHRydWUpO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_link_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/link.styl */ \"./src/webapp/styles/link.styl\");\n/* harmony import */ var _link_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./link.html */ \"./src/webapp/scripts/components/link/link.html\");\n\n\n\nfunction controller(){\n const $ctrl = this;\n\n $ctrl.$onInit = () => {\n setTarget($ctrl.target);\n };\n\n function setTarget(target = '_self'){\n $ctrl.target = target;\n }\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n bindings: {\n href: '@',\n target: '@'\n },\n transclude: true,\n controller,\n template: _link_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saW5rL2xpbmsuanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQTJCO0FBQ1E7O0FBRW5DO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBLGlFQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIO0FBQ0E7QUFDQSxVQUFVO0FBQ1YsQ0FBQyxFQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2xpbmsvbGluay5qcz80MDkwIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0eWxlcy9saW5rLnN0eWwnO1xuaW1wb3J0IHRlbXBsYXRlIGZyb20gJy4vbGluay5odG1sJztcblxuZnVuY3Rpb24gY29udHJvbGxlcigpe1xuICBjb25zdCAkY3RybCA9IHRoaXM7XG5cbiAgJGN0cmwuJG9uSW5pdCA9ICgpID0+IHtcbiAgICBzZXRUYXJnZXQoJGN0cmwudGFyZ2V0KTtcbiAgfTtcblxuICBmdW5jdGlvbiBzZXRUYXJnZXQodGFyZ2V0ID0gJ19zZWxmJyl7XG4gICAgJGN0cmwudGFyZ2V0ID0gdGFyZ2V0O1xuICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgYmluZGluZ3M6IHtcbiAgICBocmVmOiAnQCcsXG4gICAgdGFyZ2V0OiAnQCdcbiAgfSxcbiAgdHJhbnNjbHVkZTogdHJ1ZSxcbiAgY29udHJvbGxlcixcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/link/link.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!***************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \***************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/list-item/list-item.js": +/*!**************************************************************!*\ + !*** ./src/webapp/scripts/components/list-item/list-item.js ***! + \**************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })()\n);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzVVJMU2FtZU9yaWdpbi5qcz8yYTYxIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyw0RUFBWTs7QUFFaEM7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsY0FBYyxPQUFPO0FBQ3JCLGdCQUFnQjtBQUNoQjtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLGNBQWMsT0FBTztBQUNyQix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aW9uIG5vblN0YW5kYXJkQnJvd3NlckVudigpIHtcbiAgICAgIHJldHVybiBmdW5jdGlvbiBpc1VSTFNhbWVPcmlnaW4oKSB7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfTtcbiAgICB9KSgpXG4pO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_list_item_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/list-item.styl */ \"./src/webapp/styles/list-item.styl\");\n/* harmony import */ var _list_item_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./list-item.html */ \"./src/webapp/scripts/components/list-item/list-item.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n transclude: true,\n template: _list_item_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saXN0LWl0ZW0vbGlzdC1pdGVtLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUFnQztBQUNROztBQUV4QyxpRUFBZTtBQUNmO0FBQ0EsVUFBVTtBQUNWLENBQUMsRUFBQyIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saXN0LWl0ZW0vbGlzdC1pdGVtLmpzP2ZiZDMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICdAc3R5bGVzL2xpc3QtaXRlbS5zdHlsJztcbmltcG9ydCB0ZW1wbGF0ZSBmcm9tICcuL2xpc3QtaXRlbS5odG1sJztcblxuZXhwb3J0IGRlZmF1bHQge1xuICB0cmFuc2NsdWRlOiB0cnVlLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/list-item/list-item.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js": -/*!*******************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js ***! - \*******************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/list/list.js": +/*!****************************************************!*\ + !*** ./src/webapp/scripts/components/list/list.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL25vcm1hbGl6ZUhlYWRlck5hbWUuanM/NTE5NiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsMEVBQVU7O0FBRTlCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSCIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL25vcm1hbGl6ZUhlYWRlck5hbWUuanMuanMiLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciB1dGlscyA9IHJlcXVpcmUoJy4uL3V0aWxzJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gbm9ybWFsaXplSGVhZGVyTmFtZShoZWFkZXJzLCBub3JtYWxpemVkTmFtZSkge1xuICB1dGlscy5mb3JFYWNoKGhlYWRlcnMsIGZ1bmN0aW9uIHByb2Nlc3NIZWFkZXIodmFsdWUsIG5hbWUpIHtcbiAgICBpZiAobmFtZSAhPT0gbm9ybWFsaXplZE5hbWUgJiYgbmFtZS50b1VwcGVyQ2FzZSgpID09PSBub3JtYWxpemVkTmFtZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICBoZWFkZXJzW25vcm1hbGl6ZWROYW1lXSA9IHZhbHVlO1xuICAgICAgZGVsZXRlIGhlYWRlcnNbbmFtZV07XG4gICAgfVxuICB9KTtcbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _list_html__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./list.html */ \"./src/webapp/scripts/components/list/list.html\");\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n transclude: true,\n bindings: {\n alertErrorMessage: '@',\n fetch: '=',\n fetchSuccess: '=',\n shouldHideContentOnRequest: '='\n },\n template: _list_html__WEBPACK_IMPORTED_MODULE_0__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saXN0L2xpc3QuanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBbUM7O0FBRW5DLGlFQUFlO0FBQ2Y7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNILFVBQVU7QUFDVixDQUFDLEVBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvbGlzdC9saXN0LmpzPzhlYTMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHRlbXBsYXRlIGZyb20gJy4vbGlzdC5odG1sJztcblxuZXhwb3J0IGRlZmF1bHQge1xuICB0cmFuc2NsdWRlOiB0cnVlLFxuICBiaW5kaW5nczoge1xuICAgIGFsZXJ0RXJyb3JNZXNzYWdlOiAnQCcsXG4gICAgZmV0Y2g6ICc9JyxcbiAgICBmZXRjaFN1Y2Nlc3M6ICc9JyxcbiAgICBzaG91bGRIaWRlQ29udGVudE9uUmVxdWVzdDogJz0nXG4gIH0sXG4gIHRlbXBsYXRlXG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/list/list.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js": -/*!************************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js ***! - \************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/loader/loader.js": +/*!********************************************************!*\ + !*** ./src/webapp/scripts/components/loader/loader.js ***! + \********************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1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2tleV0gJiYgaWdub3JlRHVwbGljYXRlT2YuaW5kZXhPZihrZXkpID49IDApIHtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgaWYgKGtleSA9PT0gJ3NldC1jb29raWUnKSB7XG4gICAgICAgIHBhcnNlZFtrZXldID0gKHBhcnNlZFtrZXldID8gcGFyc2VkW2tleV0gOiBbXSkuY29uY2F0KFt2YWxdKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBhcnNlZFtrZXldID0gcGFyc2VkW2tleV0gPyBwYXJzZWRba2V5XSArICcsICcgKyB2YWwgOiB2YWw7XG4gICAgICB9XG4gICAgfVxuICB9KTtcblxuICByZXR1cm4gcGFyc2VkO1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_loader_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/loader.styl */ \"./src/webapp/styles/loader.styl\");\n/* harmony import */ var _loader_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./loader.html */ \"./src/webapp/scripts/components/loader/loader.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n template: _loader_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9sb2FkZXIvbG9hZGVyLmpzLmpzIiwibWFwcGluZ3MiOiI7Ozs7OztBQUE2QjtBQUNROztBQUVyQyxpRUFBZTtBQUNmLFVBQVU7QUFDVixDQUFDLEVBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvbG9hZGVyL2xvYWRlci5qcz80MGExIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0eWxlcy9sb2FkZXIuc3R5bCc7XG5pbXBvcnQgdGVtcGxhdGUgZnJvbSAnLi9sb2FkZXIuaHRtbCc7XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/loader/loader.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js": -/*!******************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/spread.js ***! - \******************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/logo/logo.js": +/*!****************************************************!*\ + !*** ./src/webapp/scripts/components/logo/logo.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbW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ogQHBhcmFtIHtGdW5jdGlvbn0gY2FsbGJhY2tcbiAqIEByZXR1cm5zIHtGdW5jdGlvbn1cbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBzcHJlYWQoY2FsbGJhY2spIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHdyYXAoYXJyKSB7XG4gICAgcmV0dXJuIGNhbGxiYWNrLmFwcGx5KG51bGwsIGFycik7XG4gIH07XG59O1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_logo_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/logo.styl */ \"./src/webapp/styles/logo.styl\");\n/* harmony import */ var _logo_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./logo.html */ \"./src/webapp/scripts/components/logo/logo.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n template: _logo_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9sb2dvL2xvZ28uanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQTJCO0FBQ1E7O0FBRW5DLGlFQUFlO0FBQ2YsVUFBVTtBQUNWLENBQUMsRUFBQyIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9sb2dvL2xvZ28uanM/MmI2ZSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ0BzdHlsZXMvbG9nby5zdHlsJztcbmltcG9ydCB0ZW1wbGF0ZSBmcm9tICcuL2xvZ28uaHRtbCc7XG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgdGVtcGxhdGVcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/logo/logo.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js": -/*!*********************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/helpers/validator.js ***! - \*********************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/main/main.js": +/*!****************************************************!*\ + !*** ./src/webapp/scripts/components/main/main.js ***! + \****************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar pkg = __webpack_require__(/*! ./../../package.json */ \"../../../../axios@0.21.4/node_modules/axios/package.json\");\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL3ZhbGlkYXRvci5qcz9jMWExIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFVBQVUsbUJBQU8sQ0FBQyxzRkFBc0I7O0FBRXh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5lZCB8fCB2YWxpZGF0b3IodmFsdWUsIG9wdCwgb3B0aW9ucyk7XG4gICAgICBpZiAocmVzdWx0ICE9PSB0cnVlKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ29wdGlvbiAnICsgb3B0ICsgJyBtdXN0IGJlICcgKyByZXN1bHQpO1xuICAgICAgfVxuICAgICAgY29udGludWU7XG4gICAgfVxuICAgIGlmIChhbGxvd1Vua25vd24gIT09IHRydWUpIHtcbiAgICAgIHRocm93IEVycm9yKCdVbmtub3duIG9wdGlvbiAnICsgb3B0KTtcbiAgICB9XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIGlzT2xkZXJWZXJzaW9uOiBpc09sZGVyVmVyc2lvbixcbiAgYXNzZXJ0T3B0aW9uczogYXNzZXJ0T3B0aW9ucyxcbiAgdmFsaWRhdG9yczogdmFsaWRhdG9yc1xufTtcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js\n"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _styles_main_styl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @styles/main.styl */ \"./src/webapp/styles/main.styl\");\n/* harmony import */ var _main_html__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./main.html */ \"./src/webapp/scripts/components/main/main.html\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n transclude: true,\n template: _main_html__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9tYWluL21haW4uanMuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQTJCO0FBQ1E7O0FBRW5DLGlFQUFlO0FBQ2Y7QUFDQSxVQUFVO0FBQ1YsQ0FBQyxFQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL21haW4vbWFpbi5qcz9jN2YyIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAnQHN0eWxlcy9tYWluLnN0eWwnO1xuaW1wb3J0IHRlbXBsYXRlIGZyb20gJy4vbWFpbi5odG1sJztcblxuZXhwb3J0IGRlZmF1bHQge1xuICB0cmFuc2NsdWRlOiB0cnVlLFxuICB0ZW1wbGF0ZVxufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/main/main.js\n"); /***/ }), -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/utils.js": -/*!*********************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/lib/utils.js ***! - \*********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { +/***/ "./src/webapp/scripts/components/menu-trigger/menu-trigger.js": +/*!********************************************************************!*\ + !*** ./src/webapp/scripts/components/menu-trigger/menu-trigger.js ***! + \********************************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\");\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi91dGlscy5qcz83NjJhIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFhOztBQUViLFdBQVcsbUJBQU8sQ0FBQyx1RkFBZ0I7O0FBRW5DOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsT0FBTztBQUNsQixhQUFhLFFBQVE7QUFDckI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLGFBQWEsUUF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F0ZSxcbiAgaXNGaWxlOiBpc0ZpbGUsXG4gIGlzQmxvYjogaXNCbG9iLFxuICBpc0Z1bmN0aW9uOiBpc0Z1bmN0aW9uLFxuICBpc1N0cmVhbTogaXNTdHJlYW0sXG4gIGlzVVJMU2VhcmNoUGFyYW1zOiBpc1VSTFNlYXJjaFBhcmFtcyxcbiAgaXNTdGFuZGFyZEJyb3dzZXJFbnY6IGlzU3RhbmRhcmRCcm93c2VyRW52LFxuICBmb3JFYWNoOiBmb3JFYWNoLFxuICBtZXJnZTogbWVyZ2UsXG4gIGV4dGVuZDogZXh0ZW5kLFxuICB0cmltOiB0cmltLFxuICBzdHJpcEJPTTogc3RyaXBCT01cbn07XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/utils.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/package.json": -/*!*********************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/axios@0.21.4/node_modules/axios/package.json ***! - \*********************************************************************************************************/ -/*! exports provided: name, version, description, main, scripts, repository, keywords, author, license, bugs, homepage, devDependencies, browser, jsdelivr, unpkg, typings, dependencies, bundlesize, default */ -/***/ (function(module) { - -eval("module.exports = JSON.parse(\"{\\\"name\\\":\\\"axios\\\",\\\"version\\\":\\\"0.21.4\\\",\\\"description\\\":\\\"Promise based HTTP client for the browser and node.js\\\",\\\"main\\\":\\\"index.js\\\",\\\"scripts\\\":{\\\"test\\\":\\\"grunt test\\\",\\\"start\\\":\\\"node ./sandbox/server.js\\\",\\\"build\\\":\\\"NODE_ENV=production grunt build\\\",\\\"preversion\\\":\\\"npm test\\\",\\\"version\\\":\\\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\\\",\\\"postversion\\\":\\\"git push && git push --tags\\\",\\\"examples\\\":\\\"node ./examples/server.js\\\",\\\"coveralls\\\":\\\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\\\",\\\"fix\\\":\\\"eslint --fix lib/**/*.js\\\"},\\\"repository\\\":{\\\"type\\\":\\\"git\\\",\\\"url\\\":\\\"https://github.com/axios/axios.git\\\"},\\\"keywords\\\":[\\\"xhr\\\",\\\"http\\\",\\\"ajax\\\",\\\"promise\\\",\\\"node\\\"],\\\"author\\\":\\\"Matt Zabriskie\\\",\\\"license\\\":\\\"MIT\\\",\\\"bugs\\\":{\\\"url\\\":\\\"https://github.com/axios/axios/issues\\\"},\\\"homepage\\\":\\\"https://axios-http.com\\\",\\\"devDependencies\\\":{\\\"coveralls\\\":\\\"^3.0.0\\\",\\\"es6-promise\\\":\\\"^4.2.4\\\",\\\"grunt\\\":\\\"^1.3.0\\\",\\\"grunt-banner\\\":\\\"^0.6.0\\\",\\\"grunt-cli\\\":\\\"^1.2.0\\\",\\\"grunt-contrib-clean\\\":\\\"^1.1.0\\\",\\\"grunt-contrib-watch\\\":\\\"^1.0.0\\\",\\\"grunt-eslint\\\":\\\"^23.0.0\\\",\\\"grunt-karma\\\":\\\"^4.0.0\\\",\\\"grunt-mocha-test\\\":\\\"^0.13.3\\\",\\\"grunt-ts\\\":\\\"^6.0.0-beta.19\\\",\\\"grunt-webpack\\\":\\\"^4.0.2\\\",\\\"istanbul-instrumenter-loader\\\":\\\"^1.0.0\\\",\\\"jasmine-core\\\":\\\"^2.4.1\\\",\\\"karma\\\":\\\"^6.3.2\\\",\\\"karma-chrome-launcher\\\":\\\"^3.1.0\\\",\\\"karma-firefox-launcher\\\":\\\"^2.1.0\\\",\\\"karma-jasmine\\\":\\\"^1.1.1\\\",\\\"karma-jasmine-ajax\\\":\\\"^0.1.13\\\",\\\"karma-safari-launcher\\\":\\\"^1.0.0\\\",\\\"karma-sauce-launcher\\\":\\\"^4.3.6\\\",\\\"karma-sinon\\\":\\\"^1.0.5\\\",\\\"karma-sourcemap-loader\\\":\\\"^0.3.8\\\",\\\"karma-webpack\\\":\\\"^4.0.2\\\",\\\"load-grunt-tasks\\\":\\\"^3.5.2\\\",\\\"minimist\\\":\\\"^1.2.0\\\",\\\"mocha\\\":\\\"^8.2.1\\\",\\\"sinon\\\":\\\"^4.5.0\\\",\\\"terser-webpack-plugin\\\":\\\"^4.2.3\\\",\\\"typescript\\\":\\\"^4.0.5\\\",\\\"url-search-params\\\":\\\"^0.10.0\\\",\\\"webpack\\\":\\\"^4.44.2\\\",\\\"webpack-dev-server\\\":\\\"^3.11.0\\\"},\\\"browser\\\":{\\\"./lib/adapters/http.js\\\":\\\"./lib/adapters/xhr.js\\\"},\\\"jsdelivr\\\":\\\"dist/axios.min.js\\\",\\\"unpkg\\\":\\\"dist/axios.min.js\\\",\\\"typings\\\":\\\"./index.d.ts\\\",\\\"dependencies\\\":{\\\"follow-redirects\\\":\\\"^1.14.0\\\"},\\\"bundlesize\\\":[{\\\"path\\\":\\\"./dist/axios.min.js\\\",\\\"threshold\\\":\\\"5kB\\\"}]}\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiIuLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL3BhY2thZ2UuanNvbi5qcyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/package.json\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/index.js": -/*!*****************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/index.js ***! - \*****************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("/* ***** BEGIN LICENSE BLOCK *****\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * ***** END LICENSE BLOCK ***** */\n\n/**\n * Define a module along with a payload\n * @param module a name for the payload\n * @param payload a function to call with (acequire, exports, module) params\n */\n\n(function() {\n\nvar ACE_NAMESPACE = \"ace\";\n\nvar global = (function() { return this; })();\nif (!global && typeof window != \"undefined\") global = window; // strict mode\n\n\nif (!ACE_NAMESPACE && typeof acequirejs !== \"undefined\")\n return;\n\n\nvar define = function(module, deps, payload) {\n if (typeof module !== \"string\") {\n if (define.original)\n define.original.apply(this, arguments);\n else {\n console.error(\"dropping module because define wasn\\'t a string.\");\n console.trace();\n }\n return;\n }\n if (arguments.length == 2)\n payload = deps;\n if (!define.modules[module]) {\n define.payloads[module] = payload;\n define.modules[module] = null;\n }\n};\n\ndefine.modules = {};\ndefine.payloads = {};\n\n/**\n * Get at functionality define()ed using the function above\n */\nvar _acequire = function(parentId, module, callback) {\n if (typeof module === \"string\") {\n var payload = lookup(parentId, module);\n if (payload != undefined) {\n callback && callback();\n return payload;\n }\n } else if (Object.prototype.toString.call(module) === \"[object Array]\") {\n var params = [];\n for (var i = 0, l = module.length; i < l; ++i) {\n var dep = lookup(parentId, module[i]);\n if (dep == undefined && acequire.original)\n return;\n params.push(dep);\n }\n return callback && callback.apply(null, params) || true;\n }\n};\n\nvar acequire = function(module, callback) {\n var packagedModule = _acequire(\"\", module, callback);\n if (packagedModule == undefined && acequire.original)\n return acequire.original.apply(this, arguments);\n return packagedModule;\n};\n\nvar normalizeModule = function(parentId, moduleName) {\n // normalize plugin acequires\n if (moduleName.indexOf(\"!\") !== -1) {\n var chunks = moduleName.split(\"!\");\n return normalizeModule(parentId, chunks[0]) + \"!\" + normalizeModule(parentId, chunks[1]);\n }\n // normalize relative acequires\n if (moduleName.charAt(0) == \".\") {\n var base = parentId.split(\"/\").slice(0, -1).join(\"/\");\n moduleName = base + \"/\" + moduleName;\n\n while(moduleName.indexOf(\".\") !== -1 && previous != moduleName) {\n var previous = moduleName;\n moduleName = moduleName.replace(/\\/\\.\\//, \"/\").replace(/[^\\/]+\\/\\.\\.\\//, \"\");\n }\n }\n return moduleName;\n};\n\n/**\n * Internal function to lookup moduleNames and resolve them by calling the\n * definition function if needed.\n */\nvar lookup = function(parentId, moduleName) {\n moduleName = normalizeModule(parentId, moduleName);\n\n var module = define.modules[moduleName];\n if (!module) {\n module = define.payloads[moduleName];\n if (typeof module === 'function') {\n var exports = {};\n var mod = {\n id: moduleName,\n uri: '',\n exports: exports,\n packaged: true\n };\n\n var req = function(module, callback) {\n return _acequire(moduleName, module, callback);\n };\n\n var returnValue = module(req, exports, mod);\n exports = returnValue || mod.exports;\n define.modules[moduleName] = exports;\n delete define.payloads[moduleName];\n }\n module = define.modules[moduleName] = exports || module;\n }\n return module;\n};\n\nfunction exportAce(ns) {\n var root = global;\n if (ns) {\n if (!global[ns])\n global[ns] = {};\n root = global[ns];\n }\n\n if (!root.define || !root.define.packaged) {\n define.original = root.define;\n root.define = define;\n root.define.packaged = true;\n }\n\n if (!root.acequire || !root.acequire.packaged) {\n acequire.original = root.acequire;\n root.acequire = acequire;\n root.acequire.packaged = true;\n }\n}\n\nexportAce(ACE_NAMESPACE);\n\n})();\n\nace.define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\n var real = {\n exec: RegExp.prototype.exec,\n test: RegExp.prototype.test,\n match: String.prototype.match,\n replace: String.prototype.replace,\n split: String.prototype.split\n },\n compliantExecNpcg = real.exec.call(/()??/, \"\")[1] === undefined, // check `exec` handling of nonparticipating capturing groups\n compliantLastIndexIncrement = function () {\n var x = /^/g;\n real.test.call(x, \"\");\n return !x.lastIndex;\n }();\n\n if (compliantLastIndexIncrement && compliantExecNpcg)\n return;\n RegExp.prototype.exec = function (str) {\n var match = real.exec.apply(this, arguments),\n name, r2;\n if ( typeof(str) == 'string' && match) {\n if (!compliantExecNpcg && match.length > 1 && indexOf(match, \"\") > -1) {\n r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), \"g\", \"\"));\n real.replace.call(str.slice(match.index), r2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined)\n match[i] = undefined;\n }\n });\n }\n if (this._xregexp && this._xregexp.captureNames) {\n for (var i = 1; i < match.length; i++) {\n name = this._xregexp.captureNames[i - 1];\n if (name)\n match[name] = match[i];\n }\n }\n if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n }\n return match;\n };\n if (!compliantLastIndexIncrement) {\n RegExp.prototype.test = function (str) {\n var match = real.exec.call(this, str);\n if (match && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n return !!match;\n };\n }\n\n function getNativeFlags (regex) {\n return (regex.global ? \"g\" : \"\") +\n (regex.ignoreCase ? \"i\" : \"\") +\n (regex.multiline ? \"m\" : \"\") +\n (regex.extended ? \"x\" : \"\") + // Proposed for ES4; included in AS3\n (regex.sticky ? \"y\" : \"\");\n }\n\n function indexOf (array, item, from) {\n if (Array.prototype.indexOf) // Use the native array method if available\n return array.indexOf(item, from);\n for (var i = from || 0; i < array.length; i++) {\n if (array[i] === item)\n return i;\n }\n return -1;\n }\n\n});\n\nace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\nfunction Empty() {}\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function bind(that) { // .length is 1\n var target = this;\n if (typeof target != \"function\") {\n throw new TypeError(\"Function.prototype.bind called on incompatible \" + target);\n }\n var args = slice.call(arguments, 1); // for normal call\n var bound = function () {\n\n if (this instanceof bound) {\n\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n\n }\n\n };\n if(target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n return bound;\n };\n}\nvar call = Function.prototype.call;\nvar prototypeOfArray = Array.prototype;\nvar prototypeOfObject = Object.prototype;\nvar slice = prototypeOfArray.slice;\nvar _toString = call.bind(prototypeOfObject.toString);\nvar owns = call.bind(prototypeOfObject.hasOwnProperty);\nvar defineGetter;\nvar defineSetter;\nvar lookupGetter;\nvar lookupSetter;\nvar supportsAccessors;\nif ((supportsAccessors = owns(prototypeOfObject, \"__defineGetter__\"))) {\n defineGetter = call.bind(prototypeOfObject.__defineGetter__);\n defineSetter = call.bind(prototypeOfObject.__defineSetter__);\n lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);\n lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);\n}\nif ([1,2].splice(0).length != 2) {\n if(function() { // test IE < 9 to splice bug - see issue #138\n function makeArray(l) {\n var a = new Array(l+2);\n a[0] = a[1] = 0;\n return a;\n }\n var array = [], lengthBefore;\n \n array.splice.apply(array, makeArray(20));\n array.splice.apply(array, makeArray(26));\n\n lengthBefore = array.length; //46\n array.splice(5, 0, \"XXX\"); // add one element\n\n lengthBefore + 1 == array.length\n\n if (lengthBefore + 1 == array.length) {\n return true;// has right splice implementation without bugs\n }\n }()) {//IE 6/7\n var array_splice = Array.prototype.splice;\n Array.prototype.splice = function(start, deleteCount) {\n if (!arguments.length) {\n return [];\n } else {\n return array_splice.apply(this, [\n start === void 0 ? 0 : start,\n deleteCount === void 0 ? (this.length - start) : deleteCount\n ].concat(slice.call(arguments, 2)))\n }\n };\n } else {//IE8\n Array.prototype.splice = function(pos, removeCount){\n var length = this.length;\n if (pos > 0) {\n if (pos > length)\n pos = length;\n } else if (pos == void 0) {\n pos = 0;\n } else if (pos < 0) {\n pos = Math.max(length + pos, 0);\n }\n\n if (!(pos+removeCount < length))\n removeCount = length - pos;\n\n var removed = this.slice(pos, pos+removeCount);\n var insert = slice.call(arguments, 2);\n var add = insert.length; \n if (pos === length) {\n if (add) {\n this.push.apply(this, insert);\n }\n } else {\n var remove = Math.min(removeCount, length - pos);\n var tailOldPos = pos + remove;\n var tailNewPos = tailOldPos + add - remove;\n var tailCount = length - tailOldPos;\n var lengthAfterRemove = length - remove;\n\n if (tailNewPos < tailOldPos) { // case A\n for (var i = 0; i < tailCount; ++i) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } else if (tailNewPos > tailOldPos) { // case B\n for (i = tailCount; i--; ) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } // else, add == remove (nothing to do)\n\n if (add && pos === lengthAfterRemove) {\n this.length = lengthAfterRemove; // truncate array\n this.push.apply(this, insert);\n } else {\n this.length = lengthAfterRemove + add; // reserves space\n for (i = 0; i < add; ++i) {\n this[pos+i] = insert[i];\n }\n }\n }\n return removed;\n };\n }\n}\nif (!Array.isArray) {\n Array.isArray = function isArray(obj) {\n return _toString(obj) == \"[object Array]\";\n };\n}\nvar boxedString = Object(\"a\"),\n splitString = boxedString[0] != \"a\" || !(0 in boxedString);\n\nif (!Array.prototype.forEach) {\n Array.prototype.forEach = function forEach(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n fun.call(thisp, self[i], i, object);\n }\n }\n };\n}\nif (!Array.prototype.map) {\n Array.prototype.map = function map(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = Array(length),\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self)\n result[i] = fun.call(thisp, self[i], i, object);\n }\n return result;\n };\n}\nif (!Array.prototype.filter) {\n Array.prototype.filter = function filter(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = [],\n value,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) {\n value = self[i];\n if (fun.call(thisp, value, i, object)) {\n result.push(value);\n }\n }\n }\n return result;\n };\n}\nif (!Array.prototype.every) {\n Array.prototype.every = function every(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && !fun.call(thisp, self[i], i, object)) {\n return false;\n }\n }\n return true;\n };\n}\nif (!Array.prototype.some) {\n Array.prototype.some = function some(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && fun.call(thisp, self[i], i, object)) {\n return true;\n }\n }\n return false;\n };\n}\nif (!Array.prototype.reduce) {\n Array.prototype.reduce = function reduce(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n\n var i = 0;\n var result;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i++];\n break;\n }\n if (++i >= length) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n } while (true);\n }\n\n for (; i < length; i++) {\n if (i in self) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n }\n\n return result;\n };\n}\nif (!Array.prototype.reduceRight) {\n Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n\n var result, i = length - 1;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i--];\n break;\n }\n if (--i < 0) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n } while (true);\n }\n\n do {\n if (i in this) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n } while (i--);\n\n return result;\n };\n}\nif (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {\n Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n }\n i = i >= 0 ? i : Math.max(0, length + i);\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {\n Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n var i = length - 1;\n if (arguments.length > 1) {\n i = Math.min(i, toInteger(arguments[1]));\n }\n i = i >= 0 ? i : length - Math.abs(i);\n for (; i >= 0; i--) {\n if (i in self && sought === self[i]) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Object.getPrototypeOf) {\n Object.getPrototypeOf = function getPrototypeOf(object) {\n return object.__proto__ || (\n object.constructor ?\n object.constructor.prototype :\n prototypeOfObject\n );\n };\n}\nif (!Object.getOwnPropertyDescriptor) {\n var ERR_NON_OBJECT = \"Object.getOwnPropertyDescriptor called on a \" +\n \"non-object: \";\n Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT + object);\n if (!owns(object, property))\n return;\n\n var descriptor, getter, setter;\n descriptor = { enumerable: true, configurable: true };\n if (supportsAccessors) {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n\n var getter = lookupGetter(object, property);\n var setter = lookupSetter(object, property);\n object.__proto__ = prototype;\n\n if (getter || setter) {\n if (getter) descriptor.get = getter;\n if (setter) descriptor.set = setter;\n return descriptor;\n }\n }\n descriptor.value = object[property];\n return descriptor;\n };\n}\nif (!Object.getOwnPropertyNames) {\n Object.getOwnPropertyNames = function getOwnPropertyNames(object) {\n return Object.keys(object);\n };\n}\nif (!Object.create) {\n var createEmpty;\n if (Object.prototype.__proto__ === null) {\n createEmpty = function () {\n return { \"__proto__\": null };\n };\n } else {\n createEmpty = function () {\n var empty = {};\n for (var i in empty)\n empty[i] = null;\n empty.constructor =\n empty.hasOwnProperty =\n empty.propertyIsEnumerable =\n empty.isPrototypeOf =\n empty.toLocaleString =\n empty.toString =\n empty.valueOf =\n empty.__proto__ = null;\n return empty;\n }\n }\n\n Object.create = function create(prototype, properties) {\n var object;\n if (prototype === null) {\n object = createEmpty();\n } else {\n if (typeof prototype != \"object\")\n throw new TypeError(\"typeof prototype[\"+(typeof prototype)+\"] != 'object'\");\n var Type = function () {};\n Type.prototype = prototype;\n object = new Type();\n object.__proto__ = prototype;\n }\n if (properties !== void 0)\n Object.defineProperties(object, properties);\n return object;\n };\n}\n\nfunction doesDefinePropertyWork(object) {\n try {\n Object.defineProperty(object, \"sentinel\", {});\n return \"sentinel\" in object;\n } catch (exception) {\n }\n}\nif (Object.defineProperty) {\n var definePropertyWorksOnObject = doesDefinePropertyWork({});\n var definePropertyWorksOnDom = typeof document == \"undefined\" ||\n doesDefinePropertyWork(document.createElement(\"div\"));\n if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {\n var definePropertyFallback = Object.defineProperty;\n }\n}\n\nif (!Object.defineProperty || definePropertyFallback) {\n var ERR_NON_OBJECT_DESCRIPTOR = \"Property description must be an object: \";\n var ERR_NON_OBJECT_TARGET = \"Object.defineProperty called on non-object: \"\n var ERR_ACCESSORS_NOT_SUPPORTED = \"getters & setters can not be defined \" +\n \"on this javascript engine\";\n\n Object.defineProperty = function defineProperty(object, property, descriptor) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT_TARGET + object);\n if ((typeof descriptor != \"object\" && typeof descriptor != \"function\") || descriptor === null)\n throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);\n if (definePropertyFallback) {\n try {\n return definePropertyFallback.call(Object, object, property, descriptor);\n } catch (exception) {\n }\n }\n if (owns(descriptor, \"value\")) {\n\n if (supportsAccessors && (lookupGetter(object, property) ||\n lookupSetter(object, property)))\n {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n delete object[property];\n object[property] = descriptor.value;\n object.__proto__ = prototype;\n } else {\n object[property] = descriptor.value;\n }\n } else {\n if (!supportsAccessors)\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n if (owns(descriptor, \"get\"))\n defineGetter(object, property, descriptor.get);\n if (owns(descriptor, \"set\"))\n defineSetter(object, property, descriptor.set);\n }\n\n return object;\n };\n}\nif (!Object.defineProperties) {\n Object.defineProperties = function defineProperties(object, properties) {\n for (var property in properties) {\n if (owns(properties, property))\n Object.defineProperty(object, property, properties[property]);\n }\n return object;\n };\n}\nif (!Object.seal) {\n Object.seal = function seal(object) {\n return object;\n };\n}\nif (!Object.freeze) {\n Object.freeze = function freeze(object) {\n return object;\n };\n}\ntry {\n Object.freeze(function () {});\n} catch (exception) {\n Object.freeze = (function freeze(freezeObject) {\n return function freeze(object) {\n if (typeof object == \"function\") {\n return object;\n } else {\n return freezeObject(object);\n }\n };\n })(Object.freeze);\n}\nif (!Object.preventExtensions) {\n Object.preventExtensions = function preventExtensions(object) {\n return object;\n };\n}\nif (!Object.isSealed) {\n Object.isSealed = function isSealed(object) {\n return false;\n };\n}\nif (!Object.isFrozen) {\n Object.isFrozen = function isFrozen(object) {\n return false;\n };\n}\nif (!Object.isExtensible) {\n Object.isExtensible = function isExtensible(object) {\n if (Object(object) === object) {\n throw new TypeError(); // TODO message\n }\n var name = '';\n while (owns(object, name)) {\n name += '?';\n }\n object[name] = true;\n var returnValue = owns(object, name);\n delete object[name];\n return returnValue;\n };\n}\nif (!Object.keys) {\n var hasDontEnumBug = true,\n dontEnums = [\n \"toString\",\n \"toLocaleString\",\n \"valueOf\",\n \"hasOwnProperty\",\n \"isPrototypeOf\",\n \"propertyIsEnumerable\",\n \"constructor\"\n ],\n dontEnumsLength = dontEnums.length;\n\n for (var key in {\"toString\": null}) {\n hasDontEnumBug = false;\n }\n\n Object.keys = function keys(object) {\n\n if (\n (typeof object != \"object\" && typeof object != \"function\") ||\n object === null\n ) {\n throw new TypeError(\"Object.keys called on a non-object\");\n }\n\n var keys = [];\n for (var name in object) {\n if (owns(object, name)) {\n keys.push(name);\n }\n }\n\n if (hasDontEnumBug) {\n for (var i = 0, ii = dontEnumsLength; i < ii; i++) {\n var dontEnum = dontEnums[i];\n if (owns(object, dontEnum)) {\n keys.push(dontEnum);\n }\n }\n }\n return keys;\n };\n\n}\nif (!Date.now) {\n Date.now = function now() {\n return new Date().getTime();\n };\n}\nvar ws = \"\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\" +\n \"\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\" +\n \"\\u2029\\uFEFF\";\nif (!String.prototype.trim || ws.trim()) {\n ws = \"[\" + ws + \"]\";\n var trimBeginRegexp = new RegExp(\"^\" + ws + ws + \"*\"),\n trimEndRegexp = new RegExp(ws + ws + \"*$\");\n String.prototype.trim = function trim() {\n return String(this).replace(trimBeginRegexp, \"\").replace(trimEndRegexp, \"\");\n };\n}\n\nfunction toInteger(n) {\n n = +n;\n if (n !== n) { // isNaN\n n = 0;\n } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n return n;\n}\n\nfunction isPrimitive(input) {\n var type = typeof input;\n return (\n input === null ||\n type === \"undefined\" ||\n type === \"boolean\" ||\n type === \"number\" ||\n type === \"string\"\n );\n}\n\nfunction toPrimitive(input) {\n var val, valueOf, toString;\n if (isPrimitive(input)) {\n return input;\n }\n valueOf = input.valueOf;\n if (typeof valueOf === \"function\") {\n val = valueOf.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n toString = input.toString;\n if (typeof toString === \"function\") {\n val = toString.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n throw new TypeError();\n}\nvar toObject = function (o) {\n if (o == null) { // this matches both null and undefined\n throw new TypeError(\"can't convert \"+o+\" to object\");\n }\n return Object(o);\n};\n\n});\n\nace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./regexp\");\nacequire(\"./es5-shim\");\n\n});\n\nace.define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar XHTML_NS = \"http://www.w3.org/1999/xhtml\";\n\nexports.getDocumentHead = function(doc) {\n if (!doc)\n doc = document;\n return doc.head || doc.getElementsByTagName(\"head\")[0] || doc.documentElement;\n};\n\nexports.createElement = function(tag, ns) {\n return document.createElementNS ?\n document.createElementNS(ns || XHTML_NS, tag) :\n document.createElement(tag);\n};\n\nexports.hasCssClass = function(el, name) {\n var classes = (el.className + \"\").split(/\\s+/g);\n return classes.indexOf(name) !== -1;\n};\nexports.addCssClass = function(el, name) {\n if (!exports.hasCssClass(el, name)) {\n el.className += \" \" + name;\n }\n};\nexports.removeCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g);\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n classes.splice(index, 1);\n }\n el.className = classes.join(\" \");\n};\n\nexports.toggleCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g), add = true;\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n add = false;\n classes.splice(index, 1);\n }\n if (add)\n classes.push(name);\n\n el.className = classes.join(\" \");\n return add;\n};\nexports.setCssClass = function(node, className, include) {\n if (include) {\n exports.addCssClass(node, className);\n } else {\n exports.removeCssClass(node, className);\n }\n};\n\nexports.hasCssString = function(id, doc) {\n var index = 0, sheets;\n doc = doc || document;\n\n if (doc.createStyleSheet && (sheets = doc.styleSheets)) {\n while (index < sheets.length)\n if (sheets[index++].owningElement.id === id) return true;\n } else if ((sheets = doc.getElementsByTagName(\"style\"))) {\n while (index < sheets.length)\n if (sheets[index++].id === id) return true;\n }\n\n return false;\n};\n\nexports.importCssString = function importCssString(cssText, id, doc) {\n doc = doc || document;\n if (id && exports.hasCssString(id, doc))\n return null;\n \n var style;\n \n if (id)\n cssText += \"\\n/*# sourceURL=ace/css/\" + id + \" */\";\n \n if (doc.createStyleSheet) {\n style = doc.createStyleSheet();\n style.cssText = cssText;\n if (id)\n style.owningElement.id = id;\n } else {\n style = exports.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n if (id)\n style.id = id;\n\n exports.getDocumentHead(doc).appendChild(style);\n }\n};\n\nexports.importCssStylsheet = function(uri, doc) {\n if (doc.createStyleSheet) {\n doc.createStyleSheet(uri);\n } else {\n var link = exports.createElement('link');\n link.rel = 'stylesheet';\n link.href = uri;\n\n exports.getDocumentHead(doc).appendChild(link);\n }\n};\n\nexports.getInnerWidth = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingLeft\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingRight\"), 10) + \n element.clientWidth\n );\n};\n\nexports.getInnerHeight = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingTop\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingBottom\"), 10) +\n element.clientHeight\n );\n};\n\nexports.scrollbarWidth = function(document) {\n var inner = exports.createElement(\"ace_inner\");\n inner.style.width = \"100%\";\n inner.style.minWidth = \"0px\";\n inner.style.height = \"200px\";\n inner.style.display = \"block\";\n\n var outer = exports.createElement(\"ace_outer\");\n var style = outer.style;\n\n style.position = \"absolute\";\n style.left = \"-10000px\";\n style.overflow = \"hidden\";\n style.width = \"200px\";\n style.minWidth = \"0px\";\n style.height = \"150px\";\n style.display = \"block\";\n\n outer.appendChild(inner);\n\n var body = document.documentElement;\n body.appendChild(outer);\n\n var noScrollbar = inner.offsetWidth;\n\n style.overflow = \"scroll\";\n var withScrollbar = inner.offsetWidth;\n\n if (noScrollbar == withScrollbar) {\n withScrollbar = outer.clientWidth;\n }\n\n body.removeChild(outer);\n\n return noScrollbar-withScrollbar;\n};\n\nif (typeof document == \"undefined\") {\n exports.importCssString = function() {};\n return;\n}\n\nif (window.pageYOffset !== undefined) {\n exports.getPageScrollTop = function() {\n return window.pageYOffset;\n };\n\n exports.getPageScrollLeft = function() {\n return window.pageXOffset;\n };\n}\nelse {\n exports.getPageScrollTop = function() {\n return document.body.scrollTop;\n };\n\n exports.getPageScrollLeft = function() {\n return document.body.scrollLeft;\n };\n}\n\nif (window.getComputedStyle)\n exports.computedStyle = function(element, style) {\n if (style)\n return (window.getComputedStyle(element, \"\") || {})[style] || \"\";\n return window.getComputedStyle(element, \"\") || {};\n };\nelse\n exports.computedStyle = function(element, style) {\n if (style)\n return element.currentStyle[style];\n return element.currentStyle;\n };\nexports.setInnerHtml = function(el, innerHtml) {\n var element = el.cloneNode(false);//document.createElement(\"div\");\n element.innerHTML = innerHtml;\n el.parentNode.replaceChild(element, el);\n return element;\n};\n\nif (\"textContent\" in document.documentElement) {\n exports.setInnerText = function(el, innerText) {\n el.textContent = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.textContent;\n };\n}\nelse {\n exports.setInnerText = function(el, innerText) {\n el.innerText = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.innerText;\n };\n}\n\nexports.getParentWindow = function(document) {\n return document.defaultView || document.parentWindow;\n};\n\n});\n\nace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.inherits = function(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n};\n\nexports.mixin = function(obj, mixin) {\n for (var key in mixin) {\n obj[key] = mixin[key];\n }\n return obj;\n};\n\nexports.implement = function(proto, mixin) {\n exports.mixin(proto, mixin);\n};\n\n});\n\nace.define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./fixoldbrowsers\");\n\nvar oop = acequire(\"./oop\");\nvar Keys = (function() {\n var ret = {\n MODIFIER_KEYS: {\n 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'\n },\n\n KEY_MODS: {\n \"ctrl\": 1, \"alt\": 2, \"option\" : 2, \"shift\": 4,\n \"super\": 8, \"meta\": 8, \"command\": 8, \"cmd\": 8\n },\n\n FUNCTION_KEYS : {\n 8 : \"Backspace\",\n 9 : \"Tab\",\n 13 : \"Return\",\n 19 : \"Pause\",\n 27 : \"Esc\",\n 32 : \"Space\",\n 33 : \"PageUp\",\n 34 : \"PageDown\",\n 35 : \"End\",\n 36 : \"Home\",\n 37 : \"Left\",\n 38 : \"Up\",\n 39 : \"Right\",\n 40 : \"Down\",\n 44 : \"Print\",\n 45 : \"Insert\",\n 46 : \"Delete\",\n 96 : \"Numpad0\",\n 97 : \"Numpad1\",\n 98 : \"Numpad2\",\n 99 : \"Numpad3\",\n 100: \"Numpad4\",\n 101: \"Numpad5\",\n 102: \"Numpad6\",\n 103: \"Numpad7\",\n 104: \"Numpad8\",\n 105: \"Numpad9\",\n '-13': \"NumpadEnter\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"Numlock\",\n 145: \"Scrolllock\"\n },\n\n PRINTABLE_KEYS: {\n 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',\n 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',\n 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',\n 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',\n 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',\n 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',\n 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',\n 219: '[', 220: '\\\\',221: ']', 222: \"'\", 111: '/', 106: '*'\n }\n };\n var name, i;\n for (i in ret.FUNCTION_KEYS) {\n name = ret.FUNCTION_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n for (i in ret.PRINTABLE_KEYS) {\n name = ret.PRINTABLE_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n oop.mixin(ret, ret.MODIFIER_KEYS);\n oop.mixin(ret, ret.PRINTABLE_KEYS);\n oop.mixin(ret, ret.FUNCTION_KEYS);\n ret.enter = ret[\"return\"];\n ret.escape = ret.esc;\n ret.del = ret[\"delete\"];\n ret[173] = '-';\n \n (function() {\n var mods = [\"cmd\", \"ctrl\", \"alt\", \"shift\"];\n for (var i = Math.pow(2, mods.length); i--;) { \n ret.KEY_MODS[i] = mods.filter(function(x) {\n return i & ret.KEY_MODS[x];\n }).join(\"-\") + \"-\";\n }\n })();\n\n ret.KEY_MODS[0] = \"\";\n ret.KEY_MODS[-1] = \"input-\";\n\n return ret;\n})();\noop.mixin(exports, Keys);\n\nexports.keyCodeToString = function(keyCode) {\n var keyString = Keys[keyCode];\n if (typeof keyString != \"string\")\n keyString = String.fromCharCode(keyCode);\n return keyString.toLowerCase();\n};\n\n});\n\nace.define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.OS = {\n LINUX: \"LINUX\",\n MAC: \"MAC\",\n WINDOWS: \"WINDOWS\"\n};\nexports.getOS = function() {\n if (exports.isMac) {\n return exports.OS.MAC;\n } else if (exports.isLinux) {\n return exports.OS.LINUX;\n } else {\n return exports.OS.WINDOWS;\n }\n};\nif (typeof navigator != \"object\")\n return;\n\nvar os = (navigator.platform.match(/mac|win|linux/i) || [\"other\"])[0].toLowerCase();\nvar ua = navigator.userAgent;\nexports.isWin = (os == \"win\");\nexports.isMac = (os == \"mac\");\nexports.isLinux = (os == \"linux\");\nexports.isIE = \n (navigator.appName == \"Microsoft Internet Explorer\" || navigator.appName.indexOf(\"MSAppHost\") >= 0)\n ? parseFloat((ua.match(/(?:MSIE |Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1])\n : parseFloat((ua.match(/(?:Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1]); // for ie\n \nexports.isOldIE = exports.isIE && exports.isIE < 9;\nexports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === \"Gecko\";\nexports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv:(\\d+)/)||[])[1], 10) < 4;\nexports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == \"[object Opera]\";\nexports.isWebKit = parseFloat(ua.split(\"WebKit/\")[1]) || undefined;\n\nexports.isChrome = parseFloat(ua.split(\" Chrome/\")[1]) || undefined;\n\nexports.isAIR = ua.indexOf(\"AdobeAIR\") >= 0;\n\nexports.isIPad = ua.indexOf(\"iPad\") >= 0;\n\nexports.isChromeOS = ua.indexOf(\" CrOS \") >= 0;\n\nexports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream;\n\nif (exports.isIOS) exports.isMac = true;\n\n});\n\nace.define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keys = acequire(\"./keys\");\nvar useragent = acequire(\"./useragent\");\n\nvar pressedKeys = null;\nvar ts = 0;\n\nexports.addListener = function(elem, type, callback) {\n if (elem.addEventListener) {\n return elem.addEventListener(type, callback, false);\n }\n if (elem.attachEvent) {\n var wrapper = function() {\n callback.call(elem, window.event);\n };\n callback._wrapper = wrapper;\n elem.attachEvent(\"on\" + type, wrapper);\n }\n};\n\nexports.removeListener = function(elem, type, callback) {\n if (elem.removeEventListener) {\n return elem.removeEventListener(type, callback, false);\n }\n if (elem.detachEvent) {\n elem.detachEvent(\"on\" + type, callback._wrapper || callback);\n }\n};\nexports.stopEvent = function(e) {\n exports.stopPropagation(e);\n exports.preventDefault(e);\n return false;\n};\n\nexports.stopPropagation = function(e) {\n if (e.stopPropagation)\n e.stopPropagation();\n else\n e.cancelBubble = true;\n};\n\nexports.preventDefault = function(e) {\n if (e.preventDefault)\n e.preventDefault();\n else\n e.returnValue = false;\n};\nexports.getButton = function(e) {\n if (e.type == \"dblclick\")\n return 0;\n if (e.type == \"contextmenu\" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))\n return 2;\n if (e.preventDefault) {\n return e.button;\n }\n else {\n return {1:0, 2:2, 4:1}[e.button];\n }\n};\n\nexports.capture = function(el, eventHandler, releaseCaptureHandler) {\n function onMouseUp(e) {\n eventHandler && eventHandler(e);\n releaseCaptureHandler && releaseCaptureHandler(e);\n\n exports.removeListener(document, \"mousemove\", eventHandler, true);\n exports.removeListener(document, \"mouseup\", onMouseUp, true);\n exports.removeListener(document, \"dragstart\", onMouseUp, true);\n }\n\n exports.addListener(document, \"mousemove\", eventHandler, true);\n exports.addListener(document, \"mouseup\", onMouseUp, true);\n exports.addListener(document, \"dragstart\", onMouseUp, true);\n \n return onMouseUp;\n};\n\nexports.addTouchMoveListener = function (el, callback) {\n var startx, starty;\n exports.addListener(el, \"touchstart\", function (e) {\n var touches = e.touches;\n var touchObj = touches[0];\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n });\n exports.addListener(el, \"touchmove\", function (e) {\n var touches = e.touches;\n if (touches.length > 1) return;\n\n var touchObj = touches[0];\n\n e.wheelX = startx - touchObj.clientX;\n e.wheelY = starty - touchObj.clientY;\n\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n\n callback(e);\n });\n};\n\nexports.addMouseWheelListener = function(el, callback) {\n if (\"onmousewheel\" in el) {\n exports.addListener(el, \"mousewheel\", function(e) {\n var factor = 8;\n if (e.wheelDeltaX !== undefined) {\n e.wheelX = -e.wheelDeltaX / factor;\n e.wheelY = -e.wheelDeltaY / factor;\n } else {\n e.wheelX = 0;\n e.wheelY = -e.wheelDelta / factor;\n }\n callback(e);\n });\n } else if (\"onwheel\" in el) {\n exports.addListener(el, \"wheel\", function(e) {\n var factor = 0.35;\n switch (e.deltaMode) {\n case e.DOM_DELTA_PIXEL:\n e.wheelX = e.deltaX * factor || 0;\n e.wheelY = e.deltaY * factor || 0;\n break;\n case e.DOM_DELTA_LINE:\n case e.DOM_DELTA_PAGE:\n e.wheelX = (e.deltaX || 0) * 5;\n e.wheelY = (e.deltaY || 0) * 5;\n break;\n }\n \n callback(e);\n });\n } else {\n exports.addListener(el, \"DOMMouseScroll\", function(e) {\n if (e.axis && e.axis == e.HORIZONTAL_AXIS) {\n e.wheelX = (e.detail || 0) * 5;\n e.wheelY = 0;\n } else {\n e.wheelX = 0;\n e.wheelY = (e.detail || 0) * 5;\n }\n callback(e);\n });\n }\n};\n\nexports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) {\n var clicks = 0;\n var startX, startY, timer; \n var eventNames = {\n 2: \"dblclick\",\n 3: \"tripleclick\",\n 4: \"quadclick\"\n };\n\n function onMousedown(e) {\n if (exports.getButton(e) !== 0) {\n clicks = 0;\n } else if (e.detail > 1) {\n clicks++;\n if (clicks > 4)\n clicks = 1;\n } else {\n clicks = 1;\n }\n if (useragent.isIE) {\n var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;\n if (!timer || isNewClick)\n clicks = 1;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600);\n\n if (clicks == 1) {\n startX = e.clientX;\n startY = e.clientY;\n }\n }\n \n e._clicks = clicks;\n\n eventHandler[callbackName](\"mousedown\", e);\n\n if (clicks > 4)\n clicks = 0;\n else if (clicks > 1)\n return eventHandler[callbackName](eventNames[clicks], e);\n }\n function onDblclick(e) {\n clicks = 2;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600);\n eventHandler[callbackName](\"mousedown\", e);\n eventHandler[callbackName](eventNames[clicks], e);\n }\n if (!Array.isArray(elements))\n elements = [elements];\n elements.forEach(function(el) {\n exports.addListener(el, \"mousedown\", onMousedown);\n if (useragent.isOldIE)\n exports.addListener(el, \"dblclick\", onDblclick);\n });\n};\n\nvar getModifierHash = useragent.isMac && useragent.isOpera && !(\"KeyboardEvent\" in window)\n ? function(e) {\n return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);\n }\n : function(e) {\n return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);\n };\n\nexports.getModifierString = function(e) {\n return keys.KEY_MODS[getModifierHash(e)];\n};\n\nfunction normalizeCommandKeys(callback, e, keyCode) {\n var hashId = getModifierHash(e);\n\n if (!useragent.isMac && pressedKeys) {\n if (e.getModifierState && (e.getModifierState(\"OS\") || e.getModifierState(\"Win\")))\n hashId |= 8;\n if (pressedKeys.altGr) {\n if ((3 & hashId) != 3)\n pressedKeys.altGr = 0;\n else\n return;\n }\n if (keyCode === 18 || keyCode === 17) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (keyCode === 17 && location === 1) {\n if (pressedKeys[keyCode] == 1)\n ts = e.timeStamp;\n } else if (keyCode === 18 && hashId === 3 && location === 2) {\n var dt = e.timeStamp - ts;\n if (dt < 50)\n pressedKeys.altGr = true;\n }\n }\n }\n \n if (keyCode in keys.MODIFIER_KEYS) {\n keyCode = -1;\n }\n if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {\n keyCode = -1;\n }\n \n if (!hashId && keyCode === 13) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (location === 3) {\n callback(e, hashId, -keyCode);\n if (e.defaultPrevented)\n return;\n }\n }\n \n if (useragent.isChromeOS && hashId & 8) {\n callback(e, hashId, keyCode);\n if (e.defaultPrevented)\n return;\n else\n hashId &= ~8;\n }\n if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {\n return false;\n }\n \n return callback(e, hashId, keyCode);\n}\n\n\nexports.addCommandKeyListener = function(el, callback) {\n var addListener = exports.addListener;\n if (useragent.isOldGecko || (useragent.isOpera && !(\"KeyboardEvent\" in window))) {\n var lastKeyDownKeyCode = null;\n addListener(el, \"keydown\", function(e) {\n lastKeyDownKeyCode = e.keyCode;\n });\n addListener(el, \"keypress\", function(e) {\n return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);\n });\n } else {\n var lastDefaultPrevented = null;\n\n addListener(el, \"keydown\", function(e) {\n pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;\n var result = normalizeCommandKeys(callback, e, e.keyCode);\n lastDefaultPrevented = e.defaultPrevented;\n return result;\n });\n\n addListener(el, \"keypress\", function(e) {\n if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {\n exports.stopEvent(e);\n lastDefaultPrevented = null;\n }\n });\n\n addListener(el, \"keyup\", function(e) {\n pressedKeys[e.keyCode] = null;\n });\n\n if (!pressedKeys) {\n resetPressedKeys();\n addListener(window, \"focus\", resetPressedKeys);\n }\n }\n};\nfunction resetPressedKeys() {\n pressedKeys = Object.create(null);\n}\n\nif (typeof window == \"object\" && window.postMessage && !useragent.isOldIE) {\n var postMessageId = 1;\n exports.nextTick = function(callback, win) {\n win = win || window;\n var messageName = \"zero-timeout-message-\" + postMessageId;\n exports.addListener(win, \"message\", function listener(e) {\n if (e.data == messageName) {\n exports.stopPropagation(e);\n exports.removeListener(win, \"message\", listener);\n callback();\n }\n });\n win.postMessage(messageName, \"*\");\n };\n}\n\n\nexports.nextFrame = typeof window == \"object\" && (window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame\n || window.oRequestAnimationFrame);\n\nif (exports.nextFrame)\n exports.nextFrame = exports.nextFrame.bind(window);\nelse\n exports.nextFrame = function(callback) {\n setTimeout(callback, 17);\n };\n});\n\nace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.last = function(a) {\n return a[a.length - 1];\n};\n\nexports.stringReverse = function(string) {\n return string.split(\"\").reverse().join(\"\");\n};\n\nexports.stringRepeat = function (string, count) {\n var result = '';\n while (count > 0) {\n if (count & 1)\n result += string;\n\n if (count >>= 1)\n string += string;\n }\n return result;\n};\n\nvar trimBeginRegexp = /^\\s\\s*/;\nvar trimEndRegexp = /\\s\\s*$/;\n\nexports.stringTrimLeft = function (string) {\n return string.replace(trimBeginRegexp, '');\n};\n\nexports.stringTrimRight = function (string) {\n return string.replace(trimEndRegexp, '');\n};\n\nexports.copyObject = function(obj) {\n var copy = {};\n for (var key in obj) {\n copy[key] = obj[key];\n }\n return copy;\n};\n\nexports.copyArray = function(array){\n var copy = [];\n for (var i=0, l=array.length; i PLACEHOLDER.length)\n data = data.substr(9);\n else if (data.substr(0, 4) == PLACEHOLDER.substr(0, 4))\n data = data.substr(4, data.length - PLACEHOLDER.length + 1);\n else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n if (data == PLACEHOLDER.charAt(0)) {\n } else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n\n if (data)\n host.onTextInput(data);\n }\n if (copied) {\n copied = false;\n }\n if (afterContextMenu)\n afterContextMenu = false;\n };\n var onInput = function(e) {\n if (inComposition)\n return;\n var data = text.value;\n sendText(data);\n resetValue();\n };\n\n var handleClipboardData = function(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch(e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function(e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n if (useragent.isIOS) {\n cut = isCut;\n text.value = \"\\n aa\" + data + \"a a\\n\";\n text.setSelectionRange(4, 4 + data.length);\n copied = {\n value: data\n };\n }\n isCut ? host.onCut() : host.onCopy();\n if (!useragent.isIOS) event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function(){\n copied = false;\n resetValue();\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n\n var onCut = function(e) {\n doCopy(e, true);\n };\n\n var onCopy = function(e) {\n doCopy(e, false);\n };\n\n var onPaste = function(e) {\n var data = handleClipboardData(e);\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n\n event.addListener(text, \"select\", onSelect);\n\n event.addListener(text, \"input\", onInput);\n\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n var onCompositionStart = function(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly)\n return;\n inComposition = {};\n inComposition.canUndo = host.session.$undoManager;\n host.onCompositionStart();\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", onCompositionEnd);\n if (inComposition.canUndo && !host.selection.isEmpty()) {\n host.insert(\"\");\n host.session.markUndoGroup();\n host.selection.clearSelection();\n }\n host.session.markUndoGroup();\n };\n\n var onCompositionUpdate = function() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n var val = text.value.replace(/\\x01/g, \"\");\n if (inComposition.lastValue === val) return;\n\n host.onCompositionUpdate(val);\n if (inComposition.lastValue)\n host.undo();\n if (inComposition.canUndo)\n inComposition.lastValue = val;\n if (inComposition.lastValue) {\n var r = host.selection.getRange();\n host.insert(inComposition.lastValue);\n host.session.markUndoGroup();\n inComposition.range = host.selection.getRange();\n host.selection.setRange(r);\n host.selection.clearSelection();\n }\n };\n\n var onCompositionEnd = function(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n var c = inComposition;\n inComposition = false;\n var timer = setTimeout(function() {\n timer = null;\n var str = text.value.replace(/\\x01/g, \"\");\n if (inComposition)\n return;\n else if (str == c.lastValue)\n resetValue();\n else if (!c.lastValue && str) {\n resetValue();\n sendText(str);\n }\n });\n inputHandler = function compositionInputHandler(str) {\n if (timer)\n clearTimeout(timer);\n str = str.replace(/\\x01/g, \"\");\n if (str == c.lastValue)\n return \"\";\n if (c.lastValue && timer)\n host.undo();\n return str;\n };\n host.onCompositionEnd();\n host.removeListener(\"mousedown\", onCompositionEnd);\n if (e.type == \"compositionend\" && c.range) {\n host.selection.setRange(c.range);\n }\n var needsOnInput =\n (!!useragent.isChrome && useragent.isChrome >= 53) ||\n (!!useragent.isWebKit && useragent.isWebKit >= 603);\n\n if (needsOnInput) {\n onInput();\n }\n };\n\n\n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50);\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n if (useragent.isGecko) {\n event.addListener(text, \"text\", function(){syncComposition.schedule();});\n } else {\n event.addListener(text, \"keyup\", function(){syncComposition.schedule();});\n event.addListener(text, \"keydown\", function(){syncComposition.schedule();});\n }\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function() {\n return text;\n };\n\n this.setReadOnly = function(readOnly) {\n text.readOnly = readOnly;\n };\n\n this.onContextMenu = function(e) {\n afterContextMenu = true;\n resetSelection(host.selection.isEmpty());\n host._emit(\"nativecontextmenu\", {target: host, domEvent: e});\n this.moveToMouse(e, true);\n };\n\n this.moveToMouse = function(e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + \"height:\" + text.style.height + \";\"\n + (useragent.isIE ? \"opacity:0.1;\" : \"\");\n\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight -2;\n var move = function(e) {\n text.style.left = e.clientX - left - 2 + \"px\";\n text.style.top = Math.min(e.clientY - top - 2, maxTop) + \"px\";\n };\n move(e);\n\n if (e.type != \"mousedown\")\n return;\n\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$keepTextAreaAtCursor = null;\n\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n if (host.renderer.$keepTextAreaAtCursor == null) {\n host.renderer.$keepTextAreaAtCursor = true;\n host.renderer.$moveTextAreaToCursor();\n }\n }, 0);\n }\n\n var onContextMenu = function(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function(e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n\n if (useragent.isIOS) {\n var typingResetTimeout = null;\n var typing = false;\n\n parentNode.addEventListener(\"keydown\", function (e) {\n if (typingResetTimeout) clearTimeout(typingResetTimeout);\n typing = true;\n });\n\n parentNode.addEventListener(\"keyup\", function (e) {\n typingResetTimeout = setTimeout(function () {\n typing = false;\n }, 100);\n });\n var detectArrowKeys = function(e) {\n if (document.activeElement !== text) return;\n if (typing) return;\n\n if (cut) {\n return setTimeout(function () {\n cut = false;\n }, 100);\n }\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n text.setSelectionRange(4, 5);\n if (selectionStart == selectionEnd) {\n switch (selectionStart) {\n case 0: host.onCommandKey(null, 0, KEYS.up); break;\n case 1: host.onCommandKey(null, 0, KEYS.home); break;\n case 2: host.onCommandKey(null, MODS.option, KEYS.left); break;\n case 4: host.onCommandKey(null, 0, KEYS.left); break;\n case 5: host.onCommandKey(null, 0, KEYS.right); break;\n case 7: host.onCommandKey(null, MODS.option, KEYS.right); break;\n case 8: host.onCommandKey(null, 0, KEYS.end); break;\n case 9: host.onCommandKey(null, 0, KEYS.down); break;\n }\n } else {\n switch (selectionEnd) {\n case 6: host.onCommandKey(null, MODS.shift, KEYS.right); break;\n case 7: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.right); break;\n case 8: host.onCommandKey(null, MODS.shift, KEYS.end); break;\n case 9: host.onCommandKey(null, MODS.shift, KEYS.down); break;\n }\n switch (selectionStart) {\n case 0: host.onCommandKey(null, MODS.shift, KEYS.up); break;\n case 1: host.onCommandKey(null, MODS.shift, KEYS.home); break;\n case 2: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.left); break;\n case 3: host.onCommandKey(null, MODS.shift, KEYS.left); break;\n }\n }\n };\n document.addEventListener(\"selectionchange\", detectArrowKeys);\n host.on(\"destroy\", function() {\n document.removeEventListener(\"selectionchange\", detectArrowKeys);\n });\n }\n};\n\nexports.TextInput = TextInput;\n});\n\nace.define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/keyboard/textinput_ios\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar BROKEN_SETDATA = useragent.isChrome < 18;\nvar USE_IE_MIME_TYPE = useragent.isIE;\n\nvar TextInputIOS = acequire(\"./textinput_ios\").TextInput;\nvar TextInput = function(parentNode, host) {\n if (useragent.isIOS)\n return TextInputIOS.call(this, parentNode, host);\n\n var text = dom.createElement(\"textarea\");\n text.className = \"ace_text-input\";\n\n text.setAttribute(\"wrap\", \"off\");\n text.setAttribute(\"autocorrect\", \"off\");\n text.setAttribute(\"autocapitalize\", \"off\");\n text.setAttribute(\"spellcheck\", false);\n\n text.style.opacity = \"0\";\n parentNode.insertBefore(text, parentNode.firstChild);\n\n var PLACEHOLDER = \"\\u2028\\u2028\";\n\n var copied = false;\n var pasted = false;\n var inComposition = false;\n var tempStyle = '';\n var isSelectionEmpty = true;\n try { var isFocused = document.activeElement === text; } catch(e) {}\n \n event.addListener(text, \"blur\", function(e) {\n host.onBlur(e);\n isFocused = false;\n });\n event.addListener(text, \"focus\", function(e) {\n isFocused = true;\n host.onFocus(e);\n resetSelection();\n });\n this.focus = function() {\n if (tempStyle) return text.focus();\n var top = text.style.top;\n text.style.position = \"fixed\";\n text.style.top = \"0px\";\n text.focus();\n setTimeout(function() {\n text.style.position = \"\";\n if (text.style.top == \"0px\")\n text.style.top = top;\n }, 0);\n };\n this.blur = function() {\n text.blur();\n };\n this.isFocused = function() {\n return isFocused;\n };\n var syncSelection = lang.delayedCall(function() {\n isFocused && resetSelection(isSelectionEmpty);\n });\n var syncValue = lang.delayedCall(function() {\n if (!inComposition) {\n text.value = PLACEHOLDER;\n isFocused && resetSelection();\n }\n });\n\n function resetSelection(isEmpty) {\n if (inComposition)\n return;\n inComposition = true;\n \n if (inputHandler) {\n var selectionStart = 0;\n var selectionEnd = isEmpty ? 0 : text.value.length - 1;\n } else {\n var selectionStart = isEmpty ? 2 : 1;\n var selectionEnd = 2;\n }\n try {\n text.setSelectionRange(selectionStart, selectionEnd);\n } catch(e){}\n \n inComposition = false;\n }\n\n function resetValue() {\n if (inComposition)\n return;\n text.value = PLACEHOLDER;\n if (useragent.isWebKit)\n syncValue.schedule();\n }\n\n useragent.isWebKit || host.addEventListener('changeSelection', function() {\n if (host.selection.isEmpty() != isSelectionEmpty) {\n isSelectionEmpty = !isSelectionEmpty;\n syncSelection.schedule();\n }\n });\n\n resetValue();\n if (isFocused)\n host.onFocus();\n\n\n var isAllSelected = function(text) {\n return text.selectionStart === 0 && text.selectionEnd === text.value.length;\n };\n\n var onSelect = function(e) {\n if (copied) {\n copied = false;\n } else if (isAllSelected(text)) {\n host.selectAll();\n resetSelection();\n } else if (inputHandler) {\n resetSelection(host.selection.isEmpty());\n }\n };\n\n var inputHandler = null;\n this.setInputHandler = function(cb) {inputHandler = cb;};\n this.getInputHandler = function() {return inputHandler;};\n var afterContextMenu = false;\n \n var sendText = function(data) {\n if (inputHandler) {\n data = inputHandler(data);\n inputHandler = null;\n }\n if (pasted) {\n resetSelection();\n if (data)\n host.onPaste(data);\n pasted = false;\n } else if (data == PLACEHOLDER.charAt(0)) {\n if (afterContextMenu)\n host.execCommand(\"del\", {source: \"ace\"});\n else // some versions of android do not fire keydown when pressing backspace\n host.execCommand(\"backspace\", {source: \"ace\"});\n } else {\n if (data.substring(0, 2) == PLACEHOLDER)\n data = data.substr(2);\n else if (data.charAt(0) == PLACEHOLDER.charAt(0))\n data = data.substr(1);\n else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n \n if (data)\n host.onTextInput(data);\n }\n if (afterContextMenu)\n afterContextMenu = false;\n };\n var onInput = function(e) {\n if (inComposition)\n return;\n var data = text.value;\n sendText(data);\n resetValue();\n };\n \n var handleClipboardData = function(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch(e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function(e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n isCut ? host.onCut() : host.onCopy();\n event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function(){\n copied = false;\n resetValue();\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n \n var onCut = function(e) {\n doCopy(e, true);\n };\n \n var onCopy = function(e) {\n doCopy(e, false);\n };\n \n var onPaste = function(e) {\n var data = handleClipboardData(e);\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n\n event.addListener(text, \"select\", onSelect);\n\n event.addListener(text, \"input\", onInput);\n\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) {\n event.addListener(parentNode, \"keydown\", function(e) {\n if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)\n return;\n\n switch (e.keyCode) {\n case 67:\n onCopy(e);\n break;\n case 86:\n onPaste(e);\n break;\n case 88:\n onCut(e);\n break;\n }\n });\n }\n var onCompositionStart = function(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly) \n return;\n inComposition = {};\n inComposition.canUndo = host.session.$undoManager;\n host.onCompositionStart();\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", onCompositionEnd);\n if (inComposition.canUndo && !host.selection.isEmpty()) {\n host.insert(\"\");\n host.session.markUndoGroup();\n host.selection.clearSelection();\n }\n host.session.markUndoGroup();\n };\n\n var onCompositionUpdate = function() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n var val = text.value.replace(/\\u2028/g, \"\");\n if (inComposition.lastValue === val) return;\n \n host.onCompositionUpdate(val);\n if (inComposition.lastValue)\n host.undo();\n if (inComposition.canUndo)\n inComposition.lastValue = val;\n if (inComposition.lastValue) {\n var r = host.selection.getRange();\n host.insert(inComposition.lastValue);\n host.session.markUndoGroup();\n inComposition.range = host.selection.getRange();\n host.selection.setRange(r);\n host.selection.clearSelection();\n }\n };\n\n var onCompositionEnd = function(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n var c = inComposition;\n inComposition = false;\n var timer = setTimeout(function() {\n timer = null;\n var str = text.value.replace(/\\u2028/g, \"\");\n if (inComposition)\n return;\n else if (str == c.lastValue)\n resetValue();\n else if (!c.lastValue && str) {\n resetValue();\n sendText(str);\n }\n });\n inputHandler = function compositionInputHandler(str) {\n if (timer)\n clearTimeout(timer);\n str = str.replace(/\\u2028/g, \"\");\n if (str == c.lastValue)\n return \"\";\n if (c.lastValue && timer)\n host.undo();\n return str;\n };\n host.onCompositionEnd();\n host.removeListener(\"mousedown\", onCompositionEnd);\n if (e.type == \"compositionend\" && c.range) {\n host.selection.setRange(c.range);\n }\n var needsOnInput =\n (!!useragent.isChrome && useragent.isChrome >= 53) ||\n (!!useragent.isWebKit && useragent.isWebKit >= 603);\n\n if (needsOnInput) {\n onInput();\n }\n };\n \n \n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50);\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n if (useragent.isGecko) {\n event.addListener(text, \"text\", function(){syncComposition.schedule();});\n } else {\n event.addListener(text, \"keyup\", function(){syncComposition.schedule();});\n event.addListener(text, \"keydown\", function(){syncComposition.schedule();});\n }\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function() {\n return text;\n };\n\n this.setReadOnly = function(readOnly) {\n text.readOnly = readOnly;\n };\n\n this.onContextMenu = function(e) {\n afterContextMenu = true;\n resetSelection(host.selection.isEmpty());\n host._emit(\"nativecontextmenu\", {target: host, domEvent: e});\n this.moveToMouse(e, true);\n };\n \n this.moveToMouse = function(e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + \"height:\" + text.style.height + \";\"\n + (useragent.isIE ? \"opacity:0.1;\" : \"\");\n\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight -2;\n var move = function(e) {\n text.style.left = e.clientX - left - 2 + \"px\";\n text.style.top = Math.min(e.clientY - top - 2, maxTop) + \"px\";\n }; \n move(e);\n\n if (e.type != \"mousedown\")\n return;\n\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$keepTextAreaAtCursor = null;\n\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n if (host.renderer.$keepTextAreaAtCursor == null) {\n host.renderer.$keepTextAreaAtCursor = true;\n host.renderer.$moveTextAreaToCursor();\n }\n }, 0);\n }\n\n var onContextMenu = function(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function(e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n};\n\nexports.TextInput = TextInput;\n});\n\nace.define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar DRAG_OFFSET = 0; // pixels\nvar SCROLL_COOLDOWN_T = 250; // milliseconds\n\nfunction DefaultHandlers(mouseHandler) {\n mouseHandler.$clickSelection = null;\n\n var editor = mouseHandler.editor;\n editor.setDefaultHandler(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n editor.setDefaultHandler(\"dblclick\", this.onDoubleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"tripleclick\", this.onTripleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"quadclick\", this.onQuadClick.bind(mouseHandler));\n editor.setDefaultHandler(\"mousewheel\", this.onMouseWheel.bind(mouseHandler));\n editor.setDefaultHandler(\"touchmove\", this.onTouchMove.bind(mouseHandler));\n\n var exports = [\"select\", \"startSelect\", \"selectEnd\", \"selectAllEnd\", \"selectByWordsEnd\",\n \"selectByLinesEnd\", \"dragWait\", \"dragWaitEnd\", \"focusWait\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n\n mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, \"getLineRange\");\n mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, \"getWordRange\");\n}\n\n(function() {\n\n this.onMouseDown = function(ev) {\n var inSelection = ev.inSelection();\n var pos = ev.getDocumentPosition();\n this.mousedownEvent = ev;\n var editor = this.editor;\n\n var button = ev.getButton();\n if (button !== 0) {\n var selectionRange = editor.getSelectionRange();\n var selectionEmpty = selectionRange.isEmpty();\n editor.$blockScrolling++;\n if (selectionEmpty || button == 1)\n editor.selection.moveToPosition(pos);\n editor.$blockScrolling--;\n if (button == 2) {\n editor.textInput.onContextMenu(ev.domEvent);\n if (!useragent.isMozilla)\n ev.preventDefault();\n }\n return;\n }\n\n this.mousedownEvent.time = Date.now();\n if (inSelection && !editor.isFocused()) {\n editor.focus();\n if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {\n this.setState(\"focusWait\");\n this.captureMouse(ev);\n return;\n }\n }\n\n this.captureMouse(ev);\n this.startSelect(pos, ev.domEvent._clicks > 1);\n return ev.preventDefault();\n };\n\n this.startSelect = function(pos, waitForClickSelection) {\n pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);\n var editor = this.editor;\n editor.$blockScrolling++;\n if (this.mousedownEvent.getShiftKey())\n editor.selection.selectToPosition(pos);\n else if (!waitForClickSelection)\n editor.selection.moveToPosition(pos);\n if (!waitForClickSelection)\n this.select();\n if (editor.renderer.scroller.setCapture) {\n editor.renderer.scroller.setCapture();\n }\n editor.setStyle(\"ace_selecting\");\n this.setState(\"select\");\n editor.$blockScrolling--;\n };\n\n this.select = function() {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmp = this.$clickSelection.comparePoint(cursor);\n\n if (cmp == -1) {\n anchor = this.$clickSelection.end;\n } else if (cmp == 1) {\n anchor = this.$clickSelection.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.extendSelectionBy = function(unitName) {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n var range = editor.selection[unitName](cursor.row, cursor.column);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmpStart = this.$clickSelection.comparePoint(range.start);\n var cmpEnd = this.$clickSelection.comparePoint(range.end);\n\n if (cmpStart == -1 && cmpEnd <= 0) {\n anchor = this.$clickSelection.end;\n if (range.end.row != cursor.row || range.end.column != cursor.column)\n cursor = range.start;\n } else if (cmpEnd == 1 && cmpStart >= 0) {\n anchor = this.$clickSelection.start;\n if (range.start.row != cursor.row || range.start.column != cursor.column)\n cursor = range.end;\n } else if (cmpStart == -1 && cmpEnd == 1) {\n cursor = range.end;\n anchor = range.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.selectEnd =\n this.selectAllEnd =\n this.selectByWordsEnd =\n this.selectByLinesEnd = function() {\n this.$clickSelection = null;\n this.editor.unsetStyle(\"ace_selecting\");\n if (this.editor.renderer.scroller.releaseCapture) {\n this.editor.renderer.scroller.releaseCapture();\n }\n };\n\n this.focusWait = function() {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n var time = Date.now();\n\n if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n };\n\n this.onDoubleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n var session = editor.session;\n\n var range = session.getBracketRange(pos);\n if (range) {\n if (range.isEmpty()) {\n range.start.column--;\n range.end.column++;\n }\n this.setState(\"select\");\n } else {\n range = editor.selection.getWordRange(pos.row, pos.column);\n this.setState(\"selectByWords\");\n }\n this.$clickSelection = range;\n this.select();\n };\n\n this.onTripleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n\n this.setState(\"selectByLines\");\n var range = editor.getSelectionRange();\n if (range.isMultiLine() && range.contains(pos.row, pos.column)) {\n this.$clickSelection = editor.selection.getLineRange(range.start.row);\n this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;\n } else {\n this.$clickSelection = editor.selection.getLineRange(pos.row);\n }\n this.select();\n };\n\n this.onQuadClick = function(ev) {\n var editor = this.editor;\n\n editor.selectAll();\n this.$clickSelection = editor.getSelectionRange();\n this.setState(\"selectAll\");\n };\n\n this.onMouseWheel = function(ev) {\n if (ev.getAccelKey())\n return;\n if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {\n ev.wheelX = ev.wheelY;\n ev.wheelY = 0;\n }\n \n var editor = this.editor;\n\n if (!this.$lastScroll)\n this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 };\n\n var prevScroll = this.$lastScroll;\n var t = ev.domEvent.timeStamp;\n var dt = t - prevScroll.t;\n var vx = ev.wheelX / dt;\n var vy = ev.wheelY / dt;\n if (dt < SCROLL_COOLDOWN_T) {\n vx = (vx + prevScroll.vx) / 2;\n vy = (vy + prevScroll.vy) / 2;\n }\n\n var direction = Math.abs(vx / vy);\n\n var canScroll = false;\n if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0))\n canScroll = true;\n if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed))\n canScroll = true;\n\n if (canScroll) {\n prevScroll.allowed = t;\n } else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) {\n var isSlower = Math.abs(vx) <= 1.1 * Math.abs(prevScroll.vx)\n && Math.abs(vy) <= 1.1 * Math.abs(prevScroll.vy);\n if (isSlower) {\n canScroll = true;\n prevScroll.allowed = t;\n }\n else {\n prevScroll.allowed = 0;\n }\n }\n\n prevScroll.t = t;\n prevScroll.vx = vx;\n prevScroll.vy = vy;\n\n if (canScroll) {\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n\n this.onTouchMove = function(ev) {\n this.editor._emit(\"mousewheel\", ev);\n };\n\n}).call(DefaultHandlers.prototype);\n\nexports.DefaultHandlers = DefaultHandlers;\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nfunction calcRangeOrientation(range, cursor) {\n if (range.start.row == range.end.row)\n var cmp = 2 * cursor.column - range.start.column - range.end.column;\n else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)\n var cmp = cursor.column - 4;\n else\n var cmp = 2 * cursor.row - range.start.row - range.end.row;\n\n if (cmp < 0)\n return {cursor: range.start, anchor: range.end};\n else\n return {cursor: range.end, anchor: range.start};\n}\n\n});\n\nace.define(\"ace/tooltip\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nfunction Tooltip (parentNode) {\n this.isOpen = false;\n this.$element = null;\n this.$parentNode = parentNode;\n}\n\n(function() {\n this.$init = function() {\n this.$element = dom.createElement(\"div\");\n this.$element.className = \"ace_tooltip\";\n this.$element.style.display = \"none\";\n this.$parentNode.appendChild(this.$element);\n return this.$element;\n };\n this.getElement = function() {\n return this.$element || this.$init();\n };\n this.setText = function(text) {\n dom.setInnerText(this.getElement(), text);\n };\n this.setHtml = function(html) {\n this.getElement().innerHTML = html;\n };\n this.setPosition = function(x, y) {\n this.getElement().style.left = x + \"px\";\n this.getElement().style.top = y + \"px\";\n };\n this.setClassName = function(className) {\n dom.addCssClass(this.getElement(), className);\n };\n this.show = function(text, x, y) {\n if (text != null)\n this.setText(text);\n if (x != null && y != null)\n this.setPosition(x, y);\n if (!this.isOpen) {\n this.getElement().style.display = \"block\";\n this.isOpen = true;\n }\n };\n\n this.hide = function() {\n if (this.isOpen) {\n this.getElement().style.display = \"none\";\n this.isOpen = false;\n }\n };\n this.getHeight = function() {\n return this.getElement().offsetHeight;\n };\n this.getWidth = function() {\n return this.getElement().offsetWidth;\n };\n\n this.destroy = function() {\n this.isOpen = false;\n if (this.$element && this.$element.parentNode) {\n this.$element.parentNode.removeChild(this.$element);\n }\n };\n\n}).call(Tooltip.prototype);\n\nexports.Tooltip = Tooltip;\n});\n\nace.define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event\",\"ace/tooltip\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar event = acequire(\"../lib/event\");\nvar Tooltip = acequire(\"../tooltip\").Tooltip;\n\nfunction GutterHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var gutter = editor.renderer.$gutterLayer;\n var tooltip = new GutterTooltip(editor.container);\n\n mouseHandler.editor.setDefaultHandler(\"guttermousedown\", function(e) {\n if (!editor.isFocused() || e.getButton() != 0)\n return;\n var gutterRegion = gutter.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\")\n return;\n\n var row = e.getDocumentPosition().row;\n var selection = editor.session.selection;\n\n if (e.getShiftKey())\n selection.selectTo(row, 0);\n else {\n if (e.domEvent.detail == 2) {\n editor.selectAll();\n return e.preventDefault();\n }\n mouseHandler.$clickSelection = editor.selection.getLineRange(row);\n }\n mouseHandler.setState(\"selectByLines\");\n mouseHandler.captureMouse(e);\n return e.preventDefault();\n });\n\n\n var tooltipTimeout, mouseEvent, tooltipAnnotation;\n\n function showTooltip() {\n var row = mouseEvent.getDocumentPosition().row;\n var annotation = gutter.$annotations[row];\n if (!annotation)\n return hideTooltip();\n\n var maxRow = editor.session.getLength();\n if (row == maxRow) {\n var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;\n var pos = mouseEvent.$pos;\n if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))\n return hideTooltip();\n }\n\n if (tooltipAnnotation == annotation)\n return;\n tooltipAnnotation = annotation.text.join(\"
    \");\n\n tooltip.setHtml(tooltipAnnotation);\n tooltip.show();\n editor._signal(\"showGutterTooltip\", tooltip);\n editor.on(\"mousewheel\", hideTooltip);\n\n if (mouseHandler.$tooltipFollowsMouse) {\n moveTooltip(mouseEvent);\n } else {\n var gutterElement = mouseEvent.domEvent.target;\n var rect = gutterElement.getBoundingClientRect();\n var style = tooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n }\n }\n\n function hideTooltip() {\n if (tooltipTimeout)\n tooltipTimeout = clearTimeout(tooltipTimeout);\n if (tooltipAnnotation) {\n tooltip.hide();\n tooltipAnnotation = null;\n editor._signal(\"hideGutterTooltip\", tooltip);\n editor.removeEventListener(\"mousewheel\", hideTooltip);\n }\n }\n\n function moveTooltip(e) {\n tooltip.setPosition(e.x, e.y);\n }\n\n mouseHandler.editor.setDefaultHandler(\"guttermousemove\", function(e) {\n var target = e.domEvent.target || e.domEvent.srcElement;\n if (dom.hasCssClass(target, \"ace_fold-widget\"))\n return hideTooltip();\n\n if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse)\n moveTooltip(e);\n\n mouseEvent = e;\n if (tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n if (mouseEvent && !mouseHandler.isMousePressed)\n showTooltip();\n else\n hideTooltip();\n }, 50);\n });\n\n event.addListener(editor.renderer.$gutter, \"mouseout\", function(e) {\n mouseEvent = null;\n if (!tooltipAnnotation || tooltipTimeout)\n return;\n\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n hideTooltip();\n }, 50);\n });\n \n editor.on(\"changeSession\", hideTooltip);\n}\n\nfunction GutterTooltip(parentNode) {\n Tooltip.call(this, parentNode);\n}\n\noop.inherits(GutterTooltip, Tooltip);\n\n(function(){\n this.setPosition = function(x, y) {\n var windowWidth = window.innerWidth || document.documentElement.clientWidth;\n var windowHeight = window.innerHeight || document.documentElement.clientHeight;\n var width = this.getWidth();\n var height = this.getHeight();\n x += 15;\n y += 15;\n if (x + width > windowWidth) {\n x -= (x + width) - windowWidth;\n }\n if (y + height > windowHeight) {\n y -= 20 + height;\n }\n Tooltip.prototype.setPosition.call(this, x, y);\n };\n\n}).call(GutterTooltip.prototype);\n\n\n\nexports.GutterHandler = GutterHandler;\n\n});\n\nace.define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar MouseEvent = exports.MouseEvent = function(domEvent, editor) {\n this.domEvent = domEvent;\n this.editor = editor;\n \n this.x = this.clientX = domEvent.clientX;\n this.y = this.clientY = domEvent.clientY;\n\n this.$pos = null;\n this.$inSelection = null;\n \n this.propagationStopped = false;\n this.defaultPrevented = false;\n};\n\n(function() { \n \n this.stopPropagation = function() {\n event.stopPropagation(this.domEvent);\n this.propagationStopped = true;\n };\n \n this.preventDefault = function() {\n event.preventDefault(this.domEvent);\n this.defaultPrevented = true;\n };\n \n this.stop = function() {\n this.stopPropagation();\n this.preventDefault();\n };\n this.getDocumentPosition = function() {\n if (this.$pos)\n return this.$pos;\n \n this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);\n return this.$pos;\n };\n this.inSelection = function() {\n if (this.$inSelection !== null)\n return this.$inSelection;\n \n var editor = this.editor;\n \n\n var selectionRange = editor.getSelectionRange();\n if (selectionRange.isEmpty())\n this.$inSelection = false;\n else {\n var pos = this.getDocumentPosition();\n this.$inSelection = selectionRange.contains(pos.row, pos.column);\n }\n\n return this.$inSelection;\n };\n this.getButton = function() {\n return event.getButton(this.domEvent);\n };\n this.getShiftKey = function() {\n return this.domEvent.shiftKey;\n };\n \n this.getAccelKey = useragent.isMac\n ? function() { return this.domEvent.metaKey; }\n : function() { return this.domEvent.ctrlKey; };\n \n}).call(MouseEvent.prototype);\n\n});\n\nace.define(\"ace/mouse/dragdrop_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar AUTOSCROLL_DELAY = 200;\nvar SCROLL_CURSOR_DELAY = 200;\nvar SCROLL_CURSOR_HYSTERESIS = 5;\n\nfunction DragdropHandler(mouseHandler) {\n\n var editor = mouseHandler.editor;\n\n var blankImage = dom.createElement(\"img\");\n blankImage.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (useragent.isOpera)\n blankImage.style.cssText = \"width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;\";\n\n var exports = [\"dragWait\", \"dragWaitEnd\", \"startDrag\", \"dragReadyEnd\", \"onMouseDrag\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n editor.addEventListener(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n\n\n var mouseTarget = editor.container;\n var dragSelectionMarker, x, y;\n var timerId, range;\n var dragCursor, counter = 0;\n var dragOperation;\n var isInternal;\n var autoScrollStartTime;\n var cursorMovedTime;\n var cursorPointOnCaretMoved;\n\n this.onDragStart = function(e) {\n if (this.cancelDrag || !mouseTarget.draggable) {\n var self = this;\n setTimeout(function(){\n self.startSelect();\n self.captureMouse(e);\n }, 0);\n return e.preventDefault();\n }\n range = editor.getSelectionRange();\n\n var dataTransfer = e.dataTransfer;\n dataTransfer.effectAllowed = editor.getReadOnly() ? \"copy\" : \"copyMove\";\n if (useragent.isOpera) {\n editor.container.appendChild(blankImage);\n blankImage.scrollTop = 0;\n }\n dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);\n if (useragent.isOpera) {\n editor.container.removeChild(blankImage);\n }\n dataTransfer.clearData();\n dataTransfer.setData(\"Text\", editor.session.getTextRange());\n\n isInternal = true;\n this.setState(\"drag\");\n };\n\n this.onDragEnd = function(e) {\n mouseTarget.draggable = false;\n isInternal = false;\n this.setState(null);\n if (!editor.getReadOnly()) {\n var dropEffect = e.dataTransfer.dropEffect;\n if (!dragOperation && dropEffect == \"move\")\n editor.session.remove(editor.getSelectionRange());\n editor.renderer.$cursorLayer.setBlinking(true);\n }\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n };\n\n this.onDragEnter = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker)\n addDragMarker();\n counter++;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragOver = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker) {\n addDragMarker();\n counter++;\n }\n if (onMouseMoveTimer !== null)\n onMouseMoveTimer = null;\n\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragLeave = function(e) {\n counter--;\n if (counter <= 0 && dragSelectionMarker) {\n clearDragMarker();\n dragOperation = null;\n return event.preventDefault(e);\n }\n };\n\n this.onDrop = function(e) {\n if (!dragCursor)\n return;\n var dataTransfer = e.dataTransfer;\n if (isInternal) {\n switch (dragOperation) {\n case \"move\":\n if (range.contains(dragCursor.row, dragCursor.column)) {\n range = {\n start: dragCursor,\n end: dragCursor\n };\n } else {\n range = editor.moveText(range, dragCursor);\n }\n break;\n case \"copy\":\n range = editor.moveText(range, dragCursor, true);\n break;\n }\n } else {\n var dropData = dataTransfer.getData('Text');\n range = {\n start: dragCursor,\n end: editor.session.insert(dragCursor, dropData)\n };\n editor.focus();\n dragOperation = null;\n }\n clearDragMarker();\n return event.preventDefault(e);\n };\n\n event.addListener(mouseTarget, \"dragstart\", this.onDragStart.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragend\", this.onDragEnd.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragenter\", this.onDragEnter.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragover\", this.onDragOver.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragleave\", this.onDragLeave.bind(mouseHandler));\n event.addListener(mouseTarget, \"drop\", this.onDrop.bind(mouseHandler));\n\n function scrollCursorIntoView(cursor, prevCursor) {\n var now = Date.now();\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n var hMovement = !prevCursor || cursor.column != prevCursor.column;\n if (!cursorMovedTime || vMovement || hMovement) {\n editor.$blockScrolling += 1;\n editor.moveCursorToPosition(cursor);\n editor.$blockScrolling -= 1;\n cursorMovedTime = now;\n cursorPointOnCaretMoved = {x: x, y: y};\n } else {\n var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);\n if (distance > SCROLL_CURSOR_HYSTERESIS) {\n cursorMovedTime = null;\n } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {\n editor.renderer.scrollCursorIntoView();\n cursorMovedTime = null;\n }\n }\n }\n\n function autoScroll(cursor, prevCursor) {\n var now = Date.now();\n var lineHeight = editor.renderer.layerConfig.lineHeight;\n var characterWidth = editor.renderer.layerConfig.characterWidth;\n var editorRect = editor.renderer.scroller.getBoundingClientRect();\n var offsets = {\n x: {\n left: x - editorRect.left,\n right: editorRect.right - x\n },\n y: {\n top: y - editorRect.top,\n bottom: editorRect.bottom - y\n }\n };\n var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);\n var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);\n var scrollCursor = {row: cursor.row, column: cursor.column};\n if (nearestXOffset / characterWidth <= 2) {\n scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);\n }\n if (nearestYOffset / lineHeight <= 1) {\n scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);\n }\n var vScroll = cursor.row != scrollCursor.row;\n var hScroll = cursor.column != scrollCursor.column;\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n if (vScroll || (hScroll && !vMovement)) {\n if (!autoScrollStartTime)\n autoScrollStartTime = now;\n else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)\n editor.renderer.scrollCursorIntoView(scrollCursor);\n } else {\n autoScrollStartTime = null;\n }\n }\n\n function onDragInterval() {\n var prevCursor = dragCursor;\n dragCursor = editor.renderer.screenToTextCoordinates(x, y);\n scrollCursorIntoView(dragCursor, prevCursor);\n autoScroll(dragCursor, prevCursor);\n }\n\n function addDragMarker() {\n range = editor.selection.toOrientedRange();\n dragSelectionMarker = editor.session.addMarker(range, \"ace_selection\", editor.getSelectionStyle());\n editor.clearSelection();\n if (editor.isFocused())\n editor.renderer.$cursorLayer.setBlinking(false);\n clearInterval(timerId);\n onDragInterval();\n timerId = setInterval(onDragInterval, 20);\n counter = 0;\n event.addListener(document, \"mousemove\", onMouseMove);\n }\n\n function clearDragMarker() {\n clearInterval(timerId);\n editor.session.removeMarker(dragSelectionMarker);\n dragSelectionMarker = null;\n editor.$blockScrolling += 1;\n editor.selection.fromOrientedRange(range);\n editor.$blockScrolling -= 1;\n if (editor.isFocused() && !isInternal)\n editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());\n range = null;\n dragCursor = null;\n counter = 0;\n autoScrollStartTime = null;\n cursorMovedTime = null;\n event.removeListener(document, \"mousemove\", onMouseMove);\n }\n var onMouseMoveTimer = null;\n function onMouseMove() {\n if (onMouseMoveTimer == null) {\n onMouseMoveTimer = setTimeout(function() {\n if (onMouseMoveTimer != null && dragSelectionMarker)\n clearDragMarker();\n }, 20);\n }\n }\n\n function canAccept(dataTransfer) {\n var types = dataTransfer.types;\n return !types || Array.prototype.some.call(types, function(type) {\n return type == 'text/plain' || type == 'Text';\n });\n }\n\n function getDropEffect(e) {\n var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];\n var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];\n\n var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;\n var effectAllowed = \"uninitialized\";\n try {\n effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();\n } catch (e) {}\n var dropEffect = \"none\";\n\n if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n else if (moveAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"move\";\n else if (copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n\n return dropEffect;\n }\n}\n\n(function() {\n\n this.dragWait = function() {\n var interval = Date.now() - this.mousedownEvent.time;\n if (interval > this.editor.getDragDelay())\n this.startDrag();\n };\n\n this.dragWaitEnd = function() {\n var target = this.editor.container;\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n this.selectEnd();\n };\n\n this.dragReadyEnd = function(e) {\n this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n this.dragWaitEnd();\n };\n\n this.startDrag = function(){\n this.cancelDrag = false;\n var editor = this.editor;\n var target = editor.container;\n target.draggable = true;\n editor.renderer.$cursorLayer.setBlinking(false);\n editor.setStyle(\"ace_dragging\");\n var cursorStyle = useragent.isWin ? \"default\" : \"move\";\n editor.renderer.setCursorStyle(cursorStyle);\n this.setState(\"dragReady\");\n };\n\n this.onMouseDrag = function(e) {\n var target = this.editor.container;\n if (useragent.isIE && this.state == \"dragReady\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 3)\n target.dragDrop();\n }\n if (this.state === \"dragWait\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 0) {\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n }\n }\n };\n\n this.onMouseDown = function(e) {\n if (!this.$dragEnabled)\n return;\n this.mousedownEvent = e;\n var editor = this.editor;\n\n var inSelection = e.inSelection();\n var button = e.getButton();\n var clickCount = e.domEvent.detail || 1;\n if (clickCount === 1 && button === 0 && inSelection) {\n if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))\n return;\n this.mousedownEvent.time = Date.now();\n var eventTarget = e.domEvent.target || e.domEvent.srcElement;\n if (\"unselectable\" in eventTarget)\n eventTarget.unselectable = \"on\";\n if (editor.getDragDelay()) {\n if (useragent.isWebKit) {\n this.cancelDrag = true;\n var mouseTarget = editor.container;\n mouseTarget.draggable = true;\n }\n this.setState(\"dragWait\");\n } else {\n this.startDrag();\n }\n this.captureMouse(e, this.onMouseDrag.bind(this));\n e.defaultPrevented = true;\n }\n };\n\n}).call(DragdropHandler.prototype);\n\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nexports.DragdropHandler = DragdropHandler;\n\n});\n\nace.define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"./dom\");\n\nexports.get = function (url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.responseText);\n }\n };\n xhr.send(null);\n};\n\nexports.loadScript = function(path, callback) {\n var head = dom.getDocumentHead();\n var s = document.createElement('script');\n\n s.src = path;\n head.appendChild(s);\n\n s.onload = s.onreadystatechange = function(_, isAbort) {\n if (isAbort || !s.readyState || s.readyState == \"loaded\" || s.readyState == \"complete\") {\n s = s.onload = s.onreadystatechange = null;\n if (!isAbort)\n callback();\n }\n };\n};\nexports.qualifyURL = function(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n};\n\n});\n\nace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar EventEmitter = {};\nvar stopPropagation = function() { this.propagationStopped = true; };\nvar preventDefault = function() { this.defaultPrevented = true; };\n\nEventEmitter._emit =\nEventEmitter._dispatchEvent = function(eventName, e) {\n this._eventRegistry || (this._eventRegistry = {});\n this._defaultHandlers || (this._defaultHandlers = {});\n\n var listeners = this._eventRegistry[eventName] || [];\n var defaultHandler = this._defaultHandlers[eventName];\n if (!listeners.length && !defaultHandler)\n return;\n\n if (typeof e != \"object\" || !e)\n e = {};\n\n if (!e.type)\n e.type = eventName;\n if (!e.stopPropagation)\n e.stopPropagation = stopPropagation;\n if (!e.preventDefault)\n e.preventDefault = preventDefault;\n\n listeners = listeners.slice();\n for (var i=0; i 1)\n base = parts[parts.length - 2];\n var path = options[component + \"Path\"];\n if (path == null) {\n path = options.basePath;\n } else if (sep == \"/\") {\n component = sep = \"\";\n }\n if (path && path.slice(-1) != \"/\")\n path += \"/\";\n return path + component + sep + base + this.get(\"suffix\");\n};\n\nexports.setModuleUrl = function(name, subst) {\n return options.$moduleUrls[name] = subst;\n};\n\nexports.$loading = {};\nexports.loadModule = function(moduleName, onLoad) {\n var module, moduleType;\n if (Array.isArray(moduleName)) {\n moduleType = moduleName[0];\n moduleName = moduleName[1];\n }\n\n try {\n module = acequire(moduleName);\n } catch (e) {}\n if (module && !exports.$loading[moduleName])\n return onLoad && onLoad(module);\n\n if (!exports.$loading[moduleName])\n exports.$loading[moduleName] = [];\n\n exports.$loading[moduleName].push(onLoad);\n\n if (exports.$loading[moduleName].length > 1)\n return;\n\n var afterLoad = function() {\n acequire([moduleName], function(module) {\n exports._emit(\"load.module\", {name: moduleName, module: module});\n var listeners = exports.$loading[moduleName];\n exports.$loading[moduleName] = null;\n listeners.forEach(function(onLoad) {\n onLoad && onLoad(module);\n });\n });\n };\n\n if (!exports.get(\"packaged\"))\n return afterLoad();\n net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);\n};\ninit(true);function init(packaged) {\n\n if (!global || !global.document)\n return;\n \n options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__(/*! !webpack amd define */ \"../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/amd-define.js\").packaged);\n\n var scriptOptions = {};\n var scriptUrl = \"\";\n var currentScript = (document.currentScript || document._currentScript ); // native or polyfill\n var currentDocument = currentScript && currentScript.ownerDocument || document;\n \n var scripts = currentDocument.getElementsByTagName(\"script\");\n for (var i=0; i 0){\n\t\t\tif (action == 0x10){\n\t\t\t\tfor(i = condPos; i < ix; i++){\n\t\t\t\t\tlevels[i] = 1;\n\t\t\t\t}\n\t\t\t\tcondPos = -1;\n\t\t\t} else {\n\t\t\t\tcondPos = -1;\n\t\t\t}\n\t\t}\n\t\tcond = impTab[newState][6];\n\t\tif (cond){\n\t\t\tif(condPos == -1){\n\t\t\t\tcondPos = ix;\n\t\t\t}\n\t\t}else{\n\t\t\tif (condPos > -1){\n\t\t\t\tfor(i = condPos; i < ix; i++){\n\t\t\t\t\tlevels[i] = newLevel;\n\t\t\t\t}\n\t\t\t\tcondPos = -1;\n\t\t\t}\n\t\t}\n\t\tif (charTypes[ix] == B){\n\t\t\tlevels[ix] = 0;\n\t\t}\n\t\thiLevel |= newLevel;\n\t}\n\tif (hasUBAT_S){\n\t\tfor(i = 0; i < len; i++){\n\t\t\tif(charTypes[i] == S){\n\t\t\t\tlevels[i] = dir;\n\t\t\t\tfor(var j = i - 1; j >= 0; j--){\n\t\t\t\t\tif(charTypes[j] == WS){\n\t\t\t\t\t\tlevels[j] = dir;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction _invertLevel(lev, levels, _array) {\n\tif (hiLevel < lev){\n\t\treturn;\n\t}\n\tif (lev == 1 && dir == RTL && !hasUBAT_B){\n\t\t_array.reverse();\n\t\treturn;\n\t}\n\tvar len = _array.length, start = 0, end, lo, hi, tmp;\n\twhile(start < len){\n\t\tif (levels[start] >= lev){\n\t\t\tend = start + 1;\n\t\twhile(end < len && levels[end] >= lev){\n\t\t\tend++;\n\t\t}\n\t\tfor(lo = start, hi = end - 1 ; lo < hi; lo++, hi--){\n\t\t\ttmp = _array[lo];\n\t\t\t_array[lo] = _array[hi];\n\t\t\t_array[hi] = tmp;\n\t\t}\n\t\tstart = end;\n\t}\n\tstart++;\n\t}\n}\n\nfunction _getCharClass(chars, types, classes, ix) {\n\tvar cType = types[ix], wType, nType, len, i;\n\tswitch(cType){\n\t\tcase L:\n\t\tcase R:\n\t\t\tlastArabic = false;\n\t\tcase ON:\n\t\tcase AN:\n\t\t\treturn cType;\n\t\tcase EN:\n\t\t\treturn lastArabic ? AN : EN;\n\t\tcase AL:\n\t\t\tlastArabic = true;\n\t\t\thasUBAT_AL = true;\n\t\t\treturn R;\n\t\tcase WS:\n\t\t\treturn ON;\n\t\tcase CS:\n\t\t\tif (ix < 1 || (ix + 1) >= types.length ||\n\t\t\t\t((wType = classes[ix - 1]) != EN && wType != AN) ||\n\t\t\t\t((nType = types[ix + 1]) != EN && nType != AN)){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\tif (lastArabic){nType = AN;}\n\t\t\treturn nType == wType ? nType : ON;\n\t\tcase ES:\n\t\t\twType = ix > 0 ? classes[ix - 1] : B;\n\t\t\tif (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\treturn ON;\n\t\tcase ET:\n\t\t\tif (ix > 0 && classes[ix - 1] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\tif (lastArabic){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\ti = ix + 1;\n\t\t\tlen = types.length;\n\t\t\twhile (i < len && types[i] == ET){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i < len && types[i] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\treturn ON;\n\t\tcase NSM:\n\t\t\tlen = types.length;\n\t\t\ti = ix + 1;\n\t\t\twhile (i < len && types[i] == NSM){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i < len){\n\t\t\t\tvar c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E;\n\n\t\t\t\twType = types[i];\n\t\t\t\tif (rtlCandidate && (wType == R || wType == AL)){\n\t\t\t\t\treturn R;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ix < 1 || (wType = types[ix - 1]) == B){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\treturn classes[ix - 1];\n\t\tcase B:\n\t\t\tlastArabic = false;\n\t\t\thasUBAT_B = true;\n\t\t\treturn dir;\n\t\tcase S:\n\t\t\thasUBAT_S = true;\n\t\t\treturn ON;\n\t\tcase LRE:\n\t\tcase RLE:\n\t\tcase LRO:\n\t\tcase RLO:\n\t\tcase PDF:\n\t\t\tlastArabic = false;\n\t\tcase BN:\n\t\t\treturn ON;\n\t}\n}\n\nfunction _getCharacterType( ch ) {\n\tvar uc = ch.charCodeAt(0), hi = uc >> 8;\n\n\tif (hi == 0) {\n\t\treturn ((uc > 0x00BF) ? L : UnicodeTBL00[uc]);\n\t} else if (hi == 5) {\n\t\treturn (/[\\u0591-\\u05f4]/.test(ch) ? R : L);\n\t} else if (hi == 6) {\n\t\tif (/[\\u0610-\\u061a\\u064b-\\u065f\\u06d6-\\u06e4\\u06e7-\\u06ed]/.test(ch))\n\t\t\treturn NSM;\n\t\telse if (/[\\u0660-\\u0669\\u066b-\\u066c]/.test(ch))\n\t\t\treturn AN;\n\t\telse if (uc == 0x066A)\n\t\t\treturn ET;\n\t\telse if (/[\\u06f0-\\u06f9]/.test(ch))\n\t\t\treturn EN;\n\t\telse\n\t\t\treturn AL;\n\t} else if (hi == 0x20 && uc <= 0x205F) {\n\t\treturn UnicodeTBL20[uc & 0xFF];\n\t} else if (hi == 0xFE) {\n\t\treturn (uc >= 0xFE70 ? AL : ON);\n\t}\n\treturn ON;\n}\n\nfunction _isArabicDiacritics( ch ) {\n\treturn (ch >= '\\u064b' && ch <= '\\u0655');\n}\nexports.L = L;\nexports.R = R;\nexports.EN = EN;\nexports.ON_R = 3;\nexports.AN = 4;\nexports.R_H = 5;\nexports.B = 6;\n\nexports.DOT = \"\\xB7\";\nexports.doBidiReorder = function(text, textCharTypes, isRtl) {\n\tif (text.length < 2)\n\t\treturn {};\n\n\tvar chars = text.split(\"\"), logicalFromVisual = new Array(chars.length),\n\t\tbidiLevels = new Array(chars.length), levels = [];\n\n\tdir = isRtl ? RTL : LTR;\n\n\t_computeLevels(chars, levels, chars.length, textCharTypes);\n\n\tfor (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++);\n\n\t_invertLevel(2, levels, logicalFromVisual);\n\t_invertLevel(1, levels, logicalFromVisual);\n\n\tfor (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width\n\t\tif (textCharTypes[i] === AN) {\n\t\t\tlevels[i] = exports.AN;\n\t\t} else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE)\n\t\t\t|| textCharTypes[i] === ON || textCharTypes[i] === BN)) {\n\t\t\tlevels[i] = exports.ON_R;\n\t\t} else if ((i > 0 && chars[i - 1] === '\\u0644') && /\\u0622|\\u0623|\\u0625|\\u0627/.test(chars[i])) {\n\t\t\tlevels[i - 1] = levels[i] = exports.R_H;\n\t\t\ti++;\n\t\t}\n\t}\n\tif (chars[chars.length - 1] === exports.DOT)\n\t\tlevels[chars.length - 1] = exports.B;\n\n\tfor (var i = 0; i < logicalFromVisual.length; i++) {\n\t\tbidiLevels[i] = levels[logicalFromVisual[i]];\n\t}\n\n\treturn {'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels};\n};\nexports.hasBidiCharacters = function(text, textCharTypes){\n\tvar ret = false;\n\tfor (var i = 0; i < text.length; i++){\n\t\ttextCharTypes[i] = _getCharacterType(text.charAt(i));\n\t\tif (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL))\n\t\t\tret = true;\n\t}\n\treturn ret;\n};\nexports.getVisualFromLogicalIdx = function(logIdx, rowMap) {\n\tfor (var i = 0; i < rowMap.logicalFromVisual.length; i++) {\n\t\tif (rowMap.logicalFromVisual[i] == logIdx)\n\t\t\treturn i;\n\t}\n\treturn 0;\n};\n\n});\n\nace.define(\"ace/bidihandler\",[\"require\",\"exports\",\"module\",\"ace/lib/bidiutil\",\"ace/lib/lang\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar bidiUtil = acequire(\"./lib/bidiutil\");\nvar lang = acequire(\"./lib/lang\");\nvar useragent = acequire(\"./lib/useragent\");\nvar bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\nvar BidiHandler = function(session) {\n this.session = session;\n this.bidiMap = {};\n this.currentRow = null;\n this.bidiUtil = bidiUtil;\n this.charWidths = [];\n this.EOL = \"\\xAC\";\n this.showInvisibles = true;\n this.isRtlDir = false;\n this.line = \"\";\n this.wrapIndent = 0;\n this.isLastRow = false;\n this.EOF = \"\\xB6\";\n this.seenBidi = false;\n};\n\n(function() {\n this.isBidiRow = function(screenRow, docRow, splitIndex) {\n if (!this.seenBidi)\n return false;\n if (screenRow !== this.currentRow) {\n this.currentRow = screenRow;\n this.updateRowLine(docRow, splitIndex);\n this.updateBidiMap();\n }\n return this.bidiMap.bidiLevels;\n };\n\n this.onChange = function(delta) {\n if (!this.seenBidi) {\n if (delta.action == \"insert\" && bidiRE.test(delta.lines.join(\"\\n\"))) {\n this.seenBidi = true;\n this.currentRow = null;\n }\n }\n else {\n this.currentRow = null;\n }\n };\n\n this.getDocumentRow = function() {\n var docRow = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var index = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n if (index >= 0)\n docRow = this.session.$docRowCache[index];\n }\n\n return docRow;\n };\n\n this.getSplitIndex = function() {\n var splitIndex = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n while (this.currentRow - splitIndex > 0) {\n currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1);\n if (currentIndex !== prevIndex)\n break;\n\n prevIndex = currentIndex;\n splitIndex++;\n }\n }\n\n return splitIndex;\n };\n\n this.updateRowLine = function(docRow, splitIndex) {\n if (docRow === undefined)\n docRow = this.getDocumentRow();\n\n this.wrapIndent = 0;\n this.isLastRow = (docRow === this.session.getLength() - 1);\n this.line = this.session.getLine(docRow);\n if (this.session.$useWrapMode) {\n var splits = this.session.$wrapData[docRow];\n if (splits) {\n if (splitIndex === undefined)\n splitIndex = this.getSplitIndex();\n\n if(splitIndex > 0 && splits.length) {\n this.wrapIndent = splits.indent;\n this.line = (splitIndex < splits.length) ?\n this.line.substring(splits[splitIndex - 1], splits[splits.length - 1]) :\n this.line.substring(splits[splits.length - 1]);\n } else {\n this.line = this.line.substring(0, splits[splitIndex]);\n }\n }\n }\n var session = this.session, shift = 0, size;\n this.line = this.line.replace(/\\t|[\\u1100-\\u2029, \\u202F-\\uFFE6]/g, function(ch, i){\n if (ch === '\\t' || session.isFullWidth(ch.charCodeAt(0))) {\n size = (ch === '\\t') ? session.getScreenTabSize(i + shift) : 2;\n shift += size - 1;\n return lang.stringRepeat(bidiUtil.DOT, size);\n }\n return ch;\n });\n };\n\n this.updateBidiMap = function() {\n var textCharTypes = [], endOfLine = this.isLastRow ? this.EOF : this.EOL;\n var line = this.line + (this.showInvisibles ? endOfLine : bidiUtil.DOT);\n if (bidiUtil.hasBidiCharacters(line, textCharTypes)) {\n this.bidiMap = bidiUtil.doBidiReorder(line, textCharTypes, this.isRtlDir);\n } else {\n this.bidiMap = {};\n }\n };\n this.markAsDirty = function() {\n this.currentRow = null;\n };\n this.updateCharacterWidths = function(fontMetrics) {\n if (!this.seenBidi)\n return;\n if (this.characterWidth === fontMetrics.$characterSize.width)\n return;\n\n var characterWidth = this.characterWidth = fontMetrics.$characterSize.width;\n var bidiCharWidth = fontMetrics.$measureCharWidth(\"\\u05d4\");\n\n this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth;\n this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth;\n this.charWidths[bidiUtil.R_H] = useragent.isChrome ? bidiCharWidth : bidiCharWidth * 0.45;\n this.charWidths[bidiUtil.B] = 0;\n\n this.currentRow = null;\n };\n\n this.getShowInvisibles = function() {\n return this.showInvisibles;\n };\n\n this.setShowInvisibles = function(showInvisibles) {\n this.showInvisibles = showInvisibles;\n this.currentRow = null;\n };\n\n this.setEolChar = function(eolChar) {\n this.EOL = eolChar;\n };\n\n this.setTextDir = function(isRtlDir) {\n this.isRtlDir = isRtlDir;\n };\n this.getPosLeft = function(col) {\n col -= this.wrapIndent;\n var visualIdx = bidiUtil.getVisualFromLogicalIdx(col > 0 ? col - 1 : 0, this.bidiMap),\n levels = this.bidiMap.bidiLevels, left = 0;\n\n if (col === 0 && levels[visualIdx] % 2 !== 0)\n visualIdx++;\n\n for (var i = 0; i < visualIdx; i++) {\n left += this.charWidths[levels[i]];\n }\n\n if (col !== 0 && levels[visualIdx] % 2 === 0)\n left += this.charWidths[levels[visualIdx]];\n\n if (this.wrapIndent)\n left += this.wrapIndent * this.charWidths[bidiUtil.L];\n\n return left;\n };\n this.getSelections = function(startCol, endCol) {\n var map = this.bidiMap, levels = map.bidiLevels, level, offset = this.wrapIndent * this.charWidths[bidiUtil.L], selections = [],\n selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent,\n isSelected = false, isSelectedPrev = false, selectionStart = 0;\n\n for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {\n logIdx = map.logicalFromVisual[visIdx];\n level = levels[visIdx];\n isSelected = (logIdx >= selColMin) && (logIdx < selColMax);\n if (isSelected && !isSelectedPrev) {\n selectionStart = offset;\n } else if (!isSelected && isSelectedPrev) {\n selections.push({left: selectionStart, width: offset - selectionStart});\n }\n offset += this.charWidths[level];\n isSelectedPrev = isSelected;\n }\n\n if (isSelected && (visIdx === levels.length)) {\n selections.push({left: selectionStart, width: offset - selectionStart});\n }\n\n return selections;\n };\n this.offsetToCol = function(posX) {\n var logicalIdx = 0, posX = Math.max(posX, 0),\n offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels,\n charWidth = this.charWidths[levels[visualIdx]];\n\n if (this.wrapIndent) {\n posX -= this.wrapIndent * this.charWidths[bidiUtil.L];\n }\n\n while(posX > offset + charWidth/2) {\n offset += charWidth;\n if(visualIdx === levels.length - 1) {\n charWidth = 0;\n break;\n }\n charWidth = this.charWidths[levels[++visualIdx]];\n }\n\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)){\n if(posX < offset)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n\n } else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)){\n logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx]\n : this.bidiMap.logicalFromVisual[visualIdx - 1]);\n\n } else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0))\n || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))){\n logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];\n } else {\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n\n return (logicalIdx + this.wrapIndent);\n };\n\n}).call(BidiHandler.prototype);\n\nexports.BidiHandler = BidiHandler;\n});\n\nace.define(\"ace/range\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\nvar Range = function(startRow, startColumn, endRow, endColumn) {\n this.start = {\n row: startRow,\n column: startColumn\n };\n\n this.end = {\n row: endRow,\n column: endColumn\n };\n};\n\n(function() {\n this.isEqual = function(range) {\n return this.start.row === range.start.row &&\n this.end.row === range.end.row &&\n this.start.column === range.start.column &&\n this.end.column === range.end.column;\n };\n this.toString = function() {\n return (\"Range: [\" + this.start.row + \"/\" + this.start.column +\n \"] -> [\" + this.end.row + \"/\" + this.end.column + \"]\");\n };\n\n this.contains = function(row, column) {\n return this.compare(row, column) == 0;\n };\n this.compareRange = function(range) {\n var cmp,\n end = range.end,\n start = range.start;\n\n cmp = this.compare(end.row, end.column);\n if (cmp == 1) {\n cmp = this.compare(start.row, start.column);\n if (cmp == 1) {\n return 2;\n } else if (cmp == 0) {\n return 1;\n } else {\n return 0;\n }\n } else if (cmp == -1) {\n return -2;\n } else {\n cmp = this.compare(start.row, start.column);\n if (cmp == -1) {\n return -1;\n } else if (cmp == 1) {\n return 42;\n } else {\n return 0;\n }\n }\n };\n this.comparePoint = function(p) {\n return this.compare(p.row, p.column);\n };\n this.containsRange = function(range) {\n return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;\n };\n this.intersects = function(range) {\n var cmp = this.compareRange(range);\n return (cmp == -1 || cmp == 0 || cmp == 1);\n };\n this.isEnd = function(row, column) {\n return this.end.row == row && this.end.column == column;\n };\n this.isStart = function(row, column) {\n return this.start.row == row && this.start.column == column;\n };\n this.setStart = function(row, column) {\n if (typeof row == \"object\") {\n this.start.column = row.column;\n this.start.row = row.row;\n } else {\n this.start.row = row;\n this.start.column = column;\n }\n };\n this.setEnd = function(row, column) {\n if (typeof row == \"object\") {\n this.end.column = row.column;\n this.end.row = row.row;\n } else {\n this.end.row = row;\n this.end.column = column;\n }\n };\n this.inside = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column) || this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideStart = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideEnd = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.compare = function(row, column) {\n if (!this.isMultiLine()) {\n if (row === this.start.row) {\n return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);\n }\n }\n\n if (row < this.start.row)\n return -1;\n\n if (row > this.end.row)\n return 1;\n\n if (this.start.row === row)\n return column >= this.start.column ? 0 : -1;\n\n if (this.end.row === row)\n return column <= this.end.column ? 0 : 1;\n\n return 0;\n };\n this.compareStart = function(row, column) {\n if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareEnd = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareInside = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.clipRows = function(firstRow, lastRow) {\n if (this.end.row > lastRow)\n var end = {row: lastRow + 1, column: 0};\n else if (this.end.row < firstRow)\n var end = {row: firstRow, column: 0};\n\n if (this.start.row > lastRow)\n var start = {row: lastRow + 1, column: 0};\n else if (this.start.row < firstRow)\n var start = {row: firstRow, column: 0};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n this.extend = function(row, column) {\n var cmp = this.compare(row, column);\n\n if (cmp == 0)\n return this;\n else if (cmp == -1)\n var start = {row: row, column: column};\n else\n var end = {row: row, column: column};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n\n this.isEmpty = function() {\n return (this.start.row === this.end.row && this.start.column === this.end.column);\n };\n this.isMultiLine = function() {\n return (this.start.row !== this.end.row);\n };\n this.clone = function() {\n return Range.fromPoints(this.start, this.end);\n };\n this.collapseRows = function() {\n if (this.end.column == 0)\n return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);\n else\n return new Range(this.start.row, 0, this.end.row, 0);\n };\n this.toScreenRange = function(session) {\n var screenPosStart = session.documentToScreenPosition(this.start);\n var screenPosEnd = session.documentToScreenPosition(this.end);\n\n return new Range(\n screenPosStart.row, screenPosStart.column,\n screenPosEnd.row, screenPosEnd.column\n );\n };\n this.moveBy = function(row, column) {\n this.start.row += row;\n this.start.column += column;\n this.end.row += row;\n this.end.column += column;\n };\n\n}).call(Range.prototype);\nRange.fromPoints = function(start, end) {\n return new Range(start.row, start.column, end.row, end.column);\n};\nRange.comparePoints = comparePoints;\n\nRange.comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\n\n\nexports.Range = Range;\n});\n\nace.define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Selection = function(session) {\n this.session = session;\n this.doc = session.getDocument();\n\n this.clearSelection();\n this.lead = this.selectionLead = this.doc.createAnchor(0, 0);\n this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);\n\n var self = this;\n this.lead.on(\"change\", function(e) {\n self._emit(\"changeCursor\");\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)\n self.$desiredColumn = null;\n });\n\n this.selectionAnchor.on(\"change\", function() {\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n });\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.isEmpty = function() {\n return (this.$isEmpty || (\n this.anchor.row == this.lead.row &&\n this.anchor.column == this.lead.column\n ));\n };\n this.isMultiLine = function() {\n if (this.isEmpty()) {\n return false;\n }\n\n return this.getRange().isMultiLine();\n };\n this.getCursor = function() {\n return this.lead.getPosition();\n };\n this.setSelectionAnchor = function(row, column) {\n this.anchor.setPosition(row, column);\n\n if (this.$isEmpty) {\n this.$isEmpty = false;\n this._emit(\"changeSelection\");\n }\n };\n this.getSelectionAnchor = function() {\n if (this.$isEmpty)\n return this.getSelectionLead();\n else\n return this.anchor.getPosition();\n };\n this.getSelectionLead = function() {\n return this.lead.getPosition();\n };\n this.shiftSelection = function(columns) {\n if (this.$isEmpty) {\n this.moveCursorTo(this.lead.row, this.lead.column + columns);\n return;\n }\n\n var anchor = this.getSelectionAnchor();\n var lead = this.getSelectionLead();\n\n var isBackwards = this.isBackwards();\n\n if (!isBackwards || anchor.column !== 0)\n this.setSelectionAnchor(anchor.row, anchor.column + columns);\n\n if (isBackwards || lead.column !== 0) {\n this.$moveSelection(function() {\n this.moveCursorTo(lead.row, lead.column + columns);\n });\n }\n };\n this.isBackwards = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));\n };\n this.getRange = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n\n if (this.isEmpty())\n return Range.fromPoints(lead, lead);\n\n if (this.isBackwards()) {\n return Range.fromPoints(lead, anchor);\n }\n else {\n return Range.fromPoints(anchor, lead);\n }\n };\n this.clearSelection = function() {\n if (!this.$isEmpty) {\n this.$isEmpty = true;\n this._emit(\"changeSelection\");\n }\n };\n this.selectAll = function() {\n var lastRow = this.doc.getLength() - 1;\n this.setSelectionAnchor(0, 0);\n this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length);\n };\n this.setRange =\n this.setSelectionRange = function(range, reverse) {\n if (reverse) {\n this.setSelectionAnchor(range.end.row, range.end.column);\n this.selectTo(range.start.row, range.start.column);\n } else {\n this.setSelectionAnchor(range.start.row, range.start.column);\n this.selectTo(range.end.row, range.end.column);\n }\n if (this.getRange().isEmpty())\n this.$isEmpty = true;\n this.$desiredColumn = null;\n };\n\n this.$moveSelection = function(mover) {\n var lead = this.lead;\n if (this.$isEmpty)\n this.setSelectionAnchor(lead.row, lead.column);\n\n mover.call(this);\n };\n this.selectTo = function(row, column) {\n this.$moveSelection(function() {\n this.moveCursorTo(row, column);\n });\n };\n this.selectToPosition = function(pos) {\n this.$moveSelection(function() {\n this.moveCursorToPosition(pos);\n });\n };\n this.moveTo = function(row, column) {\n this.clearSelection();\n this.moveCursorTo(row, column);\n };\n this.moveToPosition = function(pos) {\n this.clearSelection();\n this.moveCursorToPosition(pos);\n };\n this.selectUp = function() {\n this.$moveSelection(this.moveCursorUp);\n };\n this.selectDown = function() {\n this.$moveSelection(this.moveCursorDown);\n };\n this.selectRight = function() {\n this.$moveSelection(this.moveCursorRight);\n };\n this.selectLeft = function() {\n this.$moveSelection(this.moveCursorLeft);\n };\n this.selectLineStart = function() {\n this.$moveSelection(this.moveCursorLineStart);\n };\n this.selectLineEnd = function() {\n this.$moveSelection(this.moveCursorLineEnd);\n };\n this.selectFileEnd = function() {\n this.$moveSelection(this.moveCursorFileEnd);\n };\n this.selectFileStart = function() {\n this.$moveSelection(this.moveCursorFileStart);\n };\n this.selectWordRight = function() {\n this.$moveSelection(this.moveCursorWordRight);\n };\n this.selectWordLeft = function() {\n this.$moveSelection(this.moveCursorWordLeft);\n };\n this.getWordRange = function(row, column) {\n if (typeof column == \"undefined\") {\n var cursor = row || this.lead;\n row = cursor.row;\n column = cursor.column;\n }\n return this.session.getWordRange(row, column);\n };\n this.selectWord = function() {\n this.setSelectionRange(this.getWordRange());\n };\n this.selectAWord = function() {\n var cursor = this.getCursor();\n var range = this.session.getAWordRange(cursor.row, cursor.column);\n this.setSelectionRange(range);\n };\n\n this.getLineRange = function(row, excludeLastChar) {\n var rowStart = typeof row == \"number\" ? row : this.lead.row;\n var rowEnd;\n\n var foldLine = this.session.getFoldLine(rowStart);\n if (foldLine) {\n rowStart = foldLine.start.row;\n rowEnd = foldLine.end.row;\n } else {\n rowEnd = rowStart;\n }\n if (excludeLastChar === true)\n return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);\n else\n return new Range(rowStart, 0, rowEnd + 1, 0);\n };\n this.selectLine = function() {\n this.setSelectionRange(this.getLineRange());\n };\n this.moveCursorUp = function() {\n this.moveCursorBy(-1, 0);\n };\n this.moveCursorDown = function() {\n this.moveCursorBy(1, 0);\n };\n this.wouldMoveIntoSoftTab = function(cursor, tabSize, direction) {\n var start = cursor.column;\n var end = cursor.column + tabSize;\n\n if (direction < 0) {\n start = cursor.column - tabSize;\n end = cursor.column;\n }\n return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(\" \").length-1 == tabSize;\n };\n this.moveCursorLeft = function() {\n var cursor = this.lead.getPosition(),\n fold;\n\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n } else if (cursor.column === 0) {\n if (cursor.row > 0) {\n this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, -tabSize);\n } else {\n this.moveCursorBy(0, -1);\n }\n }\n };\n this.moveCursorRight = function() {\n var cursor = this.lead.getPosition(),\n fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n }\n else if (this.lead.column == this.doc.getLine(this.lead.row).length) {\n if (this.lead.row < this.doc.getLength() - 1) {\n this.moveCursorTo(this.lead.row + 1, 0);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n var cursor = this.lead;\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, tabSize);\n } else {\n this.moveCursorBy(0, 1);\n }\n }\n };\n this.moveCursorLineStart = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var screenRow = this.session.documentToScreenRow(row, column);\n var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);\n var beforeCursor = this.session.getDisplayLine(\n row, null, firstColumnPosition.row,\n firstColumnPosition.column\n );\n\n var leadingSpace = beforeCursor.match(/^\\s*/);\n if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)\n firstColumnPosition.column += leadingSpace[0].length;\n this.moveCursorToPosition(firstColumnPosition);\n };\n this.moveCursorLineEnd = function() {\n var lead = this.lead;\n var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);\n if (this.lead.column == lineEnd.column) {\n var line = this.session.getLine(lineEnd.row);\n if (lineEnd.column == line.length) {\n var textEnd = line.search(/\\s+$/);\n if (textEnd > 0)\n lineEnd.column = textEnd;\n }\n }\n\n this.moveCursorTo(lineEnd.row, lineEnd.column);\n };\n this.moveCursorFileEnd = function() {\n var row = this.doc.getLength() - 1;\n var column = this.doc.getLine(row).length;\n this.moveCursorTo(row, column);\n };\n this.moveCursorFileStart = function() {\n this.moveCursorTo(0, 0);\n };\n this.moveCursorLongWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n return;\n }\n if (match = this.session.nonTokenRe.exec(rightOfCursor)) {\n column += this.session.nonTokenRe.lastIndex;\n this.session.nonTokenRe.lastIndex = 0;\n rightOfCursor = line.substring(column);\n }\n if (column >= line.length) {\n this.moveCursorTo(row, line.length);\n this.moveCursorRight();\n if (row < this.doc.getLength() - 1)\n this.moveCursorWordRight();\n return;\n }\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n column += this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n this.moveCursorLongWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n return;\n }\n\n var str = this.session.getFoldStringAt(row, column, -1);\n if (str == null) {\n str = this.doc.getLine(row).substring(0, column);\n }\n\n var leftOfCursor = lang.stringReverse(str);\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n if (match = this.session.nonTokenRe.exec(leftOfCursor)) {\n column -= this.session.nonTokenRe.lastIndex;\n leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);\n this.session.nonTokenRe.lastIndex = 0;\n }\n if (column <= 0) {\n this.moveCursorTo(row, 0);\n this.moveCursorLeft();\n if (row > 0)\n this.moveCursorWordLeft();\n return;\n }\n if (match = this.session.tokenRe.exec(leftOfCursor)) {\n column -= this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n\n this.$shortWordEndIndex = function(rightOfCursor) {\n var match, index = 0, ch;\n var whitespaceRe = /\\s/;\n var tokenRe = this.session.tokenRe;\n\n tokenRe.lastIndex = 0;\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n index = this.session.tokenRe.lastIndex;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n\n if (index < 1) {\n tokenRe.lastIndex = 0;\n while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {\n tokenRe.lastIndex = 0;\n index ++;\n if (whitespaceRe.test(ch)) {\n if (index > 2) {\n index--;\n break;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n if (index > 2)\n break;\n }\n }\n }\n }\n }\n tokenRe.lastIndex = 0;\n\n return index;\n };\n\n this.moveCursorShortWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold)\n return this.moveCursorTo(fold.end.row, fold.end.column);\n\n if (column == line.length) {\n var l = this.doc.getLength();\n do {\n row++;\n rightOfCursor = this.doc.getLine(row);\n } while (row < l && /^\\s*$/.test(rightOfCursor));\n\n if (!/^\\s+/.test(rightOfCursor))\n rightOfCursor = \"\";\n column = 0;\n }\n\n var index = this.$shortWordEndIndex(rightOfCursor);\n\n this.moveCursorTo(row, column + index);\n };\n\n this.moveCursorShortWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1))\n return this.moveCursorTo(fold.start.row, fold.start.column);\n\n var line = this.session.getLine(row).substring(0, column);\n if (column === 0) {\n do {\n row--;\n line = this.doc.getLine(row);\n } while (row > 0 && /^\\s*$/.test(line));\n\n column = line.length;\n if (!/\\s+$/.test(line))\n line = \"\";\n }\n\n var leftOfCursor = lang.stringReverse(line);\n var index = this.$shortWordEndIndex(leftOfCursor);\n\n return this.moveCursorTo(row, column - index);\n };\n\n this.moveCursorWordRight = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordRight();\n else\n this.moveCursorShortWordRight();\n };\n\n this.moveCursorWordLeft = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordLeft();\n else\n this.moveCursorShortWordLeft();\n };\n this.moveCursorBy = function(rows, chars) {\n var screenPos = this.session.documentToScreenPosition(\n this.lead.row,\n this.lead.column\n );\n\n var offsetX;\n\n if (chars === 0) {\n if (rows !== 0) {\n if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) {\n offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column);\n screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]);\n } else {\n offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];\n }\n }\n\n if (this.$desiredColumn)\n screenPos.column = this.$desiredColumn;\n else\n this.$desiredColumn = screenPos.column;\n }\n\n var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX);\n \n if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {\n if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {\n if (docPos.row > 0 || rows > 0)\n docPos.row++;\n }\n }\n this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);\n };\n this.moveCursorToPosition = function(position) {\n this.moveCursorTo(position.row, position.column);\n };\n this.moveCursorTo = function(row, column, keepDesiredColumn) {\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n row = fold.start.row;\n column = fold.start.column;\n }\n\n this.$keepDesiredColumnOnChange = true;\n var line = this.session.getLine(row);\n if (/[\\uDC00-\\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) {\n if (this.lead.row == row && this.lead.column == column + 1)\n column = column - 1;\n else\n column = column + 1;\n }\n this.lead.setPosition(row, column);\n this.$keepDesiredColumnOnChange = false;\n\n if (!keepDesiredColumn)\n this.$desiredColumn = null;\n };\n this.moveCursorToScreen = function(row, column, keepDesiredColumn) {\n var pos = this.session.screenToDocumentPosition(row, column);\n this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);\n };\n this.detach = function() {\n this.lead.detach();\n this.anchor.detach();\n this.session = this.doc = null;\n };\n\n this.fromOrientedRange = function(range) {\n this.setSelectionRange(range, range.cursor == range.start);\n this.$desiredColumn = range.desiredColumn || this.$desiredColumn;\n };\n\n this.toOrientedRange = function(range) {\n var r = this.getRange();\n if (range) {\n range.start.column = r.start.column;\n range.start.row = r.start.row;\n range.end.column = r.end.column;\n range.end.row = r.end.row;\n } else {\n range = r;\n }\n\n range.cursor = this.isBackwards() ? range.start : range.end;\n range.desiredColumn = this.$desiredColumn;\n return range;\n };\n this.getRangeOfMovements = function(func) {\n var start = this.getCursor();\n try {\n func(this);\n var end = this.getCursor();\n return Range.fromPoints(start,end);\n } catch(e) {\n return Range.fromPoints(start,start);\n } finally {\n this.moveCursorToPosition(start);\n }\n };\n\n this.toJSON = function() {\n if (this.rangeCount) {\n var data = this.ranges.map(function(r) {\n var r1 = r.clone();\n r1.isBackwards = r.cursor == r.start;\n return r1;\n });\n } else {\n var data = this.getRange();\n data.isBackwards = this.isBackwards();\n }\n return data;\n };\n\n this.fromJSON = function(data) {\n if (data.start == undefined) {\n if (this.rangeList) {\n this.toSingleRange(data[0]);\n for (var i = data.length; i--; ) {\n var r = Range.fromPoints(data[i].start, data[i].end);\n if (data[i].isBackwards)\n r.cursor = r.start;\n this.addRange(r, true);\n }\n return;\n } else\n data = data[0];\n }\n if (this.rangeList)\n this.toSingleRange(data);\n this.setSelectionRange(data, data.isBackwards);\n };\n\n this.isEqual = function(data) {\n if ((data.length || this.rangeCount) && data.length != this.rangeCount)\n return false;\n if (!data.length || !this.ranges)\n return this.getRange().isEqual(data);\n\n for (var i = this.ranges.length; i--; ) {\n if (!this.ranges[i].isEqual(data[i]))\n return false;\n }\n return true;\n };\n\n}).call(Selection.prototype);\n\nexports.Selection = Selection;\n});\n\nace.define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar config = acequire(\"./config\");\nvar MAX_TOKEN_COUNT = 2000;\nvar Tokenizer = function(rules) {\n this.states = rules;\n\n this.regExps = {};\n this.matchMappings = {};\n for (var key in this.states) {\n var state = this.states[key];\n var ruleRegExps = [];\n var matchTotal = 0;\n var mapping = this.matchMappings[key] = {defaultToken: \"text\"};\n var flag = \"g\";\n\n var splitterRurles = [];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.defaultToken)\n mapping.defaultToken = rule.defaultToken;\n if (rule.caseInsensitive)\n flag = \"gi\";\n if (rule.regex == null)\n continue;\n\n if (rule.regex instanceof RegExp)\n rule.regex = rule.regex.toString().slice(1, -1);\n var adjustedregex = rule.regex;\n var matchcount = new RegExp(\"(?:(\" + adjustedregex + \")|(.))\").exec(\"a\").length - 2;\n if (Array.isArray(rule.token)) {\n if (rule.token.length == 1 || matchcount == 1) {\n rule.token = rule.token[0];\n } else if (matchcount - 1 != rule.token.length) {\n this.reportError(\"number of classes and regexp groups doesn't match\", { \n rule: rule,\n groupCount: matchcount - 1\n });\n rule.token = rule.token[0];\n } else {\n rule.tokenArray = rule.token;\n rule.token = null;\n rule.onMatch = this.$arrayTokens;\n }\n } else if (typeof rule.token == \"function\" && !rule.onMatch) {\n if (matchcount > 1)\n rule.onMatch = this.$applyToken;\n else\n rule.onMatch = rule.token;\n }\n\n if (matchcount > 1) {\n if (/\\\\\\d/.test(rule.regex)) {\n adjustedregex = rule.regex.replace(/\\\\([0-9]+)/g, function(match, digit) {\n return \"\\\\\" + (parseInt(digit, 10) + matchTotal + 1);\n });\n } else {\n matchcount = 1;\n adjustedregex = this.removeCapturingGroups(rule.regex);\n }\n if (!rule.splitRegex && typeof rule.token != \"string\")\n splitterRurles.push(rule); // flag will be known only at the very end\n }\n\n mapping[matchTotal] = i;\n matchTotal += matchcount;\n\n ruleRegExps.push(adjustedregex);\n if (!rule.onMatch)\n rule.onMatch = null;\n }\n \n if (!ruleRegExps.length) {\n mapping[0] = 0;\n ruleRegExps.push(\"$\");\n }\n \n splitterRurles.forEach(function(rule) {\n rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);\n }, this);\n\n this.regExps[key] = new RegExp(\"(\" + ruleRegExps.join(\")|(\") + \")|($)\", flag);\n }\n};\n\n(function() {\n this.$setMaxTokenCount = function(m) {\n MAX_TOKEN_COUNT = m | 0;\n };\n \n this.$applyToken = function(str) {\n var values = this.splitRegex.exec(str).slice(1);\n var types = this.token.apply(this, values);\n if (typeof types === \"string\")\n return [{type: types, value: str}];\n\n var tokens = [];\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i]\n };\n }\n return tokens;\n };\n\n this.$arrayTokens = function(str) {\n if (!str)\n return [];\n var values = this.splitRegex.exec(str);\n if (!values)\n return \"text\";\n var tokens = [];\n var types = this.tokenArray;\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i + 1])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i + 1]\n };\n }\n return tokens;\n };\n\n this.removeCapturingGroups = function(src) {\n var r = src.replace(\n /\\[(?:\\\\.|[^\\]])*?\\]|\\\\.|\\(\\?[:=!]|(\\()/g,\n function(x, y) {return y ? \"(?:\" : x;}\n );\n return r;\n };\n\n this.createSplitterRegexp = function(src, flag) {\n if (src.indexOf(\"(?=\") != -1) {\n var stack = 0;\n var inChClass = false;\n var lastCapture = {};\n src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g, function(\n m, esc, parenOpen, parenClose, square, index\n ) {\n if (inChClass) {\n inChClass = square != \"]\";\n } else if (square) {\n inChClass = true;\n } else if (parenClose) {\n if (stack == lastCapture.stack) {\n lastCapture.end = index+1;\n lastCapture.stack = -1;\n }\n stack--;\n } else if (parenOpen) {\n stack++;\n if (parenOpen.length != 1) {\n lastCapture.stack = stack;\n lastCapture.start = index;\n }\n }\n return m;\n });\n\n if (lastCapture.end != null && /^\\)*$/.test(src.substr(lastCapture.end)))\n src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);\n }\n if (src.charAt(0) != \"^\") src = \"^\" + src;\n if (src.charAt(src.length - 1) != \"$\") src += \"$\";\n \n return new RegExp(src, (flag||\"\").replace(\"g\", \"\"));\n };\n this.getLineTokens = function(line, startState) {\n if (startState && typeof startState != \"string\") {\n var stack = startState.slice(0);\n startState = stack[0];\n if (startState === \"#tmp\") {\n stack.shift();\n startState = stack.shift();\n }\n } else\n var stack = [];\n\n var currentState = startState || \"start\";\n var state = this.states[currentState];\n if (!state) {\n currentState = \"start\";\n state = this.states[currentState];\n }\n var mapping = this.matchMappings[currentState];\n var re = this.regExps[currentState];\n re.lastIndex = 0;\n\n var match, tokens = [];\n var lastIndex = 0;\n var matchAttempts = 0;\n\n var token = {type: null, value: \"\"};\n\n while (match = re.exec(line)) {\n var type = mapping.defaultToken;\n var rule = null;\n var value = match[0];\n var index = re.lastIndex;\n\n if (index - value.length > lastIndex) {\n var skipped = line.substring(lastIndex, index - value.length);\n if (token.type == type) {\n token.value += skipped;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: skipped};\n }\n }\n\n for (var i = 0; i < match.length-2; i++) {\n if (match[i + 1] === undefined)\n continue;\n\n rule = state[mapping[i]];\n\n if (rule.onMatch)\n type = rule.onMatch(value, currentState, stack, line);\n else\n type = rule.token;\n\n if (rule.next) {\n if (typeof rule.next == \"string\") {\n currentState = rule.next;\n } else {\n currentState = rule.next(currentState, stack);\n }\n \n state = this.states[currentState];\n if (!state) {\n this.reportError(\"state doesn't exist\", currentState);\n currentState = \"start\";\n state = this.states[currentState];\n }\n mapping = this.matchMappings[currentState];\n lastIndex = index;\n re = this.regExps[currentState];\n re.lastIndex = index;\n }\n if (rule.consumeLineEnd)\n lastIndex = index;\n break;\n }\n\n if (value) {\n if (typeof type === \"string\") {\n if ((!rule || rule.merge !== false) && token.type === type) {\n token.value += value;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: value};\n }\n } else if (type) {\n if (token.type)\n tokens.push(token);\n token = {type: null, value: \"\"};\n for (var i = 0; i < type.length; i++)\n tokens.push(type[i]);\n }\n }\n\n if (lastIndex == line.length)\n break;\n\n lastIndex = index;\n\n if (matchAttempts++ > MAX_TOKEN_COUNT) {\n if (matchAttempts > 2 * line.length) {\n this.reportError(\"infinite loop with in ace tokenizer\", {\n startState: startState,\n line: line\n });\n }\n while (lastIndex < line.length) {\n if (token.type)\n tokens.push(token);\n token = {\n value: line.substring(lastIndex, lastIndex += 2000),\n type: \"overflow\"\n };\n }\n currentState = \"start\";\n stack = [];\n break;\n }\n }\n\n if (token.type)\n tokens.push(token);\n \n if (stack.length > 1) {\n if (stack[0] !== currentState)\n stack.unshift(\"#tmp\", currentState);\n }\n return {\n tokens : tokens,\n state : stack.length ? stack : currentState\n };\n };\n \n this.reportError = config.reportError;\n \n}).call(Tokenizer.prototype);\n\nexports.Tokenizer = Tokenizer;\n});\n\nace.define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\n\nvar TextHighlightRules = function() {\n\n this.$rules = {\n \"start\" : [{\n token : \"empty_line\",\n regex : '^$'\n }, {\n defaultToken : \"text\"\n }]\n };\n};\n\n(function() {\n\n this.addRules = function(rules, prefix) {\n if (!prefix) {\n for (var key in rules)\n this.$rules[key] = rules[key];\n return;\n }\n for (var key in rules) {\n var state = rules[key];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.next || rule.onMatch) {\n if (typeof rule.next == \"string\") {\n if (rule.next.indexOf(prefix) !== 0)\n rule.next = prefix + rule.next;\n }\n if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)\n rule.nextState = prefix + rule.nextState;\n }\n }\n this.$rules[prefix + key] = state;\n }\n };\n\n this.getRules = function() {\n return this.$rules;\n };\n\n this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {\n var embedRules = typeof HighlightRules == \"function\"\n ? new HighlightRules().getRules()\n : HighlightRules;\n if (states) {\n for (var i = 0; i < states.length; i++)\n states[i] = prefix + states[i];\n } else {\n states = [];\n for (var key in embedRules)\n states.push(prefix + key);\n }\n\n this.addRules(embedRules, prefix);\n\n if (escapeRules) {\n var addRules = Array.prototype[append ? \"push\" : \"unshift\"];\n for (var i = 0; i < states.length; i++)\n addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));\n }\n\n if (!this.$embeds)\n this.$embeds = [];\n this.$embeds.push(prefix);\n };\n\n this.getEmbeds = function() {\n return this.$embeds;\n };\n\n var pushState = function(currentState, stack) {\n if (currentState != \"start\" || stack.length)\n stack.unshift(this.nextState, currentState);\n return this.nextState;\n };\n var popState = function(currentState, stack) {\n stack.shift();\n return stack.shift() || \"start\";\n };\n\n this.normalizeRules = function() {\n var id = 0;\n var rules = this.$rules;\n function processState(key) {\n var state = rules[key];\n state.processed = true;\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n var toInsert = null;\n if (Array.isArray(rule)) {\n toInsert = rule;\n rule = {};\n }\n if (!rule.regex && rule.start) {\n rule.regex = rule.start;\n if (!rule.next)\n rule.next = [];\n rule.next.push({\n defaultToken: rule.token\n }, {\n token: rule.token + \".end\",\n regex: rule.end || rule.start,\n next: \"pop\"\n });\n rule.token = rule.token + \".start\";\n rule.push = true;\n }\n var next = rule.next || rule.push;\n if (next && Array.isArray(next)) {\n var stateName = rule.stateName;\n if (!stateName) {\n stateName = rule.token;\n if (typeof stateName != \"string\")\n stateName = stateName[0] || \"\";\n if (rules[stateName])\n stateName += id++;\n }\n rules[stateName] = next;\n rule.next = stateName;\n processState(stateName);\n } else if (next == \"pop\") {\n rule.next = popState;\n }\n\n if (rule.push) {\n rule.nextState = rule.next || rule.push;\n rule.next = pushState;\n delete rule.push;\n }\n\n if (rule.rules) {\n for (var r in rule.rules) {\n if (rules[r]) {\n if (rules[r].push)\n rules[r].push.apply(rules[r], rule.rules[r]);\n } else {\n rules[r] = rule.rules[r];\n }\n }\n }\n var includeName = typeof rule == \"string\" ? rule : rule.include;\n if (includeName) {\n if (Array.isArray(includeName))\n toInsert = includeName.map(function(x) { return rules[x]; });\n else\n toInsert = rules[includeName];\n }\n\n if (toInsert) {\n var args = [i, 1].concat(toInsert);\n if (rule.noEscape)\n args = args.filter(function(x) {return !x.next;});\n state.splice.apply(state, args);\n i--;\n }\n \n if (rule.keywordMap) {\n rule.token = this.createKeywordMapper(\n rule.keywordMap, rule.defaultToken || \"text\", rule.caseInsensitive\n );\n delete rule.defaultToken;\n }\n }\n }\n Object.keys(rules).forEach(processState, this);\n };\n\n this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {\n var keywords = Object.create(null);\n Object.keys(map).forEach(function(className) {\n var a = map[className];\n if (ignoreCase)\n a = a.toLowerCase();\n var list = a.split(splitChar || \"|\");\n for (var i = list.length; i--; )\n keywords[list[i]] = className;\n });\n if (Object.getPrototypeOf(keywords)) {\n keywords.__proto__ = null;\n }\n this.$keywordList = Object.keys(keywords);\n map = null;\n return ignoreCase\n ? function(value) {return keywords[value.toLowerCase()] || defaultToken; }\n : function(value) {return keywords[value] || defaultToken; };\n };\n\n this.getKeywords = function() {\n return this.$keywords;\n };\n\n}).call(TextHighlightRules.prototype);\n\nexports.TextHighlightRules = TextHighlightRules;\n});\n\nace.define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Behaviour = function() {\n this.$behaviours = {};\n};\n\n(function () {\n\n this.add = function (name, action, callback) {\n switch (undefined) {\n case this.$behaviours:\n this.$behaviours = {};\n case this.$behaviours[name]:\n this.$behaviours[name] = {};\n }\n this.$behaviours[name][action] = callback;\n };\n \n this.addBehaviours = function (behaviours) {\n for (var key in behaviours) {\n for (var action in behaviours[key]) {\n this.add(key, action, behaviours[key][action]);\n }\n }\n };\n \n this.remove = function (name) {\n if (this.$behaviours && this.$behaviours[name]) {\n delete this.$behaviours[name];\n }\n };\n \n this.inherit = function (mode, filter) {\n if (typeof mode === \"function\") {\n var behaviours = new mode().getBehaviours(filter);\n } else {\n var behaviours = mode.getBehaviours(filter);\n }\n this.addBehaviours(behaviours);\n };\n \n this.getBehaviours = function (filter) {\n if (!filter) {\n return this.$behaviours;\n } else {\n var ret = {};\n for (var i = 0; i < filter.length; i++) {\n if (this.$behaviours[filter[i]]) {\n ret[filter[i]] = this.$behaviours[filter[i]];\n }\n }\n return ret;\n }\n };\n\n}).call(Behaviour.prototype);\n\nexports.Behaviour = Behaviour;\n});\n\nace.define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"./range\").Range;\nvar TokenIterator = function(session, initialRow, initialColumn) {\n this.$session = session;\n this.$row = initialRow;\n this.$rowTokens = session.getTokens(initialRow);\n\n var token = session.getTokenAt(initialRow, initialColumn);\n this.$tokenIndex = token ? token.index : -1;\n};\n\n(function() { \n this.stepBackward = function() {\n this.$tokenIndex -= 1;\n \n while (this.$tokenIndex < 0) {\n this.$row -= 1;\n if (this.$row < 0) {\n this.$row = 0;\n return null;\n }\n \n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = this.$rowTokens.length - 1;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.stepForward = function() {\n this.$tokenIndex += 1;\n var rowCount;\n while (this.$tokenIndex >= this.$rowTokens.length) {\n this.$row += 1;\n if (!rowCount)\n rowCount = this.$session.getLength();\n if (this.$row >= rowCount) {\n this.$row = rowCount - 1;\n return null;\n }\n\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = 0;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentToken = function () {\n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentTokenRow = function () {\n return this.$row;\n }; \n this.getCurrentTokenColumn = function() {\n var rowTokens = this.$rowTokens;\n var tokenIndex = this.$tokenIndex;\n var column = rowTokens[tokenIndex].start;\n if (column !== undefined)\n return column;\n \n column = 0;\n while (tokenIndex > 0) {\n tokenIndex -= 1;\n column += rowTokens[tokenIndex].value.length;\n }\n \n return column; \n };\n this.getCurrentTokenPosition = function() {\n return {row: this.$row, column: this.getCurrentTokenColumn()};\n };\n this.getCurrentTokenRange = function() {\n var token = this.$rowTokens[this.$tokenIndex];\n var column = this.getCurrentTokenColumn();\n return new Range(this.$row, column, this.$row, column + token.value.length);\n };\n\n}).call(TokenIterator.prototype);\n\nexports.TokenIterator = TokenIterator;\n});\n\nace.define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\nvar lang = acequire(\"../../lib/lang\");\n\nvar SAFE_INSERT_IN_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\"];\nvar SAFE_INSERT_BEFORE_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\", \"comment\"];\n\nvar context;\nvar contextCache = {};\nvar defaultQuotes = {'\"' : '\"', \"'\" : \"'\"};\n\nvar initContext = function(editor) {\n var id = -1;\n if (editor.multiSelect) {\n id = editor.selection.index;\n if (contextCache.rangeCount != editor.multiSelect.rangeCount)\n contextCache = {rangeCount: editor.multiSelect.rangeCount};\n }\n if (contextCache[id])\n return context = contextCache[id];\n context = contextCache[id] = {\n autoInsertedBrackets: 0,\n autoInsertedRow: -1,\n autoInsertedLineEnd: \"\",\n maybeInsertedBrackets: 0,\n maybeInsertedRow: -1,\n maybeInsertedLineStart: \"\",\n maybeInsertedLineEnd: \"\"\n };\n};\n\nvar getWrapped = function(selection, selected, opening, closing) {\n var rowDiff = selection.end.row - selection.start.row;\n return {\n text: opening + selected + closing,\n selection: [\n 0,\n selection.start.column + 1,\n rowDiff,\n selection.end.column + (rowDiff ? 0 : 1)\n ]\n };\n};\n\nvar CstyleBehaviour = function(options) {\n this.add(\"braces\", \"insertion\", function(state, action, editor, session, text) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (text == '{') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && selected !== \"{\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '{', '}');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n if (/[\\]\\}\\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options && options.braces) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n } else {\n CstyleBehaviour.recordMaybeInsert(editor, session, \"{\");\n return {\n text: '{',\n selection: [1, 1]\n };\n }\n }\n } else if (text == '}') {\n initContext(editor);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == '}') {\n var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n } else if (text == \"\\n\" || text == \"\\r\\n\") {\n initContext(editor);\n var closing = \"\";\n if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {\n closing = lang.stringRepeat(\"}\", context.maybeInsertedBrackets);\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === '}') {\n var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');\n if (!openBracePos)\n return null;\n var next_indent = this.$getIndent(session.getLine(openBracePos.row));\n } else if (closing) {\n var next_indent = this.$getIndent(line);\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n return;\n }\n var indent = next_indent + session.getTabString();\n\n return {\n text: '\\n' + indent + '\\n' + next_indent + closing,\n selection: [1, indent.length, 1, indent.length]\n };\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n });\n\n this.add(\"braces\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '{') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar == '}') {\n range.end.column++;\n return range;\n } else {\n context.maybeInsertedBrackets--;\n }\n }\n });\n\n this.add(\"parens\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '(') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '(', ')');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \")\");\n return {\n text: '()',\n selection: [1, 1]\n };\n }\n } else if (text == ')') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ')') {\n var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"parens\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '(') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ')') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"brackets\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '[') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '[', ']');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"]\");\n return {\n text: '[]',\n selection: [1, 1]\n };\n }\n } else if (text == ']') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ']') {\n var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"brackets\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '[') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ']') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"string_dquotes\", \"insertion\", function(state, action, editor, session, text) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n if (text.length == 1 && quotes[text]) {\n if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1)\n return;\n initContext(editor);\n var quote = text;\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, quote, quote);\n } else if (!selected) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var leftChar = line.substring(cursor.column-1, cursor.column);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n var token = session.getTokenAt(cursor.row, cursor.column);\n var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);\n if (leftChar == \"\\\\\" && token && /escape/.test(token.type))\n return null;\n\n var stringBefore = token && /string|escape/.test(token.type);\n var stringAfter = !rightToken || /string|escape/.test(rightToken.type);\n\n var pair;\n if (rightChar == quote) {\n pair = stringBefore !== stringAfter;\n if (pair && /string\\.end/.test(rightToken.type))\n pair = false;\n } else {\n if (stringBefore && !stringAfter)\n return null; // wrap string with different quote\n if (stringBefore && stringAfter)\n return null; // do not pair quotes inside strings\n var wordRe = session.$mode.tokenRe;\n wordRe.lastIndex = 0;\n var isWordBefore = wordRe.test(leftChar);\n wordRe.lastIndex = 0;\n var isWordAfter = wordRe.test(leftChar);\n if (isWordBefore || isWordAfter)\n return null; // before or after alphanumeric\n if (rightChar && !/[\\s;,.})\\]\\\\]/.test(rightChar))\n return null; // there is rightChar and it isn't closing\n pair = true;\n }\n return {\n text: pair ? quote + quote : \"\",\n selection: [1,1]\n };\n }\n }\n });\n\n this.add(\"string_dquotes\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n\n};\n\n\nCstyleBehaviour.isSaneInsertion = function(editor, session) {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n if (!this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) {\n var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);\n if (!this.$matchTokenType(iterator2.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS))\n return false;\n }\n iterator.stepForward();\n return iterator.getCurrentTokenRow() !== cursor.row ||\n this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_BEFORE_TOKENS);\n};\n\nCstyleBehaviour.$matchTokenType = function(token, types) {\n return types.indexOf(token.type || token) > -1;\n};\n\nCstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))\n context.autoInsertedBrackets = 0;\n context.autoInsertedRow = cursor.row;\n context.autoInsertedLineEnd = bracket + line.substr(cursor.column);\n context.autoInsertedBrackets++;\n};\n\nCstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isMaybeInsertedClosing(cursor, line))\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = cursor.row;\n context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;\n context.maybeInsertedLineEnd = line.substr(cursor.column);\n context.maybeInsertedBrackets++;\n};\n\nCstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {\n return context.autoInsertedBrackets > 0 &&\n cursor.row === context.autoInsertedRow &&\n bracket === context.autoInsertedLineEnd[0] &&\n line.substr(cursor.column) === context.autoInsertedLineEnd;\n};\n\nCstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {\n return context.maybeInsertedBrackets > 0 &&\n cursor.row === context.maybeInsertedRow &&\n line.substr(cursor.column) === context.maybeInsertedLineEnd &&\n line.substr(0, cursor.column) == context.maybeInsertedLineStart;\n};\n\nCstyleBehaviour.popAutoInsertedClosing = function() {\n context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);\n context.autoInsertedBrackets--;\n};\n\nCstyleBehaviour.clearMaybeInsertedClosing = function() {\n if (context) {\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = -1;\n }\n};\n\n\n\noop.inherits(CstyleBehaviour, Behaviour);\n\nexports.CstyleBehaviour = CstyleBehaviour;\n});\n\nace.define(\"ace/unicode\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.packages = {};\n\naddUnicodePackage({\n 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\",\n 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\",\n 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\",\n Lt: \"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC\",\n Lm: \"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F\",\n 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\",\n 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\",\n 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\",\n 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\",\n Me: \"0488048906DE20DD-20E020E2-20E4A670-A672\",\n 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\",\n 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\",\n Nl: \"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF\",\n No: \"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835\",\n 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\",\n Pd: \"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D\",\n Ps: \"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62\",\n Pe: \"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63\",\n Pi: \"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20\",\n Pf: \"00BB2019201D203A2E032E052E0A2E0D2E1D2E21\",\n Pc: \"005F203F20402054FE33FE34FE4D-FE4FFF3F\",\n 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\",\n 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\",\n 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\",\n Sc: \"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6\",\n Sk: \"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3\",\n 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\",\n Z: \"002000A01680180E2000-200A20282029202F205F3000\",\n Zs: \"002000A01680180E2000-200A202F205F3000\",\n Zl: \"2028\",\n Zp: \"2029\",\n 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\",\n Cc: \"0000-001F007F-009F\",\n Cf: \"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB\",\n Co: \"E000-F8FF\",\n Cs: \"D800-DFFF\",\n 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});\n\nfunction addUnicodePackage (pack) {\n var codePoint = /\\w{4}/g;\n for (var name in pack)\n exports.packages[name] = pack[name].replace(codePoint, \"\\\\u$&\");\n}\n\n});\n\nace.define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour/cstyle\",\"ace/unicode\",\"ace/lib/lang\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Tokenizer = acequire(\"../tokenizer\").Tokenizer;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar unicode = acequire(\"../unicode\");\nvar lang = acequire(\"../lib/lang\");\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\nvar Mode = function() {\n this.HighlightRules = TextHighlightRules;\n};\n\n(function() {\n this.$defaultBehaviour = new CstyleBehaviour();\n\n this.tokenRe = new RegExp(\"^[\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]+\", \"g\"\n );\n\n this.nonTokenRe = new RegExp(\"^(?:[^\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]|\\\\s])+\", \"g\"\n );\n\n this.getTokenizer = function() {\n if (!this.$tokenizer) {\n this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);\n this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());\n }\n return this.$tokenizer;\n };\n\n this.lineCommentStart = \"\";\n this.blockComment = \"\";\n\n this.toggleCommentLines = function(state, session, startRow, endRow) {\n var doc = session.doc;\n\n var ignoreBlankLines = true;\n var shouldRemove = true;\n var minIndent = Infinity;\n var tabSize = session.getTabSize();\n var insertAtTabStop = false;\n\n if (!this.lineCommentStart) {\n if (!this.blockComment)\n return false;\n var lineCommentStart = this.blockComment.start;\n var lineCommentEnd = this.blockComment.end;\n var regexpStart = new RegExp(\"^(\\\\s*)(?:\" + lang.escapeRegExp(lineCommentStart) + \")\");\n var regexpEnd = new RegExp(\"(?:\" + lang.escapeRegExp(lineCommentEnd) + \")\\\\s*$\");\n\n var comment = function(line, i) {\n if (testRemove(line, i))\n return;\n if (!ignoreBlankLines || /\\S/.test(line)) {\n doc.insertInLine({row: i, column: line.length}, lineCommentEnd);\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n\n var uncomment = function(line, i) {\n var m;\n if (m = line.match(regexpEnd))\n doc.removeInLine(i, line.length - m[0].length, line.length);\n if (m = line.match(regexpStart))\n doc.removeInLine(i, m[1].length, m[0].length);\n };\n\n var testRemove = function(line, row) {\n if (regexpStart.test(line))\n return true;\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].type === \"comment\")\n return true;\n }\n };\n } else {\n if (Array.isArray(this.lineCommentStart)) {\n var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join(\"|\");\n var lineCommentStart = this.lineCommentStart[0];\n } else {\n var regexpStart = lang.escapeRegExp(this.lineCommentStart);\n var lineCommentStart = this.lineCommentStart;\n }\n regexpStart = new RegExp(\"^(\\\\s*)(?:\" + regexpStart + \") ?\");\n \n insertAtTabStop = session.getUseSoftTabs();\n\n var uncomment = function(line, i) {\n var m = line.match(regexpStart);\n if (!m) return;\n var start = m[1].length, end = m[0].length;\n if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == \" \")\n end--;\n doc.removeInLine(i, start, end);\n };\n var commentWithSpace = lineCommentStart + \" \";\n var comment = function(line, i) {\n if (!ignoreBlankLines || /\\S/.test(line)) {\n if (shouldInsertSpace(line, minIndent, minIndent))\n doc.insertInLine({row: i, column: minIndent}, commentWithSpace);\n else\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n var testRemove = function(line, i) {\n return regexpStart.test(line);\n };\n \n var shouldInsertSpace = function(line, before, after) {\n var spaces = 0;\n while (before-- && line.charAt(before) == \" \")\n spaces++;\n if (spaces % tabSize != 0)\n return false;\n var spaces = 0;\n while (line.charAt(after++) == \" \")\n spaces++;\n if (tabSize > 2)\n return spaces % tabSize != tabSize - 1;\n else\n return spaces % tabSize == 0;\n return true;\n };\n }\n\n function iter(fun) {\n for (var i = startRow; i <= endRow; i++)\n fun(doc.getLine(i), i);\n }\n\n\n var minEmptyLength = Infinity;\n iter(function(line, i) {\n var indent = line.search(/\\S/);\n if (indent !== -1) {\n if (indent < minIndent)\n minIndent = indent;\n if (shouldRemove && !testRemove(line, i))\n shouldRemove = false;\n } else if (minEmptyLength > line.length) {\n minEmptyLength = line.length;\n }\n });\n\n if (minIndent == Infinity) {\n minIndent = minEmptyLength;\n ignoreBlankLines = false;\n shouldRemove = false;\n }\n\n if (insertAtTabStop && minIndent % tabSize != 0)\n minIndent = Math.floor(minIndent / tabSize) * tabSize;\n\n iter(shouldRemove ? uncomment : comment);\n };\n\n this.toggleBlockComment = function(state, session, range, cursor) {\n var comment = this.blockComment;\n if (!comment)\n return;\n if (!comment.start && comment[0])\n comment = comment[0];\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n var sel = session.selection;\n var initialRange = session.selection.toOrientedRange();\n var startRow, colDiff;\n\n if (token && /comment/.test(token.type)) {\n var startRange, endRange;\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.start);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n startRange = new Range(row, column, row, column + comment.start.length);\n break;\n }\n token = iterator.stepBackward();\n }\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.end);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n endRange = new Range(row, column, row, column + comment.end.length);\n break;\n }\n token = iterator.stepForward();\n }\n if (endRange)\n session.remove(endRange);\n if (startRange) {\n session.remove(startRange);\n startRow = startRange.start.row;\n colDiff = -comment.start.length;\n }\n } else {\n colDiff = comment.start.length;\n startRow = range.start.row;\n session.insert(range.end, comment.end);\n session.insert(range.start, comment.start);\n }\n if (initialRange.start.row == startRow)\n initialRange.start.column += colDiff;\n if (initialRange.end.row == startRow)\n initialRange.end.column += colDiff;\n session.selection.fromOrientedRange(initialRange);\n };\n\n this.getNextLineIndent = function(state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function(state, line, input) {\n return false;\n };\n\n this.autoOutdent = function(state, doc, row) {\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n this.createWorker = function(session) {\n return null;\n };\n\n this.createModeDelegates = function (mapping) {\n this.$embeds = [];\n this.$modes = {};\n for (var i in mapping) {\n if (mapping[i]) {\n this.$embeds.push(i);\n this.$modes[i] = new mapping[i]();\n }\n }\n\n var delegations = [\"toggleBlockComment\", \"toggleCommentLines\", \"getNextLineIndent\", \n \"checkOutdent\", \"autoOutdent\", \"transformAction\", \"getCompletions\"];\n\n for (var i = 0; i < delegations.length; i++) {\n (function(scope) {\n var functionName = delegations[i];\n var defaultHandler = scope[functionName];\n scope[delegations[i]] = function() {\n return this.$delegator(functionName, arguments, defaultHandler);\n };\n }(this));\n }\n };\n\n this.$delegator = function(method, args, defaultHandler) {\n var state = args[0];\n if (typeof state != \"string\")\n state = state[0];\n for (var i = 0; i < this.$embeds.length; i++) {\n if (!this.$modes[this.$embeds[i]]) continue;\n\n var split = state.split(this.$embeds[i]);\n if (!split[0] && split[1]) {\n args[0] = split[1];\n var mode = this.$modes[this.$embeds[i]];\n return mode[method].apply(mode, args);\n }\n }\n var ret = defaultHandler.apply(this, args);\n return defaultHandler ? ret : undefined;\n };\n\n this.transformAction = function(state, action, editor, session, param) {\n if (this.$behaviour) {\n var behaviours = this.$behaviour.getBehaviours();\n for (var key in behaviours) {\n if (behaviours[key][action]) {\n var ret = behaviours[key][action].apply(this, arguments);\n if (ret) {\n return ret;\n }\n }\n }\n }\n };\n \n this.getKeywords = function(append) {\n if (!this.completionKeywords) {\n var rules = this.$tokenizer.rules;\n var completionKeywords = [];\n for (var rule in rules) {\n var ruleItr = rules[rule];\n for (var r = 0, l = ruleItr.length; r < l; r++) {\n if (typeof ruleItr[r].token === \"string\") {\n if (/keyword|support|storage/.test(ruleItr[r].token))\n completionKeywords.push(ruleItr[r].regex);\n }\n else if (typeof ruleItr[r].token === \"object\") {\n for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { \n if (/keyword|support|storage/.test(ruleItr[r].token[a])) {\n var rule = ruleItr[r].regex.match(/\\(.+?\\)/g)[a];\n completionKeywords.push(rule.substr(1, rule.length - 2));\n }\n }\n }\n }\n }\n this.completionKeywords = completionKeywords;\n }\n if (!append)\n return this.$keywordList;\n return completionKeywords.concat(this.$keywordList || []);\n };\n \n this.$createKeywordList = function() {\n if (!this.$highlightRules)\n this.getTokenizer();\n return this.$keywordList = this.$highlightRules.$keywordList || [];\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n var keywords = this.$keywordList || this.$createKeywordList();\n return keywords.map(function(word) {\n return {\n name: word,\n value: word,\n score: 0,\n meta: \"keyword\"\n };\n });\n };\n\n this.$id = \"ace/mode/text\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n\nace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nfunction throwDeltaError(delta, errorText){\n console.log(\"Invalid Delta:\", delta);\n throw \"Invalid Delta: \" + errorText;\n}\n\nfunction positionInDocument(docLines, position) {\n return position.row >= 0 && position.row < docLines.length &&\n position.column >= 0 && position.column <= docLines[position.row].length;\n}\n\nfunction validateDelta(docLines, delta) {\n if (delta.action != \"insert\" && delta.action != \"remove\")\n throwDeltaError(delta, \"delta.action must be 'insert' or 'remove'\");\n if (!(delta.lines instanceof Array))\n throwDeltaError(delta, \"delta.lines must be an Array\");\n if (!delta.start || !delta.end)\n throwDeltaError(delta, \"delta.start/end must be an present\");\n var start = delta.start;\n if (!positionInDocument(docLines, delta.start))\n throwDeltaError(delta, \"delta.start must be contained in document\");\n var end = delta.end;\n if (delta.action == \"remove\" && !positionInDocument(docLines, end))\n throwDeltaError(delta, \"delta.end must contained in document for 'remove' actions\");\n var numRangeRows = end.row - start.row;\n var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));\n if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)\n throwDeltaError(delta, \"delta.range must match delta lines\");\n}\n\nexports.applyDelta = function(docLines, delta, doNotValidate) {\n \n var row = delta.start.row;\n var startColumn = delta.start.column;\n var line = docLines[row] || \"\";\n switch (delta.action) {\n case \"insert\":\n var lines = delta.lines;\n if (lines.length === 1) {\n docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);\n } else {\n var args = [row, 1].concat(delta.lines);\n docLines.splice.apply(docLines, args);\n docLines[row] = line.substring(0, startColumn) + docLines[row];\n docLines[row + delta.lines.length - 1] += line.substring(startColumn);\n }\n break;\n case \"remove\":\n var endColumn = delta.end.column;\n var endRow = delta.end.row;\n if (row === endRow) {\n docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);\n } else {\n docLines.splice(\n row, endRow - row + 1,\n line.substring(0, startColumn) + docLines[endRow].substring(endColumn)\n );\n }\n break;\n }\n};\n});\n\nace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar Anchor = exports.Anchor = function(doc, row, column) {\n this.$onChange = this.onChange.bind(this);\n this.attach(doc);\n \n if (typeof column == \"undefined\")\n this.setPosition(row.row, row.column);\n else\n this.setPosition(row, column);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.getPosition = function() {\n return this.$clipPositionToDocument(this.row, this.column);\n };\n this.getDocument = function() {\n return this.document;\n };\n this.$insertRight = false;\n this.onChange = function(delta) {\n if (delta.start.row == delta.end.row && delta.start.row != this.row)\n return;\n\n if (delta.start.row > this.row)\n return;\n \n var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);\n this.setPosition(point.row, point.column, true);\n };\n \n function $pointsInOrder(point1, point2, equalPointsInOrder) {\n var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;\n return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);\n }\n \n function $getTransformedPoint(delta, point, moveIfEqual) {\n var deltaIsInsert = delta.action == \"insert\";\n var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);\n var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);\n var deltaStart = delta.start;\n var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.\n if ($pointsInOrder(point, deltaStart, moveIfEqual)) {\n return {\n row: point.row,\n column: point.column\n };\n }\n if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {\n return {\n row: point.row + deltaRowShift,\n column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)\n };\n }\n \n return {\n row: deltaStart.row,\n column: deltaStart.column\n };\n }\n this.setPosition = function(row, column, noClip) {\n var pos;\n if (noClip) {\n pos = {\n row: row,\n column: column\n };\n } else {\n pos = this.$clipPositionToDocument(row, column);\n }\n\n if (this.row == pos.row && this.column == pos.column)\n return;\n\n var old = {\n row: this.row,\n column: this.column\n };\n\n this.row = pos.row;\n this.column = pos.column;\n this._signal(\"change\", {\n old: old,\n value: pos\n });\n };\n this.detach = function() {\n this.document.removeEventListener(\"change\", this.$onChange);\n };\n this.attach = function(doc) {\n this.document = doc || this.document;\n this.document.on(\"change\", this.$onChange);\n };\n this.$clipPositionToDocument = function(row, column) {\n var pos = {};\n\n if (row >= this.document.getLength()) {\n pos.row = Math.max(0, this.document.getLength() - 1);\n pos.column = this.document.getLine(pos.row).length;\n }\n else if (row < 0) {\n pos.row = 0;\n pos.column = 0;\n }\n else {\n pos.row = row;\n pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));\n }\n\n if (column < 0)\n pos.column = 0;\n\n return pos;\n };\n\n}).call(Anchor.prototype);\n\n});\n\nace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar applyDelta = acequire(\"./apply_delta\").applyDelta;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Anchor = acequire(\"./anchor\").Anchor;\n\nvar Document = function(textOrLines) {\n this.$lines = [\"\"];\n if (textOrLines.length === 0) {\n this.$lines = [\"\"];\n } else if (Array.isArray(textOrLines)) {\n this.insertMergedLines({row: 0, column: 0}, textOrLines);\n } else {\n this.insert({row: 0, column:0}, textOrLines);\n }\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setValue = function(text) {\n var len = this.getLength() - 1;\n this.remove(new Range(0, 0, len, this.getLine(len).length));\n this.insert({row: 0, column: 0}, text);\n };\n this.getValue = function() {\n return this.getAllLines().join(this.getNewLineCharacter());\n };\n this.createAnchor = function(row, column) {\n return new Anchor(this, row, column);\n };\n if (\"aaa\".split(/a/).length === 0) {\n this.$split = function(text) {\n return text.replace(/\\r\\n|\\r/g, \"\\n\").split(\"\\n\");\n };\n } else {\n this.$split = function(text) {\n return text.split(/\\r\\n|\\r|\\n/);\n };\n }\n\n\n this.$detectNewLine = function(text) {\n var match = text.match(/^.*?(\\r\\n|\\r|\\n)/m);\n this.$autoNewLine = match ? match[1] : \"\\n\";\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineCharacter = function() {\n switch (this.$newLineMode) {\n case \"windows\":\n return \"\\r\\n\";\n case \"unix\":\n return \"\\n\";\n default:\n return this.$autoNewLine || \"\\n\";\n }\n };\n\n this.$autoNewLine = \"\";\n this.$newLineMode = \"auto\";\n this.setNewLineMode = function(newLineMode) {\n if (this.$newLineMode === newLineMode)\n return;\n\n this.$newLineMode = newLineMode;\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineMode = function() {\n return this.$newLineMode;\n };\n this.isNewLine = function(text) {\n return (text == \"\\r\\n\" || text == \"\\r\" || text == \"\\n\");\n };\n this.getLine = function(row) {\n return this.$lines[row] || \"\";\n };\n this.getLines = function(firstRow, lastRow) {\n return this.$lines.slice(firstRow, lastRow + 1);\n };\n this.getAllLines = function() {\n return this.getLines(0, this.getLength());\n };\n this.getLength = function() {\n return this.$lines.length;\n };\n this.getTextRange = function(range) {\n return this.getLinesForRange(range).join(this.getNewLineCharacter());\n };\n this.getLinesForRange = function(range) {\n var lines;\n if (range.start.row === range.end.row) {\n lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];\n } else {\n lines = this.getLines(range.start.row, range.end.row);\n lines[0] = (lines[0] || \"\").substring(range.start.column);\n var l = lines.length - 1;\n if (range.end.row - range.start.row == l)\n lines[l] = lines[l].substring(0, range.end.column);\n }\n return lines;\n };\n this.insertLines = function(row, lines) {\n console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\");\n return this.insertFullLines(row, lines);\n };\n this.removeLines = function(firstRow, lastRow) {\n console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\");\n return this.removeFullLines(firstRow, lastRow);\n };\n this.insertNewLine = function(position) {\n console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\");\n return this.insertMergedLines(position, [\"\", \"\"]);\n };\n this.insert = function(position, text) {\n if (this.getLength() <= 1)\n this.$detectNewLine(text);\n \n return this.insertMergedLines(position, this.$split(text));\n };\n this.insertInLine = function(position, text) {\n var start = this.clippedPos(position.row, position.column);\n var end = this.pos(position.row, position.column + text.length);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: [text]\n }, true);\n \n return this.clonePos(end);\n };\n \n this.clippedPos = function(row, column) {\n var length = this.getLength();\n if (row === undefined) {\n row = length;\n } else if (row < 0) {\n row = 0;\n } else if (row >= length) {\n row = length - 1;\n column = undefined;\n }\n var line = this.getLine(row);\n if (column == undefined)\n column = line.length;\n column = Math.min(Math.max(column, 0), line.length);\n return {row: row, column: column};\n };\n \n this.clonePos = function(pos) {\n return {row: pos.row, column: pos.column};\n };\n \n this.pos = function(row, column) {\n return {row: row, column: column};\n };\n \n this.$clipPosition = function(position) {\n var length = this.getLength();\n if (position.row >= length) {\n position.row = Math.max(0, length - 1);\n position.column = this.getLine(length - 1).length;\n } else {\n position.row = Math.max(0, position.row);\n position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);\n }\n return position;\n };\n this.insertFullLines = function(row, lines) {\n row = Math.min(Math.max(row, 0), this.getLength());\n var column = 0;\n if (row < this.getLength()) {\n lines = lines.concat([\"\"]);\n column = 0;\n } else {\n lines = [\"\"].concat(lines);\n row--;\n column = this.$lines[row].length;\n }\n this.insertMergedLines({row: row, column: column}, lines);\n }; \n this.insertMergedLines = function(position, lines) {\n var start = this.clippedPos(position.row, position.column);\n var end = {\n row: start.row + lines.length - 1,\n column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length\n };\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: lines\n });\n \n return this.clonePos(end);\n };\n this.remove = function(range) {\n var start = this.clippedPos(range.start.row, range.start.column);\n var end = this.clippedPos(range.end.row, range.end.column);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n });\n return this.clonePos(start);\n };\n this.removeInLine = function(row, startColumn, endColumn) {\n var start = this.clippedPos(row, startColumn);\n var end = this.clippedPos(row, endColumn);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n }, true);\n \n return this.clonePos(start);\n };\n this.removeFullLines = function(firstRow, lastRow) {\n firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);\n lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);\n var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;\n var deleteLastNewLine = lastRow < this.getLength() - 1;\n var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );\n var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );\n var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );\n var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); \n var range = new Range(startRow, startCol, endRow, endCol);\n var deletedLines = this.$lines.slice(firstRow, lastRow + 1);\n \n this.applyDelta({\n start: range.start,\n end: range.end,\n action: \"remove\",\n lines: this.getLinesForRange(range)\n });\n return deletedLines;\n };\n this.removeNewLine = function(row) {\n if (row < this.getLength() - 1 && row >= 0) {\n this.applyDelta({\n start: this.pos(row, this.getLine(row).length),\n end: this.pos(row + 1, 0),\n action: \"remove\",\n lines: [\"\", \"\"]\n });\n }\n };\n this.replace = function(range, text) {\n if (!(range instanceof Range))\n range = Range.fromPoints(range.start, range.end);\n if (text.length === 0 && range.isEmpty())\n return range.start;\n if (text == this.getTextRange(range))\n return range.end;\n\n this.remove(range);\n var end;\n if (text) {\n end = this.insert(range.start, text);\n }\n else {\n end = range.start;\n }\n \n return end;\n };\n this.applyDeltas = function(deltas) {\n for (var i=0; i=0; i--) {\n this.revertDelta(deltas[i]);\n }\n };\n this.applyDelta = function(delta, doNotValidate) {\n var isInsert = delta.action == \"insert\";\n if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]\n : !Range.comparePoints(delta.start, delta.end)) {\n return;\n }\n \n if (isInsert && delta.lines.length > 20000)\n this.$splitAndapplyLargeDelta(delta, 20000);\n applyDelta(this.$lines, delta, doNotValidate);\n this._signal(\"change\", delta);\n };\n \n this.$splitAndapplyLargeDelta = function(delta, MAX) {\n var lines = delta.lines;\n var l = lines.length;\n var row = delta.start.row; \n var column = delta.start.column;\n var from = 0, to = 0;\n do {\n from = to;\n to += MAX - 1;\n var chunk = lines.slice(from, to);\n if (to > l) {\n delta.lines = chunk;\n delta.start.row = row + from;\n delta.start.column = column;\n break;\n }\n chunk.push(\"\");\n this.applyDelta({\n start: this.pos(row + from, column),\n end: this.pos(row + to, column = 0),\n action: delta.action,\n lines: chunk\n }, true);\n } while(true);\n };\n this.revertDelta = function(delta) {\n this.applyDelta({\n start: this.clonePos(delta.start),\n end: this.clonePos(delta.end),\n action: (delta.action == \"insert\" ? \"remove\" : \"insert\"),\n lines: delta.lines.slice()\n });\n };\n this.indexToPosition = function(index, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n for (var i = startRow || 0, l = lines.length; i < l; i++) {\n index -= lines[i].length + newlineLength;\n if (index < 0)\n return {row: i, column: index + lines[i].length + newlineLength};\n }\n return {row: l-1, column: lines[l-1].length};\n };\n this.positionToIndex = function(pos, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n var index = 0;\n var row = Math.min(pos.row, lines.length);\n for (var i = startRow || 0; i < row; ++i)\n index += lines[i].length + newlineLength;\n\n return index + pos.column;\n };\n\n}).call(Document.prototype);\n\nexports.Document = Document;\n});\n\nace.define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar BackgroundTokenizer = function(tokenizer, editor) {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.tokenizer = tokenizer;\n\n var self = this;\n\n this.$worker = function() {\n if (!self.running) { return; }\n\n var workerStart = new Date();\n var currentLine = self.currentLine;\n var endLine = -1;\n var doc = self.doc;\n\n var startLine = currentLine;\n while (self.lines[currentLine])\n currentLine++;\n \n var len = doc.getLength();\n var processedLines = 0;\n self.running = false;\n while (currentLine < len) {\n self.$tokenizeRow(currentLine);\n endLine = currentLine;\n do {\n currentLine++;\n } while (self.lines[currentLine]);\n processedLines ++;\n if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { \n self.running = setTimeout(self.$worker, 20);\n break;\n }\n }\n self.currentLine = currentLine;\n \n if (endLine == -1)\n endLine = currentLine;\n\n if (startLine <= endLine)\n self.fireUpdateEvent(startLine, endLine);\n };\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n this.setTokenizer = function(tokenizer) {\n this.tokenizer = tokenizer;\n this.lines = [];\n this.states = [];\n\n this.start(0);\n };\n this.setDocument = function(doc) {\n this.doc = doc;\n this.lines = [];\n this.states = [];\n\n this.stop();\n };\n this.fireUpdateEvent = function(firstRow, lastRow) {\n var data = {\n first: firstRow,\n last: lastRow\n };\n this._signal(\"update\", {data: data});\n };\n this.start = function(startRow) {\n this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());\n this.lines.splice(this.currentLine, this.lines.length);\n this.states.splice(this.currentLine, this.states.length);\n\n this.stop();\n this.running = setTimeout(this.$worker, 700);\n };\n \n this.scheduleStart = function() {\n if (!this.running)\n this.running = setTimeout(this.$worker, 700);\n };\n\n this.$updateOnChange = function(delta) {\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n this.lines[startRow] = null;\n } else if (delta.action == \"remove\") {\n this.lines.splice(startRow, len + 1, null);\n this.states.splice(startRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(startRow, 1);\n this.lines.splice.apply(this.lines, args);\n this.states.splice.apply(this.states, args);\n }\n\n this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());\n\n this.stop();\n };\n this.stop = function() {\n if (this.running)\n clearTimeout(this.running);\n this.running = false;\n };\n this.getTokens = function(row) {\n return this.lines[row] || this.$tokenizeRow(row);\n };\n this.getState = function(row) {\n if (this.currentLine == row)\n this.$tokenizeRow(row);\n return this.states[row] || \"start\";\n };\n\n this.$tokenizeRow = function(row) {\n var line = this.doc.getLine(row);\n var state = this.states[row - 1];\n\n var data = this.tokenizer.getLineTokens(line, state, row);\n\n if (this.states[row] + \"\" !== data.state + \"\") {\n this.states[row] = data.state;\n this.lines[row + 1] = null;\n if (this.currentLine > row + 1)\n this.currentLine = row + 1;\n } else if (this.currentLine == row) {\n this.currentLine = row + 1;\n }\n\n return this.lines[row] = data.tokens;\n };\n\n}).call(BackgroundTokenizer.prototype);\n\nexports.BackgroundTokenizer = BackgroundTokenizer;\n});\n\nace.define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar SearchHighlight = function(regExp, clazz, type) {\n this.setRegexp(regExp);\n this.clazz = clazz;\n this.type = type || \"text\";\n};\n\n(function() {\n this.MAX_RANGES = 500;\n \n this.setRegexp = function(regExp) {\n if (this.regExp+\"\" == regExp+\"\")\n return;\n this.regExp = regExp;\n this.cache = [];\n };\n\n this.update = function(html, markerLayer, session, config) {\n if (!this.regExp)\n return;\n var start = config.firstRow, end = config.lastRow;\n\n for (var i = start; i <= end; i++) {\n var ranges = this.cache[i];\n if (ranges == null) {\n ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);\n if (ranges.length > this.MAX_RANGES)\n ranges = ranges.slice(0, this.MAX_RANGES);\n ranges = ranges.map(function(match) {\n return new Range(i, match.offset, i, match.offset + match.length);\n });\n this.cache[i] = ranges.length ? ranges : \"\";\n }\n\n for (var j = ranges.length; j --; ) {\n markerLayer.drawSingleLineMarker(\n html, ranges[j].toScreenRange(session), this.clazz, config);\n }\n }\n };\n\n}).call(SearchHighlight.prototype);\n\nexports.SearchHighlight = SearchHighlight;\n});\n\nace.define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nfunction FoldLine(foldData, folds) {\n this.foldData = foldData;\n if (Array.isArray(folds)) {\n this.folds = folds;\n } else {\n folds = this.folds = [ folds ];\n }\n\n var last = folds[folds.length - 1];\n this.range = new Range(folds[0].start.row, folds[0].start.column,\n last.end.row, last.end.column);\n this.start = this.range.start;\n this.end = this.range.end;\n\n this.folds.forEach(function(fold) {\n fold.setFoldLine(this);\n }, this);\n}\n\n(function() {\n this.shiftRow = function(shift) {\n this.start.row += shift;\n this.end.row += shift;\n this.folds.forEach(function(fold) {\n fold.start.row += shift;\n fold.end.row += shift;\n });\n };\n\n this.addFold = function(fold) {\n if (fold.sameRow) {\n if (fold.start.row < this.startRow || fold.endRow > this.endRow) {\n throw new Error(\"Can't add a fold to this FoldLine as it has no connection\");\n }\n this.folds.push(fold);\n this.folds.sort(function(a, b) {\n return -a.range.compareEnd(b.start.row, b.start.column);\n });\n if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n } else if (fold.start.row == this.end.row) {\n this.folds.push(fold);\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (fold.end.row == this.start.row) {\n this.folds.unshift(fold);\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n } else {\n throw new Error(\"Trying to add fold to FoldRow that doesn't have a matching row\");\n }\n fold.foldLine = this;\n };\n\n this.containsRow = function(row) {\n return row >= this.start.row && row <= this.end.row;\n };\n\n this.walk = function(callback, endRow, endColumn) {\n var lastEnd = 0,\n folds = this.folds,\n fold,\n cmp, stop, isNewRow = true;\n\n if (endRow == null) {\n endRow = this.end.row;\n endColumn = this.end.column;\n }\n\n for (var i = 0; i < folds.length; i++) {\n fold = folds[i];\n\n cmp = fold.range.compareStart(endRow, endColumn);\n if (cmp == -1) {\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n return;\n }\n\n stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);\n stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);\n if (stop || cmp === 0) {\n return;\n }\n isNewRow = !fold.sameRow;\n lastEnd = fold.end.column;\n }\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n };\n\n this.getNextFoldTo = function(row, column) {\n var fold, cmp;\n for (var i = 0; i < this.folds.length; i++) {\n fold = this.folds[i];\n cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n return {\n fold: fold,\n kind: \"after\"\n };\n } else if (cmp === 0) {\n return {\n fold: fold,\n kind: \"inside\"\n };\n }\n }\n return null;\n };\n\n this.addRemoveChars = function(row, column, len) {\n var ret = this.getNextFoldTo(row, column),\n fold, folds;\n if (ret) {\n fold = ret.fold;\n if (ret.kind == \"inside\"\n && fold.start.column != column\n && fold.start.row != row)\n {\n window.console && window.console.log(row, column, fold);\n } else if (fold.start.row == row) {\n folds = this.folds;\n var i = folds.indexOf(fold);\n if (i === 0) {\n this.start.column += len;\n }\n for (i; i < folds.length; i++) {\n fold = folds[i];\n fold.start.column += len;\n if (!fold.sameRow) {\n return;\n }\n fold.end.column += len;\n }\n this.end.column += len;\n }\n }\n };\n\n this.split = function(row, column) {\n var pos = this.getNextFoldTo(row, column);\n \n if (!pos || pos.kind == \"inside\")\n return null;\n \n var fold = pos.fold;\n var folds = this.folds;\n var foldData = this.foldData;\n \n var i = folds.indexOf(fold);\n var foldBefore = folds[i - 1];\n this.end.row = foldBefore.end.row;\n this.end.column = foldBefore.end.column;\n folds = folds.splice(i, folds.length - i);\n\n var newFoldLine = new FoldLine(foldData, folds);\n foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);\n return newFoldLine;\n };\n\n this.merge = function(foldLineNext) {\n var folds = foldLineNext.folds;\n for (var i = 0; i < folds.length; i++) {\n this.addFold(folds[i]);\n }\n var foldData = this.foldData;\n foldData.splice(foldData.indexOf(foldLineNext), 1);\n };\n\n this.toString = function() {\n var ret = [this.range.toString() + \": [\" ];\n\n this.folds.forEach(function(fold) {\n ret.push(\" \" + fold.toString());\n });\n ret.push(\"]\");\n return ret.join(\"\\n\");\n };\n\n this.idxToPosition = function(idx) {\n var lastFoldEndColumn = 0;\n\n for (var i = 0; i < this.folds.length; i++) {\n var fold = this.folds[i];\n\n idx -= fold.start.column - lastFoldEndColumn;\n if (idx < 0) {\n return {\n row: fold.start.row,\n column: fold.start.column + idx\n };\n }\n\n idx -= fold.placeholder.length;\n if (idx < 0) {\n return fold.start;\n }\n\n lastFoldEndColumn = fold.end.column;\n }\n\n return {\n row: this.end.row,\n column: this.end.column + idx\n };\n };\n}).call(FoldLine.prototype);\n\nexports.FoldLine = FoldLine;\n});\n\nace.define(\"ace/range_list\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar Range = acequire(\"./range\").Range;\nvar comparePoints = Range.comparePoints;\n\nvar RangeList = function() {\n this.ranges = [];\n};\n\n(function() {\n this.comparePoints = comparePoints;\n\n this.pointIndex = function(pos, excludeEdges, startIndex) {\n var list = this.ranges;\n\n for (var i = startIndex || 0; i < list.length; i++) {\n var range = list[i];\n var cmpEnd = comparePoints(pos, range.end);\n if (cmpEnd > 0)\n continue;\n var cmpStart = comparePoints(pos, range.start);\n if (cmpEnd === 0)\n return excludeEdges && cmpStart !== 0 ? -i-2 : i;\n if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))\n return i;\n\n return -i-1;\n }\n return -i - 1;\n };\n\n this.add = function(range) {\n var excludeEdges = !range.isEmpty();\n var startIndex = this.pointIndex(range.start, excludeEdges);\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n\n var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);\n\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n else\n endIndex++;\n return this.ranges.splice(startIndex, endIndex - startIndex, range);\n };\n\n this.addList = function(list) {\n var removed = [];\n for (var i = list.length; i--; ) {\n removed.push.apply(removed, this.add(list[i]));\n }\n return removed;\n };\n\n this.substractPoint = function(pos) {\n var i = this.pointIndex(pos);\n\n if (i >= 0)\n return this.ranges.splice(i, 1);\n };\n this.merge = function() {\n var removed = [];\n var list = this.ranges;\n \n list = list.sort(function(a, b) {\n return comparePoints(a.start, b.start);\n });\n \n var next = list[0], range;\n for (var i = 1; i < list.length; i++) {\n range = next;\n next = list[i];\n var cmp = comparePoints(range.end, next.start);\n if (cmp < 0)\n continue;\n\n if (cmp == 0 && !range.isEmpty() && !next.isEmpty())\n continue;\n\n if (comparePoints(range.end, next.end) < 0) {\n range.end.row = next.end.row;\n range.end.column = next.end.column;\n }\n\n list.splice(i, 1);\n removed.push(next);\n next = range;\n i--;\n }\n \n this.ranges = list;\n\n return removed;\n };\n\n this.contains = function(row, column) {\n return this.pointIndex({row: row, column: column}) >= 0;\n };\n\n this.containsPoint = function(pos) {\n return this.pointIndex(pos) >= 0;\n };\n\n this.rangeAtPoint = function(pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges[i];\n };\n\n\n this.clipRows = function(startRow, endRow) {\n var list = this.ranges;\n if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)\n return [];\n\n var startIndex = this.pointIndex({row: startRow, column: 0});\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n\n var clipped = [];\n for (var i = startIndex; i < endIndex; i++) {\n clipped.push(list[i]);\n }\n return clipped;\n };\n\n this.removeAll = function() {\n return this.ranges.splice(0, this.ranges.length);\n };\n\n this.attach = function(session) {\n if (this.session)\n this.detach();\n\n this.session = session;\n this.onChange = this.$onChange.bind(this);\n\n this.session.on('change', this.onChange);\n };\n\n this.detach = function() {\n if (!this.session)\n return;\n this.session.removeListener('change', this.onChange);\n this.session = null;\n };\n\n this.$onChange = function(delta) {\n if (delta.action == \"insert\"){\n var start = delta.start;\n var end = delta.end;\n } else {\n var end = delta.start;\n var start = delta.end;\n }\n var startRow = start.row;\n var endRow = end.row;\n var lineDif = endRow - startRow;\n\n var colDiff = -start.column + end.column;\n var ranges = this.ranges;\n\n for (var i = 0, n = ranges.length; i < n; i++) {\n var r = ranges[i];\n if (r.end.row < startRow)\n continue;\n if (r.start.row > startRow)\n break;\n\n if (r.start.row == startRow && r.start.column >= start.column ) {\n if (r.start.column == start.column && this.$insertRight) {\n } else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n if (r.end.row == startRow && r.end.column >= start.column) {\n if (r.end.column == start.column && this.$insertRight) {\n continue;\n }\n if (r.end.column == start.column && colDiff > 0 && i < n - 1) { \n if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)\n r.end.column -= colDiff;\n }\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n\n if (lineDif != 0 && i < n) {\n for (; i < n; i++) {\n var r = ranges[i];\n r.start.row += lineDif;\n r.end.row += lineDif;\n }\n }\n };\n\n}).call(RangeList.prototype);\n\nexports.RangeList = RangeList;\n});\n\nace.define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/range_list\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar RangeList = acequire(\"../range_list\").RangeList;\nvar oop = acequire(\"../lib/oop\");\nvar Fold = exports.Fold = function(range, placeholder) {\n this.foldLine = null;\n this.placeholder = placeholder;\n this.range = range;\n this.start = range.start;\n this.end = range.end;\n\n this.sameRow = range.start.row == range.end.row;\n this.subFolds = this.ranges = [];\n};\n\noop.inherits(Fold, RangeList);\n\n(function() {\n\n this.toString = function() {\n return '\"' + this.placeholder + '\" ' + this.range.toString();\n };\n\n this.setFoldLine = function(foldLine) {\n this.foldLine = foldLine;\n this.subFolds.forEach(function(fold) {\n fold.setFoldLine(foldLine);\n });\n };\n\n this.clone = function() {\n var range = this.range.clone();\n var fold = new Fold(range, this.placeholder);\n this.subFolds.forEach(function(subFold) {\n fold.subFolds.push(subFold.clone());\n });\n fold.collapseChildren = this.collapseChildren;\n return fold;\n };\n\n this.addSubFold = function(fold) {\n if (this.range.isEqual(fold))\n return;\n\n if (!this.range.containsRange(fold))\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n consumeRange(fold, this.start);\n\n var row = fold.start.row, column = fold.start.column;\n for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {\n cmp = this.subFolds[i].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterStart = this.subFolds[i];\n\n if (cmp == 0)\n return afterStart.addSubFold(fold);\n var row = fold.range.end.row, column = fold.range.end.column;\n for (var j = i, cmp = -1; j < this.subFolds.length; j++) {\n cmp = this.subFolds[j].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterEnd = this.subFolds[j];\n\n if (cmp == 0)\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n\n var consumedFolds = this.subFolds.splice(i, j - i, fold);\n fold.setFoldLine(this.foldLine);\n\n return fold;\n };\n \n this.restoreRange = function(range) {\n return restoreRange(range, this.start);\n };\n\n}).call(Fold.prototype);\n\nfunction consumePoint(point, anchor) {\n point.row -= anchor.row;\n if (point.row == 0)\n point.column -= anchor.column;\n}\nfunction consumeRange(range, anchor) {\n consumePoint(range.start, anchor);\n consumePoint(range.end, anchor);\n}\nfunction restorePoint(point, anchor) {\n if (point.row == 0)\n point.column += anchor.column;\n point.row += anchor.row;\n}\nfunction restoreRange(range, anchor) {\n restorePoint(range.start, anchor);\n restorePoint(range.end, anchor);\n}\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar FoldLine = acequire(\"./fold_line\").FoldLine;\nvar Fold = acequire(\"./fold\").Fold;\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\n\nfunction Folding() {\n this.getFoldAt = function(row, column, side) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var folds = foldLine.folds;\n for (var i = 0; i < folds.length; i++) {\n var fold = folds[i];\n if (fold.range.contains(row, column)) {\n if (side == 1 && fold.range.isEnd(row, column)) {\n continue;\n } else if (side == -1 && fold.range.isStart(row, column)) {\n continue;\n }\n return fold;\n }\n }\n };\n this.getFoldsInRange = function(range) {\n var start = range.start;\n var end = range.end;\n var foldLines = this.$foldData;\n var foundFolds = [];\n\n start.column += 1;\n end.column -= 1;\n\n for (var i = 0; i < foldLines.length; i++) {\n var cmp = foldLines[i].range.compareRange(range);\n if (cmp == 2) {\n continue;\n }\n else if (cmp == -2) {\n break;\n }\n\n var folds = foldLines[i].folds;\n for (var j = 0; j < folds.length; j++) {\n var fold = folds[j];\n cmp = fold.range.compareRange(range);\n if (cmp == -2) {\n break;\n } else if (cmp == 2) {\n continue;\n } else\n if (cmp == 42) {\n break;\n }\n foundFolds.push(fold);\n }\n }\n start.column -= 1;\n end.column += 1;\n\n return foundFolds;\n };\n\n this.getFoldsInRangeList = function(ranges) {\n if (Array.isArray(ranges)) {\n var folds = [];\n ranges.forEach(function(range) {\n folds = folds.concat(this.getFoldsInRange(range));\n }, this);\n } else {\n var folds = this.getFoldsInRange(ranges);\n }\n return folds;\n };\n this.getAllFolds = function() {\n var folds = [];\n var foldLines = this.$foldData;\n \n for (var i = 0; i < foldLines.length; i++)\n for (var j = 0; j < foldLines[i].folds.length; j++)\n folds.push(foldLines[i].folds[j]);\n\n return folds;\n };\n this.getFoldStringAt = function(row, column, trim, foldLine) {\n foldLine = foldLine || this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var lastFold = {\n end: { column: 0 }\n };\n var str, fold;\n for (var i = 0; i < foldLine.folds.length; i++) {\n fold = foldLine.folds[i];\n var cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n str = this\n .getLine(fold.start.row)\n .substring(lastFold.end.column, fold.start.column);\n break;\n }\n else if (cmp === 0) {\n return null;\n }\n lastFold = fold;\n }\n if (!str)\n str = this.getLine(fold.start.row).substring(lastFold.end.column);\n\n if (trim == -1)\n return str.substring(0, column - lastFold.end.column);\n else if (trim == 1)\n return str.substring(column - lastFold.end.column);\n else\n return str;\n };\n\n this.getFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {\n return foldLine;\n } else if (foldLine.end.row > docRow) {\n return null;\n }\n }\n return null;\n };\n this.getNextFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.end.row >= docRow) {\n return foldLine;\n }\n }\n return null;\n };\n\n this.getFoldedRowCount = function(first, last) {\n var foldData = this.$foldData, rowCount = last-first+1;\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i],\n end = foldLine.end.row,\n start = foldLine.start.row;\n if (end >= last) {\n if (start < last) {\n if (start >= first)\n rowCount -= last-start;\n else\n rowCount = 0; // in one fold\n }\n break;\n } else if (end >= first){\n if (start >= first) // fold inside range\n rowCount -= end-start;\n else\n rowCount -= end-first+1;\n }\n }\n return rowCount;\n };\n\n this.$addFoldLine = function(foldLine) {\n this.$foldData.push(foldLine);\n this.$foldData.sort(function(a, b) {\n return a.start.row - b.start.row;\n });\n return foldLine;\n };\n this.addFold = function(placeholder, range) {\n var foldData = this.$foldData;\n var added = false;\n var fold;\n \n if (placeholder instanceof Fold)\n fold = placeholder;\n else {\n fold = new Fold(range, placeholder);\n fold.collapseChildren = range.collapseChildren;\n }\n this.$clipRangeToDocument(fold.range);\n\n var startRow = fold.start.row;\n var startColumn = fold.start.column;\n var endRow = fold.end.row;\n var endColumn = fold.end.column;\n if (!(startRow < endRow || \n startRow == endRow && startColumn <= endColumn - 2))\n throw new Error(\"The range has to be at least 2 characters width\");\n\n var startFold = this.getFoldAt(startRow, startColumn, 1);\n var endFold = this.getFoldAt(endRow, endColumn, -1);\n if (startFold && endFold == startFold)\n return startFold.addSubFold(fold);\n\n if (startFold && !startFold.range.isStart(startRow, startColumn))\n this.removeFold(startFold);\n \n if (endFold && !endFold.range.isEnd(endRow, endColumn))\n this.removeFold(endFold);\n var folds = this.getFoldsInRange(fold.range);\n if (folds.length > 0) {\n this.removeFolds(folds);\n folds.forEach(function(subFold) {\n fold.addSubFold(subFold);\n });\n }\n\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (endRow == foldLine.start.row) {\n foldLine.addFold(fold);\n added = true;\n break;\n } else if (startRow == foldLine.end.row) {\n foldLine.addFold(fold);\n added = true;\n if (!fold.sameRow) {\n var foldLineNext = foldData[i + 1];\n if (foldLineNext && foldLineNext.start.row == endRow) {\n foldLine.merge(foldLineNext);\n break;\n }\n }\n break;\n } else if (endRow <= foldLine.start.row) {\n break;\n }\n }\n\n if (!added)\n foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));\n\n if (this.$useWrapMode)\n this.$updateWrapData(foldLine.start.row, foldLine.start.row);\n else\n this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"add\" });\n\n return fold;\n };\n\n this.addFolds = function(folds) {\n folds.forEach(function(fold) {\n this.addFold(fold);\n }, this);\n };\n\n this.removeFold = function(fold) {\n var foldLine = fold.foldLine;\n var startRow = foldLine.start.row;\n var endRow = foldLine.end.row;\n\n var foldLines = this.$foldData;\n var folds = foldLine.folds;\n if (folds.length == 1) {\n foldLines.splice(foldLines.indexOf(foldLine), 1);\n } else\n if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {\n folds.pop();\n foldLine.end.row = folds[folds.length - 1].end.row;\n foldLine.end.column = folds[folds.length - 1].end.column;\n } else\n if (foldLine.range.isStart(fold.start.row, fold.start.column)) {\n folds.shift();\n foldLine.start.row = folds[0].start.row;\n foldLine.start.column = folds[0].start.column;\n } else\n if (fold.sameRow) {\n folds.splice(folds.indexOf(fold), 1);\n } else\n {\n var newFoldLine = foldLine.split(fold.start.row, fold.start.column);\n folds = newFoldLine.folds;\n folds.shift();\n newFoldLine.start.row = folds[0].start.row;\n newFoldLine.start.column = folds[0].start.column;\n }\n\n if (!this.$updating) {\n if (this.$useWrapMode)\n this.$updateWrapData(startRow, endRow);\n else\n this.$updateRowLengthCache(startRow, endRow);\n }\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"remove\" });\n };\n\n this.removeFolds = function(folds) {\n var cloneFolds = [];\n for (var i = 0; i < folds.length; i++) {\n cloneFolds.push(folds[i]);\n }\n\n cloneFolds.forEach(function(fold) {\n this.removeFold(fold);\n }, this);\n this.$modified = true;\n };\n\n this.expandFold = function(fold) {\n this.removeFold(fold);\n fold.subFolds.forEach(function(subFold) {\n fold.restoreRange(subFold);\n this.addFold(subFold);\n }, this);\n if (fold.collapseChildren > 0) {\n this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1);\n }\n fold.subFolds = [];\n };\n\n this.expandFolds = function(folds) {\n folds.forEach(function(fold) {\n this.expandFold(fold);\n }, this);\n };\n\n this.unfold = function(location, expandInner) {\n var range, folds;\n if (location == null) {\n range = new Range(0, 0, this.getLength(), 0);\n expandInner = true;\n } else if (typeof location == \"number\")\n range = new Range(location, 0, location, this.getLine(location).length);\n else if (\"row\" in location)\n range = Range.fromPoints(location, location);\n else\n range = location;\n \n folds = this.getFoldsInRangeList(range);\n if (expandInner) {\n this.removeFolds(folds);\n } else {\n var subFolds = folds;\n while (subFolds.length) {\n this.expandFolds(subFolds);\n subFolds = this.getFoldsInRangeList(range);\n }\n }\n if (folds.length)\n return folds;\n };\n this.isRowFolded = function(docRow, startFoldRow) {\n return !!this.getFoldLine(docRow, startFoldRow);\n };\n\n this.getRowFoldEnd = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.end.row : docRow;\n };\n\n this.getRowFoldStart = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.start.row : docRow;\n };\n\n this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {\n if (startRow == null)\n startRow = foldLine.start.row;\n if (startColumn == null)\n startColumn = 0;\n if (endRow == null)\n endRow = foldLine.end.row;\n if (endColumn == null)\n endColumn = this.getLine(endRow).length;\n var doc = this.doc;\n var textLine = \"\";\n\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n if (row < startRow)\n return;\n if (row == startRow) {\n if (column < startColumn)\n return;\n lastColumn = Math.max(startColumn, lastColumn);\n }\n\n if (placeholder != null) {\n textLine += placeholder;\n } else {\n textLine += doc.getLine(row).substring(lastColumn, column);\n }\n }, endRow, endColumn);\n return textLine;\n };\n\n this.getDisplayLine = function(row, endColumn, startRow, startColumn) {\n var foldLine = this.getFoldLine(row);\n\n if (!foldLine) {\n var line;\n line = this.doc.getLine(row);\n return line.substring(startColumn || 0, endColumn || line.length);\n } else {\n return this.getFoldDisplayLine(\n foldLine, row, endColumn, startRow, startColumn);\n }\n };\n\n this.$cloneFoldData = function() {\n var fd = [];\n fd = this.$foldData.map(function(foldLine) {\n var folds = foldLine.folds.map(function(fold) {\n return fold.clone();\n });\n return new FoldLine(fd, folds);\n });\n\n return fd;\n };\n\n this.toggleFold = function(tryToUnfold) {\n var selection = this.selection;\n var range = selection.getRange();\n var fold;\n var bracketPos;\n\n if (range.isEmpty()) {\n var cursor = range.start;\n fold = this.getFoldAt(cursor.row, cursor.column);\n\n if (fold) {\n this.expandFold(fold);\n return;\n } else if (bracketPos = this.findMatchingBracket(cursor)) {\n if (range.comparePoint(bracketPos) == 1) {\n range.end = bracketPos;\n } else {\n range.start = bracketPos;\n range.start.column++;\n range.end.column--;\n }\n } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {\n if (range.comparePoint(bracketPos) == 1)\n range.end = bracketPos;\n else\n range.start = bracketPos;\n\n range.start.column++;\n } else {\n range = this.getCommentFoldRange(cursor.row, cursor.column) || range;\n }\n } else {\n var folds = this.getFoldsInRange(range);\n if (tryToUnfold && folds.length) {\n this.expandFolds(folds);\n return;\n } else if (folds.length == 1 ) {\n fold = folds[0];\n }\n }\n\n if (!fold)\n fold = this.getFoldAt(range.start.row, range.start.column);\n\n if (fold && fold.range.toString() == range.toString()) {\n this.expandFold(fold);\n return;\n }\n\n var placeholder = \"...\";\n if (!range.isMultiLine()) {\n placeholder = this.getTextRange(range);\n if (placeholder.length < 4)\n return;\n placeholder = placeholder.trim().substring(0, 2) + \"..\";\n }\n\n this.addFold(placeholder, range);\n };\n\n this.getCommentFoldRange = function(row, column, dir) {\n var iterator = new TokenIterator(this, row, column);\n var token = iterator.getCurrentToken();\n var type = token.type;\n if (token && /^comment|string/.test(type)) {\n type = type.match(/comment|string/)[0];\n if (type == \"comment\")\n type += \"|doc-start\";\n var re = new RegExp(type);\n var range = new Range();\n if (dir != 1) {\n do {\n token = iterator.stepBackward();\n } while (token && re.test(token.type));\n iterator.stepForward();\n }\n \n range.start.row = iterator.getCurrentTokenRow();\n range.start.column = iterator.getCurrentTokenColumn() + 2;\n\n iterator = new TokenIterator(this, row, column);\n \n if (dir != -1) {\n var lastRow = -1;\n do {\n token = iterator.stepForward();\n if (lastRow == -1) {\n var state = this.getState(iterator.$row);\n if (!re.test(state))\n lastRow = iterator.$row;\n } else if (iterator.$row > lastRow) {\n break;\n }\n } while (token && re.test(token.type));\n token = iterator.stepBackward();\n } else\n token = iterator.getCurrentToken();\n\n range.end.row = iterator.getCurrentTokenRow();\n range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;\n return range;\n }\n };\n\n this.foldAll = function(startRow, endRow, depth) {\n if (depth == undefined)\n depth = 100000; // JSON.stringify doesn't hanle Infinity\n var foldWidgets = this.foldWidgets;\n if (!foldWidgets)\n return; // mode doesn't support folding\n endRow = endRow || this.getLength();\n startRow = startRow || 0;\n for (var row = startRow; row < endRow; row++) {\n if (foldWidgets[row] == null)\n foldWidgets[row] = this.getFoldWidget(row);\n if (foldWidgets[row] != \"start\")\n continue;\n\n var range = this.getFoldWidgetRange(row);\n if (range && range.isMultiLine()\n && range.end.row <= endRow\n && range.start.row >= startRow\n ) {\n row = range.end.row;\n try {\n var fold = this.addFold(\"...\", range);\n if (fold)\n fold.collapseChildren = depth;\n } catch(e) {}\n }\n }\n };\n this.$foldStyles = {\n \"manual\": 1,\n \"markbegin\": 1,\n \"markbeginend\": 1\n };\n this.$foldStyle = \"markbegin\";\n this.setFoldStyle = function(style) {\n if (!this.$foldStyles[style])\n throw new Error(\"invalid fold style: \" + style + \"[\" + Object.keys(this.$foldStyles).join(\", \") + \"]\");\n \n if (this.$foldStyle == style)\n return;\n\n this.$foldStyle = style;\n \n if (style == \"manual\")\n this.unfold();\n var mode = this.$foldMode;\n this.$setFolding(null);\n this.$setFolding(mode);\n };\n\n this.$setFolding = function(foldMode) {\n if (this.$foldMode == foldMode)\n return;\n \n this.$foldMode = foldMode;\n \n this.off('change', this.$updateFoldWidgets);\n this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n this._signal(\"changeAnnotation\");\n \n if (!foldMode || this.$foldStyle == \"manual\") {\n this.foldWidgets = null;\n return;\n }\n \n this.foldWidgets = [];\n this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);\n this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);\n \n this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);\n this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);\n this.on('change', this.$updateFoldWidgets);\n this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n };\n\n this.getParentFoldRangeData = function (row, ignoreCurrent) {\n var fw = this.foldWidgets;\n if (!fw || (ignoreCurrent && fw[row]))\n return {};\n\n var i = row - 1, firstRange;\n while (i >= 0) {\n var c = fw[i];\n if (c == null)\n c = fw[i] = this.getFoldWidget(i);\n\n if (c == \"start\") {\n var range = this.getFoldWidgetRange(i);\n if (!firstRange)\n firstRange = range;\n if (range && range.end.row >= row)\n break;\n }\n i--;\n }\n\n return {\n range: i !== -1 && range,\n firstRange: firstRange\n };\n };\n\n this.onFoldWidgetClick = function(row, e) {\n e = e.domEvent;\n var options = {\n children: e.shiftKey,\n all: e.ctrlKey || e.metaKey,\n siblings: e.altKey\n };\n \n var range = this.$toggleFoldWidget(row, options);\n if (!range) {\n var el = (e.target || e.srcElement);\n if (el && /ace_fold-widget/.test(el.className))\n el.className += \" ace_invalid\";\n }\n };\n \n this.$toggleFoldWidget = function(row, options) {\n if (!this.getFoldWidget)\n return;\n var type = this.getFoldWidget(row);\n var line = this.getLine(row);\n\n var dir = type === \"end\" ? -1 : 1;\n var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);\n\n if (fold) {\n if (options.children || options.all)\n this.removeFold(fold);\n else\n this.expandFold(fold);\n return fold;\n }\n\n var range = this.getFoldWidgetRange(row, true);\n if (range && !range.isMultiLine()) {\n fold = this.getFoldAt(range.start.row, range.start.column, 1);\n if (fold && range.isEqual(fold.range)) {\n this.removeFold(fold);\n return fold;\n }\n }\n \n if (options.siblings) {\n var data = this.getParentFoldRangeData(row);\n if (data.range) {\n var startRow = data.range.start.row + 1;\n var endRow = data.range.end.row;\n }\n this.foldAll(startRow, endRow, options.all ? 10000 : 0);\n } else if (options.children) {\n endRow = range ? range.end.row : this.getLength();\n this.foldAll(row + 1, endRow, options.all ? 10000 : 0);\n } else if (range) {\n if (options.all) \n range.collapseChildren = 10000;\n this.addFold(\"...\", range);\n }\n \n return range;\n };\n \n \n \n this.toggleFoldWidget = function(toggleParent) {\n var row = this.selection.getCursor().row;\n row = this.getRowFoldStart(row);\n var range = this.$toggleFoldWidget(row, {});\n \n if (range)\n return;\n var data = this.getParentFoldRangeData(row, true);\n range = data.range || data.firstRange;\n \n if (range) {\n row = range.start.row;\n var fold = this.getFoldAt(row, this.getLine(row).length, 1);\n\n if (fold) {\n this.removeFold(fold);\n } else {\n this.addFold(\"...\", range);\n }\n }\n };\n\n this.updateFoldWidgets = function(delta) {\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n\n if (len === 0) {\n this.foldWidgets[firstRow] = null;\n } else if (delta.action == 'remove') {\n this.foldWidgets.splice(firstRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(firstRow, 1);\n this.foldWidgets.splice.apply(this.foldWidgets, args);\n }\n };\n this.tokenizerUpdateFoldWidgets = function(e) {\n var rows = e.data;\n if (rows.first != rows.last) {\n if (this.foldWidgets.length > rows.first)\n this.foldWidgets.splice(rows.first, this.foldWidgets.length);\n }\n };\n}\n\nexports.Folding = Folding;\n\n});\n\nace.define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\n\nfunction BracketMatch() {\n\n this.findMatchingBracket = function(position, chr) {\n if (position.column == 0) return null;\n\n var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1);\n if (charBeforeCursor == \"\") return null;\n\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match)\n return null;\n\n if (match[1])\n return this.$findClosingBracket(match[1], position);\n else\n return this.$findOpeningBracket(match[2], position);\n };\n \n this.getBracketRange = function(pos) {\n var line = this.getLine(pos.row);\n var before = true, range;\n\n var chr = line.charAt(pos.column-1);\n var match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) {\n chr = line.charAt(pos.column);\n pos = {row: pos.row, column: pos.column + 1};\n match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n before = false;\n }\n if (!match)\n return null;\n\n if (match[1]) {\n var bracketPos = this.$findClosingBracket(match[1], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(pos, bracketPos);\n if (!before) {\n range.end.column++;\n range.start.column--;\n }\n range.cursor = range.end;\n } else {\n var bracketPos = this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(bracketPos, pos);\n if (!before) {\n range.start.column++;\n range.end.column--;\n }\n range.cursor = range.start;\n }\n \n return range;\n };\n\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\"\n };\n\n this.$findOpeningBracket = function(bracket, position, typeRe) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n \n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"rparen\", \".paren\")\n .replace(/\\b(?:end)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n \n while (true) {\n \n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n if (chr == openBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex -= 1;\n }\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n \n value = token.value;\n valueIndex = value.length - 1;\n }\n \n return null;\n };\n\n this.$findClosingBracket = function(bracket, position, typeRe) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n\n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"lparen\", \".paren\")\n .replace(/\\b(?:start|begin)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n\n while (true) {\n\n var value = token.value;\n var valueLength = value.length;\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n if (chr == closingBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex += 1;\n }\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n\n valueIndex = 0;\n }\n \n return null;\n };\n}\nexports.BracketMatch = BracketMatch;\n\n});\n\nace.define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/bidihandler\",\"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, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar BidiHandler = acequire(\"./bidihandler\").BidiHandler;\nvar config = acequire(\"./config\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Selection = acequire(\"./selection\").Selection;\nvar TextMode = acequire(\"./mode/text\").Mode;\nvar Range = acequire(\"./range\").Range;\nvar Document = acequire(\"./document\").Document;\nvar BackgroundTokenizer = acequire(\"./background_tokenizer\").BackgroundTokenizer;\nvar SearchHighlight = acequire(\"./search_highlight\").SearchHighlight;\n\nvar EditSession = function(text, mode) {\n this.$breakpoints = [];\n this.$decorations = [];\n this.$frontMarkers = {};\n this.$backMarkers = {};\n this.$markerId = 1;\n this.$undoSelect = true;\n\n this.$foldData = [];\n this.id = \"session\" + (++EditSession.$uid);\n this.$foldData.toString = function() {\n return this.join(\"\\n\");\n };\n this.on(\"changeFold\", this.onChangeFold.bind(this));\n this.$onChange = this.onChange.bind(this);\n\n if (typeof text != \"object\" || !text.getLine)\n text = new Document(text);\n\n this.$bidiHandler = new BidiHandler(this);\n this.setDocument(text);\n this.selection = new Selection(this);\n\n config.resetOptions(this);\n this.setMode(mode);\n config._signal(\"session\", this);\n};\n\n\nEditSession.$uid = 0;\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setDocument = function(doc) {\n if (this.doc)\n this.doc.removeListener(\"change\", this.$onChange);\n\n this.doc = doc;\n doc.on(\"change\", this.$onChange);\n\n if (this.bgTokenizer)\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.resetCaches();\n };\n this.getDocument = function() {\n return this.doc;\n };\n this.$resetRowCache = function(docRow) {\n if (!docRow) {\n this.$docRowCache = [];\n this.$screenRowCache = [];\n return;\n }\n var l = this.$docRowCache.length;\n var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;\n if (l > i) {\n this.$docRowCache.splice(i, l);\n this.$screenRowCache.splice(i, l);\n }\n };\n\n this.$getRowCacheIndex = function(cacheArray, val) {\n var low = 0;\n var hi = cacheArray.length - 1;\n\n while (low <= hi) {\n var mid = (low + hi) >> 1;\n var c = cacheArray[mid];\n\n if (val > c)\n low = mid + 1;\n else if (val < c)\n hi = mid - 1;\n else\n return mid;\n }\n\n return low -1;\n };\n\n this.resetCaches = function() {\n this.$modified = true;\n this.$wrapData = [];\n this.$rowLengthCache = [];\n this.$resetRowCache(0);\n if (this.bgTokenizer)\n this.bgTokenizer.start(0);\n };\n\n this.onChangeFold = function(e) {\n var fold = e.data;\n this.$resetRowCache(fold.start.row);\n };\n\n this.onChange = function(delta) {\n this.$modified = true;\n this.$bidiHandler.onChange(delta);\n this.$resetRowCache(delta.start.row);\n\n var removedFolds = this.$updateInternalDataOnChange(delta);\n if (!this.$fromUndo && this.$undoManager && !delta.ignore) {\n this.$deltasDoc.push(delta);\n if (removedFolds && removedFolds.length != 0) {\n this.$deltasFold.push({\n action: \"removeFolds\",\n folds: removedFolds\n });\n }\n\n this.$informUndoManager.schedule();\n }\n\n this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta);\n this._signal(\"change\", delta);\n };\n this.setValue = function(text) {\n this.doc.setValue(text);\n this.selection.moveTo(0, 0);\n\n this.$resetRowCache(0);\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n this.setUndoManager(this.$undoManager);\n this.getUndoManager().reset();\n };\n this.getValue =\n this.toString = function() {\n return this.doc.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.getState = function(row) {\n return this.bgTokenizer.getState(row);\n };\n this.getTokens = function(row) {\n return this.bgTokenizer.getTokens(row);\n };\n this.getTokenAt = function(row, column) {\n var tokens = this.bgTokenizer.getTokens(row);\n var token, c = 0;\n if (column == null) {\n var i = tokens.length - 1;\n c = this.getLine(row).length;\n } else {\n for (var i = 0; i < tokens.length; i++) {\n c += tokens[i].value.length;\n if (c >= column)\n break;\n }\n }\n token = tokens[i];\n if (!token)\n return null;\n token.index = i;\n token.start = c - token.value.length;\n return token;\n };\n this.setUndoManager = function(undoManager) {\n this.$undoManager = undoManager;\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n\n if (this.$informUndoManager)\n this.$informUndoManager.cancel();\n\n if (undoManager) {\n var self = this;\n\n this.$syncInformUndoManager = function() {\n self.$informUndoManager.cancel();\n\n if (self.$deltasFold.length) {\n self.$deltas.push({\n group: \"fold\",\n deltas: self.$deltasFold\n });\n self.$deltasFold = [];\n }\n\n if (self.$deltasDoc.length) {\n self.$deltas.push({\n group: \"doc\",\n deltas: self.$deltasDoc\n });\n self.$deltasDoc = [];\n }\n\n if (self.$deltas.length > 0) {\n undoManager.execute({\n action: \"aceupdate\",\n args: [self.$deltas, self],\n merge: self.mergeUndoDeltas\n });\n }\n self.mergeUndoDeltas = false;\n self.$deltas = [];\n };\n this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);\n }\n };\n this.markUndoGroup = function() {\n if (this.$syncInformUndoManager)\n this.$syncInformUndoManager();\n };\n \n this.$defaultUndoManager = {\n undo: function() {},\n redo: function() {},\n reset: function() {}\n };\n this.getUndoManager = function() {\n return this.$undoManager || this.$defaultUndoManager;\n };\n this.getTabString = function() {\n if (this.getUseSoftTabs()) {\n return lang.stringRepeat(\" \", this.getTabSize());\n } else {\n return \"\\t\";\n }\n };\n this.setUseSoftTabs = function(val) {\n this.setOption(\"useSoftTabs\", val);\n };\n this.getUseSoftTabs = function() {\n return this.$useSoftTabs && !this.$mode.$indentWithTabs;\n };\n this.setTabSize = function(tabSize) {\n this.setOption(\"tabSize\", tabSize);\n };\n this.getTabSize = function() {\n return this.$tabSize;\n };\n this.isTabStop = function(position) {\n return this.$useSoftTabs && (position.column % this.$tabSize === 0);\n };\n this.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) {\n this.setOption(\"navigateWithinSoftTabs\", navigateWithinSoftTabs);\n };\n this.getNavigateWithinSoftTabs = function() {\n return this.$navigateWithinSoftTabs;\n };\n\n this.$overwrite = false;\n this.setOverwrite = function(overwrite) {\n this.setOption(\"overwrite\", overwrite);\n };\n this.getOverwrite = function() {\n return this.$overwrite;\n };\n this.toggleOverwrite = function() {\n this.setOverwrite(!this.$overwrite);\n };\n this.addGutterDecoration = function(row, className) {\n if (!this.$decorations[row])\n this.$decorations[row] = \"\";\n this.$decorations[row] += \" \" + className;\n this._signal(\"changeBreakpoint\", {});\n };\n this.removeGutterDecoration = function(row, className) {\n this.$decorations[row] = (this.$decorations[row] || \"\").replace(\" \" + className, \"\");\n this._signal(\"changeBreakpoint\", {});\n };\n this.getBreakpoints = function() {\n return this.$breakpoints;\n };\n this.setBreakpoints = function(rows) {\n this.$breakpoints = [];\n for (var i=0; i 0)\n inToken = !!line.charAt(column - 1).match(this.tokenRe);\n\n if (!inToken)\n inToken = !!line.charAt(column).match(this.tokenRe);\n\n if (inToken)\n var re = this.tokenRe;\n else if (/^\\s+$/.test(line.slice(column-1, column+1)))\n var re = /\\s/;\n else\n var re = this.nonTokenRe;\n\n var start = column;\n if (start > 0) {\n do {\n start--;\n }\n while (start >= 0 && line.charAt(start).match(re));\n start++;\n }\n\n var end = column;\n while (end < line.length && line.charAt(end).match(re)) {\n end++;\n }\n\n return new Range(row, start, row, end);\n };\n this.getAWordRange = function(row, column) {\n var wordRange = this.getWordRange(row, column);\n var line = this.getLine(wordRange.end.row);\n\n while (line.charAt(wordRange.end.column).match(/[ \\t]/)) {\n wordRange.end.column += 1;\n }\n return wordRange;\n };\n this.setNewLineMode = function(newLineMode) {\n this.doc.setNewLineMode(newLineMode);\n };\n this.getNewLineMode = function() {\n return this.doc.getNewLineMode();\n };\n this.setUseWorker = function(useWorker) { this.setOption(\"useWorker\", useWorker); };\n this.getUseWorker = function() { return this.$useWorker; };\n this.onReloadTokenizer = function(e) {\n var rows = e.data;\n this.bgTokenizer.start(rows.first);\n this._signal(\"tokenizerUpdate\", e);\n };\n\n this.$modes = {};\n this.$mode = null;\n this.$modeId = null;\n this.setMode = function(mode, cb) {\n if (mode && typeof mode === \"object\") {\n if (mode.getTokenizer)\n return this.$onChangeMode(mode);\n var options = mode;\n var path = options.path;\n } else {\n path = mode || \"ace/mode/text\";\n }\n if (!this.$modes[\"ace/mode/text\"])\n this.$modes[\"ace/mode/text\"] = new TextMode();\n\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n cb && cb();\n return;\n }\n this.$modeId = path;\n config.loadModule([\"mode\", path], function(m) {\n if (this.$modeId !== path)\n return cb && cb();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n } else if (m && m.Mode) {\n m = new m.Mode(options);\n if (!options) {\n this.$modes[path] = m;\n m.$id = path;\n }\n this.$onChangeMode(m);\n }\n cb && cb();\n }.bind(this));\n if (!this.$mode)\n this.$onChangeMode(this.$modes[\"ace/mode/text\"], true);\n };\n\n this.$onChangeMode = function(mode, $isPlaceholder) {\n if (!$isPlaceholder)\n this.$modeId = mode.$id;\n if (this.$mode === mode) \n return;\n\n this.$mode = mode;\n\n this.$stopWorker();\n\n if (this.$useWorker)\n this.$startWorker();\n\n var tokenizer = mode.getTokenizer();\n\n if(tokenizer.addEventListener !== undefined) {\n var onReloadTokenizer = this.onReloadTokenizer.bind(this);\n tokenizer.addEventListener(\"update\", onReloadTokenizer);\n }\n\n if (!this.bgTokenizer) {\n this.bgTokenizer = new BackgroundTokenizer(tokenizer);\n var _self = this;\n this.bgTokenizer.addEventListener(\"update\", function(e) {\n _self._signal(\"tokenizerUpdate\", e);\n });\n } else {\n this.bgTokenizer.setTokenizer(tokenizer);\n }\n\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.tokenRe = mode.tokenRe;\n this.nonTokenRe = mode.nonTokenRe;\n\n \n if (!$isPlaceholder) {\n if (mode.attachToSession)\n mode.attachToSession(this);\n this.$options.wrapMethod.set.call(this, this.$wrapMethod);\n this.$setFolding(mode.foldingRules);\n this.bgTokenizer.start(0);\n this._emit(\"changeMode\");\n }\n };\n\n this.$stopWorker = function() {\n if (this.$worker) {\n this.$worker.terminate();\n this.$worker = null;\n }\n };\n\n this.$startWorker = function() {\n try {\n this.$worker = this.$mode.createWorker(this);\n } catch (e) {\n config.warn(\"Could not load worker\", e);\n this.$worker = null;\n }\n };\n this.getMode = function() {\n return this.$mode;\n };\n\n this.$scrollTop = 0;\n this.setScrollTop = function(scrollTop) {\n if (this.$scrollTop === scrollTop || isNaN(scrollTop))\n return;\n\n this.$scrollTop = scrollTop;\n this._signal(\"changeScrollTop\", scrollTop);\n };\n this.getScrollTop = function() {\n return this.$scrollTop;\n };\n\n this.$scrollLeft = 0;\n this.setScrollLeft = function(scrollLeft) {\n if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))\n return;\n\n this.$scrollLeft = scrollLeft;\n this._signal(\"changeScrollLeft\", scrollLeft);\n };\n this.getScrollLeft = function() {\n return this.$scrollLeft;\n };\n this.getScreenWidth = function() {\n this.$computeWidth();\n if (this.lineWidgets) \n return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);\n return this.screenWidth;\n };\n \n this.getLineWidgetMaxWidth = function() {\n if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;\n var width = 0;\n this.lineWidgets.forEach(function(w) {\n if (w && w.screenWidth > width)\n width = w.screenWidth;\n });\n return this.lineWidgetWidth = width;\n };\n\n this.$computeWidth = function(force) {\n if (this.$modified || force) {\n this.$modified = false;\n\n if (this.$useWrapMode)\n return this.screenWidth = this.$wrapLimit;\n\n var lines = this.doc.getAllLines();\n var cache = this.$rowLengthCache;\n var longestScreenLine = 0;\n var foldIndex = 0;\n var foldLine = this.$foldData[foldIndex];\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n var len = lines.length;\n\n for (var i = 0; i < len; i++) {\n if (i > foldStart) {\n i = foldLine.end.row + 1;\n if (i >= len)\n break;\n foldLine = this.$foldData[foldIndex++];\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (cache[i] == null)\n cache[i] = this.$getStringScreenWidth(lines[i])[0];\n\n if (cache[i] > longestScreenLine)\n longestScreenLine = cache[i];\n }\n this.screenWidth = longestScreenLine;\n }\n };\n this.getLine = function(row) {\n return this.doc.getLine(row);\n };\n this.getLines = function(firstRow, lastRow) {\n return this.doc.getLines(firstRow, lastRow);\n };\n this.getLength = function() {\n return this.doc.getLength();\n };\n this.getTextRange = function(range) {\n return this.doc.getTextRange(range || this.selection.getRange());\n };\n this.insert = function(position, text) {\n return this.doc.insert(position, text);\n };\n this.remove = function(range) {\n return this.doc.remove(range);\n };\n this.removeFullLines = function(firstRow, lastRow){\n return this.doc.removeFullLines(firstRow, lastRow);\n };\n this.undoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = deltas.length - 1; i != -1; i--) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.revertDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, true, lastUndoRange);\n } else {\n delta.deltas.forEach(function(foldDelta) {\n this.addFolds(foldDelta.folds);\n }, this);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.redoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.applyDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, false, lastUndoRange);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.setUndoSelect = function(enable) {\n this.$undoSelect = enable;\n };\n\n this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {\n function isInsert(delta) {\n return isUndo ? delta.action !== \"insert\" : delta.action === \"insert\";\n }\n\n var delta = deltas[0];\n var range, point;\n var lastDeltaIsInsert = false;\n if (isInsert(delta)) {\n range = Range.fromPoints(delta.start, delta.end);\n lastDeltaIsInsert = true;\n } else {\n range = Range.fromPoints(delta.start, delta.start);\n lastDeltaIsInsert = false;\n }\n\n for (var i = 1; i < deltas.length; i++) {\n delta = deltas[i];\n if (isInsert(delta)) {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range.setStart(point);\n }\n point = delta.end;\n if (range.compare(point.row, point.column) == 1) {\n range.setEnd(point);\n }\n lastDeltaIsInsert = true;\n } else {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range = Range.fromPoints(delta.start, delta.start);\n }\n lastDeltaIsInsert = false;\n }\n }\n if (lastUndoRange != null) {\n if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {\n lastUndoRange.start.column += range.end.column - range.start.column;\n lastUndoRange.end.column += range.end.column - range.start.column;\n }\n\n var cmp = lastUndoRange.compareRange(range);\n if (cmp == 1) {\n range.setStart(lastUndoRange.start);\n } else if (cmp == -1) {\n range.setEnd(lastUndoRange.end);\n }\n }\n\n return range;\n };\n this.replace = function(range, text) {\n return this.doc.replace(range, text);\n };\n this.moveText = function(fromRange, toPosition, copy) {\n var text = this.getTextRange(fromRange);\n var folds = this.getFoldsInRange(fromRange);\n\n var toRange = Range.fromPoints(toPosition, toPosition);\n if (!copy) {\n this.remove(fromRange);\n var rowDiff = fromRange.start.row - fromRange.end.row;\n var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;\n if (collDiff) {\n if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)\n toRange.start.column += collDiff;\n if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)\n toRange.end.column += collDiff;\n }\n if (rowDiff && toRange.start.row >= fromRange.end.row) {\n toRange.start.row += rowDiff;\n toRange.end.row += rowDiff;\n }\n }\n\n toRange.end = this.insert(toRange.start, text);\n if (folds.length) {\n var oldStart = fromRange.start;\n var newStart = toRange.start;\n var rowDiff = newStart.row - oldStart.row;\n var collDiff = newStart.column - oldStart.column;\n this.addFolds(folds.map(function(x) {\n x = x.clone();\n if (x.start.row == oldStart.row)\n x.start.column += collDiff;\n if (x.end.row == oldStart.row)\n x.end.column += collDiff;\n x.start.row += rowDiff;\n x.end.row += rowDiff;\n return x;\n }));\n }\n\n return toRange;\n };\n this.indentRows = function(startRow, endRow, indentString) {\n indentString = indentString.replace(/\\t/g, this.getTabString());\n for (var row=startRow; row<=endRow; row++)\n this.doc.insertInLine({row: row, column: 0}, indentString);\n };\n this.outdentRows = function (range) {\n var rowRange = range.collapseRows();\n var deleteRange = new Range(0, 0, 0, 0);\n var size = this.getTabSize();\n\n for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {\n var line = this.getLine(i);\n\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n for (var j = 0; j < size; ++j)\n if (line.charAt(j) != ' ')\n break;\n if (j < size && line.charAt(j) == '\\t') {\n deleteRange.start.column = j;\n deleteRange.end.column = j + 1;\n } else {\n deleteRange.start.column = 0;\n deleteRange.end.column = j;\n }\n this.remove(deleteRange);\n }\n };\n\n this.$moveLines = function(firstRow, lastRow, dir) {\n firstRow = this.getRowFoldStart(firstRow);\n lastRow = this.getRowFoldEnd(lastRow);\n if (dir < 0) {\n var row = this.getRowFoldStart(firstRow + dir);\n if (row < 0) return 0;\n var diff = row-firstRow;\n } else if (dir > 0) {\n var row = this.getRowFoldEnd(lastRow + dir);\n if (row > this.doc.getLength()-1) return 0;\n var diff = row-lastRow;\n } else {\n firstRow = this.$clipRowToDocument(firstRow);\n lastRow = this.$clipRowToDocument(lastRow);\n var diff = lastRow - firstRow + 1;\n }\n\n var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);\n var folds = this.getFoldsInRange(range).map(function(x){\n x = x.clone();\n x.start.row += diff;\n x.end.row += diff;\n return x;\n });\n \n var lines = dir == 0\n ? this.doc.getLines(firstRow, lastRow)\n : this.doc.removeFullLines(firstRow, lastRow);\n this.doc.insertFullLines(firstRow+diff, lines);\n folds.length && this.addFolds(folds);\n return diff;\n };\n this.moveLinesUp = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, -1);\n };\n this.moveLinesDown = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 1);\n };\n this.duplicateLines = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 0);\n };\n\n\n this.$clipRowToDocument = function(row) {\n return Math.max(0, Math.min(row, this.doc.getLength()-1));\n };\n\n this.$clipColumnToRow = function(row, column) {\n if (column < 0)\n return 0;\n return Math.min(this.doc.getLine(row).length, column);\n };\n\n\n this.$clipPositionToDocument = function(row, column) {\n column = Math.max(0, column);\n\n if (row < 0) {\n row = 0;\n column = 0;\n } else {\n var len = this.doc.getLength();\n if (row >= len) {\n row = len - 1;\n column = this.doc.getLine(len-1).length;\n } else {\n column = Math.min(this.doc.getLine(row).length, column);\n }\n }\n\n return {\n row: row,\n column: column\n };\n };\n\n this.$clipRangeToDocument = function(range) {\n if (range.start.row < 0) {\n range.start.row = 0;\n range.start.column = 0;\n } else {\n range.start.column = this.$clipColumnToRow(\n range.start.row,\n range.start.column\n );\n }\n\n var len = this.doc.getLength() - 1;\n if (range.end.row > len) {\n range.end.row = len;\n range.end.column = this.doc.getLine(len).length;\n } else {\n range.end.column = this.$clipColumnToRow(\n range.end.row,\n range.end.column\n );\n }\n return range;\n };\n this.$wrapLimit = 80;\n this.$useWrapMode = false;\n this.$wrapLimitRange = {\n min : null,\n max : null\n };\n this.setUseWrapMode = function(useWrapMode) {\n if (useWrapMode != this.$useWrapMode) {\n this.$useWrapMode = useWrapMode;\n this.$modified = true;\n this.$resetRowCache(0);\n if (useWrapMode) {\n var len = this.getLength();\n this.$wrapData = Array(len);\n this.$updateWrapData(0, len - 1);\n }\n\n this._signal(\"changeWrapMode\");\n }\n };\n this.getUseWrapMode = function() {\n return this.$useWrapMode;\n };\n this.setWrapLimitRange = function(min, max) {\n if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {\n this.$wrapLimitRange = { min: min, max: max };\n this.$modified = true;\n this.$bidiHandler.markAsDirty();\n if (this.$useWrapMode)\n this._signal(\"changeWrapMode\");\n }\n };\n this.adjustWrapLimit = function(desiredLimit, $printMargin) {\n var limits = this.$wrapLimitRange;\n if (limits.max < 0)\n limits = {min: $printMargin, max: $printMargin};\n var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);\n if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {\n this.$wrapLimit = wrapLimit;\n this.$modified = true;\n if (this.$useWrapMode) {\n this.$updateWrapData(0, this.getLength() - 1);\n this.$resetRowCache(0);\n this._signal(\"changeWrapLimit\");\n }\n return true;\n }\n return false;\n };\n\n this.$constrainWrapLimit = function(wrapLimit, min, max) {\n if (min)\n wrapLimit = Math.max(min, wrapLimit);\n\n if (max)\n wrapLimit = Math.min(max, wrapLimit);\n\n return wrapLimit;\n };\n this.getWrapLimit = function() {\n return this.$wrapLimit;\n };\n this.setWrapLimit = function (limit) {\n this.setWrapLimitRange(limit, limit);\n };\n this.getWrapLimitRange = function() {\n return {\n min : this.$wrapLimitRange.min,\n max : this.$wrapLimitRange.max\n };\n };\n\n this.$updateInternalDataOnChange = function(delta) {\n var useWrapMode = this.$useWrapMode;\n var action = delta.action;\n var start = delta.start;\n var end = delta.end;\n var firstRow = start.row;\n var lastRow = end.row;\n var len = lastRow - firstRow;\n var removedFolds = null;\n \n this.$updating = true;\n if (len != 0) {\n if (action === \"remove\") {\n this[useWrapMode ? \"$wrapData\" : \"$rowLengthCache\"].splice(firstRow, len);\n\n var foldLines = this.$foldData;\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n var foldLine = this.getFoldLine(end.row);\n var idx = 0;\n if (foldLine) {\n foldLine.addRemoveChars(end.row, end.column, start.column - end.column);\n foldLine.shiftRow(-len);\n\n var foldLineBefore = this.getFoldLine(firstRow);\n if (foldLineBefore && foldLineBefore !== foldLine) {\n foldLineBefore.merge(foldLine);\n foldLine = foldLineBefore;\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= end.row) {\n foldLine.shiftRow(-len);\n }\n }\n\n lastRow = firstRow;\n } else {\n var args = Array(len);\n args.unshift(firstRow, 0);\n var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache;\n arr.splice.apply(arr, args);\n var foldLines = this.$foldData;\n var foldLine = this.getFoldLine(firstRow);\n var idx = 0;\n if (foldLine) {\n var cmp = foldLine.range.compareInside(start.row, start.column);\n if (cmp == 0) {\n foldLine = foldLine.split(start.row, start.column);\n if (foldLine) {\n foldLine.shiftRow(len);\n foldLine.addRemoveChars(lastRow, 0, end.column - start.column);\n }\n } else\n if (cmp == -1) {\n foldLine.addRemoveChars(firstRow, 0, end.column - start.column);\n foldLine.shiftRow(len);\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= firstRow) {\n foldLine.shiftRow(len);\n }\n }\n }\n } else {\n len = Math.abs(delta.start.column - delta.end.column);\n if (action === \"remove\") {\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n len = -len;\n }\n var foldLine = this.getFoldLine(firstRow);\n if (foldLine) {\n foldLine.addRemoveChars(firstRow, start.column, len);\n }\n }\n\n if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {\n console.error(\"doc.getLength() and $wrapData.length have to be the same!\");\n }\n this.$updating = false;\n\n if (useWrapMode)\n this.$updateWrapData(firstRow, lastRow);\n else\n this.$updateRowLengthCache(firstRow, lastRow);\n\n return removedFolds;\n };\n\n this.$updateRowLengthCache = function(firstRow, lastRow, b) {\n this.$rowLengthCache[firstRow] = null;\n this.$rowLengthCache[lastRow] = null;\n };\n\n this.$updateWrapData = function(firstRow, lastRow) {\n var lines = this.doc.getAllLines();\n var tabSize = this.getTabSize();\n var wrapData = this.$wrapData;\n var wrapLimit = this.$wrapLimit;\n var tokens;\n var foldLine;\n\n var row = firstRow;\n lastRow = Math.min(lastRow, lines.length - 1);\n while (row <= lastRow) {\n foldLine = this.getFoldLine(row, foldLine);\n if (!foldLine) {\n tokens = this.$getDisplayTokens(lines[row]);\n wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row ++;\n } else {\n tokens = [];\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n var walkTokens;\n if (placeholder != null) {\n walkTokens = this.$getDisplayTokens(\n placeholder, tokens.length);\n walkTokens[0] = PLACEHOLDER_START;\n for (var i = 1; i < walkTokens.length; i++) {\n walkTokens[i] = PLACEHOLDER_BODY;\n }\n } else {\n walkTokens = this.$getDisplayTokens(\n lines[row].substring(lastColumn, column),\n tokens.length);\n }\n tokens = tokens.concat(walkTokens);\n }.bind(this),\n foldLine.end.row,\n lines[foldLine.end.row].length + 1\n );\n\n wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row = foldLine.end.row + 1;\n }\n }\n };\n var CHAR = 1,\n CHAR_EXT = 2,\n PLACEHOLDER_START = 3,\n PLACEHOLDER_BODY = 4,\n PUNCTUATION = 9,\n SPACE = 10,\n TAB = 11,\n TAB_SPACE = 12;\n\n\n this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {\n if (tokens.length == 0) {\n return [];\n }\n\n var splits = [];\n var displayLength = tokens.length;\n var lastSplit = 0, lastDocSplit = 0;\n\n var isCode = this.$wrapAsCode;\n\n var indentedSoftWrap = this.$indentedSoftWrap;\n var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)\n || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);\n\n function getWrapIndent() {\n var indentation = 0;\n if (maxIndent === 0)\n return indentation;\n if (indentedSoftWrap) {\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token == SPACE)\n indentation += 1;\n else if (token == TAB)\n indentation += tabSize;\n else if (token == TAB_SPACE)\n continue;\n else\n break;\n }\n }\n if (isCode && indentedSoftWrap !== false)\n indentation += tabSize;\n return Math.min(indentation, maxIndent);\n }\n function addSplit(screenPos) {\n var displayed = tokens.slice(lastSplit, screenPos);\n var len = displayed.length;\n displayed.join(\"\")\n .replace(/12/g, function() {\n len -= 1;\n })\n .replace(/2/g, function() {\n len -= 1;\n });\n\n if (!splits.length) {\n indent = getWrapIndent();\n splits.indent = indent;\n }\n lastDocSplit += len;\n splits.push(lastDocSplit);\n lastSplit = screenPos;\n }\n var indent = 0;\n while (displayLength - lastSplit > wrapLimit - indent) {\n var split = lastSplit + wrapLimit - indent;\n if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {\n addSplit(split);\n continue;\n }\n if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {\n for (split; split != lastSplit - 1; split--) {\n if (tokens[split] == PLACEHOLDER_START) {\n break;\n }\n }\n if (split > lastSplit) {\n addSplit(split);\n continue;\n }\n split = lastSplit + wrapLimit;\n for (split; split < tokens.length; split++) {\n if (tokens[split] != PLACEHOLDER_BODY) {\n break;\n }\n }\n if (split == tokens.length) {\n break; // Breaks the while-loop.\n }\n addSplit(split);\n continue;\n }\n var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1);\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n if (isCode) {\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n while (split > minSplit && tokens[split] == PUNCTUATION) {\n split --;\n }\n } else {\n while (split > minSplit && tokens[split] < SPACE) {\n split --;\n }\n }\n if (split > minSplit) {\n addSplit(++split);\n continue;\n }\n split = lastSplit + wrapLimit;\n if (tokens[split] == CHAR_EXT)\n split--;\n addSplit(split - indent);\n }\n return splits;\n };\n this.$getDisplayTokens = function(str, offset) {\n var arr = [];\n var tabSize;\n offset = offset || 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c == 9) {\n tabSize = this.getScreenTabSize(arr.length + offset);\n arr.push(TAB);\n for (var n = 1; n < tabSize; n++) {\n arr.push(TAB_SPACE);\n }\n }\n else if (c == 32) {\n arr.push(SPACE);\n } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {\n arr.push(PUNCTUATION);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n arr.push(CHAR, CHAR_EXT);\n } else {\n arr.push(CHAR);\n }\n }\n return arr;\n };\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn == 0)\n return [0, 0];\n if (maxScreenColumn == null)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charCodeAt(column);\n if (c == 9) {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n screenColumn += 2;\n } else {\n screenColumn += 1;\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n\n return [screenColumn, column];\n };\n\n this.lineWidgets = null;\n this.getRowLength = function(row) {\n if (this.lineWidgets)\n var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0;\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n this.getRowLineCount = function(row) {\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1;\n } else {\n return this.$wrapData[row].length + 1;\n }\n };\n\n this.getRowWrapIndent = function(screenRow) {\n if (this.$useWrapMode) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n var splits = this.$wrapData[pos.row];\n return splits.length && splits[0] < pos.column ? splits.indent : 0;\n } else {\n return 0;\n }\n };\n this.getScreenLastRowColumn = function(screenRow) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n return this.documentToScreenColumn(pos.row, pos.column);\n };\n this.getDocumentLastRowColumn = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.getScreenLastRowColumn(screenRow);\n };\n this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);\n };\n this.getRowSplitData = function(row) {\n if (!this.$useWrapMode) {\n return undefined;\n } else {\n return this.$wrapData[row];\n }\n };\n this.getScreenTabSize = function(screenColumn) {\n return this.$tabSize - screenColumn % this.$tabSize;\n };\n\n\n this.screenToDocumentRow = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).row;\n };\n\n\n this.screenToDocumentColumn = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).column;\n };\n this.screenToDocumentPosition = function(screenRow, screenColumn, offsetX) {\n if (screenRow < 0)\n return {row: 0, column: 0};\n\n var line;\n var docRow = 0;\n var docColumn = 0;\n var column;\n var row = 0;\n var rowLength = 0;\n\n var rowCache = this.$screenRowCache;\n var i = this.$getRowCacheIndex(rowCache, screenRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var docRow = this.$docRowCache[i];\n var doCache = screenRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var maxRow = this.getLength() - 1;\n var foldLine = this.getNextFoldLine(docRow);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (row <= screenRow) {\n rowLength = this.getRowLength(docRow);\n if (row + rowLength > screenRow || docRow >= maxRow) {\n break;\n } else {\n row += rowLength;\n docRow++;\n if (docRow > foldStart) {\n docRow = foldLine.end.row+1;\n foldLine = this.getNextFoldLine(docRow, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n }\n\n if (doCache) {\n this.$docRowCache.push(docRow);\n this.$screenRowCache.push(row);\n }\n }\n\n if (foldLine && foldLine.start.row <= docRow) {\n line = this.getFoldDisplayLine(foldLine);\n docRow = foldLine.start.row;\n } else if (row + rowLength <= screenRow || docRow > maxRow) {\n return {\n row: maxRow,\n column: this.getLine(maxRow).length\n };\n } else {\n line = this.getLine(docRow);\n foldLine = null;\n }\n var wrapIndent = 0, splitIndex = Math.floor(screenRow - row);\n if (this.$useWrapMode) {\n var splits = this.$wrapData[docRow];\n if (splits) {\n column = splits[splitIndex];\n if(splitIndex > 0 && splits.length) {\n wrapIndent = splits.indent;\n docColumn = splits[splitIndex - 1] || splits[splits.length - 1];\n line = line.substring(docColumn);\n }\n }\n }\n\n if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex))\n screenColumn = this.$bidiHandler.offsetToCol(offsetX);\n\n docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];\n if (this.$useWrapMode && docColumn >= column)\n docColumn = column - 1;\n\n if (foldLine)\n return foldLine.idxToPosition(docColumn);\n\n return {row: docRow, column: docColumn};\n };\n this.documentToScreenPosition = function(docRow, docColumn) {\n if (typeof docColumn === \"undefined\")\n var pos = this.$clipPositionToDocument(docRow.row, docRow.column);\n else\n pos = this.$clipPositionToDocument(docRow, docColumn);\n\n docRow = pos.row;\n docColumn = pos.column;\n\n var screenRow = 0;\n var foldStartRow = null;\n var fold = null;\n fold = this.getFoldAt(docRow, docColumn, 1);\n if (fold) {\n docRow = fold.start.row;\n docColumn = fold.start.column;\n }\n\n var rowEnd, row = 0;\n\n\n var rowCache = this.$docRowCache;\n var i = this.$getRowCacheIndex(rowCache, docRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var screenRow = this.$screenRowCache[i];\n var doCache = docRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var foldLine = this.getNextFoldLine(row);\n var foldStart = foldLine ?foldLine.start.row :Infinity;\n\n while (row < docRow) {\n if (row >= foldStart) {\n rowEnd = foldLine.end.row + 1;\n if (rowEnd > docRow)\n break;\n foldLine = this.getNextFoldLine(rowEnd, foldLine);\n foldStart = foldLine ?foldLine.start.row :Infinity;\n }\n else {\n rowEnd = row + 1;\n }\n\n screenRow += this.getRowLength(row);\n row = rowEnd;\n\n if (doCache) {\n this.$docRowCache.push(row);\n this.$screenRowCache.push(screenRow);\n }\n }\n var textLine = \"\";\n if (foldLine && row >= foldStart) {\n textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);\n foldStartRow = foldLine.start.row;\n } else {\n textLine = this.getLine(docRow).substring(0, docColumn);\n foldStartRow = docRow;\n }\n var wrapIndent = 0;\n if (this.$useWrapMode) {\n var wrapRow = this.$wrapData[foldStartRow];\n if (wrapRow) {\n var screenRowOffset = 0;\n while (textLine.length >= wrapRow[screenRowOffset]) {\n screenRow ++;\n screenRowOffset++;\n }\n textLine = textLine.substring(\n wrapRow[screenRowOffset - 1] || 0, textLine.length\n );\n wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;\n }\n }\n\n return {\n row: screenRow,\n column: wrapIndent + this.$getStringScreenWidth(textLine)[0]\n };\n };\n this.documentToScreenColumn = function(row, docColumn) {\n return this.documentToScreenPosition(row, docColumn).column;\n };\n this.documentToScreenRow = function(docRow, docColumn) {\n return this.documentToScreenPosition(docRow, docColumn).row;\n };\n this.getScreenLength = function() {\n var screenRows = 0;\n var fold = null;\n if (!this.$useWrapMode) {\n screenRows = this.getLength();\n var foldData = this.$foldData;\n for (var i = 0; i < foldData.length; i++) {\n fold = foldData[i];\n screenRows -= fold.end.row - fold.start.row;\n }\n } else {\n var lastRow = this.$wrapData.length;\n var row = 0, i = 0;\n var fold = this.$foldData[i++];\n var foldStart = fold ? fold.start.row :Infinity;\n\n while (row < lastRow) {\n var splits = this.$wrapData[row];\n screenRows += splits ? splits.length + 1 : 1;\n row ++;\n if (row > foldStart) {\n row = fold.end.row+1;\n fold = this.$foldData[i++];\n foldStart = fold ?fold.start.row :Infinity;\n }\n }\n }\n if (this.lineWidgets)\n screenRows += this.$getWidgetScreenLength();\n\n return screenRows;\n };\n this.$setFontMetrics = function(fm) {\n if (!this.$enableVarChar) return;\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn === 0)\n return [0, 0];\n if (!maxScreenColumn)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n \n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charAt(column);\n if (c === \"\\t\") {\n screenColumn += this.getScreenTabSize(screenColumn);\n } else {\n screenColumn += fm.getCharacterWidth(c);\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n \n return [screenColumn, column];\n };\n };\n \n this.destroy = function() {\n if (this.bgTokenizer) {\n this.bgTokenizer.setDocument(null);\n this.bgTokenizer = null;\n }\n this.$stopWorker();\n };\n\n this.isFullWidth = isFullWidth;\n function isFullWidth(c) {\n if (c < 0x1100)\n return false;\n return c >= 0x1100 && c <= 0x115F ||\n c >= 0x11A3 && c <= 0x11A7 ||\n c >= 0x11FA && c <= 0x11FF ||\n c >= 0x2329 && c <= 0x232A ||\n c >= 0x2E80 && c <= 0x2E99 ||\n c >= 0x2E9B && c <= 0x2EF3 ||\n c >= 0x2F00 && c <= 0x2FD5 ||\n c >= 0x2FF0 && c <= 0x2FFB ||\n c >= 0x3000 && c <= 0x303E ||\n c >= 0x3041 && c <= 0x3096 ||\n c >= 0x3099 && c <= 0x30FF ||\n c >= 0x3105 && c <= 0x312D ||\n c >= 0x3131 && c <= 0x318E ||\n c >= 0x3190 && c <= 0x31BA ||\n c >= 0x31C0 && c <= 0x31E3 ||\n c >= 0x31F0 && c <= 0x321E ||\n c >= 0x3220 && c <= 0x3247 ||\n c >= 0x3250 && c <= 0x32FE ||\n c >= 0x3300 && c <= 0x4DBF ||\n c >= 0x4E00 && c <= 0xA48C ||\n c >= 0xA490 && c <= 0xA4C6 ||\n c >= 0xA960 && c <= 0xA97C ||\n c >= 0xAC00 && c <= 0xD7A3 ||\n c >= 0xD7B0 && c <= 0xD7C6 ||\n c >= 0xD7CB && c <= 0xD7FB ||\n c >= 0xF900 && c <= 0xFAFF ||\n c >= 0xFE10 && c <= 0xFE19 ||\n c >= 0xFE30 && c <= 0xFE52 ||\n c >= 0xFE54 && c <= 0xFE66 ||\n c >= 0xFE68 && c <= 0xFE6B ||\n c >= 0xFF01 && c <= 0xFF60 ||\n c >= 0xFFE0 && c <= 0xFFE6;\n }\n\n}).call(EditSession.prototype);\n\nacequire(\"./edit_session/folding\").Folding.call(EditSession.prototype);\nacequire(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype);\n\n\nconfig.defineOptions(EditSession.prototype, \"session\", {\n wrap: {\n set: function(value) {\n if (!value || value == \"off\")\n value = false;\n else if (value == \"free\")\n value = true;\n else if (value == \"printMargin\")\n value = -1;\n else if (typeof value == \"string\")\n value = parseInt(value, 10) || false;\n\n if (this.$wrap == value)\n return;\n this.$wrap = value;\n if (!value) {\n this.setUseWrapMode(false);\n } else {\n var col = typeof value == \"number\" ? value : null;\n this.setWrapLimitRange(col, col);\n this.setUseWrapMode(true);\n }\n },\n get: function() {\n if (this.getUseWrapMode()) {\n if (this.$wrap == -1)\n return \"printMargin\";\n if (!this.getWrapLimitRange().min)\n return \"free\";\n return this.$wrap;\n }\n return \"off\";\n },\n handlesSet: true\n }, \n wrapMethod: {\n set: function(val) {\n val = val == \"auto\"\n ? this.$mode.type != \"text\"\n : val != \"text\";\n if (val != this.$wrapAsCode) {\n this.$wrapAsCode = val;\n if (this.$useWrapMode) {\n this.$modified = true;\n this.$resetRowCache(0);\n this.$updateWrapData(0, this.getLength() - 1);\n }\n }\n },\n initialValue: \"auto\"\n },\n indentedSoftWrap: { initialValue: true },\n firstLineNumber: {\n set: function() {this._signal(\"changeBreakpoint\");},\n initialValue: 1\n },\n useWorker: {\n set: function(useWorker) {\n this.$useWorker = useWorker;\n\n this.$stopWorker();\n if (useWorker)\n this.$startWorker();\n },\n initialValue: true\n },\n useSoftTabs: {initialValue: true},\n tabSize: {\n set: function(tabSize) {\n if (isNaN(tabSize) || this.$tabSize === tabSize) return;\n\n this.$modified = true;\n this.$rowLengthCache = [];\n this.$tabSize = tabSize;\n this._signal(\"changeTabSize\");\n },\n initialValue: 4,\n handlesSet: true\n },\n navigateWithinSoftTabs: {initialValue: false},\n overwrite: {\n set: function(val) {this._signal(\"changeOverwrite\");},\n initialValue: false\n },\n newLineMode: {\n set: function(val) {this.doc.setNewLineMode(val);},\n get: function() {return this.doc.getNewLineMode();},\n handlesSet: true\n },\n mode: {\n set: function(val) { this.setMode(val); },\n get: function() { return this.$modeId; }\n }\n});\n\nexports.EditSession = EditSession;\n});\n\nace.define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar Search = function() {\n this.$options = {};\n};\n\n(function() {\n this.set = function(options) {\n oop.mixin(this.$options, options);\n return this;\n };\n this.getOptions = function() {\n return lang.copyObject(this.$options);\n };\n this.setOptions = function(options) {\n this.$options = options;\n };\n this.find = function(session) {\n var options = this.$options;\n var iterator = this.$matchIterator(session, options);\n if (!iterator)\n return false;\n\n var firstRange = null;\n iterator.forEach(function(sr, sc, er, ec) {\n firstRange = new Range(sr, sc, er, ec);\n if (sc == ec && options.start && options.start.start\n && options.skipCurrent != false && firstRange.isEqual(options.start)\n ) {\n firstRange = null;\n return false;\n }\n\n return true;\n });\n\n return firstRange;\n };\n this.findAll = function(session) {\n var options = this.$options;\n if (!options.needle)\n return [];\n this.$assembleRegExp(options);\n\n var range = options.range;\n var lines = range\n ? session.getLines(range.start.row, range.end.row)\n : session.doc.getAllLines();\n\n var ranges = [];\n var re = options.re;\n if (options.$isMultiLine) {\n var len = re.length;\n var maxRow = lines.length - len;\n var prevRange;\n outer: for (var row = re.offset || 0; row <= maxRow; row++) {\n for (var j = 0; j < len; j++)\n if (lines[row + j].search(re[j]) == -1)\n continue outer;\n \n var startLine = lines[row];\n var line = lines[row + len - 1];\n var startIndex = startLine.length - startLine.match(re[0])[0].length;\n var endIndex = line.match(re[len - 1])[0].length;\n \n if (prevRange && prevRange.end.row === row &&\n prevRange.end.column > startIndex\n ) {\n continue;\n }\n ranges.push(prevRange = new Range(\n row, startIndex, row + len - 1, endIndex\n ));\n if (len > 2)\n row = row + len - 2;\n }\n } else {\n for (var i = 0; i < lines.length; i++) {\n var matches = lang.getMatchOffsets(lines[i], re);\n for (var j = 0; j < matches.length; j++) {\n var match = matches[j];\n ranges.push(new Range(i, match.offset, i, match.offset + match.length));\n }\n }\n }\n\n if (range) {\n var startColumn = range.start.column;\n var endColumn = range.start.column;\n var i = 0, j = ranges.length - 1;\n while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row)\n i++;\n\n while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row)\n j--;\n \n ranges = ranges.slice(i, j + 1);\n for (i = 0, j = ranges.length; i < j; i++) {\n ranges[i].start.row += range.start.row;\n ranges[i].end.row += range.start.row;\n }\n }\n\n return ranges;\n };\n this.replace = function(input, replacement) {\n var options = this.$options;\n\n var re = this.$assembleRegExp(options);\n if (options.$isMultiLine)\n return replacement;\n\n if (!re)\n return;\n\n var match = re.exec(input);\n if (!match || match[0].length != input.length)\n return null;\n \n replacement = input.replace(re, replacement);\n if (options.preserveCase) {\n replacement = replacement.split(\"\");\n for (var i = Math.min(input.length, input.length); i--; ) {\n var ch = input[i];\n if (ch && ch.toLowerCase() != ch)\n replacement[i] = replacement[i].toUpperCase();\n else\n replacement[i] = replacement[i].toLowerCase();\n }\n replacement = replacement.join(\"\");\n }\n \n return replacement;\n };\n\n this.$assembleRegExp = function(options, $disableFakeMultiline) {\n if (options.needle instanceof RegExp)\n return options.re = options.needle;\n\n var needle = options.needle;\n\n if (!options.needle)\n return options.re = false;\n\n if (!options.regExp)\n needle = lang.escapeRegExp(needle);\n\n if (options.wholeWord)\n needle = addWordBoundary(needle, options);\n\n var modifier = options.caseSensitive ? \"gm\" : \"gmi\";\n\n options.$isMultiLine = !$disableFakeMultiline && /[\\n\\r]/.test(needle);\n if (options.$isMultiLine)\n return options.re = this.$assembleMultilineRegExp(needle, modifier);\n\n try {\n var re = new RegExp(needle, modifier);\n } catch(e) {\n re = false;\n }\n return options.re = re;\n };\n\n this.$assembleMultilineRegExp = function(needle, modifier) {\n var parts = needle.replace(/\\r\\n|\\r|\\n/g, \"$\\n^\").split(\"\\n\");\n var re = [];\n for (var i = 0; i < parts.length; i++) try {\n re.push(new RegExp(parts[i], modifier));\n } catch(e) {\n return false;\n }\n return re;\n };\n\n this.$matchIterator = function(session, options) {\n var re = this.$assembleRegExp(options);\n if (!re)\n return false;\n var backwards = options.backwards == true;\n var skipCurrent = options.skipCurrent != false;\n\n var range = options.range;\n var start = options.start;\n if (!start)\n start = range ? range[backwards ? \"end\" : \"start\"] : session.selection.getRange();\n \n if (start.start)\n start = start[skipCurrent != backwards ? \"end\" : \"start\"];\n\n var firstRow = range ? range.start.row : 0;\n var lastRow = range ? range.end.row : session.getLength() - 1;\n\n if (backwards) {\n var forEach = function(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row--; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = lastRow, firstRow = start.row; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n };\n }\n else {\n var forEach = function(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row = row + 1; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = firstRow, lastRow = start.row; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n };\n }\n \n if (options.$isMultiLine) {\n var len = re.length;\n var forEachInLine = function(row, offset, callback) {\n var startRow = backwards ? row - len + 1 : row;\n if (startRow < 0) return;\n var line = session.getLine(startRow);\n var startIndex = line.search(re[0]);\n if (!backwards && startIndex < offset || startIndex === -1) return;\n for (var i = 1; i < len; i++) {\n line = session.getLine(startRow + i);\n if (line.search(re[i]) == -1)\n return;\n }\n var endIndex = line.match(re[len - 1])[0].length;\n if (backwards && endIndex > offset) return;\n if (callback(startRow, startIndex, startRow + len - 1, endIndex))\n return true;\n };\n }\n else if (backwards) {\n var forEachInLine = function(row, endIndex, callback) {\n var line = session.getLine(row);\n var matches = [];\n var m, last = 0;\n re.lastIndex = 0;\n while((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (!length) {\n if (last >= line.length) break;\n re.lastIndex = last += 1;\n }\n if (m.index + length > endIndex)\n break;\n matches.push(m.index, length);\n }\n for (var i = matches.length - 1; i >= 0; i -= 2) {\n var column = matches[i - 1];\n var length = matches[i];\n if (callback(row, column, row, column + length))\n return true;\n }\n };\n }\n else {\n var forEachInLine = function(row, startIndex, callback) {\n var line = session.getLine(row);\n var m;\n var last = startIndex;\n re.lastIndex = startIndex;\n while((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (callback(row, last, row,last + length))\n return true;\n if (!length) {\n re.lastIndex = last += 1;\n if (last >= line.length) return false;\n }\n }\n };\n }\n return {forEach: forEach};\n };\n\n}).call(Search.prototype);\n\nfunction addWordBoundary(needle, options) {\n function wordBoundary(c) {\n if (/\\w/.test(c) || options.regExp) return \"\\\\b\";\n return \"\";\n }\n return wordBoundary(needle[0]) + needle\n + wordBoundary(needle[needle.length - 1]);\n}\n\nexports.Search = Search;\n});\n\nace.define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keyUtil = acequire(\"../lib/keys\");\nvar useragent = acequire(\"../lib/useragent\");\nvar KEY_MODS = keyUtil.KEY_MODS;\n\nfunction HashHandler(config, platform) {\n this.platform = platform || (useragent.isMac ? \"mac\" : \"win\");\n this.commands = {};\n this.commandKeyBinding = {};\n this.addCommands(config);\n this.$singleCommand = true;\n}\n\nfunction MultiHashHandler(config, platform) {\n HashHandler.call(this, config, platform);\n this.$singleCommand = false;\n}\n\nMultiHashHandler.prototype = HashHandler.prototype;\n\n(function() {\n \n\n this.addCommand = function(command) {\n if (this.commands[command.name])\n this.removeCommand(command);\n\n this.commands[command.name] = command;\n\n if (command.bindKey)\n this._buildKeyHash(command);\n };\n\n this.removeCommand = function(command, keepCommand) {\n var name = command && (typeof command === 'string' ? command : command.name);\n command = this.commands[name];\n if (!keepCommand)\n delete this.commands[name];\n var ckb = this.commandKeyBinding;\n for (var keyId in ckb) {\n var cmdGroup = ckb[keyId];\n if (cmdGroup == command) {\n delete ckb[keyId];\n } else if (Array.isArray(cmdGroup)) {\n var i = cmdGroup.indexOf(command);\n if (i != -1) {\n cmdGroup.splice(i, 1);\n if (cmdGroup.length == 1)\n ckb[keyId] = cmdGroup[0];\n }\n }\n }\n };\n\n this.bindKey = function(key, command, position) {\n if (typeof key == \"object\" && key) {\n if (position == undefined)\n position = key.position;\n key = key[this.platform];\n }\n if (!key)\n return;\n if (typeof command == \"function\")\n return this.addCommand({exec: command, bindKey: key, name: command.name || key});\n \n key.split(\"|\").forEach(function(keyPart) {\n var chain = \"\";\n if (keyPart.indexOf(\" \") != -1) {\n var parts = keyPart.split(/\\s+/);\n keyPart = parts.pop();\n parts.forEach(function(keyPart) {\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n chain += (chain ? \" \" : \"\") + id;\n this._addCommandToBinding(chain, \"chainKeys\");\n }, this);\n chain += \" \";\n }\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n this._addCommandToBinding(chain + id, command, position);\n }, this);\n };\n \n function getPosition(command) {\n return typeof command == \"object\" && command.bindKey\n && command.bindKey.position\n || (command.isDefault ? -100 : 0);\n }\n this._addCommandToBinding = function(keyId, command, position) {\n var ckb = this.commandKeyBinding, i;\n if (!command) {\n delete ckb[keyId];\n } else if (!ckb[keyId] || this.$singleCommand) {\n ckb[keyId] = command;\n } else {\n if (!Array.isArray(ckb[keyId])) {\n ckb[keyId] = [ckb[keyId]];\n } else if ((i = ckb[keyId].indexOf(command)) != -1) {\n ckb[keyId].splice(i, 1);\n }\n\n if (typeof position != \"number\") {\n position = getPosition(command);\n }\n\n var commands = ckb[keyId];\n for (i = 0; i < commands.length; i++) {\n var other = commands[i];\n var otherPos = getPosition(other);\n if (otherPos > position)\n break;\n }\n commands.splice(i, 0, command);\n }\n };\n\n this.addCommands = function(commands) {\n commands && Object.keys(commands).forEach(function(name) {\n var command = commands[name];\n if (!command)\n return;\n \n if (typeof command === \"string\")\n return this.bindKey(command, name);\n\n if (typeof command === \"function\")\n command = { exec: command };\n\n if (typeof command !== \"object\")\n return;\n\n if (!command.name)\n command.name = name;\n\n this.addCommand(command);\n }, this);\n };\n\n this.removeCommands = function(commands) {\n Object.keys(commands).forEach(function(name) {\n this.removeCommand(commands[name]);\n }, this);\n };\n\n this.bindKeys = function(keyList) {\n Object.keys(keyList).forEach(function(key) {\n this.bindKey(key, keyList[key]);\n }, this);\n };\n\n this._buildKeyHash = function(command) {\n this.bindKey(command.bindKey, command);\n };\n this.parseKeys = function(keys) {\n var parts = keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function(x){return x;});\n var key = parts.pop();\n\n var keyCode = keyUtil[key];\n if (keyUtil.FUNCTION_KEYS[keyCode])\n key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();\n else if (!parts.length)\n return {key: key, hashId: -1};\n else if (parts.length == 1 && parts[0] == \"shift\")\n return {key: key.toUpperCase(), hashId: -1};\n\n var hashId = 0;\n for (var i = parts.length; i--;) {\n var modifier = keyUtil.KEY_MODS[parts[i]];\n if (modifier == null) {\n if (typeof console != \"undefined\")\n console.error(\"invalid modifier \" + parts[i] + \" in \" + keys);\n return false;\n }\n hashId |= modifier;\n }\n return {key: key, hashId: hashId};\n };\n\n this.findKeyCommand = function findKeyCommand(hashId, keyString) {\n var key = KEY_MODS[hashId] + keyString;\n return this.commandKeyBinding[key];\n };\n\n this.handleKeyboard = function(data, hashId, keyString, keyCode) {\n if (keyCode < 0) return;\n var key = KEY_MODS[hashId] + keyString;\n var command = this.commandKeyBinding[key];\n if (data.$keyChain) {\n data.$keyChain += \" \" + key;\n command = this.commandKeyBinding[data.$keyChain] || command;\n }\n \n if (command) {\n if (command == \"chainKeys\" || command[command.length - 1] == \"chainKeys\") {\n data.$keyChain = data.$keyChain || key;\n return {command: \"null\"};\n }\n }\n \n if (data.$keyChain) {\n if ((!hashId || hashId == 4) && keyString.length == 1)\n data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input\n else if (hashId == -1 || keyCode > 0)\n data.$keyChain = \"\"; // reset keyChain\n }\n return {command: command};\n };\n \n this.getStatusText = function(editor, data) {\n return data.$keyChain || \"\";\n };\n\n}).call(HashHandler.prototype);\n\nexports.HashHandler = HashHandler;\nexports.MultiHashHandler = MultiHashHandler;\n});\n\nace.define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar MultiHashHandler = acequire(\"../keyboard/hash_handler\").MultiHashHandler;\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CommandManager = function(platform, commands) {\n MultiHashHandler.call(this, commands, platform);\n this.byName = this.commands;\n this.setDefaultHandler(\"exec\", function(e) {\n return e.command.exec(e.editor, e.args || {});\n });\n};\n\noop.inherits(CommandManager, MultiHashHandler);\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.exec = function(command, editor, args) {\n if (Array.isArray(command)) {\n for (var i = command.length; i--; ) {\n if (this.exec(command[i], editor, args)) return true;\n }\n return false;\n }\n\n if (typeof command === \"string\")\n command = this.commands[command];\n\n if (!command)\n return false;\n\n if (editor && editor.$readOnly && !command.readOnly)\n return false;\n\n if (command.isAvailable && !command.isAvailable(editor))\n return false;\n\n var e = {editor: editor, command: command, args: args};\n e.returnValue = this._emit(\"exec\", e);\n this._signal(\"afterExec\", e);\n\n return e.returnValue === false ? false : true;\n };\n\n this.toggleRecording = function(editor) {\n if (this.$inReplay)\n return;\n\n editor && editor._emit(\"changeStatus\");\n if (this.recording) {\n this.macro.pop();\n this.removeEventListener(\"exec\", this.$addCommandToMacro);\n\n if (!this.macro.length)\n this.macro = this.oldMacro;\n\n return this.recording = false;\n }\n if (!this.$addCommandToMacro) {\n this.$addCommandToMacro = function(e) {\n this.macro.push([e.command, e.args]);\n }.bind(this);\n }\n\n this.oldMacro = this.macro;\n this.macro = [];\n this.on(\"exec\", this.$addCommandToMacro);\n return this.recording = true;\n };\n\n this.replay = function(editor) {\n if (this.$inReplay || !this.macro)\n return;\n\n if (this.recording)\n return this.toggleRecording(editor);\n\n try {\n this.$inReplay = true;\n this.macro.forEach(function(x) {\n if (typeof x == \"string\")\n this.exec(x, editor);\n else\n this.exec(x[0], editor, x[1]);\n }, this);\n } finally {\n this.$inReplay = false;\n }\n };\n\n this.trimMacro = function(m) {\n return m.map(function(x){\n if (typeof x[0] != \"string\")\n x[0] = x[0].name;\n if (!x[1])\n x = x[0];\n return x;\n });\n };\n\n}).call(CommandManager.prototype);\n\nexports.CommandManager = CommandManager;\n\n});\n\nace.define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\nvar config = acequire(\"../config\");\nvar Range = acequire(\"../range\").Range;\n\nfunction bindKey(win, mac) {\n return {win: win, mac: mac};\n}\nexports.commands = [{\n name: \"showSettingsMenu\",\n bindKey: bindKey(\"Ctrl-,\", \"Command-,\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/settings_menu\", function(module) {\n module.init(editor);\n editor.showSettingsMenu();\n });\n },\n readOnly: true\n}, {\n name: \"goToNextError\",\n bindKey: bindKey(\"Alt-E\", \"F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, 1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"goToPreviousError\",\n bindKey: bindKey(\"Alt-Shift-E\", \"Shift-F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, -1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selectall\",\n bindKey: bindKey(\"Ctrl-A\", \"Command-A\"),\n exec: function(editor) { editor.selectAll(); },\n readOnly: true\n}, {\n name: \"centerselection\",\n bindKey: bindKey(null, \"Ctrl-L\"),\n exec: function(editor) { editor.centerSelection(); },\n readOnly: true\n}, {\n name: \"gotoline\",\n bindKey: bindKey(\"Ctrl-L\", \"Command-L\"),\n exec: function(editor) {\n var line = parseInt(prompt(\"Enter line number:\"), 10);\n if (!isNaN(line)) {\n editor.gotoLine(line);\n }\n },\n readOnly: true\n}, {\n name: \"fold\",\n bindKey: bindKey(\"Alt-L|Ctrl-F1\", \"Command-Alt-L|Command-F1\"),\n exec: function(editor) { editor.session.toggleFold(false); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfold\",\n bindKey: bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\", \"Command-Alt-Shift-L|Command-Shift-F1\"),\n exec: function(editor) { editor.session.toggleFold(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleFoldWidget\",\n bindKey: bindKey(\"F2\", \"F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleParentFoldWidget\",\n bindKey: bindKey(\"Alt-F2\", \"Alt-F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldall\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function(editor) { editor.session.foldAll(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldOther\",\n bindKey: bindKey(\"Alt-0\", \"Command-Option-0\"),\n exec: function(editor) { \n editor.session.foldAll();\n editor.session.unfold(editor.selection.getAllRanges());\n },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfoldall\",\n bindKey: bindKey(\"Alt-Shift-0\", \"Command-Option-Shift-0\"),\n exec: function(editor) { editor.session.unfold(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findnext\",\n bindKey: bindKey(\"Ctrl-K\", \"Command-G\"),\n exec: function(editor) { editor.findNext(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findprevious\",\n bindKey: bindKey(\"Ctrl-Shift-K\", \"Command-Shift-G\"),\n exec: function(editor) { editor.findPrevious(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"selectOrFindNext\",\n bindKey: bindKey(\"Alt-K\", \"Ctrl-G\"),\n exec: function(editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findNext(); \n },\n readOnly: true\n}, {\n name: \"selectOrFindPrevious\",\n bindKey: bindKey(\"Alt-Shift-K\", \"Ctrl-Shift-G\"),\n exec: function(editor) { \n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findPrevious();\n },\n readOnly: true\n}, {\n name: \"find\",\n bindKey: bindKey(\"Ctrl-F\", \"Command-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor);});\n },\n readOnly: true\n}, {\n name: \"overwrite\",\n bindKey: \"Insert\",\n exec: function(editor) { editor.toggleOverwrite(); },\n readOnly: true\n}, {\n name: \"selecttostart\",\n bindKey: bindKey(\"Ctrl-Shift-Home\", \"Command-Shift-Home|Command-Shift-Up\"),\n exec: function(editor) { editor.getSelection().selectFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotostart\",\n bindKey: bindKey(\"Ctrl-Home\", \"Command-Home|Command-Up\"),\n exec: function(editor) { editor.navigateFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectup\",\n bindKey: bindKey(\"Shift-Up\", \"Shift-Up|Ctrl-Shift-P\"),\n exec: function(editor) { editor.getSelection().selectUp(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golineup\",\n bindKey: bindKey(\"Up\", \"Up|Ctrl-P\"),\n exec: function(editor, args) { editor.navigateUp(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttoend\",\n bindKey: bindKey(\"Ctrl-Shift-End\", \"Command-Shift-End|Command-Shift-Down\"),\n exec: function(editor) { editor.getSelection().selectFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotoend\",\n bindKey: bindKey(\"Ctrl-End\", \"Command-End|Command-Down\"),\n exec: function(editor) { editor.navigateFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectdown\",\n bindKey: bindKey(\"Shift-Down\", \"Shift-Down|Ctrl-Shift-N\"),\n exec: function(editor) { editor.getSelection().selectDown(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golinedown\",\n bindKey: bindKey(\"Down\", \"Down|Ctrl-N\"),\n exec: function(editor, args) { editor.navigateDown(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordleft\",\n bindKey: bindKey(\"Ctrl-Shift-Left\", \"Option-Shift-Left\"),\n exec: function(editor) { editor.getSelection().selectWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordleft\",\n bindKey: bindKey(\"Ctrl-Left\", \"Option-Left\"),\n exec: function(editor) { editor.navigateWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolinestart\",\n bindKey: bindKey(\"Alt-Shift-Left\", \"Command-Shift-Left|Ctrl-Shift-A\"),\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolinestart\",\n bindKey: bindKey(\"Alt-Left|Home\", \"Command-Left|Home|Ctrl-A\"),\n exec: function(editor) { editor.navigateLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectleft\",\n bindKey: bindKey(\"Shift-Left\", \"Shift-Left|Ctrl-Shift-B\"),\n exec: function(editor) { editor.getSelection().selectLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoleft\",\n bindKey: bindKey(\"Left\", \"Left|Ctrl-B\"),\n exec: function(editor, args) { editor.navigateLeft(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordright\",\n bindKey: bindKey(\"Ctrl-Shift-Right\", \"Option-Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordright\",\n bindKey: bindKey(\"Ctrl-Right\", \"Option-Right\"),\n exec: function(editor) { editor.navigateWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolineend\",\n bindKey: bindKey(\"Alt-Shift-Right\", \"Command-Shift-Right|Shift-End|Ctrl-Shift-E\"),\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolineend\",\n bindKey: bindKey(\"Alt-Right|End\", \"Command-Right|End|Ctrl-E\"),\n exec: function(editor) { editor.navigateLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectright\",\n bindKey: bindKey(\"Shift-Right\", \"Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoright\",\n bindKey: bindKey(\"Right\", \"Right|Ctrl-F\"),\n exec: function(editor, args) { editor.navigateRight(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectpagedown\",\n bindKey: \"Shift-PageDown\",\n exec: function(editor) { editor.selectPageDown(); },\n readOnly: true\n}, {\n name: \"pagedown\",\n bindKey: bindKey(null, \"Option-PageDown\"),\n exec: function(editor) { editor.scrollPageDown(); },\n readOnly: true\n}, {\n name: \"gotopagedown\",\n bindKey: bindKey(\"PageDown\", \"PageDown|Ctrl-V\"),\n exec: function(editor) { editor.gotoPageDown(); },\n readOnly: true\n}, {\n name: \"selectpageup\",\n bindKey: \"Shift-PageUp\",\n exec: function(editor) { editor.selectPageUp(); },\n readOnly: true\n}, {\n name: \"pageup\",\n bindKey: bindKey(null, \"Option-PageUp\"),\n exec: function(editor) { editor.scrollPageUp(); },\n readOnly: true\n}, {\n name: \"gotopageup\",\n bindKey: \"PageUp\",\n exec: function(editor) { editor.gotoPageUp(); },\n readOnly: true\n}, {\n name: \"scrollup\",\n bindKey: bindKey(\"Ctrl-Up\", null),\n exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"scrolldown\",\n bindKey: bindKey(\"Ctrl-Down\", null),\n exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"selectlinestart\",\n bindKey: \"Shift-Home\",\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectlineend\",\n bindKey: \"Shift-End\",\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"togglerecording\",\n bindKey: bindKey(\"Ctrl-Alt-E\", \"Command-Option-E\"),\n exec: function(editor) { editor.commands.toggleRecording(editor); },\n readOnly: true\n}, {\n name: \"replaymacro\",\n bindKey: bindKey(\"Ctrl-Shift-E\", \"Command-Shift-E\"),\n exec: function(editor) { editor.commands.replay(editor); },\n readOnly: true\n}, {\n name: \"jumptomatching\",\n bindKey: bindKey(\"Ctrl-P\", \"Ctrl-P\"),\n exec: function(editor) { editor.jumpToMatching(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selecttomatching\",\n bindKey: bindKey(\"Ctrl-Shift-P\", \"Ctrl-Shift-P\"),\n exec: function(editor) { editor.jumpToMatching(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"expandToMatching\",\n bindKey: bindKey(\"Ctrl-Shift-M\", \"Ctrl-Shift-M\"),\n exec: function(editor) { editor.jumpToMatching(true, true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"passKeysToBrowser\",\n bindKey: bindKey(null, null),\n exec: function() {},\n passEvent: true,\n readOnly: true\n}, {\n name: \"copy\",\n exec: function(editor) {\n },\n readOnly: true\n},\n{\n name: \"cut\",\n exec: function(editor) {\n var range = editor.getSelectionRange();\n editor._emit(\"cut\", range);\n\n if (!editor.selection.isEmpty()) {\n editor.session.remove(range);\n editor.clearSelection();\n }\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"paste\",\n exec: function(editor, args) {\n editor.$handlePaste(args);\n },\n scrollIntoView: \"cursor\"\n}, {\n name: \"removeline\",\n bindKey: bindKey(\"Ctrl-D\", \"Command-D\"),\n exec: function(editor) { editor.removeLines(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"duplicateSelection\",\n bindKey: bindKey(\"Ctrl-Shift-D\", \"Command-Shift-D\"),\n exec: function(editor) { editor.duplicateSelection(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"sortlines\",\n bindKey: bindKey(\"Ctrl-Alt-S\", \"Command-Alt-S\"),\n exec: function(editor) { editor.sortLines(); },\n scrollIntoView: \"selection\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"togglecomment\",\n bindKey: bindKey(\"Ctrl-/\", \"Command-/\"),\n exec: function(editor) { editor.toggleCommentLines(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"toggleBlockComment\",\n bindKey: bindKey(\"Ctrl-Shift-/\", \"Command-Shift-/\"),\n exec: function(editor) { editor.toggleBlockComment(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"modifyNumberUp\",\n bindKey: bindKey(\"Ctrl-Shift-Up\", \"Alt-Shift-Up\"),\n exec: function(editor) { editor.modifyNumber(1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"modifyNumberDown\",\n bindKey: bindKey(\"Ctrl-Shift-Down\", \"Alt-Shift-Down\"),\n exec: function(editor) { editor.modifyNumber(-1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"replace\",\n bindKey: bindKey(\"Ctrl-H\", \"Command-Option-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor, true);});\n }\n}, {\n name: \"undo\",\n bindKey: bindKey(\"Ctrl-Z\", \"Command-Z\"),\n exec: function(editor) { editor.undo(); }\n}, {\n name: \"redo\",\n bindKey: bindKey(\"Ctrl-Shift-Z|Ctrl-Y\", \"Command-Shift-Z|Command-Y\"),\n exec: function(editor) { editor.redo(); }\n}, {\n name: \"copylinesup\",\n bindKey: bindKey(\"Alt-Shift-Up\", \"Command-Option-Up\"),\n exec: function(editor) { editor.copyLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesup\",\n bindKey: bindKey(\"Alt-Up\", \"Option-Up\"),\n exec: function(editor) { editor.moveLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"copylinesdown\",\n bindKey: bindKey(\"Alt-Shift-Down\", \"Command-Option-Down\"),\n exec: function(editor) { editor.copyLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesdown\",\n bindKey: bindKey(\"Alt-Down\", \"Option-Down\"),\n exec: function(editor) { editor.moveLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"del\",\n bindKey: bindKey(\"Delete\", \"Delete|Ctrl-D|Shift-Delete\"),\n exec: function(editor) { editor.remove(\"right\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"backspace\",\n bindKey: bindKey(\n \"Shift-Backspace|Backspace\",\n \"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H\"\n ),\n exec: function(editor) { editor.remove(\"left\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"cut_or_delete\",\n bindKey: bindKey(\"Shift-Delete\", null),\n exec: function(editor) { \n if (editor.selection.isEmpty()) {\n editor.remove(\"left\");\n } else {\n return false;\n }\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolinestart\",\n bindKey: bindKey(\"Alt-Backspace\", \"Command-Backspace\"),\n exec: function(editor) { editor.removeToLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolineend\",\n bindKey: bindKey(\"Alt-Delete\", \"Ctrl-K|Command-Delete\"),\n exec: function(editor) { editor.removeToLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolinestarthard\",\n bindKey: bindKey(\"Ctrl-Shift-Backspace\", null),\n exec: function(editor) {\n var range = editor.selection.getRange();\n range.start.column = 0;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolineendhard\",\n bindKey: bindKey(\"Ctrl-Shift-Delete\", null),\n exec: function(editor) {\n var range = editor.selection.getRange();\n range.end.column = Number.MAX_VALUE;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordleft\",\n bindKey: bindKey(\"Ctrl-Backspace\", \"Alt-Backspace|Ctrl-Alt-Backspace\"),\n exec: function(editor) { editor.removeWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordright\",\n bindKey: bindKey(\"Ctrl-Delete\", \"Alt-Delete\"),\n exec: function(editor) { editor.removeWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"outdent\",\n bindKey: bindKey(\"Shift-Tab\", \"Shift-Tab\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"indent\",\n bindKey: bindKey(\"Tab\", \"Tab\"),\n exec: function(editor) { editor.indent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockoutdent\",\n bindKey: bindKey(\"Ctrl-[\", \"Ctrl-[\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockindent\",\n bindKey: bindKey(\"Ctrl-]\", \"Ctrl-]\"),\n exec: function(editor) { editor.blockIndent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"insertstring\",\n exec: function(editor, str) { editor.insert(str); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"inserttext\",\n exec: function(editor, args) {\n editor.insert(lang.stringRepeat(args.text || \"\", args.times || 1));\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"splitline\",\n bindKey: bindKey(null, \"Ctrl-O\"),\n exec: function(editor) { editor.splitLine(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"transposeletters\",\n bindKey: bindKey(\"Alt-Shift-X\", \"Ctrl-T\"),\n exec: function(editor) { editor.transposeLetters(); },\n multiSelectAction: function(editor) {editor.transposeSelections(1); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"touppercase\",\n bindKey: bindKey(\"Ctrl-U\", \"Ctrl-U\"),\n exec: function(editor) { editor.toUpperCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"tolowercase\",\n bindKey: bindKey(\"Ctrl-Shift-U\", \"Ctrl-Shift-U\"),\n exec: function(editor) { editor.toLowerCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"expandtoline\",\n bindKey: bindKey(\"Ctrl-Shift-L\", \"Command-Shift-L\"),\n exec: function(editor) {\n var range = editor.selection.getRange();\n\n range.start.column = range.end.column = 0;\n range.end.row++;\n editor.selection.setRange(range, false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"joinlines\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var isBackwards = editor.selection.isBackwards();\n var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();\n var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();\n var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;\n var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());\n var selectedCount = selectedText.replace(/\\n\\s*/, \" \").length;\n var insertLine = editor.session.doc.getLine(selectionStart.row);\n\n for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {\n var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));\n if (curLine.length !== 0) {\n curLine = \" \" + curLine;\n }\n insertLine += curLine;\n }\n\n if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {\n insertLine += editor.session.doc.getNewLineCharacter();\n }\n\n editor.clearSelection();\n editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);\n\n if (selectedCount > 0) {\n editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);\n editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);\n } else {\n firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;\n editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);\n }\n },\n multiSelectAction: \"forEach\",\n readOnly: true\n}, {\n name: \"invertSelection\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var endRow = editor.session.doc.getLength() - 1;\n var endCol = editor.session.doc.getLine(endRow).length;\n var ranges = editor.selection.rangeList.ranges;\n var newRanges = [];\n if (ranges.length < 1) {\n ranges = [editor.selection.getRange()];\n }\n\n for (var i = 0; i < ranges.length; i++) {\n if (i == (ranges.length - 1)) {\n if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {\n newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));\n }\n }\n\n if (i === 0) {\n if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {\n newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));\n }\n } else {\n newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column));\n }\n }\n\n editor.exitMultiSelectMode();\n editor.clearSelection();\n\n for(var i = 0; i < newRanges.length; i++) {\n editor.selection.addRange(newRanges[i], false);\n }\n },\n readOnly: true,\n scrollIntoView: \"none\"\n}];\n\n});\n\nace.define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\",\"ace/lib/dom\",\"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\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar lang = acequire(\"./lib/lang\");\nvar useragent = acequire(\"./lib/useragent\");\nvar TextInput = acequire(\"./keyboard/textinput\").TextInput;\nvar MouseHandler = acequire(\"./mouse/mouse_handler\").MouseHandler;\nvar FoldHandler = acequire(\"./mouse/fold_handler\").FoldHandler;\nvar KeyBinding = acequire(\"./keyboard/keybinding\").KeyBinding;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar Search = acequire(\"./search\").Search;\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar CommandManager = acequire(\"./commands/command_manager\").CommandManager;\nvar defaultCommands = acequire(\"./commands/default_commands\").commands;\nvar config = acequire(\"./config\");\nvar TokenIterator = acequire(\"./token_iterator\").TokenIterator;\nvar Editor = function(renderer, session) {\n var container = renderer.getContainerElement();\n this.container = container;\n this.renderer = renderer;\n this.id = \"editor\" + (++Editor.$uid);\n\n this.commands = new CommandManager(useragent.isMac ? \"mac\" : \"win\", defaultCommands);\n if (typeof document == \"object\") {\n this.textInput = new TextInput(renderer.getTextAreaContainer(), this);\n this.renderer.textarea = this.textInput.getElement();\n this.$mouseHandler = new MouseHandler(this);\n new FoldHandler(this);\n }\n\n this.keyBinding = new KeyBinding(this);\n\n this.$blockScrolling = 0;\n this.$search = new Search().set({\n wrap: true\n });\n\n this.$historyTracker = this.$historyTracker.bind(this);\n this.commands.on(\"exec\", this.$historyTracker);\n\n this.$initOperationListeners();\n \n this._$emitInputEvent = lang.delayedCall(function() {\n this._signal(\"input\", {});\n if (this.session && this.session.bgTokenizer)\n this.session.bgTokenizer.scheduleStart();\n }.bind(this));\n \n this.on(\"change\", function(_, _self) {\n _self._$emitInputEvent.schedule(31);\n });\n\n this.setSession(session || new EditSession(\"\"));\n config.resetOptions(this);\n config._signal(\"editor\", this);\n};\n\nEditor.$uid = 0;\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$initOperationListeners = function() {\n function last(a) {return a[a.length - 1];}\n\n this.selections = [];\n this.commands.on(\"exec\", this.startOperation.bind(this), true);\n this.commands.on(\"afterExec\", this.endOperation.bind(this), true);\n\n this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));\n\n this.on(\"change\", function() {\n this.curOp || this.startOperation();\n this.curOp.docChanged = true;\n }.bind(this), true);\n\n this.on(\"changeSelection\", function() {\n this.curOp || this.startOperation();\n this.curOp.selectionChanged = true;\n }.bind(this), true);\n };\n\n this.curOp = null;\n this.prevOp = {};\n this.startOperation = function(commadEvent) {\n if (this.curOp) {\n if (!commadEvent || this.curOp.command)\n return;\n this.prevOp = this.curOp;\n }\n if (!commadEvent) {\n this.previousCommand = null;\n commadEvent = {};\n }\n\n this.$opResetTimer.schedule();\n this.curOp = {\n command: commadEvent.command || {},\n args: commadEvent.args,\n scrollTop: this.renderer.scrollTop\n };\n if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)\n this.$blockScrolling++;\n };\n\n this.endOperation = function(e) {\n if (this.curOp) {\n if (e && e.returnValue === false)\n return this.curOp = null;\n this._signal(\"beforeEndOperation\");\n var command = this.curOp.command;\n if (command.name && this.$blockScrolling > 0)\n this.$blockScrolling--;\n var scrollIntoView = command && command.scrollIntoView;\n if (scrollIntoView) {\n switch (scrollIntoView) {\n case \"center-animate\":\n scrollIntoView = \"animate\";\n case \"center\":\n this.renderer.scrollCursorIntoView(null, 0.5);\n break;\n case \"animate\":\n case \"cursor\":\n this.renderer.scrollCursorIntoView();\n break;\n case \"selectionPart\":\n var range = this.selection.getRange();\n var config = this.renderer.layerConfig;\n if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {\n this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);\n }\n break;\n default:\n break;\n }\n if (scrollIntoView == \"animate\")\n this.renderer.animateScrolling(this.curOp.scrollTop);\n }\n \n this.prevOp = this.curOp;\n this.curOp = null;\n }\n };\n this.$mergeableCommands = [\"backspace\", \"del\", \"insertstring\"];\n this.$historyTracker = function(e) {\n if (!this.$mergeUndoDeltas)\n return;\n\n var prev = this.prevOp;\n var mergeableCommands = this.$mergeableCommands;\n var shouldMerge = prev.command && (e.command.name == prev.command.name);\n if (e.command.name == \"insertstring\") {\n var text = e.args;\n if (this.mergeNextCommand === undefined)\n this.mergeNextCommand = true;\n\n shouldMerge = shouldMerge\n && this.mergeNextCommand // previous command allows to coalesce with\n && (!/\\s/.test(text) || /\\s/.test(prev.args)); // previous insertion was of same type\n\n this.mergeNextCommand = true;\n } else {\n shouldMerge = shouldMerge\n && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable\n }\n\n if (\n this.$mergeUndoDeltas != \"always\"\n && Date.now() - this.sequenceStartTime > 2000\n ) {\n shouldMerge = false; // the sequence is too long\n }\n\n if (shouldMerge)\n this.session.mergeUndoDeltas = true;\n else if (mergeableCommands.indexOf(e.command.name) !== -1)\n this.sequenceStartTime = Date.now();\n };\n this.setKeyboardHandler = function(keyboardHandler, cb) {\n if (keyboardHandler && typeof keyboardHandler === \"string\") {\n this.$keybindingId = keyboardHandler;\n var _self = this;\n config.loadModule([\"keybinding\", keyboardHandler], function(module) {\n if (_self.$keybindingId == keyboardHandler)\n _self.keyBinding.setKeyboardHandler(module && module.handler);\n cb && cb();\n });\n } else {\n this.$keybindingId = null;\n this.keyBinding.setKeyboardHandler(keyboardHandler);\n cb && cb();\n }\n };\n this.getKeyboardHandler = function() {\n return this.keyBinding.getKeyboardHandler();\n };\n this.setSession = function(session) {\n if (this.session == session)\n return;\n if (this.curOp) this.endOperation();\n this.curOp = {};\n\n var oldSession = this.session;\n if (oldSession) {\n this.session.off(\"change\", this.$onDocumentChange);\n this.session.off(\"changeMode\", this.$onChangeMode);\n this.session.off(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.session.off(\"changeTabSize\", this.$onChangeTabSize);\n this.session.off(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.session.off(\"changeWrapMode\", this.$onChangeWrapMode);\n this.session.off(\"changeFold\", this.$onChangeFold);\n this.session.off(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.session.off(\"changeBackMarker\", this.$onChangeBackMarker);\n this.session.off(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.session.off(\"changeAnnotation\", this.$onChangeAnnotation);\n this.session.off(\"changeOverwrite\", this.$onCursorChange);\n this.session.off(\"changeScrollTop\", this.$onScrollTopChange);\n this.session.off(\"changeScrollLeft\", this.$onScrollLeftChange);\n\n var selection = this.session.getSelection();\n selection.off(\"changeCursor\", this.$onCursorChange);\n selection.off(\"changeSelection\", this.$onSelectionChange);\n }\n\n this.session = session;\n if (session) {\n this.$onDocumentChange = this.onDocumentChange.bind(this);\n session.on(\"change\", this.$onDocumentChange);\n this.renderer.setSession(session);\n \n this.$onChangeMode = this.onChangeMode.bind(this);\n session.on(\"changeMode\", this.$onChangeMode);\n \n this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);\n session.on(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n \n this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);\n session.on(\"changeTabSize\", this.$onChangeTabSize);\n \n this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);\n session.on(\"changeWrapLimit\", this.$onChangeWrapLimit);\n \n this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);\n session.on(\"changeWrapMode\", this.$onChangeWrapMode);\n \n this.$onChangeFold = this.onChangeFold.bind(this);\n session.on(\"changeFold\", this.$onChangeFold);\n \n this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);\n this.session.on(\"changeFrontMarker\", this.$onChangeFrontMarker);\n \n this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);\n this.session.on(\"changeBackMarker\", this.$onChangeBackMarker);\n \n this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);\n this.session.on(\"changeBreakpoint\", this.$onChangeBreakpoint);\n \n this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);\n this.session.on(\"changeAnnotation\", this.$onChangeAnnotation);\n \n this.$onCursorChange = this.onCursorChange.bind(this);\n this.session.on(\"changeOverwrite\", this.$onCursorChange);\n \n this.$onScrollTopChange = this.onScrollTopChange.bind(this);\n this.session.on(\"changeScrollTop\", this.$onScrollTopChange);\n \n this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);\n this.session.on(\"changeScrollLeft\", this.$onScrollLeftChange);\n \n this.selection = session.getSelection();\n this.selection.on(\"changeCursor\", this.$onCursorChange);\n \n this.$onSelectionChange = this.onSelectionChange.bind(this);\n this.selection.on(\"changeSelection\", this.$onSelectionChange);\n \n this.onChangeMode();\n \n this.$blockScrolling += 1;\n this.onCursorChange();\n this.$blockScrolling -= 1;\n \n this.onScrollTopChange();\n this.onScrollLeftChange();\n this.onSelectionChange();\n this.onChangeFrontMarker();\n this.onChangeBackMarker();\n this.onChangeBreakpoint();\n this.onChangeAnnotation();\n this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();\n this.renderer.updateFull();\n } else {\n this.selection = null;\n this.renderer.setSession(session);\n }\n\n this._signal(\"changeSession\", {\n session: session,\n oldSession: oldSession\n });\n \n this.curOp = null;\n \n oldSession && oldSession._signal(\"changeEditor\", {oldEditor: this});\n session && session._signal(\"changeEditor\", {editor: this});\n\n if (session && session.bgTokenizer)\n session.bgTokenizer.scheduleStart();\n };\n this.getSession = function() {\n return this.session;\n };\n this.setValue = function(val, cursorPos) {\n this.session.doc.setValue(val);\n\n if (!cursorPos)\n this.selectAll();\n else if (cursorPos == 1)\n this.navigateFileEnd();\n else if (cursorPos == -1)\n this.navigateFileStart();\n\n return val;\n };\n this.getValue = function() {\n return this.session.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.resize = function(force) {\n this.renderer.onResize(force);\n };\n this.setTheme = function(theme, cb) {\n this.renderer.setTheme(theme, cb);\n };\n this.getTheme = function() {\n return this.renderer.getTheme();\n };\n this.setStyle = function(style) {\n this.renderer.setStyle(style);\n };\n this.unsetStyle = function(style) {\n this.renderer.unsetStyle(style);\n };\n this.getFontSize = function () {\n return this.getOption(\"fontSize\") ||\n dom.computedStyle(this.container, \"fontSize\");\n };\n this.setFontSize = function(size) {\n this.setOption(\"fontSize\", size);\n };\n\n this.$highlightBrackets = function() {\n if (this.session.$bracketHighlight) {\n this.session.removeMarker(this.session.$bracketHighlight);\n this.session.$bracketHighlight = null;\n }\n\n if (this.$highlightPending) {\n return;\n }\n var self = this;\n this.$highlightPending = true;\n setTimeout(function() {\n self.$highlightPending = false;\n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n var pos = session.findMatchingBracket(self.getCursorPosition());\n if (pos) {\n var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);\n } else if (session.$mode.getMatching) {\n var range = session.$mode.getMatching(self.session);\n }\n if (range)\n session.$bracketHighlight = session.addMarker(range, \"ace_bracket\", \"text\");\n }, 50);\n };\n this.$highlightTags = function() {\n if (this.$highlightTagPending)\n return;\n var self = this;\n this.$highlightTagPending = true;\n setTimeout(function() {\n self.$highlightTagPending = false;\n \n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n \n var pos = self.getCursorPosition();\n var iterator = new TokenIterator(self.session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n \n if (!token || !/\\b(?:tag-open|tag-name)/.test(token.type)) {\n session.removeMarker(session.$tagHighlight);\n session.$tagHighlight = null;\n return;\n }\n \n if (token.type.indexOf(\"tag-open\") != -1) {\n token = iterator.stepForward();\n if (!token)\n return;\n }\n \n var tag = token.value;\n var depth = 0;\n var prevToken = iterator.stepBackward();\n \n if (prevToken.value == '<'){\n do {\n prevToken = token;\n token = iterator.stepForward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<'){\n depth++;\n } else if (prevToken.value === '= 0);\n } else {\n do {\n token = prevToken;\n prevToken = iterator.stepBackward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<') {\n depth++;\n } else if (prevToken.value === ' 1))\n highlight = false;\n }\n\n if (session.$highlightLineMarker && !highlight) {\n session.removeMarker(session.$highlightLineMarker.id);\n session.$highlightLineMarker = null;\n } else if (!session.$highlightLineMarker && highlight) {\n var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);\n range.id = session.addMarker(range, \"ace_active-line\", \"screenLine\");\n session.$highlightLineMarker = range;\n } else if (highlight) {\n session.$highlightLineMarker.start.row = highlight.row;\n session.$highlightLineMarker.end.row = highlight.row;\n session.$highlightLineMarker.start.column = highlight.column;\n session._signal(\"changeBackMarker\");\n }\n };\n\n this.onSelectionChange = function(e) {\n var session = this.session;\n\n if (session.$selectionMarker) {\n session.removeMarker(session.$selectionMarker);\n }\n session.$selectionMarker = null;\n\n if (!this.selection.isEmpty()) {\n var range = this.selection.getRange();\n var style = this.getSelectionStyle();\n session.$selectionMarker = session.addMarker(range, \"ace_selection\", style);\n } else {\n this.$updateHighlightActiveLine();\n }\n\n var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();\n this.session.highlight(re);\n\n this._signal(\"changeSelection\");\n };\n\n this.$getSelectionHighLightRegexp = function() {\n var session = this.session;\n\n var selection = this.getSelectionRange();\n if (selection.isEmpty() || selection.isMultiLine())\n return;\n\n var startOuter = selection.start.column - 1;\n var endOuter = selection.end.column + 1;\n var line = session.getLine(selection.start.row);\n var lineCols = line.length;\n var needle = line.substring(Math.max(startOuter, 0),\n Math.min(endOuter, lineCols));\n if ((startOuter >= 0 && /^[\\w\\d]/.test(needle)) ||\n (endOuter <= lineCols && /[\\w\\d]$/.test(needle)))\n return;\n\n needle = line.substring(selection.start.column, selection.end.column);\n if (!/^[\\w\\d]+$/.test(needle))\n return;\n\n var re = this.$search.$assembleRegExp({\n wholeWord: true,\n caseSensitive: true,\n needle: needle\n });\n\n return re;\n };\n\n\n this.onChangeFrontMarker = function() {\n this.renderer.updateFrontMarkers();\n };\n\n this.onChangeBackMarker = function() {\n this.renderer.updateBackMarkers();\n };\n\n\n this.onChangeBreakpoint = function() {\n this.renderer.updateBreakpoints();\n };\n\n this.onChangeAnnotation = function() {\n this.renderer.setAnnotations(this.session.getAnnotations());\n };\n\n\n this.onChangeMode = function(e) {\n this.renderer.updateText();\n this._emit(\"changeMode\", e);\n };\n\n\n this.onChangeWrapLimit = function() {\n this.renderer.updateFull();\n };\n\n this.onChangeWrapMode = function() {\n this.renderer.onResize(true);\n };\n\n\n this.onChangeFold = function() {\n this.$updateHighlightActiveLine();\n this.renderer.updateFull();\n };\n this.getSelectedText = function() {\n return this.session.getTextRange(this.getSelectionRange());\n };\n this.getCopyText = function() {\n var text = this.getSelectedText();\n this._signal(\"copy\", text);\n return text;\n };\n this.onCopy = function() {\n this.commands.exec(\"copy\", this);\n };\n this.onCut = function() {\n this.commands.exec(\"cut\", this);\n };\n this.onPaste = function(text, event) {\n var e = {text: text, event: event};\n this.commands.exec(\"paste\", this, e);\n };\n \n this.$handlePaste = function(e) {\n if (typeof e == \"string\") \n e = {text: e};\n this._signal(\"paste\", e);\n var text = e.text;\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {\n this.insert(text);\n } else {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var ranges = this.selection.rangeList.ranges;\n \n if (lines.length > ranges.length || lines.length < 2 || !lines[1])\n return this.commands.exec(\"insertstring\", this, text);\n \n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.isEmpty())\n this.session.remove(range);\n \n this.session.insert(range.start, lines[i]);\n }\n }\n };\n\n this.execCommand = function(command, args) {\n return this.commands.exec(command, this, args);\n };\n this.insert = function(text, pasted) {\n var session = this.session;\n var mode = session.getMode();\n var cursor = this.getCursorPosition();\n\n if (this.getBehavioursEnabled() && !pasted) {\n var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);\n if (transform) {\n if (text !== transform.text) {\n this.session.mergeUndoDeltas = false;\n this.$mergeNextCommand = false;\n }\n text = transform.text;\n\n }\n }\n \n if (text == \"\\t\")\n text = this.session.getTabString();\n if (!this.selection.isEmpty()) {\n var range = this.getSelectionRange();\n cursor = this.session.remove(range);\n this.clearSelection();\n }\n else if (this.session.getOverwrite() && text.indexOf(\"\\n\") == -1) {\n var range = new Range.fromPoints(cursor, cursor);\n range.end.column += text.length;\n this.session.remove(range);\n }\n\n if (text == \"\\n\" || text == \"\\r\\n\") {\n var line = session.getLine(cursor.row);\n if (cursor.column > line.search(/\\S|$/)) {\n var d = line.substr(cursor.column).search(/\\S|$/);\n session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);\n }\n }\n this.clearSelection();\n\n var start = cursor.column;\n var lineState = session.getState(cursor.row);\n var line = session.getLine(cursor.row);\n var shouldOutdent = mode.checkOutdent(lineState, line, text);\n var end = session.insert(cursor, text);\n\n if (transform && transform.selection) {\n if (transform.selection.length == 2) { // Transform relative to the current column\n this.selection.setSelectionRange(\n new Range(cursor.row, start + transform.selection[0],\n cursor.row, start + transform.selection[1]));\n } else { // Transform relative to the current row.\n this.selection.setSelectionRange(\n new Range(cursor.row + transform.selection[0],\n transform.selection[1],\n cursor.row + transform.selection[2],\n transform.selection[3]));\n }\n }\n\n if (session.getDocument().isNewLine(text)) {\n var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());\n\n session.insert({row: cursor.row+1, column: 0}, lineIndent);\n }\n if (shouldOutdent)\n mode.autoOutdent(lineState, session, cursor.row);\n };\n\n this.onTextInput = function(text) {\n this.keyBinding.onTextInput(text);\n };\n\n this.onCommandKey = function(e, hashId, keyCode) {\n this.keyBinding.onCommandKey(e, hashId, keyCode);\n };\n this.setOverwrite = function(overwrite) {\n this.session.setOverwrite(overwrite);\n };\n this.getOverwrite = function() {\n return this.session.getOverwrite();\n };\n this.toggleOverwrite = function() {\n this.session.toggleOverwrite();\n };\n this.setScrollSpeed = function(speed) {\n this.setOption(\"scrollSpeed\", speed);\n };\n this.getScrollSpeed = function() {\n return this.getOption(\"scrollSpeed\");\n };\n this.setDragDelay = function(dragDelay) {\n this.setOption(\"dragDelay\", dragDelay);\n };\n this.getDragDelay = function() {\n return this.getOption(\"dragDelay\");\n };\n this.setSelectionStyle = function(val) {\n this.setOption(\"selectionStyle\", val);\n };\n this.getSelectionStyle = function() {\n return this.getOption(\"selectionStyle\");\n };\n this.setHighlightActiveLine = function(shouldHighlight) {\n this.setOption(\"highlightActiveLine\", shouldHighlight);\n };\n this.getHighlightActiveLine = function() {\n return this.getOption(\"highlightActiveLine\");\n };\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n this.setHighlightSelectedWord = function(shouldHighlight) {\n this.setOption(\"highlightSelectedWord\", shouldHighlight);\n };\n this.getHighlightSelectedWord = function() {\n return this.$highlightSelectedWord;\n };\n\n this.setAnimatedScroll = function(shouldAnimate){\n this.renderer.setAnimatedScroll(shouldAnimate);\n };\n\n this.getAnimatedScroll = function(){\n return this.renderer.getAnimatedScroll();\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.renderer.setShowInvisibles(showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.renderer.getShowInvisibles();\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.renderer.setDisplayIndentGuides(display);\n };\n\n this.getDisplayIndentGuides = function() {\n return this.renderer.getDisplayIndentGuides();\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.renderer.setShowPrintMargin(showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.renderer.getShowPrintMargin();\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.renderer.setPrintMarginColumn(showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.renderer.getPrintMarginColumn();\n };\n this.setReadOnly = function(readOnly) {\n this.setOption(\"readOnly\", readOnly);\n };\n this.getReadOnly = function() {\n return this.getOption(\"readOnly\");\n };\n this.setBehavioursEnabled = function (enabled) {\n this.setOption(\"behavioursEnabled\", enabled);\n };\n this.getBehavioursEnabled = function () {\n return this.getOption(\"behavioursEnabled\");\n };\n this.setWrapBehavioursEnabled = function (enabled) {\n this.setOption(\"wrapBehavioursEnabled\", enabled);\n };\n this.getWrapBehavioursEnabled = function () {\n return this.getOption(\"wrapBehavioursEnabled\");\n };\n this.setShowFoldWidgets = function(show) {\n this.setOption(\"showFoldWidgets\", show);\n\n };\n this.getShowFoldWidgets = function() {\n return this.getOption(\"showFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function(fade) {\n this.setOption(\"fadeFoldWidgets\", fade);\n };\n\n this.getFadeFoldWidgets = function() {\n return this.getOption(\"fadeFoldWidgets\");\n };\n this.remove = function(dir) {\n if (this.selection.isEmpty()){\n if (dir == \"left\")\n this.selection.selectLeft();\n else\n this.selection.selectRight();\n }\n\n var range = this.getSelectionRange();\n if (this.getBehavioursEnabled()) {\n var session = this.session;\n var state = session.getState(range.start.row);\n var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);\n\n if (range.end.column === 0) {\n var text = session.getTextRange(range);\n if (text[text.length - 1] == \"\\n\") {\n var line = session.getLine(range.end.row);\n if (/^\\s+$/.test(line)) {\n range.end.column = line.length;\n }\n }\n }\n if (new_range)\n range = new_range;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.removeWordRight = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordRight();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeWordLeft = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordLeft();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineStart = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineStart();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineEnd = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineEnd();\n\n var range = this.getSelectionRange();\n if (range.start.column == range.end.column && range.start.row == range.end.row) {\n range.end.column = 0;\n range.end.row++;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.splitLine = function() {\n if (!this.selection.isEmpty()) {\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n }\n\n var cursor = this.getCursorPosition();\n this.insert(\"\\n\");\n this.moveCursorToPosition(cursor);\n };\n this.transposeLetters = function() {\n if (!this.selection.isEmpty()) {\n return;\n }\n\n var cursor = this.getCursorPosition();\n var column = cursor.column;\n if (column === 0)\n return;\n\n var line = this.session.getLine(cursor.row);\n var swap, range;\n if (column < line.length) {\n swap = line.charAt(column) + line.charAt(column-1);\n range = new Range(cursor.row, column-1, cursor.row, column+1);\n }\n else {\n swap = line.charAt(column-1) + line.charAt(column-2);\n range = new Range(cursor.row, column-2, cursor.row, column);\n }\n this.session.replace(range, swap);\n this.session.selection.moveToPosition(range.end);\n };\n this.toLowerCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toLowerCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.toUpperCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toUpperCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.indent = function() {\n var session = this.session;\n var range = this.getSelectionRange();\n\n if (range.start.row < range.end.row) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n } else if (range.start.column < range.end.column) {\n var text = session.getTextRange(range);\n if (!/^\\s+$/.test(text)) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n }\n \n var line = session.getLine(range.start.row);\n var position = range.start;\n var size = session.getTabSize();\n var column = session.documentToScreenColumn(position.row, position.column);\n\n if (this.session.getUseSoftTabs()) {\n var count = (size - column % size);\n var indentString = lang.stringRepeat(\" \", count);\n } else {\n var count = column % size;\n while (line[range.start.column - 1] == \" \" && count) {\n range.start.column--;\n count--;\n }\n this.selection.setSelectionRange(range);\n indentString = \"\\t\";\n }\n return this.insert(indentString);\n };\n this.blockIndent = function() {\n var rows = this.$getSelectedRows();\n this.session.indentRows(rows.first, rows.last, \"\\t\");\n };\n this.blockOutdent = function() {\n var selection = this.session.getSelection();\n this.session.outdentRows(selection.getRange());\n };\n this.sortLines = function() {\n var rows = this.$getSelectedRows();\n var session = this.session;\n\n var lines = [];\n for (var i = rows.first; i <= rows.last; i++)\n lines.push(session.getLine(i));\n\n lines.sort(function(a, b) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n if (a.toLowerCase() > b.toLowerCase()) return 1;\n return 0;\n });\n\n var deleteRange = new Range(0, 0, 0, 0);\n for (var i = rows.first; i <= rows.last; i++) {\n var line = session.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n deleteRange.end.column = line.length;\n session.replace(deleteRange, lines[i-rows.first]);\n }\n };\n this.toggleCommentLines = function() {\n var state = this.session.getState(this.getCursorPosition().row);\n var rows = this.$getSelectedRows();\n this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);\n };\n\n this.toggleBlockComment = function() {\n var cursor = this.getCursorPosition();\n var state = this.session.getState(cursor.row);\n var range = this.getSelectionRange();\n this.session.getMode().toggleBlockComment(state, this.session, range, cursor);\n };\n this.getNumberAt = function(row, column) {\n var _numberRx = /[\\-]?[0-9]+(?:\\.[0-9]+)?/g;\n _numberRx.lastIndex = 0;\n\n var s = this.session.getLine(row);\n while (_numberRx.lastIndex < column) {\n var m = _numberRx.exec(s);\n if(m.index <= column && m.index+m[0].length >= column){\n var number = {\n value: m[0],\n start: m.index,\n end: m.index+m[0].length\n };\n return number;\n }\n }\n return null;\n };\n this.modifyNumber = function(amount) {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n var charRange = new Range(row, column-1, row, column);\n\n var c = this.session.getTextRange(charRange);\n if (!isNaN(parseFloat(c)) && isFinite(c)) {\n var nr = this.getNumberAt(row, column);\n if (nr) {\n var fp = nr.value.indexOf(\".\") >= 0 ? nr.start + nr.value.indexOf(\".\") + 1 : nr.end;\n var decimals = nr.start + nr.value.length - fp;\n\n var t = parseFloat(nr.value);\n t *= Math.pow(10, decimals);\n\n\n if(fp !== nr.end && column < fp){\n amount *= Math.pow(10, nr.end - column - 1);\n } else {\n amount *= Math.pow(10, nr.end - column);\n }\n\n t += amount;\n t /= Math.pow(10, decimals);\n var nnr = t.toFixed(decimals);\n var replaceRange = new Range(row, nr.start, row, nr.end);\n this.session.replace(replaceRange, nnr);\n this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));\n\n }\n }\n };\n this.removeLines = function() {\n var rows = this.$getSelectedRows();\n this.session.removeFullLines(rows.first, rows.last);\n this.clearSelection();\n };\n\n this.duplicateSelection = function() {\n var sel = this.selection;\n var doc = this.session;\n var range = sel.getRange();\n var reverse = sel.isBackwards();\n if (range.isEmpty()) {\n var row = range.start.row;\n doc.duplicateLines(row, row);\n } else {\n var point = reverse ? range.start : range.end;\n var endPoint = doc.insert(point, doc.getTextRange(range), false);\n range.start = point;\n range.end = endPoint;\n\n sel.setSelectionRange(range, reverse);\n }\n };\n this.moveLinesDown = function() {\n this.$moveLines(1, false);\n };\n this.moveLinesUp = function() {\n this.$moveLines(-1, false);\n };\n this.moveText = function(range, toPosition, copy) {\n return this.session.moveText(range, toPosition, copy);\n };\n this.copyLinesUp = function() {\n this.$moveLines(-1, true);\n };\n this.copyLinesDown = function() {\n this.$moveLines(1, true);\n };\n this.$moveLines = function(dir, copy) {\n var rows, moved;\n var selection = this.selection;\n if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {\n var range = selection.toOrientedRange();\n rows = this.$getSelectedRows(range);\n moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);\n if (copy && dir == -1) moved = 0;\n range.moveBy(moved, 0);\n selection.fromOrientedRange(range);\n } else {\n var ranges = selection.rangeList.ranges;\n selection.rangeList.detach(this.session);\n this.inVirtualSelectionMode = true;\n \n var diff = 0;\n var totalDiff = 0;\n var l = ranges.length;\n for (var i = 0; i < l; i++) {\n var rangeIndex = i;\n ranges[i].moveBy(diff, 0);\n rows = this.$getSelectedRows(ranges[i]);\n var first = rows.first;\n var last = rows.last;\n while (++i < l) {\n if (totalDiff) ranges[i].moveBy(totalDiff, 0);\n var subRows = this.$getSelectedRows(ranges[i]);\n if (copy && subRows.first != last)\n break;\n else if (!copy && subRows.first > last + 1)\n break;\n last = subRows.last;\n }\n i--;\n diff = this.session.$moveLines(first, last, copy ? 0 : dir);\n if (copy && dir == -1) rangeIndex = i + 1;\n while (rangeIndex <= i) {\n ranges[rangeIndex].moveBy(diff, 0);\n rangeIndex++;\n }\n if (!copy) diff = 0;\n totalDiff += diff;\n }\n \n selection.fromOrientedRange(selection.ranges[0]);\n selection.rangeList.attach(this.session);\n this.inVirtualSelectionMode = false;\n }\n };\n this.$getSelectedRows = function(range) {\n range = (range || this.getSelectionRange()).collapseRows();\n\n return {\n first: this.session.getRowFoldStart(range.start.row),\n last: this.session.getRowFoldEnd(range.end.row)\n };\n };\n\n this.onCompositionStart = function(text) {\n this.renderer.showComposition(this.getCursorPosition());\n };\n\n this.onCompositionUpdate = function(text) {\n this.renderer.setCompositionText(text);\n };\n\n this.onCompositionEnd = function() {\n this.renderer.hideComposition();\n };\n this.getFirstVisibleRow = function() {\n return this.renderer.getFirstVisibleRow();\n };\n this.getLastVisibleRow = function() {\n return this.renderer.getLastVisibleRow();\n };\n this.isRowVisible = function(row) {\n return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());\n };\n this.isRowFullyVisible = function(row) {\n return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());\n };\n this.$getVisibleRowCount = function() {\n return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;\n };\n\n this.$moveByPage = function(dir, select) {\n var renderer = this.renderer;\n var config = this.renderer.layerConfig;\n var rows = dir * Math.floor(config.height / config.lineHeight);\n\n this.$blockScrolling++;\n if (select === true) {\n this.selection.$moveSelection(function(){\n this.moveCursorBy(rows, 0);\n });\n } else if (select === false) {\n this.selection.moveCursorBy(rows, 0);\n this.selection.clearSelection();\n }\n this.$blockScrolling--;\n\n var scrollTop = renderer.scrollTop;\n\n renderer.scrollBy(0, rows * config.lineHeight);\n if (select != null)\n renderer.scrollCursorIntoView(null, 0.5);\n\n renderer.animateScrolling(scrollTop);\n };\n this.selectPageDown = function() {\n this.$moveByPage(1, true);\n };\n this.selectPageUp = function() {\n this.$moveByPage(-1, true);\n };\n this.gotoPageDown = function() {\n this.$moveByPage(1, false);\n };\n this.gotoPageUp = function() {\n this.$moveByPage(-1, false);\n };\n this.scrollPageDown = function() {\n this.$moveByPage(1);\n };\n this.scrollPageUp = function() {\n this.$moveByPage(-1);\n };\n this.scrollToRow = function(row) {\n this.renderer.scrollToRow(row);\n };\n this.scrollToLine = function(line, center, animate, callback) {\n this.renderer.scrollToLine(line, center, animate, callback);\n };\n this.centerSelection = function() {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n };\n this.getCursorPosition = function() {\n return this.selection.getCursor();\n };\n this.getCursorPositionScreen = function() {\n return this.session.documentToScreenPosition(this.getCursorPosition());\n };\n this.getSelectionRange = function() {\n return this.selection.getRange();\n };\n this.selectAll = function() {\n this.$blockScrolling += 1;\n this.selection.selectAll();\n this.$blockScrolling -= 1;\n };\n this.clearSelection = function() {\n this.selection.clearSelection();\n };\n this.moveCursorTo = function(row, column) {\n this.selection.moveCursorTo(row, column);\n };\n this.moveCursorToPosition = function(pos) {\n this.selection.moveCursorToPosition(pos);\n };\n this.jumpToMatching = function(select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var token = prevToken || iterator.stepForward();\n\n if (!token) return;\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n \n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n break;\n }\n }\n }\n else if (token && token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n \n if (prevToken.value === '<') {\n depth[token.value]++;\n }\n else if (prevToken.value === '= 0; --i) {\n if(this.$tryReplace(ranges[i], replacement)) {\n replaced++;\n }\n }\n\n this.selection.setSelectionRange(selection);\n this.$blockScrolling -= 1;\n\n return replaced;\n };\n\n this.$tryReplace = function(range, replacement) {\n var input = this.session.getTextRange(range);\n replacement = this.$search.replace(input, replacement);\n if (replacement !== null) {\n range.end = this.session.replace(range, replacement);\n return range;\n } else {\n return null;\n }\n };\n this.getLastSearchOptions = function() {\n return this.$search.getOptions();\n };\n this.find = function(needle, options, animate) {\n if (!options)\n options = {};\n\n if (typeof needle == \"string\" || needle instanceof RegExp)\n options.needle = needle;\n else if (typeof needle == \"object\")\n oop.mixin(options, needle);\n\n var range = this.selection.getRange();\n if (options.needle == null) {\n needle = this.session.getTextRange(range)\n || this.$search.$options.needle;\n if (!needle) {\n range = this.session.getWordRange(range.start.row, range.start.column);\n needle = this.session.getTextRange(range);\n }\n this.$search.set({needle: needle});\n }\n\n this.$search.set(options);\n if (!options.start)\n this.$search.set({start: range});\n\n var newRange = this.$search.find(this.session);\n if (options.preventScroll)\n return newRange;\n if (newRange) {\n this.revealRange(newRange, animate);\n return newRange;\n }\n if (options.backwards)\n range.start = range.end;\n else\n range.end = range.start;\n this.selection.setRange(range);\n };\n this.findNext = function(options, animate) {\n this.find({skipCurrent: true, backwards: false}, options, animate);\n };\n this.findPrevious = function(options, animate) {\n this.find(options, {skipCurrent: true, backwards: true}, animate);\n };\n\n this.revealRange = function(range, animate) {\n this.$blockScrolling += 1;\n this.session.unfold(range);\n this.selection.setSelectionRange(range);\n this.$blockScrolling -= 1;\n\n var scrollTop = this.renderer.scrollTop;\n this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);\n if (animate !== false)\n this.renderer.animateScrolling(scrollTop);\n };\n this.undo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().undo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.redo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().redo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.destroy = function() {\n this.renderer.destroy();\n this._signal(\"destroy\", this);\n if (this.session) {\n this.session.destroy();\n }\n };\n this.setAutoScrollEditorIntoView = function(enable) {\n if (!enable)\n return;\n var rect;\n var self = this;\n var shouldScroll = false;\n if (!this.$scrollAnchor)\n this.$scrollAnchor = document.createElement(\"div\");\n var scrollAnchor = this.$scrollAnchor;\n scrollAnchor.style.cssText = \"position:absolute\";\n this.container.insertBefore(scrollAnchor, this.container.firstChild);\n var onChangeSelection = this.on(\"changeSelection\", function() {\n shouldScroll = true;\n });\n var onBeforeRender = this.renderer.on(\"beforeRender\", function() {\n if (shouldScroll)\n rect = self.renderer.container.getBoundingClientRect();\n });\n var onAfterRender = this.renderer.on(\"afterRender\", function() {\n if (shouldScroll && rect && (self.isFocused()\n || self.searchBox && self.searchBox.isFocused())\n ) {\n var renderer = self.renderer;\n var pos = renderer.$cursorLayer.$pixelPos;\n var config = renderer.layerConfig;\n var top = pos.top - config.offset;\n if (pos.top >= 0 && top + rect.top < 0) {\n shouldScroll = true;\n } else if (pos.top < config.height &&\n pos.top + rect.top + config.lineHeight > window.innerHeight) {\n shouldScroll = false;\n } else {\n shouldScroll = null;\n }\n if (shouldScroll != null) {\n scrollAnchor.style.top = top + \"px\";\n scrollAnchor.style.left = pos.left + \"px\";\n scrollAnchor.style.height = config.lineHeight + \"px\";\n scrollAnchor.scrollIntoView(shouldScroll);\n }\n shouldScroll = rect = null;\n }\n });\n this.setAutoScrollEditorIntoView = function(enable) {\n if (enable)\n return;\n delete this.setAutoScrollEditorIntoView;\n this.off(\"changeSelection\", onChangeSelection);\n this.renderer.off(\"afterRender\", onAfterRender);\n this.renderer.off(\"beforeRender\", onBeforeRender);\n };\n };\n\n\n this.$resetCursorStyle = function() {\n var style = this.$cursorStyle || \"ace\";\n var cursorLayer = this.renderer.$cursorLayer;\n if (!cursorLayer)\n return;\n cursorLayer.setSmoothBlinking(/smooth/.test(style));\n cursorLayer.isBlinking = !this.$readOnly && style != \"wide\";\n dom.setCssClass(cursorLayer.element, \"ace_slim-cursors\", /slim/.test(style));\n };\n\n}).call(Editor.prototype);\n\n\n\nconfig.defineOptions(Editor.prototype, \"editor\", {\n selectionStyle: {\n set: function(style) {\n this.onSelectionChange();\n this._signal(\"changeSelectionStyle\", {data: style});\n },\n initialValue: \"line\"\n },\n highlightActiveLine: {\n set: function() {this.$updateHighlightActiveLine();},\n initialValue: true\n },\n highlightSelectedWord: {\n set: function(shouldHighlight) {this.$onSelectionChange();},\n initialValue: true\n },\n readOnly: {\n set: function(readOnly) {\n this.$resetCursorStyle(); \n },\n initialValue: false\n },\n cursorStyle: {\n set: function(val) { this.$resetCursorStyle(); },\n values: [\"ace\", \"slim\", \"smooth\", \"wide\"],\n initialValue: \"ace\"\n },\n mergeUndoDeltas: {\n values: [false, true, \"always\"],\n initialValue: true\n },\n behavioursEnabled: {initialValue: true},\n wrapBehavioursEnabled: {initialValue: true},\n autoScrollEditorIntoView: {\n set: function(val) {this.setAutoScrollEditorIntoView(val);}\n },\n keyboardHandler: {\n set: function(val) { this.setKeyboardHandler(val); },\n get: function() { return this.keybindingId; },\n handlesSet: true\n },\n\n hScrollBarAlwaysVisible: \"renderer\",\n vScrollBarAlwaysVisible: \"renderer\",\n highlightGutterLine: \"renderer\",\n animatedScroll: \"renderer\",\n showInvisibles: \"renderer\",\n showPrintMargin: \"renderer\",\n printMarginColumn: \"renderer\",\n printMargin: \"renderer\",\n fadeFoldWidgets: \"renderer\",\n showFoldWidgets: \"renderer\",\n showLineNumbers: \"renderer\",\n showGutter: \"renderer\",\n displayIndentGuides: \"renderer\",\n fontSize: \"renderer\",\n fontFamily: \"renderer\",\n maxLines: \"renderer\",\n minLines: \"renderer\",\n scrollPastEnd: \"renderer\",\n fixedWidthGutter: \"renderer\",\n theme: \"renderer\",\n\n scrollSpeed: \"$mouseHandler\",\n dragDelay: \"$mouseHandler\",\n dragEnabled: \"$mouseHandler\",\n focusTimout: \"$mouseHandler\",\n tooltipFollowsMouse: \"$mouseHandler\",\n\n firstLineNumber: \"session\",\n overwrite: \"session\",\n newLineMode: \"session\",\n useWorker: \"session\",\n useSoftTabs: \"session\",\n tabSize: \"session\",\n wrap: \"session\",\n indentedSoftWrap: \"session\",\n foldStyle: \"session\",\n mode: \"session\"\n});\n\nexports.Editor = Editor;\n});\n\nace.define(\"ace/undomanager\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar UndoManager = function() {\n this.reset();\n};\n\n(function() {\n this.execute = function(options) {\n var deltaSets = options.args[0];\n this.$doc = options.args[1];\n if (options.merge && this.hasUndo()){\n this.dirtyCounter--;\n deltaSets = this.$undoStack.pop().concat(deltaSets);\n }\n this.$undoStack.push(deltaSets);\n this.$redoStack = [];\n if (this.dirtyCounter < 0) {\n this.dirtyCounter = NaN;\n }\n this.dirtyCounter++;\n };\n this.undo = function(dontSelect) {\n var deltaSets = this.$undoStack.pop();\n var undoSelectionRange = null;\n if (deltaSets) {\n undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect);\n this.$redoStack.push(deltaSets);\n this.dirtyCounter--;\n }\n\n return undoSelectionRange;\n };\n this.redo = function(dontSelect) {\n var deltaSets = this.$redoStack.pop();\n var redoSelectionRange = null;\n if (deltaSets) {\n redoSelectionRange =\n this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect);\n this.$undoStack.push(deltaSets);\n this.dirtyCounter++;\n }\n return redoSelectionRange;\n };\n this.reset = function() {\n this.$undoStack = [];\n this.$redoStack = [];\n this.dirtyCounter = 0;\n };\n this.hasUndo = function() {\n return this.$undoStack.length > 0;\n };\n this.hasRedo = function() {\n return this.$redoStack.length > 0;\n };\n this.markClean = function() {\n this.dirtyCounter = 0;\n };\n this.isClean = function() {\n return this.dirtyCounter === 0;\n };\n this.$serializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $serializeDelta);\n };\n this.$deserializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $deserializeDelta);\n };\n \n function $serializeDelta(delta){\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines.length == 1 ? null : delta.lines,\n text: delta.lines.length == 1 ? delta.lines[0] : null\n };\n }\n \n function $deserializeDelta(delta) {\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines || [delta.text]\n };\n }\n \n function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) {\n var deltaSets_new = new Array(deltaSets_old.length);\n for (var i = 0; i < deltaSets_old.length; i++) {\n var deltaSet_old = deltaSets_old[i];\n var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)};\n \n for (var j = 0; j < deltaSet_old.deltas.length; j++) {\n var delta_old = deltaSet_old.deltas[j];\n deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old);\n }\n \n deltaSets_new[i] = deltaSet_new;\n }\n return deltaSets_new;\n }\n \n}).call(UndoManager.prototype);\n\nexports.UndoManager = UndoManager;\n});\n\nace.define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Gutter = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_gutter-layer\";\n parentEl.appendChild(this.element);\n this.setShowFoldWidgets(this.$showFoldWidgets);\n \n this.gutterWidth = 0;\n\n this.$annotations = [];\n this.$updateAnnotations = this.$updateAnnotations.bind(this);\n\n this.$cells = [];\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.setSession = function(session) {\n if (this.session)\n this.session.removeEventListener(\"change\", this.$updateAnnotations);\n this.session = session;\n if (session)\n session.on(\"change\", this.$updateAnnotations);\n };\n\n this.addGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.addGutterDecoration\");\n this.session.addGutterDecoration(row, className);\n };\n\n this.removeGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.removeGutterDecoration\");\n this.session.removeGutterDecoration(row, className);\n };\n\n this.setAnnotations = function(annotations) {\n this.$annotations = [];\n for (var i = 0; i < annotations.length; i++) {\n var annotation = annotations[i];\n var row = annotation.row;\n var rowInfo = this.$annotations[row];\n if (!rowInfo)\n rowInfo = this.$annotations[row] = {text: []};\n \n var annoText = annotation.text;\n annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || \"\";\n\n if (rowInfo.text.indexOf(annoText) === -1)\n rowInfo.text.push(annoText);\n\n var type = annotation.type;\n if (type == \"error\")\n rowInfo.className = \" ace_error\";\n else if (type == \"warning\" && rowInfo.className != \" ace_error\")\n rowInfo.className = \" ace_warning\";\n else if (type == \"info\" && (!rowInfo.className))\n rowInfo.className = \" ace_info\";\n }\n };\n\n this.$updateAnnotations = function (delta) {\n if (!this.$annotations.length)\n return;\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n } else if (delta.action == 'remove') {\n this.$annotations.splice(firstRow, len + 1, null);\n } else {\n var args = new Array(len + 1);\n args.unshift(firstRow, 1);\n this.$annotations.splice.apply(this.$annotations, args);\n }\n };\n\n this.update = function(config) {\n var session = this.session;\n var firstRow = config.firstRow;\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n session.getLength() - 1);\n var fold = session.getNextFoldLine(firstRow);\n var foldStart = fold ? fold.start.row : Infinity;\n var foldWidgets = this.$showFoldWidgets && session.foldWidgets;\n var breakpoints = session.$breakpoints;\n var decorations = session.$decorations;\n var firstLineNumber = session.$firstLineNumber;\n var lastLineNumber = 0;\n \n var gutterRenderer = session.gutterRenderer || this.$renderer;\n\n var cell = null;\n var index = -1;\n var row = firstRow;\n while (true) {\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = session.getNextFoldLine(row, fold);\n foldStart = fold ? fold.start.row : Infinity;\n }\n if (row > lastRow) {\n while (this.$cells.length > index + 1) {\n cell = this.$cells.pop();\n this.element.removeChild(cell.element);\n }\n break;\n }\n\n cell = this.$cells[++index];\n if (!cell) {\n cell = {element: null, textNode: null, foldWidget: null};\n cell.element = dom.createElement(\"div\");\n cell.textNode = document.createTextNode('');\n cell.element.appendChild(cell.textNode);\n this.element.appendChild(cell.element);\n this.$cells[index] = cell;\n }\n\n var className = \"ace_gutter-cell \";\n if (breakpoints[row])\n className += breakpoints[row];\n if (decorations[row])\n className += decorations[row];\n if (this.$annotations[row])\n className += this.$annotations[row].className;\n if (cell.element.className != className)\n cell.element.className = className;\n\n var height = session.getRowLength(row) * config.lineHeight + \"px\";\n if (height != cell.element.style.height)\n cell.element.style.height = height;\n\n if (foldWidgets) {\n var c = foldWidgets[row];\n if (c == null)\n c = foldWidgets[row] = session.getFoldWidget(row);\n }\n\n if (c) {\n if (!cell.foldWidget) {\n cell.foldWidget = dom.createElement(\"span\");\n cell.element.appendChild(cell.foldWidget);\n }\n var className = \"ace_fold-widget ace_\" + c;\n if (c == \"start\" && row == foldStart && row < fold.end.row)\n className += \" ace_closed\";\n else\n className += \" ace_open\";\n if (cell.foldWidget.className != className)\n cell.foldWidget.className = className;\n\n var height = config.lineHeight + \"px\";\n if (cell.foldWidget.style.height != height)\n cell.foldWidget.style.height = height;\n } else {\n if (cell.foldWidget) {\n cell.element.removeChild(cell.foldWidget);\n cell.foldWidget = null;\n }\n }\n \n var text = lastLineNumber = gutterRenderer\n ? gutterRenderer.getText(session, row)\n : row + firstLineNumber;\n if (text !== cell.textNode.data)\n cell.textNode.data = text;\n\n row++;\n }\n\n this.element.style.height = config.minHeight + \"px\";\n\n if (this.$fixedWidth || session.$useWrapMode)\n lastLineNumber = session.getLength() + firstLineNumber;\n\n var gutterWidth = gutterRenderer \n ? gutterRenderer.getWidth(session, lastLineNumber, config)\n : lastLineNumber.toString().length * config.characterWidth;\n \n var padding = this.$padding || this.$computePadding();\n gutterWidth += padding.left + padding.right;\n if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {\n this.gutterWidth = gutterWidth;\n this.element.style.width = Math.ceil(this.gutterWidth) + \"px\";\n this._emit(\"changeGutterWidth\", gutterWidth);\n }\n };\n\n this.$fixedWidth = false;\n \n this.$showLineNumbers = true;\n this.$renderer = \"\";\n this.setShowLineNumbers = function(show) {\n this.$renderer = !show && {\n getWidth: function() {return \"\";},\n getText: function() {return \"\";}\n };\n };\n \n this.getShowLineNumbers = function() {\n return this.$showLineNumbers;\n };\n \n this.$showFoldWidgets = true;\n this.setShowFoldWidgets = function(show) {\n if (show)\n dom.addCssClass(this.element, \"ace_folding-enabled\");\n else\n dom.removeCssClass(this.element, \"ace_folding-enabled\");\n\n this.$showFoldWidgets = show;\n this.$padding = null;\n };\n \n this.getShowFoldWidgets = function() {\n return this.$showFoldWidgets;\n };\n\n this.$computePadding = function() {\n if (!this.element.firstChild)\n return {left: 0, right: 0};\n var style = dom.computedStyle(this.element.firstChild);\n this.$padding = {};\n this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;\n this.$padding.right = parseInt(style.paddingRight) || 0;\n return this.$padding;\n };\n\n this.getRegion = function(point) {\n var padding = this.$padding || this.$computePadding();\n var rect = this.element.getBoundingClientRect();\n if (point.x < padding.left + rect.left)\n return \"markers\";\n if (this.$showFoldWidgets && point.x > rect.right - padding.right)\n return \"foldWidgets\";\n };\n\n}).call(Gutter.prototype);\n\nexports.Gutter = Gutter;\n\n});\n\nace.define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar dom = acequire(\"../lib/dom\");\n\nvar Marker = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_marker-layer\";\n parentEl.appendChild(this.element);\n};\n\n(function() {\n\n this.$padding = 0;\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n this.setSession = function(session) {\n this.session = session;\n };\n \n this.setMarkers = function(markers) {\n this.markers = markers;\n };\n\n this.update = function(config) {\n if (!config) return;\n\n this.config = config;\n\n\n var html = [];\n for (var key in this.markers) {\n var marker = this.markers[key];\n\n if (!marker.range) {\n marker.update(html, this, this.session, config);\n continue;\n }\n\n var range = marker.range.clipRows(config.firstRow, config.lastRow);\n if (range.isEmpty()) continue;\n\n range = range.toScreenRange(this.session);\n if (marker.renderer) {\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + (this.session.$bidiHandler.isBidiRow(range.start.row)\n ? this.session.$bidiHandler.getPosLeft(range.start.column)\n : range.start.column * config.characterWidth);\n marker.renderer(html, range, left, top, config);\n } else if (marker.type == \"fullLine\") {\n this.drawFullLineMarker(html, range, marker.clazz, config);\n } else if (marker.type == \"screenLine\") {\n this.drawScreenLineMarker(html, range, marker.clazz, config);\n } else if (range.isMultiLine()) {\n if (marker.type == \"text\")\n this.drawTextMarker(html, range, marker.clazz, config);\n else\n this.drawMultiLineMarker(html, range, marker.clazz, config);\n } else {\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n this.drawBidiSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n } else {\n this.drawSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n }\n }\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$getTop = function(row, layerConfig) {\n return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;\n };\n\n function getBorderClass(tl, tr, br, bl) {\n return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);\n }\n this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {\n var session = this.session;\n var start = range.start.row;\n var end = range.end.row;\n var row = start;\n var prev = 0; \n var curr = 0;\n var next = session.getScreenLastRowColumn(row);\n var clazzModified = null;\n var lineRange = new Range(row, range.start.column, row, curr);\n for (; row <= end; row++) {\n lineRange.start.row = lineRange.end.row = row;\n lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);\n lineRange.end.column = next;\n prev = curr;\n curr = next;\n next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;\n clazzModified = clazz + (row == start ? \" ace_start\" : \"\") + \" ace_br\"\n + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end);\n\n if (this.session.$bidiHandler.isBidiRow(row)) {\n this.drawBidiSingleLineMarker(stringBuilder, lineRange, clazzModified,\n layerConfig, row == end ? 0 : 1, extraStyle);\n } else {\n this.drawSingleLineMarker(stringBuilder, lineRange, clazzModified,\n layerConfig, row == end ? 0 : 1, extraStyle);\n }\n }\n };\n this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var padding = this.$padding;\n var height, top, left;\n extraStyle = extraStyle || \"\";\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n var range1 = range.clone();\n range1.end.row = range1.start.row;\n range1.end.column = this.session.getLine(range1.start.row).length;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br1 ace_start\", config, null, extraStyle);\n } else {\n height = config.lineHeight;\n top = this.$getTop(range.start.row, config);\n left = padding + range.start.column * config.characterWidth;\n stringBuilder.push(\n \"
    \"\n );\n }\n if (this.session.$bidiHandler.isBidiRow(range.end.row)) {\n var range1 = range.clone();\n range1.start.row = range1.end.row;\n range1.start.column = 0;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br12\", config, null, extraStyle);\n } else {\n var width = range.end.column * config.characterWidth;\n height = config.lineHeight;\n top = this.$getTop(range.end.row, config);\n stringBuilder.push(\n \"
    \"\n );\n }\n height = (range.end.row - range.start.row - 1) * config.lineHeight;\n if (height <= 0)\n return;\n top = this.$getTop(range.start.row + 1, config);\n \n var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);\n\n stringBuilder.push(\n \"
    \"\n );\n };\n this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight;\n var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;\n\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n this.drawBidiSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding;\n var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column);\n\n selections.forEach(function(selection) {\n stringBuilder.push(\n \"
    \"\n );\n });\n };\n\n this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n if (range.start.row != range.end.row)\n height += this.$getTop(range.end.row, config) - top;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n \n this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n\n}).call(Marker.prototype);\n\nexports.Marker = Marker;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Text = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_text-layer\";\n parentEl.appendChild(this.element);\n this.$updateEolChar = this.$updateEolChar.bind(this);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.EOF_CHAR = \"\\xB6\";\n this.EOL_CHAR_LF = \"\\xAC\";\n this.EOL_CHAR_CRLF = \"\\xa4\";\n this.EOL_CHAR = this.EOL_CHAR_LF;\n this.TAB_CHAR = \"\\u2014\"; //\"\\u21E5\";\n this.SPACE_CHAR = \"\\xB7\";\n this.$padding = 0;\n\n this.$updateEolChar = function() {\n var EOL_CHAR = this.session.doc.getNewLineCharacter() == \"\\n\"\n ? this.EOL_CHAR_LF\n : this.EOL_CHAR_CRLF;\n if (this.EOL_CHAR != EOL_CHAR) {\n this.EOL_CHAR = EOL_CHAR;\n return true;\n }\n };\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.element.style.padding = \"0 \" + padding + \"px\";\n };\n\n this.getLineHeight = function() {\n return this.$fontMetrics.$characterSize.height || 0;\n };\n\n this.getCharacterWidth = function() {\n return this.$fontMetrics.$characterSize.width || 0;\n };\n \n this.$setFontMetrics = function(measure) {\n this.$fontMetrics = measure;\n this.$fontMetrics.on(\"changeCharacterSize\", function(e) {\n this._signal(\"changeCharacterSize\", e);\n }.bind(this));\n this.$pollSizeChanges();\n };\n\n this.checkForSizeChanges = function() {\n this.$fontMetrics.checkForSizeChanges();\n };\n this.$pollSizeChanges = function() {\n return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();\n };\n this.setSession = function(session) {\n this.session = session;\n if (session)\n this.$computeTabString();\n };\n\n this.showInvisibles = false;\n this.setShowInvisibles = function(showInvisibles) {\n if (this.showInvisibles == showInvisibles)\n return false;\n\n this.showInvisibles = showInvisibles;\n this.$computeTabString();\n return true;\n };\n\n this.displayIndentGuides = true;\n this.setDisplayIndentGuides = function(display) {\n if (this.displayIndentGuides == display)\n return false;\n\n this.displayIndentGuides = display;\n this.$computeTabString();\n return true;\n };\n\n this.$tabStrings = [];\n this.onChangeTabSize =\n this.$computeTabString = function() {\n var tabSize = this.session.getTabSize();\n this.tabSize = tabSize;\n var tabStr = this.$tabStrings = [0];\n for (var i = 1; i < tabSize + 1; i++) {\n if (this.showInvisibles) {\n tabStr.push(\"\"\n + lang.stringRepeat(this.TAB_CHAR, i)\n + \"\");\n } else {\n tabStr.push(lang.stringRepeat(\" \", i));\n }\n }\n if (this.displayIndentGuides) {\n this.$indentGuideRe = /\\s\\S| \\t|\\t |\\s$/;\n var className = \"ace_indent-guide\";\n var spaceClass = \"\";\n var tabClass = \"\";\n if (this.showInvisibles) {\n className += \" ace_invisible\";\n spaceClass = \" ace_invisible_space\";\n tabClass = \" ace_invisible_tab\";\n var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);\n var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize);\n } else{\n var spaceContent = lang.stringRepeat(\" \", this.tabSize);\n var tabContent = spaceContent;\n }\n\n this.$tabStrings[\" \"] = \"\" + spaceContent + \"\";\n this.$tabStrings[\"\\t\"] = \"\" + tabContent + \"\";\n }\n };\n\n this.updateLines = function(config, firstRow, lastRow) {\n if (this.config.lastRow != config.lastRow ||\n this.config.firstRow != config.firstRow) {\n this.scrollLines(config);\n }\n this.config = config;\n\n var first = Math.max(firstRow, config.firstRow);\n var last = Math.min(lastRow, config.lastRow);\n\n var lineElements = this.element.childNodes;\n var lineElementsIdx = 0;\n\n for (var row = config.firstRow; row < first; row++) {\n var foldLine = this.session.getFoldLine(row);\n if (foldLine) {\n if (foldLine.containsRow(first)) {\n first = foldLine.start.row;\n break;\n } else {\n row = foldLine.end.row;\n }\n }\n lineElementsIdx ++;\n }\n\n var row = first;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > last)\n break;\n\n var lineElement = lineElements[lineElementsIdx++];\n if (lineElement) {\n var html = [];\n this.$renderLine(\n html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false\n );\n lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n lineElement.innerHTML = html.join(\"\");\n }\n row++;\n }\n };\n\n this.scrollLines = function(config) {\n var oldConfig = this.config;\n this.config = config;\n\n if (!oldConfig || oldConfig.lastRow < config.firstRow)\n return this.update(config);\n\n if (config.lastRow < oldConfig.firstRow)\n return this.update(config);\n\n var el = this.element;\n if (oldConfig.firstRow < config.firstRow)\n for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)\n el.removeChild(el.firstChild);\n\n if (oldConfig.lastRow > config.lastRow)\n for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)\n el.removeChild(el.lastChild);\n\n if (config.firstRow < oldConfig.firstRow) {\n var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);\n if (el.firstChild)\n el.insertBefore(fragment, el.firstChild);\n else\n el.appendChild(fragment);\n }\n\n if (config.lastRow > oldConfig.lastRow) {\n var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);\n el.appendChild(fragment);\n }\n };\n\n this.$renderLinesFragment = function(config, firstRow, lastRow) {\n var fragment = this.element.ownerDocument.createDocumentFragment();\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n\n var container = dom.createElement(\"div\");\n\n var html = [];\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n container.innerHTML = html.join(\"\");\n if (this.$useLineGroups()) {\n container.className = 'ace_line_group';\n fragment.appendChild(container);\n container.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n\n } else {\n while(container.firstChild)\n fragment.appendChild(container.firstChild);\n }\n\n row++;\n }\n return fragment;\n };\n\n this.update = function(config) {\n this.config = config;\n\n var html = [];\n var firstRow = config.firstRow, lastRow = config.lastRow;\n\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > lastRow)\n break;\n\n if (this.$useLineGroups())\n html.push(\"
    \");\n\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n\n if (this.$useLineGroups())\n html.push(\"
    \"); // end the line group\n\n row++;\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$textToken = {\n \"text\": true,\n \"rparen\": true,\n \"lparen\": true\n };\n\n this.$renderToken = function(stringBuilder, screenColumn, token, value) {\n var self = this;\n var replaceReg = /\\t|&|<|>|( +)|([\\x00-\\x1f\\x80-\\xa0\\xad\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\\uFFF9-\\uFFFC])|[\\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]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n var replaceFunc = function(c, a, b, tabIdx, idx4) {\n if (a) {\n return self.showInvisibles\n ? \"\" + lang.stringRepeat(self.SPACE_CHAR, c.length) + \"\"\n : c;\n } else if (c == \"&\") {\n return \"&\";\n } else if (c == \"<\") {\n return \"<\";\n } else if (c == \">\") {\n return \">\";\n } else if (c == \"\\t\") {\n var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);\n screenColumn += tabSize - 1;\n return self.$tabStrings[tabSize];\n } else if (c == \"\\u3000\") {\n var classToUse = self.showInvisibles ? \"ace_cjk ace_invisible ace_invisible_space\" : \"ace_cjk\";\n var space = self.showInvisibles ? self.SPACE_CHAR : \"\";\n screenColumn += 1;\n return \"\" + space + \"\";\n } else if (b) {\n return \"\" + self.SPACE_CHAR + \"\";\n } else {\n screenColumn += 1;\n return \"\" + c + \"\";\n }\n };\n\n var output = value.replace(replaceReg, replaceFunc);\n\n if (!this.$textToken[token.type]) {\n var classes = \"ace_\" + token.type.replace(/\\./g, \" ace_\");\n var style = \"\";\n if (token.type == \"fold\")\n style = \" style='width:\" + (token.value.length * this.config.characterWidth) + \"px;' \";\n stringBuilder.push(\"\", output, \"\");\n }\n else {\n stringBuilder.push(output);\n }\n return screenColumn + value.length;\n };\n\n this.renderIndentGuide = function(stringBuilder, value, max) {\n var cols = value.search(this.$indentGuideRe);\n if (cols <= 0 || cols >= max)\n return value;\n if (value[0] == \" \") {\n cols -= cols % this.tabSize;\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\" \"], cols/this.tabSize));\n return value.substr(cols);\n } else if (value[0] == \"\\t\") {\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\"\\t\"], cols));\n return value.substr(cols);\n }\n return value;\n };\n\n this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {\n var chars = 0;\n var split = 0;\n var splitChars = splits[0];\n var screenColumn = 0;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n chars = value.length;\n value = this.renderIndentGuide(stringBuilder, value, splitChars);\n if (!value)\n continue;\n chars -= value.length;\n }\n\n if (chars + value.length < splitChars) {\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n chars += value.length;\n } else {\n while (chars + value.length >= splitChars) {\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn,\n token, value.substring(0, splitChars - chars)\n );\n value = value.substring(splitChars - chars);\n chars = splitChars;\n\n if (!onlyContents) {\n stringBuilder.push(\"
    \",\n \"
    \"\n );\n }\n\n stringBuilder.push(lang.stringRepeat(\"\\xa0\", splits.indent));\n\n split ++;\n screenColumn = 0;\n splitChars = splits[split] || Number.MAX_VALUE;\n }\n if (value.length != 0) {\n chars += value.length;\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn, token, value\n );\n }\n }\n }\n };\n\n this.$renderSimpleLine = function(stringBuilder, tokens) {\n var screenColumn = 0;\n var token = tokens[0];\n var value = token.value;\n if (this.displayIndentGuides)\n value = this.renderIndentGuide(stringBuilder, value);\n if (value)\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n for (var i = 1; i < tokens.length; i++) {\n token = tokens[i];\n value = token.value;\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n }\n };\n this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {\n if (!foldLine && foldLine != false)\n foldLine = this.session.getFoldLine(row);\n\n if (foldLine)\n var tokens = this.$getFoldLineTokens(row, foldLine);\n else\n var tokens = this.session.getTokens(row);\n\n\n if (!onlyContents) {\n stringBuilder.push(\n \"
    \"\n );\n }\n\n if (tokens.length) {\n var splits = this.session.getRowSplitData(row);\n if (splits && splits.length)\n this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);\n else\n this.$renderSimpleLine(stringBuilder, tokens);\n }\n\n if (this.showInvisibles) {\n if (foldLine)\n row = foldLine.end.row;\n\n stringBuilder.push(\n \"\",\n row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,\n \"\"\n );\n }\n if (!onlyContents)\n stringBuilder.push(\"
    \");\n };\n\n this.$getFoldLineTokens = function(row, foldLine) {\n var session = this.session;\n var renderTokens = [];\n\n function addTokens(tokens, from, to) {\n var idx = 0, col = 0;\n while ((col + tokens[idx].value.length) < from) {\n col += tokens[idx].value.length;\n idx++;\n\n if (idx == tokens.length)\n return;\n }\n if (col != from) {\n var value = tokens[idx].value.substring(from - col);\n if (value.length > (to - from))\n value = value.substring(0, to - from);\n\n renderTokens.push({\n type: tokens[idx].type,\n value: value\n });\n\n col = from + value.length;\n idx += 1;\n }\n\n while (col < to && idx < tokens.length) {\n var value = tokens[idx].value;\n if (value.length + col > to) {\n renderTokens.push({\n type: tokens[idx].type,\n value: value.substring(0, to - col)\n });\n } else\n renderTokens.push(tokens[idx]);\n col += value.length;\n idx += 1;\n }\n }\n\n var tokens = session.getTokens(row);\n foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {\n if (placeholder != null) {\n renderTokens.push({\n type: \"fold\",\n value: placeholder\n });\n } else {\n if (isNewRow)\n tokens = session.getTokens(row);\n\n if (tokens.length)\n addTokens(tokens, lastColumn, column);\n }\n }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);\n\n return renderTokens;\n };\n\n this.$useLineGroups = function() {\n return this.session.getUseWrapMode();\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.$measureNode)\n this.$measureNode.parentNode.removeChild(this.$measureNode);\n delete this.$measureNode;\n };\n\n}).call(Text.prototype);\n\nexports.Text = Text;\n\n});\n\nace.define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar isIE8;\n\nvar Cursor = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_cursor-layer\";\n parentEl.appendChild(this.element);\n \n if (isIE8 === undefined)\n isIE8 = !(\"opacity\" in this.element.style);\n\n this.isVisible = false;\n this.isBlinking = true;\n this.blinkInterval = 1000;\n this.smoothBlinking = false;\n\n this.cursors = [];\n this.cursor = this.addCursor();\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.$updateCursors = (isIE8\n ? this.$updateVisibility\n : this.$updateOpacity).bind(this);\n};\n\n(function() {\n \n this.$updateVisibility = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.visibility = val ? \"\" : \"hidden\";\n };\n this.$updateOpacity = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.opacity = val ? \"\" : \"0\";\n };\n \n\n this.$padding = 0;\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n\n this.setSession = function(session) {\n this.session = session;\n };\n\n this.setBlinking = function(blinking) {\n if (blinking != this.isBlinking){\n this.isBlinking = blinking;\n this.restartTimer();\n }\n };\n\n this.setBlinkInterval = function(blinkInterval) {\n if (blinkInterval != this.blinkInterval){\n this.blinkInterval = blinkInterval;\n this.restartTimer();\n }\n };\n\n this.setSmoothBlinking = function(smoothBlinking) {\n if (smoothBlinking != this.smoothBlinking && !isIE8) {\n this.smoothBlinking = smoothBlinking;\n dom.setCssClass(this.element, \"ace_smooth-blinking\", smoothBlinking);\n this.$updateCursors(true);\n this.$updateCursors = (this.$updateOpacity).bind(this);\n this.restartTimer();\n }\n };\n\n this.addCursor = function() {\n var el = dom.createElement(\"div\");\n el.className = \"ace_cursor\";\n this.element.appendChild(el);\n this.cursors.push(el);\n return el;\n };\n\n this.removeCursor = function() {\n if (this.cursors.length > 1) {\n var el = this.cursors.pop();\n el.parentNode.removeChild(el);\n return el;\n }\n };\n\n this.hideCursor = function() {\n this.isVisible = false;\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.showCursor = function() {\n this.isVisible = true;\n dom.removeCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.restartTimer = function() {\n var update = this.$updateCursors;\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n if (this.smoothBlinking) {\n dom.removeCssClass(this.element, \"ace_smooth-blinking\");\n }\n \n update(true);\n\n if (!this.isBlinking || !this.blinkInterval || !this.isVisible)\n return;\n\n if (this.smoothBlinking) {\n setTimeout(function(){\n dom.addCssClass(this.element, \"ace_smooth-blinking\");\n }.bind(this));\n }\n \n var blink = function(){\n this.timeoutId = setTimeout(function() {\n update(false);\n }, 0.6 * this.blinkInterval);\n }.bind(this);\n\n this.intervalId = setInterval(function() {\n update(true);\n blink();\n }, this.blinkInterval);\n\n blink();\n };\n\n this.getPixelPosition = function(position, onScreen) {\n if (!this.config || !this.session)\n return {left : 0, top : 0};\n\n if (!position)\n position = this.session.selection.getCursor();\n var pos = this.session.documentToScreenPosition(position);\n var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : pos.column * this.config.characterWidth);\n\n var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *\n this.config.lineHeight;\n\n return {left : cursorLeft, top : cursorTop};\n };\n\n this.update = function(config) {\n this.config = config;\n\n var selections = this.session.$selectionMarkers;\n var i = 0, cursorIndex = 0;\n\n if (selections === undefined || selections.length === 0){\n selections = [{cursor: null}];\n }\n\n for (var i = 0, n = selections.length; i < n; i++) {\n var pixelPos = this.getPixelPosition(selections[i].cursor, true);\n if ((pixelPos.top > config.height + config.offset ||\n pixelPos.top < 0) && i > 1) {\n continue;\n }\n\n var style = (this.cursors[cursorIndex++] || this.addCursor()).style;\n \n if (!this.drawCursor) {\n style.left = pixelPos.left + \"px\";\n style.top = pixelPos.top + \"px\";\n style.width = config.characterWidth + \"px\";\n style.height = config.lineHeight + \"px\";\n } else {\n this.drawCursor(style, pixelPos, config, selections[i], this.session);\n }\n }\n while (this.cursors.length > cursorIndex)\n this.removeCursor();\n\n var overwrite = this.session.getOverwrite();\n this.$setOverwrite(overwrite);\n this.$pixelPos = pixelPos;\n this.restartTimer();\n };\n \n this.drawCursor = null;\n\n this.$setOverwrite = function(overwrite) {\n if (overwrite != this.overwrite) {\n this.overwrite = overwrite;\n if (overwrite)\n dom.addCssClass(this.element, \"ace_overwrite-cursors\");\n else\n dom.removeCssClass(this.element, \"ace_overwrite-cursors\");\n }\n };\n\n this.destroy = function() {\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n };\n\n}).call(Cursor.prototype);\n\nexports.Cursor = Cursor;\n\n});\n\nace.define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar MAX_SCROLL_H = 0x8000;\nvar ScrollBar = function(parent) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_scrollbar ace_scrollbar\" + this.classSuffix;\n\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"ace_scrollbar-inner\";\n this.element.appendChild(this.inner);\n\n parent.appendChild(this.element);\n\n this.setVisible(false);\n this.skipEvent = false;\n\n event.addListener(this.element, \"scroll\", this.onScroll.bind(this));\n event.addListener(this.element, \"mousedown\", event.preventDefault);\n};\n\n(function() {\n oop.implement(this, EventEmitter);\n\n this.setVisible = function(isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n}).call(ScrollBar.prototype);\nvar VScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollTop = 0;\n this.scrollHeight = 0;\n renderer.$scrollbarWidth = \n this.width = dom.scrollbarWidth(parent.ownerDocument);\n this.inner.style.width =\n this.element.style.width = (this.width || 15) + 5 + \"px\";\n this.$minWidth = 0;\n};\n\noop.inherits(VScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-v';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollTop = this.element.scrollTop;\n if (this.coeff != 1) {\n var h = this.element.clientHeight / this.scrollHeight;\n this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);\n }\n this._emit(\"scroll\", {data: this.scrollTop});\n }\n this.skipEvent = false;\n };\n this.getWidth = function() {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n this.setHeight = function(height) {\n this.element.style.height = height + \"px\";\n };\n this.setInnerHeight =\n this.setScrollHeight = function(height) {\n this.scrollHeight = height;\n if (height > MAX_SCROLL_H) {\n this.coeff = MAX_SCROLL_H / height;\n height = MAX_SCROLL_H;\n } else if (this.coeff != 1) {\n this.coeff = 1;\n }\n this.inner.style.height = height + \"px\";\n };\n this.setScrollTop = function(scrollTop) {\n if (this.scrollTop != scrollTop) {\n this.skipEvent = true;\n this.scrollTop = scrollTop;\n this.element.scrollTop = scrollTop * this.coeff;\n }\n };\n\n}).call(VScrollBar.prototype);\nvar HScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollLeft = 0;\n this.height = renderer.$scrollbarWidth;\n this.inner.style.height =\n this.element.style.height = (this.height || 15) + 5 + \"px\";\n};\n\noop.inherits(HScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-h';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollLeft = this.element.scrollLeft;\n this._emit(\"scroll\", {data: this.scrollLeft});\n }\n this.skipEvent = false;\n };\n this.getHeight = function() {\n return this.isVisible ? this.height : 0;\n };\n this.setWidth = function(width) {\n this.element.style.width = width + \"px\";\n };\n this.setInnerWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollLeft = function(scrollLeft) {\n if (this.scrollLeft != scrollLeft) {\n this.skipEvent = true;\n this.scrollLeft = this.element.scrollLeft = scrollLeft;\n }\n };\n\n}).call(HScrollBar.prototype);\n\n\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\n\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n});\n\nace.define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"./lib/event\");\n\n\nvar RenderLoop = function(onRender, win) {\n this.onRender = onRender;\n this.pending = false;\n this.changes = 0;\n this.window = win || window;\n};\n\n(function() {\n\n\n this.schedule = function(change) {\n this.changes = this.changes | change;\n if (!this.pending && this.changes) {\n this.pending = true;\n var _self = this;\n event.nextFrame(function() {\n _self.pending = false;\n var changes;\n while (changes = _self.changes) {\n _self.changes = 0;\n _self.onRender(changes);\n }\n }, this.window);\n }\n };\n\n}).call(RenderLoop.prototype);\n\nexports.RenderLoop = RenderLoop;\n});\n\nace.define(\"ace/layer/font_metrics\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CHAR_COUNT = 0;\n\nvar FontMetrics = exports.FontMetrics = function(parentEl) {\n this.el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.el.style, true);\n \n this.$main = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$main.style);\n \n this.$measureNode = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$measureNode.style);\n \n \n this.el.appendChild(this.$main);\n this.el.appendChild(this.$measureNode);\n parentEl.appendChild(this.el);\n \n if (!CHAR_COUNT)\n this.$testFractionalRect();\n this.$measureNode.innerHTML = lang.stringRepeat(\"X\", CHAR_COUNT);\n \n this.$characterSize = {width: 0, height: 0};\n this.checkForSizeChanges();\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n \n this.$characterSize = {width: 0, height: 0};\n \n this.$testFractionalRect = function() {\n var el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(el.style);\n el.style.width = \"0.2px\";\n document.documentElement.appendChild(el);\n var w = el.getBoundingClientRect().width;\n if (w > 0 && w < 1)\n CHAR_COUNT = 50;\n else\n CHAR_COUNT = 100;\n el.parentNode.removeChild(el);\n };\n \n this.$setMeasureNodeStyles = function(style, isRoot) {\n style.width = style.height = \"auto\";\n style.left = style.top = \"0px\";\n style.visibility = \"hidden\";\n style.position = \"absolute\";\n style.whiteSpace = \"pre\";\n\n if (useragent.isIE < 8) {\n style[\"font-family\"] = \"inherit\";\n } else {\n style.font = \"inherit\";\n }\n style.overflow = isRoot ? \"hidden\" : \"visible\";\n };\n\n this.checkForSizeChanges = function() {\n var size = this.$measureSizes();\n if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {\n this.$measureNode.style.fontWeight = \"bold\";\n var boldSize = this.$measureSizes();\n this.$measureNode.style.fontWeight = \"\";\n this.$characterSize = size;\n this.charSizes = Object.create(null);\n this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;\n this._emit(\"changeCharacterSize\", {data: size});\n }\n };\n\n this.$pollSizeChanges = function() {\n if (this.$pollSizeChangesTimer)\n return this.$pollSizeChangesTimer;\n var self = this;\n return this.$pollSizeChangesTimer = setInterval(function() {\n self.checkForSizeChanges();\n }, 500);\n };\n \n this.setPolling = function(val) {\n if (val) {\n this.$pollSizeChanges();\n } else if (this.$pollSizeChangesTimer) {\n clearInterval(this.$pollSizeChangesTimer);\n this.$pollSizeChangesTimer = 0;\n }\n };\n\n this.$measureSizes = function() {\n if (CHAR_COUNT === 50) {\n var rect = null;\n try { \n rect = this.$measureNode.getBoundingClientRect();\n } catch(e) {\n rect = {width: 0, height:0 };\n }\n var size = {\n height: rect.height,\n width: rect.width / CHAR_COUNT\n };\n } else {\n var size = {\n height: this.$measureNode.clientHeight,\n width: this.$measureNode.clientWidth / CHAR_COUNT\n };\n }\n if (size.width === 0 || size.height === 0)\n return null;\n return size;\n };\n\n this.$measureCharWidth = function(ch) {\n this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);\n var rect = this.$main.getBoundingClientRect();\n return rect.width / CHAR_COUNT;\n };\n \n this.getCharacterWidth = function(ch) {\n var w = this.charSizes[ch];\n if (w === undefined) {\n w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;\n }\n return w;\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.el && this.el.parentNode)\n this.el.parentNode.removeChild(this.el);\n };\n\n}).call(FontMetrics.prototype);\n\n});\n\nace.define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/config\",\"ace/lib/useragent\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/scrollbar\",\"ace/renderloop\",\"ace/layer/font_metrics\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar config = acequire(\"./config\");\nvar useragent = acequire(\"./lib/useragent\");\nvar GutterLayer = acequire(\"./layer/gutter\").Gutter;\nvar MarkerLayer = acequire(\"./layer/marker\").Marker;\nvar TextLayer = acequire(\"./layer/text\").Text;\nvar CursorLayer = acequire(\"./layer/cursor\").Cursor;\nvar HScrollBar = acequire(\"./scrollbar\").HScrollBar;\nvar VScrollBar = acequire(\"./scrollbar\").VScrollBar;\nvar RenderLoop = acequire(\"./renderloop\").RenderLoop;\nvar FontMetrics = acequire(\"./layer/font_metrics\").FontMetrics;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar editorCss = \".ace_editor {\\\nposition: relative;\\\noverflow: hidden;\\\nfont: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\\\ndirection: ltr;\\\ntext-align: left;\\\n-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\\n}\\\n.ace_scroller {\\\nposition: absolute;\\\noverflow: hidden;\\\ntop: 0;\\\nbottom: 0;\\\nbackground-color: inherit;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\ncursor: text;\\\n}\\\n.ace_content {\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmin-width: 100%;\\\n}\\\n.ace_dragging .ace_scroller:before{\\\nposition: absolute;\\\ntop: 0;\\\nleft: 0;\\\nright: 0;\\\nbottom: 0;\\\ncontent: '';\\\nbackground: rgba(250, 250, 250, 0.01);\\\nz-index: 1000;\\\n}\\\n.ace_dragging.ace_dark .ace_scroller:before{\\\nbackground: rgba(0, 0, 0, 0.01);\\\n}\\\n.ace_selecting, .ace_selecting * {\\\ncursor: text !important;\\\n}\\\n.ace_gutter {\\\nposition: absolute;\\\noverflow : hidden;\\\nwidth: auto;\\\ntop: 0;\\\nbottom: 0;\\\nleft: 0;\\\ncursor: default;\\\nz-index: 4;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\n}\\\n.ace_gutter-active-line {\\\nposition: absolute;\\\nleft: 0;\\\nright: 0;\\\n}\\\n.ace_scroller.ace_scroll-left {\\\nbox-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\\\n}\\\n.ace_gutter-cell {\\\npadding-left: 19px;\\\npadding-right: 6px;\\\nbackground-repeat: no-repeat;\\\n}\\\n.ace_gutter-cell.ace_error {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_warning {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_dark .ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_scrollbar {\\\nposition: absolute;\\\nright: 0;\\\nbottom: 0;\\\nz-index: 6;\\\n}\\\n.ace_scrollbar-inner {\\\nposition: absolute;\\\ncursor: text;\\\nleft: 0;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-v{\\\noverflow-x: hidden;\\\noverflow-y: scroll;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-h {\\\noverflow-x: scroll;\\\noverflow-y: hidden;\\\nleft: 0;\\\n}\\\n.ace_print-margin {\\\nposition: absolute;\\\nheight: 100%;\\\n}\\\n.ace_text-input {\\\nposition: absolute;\\\nz-index: 0;\\\nwidth: 0.5em;\\\nheight: 1em;\\\nopacity: 0;\\\nbackground: transparent;\\\n-moz-appearance: none;\\\nappearance: none;\\\nborder: none;\\\nresize: none;\\\noutline: none;\\\noverflow: hidden;\\\nfont: inherit;\\\npadding: 0 1px;\\\nmargin: 0 -1px;\\\ntext-indent: -1em;\\\n-ms-user-select: text;\\\n-moz-user-select: text;\\\n-webkit-user-select: text;\\\nuser-select: text;\\\nwhite-space: pre!important;\\\n}\\\n.ace_text-input.ace_composition {\\\nbackground: inherit;\\\ncolor: inherit;\\\nz-index: 1000;\\\nopacity: 1;\\\ntext-indent: 0;\\\n}\\\n.ace_layer {\\\nz-index: 1;\\\nposition: absolute;\\\noverflow: hidden;\\\nword-wrap: normal;\\\nwhite-space: pre;\\\nheight: 100%;\\\nwidth: 100%;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\npointer-events: none;\\\n}\\\n.ace_gutter-layer {\\\nposition: relative;\\\nwidth: auto;\\\ntext-align: right;\\\npointer-events: auto;\\\n}\\\n.ace_text-layer {\\\nfont: inherit !important;\\\n}\\\n.ace_cjk {\\\ndisplay: inline-block;\\\ntext-align: center;\\\n}\\\n.ace_cursor-layer {\\\nz-index: 4;\\\n}\\\n.ace_cursor {\\\nz-index: 4;\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nborder-left: 2px solid;\\\ntransform: translatez(0);\\\n}\\\n.ace_multiselect .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_slim-cursors .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_overwrite-cursors .ace_cursor {\\\nborder-left-width: 0;\\\nborder-bottom: 1px solid;\\\n}\\\n.ace_hidden-cursors .ace_cursor {\\\nopacity: 0.2;\\\n}\\\n.ace_smooth-blinking .ace_cursor {\\\n-webkit-transition: opacity 0.18s;\\\ntransition: opacity 0.18s;\\\n}\\\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\\\nposition: absolute;\\\nz-index: 3;\\\n}\\\n.ace_marker-layer .ace_selection {\\\nposition: absolute;\\\nz-index: 5;\\\n}\\\n.ace_marker-layer .ace_bracket {\\\nposition: absolute;\\\nz-index: 6;\\\n}\\\n.ace_marker-layer .ace_active-line {\\\nposition: absolute;\\\nz-index: 2;\\\n}\\\n.ace_marker-layer .ace_selected-word {\\\nposition: absolute;\\\nz-index: 4;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\n}\\\n.ace_line .ace_fold {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ndisplay: inline-block;\\\nheight: 11px;\\\nmargin-top: -2px;\\\nvertical-align: middle;\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\\\");\\\nbackground-repeat: no-repeat, repeat-x;\\\nbackground-position: center center, top left;\\\ncolor: transparent;\\\nborder: 1px solid black;\\\nborder-radius: 2px;\\\ncursor: pointer;\\\npointer-events: auto;\\\n}\\\n.ace_dark .ace_fold {\\\n}\\\n.ace_fold:hover{\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_tooltip {\\\nbackground-color: #FFF;\\\nbackground-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\\\nbackground-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\\\nborder: 1px solid gray;\\\nborder-radius: 1px;\\\nbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\\\ncolor: black;\\\nmax-width: 100%;\\\npadding: 3px 4px;\\\nposition: fixed;\\\nz-index: 999999;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ncursor: default;\\\nwhite-space: pre;\\\nword-wrap: break-word;\\\nline-height: normal;\\\nfont-style: normal;\\\nfont-weight: normal;\\\nletter-spacing: normal;\\\npointer-events: none;\\\n}\\\n.ace_folding-enabled > .ace_gutter-cell {\\\npadding-right: 13px;\\\n}\\\n.ace_fold-widget {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmargin: 0 -12px 0 1px;\\\ndisplay: none;\\\nwidth: 11px;\\\nvertical-align: top;\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: center;\\\nborder-radius: 3px;\\\nborder: 1px solid transparent;\\\ncursor: pointer;\\\n}\\\n.ace_folding-enabled .ace_fold-widget {\\\ndisplay: inline-block; \\\n}\\\n.ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\\\");\\\n}\\\n.ace_fold-widget:hover {\\\nborder: 1px solid rgba(0, 0, 0, 0.3);\\\nbackground-color: rgba(255, 255, 255, 0.2);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\\\n}\\\n.ace_fold-widget:active {\\\nborder: 1px solid rgba(0, 0, 0, 0.4);\\\nbackground-color: rgba(0, 0, 0, 0.05);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\\\n}\\\n.ace_dark .ace_fold-widget {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget:hover {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\nbackground-color: rgba(255, 255, 255, 0.1);\\\n}\\\n.ace_dark .ace_fold-widget:active {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\n}\\\n.ace_fold-widget.ace_invalid {\\\nbackground-color: #FFB4B4;\\\nborder-color: #DE5555;\\\n}\\\n.ace_fade-fold-widgets .ace_fold-widget {\\\n-webkit-transition: opacity 0.4s ease 0.05s;\\\ntransition: opacity 0.4s ease 0.05s;\\\nopacity: 0;\\\n}\\\n.ace_fade-fold-widgets:hover .ace_fold-widget {\\\n-webkit-transition: opacity 0.05s ease 0.05s;\\\ntransition: opacity 0.05s ease 0.05s;\\\nopacity:1;\\\n}\\\n.ace_underline {\\\ntext-decoration: underline;\\\n}\\\n.ace_bold {\\\nfont-weight: bold;\\\n}\\\n.ace_nobold .ace_bold {\\\nfont-weight: normal;\\\n}\\\n.ace_italic {\\\nfont-style: italic;\\\n}\\\n.ace_error-marker {\\\nbackground-color: rgba(255, 0, 0,0.2);\\\nposition: absolute;\\\nz-index: 9;\\\n}\\\n.ace_highlight-marker {\\\nbackground-color: rgba(255, 255, 0,0.2);\\\nposition: absolute;\\\nz-index: 8;\\\n}\\\n.ace_br1 {border-top-left-radius : 3px;}\\\n.ace_br2 {border-top-right-radius : 3px;}\\\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\\\n.ace_br4 {border-bottom-right-radius: 3px;}\\\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\\\n.ace_br8 {border-bottom-left-radius : 3px;}\\\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_text-input-ios {\\\nposition: absolute !important;\\\ntop: -100000px !important;\\\nleft: -100000px !important;\\\n}\\\n\";\n\ndom.importCssString(editorCss, \"ace_editor.css\");\n\nvar VirtualRenderer = function(container, theme) {\n var _self = this;\n\n this.container = container || dom.createElement(\"div\");\n this.$keepTextAreaAtCursor = !useragent.isOldIE;\n\n dom.addCssClass(this.container, \"ace_editor\");\n\n this.setTheme(theme);\n\n this.$gutter = dom.createElement(\"div\");\n this.$gutter.className = \"ace_gutter\";\n this.container.appendChild(this.$gutter);\n this.$gutter.setAttribute(\"aria-hidden\", true);\n\n this.scroller = dom.createElement(\"div\");\n this.scroller.className = \"ace_scroller\";\n this.container.appendChild(this.scroller);\n\n this.content = dom.createElement(\"div\");\n this.content.className = \"ace_content\";\n this.scroller.appendChild(this.content);\n\n this.$gutterLayer = new GutterLayer(this.$gutter);\n this.$gutterLayer.on(\"changeGutterWidth\", this.onGutterResize.bind(this));\n\n this.$markerBack = new MarkerLayer(this.content);\n\n var textLayer = this.$textLayer = new TextLayer(this.content);\n this.canvas = textLayer.element;\n\n this.$markerFront = new MarkerLayer(this.content);\n\n this.$cursorLayer = new CursorLayer(this.content);\n this.$horizScroll = false;\n this.$vScroll = false;\n\n this.scrollBar = \n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n\n this.scrollTop = 0;\n this.scrollLeft = 0;\n\n this.cursorPos = {\n row : 0,\n column : 0\n };\n\n this.$fontMetrics = new FontMetrics(this.container);\n this.$textLayer.$setFontMetrics(this.$fontMetrics);\n this.$textLayer.addEventListener(\"changeCharacterSize\", function(e) {\n _self.updateCharacterSize();\n _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);\n _self._signal(\"changeCharacterSize\", e);\n });\n\n this.$size = {\n width: 0,\n height: 0,\n scrollerHeight: 0,\n scrollerWidth: 0,\n $dirty: true\n };\n\n this.layerConfig = {\n width : 1,\n padding : 0,\n firstRow : 0,\n firstRowScreen: 0,\n lastRow : 0,\n lineHeight : 0,\n characterWidth : 0,\n minHeight : 1,\n maxHeight : 1,\n offset : 0,\n height : 1,\n gutterOffset: 1\n };\n \n this.scrollMargin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n\n this.$loop = new RenderLoop(\n this.$renderChanges.bind(this),\n this.container.ownerDocument.defaultView\n );\n this.$loop.schedule(this.CHANGE_FULL);\n\n this.updateCharacterSize();\n this.setPadding(4);\n config.resetOptions(this);\n config._emit(\"renderer\", this);\n};\n\n(function() {\n\n this.CHANGE_CURSOR = 1;\n this.CHANGE_MARKER = 2;\n this.CHANGE_GUTTER = 4;\n this.CHANGE_SCROLL = 8;\n this.CHANGE_LINES = 16;\n this.CHANGE_TEXT = 32;\n this.CHANGE_SIZE = 64;\n this.CHANGE_MARKER_BACK = 128;\n this.CHANGE_MARKER_FRONT = 256;\n this.CHANGE_FULL = 512;\n this.CHANGE_H_SCROLL = 1024;\n\n oop.implement(this, EventEmitter);\n\n this.updateCharacterSize = function() {\n if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {\n this.$allowBoldFonts = this.$textLayer.allowBoldFonts;\n this.setStyle(\"ace_nobold\", !this.$allowBoldFonts);\n }\n\n this.layerConfig.characterWidth =\n this.characterWidth = this.$textLayer.getCharacterWidth();\n this.layerConfig.lineHeight =\n this.lineHeight = this.$textLayer.getLineHeight();\n this.$updatePrintMargin();\n };\n this.setSession = function(session) {\n if (this.session)\n this.session.doc.off(\"changeNewLineMode\", this.onChangeNewLineMode);\n \n this.session = session;\n if (session && this.scrollMargin.top && session.getScrollTop() <= 0)\n session.setScrollTop(-this.scrollMargin.top);\n\n this.$cursorLayer.setSession(session);\n this.$markerBack.setSession(session);\n this.$markerFront.setSession(session);\n this.$gutterLayer.setSession(session);\n this.$textLayer.setSession(session);\n if (!session)\n return;\n \n this.$loop.schedule(this.CHANGE_FULL);\n this.session.$setFontMetrics(this.$fontMetrics);\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n \n this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);\n this.onChangeNewLineMode();\n this.session.doc.on(\"changeNewLineMode\", this.onChangeNewLineMode);\n };\n this.updateLines = function(firstRow, lastRow, force) {\n if (lastRow === undefined)\n lastRow = Infinity;\n\n if (!this.$changedLines) {\n this.$changedLines = {\n firstRow: firstRow,\n lastRow: lastRow\n };\n }\n else {\n if (this.$changedLines.firstRow > firstRow)\n this.$changedLines.firstRow = firstRow;\n\n if (this.$changedLines.lastRow < lastRow)\n this.$changedLines.lastRow = lastRow;\n }\n if (this.$changedLines.lastRow < this.layerConfig.firstRow) {\n if (force)\n this.$changedLines.lastRow = this.layerConfig.lastRow;\n else\n return;\n }\n if (this.$changedLines.firstRow > this.layerConfig.lastRow)\n return;\n this.$loop.schedule(this.CHANGE_LINES);\n };\n\n this.onChangeNewLineMode = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n this.$textLayer.$updateEolChar();\n this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);\n };\n \n this.onChangeTabSize = function() {\n this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);\n this.$textLayer.onChangeTabSize();\n };\n this.updateText = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n };\n this.updateFull = function(force) {\n if (force)\n this.$renderChanges(this.CHANGE_FULL, true);\n else\n this.$loop.schedule(this.CHANGE_FULL);\n };\n this.updateFontSize = function() {\n this.$textLayer.checkForSizeChanges();\n };\n\n this.$changes = 0;\n this.$updateSizeAsync = function() {\n if (this.$loop.pending)\n this.$size.$dirty = true;\n else\n this.onResize();\n };\n this.onResize = function(force, gutterWidth, width, height) {\n if (this.resizing > 2)\n return;\n else if (this.resizing > 0)\n this.resizing++;\n else\n this.resizing = force ? 1 : 0;\n var el = this.container;\n if (!height)\n height = el.clientHeight || el.scrollHeight;\n if (!width)\n width = el.clientWidth || el.scrollWidth;\n var changes = this.$updateCachedSize(force, gutterWidth, width, height);\n\n \n if (!this.$size.scrollerHeight || (!width && !height))\n return this.resizing = 0;\n\n if (force)\n this.$gutterLayer.$padding = null;\n\n if (force)\n this.$renderChanges(changes | this.$changes, true);\n else\n this.$loop.schedule(changes | this.$changes);\n\n if (this.resizing)\n this.resizing = 0;\n this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;\n };\n \n this.$updateCachedSize = function(force, gutterWidth, width, height) {\n height -= (this.$extraHeight || 0);\n var changes = 0;\n var size = this.$size;\n var oldSize = {\n width: size.width,\n height: size.height,\n scrollerHeight: size.scrollerHeight,\n scrollerWidth: size.scrollerWidth\n };\n if (height && (force || size.height != height)) {\n size.height = height;\n changes |= this.CHANGE_SIZE;\n\n size.scrollerHeight = size.height;\n if (this.$horizScroll)\n size.scrollerHeight -= this.scrollBarH.getHeight();\n this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n changes = changes | this.CHANGE_SCROLL;\n }\n\n if (width && (force || size.width != width)) {\n changes |= this.CHANGE_SIZE;\n size.width = width;\n \n if (gutterWidth == null)\n gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n \n this.gutterWidth = gutterWidth;\n \n this.scrollBarH.element.style.left = \n this.scroller.style.left = gutterWidth + \"px\";\n size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); \n \n this.scrollBarH.element.style.right = \n this.scroller.style.right = this.scrollBarV.getWidth() + \"px\";\n this.scroller.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)\n changes |= this.CHANGE_FULL;\n }\n \n size.$dirty = !width || !height;\n\n if (changes)\n this._signal(\"resize\", oldSize);\n\n return changes;\n };\n\n this.onGutterResize = function() {\n var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n if (gutterWidth != this.gutterWidth)\n this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);\n\n if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else if (this.$size.$dirty) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else {\n this.$computeLayerConfig();\n this.$loop.schedule(this.CHANGE_MARKER);\n }\n };\n this.adjustWrapLimit = function() {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth);\n return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);\n };\n this.setAnimatedScroll = function(shouldAnimate){\n this.setOption(\"animatedScroll\", shouldAnimate);\n };\n this.getAnimatedScroll = function() {\n return this.$animatedScroll;\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.setOption(\"showInvisibles\", showInvisibles);\n this.session.$bidiHandler.setShowInvisibles(showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.getOption(\"showInvisibles\");\n };\n this.getDisplayIndentGuides = function() {\n return this.getOption(\"displayIndentGuides\");\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.setOption(\"displayIndentGuides\", display);\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.setOption(\"showPrintMargin\", showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.getOption(\"showPrintMargin\");\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.setOption(\"printMarginColumn\", showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.getOption(\"printMarginColumn\");\n };\n this.getShowGutter = function(){\n return this.getOption(\"showGutter\");\n };\n this.setShowGutter = function(show){\n return this.setOption(\"showGutter\", show);\n };\n\n this.getFadeFoldWidgets = function(){\n return this.getOption(\"fadeFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function(show) {\n this.setOption(\"fadeFoldWidgets\", show);\n };\n\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n\n this.$updateGutterLineHighlight = function() {\n var pos = this.$cursorLayer.$pixelPos;\n var height = this.layerConfig.lineHeight;\n if (this.session.getUseWrapMode()) {\n var cursor = this.session.selection.getCursor();\n cursor.column = 0;\n pos = this.$cursorLayer.getPixelPosition(cursor, true);\n height *= this.session.getRowLength(cursor.row);\n }\n this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + \"px\";\n this.$gutterLineHighlight.style.height = height + \"px\";\n };\n\n this.$updatePrintMargin = function() {\n if (!this.$showPrintMargin && !this.$printMarginEl)\n return;\n\n if (!this.$printMarginEl) {\n var containerEl = dom.createElement(\"div\");\n containerEl.className = \"ace_layer ace_print-margin-layer\";\n this.$printMarginEl = dom.createElement(\"div\");\n this.$printMarginEl.className = \"ace_print-margin\";\n containerEl.appendChild(this.$printMarginEl);\n this.content.insertBefore(containerEl, this.content.firstChild);\n }\n\n var style = this.$printMarginEl.style;\n style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + \"px\";\n style.visibility = this.$showPrintMargin ? \"visible\" : \"hidden\";\n \n if (this.session && this.session.$wrap == -1)\n this.adjustWrapLimit();\n };\n this.getContainerElement = function() {\n return this.container;\n };\n this.getMouseEventTarget = function() {\n return this.scroller;\n };\n this.getTextAreaContainer = function() {\n return this.container;\n };\n this.$moveTextAreaToCursor = function() {\n if (!this.$keepTextAreaAtCursor)\n return;\n var config = this.layerConfig;\n var posTop = this.$cursorLayer.$pixelPos.top;\n var posLeft = this.$cursorLayer.$pixelPos.left;\n posTop -= config.offset;\n\n var style = this.textarea.style;\n var h = this.lineHeight;\n if (posTop < 0 || posTop > config.height - h) {\n style.top = style.left = \"0\";\n return;\n }\n\n var w = this.characterWidth;\n if (this.$composition) {\n var val = this.textarea.value.replace(/^\\x01+/, \"\");\n w *= (this.session.$getStringScreenWidth(val)[0]+2);\n h += 2;\n }\n posLeft -= this.scrollLeft;\n if (posLeft > this.$size.scrollerWidth - w)\n posLeft = this.$size.scrollerWidth - w;\n\n posLeft += this.gutterWidth;\n style.height = h + \"px\";\n style.width = w + \"px\";\n style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + \"px\";\n style.top = Math.min(posTop, this.$size.height - h) + \"px\";\n };\n this.getFirstVisibleRow = function() {\n return this.layerConfig.firstRow;\n };\n this.getFirstFullyVisibleRow = function() {\n return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);\n };\n this.getLastFullyVisibleRow = function() {\n var config = this.layerConfig;\n var lastRow = config.lastRow;\n var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;\n if (top - this.session.getScrollTop() > config.height - config.lineHeight)\n return lastRow - 1;\n return lastRow;\n };\n this.getLastVisibleRow = function() {\n return this.layerConfig.lastRow;\n };\n\n this.$padding = null;\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.$textLayer.setPadding(padding);\n this.$cursorLayer.setPadding(padding);\n this.$markerFront.setPadding(padding);\n this.$markerBack.setPadding(padding);\n this.$loop.schedule(this.CHANGE_FULL);\n this.$updatePrintMargin();\n };\n \n this.setScrollMargin = function(top, bottom, left, right) {\n var sm = this.scrollMargin;\n sm.top = top|0;\n sm.bottom = bottom|0;\n sm.right = right|0;\n sm.left = left|0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n if (sm.top && this.scrollTop <= 0 && this.session)\n this.session.setScrollTop(-sm.top);\n this.updateFull();\n };\n this.getHScrollBarAlwaysVisible = function() {\n return this.$hScrollBarAlwaysVisible;\n };\n this.setHScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"hScrollBarAlwaysVisible\", alwaysVisible);\n };\n this.getVScrollBarAlwaysVisible = function() {\n return this.$vScrollBarAlwaysVisible;\n };\n this.setVScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"vScrollBarAlwaysVisible\", alwaysVisible);\n };\n\n this.$updateScrollBarV = function() {\n var scrollHeight = this.layerConfig.maxHeight;\n var scrollerHeight = this.$size.scrollerHeight;\n if (!this.$maxLines && this.$scrollPastEnd) {\n scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;\n if (this.scrollTop > scrollHeight - scrollerHeight) {\n scrollHeight = this.scrollTop + scrollerHeight;\n this.scrollBarV.scrollTop = null;\n }\n }\n this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);\n this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);\n };\n this.$updateScrollBarH = function() {\n this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);\n this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);\n };\n \n this.$frozen = false;\n this.freeze = function() {\n this.$frozen = true;\n };\n \n this.unfreeze = function() {\n this.$frozen = false;\n };\n\n this.$renderChanges = function(changes, force) {\n if (this.$changes) {\n changes |= this.$changes;\n this.$changes = 0;\n }\n if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {\n this.$changes |= changes;\n return; \n } \n if (this.$size.$dirty) {\n this.$changes |= changes;\n return this.onResize(true);\n }\n if (!this.lineHeight) {\n this.$textLayer.checkForSizeChanges();\n }\n \n this._signal(\"beforeRender\");\n\n if (this.session && this.session.$bidiHandler)\n this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);\n\n var config = this.layerConfig;\n if (changes & this.CHANGE_FULL ||\n changes & this.CHANGE_SIZE ||\n changes & this.CHANGE_TEXT ||\n changes & this.CHANGE_LINES ||\n changes & this.CHANGE_SCROLL ||\n changes & this.CHANGE_H_SCROLL\n ) {\n changes |= this.$computeLayerConfig();\n if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {\n var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;\n if (st > 0) {\n this.scrollTop = st;\n changes = changes | this.CHANGE_SCROLL;\n changes |= this.$computeLayerConfig();\n }\n }\n config = this.layerConfig;\n this.$updateScrollBarV();\n if (changes & this.CHANGE_H_SCROLL)\n this.$updateScrollBarH();\n this.$gutterLayer.element.style.marginTop = (-config.offset) + \"px\";\n this.content.style.marginTop = (-config.offset) + \"px\";\n this.content.style.width = config.width + 2 * this.$padding + \"px\";\n this.content.style.height = config.minHeight + \"px\";\n }\n if (changes & this.CHANGE_H_SCROLL) {\n this.content.style.marginLeft = -this.scrollLeft + \"px\";\n this.scroller.className = this.scrollLeft <= 0 ? \"ace_scroller\" : \"ace_scroller ace_scroll-left\";\n }\n if (changes & this.CHANGE_FULL) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this._signal(\"afterRender\");\n return;\n }\n if (changes & this.CHANGE_SCROLL) {\n if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)\n this.$textLayer.update(config);\n else\n this.$textLayer.scrollLines(config);\n\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\");\n return;\n }\n\n if (changes & this.CHANGE_TEXT) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_LINES) {\n if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n\n if (changes & this.CHANGE_CURSOR) {\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {\n this.$markerFront.update(config);\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {\n this.$markerBack.update(config);\n }\n\n this._signal(\"afterRender\");\n };\n\n \n this.$autosize = function() {\n var height = this.session.getScreenLength() * this.lineHeight;\n var maxHeight = this.$maxLines * this.lineHeight;\n var desiredHeight = Math.min(maxHeight,\n Math.max((this.$minLines || 1) * this.lineHeight, height)\n ) + this.scrollMargin.v + (this.$extraHeight || 0);\n if (this.$horizScroll)\n desiredHeight += this.scrollBarH.getHeight();\n if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)\n desiredHeight = this.$maxPixelHeight;\n var vScroll = height > maxHeight;\n \n if (desiredHeight != this.desiredHeight ||\n this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {\n if (vScroll != this.$vScroll) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n \n var w = this.container.clientWidth;\n this.container.style.height = desiredHeight + \"px\";\n this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);\n this.desiredHeight = desiredHeight;\n \n this._signal(\"autosize\");\n }\n };\n \n this.$computeLayerConfig = function() {\n var session = this.session;\n var size = this.$size;\n \n var hideScrollbars = size.height <= 2 * this.lineHeight;\n var screenLines = this.session.getScreenLength();\n var maxHeight = screenLines * this.lineHeight;\n\n var longestLine = this.$getLongestLine();\n \n var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||\n size.scrollerWidth - longestLine - 2 * this.$padding < 0);\n\n var hScrollChanged = this.$horizScroll !== horizScroll;\n if (hScrollChanged) {\n this.$horizScroll = horizScroll;\n this.scrollBarH.setVisible(horizScroll);\n }\n var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine\n if (this.$maxLines && this.lineHeight > 1)\n this.$autosize();\n\n var offset = this.scrollTop % this.lineHeight;\n var minHeight = size.scrollerHeight + this.lineHeight;\n \n var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd\n ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd\n : 0;\n maxHeight += scrollPastEnd;\n \n var sm = this.scrollMargin;\n this.session.setScrollTop(Math.max(-sm.top,\n Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));\n\n this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, \n longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));\n \n var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||\n size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);\n var vScrollChanged = vScrollBefore !== vScroll;\n if (vScrollChanged) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n\n var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;\n var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));\n var lastRow = firstRow + lineCount;\n var firstRowScreen, firstRowHeight;\n var lineHeight = this.lineHeight;\n firstRow = session.screenToDocumentRow(firstRow, 0);\n var foldLine = session.getFoldLine(firstRow);\n if (foldLine) {\n firstRow = foldLine.start.row;\n }\n\n firstRowScreen = session.documentToScreenRow(firstRow, 0);\n firstRowHeight = session.getRowLength(firstRow) * lineHeight;\n\n lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);\n minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +\n firstRowHeight;\n\n offset = this.scrollTop - firstRowScreen * lineHeight;\n\n var changes = 0;\n if (this.layerConfig.width != longestLine) \n changes = this.CHANGE_H_SCROLL;\n if (hScrollChanged || vScrollChanged) {\n changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);\n this._signal(\"scrollbarVisibilityChanged\");\n if (vScrollChanged)\n longestLine = this.$getLongestLine();\n }\n \n this.layerConfig = {\n width : longestLine,\n padding : this.$padding,\n firstRow : firstRow,\n firstRowScreen: firstRowScreen,\n lastRow : lastRow,\n lineHeight : lineHeight,\n characterWidth : this.characterWidth,\n minHeight : minHeight,\n maxHeight : maxHeight,\n offset : offset,\n gutterOffset : lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,\n height : this.$size.scrollerHeight\n };\n\n return changes;\n };\n\n this.$updateLines = function() {\n if (!this.$changedLines) return;\n var firstRow = this.$changedLines.firstRow;\n var lastRow = this.$changedLines.lastRow;\n this.$changedLines = null;\n\n var layerConfig = this.layerConfig;\n\n if (firstRow > layerConfig.lastRow + 1) { return; }\n if (lastRow < layerConfig.firstRow) { return; }\n if (lastRow === Infinity) {\n if (this.$showGutter)\n this.$gutterLayer.update(layerConfig);\n this.$textLayer.update(layerConfig);\n return;\n }\n this.$textLayer.updateLines(layerConfig, firstRow, lastRow);\n return true;\n };\n\n this.$getLongestLine = function() {\n var charCount = this.session.getScreenWidth();\n if (this.showInvisibles && !this.session.$useWrapMode)\n charCount += 1;\n\n return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));\n };\n this.updateFrontMarkers = function() {\n this.$markerFront.setMarkers(this.session.getMarkers(true));\n this.$loop.schedule(this.CHANGE_MARKER_FRONT);\n };\n this.updateBackMarkers = function() {\n this.$markerBack.setMarkers(this.session.getMarkers());\n this.$loop.schedule(this.CHANGE_MARKER_BACK);\n };\n this.addGutterDecoration = function(row, className){\n this.$gutterLayer.addGutterDecoration(row, className);\n };\n this.removeGutterDecoration = function(row, className){\n this.$gutterLayer.removeGutterDecoration(row, className);\n };\n this.updateBreakpoints = function(rows) {\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.setAnnotations = function(annotations) {\n this.$gutterLayer.setAnnotations(annotations);\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.updateCursor = function() {\n this.$loop.schedule(this.CHANGE_CURSOR);\n };\n this.hideCursor = function() {\n this.$cursorLayer.hideCursor();\n };\n this.showCursor = function() {\n this.$cursorLayer.showCursor();\n };\n\n this.scrollSelectionIntoView = function(anchor, lead, offset) {\n this.scrollCursorIntoView(anchor, offset);\n this.scrollCursorIntoView(lead, offset);\n };\n this.scrollCursorIntoView = function(cursor, offset, $viewMargin) {\n if (this.$size.scrollerHeight === 0)\n return;\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n\n var left = pos.left;\n var top = pos.top;\n \n var topMargin = $viewMargin && $viewMargin.top || 0;\n var bottomMargin = $viewMargin && $viewMargin.bottom || 0;\n \n var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;\n \n if (scrollTop + topMargin > top) {\n if (offset && scrollTop + topMargin > top + this.lineHeight)\n top -= offset * this.$size.scrollerHeight;\n if (top === 0)\n top = -this.scrollMargin.top;\n this.session.setScrollTop(top);\n } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {\n if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight)\n top += offset * this.$size.scrollerHeight;\n this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);\n }\n\n var scrollLeft = this.scrollLeft;\n\n if (scrollLeft > left) {\n if (left < this.$padding + 2 * this.layerConfig.characterWidth)\n left = -this.scrollMargin.left;\n this.session.setScrollLeft(left);\n } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {\n this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));\n } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {\n this.session.setScrollLeft(0);\n }\n };\n this.getScrollTop = function() {\n return this.session.getScrollTop();\n };\n this.getScrollLeft = function() {\n return this.session.getScrollLeft();\n };\n this.getScrollTopRow = function() {\n return this.scrollTop / this.lineHeight;\n };\n this.getScrollBottomRow = function() {\n return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);\n };\n this.scrollToRow = function(row) {\n this.session.setScrollTop(row * this.lineHeight);\n };\n\n this.alignCursor = function(cursor, alignment) {\n if (typeof cursor == \"number\")\n cursor = {row: cursor, column: 0};\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var h = this.$size.scrollerHeight - this.lineHeight;\n var offset = pos.top - h * (alignment || 0);\n\n this.session.setScrollTop(offset);\n return offset;\n };\n\n this.STEPS = 8;\n this.$calcSteps = function(fromValue, toValue){\n var i = 0;\n var l = this.STEPS;\n var steps = [];\n\n var func = function(t, x_min, dx) {\n return dx * (Math.pow(t - 1, 3) + 1) + x_min;\n };\n\n for (i = 0; i < l; ++i)\n steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));\n\n return steps;\n };\n this.scrollToLine = function(line, center, animate, callback) {\n var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});\n var offset = pos.top;\n if (center)\n offset -= this.$size.scrollerHeight / 2;\n\n var initialScroll = this.scrollTop;\n this.session.setScrollTop(offset);\n if (animate !== false)\n this.animateScrolling(initialScroll, callback);\n };\n\n this.animateScrolling = function(fromValue, callback) {\n var toValue = this.scrollTop;\n if (!this.$animatedScroll)\n return;\n var _self = this;\n \n if (fromValue == toValue)\n return;\n \n if (this.$scrollAnimation) {\n var oldSteps = this.$scrollAnimation.steps;\n if (oldSteps.length) {\n fromValue = oldSteps[0];\n if (fromValue == toValue)\n return;\n }\n }\n \n var steps = _self.$calcSteps(fromValue, toValue);\n this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};\n\n clearInterval(this.$timer);\n\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n this.$timer = setInterval(function() {\n if (steps.length) {\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n } else if (toValue != null) {\n _self.session.$scrollTop = -1;\n _self.session.setScrollTop(toValue);\n toValue = null;\n } else {\n _self.$timer = clearInterval(_self.$timer);\n _self.$scrollAnimation = null;\n callback && callback();\n }\n }, 10);\n };\n this.scrollToY = function(scrollTop) {\n if (this.scrollTop !== scrollTop) {\n this.$loop.schedule(this.CHANGE_SCROLL);\n this.scrollTop = scrollTop;\n }\n };\n this.scrollToX = function(scrollLeft) {\n if (this.scrollLeft !== scrollLeft)\n this.scrollLeft = scrollLeft;\n this.$loop.schedule(this.CHANGE_H_SCROLL);\n };\n this.scrollTo = function(x, y) {\n this.session.setScrollTop(y);\n this.session.setScrollLeft(y);\n };\n this.scrollBy = function(deltaX, deltaY) {\n deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);\n deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);\n };\n this.isScrollableBy = function(deltaX, deltaY) {\n if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)\n return true;\n if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight\n - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)\n return true;\n if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)\n return true;\n if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth\n - this.layerConfig.width < -1 + this.scrollMargin.right)\n return true;\n };\n\n this.pixelToScreenCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n var col = Math.round(offset);\n\n return {row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX};\n };\n\n this.screenToTextCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n\n var col = Math.round(offsetX / this.characterWidth);\n\n var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;\n\n return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);\n };\n this.textToScreenCoordinates = function(row, column) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var pos = this.session.documentToScreenPosition(row, column);\n\n var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : Math.round(pos.column * this.characterWidth));\n\n var y = pos.row * this.lineHeight;\n\n return {\n pageX: canvasPos.left + x - this.scrollLeft,\n pageY: canvasPos.top + y - this.scrollTop\n };\n };\n this.visualizeFocus = function() {\n dom.addCssClass(this.container, \"ace_focus\");\n };\n this.visualizeBlur = function() {\n dom.removeCssClass(this.container, \"ace_focus\");\n };\n this.showComposition = function(position) {\n if (!this.$composition)\n this.$composition = {\n keepTextAreaAtCursor: this.$keepTextAreaAtCursor,\n cssText: this.textarea.style.cssText\n };\n\n this.$keepTextAreaAtCursor = true;\n dom.addCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = \"\";\n this.$moveTextAreaToCursor();\n };\n this.setCompositionText = function(text) {\n this.$moveTextAreaToCursor();\n };\n this.hideComposition = function() {\n if (!this.$composition)\n return;\n\n dom.removeCssClass(this.textarea, \"ace_composition\");\n this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;\n this.textarea.style.cssText = this.$composition.cssText;\n this.$composition = null;\n };\n this.setTheme = function(theme, cb) {\n var _self = this;\n this.$themeId = theme;\n _self._dispatchEvent('themeChange',{theme:theme});\n\n if (!theme || typeof theme == \"string\") {\n var moduleName = theme || this.$options.theme.initialValue;\n config.loadModule([\"theme\", moduleName], afterLoad);\n } else {\n afterLoad(theme);\n }\n\n function afterLoad(module) {\n if (_self.$themeId != theme)\n return cb && cb();\n if (!module || !module.cssClass)\n throw new Error(\"couldn't load module \" + theme + \" or it didn't call define\");\n dom.importCssString(\n module.cssText,\n module.cssClass,\n _self.container.ownerDocument\n );\n\n if (_self.theme)\n dom.removeCssClass(_self.container, _self.theme.cssClass);\n\n var padding = \"padding\" in module ? module.padding \n : \"padding\" in (_self.theme || {}) ? 4 : _self.$padding;\n if (_self.$padding && padding != _self.$padding)\n _self.setPadding(padding);\n _self.$theme = module.cssClass;\n\n _self.theme = module;\n dom.addCssClass(_self.container, module.cssClass);\n dom.setCssClass(_self.container, \"ace_dark\", module.isDark);\n if (_self.$size) {\n _self.$size.width = 0;\n _self.$updateSizeAsync();\n }\n\n _self._dispatchEvent('themeLoaded', {theme:module});\n cb && cb();\n }\n };\n this.getTheme = function() {\n return this.$themeId;\n };\n this.setStyle = function(style, include) {\n dom.setCssClass(this.container, style, include !== false);\n };\n this.unsetStyle = function(style) {\n dom.removeCssClass(this.container, style);\n };\n \n this.setCursorStyle = function(style) {\n if (this.scroller.style.cursor != style)\n this.scroller.style.cursor = style;\n };\n this.setMouseCursor = function(cursorStyle) {\n this.scroller.style.cursor = cursorStyle;\n };\n this.destroy = function() {\n this.$textLayer.destroy();\n this.$cursorLayer.destroy();\n };\n\n}).call(VirtualRenderer.prototype);\n\n\nconfig.defineOptions(VirtualRenderer.prototype, \"renderer\", {\n animatedScroll: {initialValue: false},\n showInvisibles: {\n set: function(value) {\n if (this.$textLayer.setShowInvisibles(value))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: false\n },\n showPrintMargin: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: true\n },\n printMarginColumn: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: 80\n },\n printMargin: {\n set: function(val) {\n if (typeof val == \"number\")\n this.$printMarginColumn = val;\n this.$showPrintMargin = !!val;\n this.$updatePrintMargin();\n },\n get: function() {\n return this.$showPrintMargin && this.$printMarginColumn; \n }\n },\n showGutter: {\n set: function(show){\n this.$gutter.style.display = show ? \"block\" : \"none\";\n this.$loop.schedule(this.CHANGE_FULL);\n this.onGutterResize();\n },\n initialValue: true\n },\n fadeFoldWidgets: {\n set: function(show) {\n dom.setCssClass(this.$gutter, \"ace_fade-fold-widgets\", show);\n },\n initialValue: false\n },\n showFoldWidgets: {\n set: function(show) {this.$gutterLayer.setShowFoldWidgets(show);},\n initialValue: true\n },\n showLineNumbers: {\n set: function(show) {\n this.$gutterLayer.setShowLineNumbers(show);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n displayIndentGuides: {\n set: function(show) {\n if (this.$textLayer.setDisplayIndentGuides(show))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: true\n },\n highlightGutterLine: {\n set: function(shouldHighlight) {\n if (!this.$gutterLineHighlight) {\n this.$gutterLineHighlight = dom.createElement(\"div\");\n this.$gutterLineHighlight.className = \"ace_gutter-active-line\";\n this.$gutter.appendChild(this.$gutterLineHighlight);\n return;\n }\n\n this.$gutterLineHighlight.style.display = shouldHighlight ? \"\" : \"none\";\n if (this.$cursorLayer.$pixelPos)\n this.$updateGutterLineHighlight();\n },\n initialValue: false,\n value: true\n },\n hScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n vScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n fontSize: {\n set: function(size) {\n if (typeof size == \"number\")\n size = size + \"px\";\n this.container.style.fontSize = size;\n this.updateFontSize();\n },\n initialValue: 12\n },\n fontFamily: {\n set: function(name) {\n this.container.style.fontFamily = name;\n this.updateFontSize();\n }\n },\n maxLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n minLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n maxPixelHeight: {\n set: function(val) {\n this.updateFull();\n },\n initialValue: 0\n },\n scrollPastEnd: {\n set: function(val) {\n val = +val || 0;\n if (this.$scrollPastEnd == val)\n return;\n this.$scrollPastEnd = val;\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: 0,\n handlesSet: true\n },\n fixedWidthGutter: {\n set: function(val) {\n this.$gutterLayer.$fixedWidth = !!val;\n this.$loop.schedule(this.CHANGE_GUTTER);\n }\n },\n theme: {\n set: function(val) { this.setTheme(val); },\n get: function() { return this.$themeId || this.theme; },\n initialValue: \"./theme/textmate\",\n handlesSet: true\n }\n});\n\nexports.VirtualRenderer = VirtualRenderer;\n});\n\nace.define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar net = acequire(\"../lib/net\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\nvar config = acequire(\"../config\");\n\nfunction $workerBlob(workerUrl, mod) {\n var script = mod.src;\"importScripts('\" + net.qualifyURL(workerUrl) + \"');\";\n try {\n return new Blob([script], {\"type\": \"application/javascript\"});\n } catch (e) { // Backwards-compatibility\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;\n var blobBuilder = new BlobBuilder();\n blobBuilder.append(script);\n return blobBuilder.getBlob(\"application/javascript\");\n }\n}\n\nfunction createWorker(workerUrl, mod) {\n var blob = $workerBlob(workerUrl, mod);\n var URL = window.URL || window.webkitURL;\n var blobURL = URL.createObjectURL(blob);\n return new Worker(blobURL);\n}\n\nvar WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.onMessage = this.onMessage.bind(this);\n if (acequire.nameToUrl && !acequire.toUrl)\n acequire.toUrl = acequire.nameToUrl;\n \n if (config.get(\"packaged\") || !acequire.toUrl) {\n workerUrl = workerUrl || config.moduleUrl(mod.id, \"worker\");\n } else {\n var normalizePath = this.$normalizePath;\n workerUrl = workerUrl || normalizePath(acequire.toUrl(\"ace/worker/worker.js\", null, \"_\"));\n\n var tlns = {};\n topLevelNamespaces.forEach(function(ns) {\n tlns[ns] = normalizePath(acequire.toUrl(ns, null, \"_\").replace(/(\\.js)?(\\?.*)?$/, \"\"));\n });\n }\n\n this.$worker = createWorker(workerUrl, mod);\n if (importScripts) {\n this.send(\"importScripts\", importScripts);\n }\n this.$worker.postMessage({\n init : true,\n tlns : tlns,\n module : mod.id,\n classname : classname\n });\n\n this.callbackId = 1;\n this.callbacks = {};\n\n this.$worker.onmessage = this.onMessage;\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.onMessage = function(e) {\n var msg = e.data;\n switch (msg.type) {\n case \"event\":\n this._signal(msg.name, {data: msg.data});\n break;\n case \"call\":\n var callback = this.callbacks[msg.id];\n if (callback) {\n callback(msg.data);\n delete this.callbacks[msg.id];\n }\n break;\n case \"error\":\n this.reportError(msg.data);\n break;\n case \"log\":\n window.console && console.log && console.log.apply(console, msg.data);\n break;\n }\n };\n \n this.reportError = function(err) {\n window.console && console.error && console.error(err);\n };\n\n this.$normalizePath = function(path) {\n return net.qualifyURL(path);\n };\n\n this.terminate = function() {\n this._signal(\"terminate\", {});\n this.deltaQueue = null;\n this.$worker.terminate();\n this.$worker = null;\n if (this.$doc)\n this.$doc.off(\"change\", this.changeListener);\n this.$doc = null;\n };\n\n this.send = function(cmd, args) {\n this.$worker.postMessage({command: cmd, args: args});\n };\n\n this.call = function(cmd, args, callback) {\n if (callback) {\n var id = this.callbackId++;\n this.callbacks[id] = callback;\n args.push(id);\n }\n this.send(cmd, args);\n };\n\n this.emit = function(event, data) {\n try {\n this.$worker.postMessage({event: event, data: {data: data.data}});\n }\n catch(ex) {\n console.error(ex.stack);\n }\n };\n\n this.attachToDocument = function(doc) {\n if (this.$doc)\n this.terminate();\n\n this.$doc = doc;\n this.call(\"setValue\", [doc.getValue()]);\n doc.on(\"change\", this.changeListener);\n };\n\n this.changeListener = function(delta) {\n if (!this.deltaQueue) {\n this.deltaQueue = [];\n setTimeout(this.$sendDeltaQueue, 0);\n }\n if (delta.action == \"insert\")\n this.deltaQueue.push(delta.start, delta.lines);\n else\n this.deltaQueue.push(delta.start, delta.end);\n };\n\n this.$sendDeltaQueue = function() {\n var q = this.deltaQueue;\n if (!q) return;\n this.deltaQueue = null;\n if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {\n this.call(\"setValue\", [this.$doc.getValue()]);\n } else\n this.emit(\"change\", {data: q});\n };\n\n}).call(WorkerClient.prototype);\n\n\nvar UIWorkerClient = function(topLevelNamespaces, mod, classname) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.callbackId = 1;\n this.callbacks = {};\n this.messageBuffer = [];\n\n var main = null;\n var emitSync = false;\n var sender = Object.create(EventEmitter);\n var _self = this;\n\n this.$worker = {};\n this.$worker.terminate = function() {};\n this.$worker.postMessage = function(e) {\n _self.messageBuffer.push(e);\n if (main) {\n if (emitSync)\n setTimeout(processNext);\n else\n processNext();\n }\n };\n this.setEmitSync = function(val) { emitSync = val; };\n\n var processNext = function() {\n var msg = _self.messageBuffer.shift();\n if (msg.command)\n main[msg.command].apply(main, msg.args);\n else if (msg.event)\n sender._signal(msg.event, msg.data);\n };\n\n sender.postMessage = function(msg) {\n _self.onMessage({data: msg});\n };\n sender.callback = function(data, callbackId) {\n this.postMessage({type: \"call\", id: callbackId, data: data});\n };\n sender.emit = function(name, data) {\n this.postMessage({type: \"event\", name: name, data: data});\n };\n\n config.loadModule([\"worker\", mod], function(Main) {\n main = new Main[classname](sender);\n while (_self.messageBuffer.length)\n processNext();\n });\n};\n\nUIWorkerClient.prototype = WorkerClient.prototype;\n\nexports.UIWorkerClient = UIWorkerClient;\nexports.WorkerClient = WorkerClient;\nexports.createWorker = createWorker;\n\n\n});\n\nace.define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar oop = acequire(\"./lib/oop\");\n\nvar PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {\n var _self = this;\n this.length = length;\n this.session = session;\n this.doc = session.getDocument();\n this.mainClass = mainClass;\n this.othersClass = othersClass;\n this.$onUpdate = this.onUpdate.bind(this);\n this.doc.on(\"change\", this.$onUpdate);\n this.$others = others;\n \n this.$onCursorChange = function() {\n setTimeout(function() {\n _self.onCursorChange();\n });\n };\n \n this.$pos = pos;\n var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};\n this.$undoStackDepth = undoStack.length;\n this.setup();\n\n session.selection.on(\"changeCursor\", this.$onCursorChange);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setup = function() {\n var _self = this;\n var doc = this.doc;\n var session = this.session;\n \n this.selectionBefore = session.selection.toJSON();\n if (session.selection.inMultiSelectMode)\n session.selection.toSingleRange();\n\n this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);\n var pos = this.pos;\n pos.$insertRight = true;\n pos.detach();\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);\n this.others = [];\n this.$others.forEach(function(other) {\n var anchor = doc.createAnchor(other.row, other.column);\n anchor.$insertRight = true;\n anchor.detach();\n _self.others.push(anchor);\n });\n session.setUndoSelect(false);\n };\n this.showOtherMarkers = function() {\n if (this.othersActive) return;\n var session = this.session;\n var _self = this;\n this.othersActive = true;\n this.others.forEach(function(anchor) {\n anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);\n });\n };\n this.hideOtherMarkers = function() {\n if (!this.othersActive) return;\n this.othersActive = false;\n for (var i = 0; i < this.others.length; i++) {\n this.session.removeMarker(this.others[i].markerId);\n }\n };\n this.onUpdate = function(delta) {\n if (this.$updating)\n return this.updateAnchors(delta);\n \n var range = delta;\n if (range.start.row !== range.end.row) return;\n if (range.start.row !== this.pos.row) return;\n this.$updating = true;\n var lengthDiff = delta.action === \"insert\" ? range.end.column - range.start.column : range.start.column - range.end.column;\n var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;\n var distanceFromStart = range.start.column - this.pos.column;\n \n this.updateAnchors(delta);\n \n if (inMainRange)\n this.length += lengthDiff;\n\n if (inMainRange && !this.session.$fromUndo) {\n if (delta.action === 'insert') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.insertMergedLines(newPos, delta.lines);\n }\n } else if (delta.action === 'remove') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));\n }\n }\n }\n \n this.$updating = false;\n this.updateMarkers();\n };\n \n this.updateAnchors = function(delta) {\n this.pos.onChange(delta);\n for (var i = this.others.length; i--;)\n this.others[i].onChange(delta);\n this.updateMarkers();\n };\n \n this.updateMarkers = function() {\n if (this.$updating)\n return;\n var _self = this;\n var session = this.session;\n var updateMarker = function(pos, className) {\n session.removeMarker(pos.markerId);\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false);\n };\n updateMarker(this.pos, this.mainClass);\n for (var i = this.others.length; i--;)\n updateMarker(this.others[i], this.othersClass);\n };\n\n this.onCursorChange = function(event) {\n if (this.$updating || !this.session) return;\n var pos = this.session.selection.getCursor();\n if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {\n this.showOtherMarkers();\n this._emit(\"cursorEnter\", event);\n } else {\n this.hideOtherMarkers();\n this._emit(\"cursorLeave\", event);\n }\n }; \n this.detach = function() {\n this.session.removeMarker(this.pos && this.pos.markerId);\n this.hideOtherMarkers();\n this.doc.removeEventListener(\"change\", this.$onUpdate);\n this.session.selection.removeEventListener(\"changeCursor\", this.$onCursorChange);\n this.session.setUndoSelect(true);\n this.session = null;\n };\n this.cancel = function() {\n if (this.$undoStackDepth === -1)\n return;\n var undoManager = this.session.getUndoManager();\n var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;\n for (var i = 0; i < undosRequired; i++) {\n undoManager.undo(true);\n }\n if (this.selectionBefore)\n this.session.selection.fromJSON(this.selectionBefore);\n };\n}).call(PlaceHolder.prototype);\n\n\nexports.PlaceHolder = PlaceHolder;\n});\n\nace.define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\n\nfunction onMouseDown(e) {\n var ev = e.domEvent;\n var alt = ev.altKey;\n var shift = ev.shiftKey;\n var ctrl = ev.ctrlKey;\n var accel = e.getAccelKey();\n var button = e.getButton();\n \n if (ctrl && useragent.isMac)\n button = ev.button;\n\n if (e.editor.inMultiSelectMode && button == 2) {\n e.editor.textInput.onContextMenu(e.domEvent);\n return;\n }\n \n if (!ctrl && !alt && !accel) {\n if (button === 0 && e.editor.inMultiSelectMode)\n e.editor.exitMultiSelectMode();\n return;\n }\n \n if (button !== 0)\n return;\n\n var editor = e.editor;\n var selection = editor.selection;\n var isMultiSelect = editor.inMultiSelectMode;\n var pos = e.getDocumentPosition();\n var cursor = selection.getCursor();\n var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));\n\n var mouseX = e.x, mouseY = e.y;\n var onMouseSelection = function(e) {\n mouseX = e.clientX;\n mouseY = e.clientY;\n };\n \n var session = editor.session;\n var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var screenCursor = screenAnchor;\n \n var selectionMode;\n if (editor.$mouseHandler.$enableJumpToDef) {\n if (ctrl && alt || accel && alt)\n selectionMode = shift ? \"block\" : \"add\";\n else if (alt && editor.$blockSelectEnabled)\n selectionMode = \"block\";\n } else {\n if (accel && !alt) {\n selectionMode = \"add\";\n if (!isMultiSelect && shift)\n return;\n } else if (alt && editor.$blockSelectEnabled) {\n selectionMode = \"block\";\n }\n }\n \n if (selectionMode && useragent.isMac && ev.ctrlKey) {\n editor.$mouseHandler.cancelContextMenu();\n }\n\n if (selectionMode == \"add\") {\n if (!isMultiSelect && inSelection)\n return; // dragging\n\n if (!isMultiSelect) {\n var range = selection.toOrientedRange();\n editor.addSelectionMarker(range);\n }\n\n var oldRange = selection.rangeList.rangeAtPoint(pos);\n \n \n editor.$blockScrolling++;\n editor.inVirtualSelectionMode = true;\n \n if (shift) {\n oldRange = null;\n range = selection.ranges[0] || range;\n editor.removeSelectionMarker(range);\n }\n editor.once(\"mouseup\", function() {\n var tmpSel = selection.toOrientedRange();\n\n if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))\n selection.substractPoint(tmpSel.cursor);\n else {\n if (shift) {\n selection.substractPoint(range.cursor);\n } else if (range) {\n editor.removeSelectionMarker(range);\n selection.addRange(range);\n }\n selection.addRange(tmpSel);\n }\n editor.$blockScrolling--;\n editor.inVirtualSelectionMode = false;\n });\n\n } else if (selectionMode == \"block\") {\n e.stop();\n editor.inVirtualSelectionMode = true; \n var initialRange;\n var rectSel = [];\n var blockSelect = function() {\n var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX);\n\n if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))\n return;\n screenCursor = newCursor;\n \n editor.$blockScrolling++;\n editor.selection.moveToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n\n editor.removeSelectionMarkers(rectSel);\n rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);\n if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())\n rectSel[0] = editor.$mouseHandler.$clickSelection.clone();\n rectSel.forEach(editor.addSelectionMarker, editor);\n editor.updateSelectionMarkers();\n editor.$blockScrolling--;\n };\n editor.$blockScrolling++;\n if (isMultiSelect && !accel) {\n selection.toSingleRange();\n } else if (!isMultiSelect && accel) {\n initialRange = selection.toOrientedRange();\n editor.addSelectionMarker(initialRange);\n }\n \n if (shift)\n screenAnchor = session.documentToScreenPosition(selection.lead); \n else\n selection.moveToPosition(pos);\n editor.$blockScrolling--;\n \n screenCursor = {row: -1, column: -1};\n\n var onMouseSelectionEnd = function(e) {\n clearInterval(timerId);\n editor.removeSelectionMarkers(rectSel);\n if (!rectSel.length)\n rectSel = [selection.toOrientedRange()];\n editor.$blockScrolling++;\n if (initialRange) {\n editor.removeSelectionMarker(initialRange);\n selection.toSingleRange(initialRange);\n }\n for (var i = 0; i < rectSel.length; i++)\n selection.addRange(rectSel[i]);\n editor.inVirtualSelectionMode = false;\n editor.$mouseHandler.$clickSelection = null;\n editor.$blockScrolling--;\n };\n\n var onSelectionInterval = blockSelect;\n\n event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);\n var timerId = setInterval(function() {onSelectionInterval();}, 20);\n\n return e.preventDefault();\n }\n}\n\n\nexports.onMouseDown = onMouseDown;\n\n});\n\nace.define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"], function(acequire, exports, module) {\nexports.defaultCommands = [{\n name: \"addCursorAbove\",\n exec: function(editor) { editor.selectMoreLines(-1); },\n bindKey: {win: \"Ctrl-Alt-Up\", mac: \"Ctrl-Alt-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelow\",\n exec: function(editor) { editor.selectMoreLines(1); },\n bindKey: {win: \"Ctrl-Alt-Down\", mac: \"Ctrl-Alt-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorAboveSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Up\", mac: \"Ctrl-Alt-Shift-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelowSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Down\", mac: \"Ctrl-Alt-Shift-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreBefore\",\n exec: function(editor) { editor.selectMore(-1); },\n bindKey: {win: \"Ctrl-Alt-Left\", mac: \"Ctrl-Alt-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreAfter\",\n exec: function(editor) { editor.selectMore(1); },\n bindKey: {win: \"Ctrl-Alt-Right\", mac: \"Ctrl-Alt-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextBefore\",\n exec: function(editor) { editor.selectMore(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Left\", mac: \"Ctrl-Alt-Shift-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextAfter\",\n exec: function(editor) { editor.selectMore(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Right\", mac: \"Ctrl-Alt-Shift-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"splitIntoLines\",\n exec: function(editor) { editor.multiSelect.splitIntoLines(); },\n bindKey: {win: \"Ctrl-Alt-L\", mac: \"Ctrl-Alt-L\"},\n readOnly: true\n}, {\n name: \"alignCursors\",\n exec: function(editor) { editor.alignCursors(); },\n bindKey: {win: \"Ctrl-Alt-A\", mac: \"Ctrl-Alt-A\"},\n scrollIntoView: \"cursor\"\n}, {\n name: \"findAll\",\n exec: function(editor) { editor.findAll(); },\n bindKey: {win: \"Ctrl-Alt-K\", mac: \"Ctrl-Alt-G\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}];\nexports.multiSelectCommands = [{\n name: \"singleSelection\",\n bindKey: \"esc\",\n exec: function(editor) { editor.exitMultiSelectMode(); },\n scrollIntoView: \"cursor\",\n readOnly: true,\n isAvailable: function(editor) {return editor && editor.inMultiSelectMode;}\n}];\n\nvar HashHandler = acequire(\"../keyboard/hash_handler\").HashHandler;\nexports.keyboardHandler = new HashHandler(exports.multiSelectCommands);\n\n});\n\nace.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\",\"ace/config\"], function(acequire, exports, module) {\n\nvar RangeList = acequire(\"./range_list\").RangeList;\nvar Range = acequire(\"./range\").Range;\nvar Selection = acequire(\"./selection\").Selection;\nvar onMouseDown = acequire(\"./mouse/multi_select_handler\").onMouseDown;\nvar event = acequire(\"./lib/event\");\nvar lang = acequire(\"./lib/lang\");\nvar commands = acequire(\"./commands/multi_select_commands\");\nexports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);\nvar Search = acequire(\"./search\").Search;\nvar search = new Search();\n\nfunction find(session, needle, dir) {\n search.$options.wrap = true;\n search.$options.needle = needle;\n search.$options.backwards = dir == -1;\n return search.find(session);\n}\nvar EditSession = acequire(\"./edit_session\").EditSession;\n(function() {\n this.getSelectionMarkers = function() {\n return this.$selectionMarkers;\n };\n}).call(EditSession.prototype);\n(function() {\n this.ranges = null;\n this.rangeList = null;\n this.addRange = function(range, $blockChangeEvents) {\n if (!range)\n return;\n\n if (!this.inMultiSelectMode && this.rangeCount === 0) {\n var oldRange = this.toOrientedRange();\n this.rangeList.add(oldRange);\n this.rangeList.add(range);\n if (this.rangeList.ranges.length != 2) {\n this.rangeList.removeAll();\n return $blockChangeEvents || this.fromOrientedRange(range);\n }\n this.rangeList.removeAll();\n this.rangeList.add(oldRange);\n this.$onAddRange(oldRange);\n }\n\n if (!range.cursor)\n range.cursor = range.end;\n\n var removed = this.rangeList.add(range);\n\n this.$onAddRange(range);\n\n if (removed.length)\n this.$onRemoveRange(removed);\n\n if (this.rangeCount > 1 && !this.inMultiSelectMode) {\n this._signal(\"multiSelect\");\n this.inMultiSelectMode = true;\n this.session.$undoSelect = false;\n this.rangeList.attach(this.session);\n }\n\n return $blockChangeEvents || this.fromOrientedRange(range);\n };\n\n this.toSingleRange = function(range) {\n range = range || this.ranges[0];\n var removed = this.rangeList.removeAll();\n if (removed.length)\n this.$onRemoveRange(removed);\n\n range && this.fromOrientedRange(range);\n };\n this.substractPoint = function(pos) {\n var removed = this.rangeList.substractPoint(pos);\n if (removed) {\n this.$onRemoveRange(removed);\n return removed[0];\n }\n };\n this.mergeOverlappingRanges = function() {\n var removed = this.rangeList.merge();\n if (removed.length)\n this.$onRemoveRange(removed);\n else if(this.ranges[0])\n this.fromOrientedRange(this.ranges[0]);\n };\n\n this.$onAddRange = function(range) {\n this.rangeCount = this.rangeList.ranges.length;\n this.ranges.unshift(range);\n this._signal(\"addRange\", {range: range});\n };\n\n this.$onRemoveRange = function(removed) {\n this.rangeCount = this.rangeList.ranges.length;\n if (this.rangeCount == 1 && this.inMultiSelectMode) {\n var lastRange = this.rangeList.ranges.pop();\n removed.push(lastRange);\n this.rangeCount = 0;\n }\n\n for (var i = removed.length; i--; ) {\n var index = this.ranges.indexOf(removed[i]);\n this.ranges.splice(index, 1);\n }\n\n this._signal(\"removeRange\", {ranges: removed});\n\n if (this.rangeCount === 0 && this.inMultiSelectMode) {\n this.inMultiSelectMode = false;\n this._signal(\"singleSelect\");\n this.session.$undoSelect = true;\n this.rangeList.detach(this.session);\n }\n\n lastRange = lastRange || this.ranges[0];\n if (lastRange && !lastRange.isEqual(this.getRange()))\n this.fromOrientedRange(lastRange);\n };\n this.$initRangeList = function() {\n if (this.rangeList)\n return;\n\n this.rangeList = new RangeList();\n this.ranges = [];\n this.rangeCount = 0;\n };\n this.getAllRanges = function() {\n return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];\n };\n\n this.splitIntoLines = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var range = this.getRange();\n var isBackwards = this.isBackwards();\n var startRow = range.start.row;\n var endRow = range.end.row;\n if (startRow == endRow) {\n if (isBackwards)\n var start = range.end, end = range.start;\n else\n var start = range.start, end = range.end;\n \n this.addRange(Range.fromPoints(end, end));\n this.addRange(Range.fromPoints(start, start));\n return;\n }\n\n var rectSel = [];\n var r = this.getLineRange(startRow, true);\n r.start.column = range.start.column;\n rectSel.push(r);\n\n for (var i = startRow + 1; i < endRow; i++)\n rectSel.push(this.getLineRange(i, true));\n\n r = this.getLineRange(endRow, true);\n r.end.column = range.end.column;\n rectSel.push(r);\n\n rectSel.forEach(this.addRange, this);\n }\n };\n this.toggleBlockSelection = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var cursor = this.session.documentToScreenPosition(this.selectionLead);\n var anchor = this.session.documentToScreenPosition(this.selectionAnchor);\n\n var rectSel = this.rectangularRangeBlock(cursor, anchor);\n rectSel.forEach(this.addRange, this);\n }\n };\n this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {\n var rectSel = [];\n\n var xBackwards = screenCursor.column < screenAnchor.column;\n if (xBackwards) {\n var startColumn = screenCursor.column;\n var endColumn = screenAnchor.column;\n var startOffsetX = screenCursor.offsetX;\n var endOffsetX = screenAnchor.offsetX;\n } else {\n var startColumn = screenAnchor.column;\n var endColumn = screenCursor.column;\n var startOffsetX = screenAnchor.offsetX;\n var endOffsetX = screenCursor.offsetX;\n }\n\n var yBackwards = screenCursor.row < screenAnchor.row;\n if (yBackwards) {\n var startRow = screenCursor.row;\n var endRow = screenAnchor.row;\n } else {\n var startRow = screenAnchor.row;\n var endRow = screenCursor.row;\n }\n\n if (startColumn < 0)\n startColumn = 0;\n if (startRow < 0)\n startRow = 0;\n\n if (startRow == endRow)\n includeEmptyLines = true;\n\n for (var row = startRow; row <= endRow; row++) {\n var range = Range.fromPoints(\n this.session.screenToDocumentPosition(row, startColumn, startOffsetX),\n this.session.screenToDocumentPosition(row, endColumn, endOffsetX)\n );\n if (range.isEmpty()) {\n if (docEnd && isSamePoint(range.end, docEnd))\n break;\n var docEnd = range.end;\n }\n range.cursor = xBackwards ? range.start : range.end;\n rectSel.push(range);\n }\n\n if (yBackwards)\n rectSel.reverse();\n\n if (!includeEmptyLines) {\n var end = rectSel.length - 1;\n while (rectSel[end].isEmpty() && end > 0)\n end--;\n if (end > 0) {\n var start = 0;\n while (rectSel[start].isEmpty())\n start++;\n }\n for (var i = end; i >= start; i--) {\n if (rectSel[i].isEmpty())\n rectSel.splice(i, 1);\n }\n }\n\n return rectSel;\n };\n}).call(Selection.prototype);\nvar Editor = acequire(\"./editor\").Editor;\n(function() {\n this.updateSelectionMarkers = function() {\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.addSelectionMarker = function(orientedRange) {\n if (!orientedRange.cursor)\n orientedRange.cursor = orientedRange.end;\n\n var style = this.getSelectionStyle();\n orientedRange.marker = this.session.addMarker(orientedRange, \"ace_selection\", style);\n\n this.session.$selectionMarkers.push(orientedRange);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n return orientedRange;\n };\n this.removeSelectionMarker = function(range) {\n if (!range.marker)\n return;\n this.session.removeMarker(range.marker);\n var index = this.session.$selectionMarkers.indexOf(range);\n if (index != -1)\n this.session.$selectionMarkers.splice(index, 1);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n };\n\n this.removeSelectionMarkers = function(ranges) {\n var markerList = this.session.$selectionMarkers;\n for (var i = ranges.length; i--; ) {\n var range = ranges[i];\n if (!range.marker)\n continue;\n this.session.removeMarker(range.marker);\n var index = markerList.indexOf(range);\n if (index != -1)\n markerList.splice(index, 1);\n }\n this.session.selectionMarkerCount = markerList.length;\n };\n\n this.$onAddRange = function(e) {\n this.addSelectionMarker(e.range);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onRemoveRange = function(e) {\n this.removeSelectionMarkers(e.ranges);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onMultiSelect = function(e) {\n if (this.inMultiSelectMode)\n return;\n this.inMultiSelectMode = true;\n\n this.setStyle(\"ace_multiselect\");\n this.keyBinding.addKeyboardHandler(commands.keyboardHandler);\n this.commands.setDefaultHandler(\"exec\", this.$onMultiSelectExec);\n\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onSingleSelect = function(e) {\n if (this.session.multiSelect.inVirtualMode)\n return;\n this.inMultiSelectMode = false;\n\n this.unsetStyle(\"ace_multiselect\");\n this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);\n\n this.commands.removeDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n this._emit(\"changeSelection\");\n };\n\n this.$onMultiSelectExec = function(e) {\n var command = e.command;\n var editor = e.editor;\n if (!editor.multiSelect)\n return;\n if (!command.multiSelectAction) {\n var result = command.exec(editor, e.args || {});\n editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());\n editor.multiSelect.mergeOverlappingRanges();\n } else if (command.multiSelectAction == \"forEach\") {\n result = editor.forEachSelection(command, e.args);\n } else if (command.multiSelectAction == \"forEachLine\") {\n result = editor.forEachSelection(command, e.args, true);\n } else if (command.multiSelectAction == \"single\") {\n editor.exitMultiSelectMode();\n result = command.exec(editor, e.args || {});\n } else {\n result = command.multiSelectAction(editor, e.args || {});\n }\n return result;\n }; \n this.forEachSelection = function(cmd, args, options) {\n if (this.inVirtualSelectionMode)\n return;\n var keepOrder = options && options.keepOrder;\n var $byLines = options == true || options && options.$byLines;\n var session = this.session;\n var selection = this.selection;\n var rangeList = selection.rangeList;\n var ranges = (keepOrder ? selection : rangeList).ranges;\n var result;\n \n if (!ranges.length)\n return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n \n var reg = selection._eventRegistry;\n selection._eventRegistry = {};\n\n var tmpSel = new Selection(session);\n this.inVirtualSelectionMode = true;\n for (var i = ranges.length; i--;) {\n if ($byLines) {\n while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)\n i--;\n }\n tmpSel.fromOrientedRange(ranges[i]);\n tmpSel.index = i;\n this.selection = session.selection = tmpSel;\n var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n if (!result && cmdResult !== undefined)\n result = cmdResult;\n tmpSel.toOrientedRange(ranges[i]);\n }\n tmpSel.detach();\n\n this.selection = session.selection = selection;\n this.inVirtualSelectionMode = false;\n selection._eventRegistry = reg;\n selection.mergeOverlappingRanges();\n \n var anim = this.renderer.$scrollAnimation;\n this.onCursorChange();\n this.onSelectionChange();\n if (anim && anim.from == anim.to)\n this.renderer.animateScrolling(anim.from);\n \n return result;\n };\n this.exitMultiSelectMode = function() {\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode)\n return;\n this.multiSelect.toSingleRange();\n };\n\n this.getSelectedText = function() {\n var text = \"\";\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var ranges = this.multiSelect.rangeList.ranges;\n var buf = [];\n for (var i = 0; i < ranges.length; i++) {\n buf.push(this.session.getTextRange(ranges[i]));\n }\n var nl = this.session.getDocument().getNewLineCharacter();\n text = buf.join(nl);\n if (text.length == (buf.length - 1) * nl.length)\n text = \"\";\n } else if (!this.selection.isEmpty()) {\n text = this.session.getTextRange(this.getSelectionRange());\n }\n return text;\n };\n \n this.$checkMultiselectChange = function(e, anchor) {\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var range = this.multiSelect.ranges[0];\n if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)\n return;\n var pos = anchor == this.multiSelect.anchor\n ? range.cursor == range.start ? range.end : range.start\n : range.cursor;\n if (pos.row != anchor.row \n || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)\n this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());\n }\n };\n this.findAll = function(needle, options, additive) {\n options = options || {};\n options.needle = needle || options.needle;\n if (options.needle == undefined) {\n var range = this.selection.isEmpty()\n ? this.selection.getWordRange()\n : this.selection.getRange();\n options.needle = this.session.getTextRange(range);\n } \n this.$search.set(options);\n \n var ranges = this.$search.findAll(this.session);\n if (!ranges.length)\n return 0;\n\n this.$blockScrolling += 1;\n var selection = this.multiSelect;\n\n if (!additive)\n selection.toSingleRange(ranges[0]);\n\n for (var i = ranges.length; i--; )\n selection.addRange(ranges[i], true);\n if (range && selection.rangeList.rangeAtPoint(range.start))\n selection.addRange(range, true);\n \n this.$blockScrolling -= 1;\n\n return ranges.length;\n };\n this.selectMoreLines = function(dir, skip) {\n var range = this.selection.toOrientedRange();\n var isBackwards = range.cursor == range.end;\n\n var screenLead = this.session.documentToScreenPosition(range.cursor);\n if (this.selection.$desiredColumn)\n screenLead.column = this.selection.$desiredColumn;\n\n var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);\n\n if (!range.isEmpty()) {\n var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);\n var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);\n } else {\n var anchor = lead;\n }\n\n if (isBackwards) {\n var newRange = Range.fromPoints(lead, anchor);\n newRange.cursor = newRange.start;\n } else {\n var newRange = Range.fromPoints(anchor, lead);\n newRange.cursor = newRange.end;\n }\n\n newRange.desiredColumn = screenLead.column;\n if (!this.selection.inMultiSelectMode) {\n this.selection.addRange(range);\n } else {\n if (skip)\n var toRemove = range.cursor;\n }\n\n this.selection.addRange(newRange);\n if (toRemove)\n this.selection.substractPoint(toRemove);\n };\n this.transposeSelections = function(dir) {\n var session = this.session;\n var sel = session.multiSelect;\n var all = sel.ranges;\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n if (range.isEmpty()) {\n var tmp = session.getWordRange(range.start.row, range.start.column);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n range.end.row = tmp.end.row;\n range.end.column = tmp.end.column;\n }\n }\n sel.mergeOverlappingRanges();\n\n var words = [];\n for (var i = all.length; i--; ) {\n var range = all[i];\n words.unshift(session.getTextRange(range));\n }\n\n if (dir < 0)\n words.unshift(words.pop());\n else\n words.push(words.shift());\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n var tmp = range.clone();\n session.replace(range, words[i]);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n }\n };\n this.selectMore = function(dir, skip, stopAtFirst) {\n var session = this.session;\n var sel = session.multiSelect;\n\n var range = sel.toOrientedRange();\n if (range.isEmpty()) {\n range = session.getWordRange(range.start.row, range.start.column);\n range.cursor = dir == -1 ? range.start : range.end;\n this.multiSelect.addRange(range);\n if (stopAtFirst)\n return;\n }\n var needle = session.getTextRange(range);\n\n var newRange = find(session, needle, dir);\n if (newRange) {\n newRange.cursor = dir == -1 ? newRange.start : newRange.end;\n this.$blockScrolling += 1;\n this.session.unfold(newRange);\n this.multiSelect.addRange(newRange);\n this.$blockScrolling -= 1;\n this.renderer.scrollCursorIntoView(null, 0.5);\n }\n if (skip)\n this.multiSelect.substractPoint(range.cursor);\n };\n this.alignCursors = function() {\n var session = this.session;\n var sel = session.multiSelect;\n var ranges = sel.ranges;\n var row = -1;\n var sameRowRanges = ranges.filter(function(r) {\n if (r.cursor.row == row)\n return true;\n row = r.cursor.row;\n });\n \n if (!ranges.length || sameRowRanges.length == ranges.length - 1) {\n var range = this.selection.getRange();\n var fr = range.start.row, lr = range.end.row;\n var guessRange = fr == lr;\n if (guessRange) {\n var max = this.session.getLength();\n var line;\n do {\n line = this.session.getLine(lr);\n } while (/[=:]/.test(line) && ++lr < max);\n do {\n line = this.session.getLine(fr);\n } while (/[=:]/.test(line) && --fr > 0);\n \n if (fr < 0) fr = 0;\n if (lr >= max) lr = max - 1;\n }\n var lines = this.session.removeFullLines(fr, lr);\n lines = this.$reAlignText(lines, guessRange);\n this.session.insert({row: fr, column: 0}, lines.join(\"\\n\") + \"\\n\");\n if (!guessRange) {\n range.start.column = 0;\n range.end.column = lines[lines.length - 1].length;\n }\n this.selection.setRange(range);\n } else {\n sameRowRanges.forEach(function(r) {\n sel.substractPoint(r.cursor);\n });\n\n var maxCol = 0;\n var minSpace = Infinity;\n var spaceOffsets = ranges.map(function(r) {\n var p = r.cursor;\n var line = session.getLine(p.row);\n var spaceOffset = line.substr(p.column).search(/\\S/g);\n if (spaceOffset == -1)\n spaceOffset = 0;\n\n if (p.column > maxCol)\n maxCol = p.column;\n if (spaceOffset < minSpace)\n minSpace = spaceOffset;\n return spaceOffset;\n });\n ranges.forEach(function(r, i) {\n var p = r.cursor;\n var l = maxCol - p.column;\n var d = spaceOffsets[i] - minSpace;\n if (l > d)\n session.insert(p, lang.stringRepeat(\" \", l - d));\n else\n session.remove(new Range(p.row, p.column, p.row, p.column - l + d));\n\n r.start.column = r.end.column = maxCol;\n r.start.row = r.end.row = p.row;\n r.cursor = r.end;\n });\n sel.fromOrientedRange(ranges[0]);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n }\n };\n\n this.$reAlignText = function(lines, forceLeft) {\n var isLeftAligned = true, isRightAligned = true;\n var startW, textW, endW;\n\n return lines.map(function(line) {\n var m = line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);\n if (!m)\n return [line];\n\n if (startW == null) {\n startW = m[1].length;\n textW = m[2].length;\n endW = m[3].length;\n return m;\n }\n\n if (startW + textW + endW != m[1].length + m[2].length + m[3].length)\n isRightAligned = false;\n if (startW != m[1].length)\n isLeftAligned = false;\n\n if (startW > m[1].length)\n startW = m[1].length;\n if (textW < m[2].length)\n textW = m[2].length;\n if (endW > m[3].length)\n endW = m[3].length;\n\n return m;\n }).map(forceLeft ? alignLeft :\n isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);\n\n function spaces(n) {\n return lang.stringRepeat(\" \", n);\n }\n\n function alignLeft(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(textW - m[2].length + endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function alignRight(m) {\n return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]\n + spaces(endW, \" \")\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function unAlign(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n };\n}).call(Editor.prototype);\n\n\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nexports.onSessionChange = function(e) {\n var session = e.session;\n if (session && !session.multiSelect) {\n session.$selectionMarkers = [];\n session.selection.$initRangeList();\n session.multiSelect = session.selection;\n }\n this.multiSelect = session && session.multiSelect;\n\n var oldSession = e.oldSession;\n if (oldSession) {\n oldSession.multiSelect.off(\"addRange\", this.$onAddRange);\n oldSession.multiSelect.off(\"removeRange\", this.$onRemoveRange);\n oldSession.multiSelect.off(\"multiSelect\", this.$onMultiSelect);\n oldSession.multiSelect.off(\"singleSelect\", this.$onSingleSelect);\n oldSession.multiSelect.lead.off(\"change\", this.$checkMultiselectChange);\n oldSession.multiSelect.anchor.off(\"change\", this.$checkMultiselectChange);\n }\n\n if (session) {\n session.multiSelect.on(\"addRange\", this.$onAddRange);\n session.multiSelect.on(\"removeRange\", this.$onRemoveRange);\n session.multiSelect.on(\"multiSelect\", this.$onMultiSelect);\n session.multiSelect.on(\"singleSelect\", this.$onSingleSelect);\n session.multiSelect.lead.on(\"change\", this.$checkMultiselectChange);\n session.multiSelect.anchor.on(\"change\", this.$checkMultiselectChange);\n }\n\n if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {\n if (session.selection.inMultiSelectMode)\n this.$onMultiSelect();\n else\n this.$onSingleSelect();\n }\n};\nfunction MultiSelect(editor) {\n if (editor.$multiselectOnSessionChange)\n return;\n editor.$onAddRange = editor.$onAddRange.bind(editor);\n editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);\n editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);\n editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);\n editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);\n editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);\n\n editor.$multiselectOnSessionChange(editor);\n editor.on(\"changeSession\", editor.$multiselectOnSessionChange);\n\n editor.on(\"mousedown\", onMouseDown);\n editor.commands.addCommands(commands.defaultCommands);\n\n addAltCursorListeners(editor);\n}\n\nfunction addAltCursorListeners(editor){\n var el = editor.textInput.getElement();\n var altCursor = false;\n event.addListener(el, \"keydown\", function(e) {\n var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);\n if (editor.$blockSelectEnabled && altDown) {\n if (!altCursor) {\n editor.renderer.setMouseCursor(\"crosshair\");\n altCursor = true;\n }\n } else if (altCursor) {\n reset();\n }\n });\n\n event.addListener(el, \"keyup\", reset);\n event.addListener(el, \"blur\", reset);\n function reset(e) {\n if (altCursor) {\n editor.renderer.setMouseCursor(\"\");\n altCursor = false;\n }\n }\n}\n\nexports.MultiSelect = MultiSelect;\n\n\nacequire(\"./config\").defineOptions(Editor.prototype, \"editor\", {\n enableMultiselect: {\n set: function(val) {\n MultiSelect(this);\n if (val) {\n this.on(\"changeSession\", this.$multiselectOnSessionChange);\n this.on(\"mousedown\", onMouseDown);\n } else {\n this.off(\"changeSession\", this.$multiselectOnSessionChange);\n this.off(\"mousedown\", onMouseDown);\n }\n },\n value: true\n },\n enableBlockSelect: {\n set: function(val) {\n this.$blockSelectEnabled = val;\n },\n value: true\n }\n});\n\n\n\n});\n\nace.define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../../range\").Range;\n\nvar FoldMode = exports.FoldMode = function() {};\n\n(function() {\n\n this.foldingStartMarker = null;\n this.foldingStopMarker = null;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.foldingStartMarker.test(line))\n return \"start\";\n if (foldStyle == \"markbeginend\"\n && this.foldingStopMarker\n && this.foldingStopMarker.test(line))\n return \"end\";\n return \"\";\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row) {\n return null;\n };\n\n this.indentationBlock = function(session, row, column) {\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1)\n return;\n\n var startColumn = column || line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n\n while (++row < maxRow) {\n var level = session.getLine(row).search(re);\n\n if (level == -1)\n continue;\n\n if (level <= startLevel)\n break;\n\n endRow = row;\n }\n\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n\n this.openingBracketBlock = function(session, bracket, row, column, typeRe) {\n var start = {row: row, column: column + 1};\n var end = session.$findClosingBracket(bracket, start, typeRe);\n if (!end)\n return;\n\n var fw = session.foldWidgets[end.row];\n if (fw == null)\n fw = session.getFoldWidget(end.row);\n\n if (fw == \"start\" && end.row > start.row) {\n end.row --;\n end.column = session.getLine(end.row).length;\n }\n return Range.fromPoints(start, end);\n };\n\n this.closingBracketBlock = function(session, bracket, row, column, typeRe) {\n var end = {row: row, column: column};\n var start = session.$findOpeningBracket(bracket, end);\n\n if (!start)\n return;\n\n start.column++;\n end.column--;\n\n return Range.fromPoints(start, end);\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.isDark = false;\nexports.cssClass = \"ace-tm\";\nexports.cssText = \".ace-tm .ace_gutter {\\\nbackground: #f0f0f0;\\\ncolor: #333;\\\n}\\\n.ace-tm .ace_print-margin {\\\nwidth: 1px;\\\nbackground: #e8e8e8;\\\n}\\\n.ace-tm .ace_fold {\\\nbackground-color: #6B72E6;\\\n}\\\n.ace-tm {\\\nbackground-color: #FFFFFF;\\\ncolor: black;\\\n}\\\n.ace-tm .ace_cursor {\\\ncolor: black;\\\n}\\\n.ace-tm .ace_invisible {\\\ncolor: rgb(191, 191, 191);\\\n}\\\n.ace-tm .ace_storage,\\\n.ace-tm .ace_keyword {\\\ncolor: blue;\\\n}\\\n.ace-tm .ace_constant {\\\ncolor: rgb(197, 6, 11);\\\n}\\\n.ace-tm .ace_constant.ace_buildin {\\\ncolor: rgb(88, 72, 246);\\\n}\\\n.ace-tm .ace_constant.ace_language {\\\ncolor: rgb(88, 92, 246);\\\n}\\\n.ace-tm .ace_constant.ace_library {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_invalid {\\\nbackground-color: rgba(255, 0, 0, 0.1);\\\ncolor: red;\\\n}\\\n.ace-tm .ace_support.ace_function {\\\ncolor: rgb(60, 76, 114);\\\n}\\\n.ace-tm .ace_support.ace_constant {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_support.ace_type,\\\n.ace-tm .ace_support.ace_class {\\\ncolor: rgb(109, 121, 222);\\\n}\\\n.ace-tm .ace_keyword.ace_operator {\\\ncolor: rgb(104, 118, 135);\\\n}\\\n.ace-tm .ace_string {\\\ncolor: rgb(3, 106, 7);\\\n}\\\n.ace-tm .ace_comment {\\\ncolor: rgb(76, 136, 107);\\\n}\\\n.ace-tm .ace_comment.ace_doc {\\\ncolor: rgb(0, 102, 255);\\\n}\\\n.ace-tm .ace_comment.ace_doc.ace_tag {\\\ncolor: rgb(128, 159, 191);\\\n}\\\n.ace-tm .ace_constant.ace_numeric {\\\ncolor: rgb(0, 0, 205);\\\n}\\\n.ace-tm .ace_variable {\\\ncolor: rgb(49, 132, 149);\\\n}\\\n.ace-tm .ace_xml-pe {\\\ncolor: rgb(104, 104, 91);\\\n}\\\n.ace-tm .ace_entity.ace_name.ace_function {\\\ncolor: #0000A2;\\\n}\\\n.ace-tm .ace_heading {\\\ncolor: rgb(12, 7, 255);\\\n}\\\n.ace-tm .ace_list {\\\ncolor:rgb(185, 6, 144);\\\n}\\\n.ace-tm .ace_meta.ace_tag {\\\ncolor:rgb(0, 22, 142);\\\n}\\\n.ace-tm .ace_string.ace_regex {\\\ncolor: rgb(255, 0, 0)\\\n}\\\n.ace-tm .ace_marker-layer .ace_selection {\\\nbackground: rgb(181, 213, 255);\\\n}\\\n.ace-tm.ace_multiselect .ace_selection.ace_start {\\\nbox-shadow: 0 0 3px 0px white;\\\n}\\\n.ace-tm .ace_marker-layer .ace_step {\\\nbackground: rgb(252, 255, 0);\\\n}\\\n.ace-tm .ace_marker-layer .ace_stack {\\\nbackground: rgb(164, 229, 101);\\\n}\\\n.ace-tm .ace_marker-layer .ace_bracket {\\\nmargin: -1px 0 0 -1px;\\\nborder: 1px solid rgb(192, 192, 192);\\\n}\\\n.ace-tm .ace_marker-layer .ace_active-line {\\\nbackground: rgba(0, 0, 0, 0.07);\\\n}\\\n.ace-tm .ace_gutter-active-line {\\\nbackground-color : #dcdcdc;\\\n}\\\n.ace-tm .ace_marker-layer .ace_selected-word {\\\nbackground: rgb(250, 250, 255);\\\nborder: 1px solid rgb(200, 200, 250);\\\n}\\\n.ace-tm .ace_indent-guide {\\\nbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\\\") right repeat-y;\\\n}\\\n\";\n\nvar dom = acequire(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass);\n});\n\nace.define(\"ace/line_widgets\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar Range = acequire(\"./range\").Range;\n\n\nfunction LineWidgets(session) {\n this.session = session;\n this.session.widgetManager = this;\n this.session.getRowLength = this.getRowLength;\n this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;\n this.updateOnChange = this.updateOnChange.bind(this);\n this.renderWidgets = this.renderWidgets.bind(this);\n this.measureWidgets = this.measureWidgets.bind(this);\n this.session._changedWidgets = [];\n this.$onChangeEditor = this.$onChangeEditor.bind(this);\n \n this.session.on(\"change\", this.updateOnChange);\n this.session.on(\"changeFold\", this.updateOnFold);\n this.session.on(\"changeEditor\", this.$onChangeEditor);\n}\n\n(function() {\n this.getRowLength = function(row) {\n var h;\n if (this.lineWidgets)\n h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0;\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n\n this.$getWidgetScreenLength = function() {\n var screenRows = 0;\n this.lineWidgets.forEach(function(w){\n if (w && w.rowCount && !w.hidden)\n screenRows += w.rowCount;\n });\n return screenRows;\n }; \n \n this.$onChangeEditor = function(e) {\n this.attach(e.editor);\n };\n \n this.attach = function(editor) {\n if (editor && editor.widgetManager && editor.widgetManager != this)\n editor.widgetManager.detach();\n\n if (this.editor == editor)\n return;\n\n this.detach();\n this.editor = editor;\n \n if (editor) {\n editor.widgetManager = this;\n editor.renderer.on(\"beforeRender\", this.measureWidgets);\n editor.renderer.on(\"afterRender\", this.renderWidgets);\n }\n };\n this.detach = function(e) {\n var editor = this.editor;\n if (!editor)\n return;\n \n this.editor = null;\n editor.widgetManager = null;\n \n editor.renderer.off(\"beforeRender\", this.measureWidgets);\n editor.renderer.off(\"afterRender\", this.renderWidgets);\n var lineWidgets = this.session.lineWidgets;\n lineWidgets && lineWidgets.forEach(function(w) {\n if (w && w.el && w.el.parentNode) {\n w._inDocument = false;\n w.el.parentNode.removeChild(w.el);\n }\n });\n };\n\n this.updateOnFold = function(e, session) {\n var lineWidgets = session.lineWidgets;\n if (!lineWidgets || !e.action)\n return;\n var fold = e.data;\n var start = fold.start.row;\n var end = fold.end.row;\n var hide = e.action == \"add\";\n for (var i = start + 1; i < end; i++) {\n if (lineWidgets[i])\n lineWidgets[i].hidden = hide;\n }\n if (lineWidgets[end]) {\n if (hide) {\n if (!lineWidgets[start])\n lineWidgets[start] = lineWidgets[end];\n else\n lineWidgets[end].hidden = hide;\n } else {\n if (lineWidgets[start] == lineWidgets[end])\n lineWidgets[start] = undefined;\n lineWidgets[end].hidden = hide;\n }\n }\n };\n \n this.updateOnChange = function(delta) {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n \n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n } else if (delta.action == 'remove') {\n var removed = lineWidgets.splice(startRow + 1, len);\n removed.forEach(function(w) {\n w && this.removeLineWidget(w);\n }, this);\n this.$updateRows();\n } else {\n var args = new Array(len);\n args.unshift(startRow, 0);\n lineWidgets.splice.apply(lineWidgets, args);\n this.$updateRows();\n }\n };\n \n this.$updateRows = function() {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n var noWidgets = true;\n lineWidgets.forEach(function(w, i) {\n if (w) {\n noWidgets = false;\n w.row = i;\n while (w.$oldWidget) {\n w.$oldWidget.row = i;\n w = w.$oldWidget;\n }\n }\n });\n if (noWidgets)\n this.session.lineWidgets = null;\n };\n\n this.addLineWidget = function(w) {\n if (!this.session.lineWidgets)\n this.session.lineWidgets = new Array(this.session.getLength());\n \n var old = this.session.lineWidgets[w.row];\n if (old) {\n w.$oldWidget = old;\n if (old.el && old.el.parentNode) {\n old.el.parentNode.removeChild(old.el);\n old._inDocument = false;\n }\n }\n \n this.session.lineWidgets[w.row] = w;\n \n w.session = this.session;\n \n var renderer = this.editor.renderer;\n if (w.html && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.innerHTML = w.html;\n }\n if (w.el) {\n dom.addCssClass(w.el, \"ace_lineWidgetContainer\");\n w.el.style.position = \"absolute\";\n w.el.style.zIndex = 5;\n renderer.container.appendChild(w.el);\n w._inDocument = true;\n }\n \n if (!w.coverGutter) {\n w.el.style.zIndex = 3;\n }\n if (w.pixelHeight == null) {\n w.pixelHeight = w.el.offsetHeight;\n }\n if (w.rowCount == null) {\n w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;\n }\n \n var fold = this.session.getFoldAt(w.row, 0);\n w.$fold = fold;\n if (fold) {\n var lineWidgets = this.session.lineWidgets;\n if (w.row == fold.end.row && !lineWidgets[fold.start.row])\n lineWidgets[fold.start.row] = w;\n else\n w.hidden = true;\n }\n \n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n \n this.$updateRows();\n this.renderWidgets(null, renderer);\n this.onWidgetChanged(w);\n return w;\n };\n \n this.removeLineWidget = function(w) {\n w._inDocument = false;\n w.session = null;\n if (w.el && w.el.parentNode)\n w.el.parentNode.removeChild(w.el);\n if (w.editor && w.editor.destroy) try {\n w.editor.destroy();\n } catch(e){}\n if (this.session.lineWidgets) {\n var w1 = this.session.lineWidgets[w.row];\n if (w1 == w) {\n this.session.lineWidgets[w.row] = w.$oldWidget;\n if (w.$oldWidget)\n this.onWidgetChanged(w.$oldWidget);\n } else {\n while (w1) {\n if (w1.$oldWidget == w) {\n w1.$oldWidget = w.$oldWidget;\n break;\n }\n w1 = w1.$oldWidget;\n }\n }\n }\n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n this.$updateRows();\n };\n \n this.getWidgetsAtRow = function(row) {\n var lineWidgets = this.session.lineWidgets;\n var w = lineWidgets && lineWidgets[row];\n var list = [];\n while (w) {\n list.push(w);\n w = w.$oldWidget;\n }\n return list;\n };\n \n this.onWidgetChanged = function(w) {\n this.session._changedWidgets.push(w);\n this.editor && this.editor.renderer.updateFull();\n };\n \n this.measureWidgets = function(e, renderer) {\n var changedWidgets = this.session._changedWidgets;\n var config = renderer.layerConfig;\n \n if (!changedWidgets || !changedWidgets.length) return;\n var min = Infinity;\n for (var i = 0; i < changedWidgets.length; i++) {\n var w = changedWidgets[i];\n if (!w || !w.el) continue;\n if (w.session != this.session) continue;\n if (!w._inDocument) {\n if (this.session.lineWidgets[w.row] != w)\n continue;\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n \n w.h = w.el.offsetHeight;\n \n if (!w.fixedWidth) {\n w.w = w.el.offsetWidth;\n w.screenWidth = Math.ceil(w.w / config.characterWidth);\n }\n \n var rowCount = w.h / config.lineHeight;\n if (w.coverLine) {\n rowCount -= this.session.getRowLineCount(w.row);\n if (rowCount < 0)\n rowCount = 0;\n }\n if (w.rowCount != rowCount) {\n w.rowCount = rowCount;\n if (w.row < min)\n min = w.row;\n }\n }\n if (min != Infinity) {\n this.session._emit(\"changeFold\", {data:{start:{row: min}}});\n this.session.lineWidgetWidth = null;\n }\n this.session._changedWidgets = [];\n };\n \n this.renderWidgets = function(e, renderer) {\n var config = renderer.layerConfig;\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var first = Math.min(this.firstRow, config.firstRow);\n var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);\n \n while (first > 0 && !lineWidgets[first])\n first--;\n \n this.firstRow = config.firstRow;\n this.lastRow = config.lastRow;\n\n renderer.$cursorLayer.config = config;\n for (var i = first; i <= last; i++) {\n var w = lineWidgets[i];\n if (!w || !w.el) continue;\n if (w.hidden) {\n w.el.style.top = -100 - (w.pixelHeight || 0) + \"px\";\n continue;\n }\n if (!w._inDocument) {\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top;\n if (!w.coverLine)\n top += config.lineHeight * this.session.getRowLineCount(w.row);\n w.el.style.top = top - config.offset + \"px\";\n \n var left = w.coverGutter ? 0 : renderer.gutterWidth;\n if (!w.fixedWidth)\n left -= renderer.scrollLeft;\n w.el.style.left = left + \"px\";\n \n if (w.fullWidth && w.screenWidth) {\n w.el.style.minWidth = config.width + 2 * config.padding + \"px\";\n }\n \n if (w.fixedWidth) {\n w.el.style.right = renderer.scrollBar.getWidth() + \"px\";\n } else {\n w.el.style.right = \"\";\n }\n }\n };\n \n}).call(LineWidgets.prototype);\n\n\nexports.LineWidgets = LineWidgets;\n\n});\n\nace.define(\"ace/ext/error_marker\",[\"require\",\"exports\",\"module\",\"ace/line_widgets\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar LineWidgets = acequire(\"../line_widgets\").LineWidgets;\nvar dom = acequire(\"../lib/dom\");\nvar Range = acequire(\"../range\").Range;\n\nfunction binarySearch(array, needle, comparator) {\n var first = 0;\n var last = array.length - 1;\n\n while (first <= last) {\n var mid = (first + last) >> 1;\n var c = comparator(needle, array[mid]);\n if (c > 0)\n first = mid + 1;\n else if (c < 0)\n last = mid - 1;\n else\n return mid;\n }\n return -(first + 1);\n}\n\nfunction findAnnotations(session, row, dir) {\n var annotations = session.getAnnotations().sort(Range.comparePoints);\n if (!annotations.length)\n return;\n \n var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints);\n if (i < 0)\n i = -i - 1;\n \n if (i >= annotations.length)\n i = dir > 0 ? 0 : annotations.length - 1;\n else if (i === 0 && dir < 0)\n i = annotations.length - 1;\n \n var annotation = annotations[i];\n if (!annotation || !dir)\n return;\n\n if (annotation.row === row) {\n do {\n annotation = annotations[i += dir];\n } while (annotation && annotation.row === row);\n if (!annotation)\n return annotations.slice();\n }\n \n \n var matched = [];\n row = annotation.row;\n do {\n matched[dir < 0 ? \"unshift\" : \"push\"](annotation);\n annotation = annotations[i += dir];\n } while (annotation && annotation.row == row);\n return matched.length && matched;\n}\n\nexports.showErrorMarker = function(editor, dir) {\n var session = editor.session;\n if (!session.widgetManager) {\n session.widgetManager = new LineWidgets(session);\n session.widgetManager.attach(editor);\n }\n \n var pos = editor.getCursorPosition();\n var row = pos.row;\n var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) {\n return w.type == \"errorMarker\";\n })[0];\n if (oldWidget) {\n oldWidget.destroy();\n } else {\n row -= dir;\n }\n var annotations = findAnnotations(session, row, dir);\n var gutterAnno;\n if (annotations) {\n var annotation = annotations[0];\n pos.column = (annotation.pos && typeof annotation.column != \"number\"\n ? annotation.pos.sc\n : annotation.column) || 0;\n pos.row = annotation.row;\n gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];\n } else if (oldWidget) {\n return;\n } else {\n gutterAnno = {\n text: [\"Looks good!\"],\n className: \"ace_ok\"\n };\n }\n editor.session.unfold(pos.row);\n editor.selection.moveToPosition(pos);\n \n var w = {\n row: pos.row, \n fixedWidth: true,\n coverGutter: true,\n el: dom.createElement(\"div\"),\n type: \"errorMarker\"\n };\n var el = w.el.appendChild(dom.createElement(\"div\"));\n var arrow = w.el.appendChild(dom.createElement(\"div\"));\n arrow.className = \"error_widget_arrow \" + gutterAnno.className;\n \n var left = editor.renderer.$cursorLayer\n .getPixelPosition(pos).left;\n arrow.style.left = left + editor.renderer.gutterWidth - 5 + \"px\";\n \n w.el.className = \"error_widget_wrapper\";\n el.className = \"error_widget \" + gutterAnno.className;\n el.innerHTML = gutterAnno.text.join(\"
    \");\n \n el.appendChild(dom.createElement(\"div\"));\n \n var kb = function(_, hashId, keyString) {\n if (hashId === 0 && (keyString === \"esc\" || keyString === \"return\")) {\n w.destroy();\n return {command: \"null\"};\n }\n };\n \n w.destroy = function() {\n if (editor.$mouseHandler.isMousePressed)\n return;\n editor.keyBinding.removeKeyboardHandler(kb);\n session.widgetManager.removeLineWidget(w);\n editor.off(\"changeSelection\", w.destroy);\n editor.off(\"changeSession\", w.destroy);\n editor.off(\"mouseup\", w.destroy);\n editor.off(\"change\", w.destroy);\n };\n \n editor.keyBinding.addKeyboardHandler(kb);\n editor.on(\"changeSelection\", w.destroy);\n editor.on(\"changeSession\", w.destroy);\n editor.on(\"mouseup\", w.destroy);\n editor.on(\"change\", w.destroy);\n \n editor.session.widgetManager.addLineWidget(w);\n \n w.el.onmousedown = editor.focus.bind(editor);\n \n editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight});\n};\n\n\ndom.importCssString(\"\\\n .error_widget_wrapper {\\\n background: inherit;\\\n color: inherit;\\\n border:none\\\n }\\\n .error_widget {\\\n border-top: solid 2px;\\\n border-bottom: solid 2px;\\\n margin: 5px 0;\\\n padding: 10px 40px;\\\n white-space: pre-wrap;\\\n }\\\n .error_widget.ace_error, .error_widget_arrow.ace_error{\\\n border-color: #ff5a5a\\\n }\\\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\\\n border-color: #F1D817\\\n }\\\n .error_widget.ace_info, .error_widget_arrow.ace_info{\\\n border-color: #5a5a5a\\\n }\\\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\\\n border-color: #5aaa5a\\\n }\\\n .error_widget_arrow {\\\n position: absolute;\\\n border: solid 5px;\\\n border-top-color: transparent!important;\\\n border-right-color: transparent!important;\\\n border-left-color: transparent!important;\\\n top: -5px;\\\n }\\\n\", \"\");\n\n});\n\nace.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/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/multi_select\",\"ace/mode/folding/fold_mode\",\"ace/theme/textmate\",\"ace/ext/error_marker\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\n\nvar Editor = acequire(\"./editor\").Editor;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar UndoManager = acequire(\"./undomanager\").UndoManager;\nvar Renderer = acequire(\"./virtual_renderer\").VirtualRenderer;\nacequire(\"./worker/worker_client\");\nacequire(\"./keyboard/hash_handler\");\nacequire(\"./placeholder\");\nacequire(\"./multi_select\");\nacequire(\"./mode/folding/fold_mode\");\nacequire(\"./theme/textmate\");\nacequire(\"./ext/error_marker\");\n\nexports.config = acequire(\"./config\");\nexports.acequire = acequire;\n\nif (true)\n exports.define = __webpack_require__(/*! !webpack amd define */ \"../../../../webpack@4.46.0_webpack-cli@3.3.12/node_modules/webpack/buildin/amd-define.js\");\nexports.edit = function(el) {\n if (typeof el == \"string\") {\n var _id = el;\n el = document.getElementById(_id);\n if (!el)\n throw new Error(\"ace.edit can't find div #\" + _id);\n }\n\n if (el && el.env && el.env.editor instanceof Editor)\n return el.env.editor;\n\n var value = \"\";\n if (el && /input|textarea/i.test(el.tagName)) {\n var oldNode = el;\n value = oldNode.value;\n el = dom.createElement(\"pre\");\n oldNode.parentNode.replaceChild(el, oldNode);\n } else if (el) {\n value = dom.getInnerText(el);\n el.innerHTML = \"\";\n }\n\n var doc = exports.createEditSession(value);\n\n var editor = new Editor(new Renderer(el));\n editor.setSession(doc);\n\n var env = {\n document: doc,\n editor: editor,\n onResize: editor.resize.bind(editor, null)\n };\n if (oldNode) env.textarea = oldNode;\n event.addListener(window, \"resize\", env.onResize);\n editor.on(\"destroy\", function() {\n event.removeListener(window, \"resize\", env.onResize);\n env.editor.container.env = null; // prevent memory leak on old ie\n });\n editor.container.env = editor.env = env;\n return editor;\n};\nexports.createEditSession = function(text, mode) {\n var doc = new EditSession(text, mode);\n doc.setUndoManager(new UndoManager());\n return doc;\n};\nexports.EditSession = EditSession;\nexports.UndoManager = UndoManager;\nexports.version = \"1.2.9\";\n});\n (function() {\n ace.acequire([\"ace/ace\"], function(a) {\n if (a) {\n a.config.init(true);\n a.define = ace.define;\n }\n if (!window.ace)\n window.ace = a;\n for (var key in a) if (a.hasOwnProperty(key))\n window.ace[key] = a[key];\n });\n })();\n \nmodule.exports = window.ace.acequire(\"ace/ace\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9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HJldHVybjtcbiAgICBSZWdFeHAucHJvdG90eXBlLmV4ZWMgPSBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgIHZhciBtYXRjaCA9IHJlYWwuZXhlYy5hcHBseSh0aGlzLCBhcmd1bWVudHMpLFxuICAgICAgICAgICAgbmFtZSwgcjI7XG4gICAgICAgIGlmICggdHlwZW9mKHN0cikgPT0gJ3N0cmluZycgJiYgbWF0Y2gpIHtcbiAgICAgICAgICAgIGlmICghY29tcGxpYW50RXhlY05wY2cgJiYgbWF0Y2gubGVuZ3RoID4gMSAmJiBpbmRleE9mKG1hdGNoLCBcIlwiKSA+IC0xKSB7XG4gICAgICAgICAgICAgICAgcjIgPSBSZWdFeHAodGhpcy5zb3VyY2UsIHJlYWwucmVwbGFjZS5jYWxsKGdldE5hdGl2ZUZsYWdzKHRoaXMpLCBcImdcIiwgXCJcIikpO1xuICAgICAgICAgICAgICAgIHJlYWwucmVwbGFjZS5jYWxsKHN0ci5zbGljZShtYXRjaC5pbmRleCksIHIyLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgYXJndW1lbnRzLmxlbmd0aCAtIDI7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ3VtZW50c1tpXSA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoW2ldID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodGhpcy5feHJlZ2V4cCAmJiB0aGlzLl94cmVnZXhwLmNhcHR1cmVOYW1lcykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgbWF0Y2gubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgbmFtZSA9IHRoaXMuX3hyZWdleHAuY2FwdHVyZU5hbWVzW2kgLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5hbWUpXG4gICAgICAgICAgICAgICAgICAgICAgIG1hdGNoW25hbWVdID0gbWF0Y2hbaV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFjb21wbGlhbnRMYXN0SW5kZXhJbmNyZW1lbnQgJiYgdGhpcy5nbG9iYWwgJiYgIW1hdGNoWzBdLmxlbmd0aCAmJiAodGhpcy5sYXN0SW5kZXggPiBtYXRjaC5pbmRleCkpXG4gICAgICAgICAgICAgICAgdGhpcy5sYXN0SW5kZXgtLTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWF0Y2g7XG4gICAgfTtcbiAgICBpZiAoIWNvbXBsaWFudExhc3RJbmRleEluY3JlbWVudCkge1xuICAgICAgICBSZWdFeHAucHJvdG90eXBlLnRlc3QgPSBmdW5jdGlvbiAoc3RyKSB7XG4gICAgICAgICAgICB2YXIgbWF0Y2ggPSByZWFsLmV4ZWMuY2FsbCh0aGlzLCBzdHIpO1xuICAgICAgICAgICAgaWYgKG1hdGNoICYmIHRoaXMuZ2xvYmFsICYmICFtYXRjaFswXS5sZW5ndGggJiYgKHRoaXMubGFzdEluZGV4ID4gbWF0Y2guaW5kZXgpKVxuICAgICAgICAgICAgICAgIHRoaXMubGFzdEluZGV4LS07XG4gICAgICAgICAgICByZXR1cm4gISFtYXRjaDtcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBnZXROYXRpdmVGbGFncyAocmVnZXgpIHtcbiAgICAgICAgcmV0dXJuIChyZWdleC5nbG9iYWwgICAgID8gXCJnXCIgOiBcIlwiKSArXG4gICAgICAgICAgICAgICAocmVnZXguaWdub3JlQ2FzZSA/IFwiaVwiIDogXCJcIikgK1xuICAgICAgICAgICAgICAgKHJlZ2V4Lm11bHRpbGluZSAgPyBcIm1cIiA6IFwiXCIpICtcbiAgICAgICAgICAgICAgIChyZW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RvdHlwZS5iaW5kIGNhbGxlZCBvbiBpbmNvbXBhdGlibGUgXCIgKyB0YXJnZXQpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBhcmdzID0gc2xpY2UuY2FsbChhcmd1bWVudHMsIDEpOyAvLyBmb3Igbm9ybWFsIGNhbGxcbiAgICAgICAgdmFyIGJvdW5kID0gZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICBpZiAodGhpcyBpbnN0YW5jZW9mIGJvdW5kKSB7XG5cbiAgICAgICAgICAgICAgICB2YXIgcmVzdWx0ID0gdGFyZ2V0LmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICB0aGlzLFxuICAgICAgICAgICAgICAgICAgICBhcmdzLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cykpXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0KHJlc3VsdCkgPT09IHJlc3VsdCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcztcblxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGFyZ2V0LmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICB0aGF0LFxuICAgICAgICAgICAgICAgICAgICBhcmdzLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cykpXG4gICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgfVxuXG4gICAgICAgIH07XG4gICAgICAgIGlmKHRhcmdldC5wcm90b3R5cGUpIHtcbiAgICAgICAgICAgIEVtcHR5LnByb3RvdHlwZSA9IHRhcmdldC5wcm90b3R5cGU7XG4gICAgICAgICAgICBib3VuZC5wcm90b3R5cGUgPSBuZXcgRW1wdHkoKTtcbiAgICAgICAgICAgIEVtcHR5LnByb3RvdHlwZSA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJ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9zcGxpY2UuYXBwbHkodGhpcywgW1xuICAgICAgICAgICAgICAgICAgICBzdGFydCA9PT0gdm9pZCAwID8gMCA6IHN0YXJ0LFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVDb3VudCA9PT0gdm9pZCAwID8gKHRoaXMubGVuZ3RoIC0gc3RhcnQpIDogZGVsZXRlQ291bnRcbiAgICAgICAgICAgICAgICBdLmNvbmNhdChzbGljZS5jYWxsKGFyZ3VtZW50cywgMikpKVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0gZWxzZSB7Ly9JRThcbiAgICAgICAgQXJyYXkucHJvdG90eXBlLnNwbGljZSA9IGZ1bmN0aW9uKHBvcywgcmVtb3ZlQ291bnQpe1xuICAgICAgICAgICAgdmFyIGxlbmd0aCA9IHRoaXMubGVuZ3RoO1xuICAgICAgICAgICAgaWYgKHBvcyA+IDApIHtcbiAgICAgICAgICAgICAgICBpZiAocG9zID4gbGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICBwb3MgPSBsZW5ndGg7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHBvcyA9PSB2b2lkIDApIHtcbiAgICAgICAgICAgICAgICBwb3MgPSAwO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChwb3MgPCAwKSB7XG4gICAgICAgICAgICAgICAgcG9zID0gTWF0aC5tYXgobGVuZ3RoICsgcG9zLCAwKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCEocG9zK3JlbW92ZUNvdW50IDwgbGVuZ3RoKSlcbiAgICAgICAgICAgICAgICByZW1vdmVDb3VudCA9IGxlbmd0aCAtIHBvcztcblxuICAgICAgICAgICAgdmFyIHJlbW92ZWQgPSB0aGlzLnNsaWNlKHBvcywgcG9zK3JlbW92ZUNvdW50KTtcbiAgICAgICAgICAgIHZhciBpbnNlcnQgPSBzbGljZS5jYWxsKGFyZ3VtZW50cywgMik7XG4gICAgICAgICAgICB2YXIgYWRkID0gaW5zZXJ0Lmxlbmd0aDsgICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChwb3MgPT09IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGlmIChhZGQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5wdXNoLmFwcGx5KHRoaXMsIGluc2VydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVtb3ZlID0gTWF0aC5taW4ocmVtb3ZlQ291bnQsIGxlbmd0aCAtIHBvcyk7XG4gICAgICAgICAgICAgICAgdmFyIHRhaWxPbGRQb3MgPSBwb3MgKyByZW1vdmU7XG4gICAgICAgICAgICAgICAgdmFyIHRhaWxOZXdQb3MgPSB0YWlsT2xkUG9zICsgYWRkIC0gcmVtb3ZlO1xuICAgICAgICAgICAgICAgIHZhciB0YWlsQ291bnQgPSBsZW5ndGggLSB0YWlsT2xkUG9zO1xuICAgICAgICAgICAgICAgIHZhciBsZW5ndGhBZnRlclJlbW92ZSA9IGxlbmd0aCAtIHJlbW92ZTtcblxuICAgICAgICAgICAgICAgIGlmICh0YWlsTmV3UG9zIDwgdGFpbE9sZFBvcykgeyAvLyBjYXNlIEFcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0YWlsQ291bnQ7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1t0YWlsTmV3UG9zK2ldID0gdGhpc1t0YWlsT2xkUG9zK2ldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0YWlsTmV3UG9zID4gdGFpbE9sZFBvcykgeyAvLyBjYXNlIEJcbiAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gdGFpbENvdW50OyBpLS07ICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1t0YWlsTmV3UG9zK2ldID0gdGhpc1t0YWlsT2xkUG9zK2ldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSAvLyBlbHNlLCBhZGQgPT0gcmVtb3ZlIChub3RoaW5nIHRvIGRvKVxuXG4gICAgICAgICAgICAgICAgaWYgKGFkZCAmJiBwb3MgPT09IGxlbmd0aEFmdGVyUmVtb3ZlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGVuZ3RoID0gbGVuZ3RoQWZ0ZXJSZW1vdmU7IC8vIHRydW5jYXRlIGFycmF5XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHVzaC5hcHBseSh0aGlzLCBpbnNlcnQpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubGVuZ3RoID0gbGVuZ3RoQWZ0ZXJSZW1vdmUgKyBhZGQ7IC8vIHJlc2VydmVzIHNwYWNlXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBhZGQ7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1twb3MraV0gPSBpbnNlcnRbaV07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmVtb3ZlZDtcbiAgICAgICAgfTtcbiAgICB9XG59XG5pZiAoIUFycmF5LmlzQXJyYXkpIHtcbiAgICBBcnJheS5pc0FycmF5ID0gZnVuY3Rpb24gaXNBcnJheShvYmopIHtcbiAgICAgICAgcmV0dXJuIF90b1N0cmluZyhvYmopID09IFwiW29iamVjdCBBcnJheV1cIjtcbiAgICB9O1xufVxudmFyIGJveGVkU3RyaW5nID0gT2JqZWN0KFwiYVwiKSxcbiAgICBzcGxpdFN0cmluZyA9IGJveGVkU3RyaW5nWzBdICE9IFwiYVwiIHx8ICEoMCBpbiBib3hlZFN0cmluZyk7XG5cbmlmICghQXJyYXkucHJvdG90eXBlLmZvckVhY2gpIHtcbiAgICBBcnJheS5wcm90b3R5cGUuZm9yRWFjaCA9IGZ1bmN0aW9uIGZvckVhY2goZnVuIC8qLCB0aGlzcCovKSB7XG4gICAgICAgIHZhciBvYmplY3QgPSB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgb2JqZWN0LFxuICAgICAgICAgICAgdGhpc3AgPSBhcmd1bWVudHNbMV0sXG4gICAgICAgICAgICBpID0gLTEsXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMDtcbiAgICAgICAgaWYgKF90b1N0cmluZyhmdW4pICE9IFwiW29iamVjdCBGdW5jdGlvbl1cIikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpOyAvLyBUT0RPIG1lc3NhZ2VcbiAgICAgICAgfVxuXG4gICAgICAgIHdoaWxlICgrK2kgPCBsZW5ndGgpIHtcbiAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICBmdW4uY2FsbCh0aGlzcCwgc2VsZltpXSwgaSwgb2JqZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5tYXApIHtcbiAgICBBcnJheS5wcm90b3R5cGUubWFwID0gZnVuY3Rpb24gbWFwKGZ1biAvKiwgdGhpc3AqLykge1xuICAgICAgICB2YXIgb2JqZWN0ID0gdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBzZWxmID0gc3BsaXRTdHJpbmcgJiYgX3RvU3RyaW5nKHRoaXMpID09IFwiW29iamVjdCBTdHJpbmddXCIgP1xuICAgICAgICAgICAgICAgIHRoaXMuc3BsaXQoXCJcIikgOlxuICAgICAgICAgICAgICAgIG9iamVjdCxcbiAgIC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JpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoZnVuICsgXCIgaXMgbm90IGEgZnVuY3Rpb25cIik7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBzZWxmW2ldO1xuICAgICAgICAgICAgICAgIGlmIChmdW4uY2FsbCh0aGlzcCwgdmFsdWUsIGksIG9iamVjdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5ldmVyeSkge1xuICAgIEFycmF5LnByb3RvdHlwZS5ldmVyeSA9IGZ1bmN0aW9uIGV2ZXJ5KGZ1biAvKiwgdGhpc3AgKi8pIHtcbiAgICAgICAgdmFyIG9iamVjdCA9IHRvT2JqZWN0KHRoaXMpLFxuICAgICAgICAgICAgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICBvYmplY3QsXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMCxcbiAgICAgICAgICAgIHRoaXNwID0gYXJndW1lbnRzWzFdO1xuICAgICAgICBpZiAoX3RvU3RyaW5nKGZ1bikgIT0gXCJbb2JqZWN0IEZ1bmN0aW9uXVwiKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGZ1biArIFwiIGlzIG5vdCBhIGZ1bmN0aW9uXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgaW4gc2VsZiAmJiAhZnVuLmNhbGwodGhpc3AsIHNlbGZbaV0sIGksIG9iamVjdCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfTtcbn1cbmlmICghQXJyYXkucHJvdG90eXBlLnNvbWUpIHtcbiAgICBBcnJheS5wcm90b3R5cGUuc29tZSA9IGZ1bmN0aW9uIHNvbWUoZnVuIC8qLCB0aGlzcCAqLykge1xuICAgICAgICB2YXIgb2JqZWN0ID0gdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBzZWxmID0gc3BsaXRTdHJpbmcgJiYgX3RvU3RyaW5nKHRoaXMpID09IFwiW29iamVjdCBTdHJpbmddXCIgP1xuICAgICAgICAgICAgICAgIHRoaXMuc3BsaXQoXCJcIikgOlxuICAgICAgICAgICAgICAgIG9iamVjdCxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwLFxuICAgICAgICAgICAgdGhpc3AgPSBhcmd1bWVudHNbMV07XG4gICAgICAgIGlmIChfdG9TdHJpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoZnVuICsgXCIgaXMgbm90IGEgZnVuY3Rpb25cIik7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmICYmIGZ1bi5jYWxsKHRoaXNwLCBzZWxmW2ldLCBpLCBvYmplY3QpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5yZWR1Y2UpIHtcbiAgICBBcnJheS5wcm90b3R5cGUucmVkdWNlID0gZnVuY3Rpb24gcmVkdWNlKGZ1biAvKiwgaW5pdGlhbCovKSB7XG4gICAgICAgIHZhciBvYmplY3QgPSB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgb2JqZWN0LFxuICAgICAgICAgICAgbGVuZ3RoID0gc2VsZi5sZW5ndGggPj4+IDA7XG4gICAgICAgIGlmIChfdG9TdHJpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoZnVuICsgXCIgaXMgbm90IGEgZnVuY3Rpb25cIik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsZW5ndGggJiYgYXJndW1lbnRzLmxlbmd0aCA9PSAxKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwicmVkdWNlIG9mIGVtcHR5IGFycmF5IHdpdGggbm8gaW5pdGlhbCB2YWx1ZVwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBpID0gMDtcbiAgICAgICAgdmFyIHJlc3VsdDtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPj0gMikge1xuICAgICAgICAgICAgcmVzdWx0ID0gYXJndW1lbnRzWzFdO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmIChpIGluIHNlbGYpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gc2VsZltpKytdO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCsraSA+PSBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcInJlZHVjZSBvZiBlbXB0eSBhcnJheSB3aXRoIG5vIGluaXRpYWwgdmFsdWVcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gZnVuLmNhbGwodm9pZCAwLCByZXN1bHQsIHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5yZWR1Y2VSaWdodCkge1xuICAgIEFycmF5LnByb3RvdHlwZS5yZWR1Y2VSaWdodCA9IGZ1bmN0aW9uIHJlZHVjZVJpZ2h0KGZ1biAvKiwgaW5pdGlhbCovKSB7XG4gICAgICAgIHZhciBvYmplY3QgPSB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgb2JqZWN0LFxuICAgICAgICAgICAgbGVuZ3RoID0gc2VsZi5sZW5ndGggPj4+IDA7XG4gICAgICAgIGlmIChfdG9TdHJpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoZnVuICsgXCIgaXMgbm90IGEgZnVuY3Rpb25cIik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFsZW5ndGggJiYgYXJndW1lbnRzLmxlbmd0aCA9PSAxKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwicmVkdWNlUmlnaHQgb2YgZW1wdHkgYXJyYXkgd2l0aCBubyBpbml0aWFsIHZhbHVlXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJlc3VsdCwgaSA9IGxlbmd0aCAtIDE7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID49IDIpIHtcbiAgICAgICAgICAgIHJlc3VsdCA9IGFyZ3VtZW50c1sxXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHNlbGZbaS0tXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgtLWkgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJyZWR1Y2VSaWdodCBvZiBlbXB0eSBhcnJheSB3aXRoIG5vIGluaXRpYWwgdmFsdWVcIik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7XG4gICAgICAgIH1cblxuICAgICAgICBkbyB7XG4gICAgICAgICAgICBpZiAoaSBpbiB0aGlzKSB7XG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gZnVuLmNhbGwodm9pZCAwLCByZXN1bHQsIHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gd2hpbGUgKGktLSk7XG5cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9O1xufVxuaWYgKCFBcnJheS5wcm90b3R5cGUuaW5kZXhPZiB8fCAoWzAsIDFdLmluZGV4T2YoMSwgMikgIT0gLTEpKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLmluZGV4T2YgPSBmdW5jdGlvbiBpbmRleE9mKHNvdWdodCAvKiwgZnJvbUluZGV4ICovICkge1xuICAgICAgICB2YXIgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwO1xuXG4gICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgaSA9IHRvSW50ZWdlcihhcmd1bWVudHNbMV0pO1xuICAgICAgICB9XG4gICAgICAgIGkgPSBpID49IDAgPyBpIDogTWF0aC5tYXgoMCwgbGVuZ3RoICsgaSk7XG4gICAgICAgIGZvciAoOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmIChpIGluIHNlbGYgJiYgc2VsZltpXSA9PT0gc291Z2h0KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIC0xO1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5sYXN0SW5kZXhPZiB8fCAoWzAsIDFdLmxhc3RJbmRleE9mKDAsIC0zKSAhPSAtMSkpIHtcbiAgICBBcnJheS5wcm90b3R5cGUubGFzdEluZGV4T2YgPSBmdW5jdGlvbiBsYXN0SW5kZXhPZihzb3VnaHQgLyosIGZyb21JbmRleCAqLykge1xuICAgICAgICB2YXIgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwO1xuXG4gICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGkgPSBsZW5ndGggLSAxO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgIGkgPSBNYXRoLm1pbihpLCB0b0ludGVnZXIoYXJndW1lbnRzWzFdKSk7XG4gICAgICAgIH1cbiAgICAgICAgaSA9IGkgPj0gMCA/IGkgOiBsZW5ndGggLSBNYXRoLmFicyhpKTtcbiAgICAgICAgZm9yICg7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmICYmIHNvdWdodCA9PT0gc2VsZltpXSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9O1xufVxuaWYgKCFPYmplY3QuZ2V0UHJvdG90eXBlT2YpIHtcbiAgICBPYmplY3QuZ2V0UHJvdG90eXBlT2YgPSBmdW5jdGlvbiBnZXRQcm90b3R5cGVPZihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIG9iamVjdC5fX3Byb3RvX18gfHwgKFxuICAgICAgICAgICAgb2JqZWN0LmNvbnN0cnVjdG9yID9cbiAgICAgICAgICAgIG9iamVjdC5jb25zdHJ1Y3Rvci5wcm90b3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1wdHkpXG4gICAgICAgICAgICAgICAgZW1wdHlbaV0gPSBudWxsO1xuICAgICAgICAgICAgZW1wdHkuY29uc3RydWN0b3IgPVxuICAgICAgICAgICAgZW1wdHkuaGFzT3duUHJvcGVydHkgPVxuICAgICAgICAgICAgZW1wdHkucHJvcGVydHlJc0VudW1lcmFibGUgPVxuICAgICAgICAgICAgZW1wdHkuaXNQcm90b3R5cGVPZiA9XG4gICAgICAgICAgICBlbXB0eS50b0xvY2FsZVN0cmluZyA9XG4gICAgICAgICAgICBlbXB0eS50b1N0cmluZyA9XG4gICAgICAgICAgICBlbXB0eS52YWx1ZU9mID1cbiAgICAgICAgICAgIGVtcHR5Ll9fcHJvdG9fXyA9IG51bGw7XG4gICAgICAgICAgICByZXR1cm4gZW1wdHk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBPYmplY3QuY3JlYXRlID0gZnVuY3Rpb24gY3JlYXRlKHByb3RvdHlwZSwgcHJvcGVydGllcykge1xuICAgICAgICB2YXIgb2JqZWN0O1xuICAgICAgICBpZiAocHJvdG90eXBlID09PSBudWxsKSB7XG4gICAgICAgICAgICBvYmplY3QgPSBjcmVhdGVFbXB0eSgpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBwcm90b3R5cGUgIT0gXCJvYmplY3RcIilcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwidHlwZW9mIHByb3RvdHlwZVtcIisodHlwZW9mIHByb3RvdHlwZSkrXCJdICE9ICdvYmplY3QnXCIpO1xuICAgICAgICAgICAgdmFyIFR5cGUgPSBmdW5jdGlvbiAoKSB7fTtcbiAgICAgICAgICAgIFR5cGUucHJvdG90eXBlID0gcHJvdG90eXBlO1xuICAgICAgICAgICAgb2JqZWN0ID0gbmV3IFR5cGUoKTtcbiAgICAgICAgICAgIG9iamVjdC5fX3Byb3RvX18gPSBwcm90b3R5cGU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgK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Y2ggKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChvd25zKGRlc2NyaXB0b3IsIFwidmFsdWVcIikpIHtcblxuICAgICAgICAgICAgaWYgKHN1cHBvcnRzQWNjZXNzb3JzICYmIChsb29rdXBHZXR0ZXIob2JqZWN0LCBwcm9wZXJ0eSkgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9va3VwU2V0dGVyKG9iamVjdCwgcHJvcGVydHkpKSlcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB2YXIgcHJvdG90eXBlID0gb2JqZWN0Ll9fcHJvdG9fXztcbiAgICAgICAgICAgICAgICBvYmplY3QuX19wcm90b19fID0gcHJvdG90eXBlT2ZPYmplY3Q7XG4gICAgICAgICAgICAgICAgZGVsZXRlIG9iamVjdFtwcm9wZXJ0eV07XG4gICAgICAgICAgICAgICAgb2JqZWN0W3Byb3BlcnR5XSA9IGRlc2NyaXB0b3IudmFsdWU7XG4gICAgICAgICAgICAgICAgb2JqZWN0Ll9fcHJvdG9fXyA9IHByb3RvdHlwZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgb2JqZWN0W3Byb3BlcnR5XSA9IGRlc2NyaXB0b3IudmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoIXN1cHBvcnRzQWNjZXNzb3JzKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRVJSX0FDQ0VTU09SU19OT1RfU1VQUE9SVEVEKTtcbiAgICAgICAgICAgIGlmIChvd25zKGRlc2NyaXB0b3IsIFwiZ2V0XCIpKVxuICAgICAgICAgICAgICAgIGRlZmluZUdldHRlcihvYmplY3QsIHByb3BlcnR5LCBkZXNjcmlwdG9yLmdldCk7XG4gICAgICAgICAgICBpZiAob3ducyhkZXNjcmlwdG9yLCBcInNldF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3QgPT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG9iamVjdDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZyZWV6ZU9iamVjdChvYmplY3QpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0pKE9iamVjdC5mcmVlemUpO1xufVxuaWYgKCFPYmplY3QucHJldmVudEV4dGVuc2lvbnMpIHtcbiAgICBPYmplY3QucHJldmVudEV4dGVuc2lvbnMgPSBmdW5jdGlvbiBwcmV2ZW50RXh0ZW5zaW9ucyhvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIG9iamVjdDtcbiAgICB9O1xufVxuaWYgKCFPYmplY3QuaXNTZWFsZWQpIHtcbiAgICBPYmplY3QuaXNTZWFsZWQgPSBmdW5jdGlvbiBpc1NlYWxlZChvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG59XG5pZiAoIU9iamVjdC5pc0Zyb3plbikge1xuICAgIE9iamVjdC5pc0Zyb3plbiA9IGZ1bmN0aW9uIGlzRnJvemVuKG9iamVjdCkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfTtcbn1cbmlmICghT2JqZWN0LmlzRXh0ZW5zaWJsZSkge1xuICAgIE9iamVjdC5pc0V4dGVuc2libGUgPSBmdW5jdGlvbiBpc0V4dGVuc2libGUob2JqZWN0KSB7XG4gICAgICAgIGlmIChPYmplY3Qob2JqZWN0KSA9PT0gb2JqZWN0KSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7IC8vIFRPRE8gbWVzc2FnZVxuICAgICAgICB9XG4gICAgICAgIHZhciBuYW1lID0gJyc7XG4gICAgICAgIHdoaWxlIChvd25zKG9iamVjdCwgbmFtZSkpIHtcbiAgICAgICAgICAgIG5hbWUgKz0gJz8nO1xuICAgICAgICB9XG4gICAgICAgIG9iamVjdFtuYW1lXSA9IHRydWU7XG4gICAgICAgIHZhciByZXR1cm5WYWx1ZSA9IG93bnMob2JqZWN0LCBuYW1lKTtcbiAgICAgICAgZGVsZXRlIG9iamVjdFtuYW1lXTtcbiAgICAgICAgcmV0dXJuIHJldHVyblZhbHVlO1xuICAgIH07XG59XG5pZiAoIU9iamVjdC5rZXlzKSB7XG4gICAgdmFyIGhhc0RvbnRFbnVtQnVnID0gdHJ1ZSxcbiAgICAgICAgZG9udEVudW1zID0gW1xuICAgICAgICAgICAgXCJ0b1N0cmluZ1wiLFxuICAgICAgICAgICAgXCJ0b0xvY2FsZVN0cmluZ1wiLFxuICAgICAgICAgICAgXCJ2YWx1ZU9mXCIsXG4gICAgICAgICAgICBcImhhc093blByb3BlcnR5XCIsXG4gICAgICAgICAgICBcImlzUHJvdG90eXBlT2ZcIixcbiAgICAgICAgICAgIFwicHJvcGVydHlJc0VudW1lcmFibGVcIixcbiAgICAgICAgICAgIFwiY29uc3RydWN0b3JcIlxuICAgICAgICBdLFxuICAgICAgICBkb250RW51bXNMZW5ndGggPSBkb250RW51bXMubGVuZ3RoO1xuXG4gICAgZm9yICh2YXIga2V5IGluIHtcInRvU3RyaW5nXCI6IG51bGx9KSB7XG4gICAgICAgIGhhc0RvbnRFbnVtQnVnID0gZmFsc2U7XG4gICAgfVxuXG4gICAgT2JqZWN0LmtleXMgPSBmdW5jdGlvbiBrZXlzKG9iamVjdCkge1xuXG4gICAgICAgIGlmIChcbiAgICAgICAgICAgICh0eXBlb2Ygb2JqZWN0ICE9IFwib2JqZWN0XCIgJiYgdHlwZW9mIG9iamVjdCAhPSBcImZ1bmN0aW9uXCIpIHx8XG4gICAgICAgICAgICBvYmplY3QgPT09IG51bGxcbiAgICAgICAgKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwiT2JqZWN0LmtleXMgY2FsbGVkIG9uIGEgbm9uLW9iamVjdFwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBrZXlzID0gW107XG4gICAgICAgIGZvciAodmFyIG5hbWUgaW4gb2JqZWN0KSB7XG4gICAgICAgICAgICBpZiAob3ducyhvYmplY3QsIG5hbWUpKSB7XG4gICAgICAgICAgICAgICAga2V5cy5wdXNoKG5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGhhc0RvbnRFbnVtQnVnKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgaWkgPSBkb250RW51bXNMZW5ndGg7IGkgPCBpaTsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRvbnRFbnVtID0gZG9udEVudW1zW2ldO1xuICAgICAgICAgICAgICAgIGlmIChvd25zKG9iamVjdCwgZG9udEVudW0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGtleXMucHVzaChkb250RW51bSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBrZXlzO1xuICAgIH07XG5cbn1cbmlmICghRGF0ZS5ub3cpIHtcbiAgICBEYXRlLm5vdyA9IGZ1bmN0aW9uIG5vdygpIHtcbiAgICAgICAgcmV0dXJuIG5ldyBEYXRlKCkuZ2V0VGltZSgpO1xuICAgIH07XG59XG52YXIgd3MgPSBcIlxceDA5XFx4MEFcXHgwQlxceDBDXFx4MERcXHgyMFxceEEwXFx1MTY4MFxcdTE4MEVcXHUyMDAwXFx1MjAwMVxcdTIwMDJcXHUyMDAzXCIgK1xuICAgIFwiXFx1MjAwNFxcdTIwMDVcXHUyMDA2XFx1MjAwN1xcdTIwMDhcXHUyMDA5XFx1MjAwQVxcdTIwMkZcXHUyMDVGXFx1MzAwMFxcdTIwMjhcIiArXG4gICAgXCJcXHUyMDI5XFx1RkVGRlwiO1xuaWYgKCFTdHJpbmcucHJvdG90eXBlLnRyaW0gfHwgd3MudHJpbSgpKSB7XG4gICAgd3MgPSBcIltcIiArIHdzICsgXCJdXCI7XG4gICAgdmFyIHRyaW1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TU9ESUZJRVJfS0VZUzoge1xuICAgICAgICAgICAgMTY6ICdTaGlmdCcsIDE3OiAnQ3RybCcsIDE4OiAnQWx0JywgMjI0OiAnTWV0YSdcbiAgICAgICAgfSxcblxuICAgICAgICBLRVlfTU9EUzoge1xuICAgICAgICAgICAgXCJjdHJsXCI6IDEsIFwiYWx0XCI6IDIsIFwib3B0aW9uXCIgOiAyLCBcInNoaWZ0XCI6IDQsXG4gICAgICAgICAgICBcInN1cGVyXCI6IDgsIFwibWV0YVwiOiA4LCBcImNvbW1hbmRcIjogOCwgXCJjbWRcIjogOFxuICAgICAgICB9LFxuXG4gICAgICAgIEZVTkNUSU9OX0tFWVMgOiB7XG4gICAgICAgICAgICA4ICA6IFwiQmFja3NwYWNlXCIsXG4gICAgICAgICAgICA5ICA6IFwiVGFiXCIsXG4gICAgICAgICAgICAxMyA6IFwiUmV0dXJuXCIsXG4gICAgICAgICAgICAxOSA6IFwiUGF1c2VcIixcbiAgICAgICAgICAgIDI3IDogXCJFc2NcIixcbiAgICAgICAgICAgIDMyIDogXCJTcGFjZVwiLFxuICAgICAgICAgICAgMzMgOiBcIlBhZ2VVcFwiLFxuICAgICAgICAgICAgMzQgOiBcIlBhZ2VEb3duXCIsXG4gICAgICAgICAgICAzNSA6IFwiRW5kXCIsXG4gICAgICAgICAgICAzNiA6IFwiSG9tZVwiLFxuICAgICAgICAgICAgMzcgOiBcIkxlZnRcIixcbiAgICAgICAgICAgIDM4IDogXCJVcFwiLFxuICAgICAgICAgICAgMzkgOiBcIlJpZ2h0XCIsXG4gICAgICAgICAgICA0MCA6IFwiRG93blwiLFxuICAgICAgICAgICAgNDQgOiBcIlByaW50XCIsXG4gICAgICAgICAgICA0NSA6IFwiSW5zZXJ0XCIsXG4gICAgICAgICAgICA0NiA6IFwiRGVsZXRlXCIsXG4gICAgICAgICAgICA5NiA6IFwiTnVtcGFkMFwiLFxuICAgICAgICAgICAgOTcgOiBcIk51bXBhZDFcIixcbiAgICAgICAgICAgIDk4IDogXCJOdW1wYWQyXCIsXG4gICAgICAgICAgICA5OSA6IFwiTnVtcGFkM1wiLFxuICAgICAgICAgICAgMTAwOiBcIk51bXBhZDRcIixcbiAgICAgICAgICAgIDEwMTogXCJOdW1wYWQ1XCIsXG4gICAgICAgICAgICAxMDI6IFwiTnVtcGFkNlwiLFxuICAgICAgICAgICAgMTAzOiBcIk51bXBhZDdcIixcbiAgICAgICAgICAgIDEwNDogXCJOdW1wYWQ4XCIsXG4gICAgICAgICAgICAxMDU6IFwiTnVtcGFkOVwiLFxuICAgICAgICAgICAgJy0xMyc6IFwiTnVtcGFkRW50ZXJcIixcbiAgICAgICAgICAgIDExMjogXCJGMVwiLFxuICAgICAgICAgICAgMTEzOiBcIkYyXCIsXG4gICAgICAgICAgICAxMTQ6IFwiRjNcIixcbiAgICAgICAgICAgIDExNTogXCJGNFwiLFxuICAgICAgICAgICAgMTE2OiBcIkY1XCIsXG4gICAgICAgICAgICAxMTc6IFwiRjZcIixcbiAgICAgICAgICAgIDExODogXCJGN1wiLFxuICAgICAgICAgICAgMTE5OiBcIkY4XCIsXG4gICAgICAgICAgICAxMjA6IFwiRjlcIixcbiAgICAgICAgICAgIDEyMTogXCJGMTBcIixcbiAgICAgICAgICAgIDEyMjogXCJGMTFcIixcbiAgICAgICAgICAgIDEyMzogXCJGMTJcIixcbiAgICAgICAgICAgIDE0NDogXCJOdW1sb2NrXCIsXG4gICAgICAgICAgICAxNDU6IFwiU2Nyb2xsbG9ja1wiXG4gICAgICAgIH0sXG5cbiAgICAgICAgUFJJTlRBQkxFX0tFWVM6IHtcbiAgICAgICAgICAgMzI6ICcgJywgIDQ4OiAnMCcsICA0OTogJzEnLCAgNTA6ICcyJywgIDUxOiAnMycsICA1MjogJzQnLCA1MzogICc1JyxcbiAgICAgICAgICAgNTQ6ICc2JywgIDU1OiAnNycsICA1NjogJzgnLCAgNTc6ICc5JywgIDU5OiAnOycsICA2MTogJz0nLCA2NTogICdhJyxcbiAgICAgICAgICAgNjY6ICdiJywgIDY3OiAnYycsICA2ODogJ2QnLCAgNjk6ICdlJywgIDcwOiAnZicsICA3MTogJ2cnLCA3MjogICdoJyxcbiAgICAgICAgICAgNzM6ICdpJywgIDc0OiAnaicsICA3NTogJ2snLCAgNzY6ICdsJywgIDc3OiAnbScsICA3ODogJ24nLCA3OTogICdvJyxcbiAgICAgICAgICAgODA6ICdwJywgIDgxOiAncScsICA4MjogJ3InLCAgODM6ICdzJywgIDg0OiAndCcsICA4NTogJ3UnLCA4NjogICd2JyxcbiAgICAgICAgICAgODc6ICd3JywgIDg4OiAneCcsICA4OTogJ3knLCAgOTA6ICd6JywgMTA3OiAnKycsIDEwOTogJy0nLCAxMTA6ICcuJyxcbiAgICAgICAgICAxODY6ICc7JywgMTg3OiAnPScsIDE4ODogJywnLCAxODk6ICctJywgMTkwOiAnLicsIDE5MTogJy8nLCAxOTI6ICdgJyxcbiAgICAgICAgICAyMTk6ICdbJywgMjIwOiAnXFxcXCcsMjIxOiAnXScsIDIyMjogXCInXCIsIDExMTogJy8nLCAxMDY6ICcqJ1xuICAgICAgICB9XG4gICAgfTtcbiAgICB2YXIgbmFtZSwgaTtcbiAgICBmb3IgKGkgaW4gcmV0LkZVTkNUSU9OX0tFWVMpIHtcbiAgICAgICAgbmFtZSA9IHJldC5GVU5DVElPTl9LRVlTW2ldLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIHJldFtuYW1lXSA9IHBhcnNlSW50KGksIDEwKTtcbiAgICB9XG4gICAgZm9yIChpIGluIHJldC5QUklOVEFCTEVfS0VZUykge1xuICAgICAgICBuYW1lID0gcmV0LlBSSU5UQUJMRV9LRVlTW2ldLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIHJldFtuYW1lXSA9IHBhcnNlSW50KGksIDEwKTtcbiAgICB9XG4gICAgb29wLm1peGluKHJldCwgcmV0Lk1PRElGSUVSX0tFWVMpO1xuICAgIG9vcC5taXhpbihyZXQsIHJldC5QUklOVEFCTEVfS0VZUyk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W5jdGlvbihlbCwgY2FsbGJhY2spIHtcbiAgICBpZiAoXCJvbm1vdXNld2hlZWxcIiBpbiBlbCkge1xuICAgICAgICBleHBvcnRzLmFkZExpc3RlbmVyKGVsLCBcIm1vdXNld2hlZWxcIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgdmFyIGZhY3RvciA9IDg7XG4gICAgICAgICAgICBpZiAoZS53aGVlbERlbHRhWCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgZS53aGVlbFggPSAtZS53aGVlbERlbHRhWCAvIGZhY3RvcjtcbiAgICAgICAgICAgICAgICBlLndoZWVsWSA9IC1lLndoZWVsRGVsdGFZIC8gZmFjdG9yO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlLndoZWVsWCA9IDA7XG4gICAgICAgICAgICAgICAgZS53aGVlbFkgPSAtZS53aGVlbERlbHRhIC8gZmFjdG9yO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FsbGJhY2soZSk7XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSBpZiAoXCJvbndoZWVsXCIgaW4gZWwpIHtcbiAgICAgICAgZXhwb3J0cy5hZGRMaXN0ZW5lcihlbCwgXCJ3aGVlbFwiLCAgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgdmFyIGZhY3RvciA9IDAuMzU7XG4gICAgICAgICAgICBzd2l0Y2ggKGUuZGVsdGFNb2RlKSB7XG4gICAgICAgICAgICAgICAgY2FzZSBlLkRPTV9ERUxUQV9QSVhFTDpcbiAgICAgICAgICAgICAgICAgICAgZS53aGVlbFggPSBlLmRlbHRhWCAqIGZhY3RvciB8fCAwO1xuICAgICAgICAgICAgICAgICAgICBlLndoZWVsWSA9IGUuZGVsdGFZICogZmFjdG9yIHx8IDA7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgZS5ET01fREVMVEFfTElORTpcbiAgICAgICAgICAgICAgICBjYXNlIGUuRE9NX0RFTFRBX1BBR0U6XG4gICAgICAgICAgICAgICAgICAgIGUud2hlZWxYID0gKGUuZGVsdGFYIHx8IDApICogNTtcbiAgICAgICAgICAgICAgICAgICAgZS53aGVlbFkgPSAoZS5kZWx0YVkgfHwgMCkgKiA1O1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgY2FsbGJhY2soZSk7XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGV4cG9ydHMuYWRkTGlzdGVuZXIoZWwsIFwiRE9NTW91c2VTY3JvbGxcIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgaWYgKGUuYXhpcyAmJiBlLmF4aXMgPT0gZS5IT1JJWk9OVEFMX0FYSVMpIHtcbiAgICAgICAgICAgICAgICBlLndoZWVsWCA9IChlLmRldGFpbCB8fCAwKSAqIDU7XG4gICAgICAgICAgICAgICAgZS53aGVlbFkgPSAwO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBlLndoZWVsWCA9IDA7XG4gICAgICAgICAgICAgICAgZS53aGVlbFkgPSAoZS5kZXRhaWwgfHwgMCkgKiA1O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FsbGJhY2soZSk7XG4gICAgICAgIH0pO1xuICAgIH1cbn07XG5cbmV4cG9ydHMuYWRkTXVsdGlNb3VzZURvd25MaXN0ZW5lciA9IGZ1bmN0aW9uKGVsZW1lbnRzLCB0aW1lb3V0cywgZXZlbnRIYW5kbGVyLCBjYWxsYmFja05hbWUpIHtcbiAgICB2YXIgY2xpY2tzID0gMDtcbiAgICB2YXIgc3RhcnRYLCBzdGFydFksIHRpbWVyOyBcbiAgICB2YXIgZXZlbnROYW1lcyA9IHtcbiAgICAgICAgMjogXCJkYmxjbGlja1wiLFxuICAgICAgICAzOiBcInRyaXBsZWNsaWNrXCIsXG4gICAgICAgIDQ6IFwicXVhZGNsaWNrXCJcbiAgICB9O1xuXG4gICAgZnVuY3Rpb24gb25Nb3VzZWRvd24oZSkge1xuICAgICAgICBpZiAoZXhwb3J0cy5nZXRCdXR0b24oZSkgIT09IDApIHtcbiAgICAgICAgICAgIGNsaWNrcyA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAoZS5kZXRhaWwgPiAxKSB7XG4gICAgICAgICAgICBjbGlja3MrKztcbiAgICAgICAgICAgIGlmIChjbGlja3MgPiA0KVxuICAgICAgICAgICAgICAgIGNsaWNrcyA9IDE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjbGlja3MgPSAxO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1c2VyYWdlbnQuaXNJRSkge1xuICAgICAgICAgICAgdmFyIGlzTmV3Q2xpY2sgPSBNYXRoLmFicyhlLmNsaWVudFggLSBzdGFydFgpID4gNSB8fCBNYXRoLmFicyhlLmNsaWVudFkgLSBzdGFydFkpID4gNTtcbiAgICAgICAgICAgIGlmICghdGltZXIgfHwgaXNOZXdDbGljaylcbiAgICAgICAgICAgICAgICBjbGlja3MgPSAxO1xuICAgICAgICAgICAgaWYgKHRpbWVyKVxuICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcik7XG4gICAgICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7dGltZXIgPSBudWxsO30sIHRpbWVvdXRzW2NsaWNrcyAtIDFdIHx8IDYwMCk7XG5cbiAgICAgICAgICAgIGlmIChjbGlja3MgPT0gMSkge1xuICAgICAgICAgICAgICAgIHN0YXJ0WCA9IGUuY2xpZW50WDtcbiAgICAgICAgICAgICAgICBzdGFydFkgPSBlLmNsaWVudFk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIGUuX2NsaWNrcyA9IGNsaWNrcztcblxuICAgICAgICBldmVudEhhbmRsZXJbY2FsbGJhY2tOYW1lXShcIm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JvYXJkRXZlbnRcIiBpbiB3aW5kb3cpXG4gICAgPyBmdW5jdGlvbihlKSB7XG4gICAgICAgIHJldHVybiAwIHwgKGUubWV0YUtleSA/IDEgOiAwKSB8IChlLmFsdEtleSA/IDIgOiAwKSB8IChlLnNoaWZ0S2V5ID8gNCA6IDApIHwgKGUuY3RybEtleSA/IDggOiAwKTtcbiAgICB9XG4gICAgOiBmdW5jdGlvbihlKSB7XG4gICAgICAgIHJldHVybiAwIHwgKGUuY3RybEtleSA/IDEgOiAwKSB8IChlLmFsdEtleSA/IDIgOiAwKSB8IChlLnNoaWZ0S2V5ID8gNCA6IDApIHwgKGUubWV0YUtleSA/IDggOiAwKTtcbiAgICB9O1xuXG5leHBvcnRzLmdldE1vZGlmaWVyU3RyaW5nID0gZnVuY3Rpb24oZSkge1xuICAgIHJldHVybiBrZXlzLktFWV9NT0RTW2dldE1vZGlmaWVySGFzaChlKV07XG59O1xuXG5mdW5jdGlvbiBub3JtYWxpemVDb21tYW5kS2V5cyhjYWxsYmFjaywgZSwga2V5Q29kZSkge1xuICAgIHZhciBoYXNoSWQgPSBnZXRNb2RpZmllckhhc2goZSk7XG5cbiAgICBpZiAoIXVzZXJhZ2VudC5pc01hYyAmJiBwcmVzc2VkS2V5cykge1xuICAgICAgICBpZiAoZS5nZXRNb2RpZmllclN0YXRlICYmIChlLmdldE1vZGlmaWVyU3RhdGUoXCJPU1wiKSB8fCBlLmdldE1vZGlmaWVyU3RhdGUoXCJXaW5cIikpKVxuICAgICAgICAgICAgaGFzaElkIHw9IDg7XG4gICAgICAgIGlmIChwcmVzc2VkS2V5cy5hbHRHcikge1xuICAgICAgICAgICAgaWYgKCgzICYgaGFzaElkKSAhPSAzKVxuICAgICAgICAgICAgICAgIHByZXNzZWRLZXlzLmFsdEdyID0gMDtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGtleUNvZGUgPT09IDE4IHx8IGtleUNvZGUgPT09IDE3KSB7XG4gICAgICAgICAgICB2YXIgbG9jYXRpb24gPSBcImxvY2F0aW9uXCIgaW4gZSA/IGUubG9jYXRpb24gOiBlLmtleUxvY2F0aW9uO1xuICAgICAgICAgICAgaWYgKGtleUNvZGUgPT09IDE3ICYmIGxvY2F0aW9uID09PSAxKSB7XG4gICAgICAgICAgICAgICAgaWYgKHByZXNzZWRLZXlzW2tleUNvZGVdID09IDEpXG4gICAgICAgICAgICAgICAgICAgIHRzID0gZS50aW1lU3RhbXA7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGtleUNvZGUgPT09IDE4ICYmIGhhc2hJZCA9PT0gMyAmJiBsb2NhdGlvbiA9PT0gMikge1xuICAgICAgICAgICAgICAgIHZhciBkdCA9IGUudGltZVN0YW1wIC0gdHM7XG4gICAgICAgICAgICAgICAgaWYgKGR0IDwgNTApXG4gICAgICAgICAgICAgICAgICAgIHByZXNzZWRLZXlzLmFsdEdyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBcbiAgICBpZiAoa2V5Q29kZSBpbiBrZXlzLk1PRElGSUVSX0tFWVMpIHtcbiAgICAgICAga2V5Q29kZSA9IC0xO1xuICAgIH1cbiAgICBpZiAoaGFzaElkICYgOCAmJiAoa2V5Q29kZSA+PSA5MSAmJiBrZXlDb2RlIDw9IDkzKSkge1xuICAgICAgICBrZXlDb2RlID0gLTE7XG4gICAgfVxuICAgIFxuICAgIGlmICghaGFzaElkICYmIGtleUNvZGUgPT09IDEzKSB7XG4gICAgICAgIHZhciBsb2NhdGlvbiA9IFwibG9jYXRpb25cIiBpbiBlID8gZS5sb2NhdGlvbiA6IGUua2V5TG9jYXRpb247XG4gICAgICAgIGlmIChsb2NhdGlvbiA9PT0gMykge1xuICAgICAgICAgICAgY2FsbGJhY2soZSwgaGFzaElkLCAta2V5Q29kZSk7XG4gICAgICAgICAgICBpZiAoZS5kZWZhdWx0UHJldmVudGVkKVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgIH1cbiAgICBcbiAgICBpZiAodXNlcmFnZW50LmlzQ2hyb21lT1MgJiYgaGFzaElkICYgOCkge1xuICAgICAgICBjYWxsYmFjayhlLCBoYXNoSWQsIGtleUNvZGUpO1xuICAgICAgICBpZiAoZS5kZWZhdWx0UHJldmVudGVkKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICBoYXNoSWQgJj0gfjg7XG4gICAgfVxuICAgIGlmICghaGFzaElkICYmICEoa2V5Q29kZSBpbiBrZXlzLkZVTkNUSU9OX0tFWVMpICYmICEoa2V5Q29kZSBpbiBrZXlzLlBSSU5UQUJMRV9LRVlTKSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuICAgIFxuICAgIHJldHVybiBjYWxsYmFjayhlLCBoYXNoSWQsIGtleUNvZGUpO1xufVxuXG5cbmV4cG9ydHMuYWRkQ29tbWFuZEtleUxpc3RlbmVyID0gZnVuY3Rpb24oZWwsIGNhbGxiYWNrKSB7XG4gICAgdmFyIGFkZExpc3RlbmVyID0gZXhwb3J0cy5hZGRMaXN0ZW5lcjtcbiAgICBpZiAodXNlcmFnZW50LmlzT2xkR2Vja28gfHwgKHVzZXJhZ2VudC5pc09wZXJhICYmICEoXCJLZXlib2FyZEV2ZW50XCIgaW4gd2luZG93KSkpIHtcbiAgICAgICAgdmFyIGxhc3RLZXlEb3duS2V5Q29kZSA9IG51bGw7XG4gICAgICAgIGFkZExpc3RlbmVyKGVsLCBcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgbGFzdEtleURvd25LZXlDb2RlID0gZS5rZXlDb2RlO1xuICAgICAgICB9KTtcbiAgICAgICAgYWRkTGlzdGVuZXIoZWwsIFwia2V5cHJlc3NcIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgcmV0dXJuIG5vcm1hbGl6ZUNvbW1hbmRLZXlzKGNhbGxiYWNrLCBlLCBsYXN0S2V5RG93bktleUNvZGUpO1xuICAgICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgbGFzdERlZmF1bHRQcmV2ZW50ZWQgPSBudWxsO1xuXG4gICAgICAgIGFkZExpc3RlbmVyKGVsLCBcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgcHJlc3NlZEtleXNbZS5rZXlDb2RlXSA9IChwcmVzc2VkS2V5c1tlLmtleUNvZGVdIHx8IDApICsgMTtcbiAgICAgICAgICAgIHZhciByZXN1bHQgPSBub3JtYWxpemVDb21tYW5kS2V5cyhjYWxsYmFjaywgZSwgZS5rZXlDb2RlKTtcbiAgICAgICAgICAgIGxhc3REZWZhdWx0UHJldmVudGVkID0gZS5kZWZhdWx0UHJldmVudGVkO1xuICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgYWRkTGlzdGVuZXIoZWwsIFwia2V5cHJlc3NcIiwgZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgaWYgKGxhc3REZWZhdWx0UHJldmVudGVkICYmIChlLmN0cmxLZXkgfHwgZS5hbHRLZXkgfHwgZS5zaGlmdEtleSB8fCBlLm1ldGFLZXkpKSB7XG4gICAgICAgICAgICAgICAgZXhwb3J0cy5zdG9wRXZlbnQoZSk7XG4gICAgICAgICAgICAgICAgbGFzdERlZmF1bHRQcmV2ZW50ZWQgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBhZGRMaXN0ZW5lcihlbCwgXCJrZXl1cFwiLCBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICBwcmVzc2VkS2V5c1tlLmtleUNvZGVdID0gbnVsbDtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKCFwcmVzc2VkS2V5cykge1xuICAgICAgICAgICAgcmVzZXRQcmVzc2VkS2V5cygpO1xuICAgICAg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G4gICAgaWYgKHR5cGVvZiBvYmogIT09IFwib2JqZWN0XCIgfHwgIW9iailcbiAgICAgICAgcmV0dXJuIG9iajtcbiAgICB2YXIgY29weTtcbiAgICBpZiAoQXJyYXkuaXNBcnJheShvYmopKSB7XG4gICAgICAgIGNvcHkgPSBbXTtcbiAgICAgICAgZm9yICh2YXIga2V5ID0gMDsga2V5IDwgb2JqLmxlbmd0aDsga2V5KyspIHtcbiAgICAgICAgICAgIGNvcHlba2V5XSA9IGRlZXBDb3B5KG9ialtrZXldKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gY29weTtcbiAgICB9XG4gICAgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChvYmopICE9PSBcIltvYmplY3QgT2JqZWN0XVwiKVxuICAgICAgICByZXR1cm4gb2JqO1xuICAgIFxuICAgIGNvcHkgPSB7fTtcbiAgICBmb3IgKHZhciBrZXkgaW4gb2JqKVxuICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7XG4gICAgcmV0dXJuIGNvcHk7XG59O1xuXG5leHBvcnRzLmFycmF5VG9NYXAgPSBmdW5jdGlvbihhcnIpIHtcbiAgICB2YXIgbWFwID0ge307XG4gICAgZm9yICh2YXIgaT0wOyBpPGFyci5sZW5ndGg7IGkrKykge1xuICAgICAgICBtYXBbYXJyW2ldXSA9IDE7XG4gICAgfVxuICAgIHJldHVybiBtYXA7XG5cbn07XG5cbmV4cG9ydHMuY3JlYXRlTWFwID0gZnVuY3Rpb24ocHJvcHMpIHtcbiAgICB2YXIgbWFwID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICBmb3IgKHZhciBpIGluIHByb3BzKSB7XG4gICAgICAgIG1hcFtpXSA9IHByb3BzW2ldO1xuICAgIH1cbiAgICByZXR1cm4gbWFwO1xufTtcbmV4cG9ydHMuYXJyYXlSZW1vdmUgPSBmdW5jdGlvbihhcnJheSwgdmFsdWUpIHtcbiAgZm9yICh2Y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29udGV4dE1lbnUgPSBmYWxzZTtcblxuICAgIHZhciBzZW5kVGV4dCA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgaWYgKHRleHQuc2VsZWN0aW9uU3RhcnQgPT09IDQgJiYgdGV4dC5zZWxlY3Rpb25FbmQgPT09IDUpIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlucHV0SGFuZGxlcikge1xuICAgICAgICAgICAgZGF0YSA9IGlucHV0SGFuZGxlcihkYXRhKTtcbiAgICAgICAgICAgIGlucHV0SGFuZGxlciA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHBhc3RlZCkge1xuICAgICAgICAgICAgcmVzZXRTZWxlY3Rpb24oKTtcbiAgICAgICAgICAgIGlmIChkYXRhKVxuICAgICAgICAgICAgICAgIGhvc3Qub25QYXN0ZShkYXRhKTtcbiAgICAgICAgICAgIHBhc3RlZCA9IGZhbHNlO1xuICAgICAgICB9IGVsc2UgaWYgKGRhdGEgPT0gUExBQ0VIT0xERVIuc3Vic3RyKDApICYmIHRleHQuc2VsZWN0aW9uU3RhcnQgPT09IDQpIHtcbiAgICAgICAgICAgIGlmIChhZnRlckNvbnRleHRNZW51KVxuICAgICAgICAgICAgICAgIGhvc3QuZXhlY0NvbW1hbmQoXCJkZWxcIiwge3NvdXJjZTogXCJhY2VcIn0pO1xuICAgICAgICAgICAgZWxzZSAvLyBzb21lIHZlcnNpb25zIG9mIGFuZHJvaWQgZG8gbm90IGZpcmUga2V5ZG93biB3aGVuIHByZXNzaW5nIGJhY2tzcGFjZVxuICAgICAgICAgICAgICAgIGhvc3QuZXhlY0NvbW1hbmQoXCJiYWNrc3BhY2VcIiwge3NvdXJjZTogXCJhY2VcIn0pO1xuICAgICAgICB9IGVsc2UgaWYgKCFjb3BpZWQpIHtcbiAgICAgICAgICAgIGlmIChkYXRhLnN1YnN0cmluZygwLCA5KSA9PSBQTEFDRUhPTERFUiAmJiBkYXRh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ZERhdGEoZSwgZGF0YSkpIHtcbiAgICAgICAgICAgIGlmICh1c2VyYWdlbnQuaXNJT1MpIHtcbiAgICAgICAgICAgICAgICBjdXQgPSBpc0N1dDtcbiAgICAgICAgICAgICAgICB0ZXh0LnZhbHVlID0gXCJcXG4gYWFcIiArIGRhdGEgKyBcImEgYVxcblwiO1xuICAgICAgICAgICAgICAgIHRleHQuc2V0U2VsZWN0aW9uUmFuZ2UoNCwgNCArIGRhdGEubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBjb3BpZWQgPSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBkYXRhXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlzQ3V0ID8gaG9zdC5vbkN1dCgpIDogaG9zdC5vbkNvcHkoKTtcbiAgICAgICAgICAgIGlmICghdXNlcmFnZW50LmlzSU9TKSBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvcGllZCA9IHRydWU7XG4gICAgICAgICAgICB0ZXh0LnZhbHVlID0gZGF0YTtcbiAgICAgICAgICAgIHRleHQuc2VsZWN0KCk7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICAgICAgY29waWVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgIHJlc2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgICAgaXNDdXQgPyBob3N0Lm9uQ3V0KCkgOiBob3N0Lm9uQ29weSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdmFyIG9uQ3V0ID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBkb0NvcHkoZSwgdHJ1ZSk7XG4gICAgfTtcblxuICAgIHZhciBvbkNvcHkgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGRvQ29weShlLCBmYWxzZSk7XG4gICAgfTtcblxuICAgIHZhciBvblBhc3RlID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB2YXIgZGF0YSA9IGhhbmRsZUNsaXBib2FyZERhdGEoZSk7XG4gICAgICAgIGlmICh0eXBlb2YgZGF0YSA9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICBpZiAoZGF0YSlcbiAgICAgICAgICAgICAgICBob3N0Lm9uUGFzdGUoZGF0YSwgZSk7XG4gICAgICAgICAgICBpZiAodXNlcmFnZW50LmlzSUUpXG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChyZXNldFNlbGVjdGlvbik7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRleHQudmFsdWUgPSBcIlwiO1xuICAgICAgICAgICAgcGFzdGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBldmVudC5hZGRDb21tYW5kS2V5TGlzdGVuZXIodGV4dCwgaG9zdC5vbkNvbW1hbmRLZXkuYmluZChob3N0KSk7XG5cbiAgICBldmVudC5hZGRMaXN0ZW5lcih0ZXh0LCBcInNlbGVjdFwiLCBvblNlbGVjdCk7XG5cbiAgICBldmVudC5hZGRMaXN0ZW5lcih0ZXh0LCBcImlucHV0XCIsIG9uSW5wdXQpO1xuXG4gICAgZXZlbnQuYWRkTGlzdGVuZXIodGV4dCwgXCJjdXRcIiwgb25DdXQpO1xuICAgIGV2ZW50LmFkZExpc3RlbmVyKHRleHQsIFwiY29weVwiLCBvbkNvcHkpO1xuICAgIGV2ZW50LmFkZExpc3RlbmVyKHRleHQsIFwicGFzdGVcIiwgb25QYXN0ZSk7XG4gICAgdmFyIG9uQ29tcG9zaXRpb25TdGFydCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKGluQ29tcG9zaXRpb24gfHwgIWhvc3Qub25Db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W9uLmxhc3RWYWx1ZSlcbiAgICAgICAgICAgIGhvc3QudW5kbygpO1xuICAgICAgICBpZiAoaW5Db21wb3NpdGlvbi5jYW5VbmRvKVxuICAgICAgICAgICAgaW5Db21wb3NpdGlvbi5sYXN0VmFsdWUgPSB2YWw7XG4gICAgICAgIGlmIChpbkNvbXBvc2l0aW9uLmxhc3RWYWx1ZSkge1xuICAgICAgICAgICAgdmFyIHIgPSBob3N0LnNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgaG9zdC5pbnNlcnQoaW5Db21wb3NpdGlvbi5sYXN0VmFsdWUpO1xuICAgICAgICAgICAgaG9zdC5zZXNzaW9uLm1hcmtVbmRvR3JvdXAoKTtcbiAgICAgICAgICAgIGluQ29tcG9zaXRpb24ucmFuZ2UgPSBob3N0LnNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgaG9zdC5zZWxlY3Rpb24uc2V0UmFuZ2Uocik7XG4gICAgICAgICAgICBob3N0LnNlbGVjdGlvbi5jbGVhclNlbGVjdGlvbigpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBvbkNvbXBvc2l0aW9uRW5kID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBpZiAoIWhvc3Qub25Db21wb3NpdGlvbkVuZCB8fCBob3N0LiRyZWFkT25seSkgcmV0dXJuO1xuICAgICAgICB2YXIgYyA9IGluQ29tcG9zaXRpb247XG4gICAgICAgIGluQ29tcG9zaXRpb24gPSBmYWxzZTtcbiAgICAgICAgdmFyIHRpbWVyID0gc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHRpbWVyID0gbnVsbDtcbiAgICAgICAgICAgIHZhciBzdHIgPSB0ZXh0LnZhbHVlLnJlcGxhY2UoL1xceDAxL2csIFwiXCIpO1xuICAgICAgICAgICAgaWYgKGluQ29tcG9zaXRpb24pXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgZWxzZSBpZiAoc3RyID09IGMubGFzdFZhbHVlKVxuICAgICAgICAgICAgICAgIHJlc2V0VmFsdWUoKTtcbiAgICAgICAgICAgIGVsc2UgaWYgKCFjLmxhc3RWYWx1ZSAmJiBzdHIpIHtcbiAgICAgICAgICAgICAgICByZXNldFZhbHVlKCk7XG4gICAgICAgICAgICAgICAgc2VuZFRleHQoc3RyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlucHV0SGFuZGxlciA9IGZ1bmN0aW9uIGNvbXBvc2l0aW9uSW5wdXRIYW5kbGVyKHN0cikge1xuICAgICAgICAgICAgaWYgKHRpbWVyKVxuICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aW1lcik7XG4gICAgICAgICAgICBzdHIgPSBzdHIucmVwbGFjZSgvXFx4MDEvZywgXCJcIik7XG4gICAgICAgICAgICBpZiAoc3RyID09IGMubGFzdFZhbHVlKVxuICAgICAgICAgICAgICAgIHJldHVybiBcIlwiO1xuICAgICAgICAgICAgaWYgKGMubGFzdFZhbHVlICYmIHRpbWVyKVxuICAgICAgICAgICAgICAgIGhvc3QudW5kbygpO1xuICAgICAgICAgICAgcmV0dXJuIHN0cjtcbiAgICAgICAgfTtcbiAgICAgICAgaG9zdC5vbkNvbXBvc2l0aW9uRW5kKCk7XG4gICAgICAgIGhvc3QucmVtb3ZlTGlzdGVuZXIoXCJtb3VzZWRvd25cIiwgb25Db21wb3NpdGlvbkVuZCk7XG4gICAgICAgIGlmIChlLnR5cGUgPT0gXCJjb21wb3NpdGlvbmVuZFwiICYmIGMucmFuZ2UpIHtcbiAgICAgICAgICAgIGhvc3Quc2VsZWN0aW9uLnNldFJhbmdlKGMucmFuZ2UpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBuZWVkc09uSW5wdXQgPVxuICAgICAgICAgICAgKCEhdXNlcmFnZW50LmlzQ2hyb21lICYmIHVzZXJhZ2VudC5pc0Nocm9tZSA+PSA1MykgfHxcbiAgICAgICAgICA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ICAgICAgICAgICAgIHN3aXRjaCAoc2VsZWN0aW9uU3RhcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCAwLCBLRVlTLnVwKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgMCwgS0VZUy5ob21lKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgTU9EUy5vcHRpb24sIEtFWVMubGVmdCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMubGVmdCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDU6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMucmlnaHQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA3OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCBNT0RTLm9wdGlvbiwgS0VZUy5yaWdodCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDg6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMuZW5kKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgOTogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgMCwgS0VZUy5kb3duKTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHNlbGVjdGlvbkVuZCkge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDY6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIE1PRFMuc2hpZnQsIEtFWVMucmlnaHQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA3OiBob3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nZhbHVlID0gUExBQ0VIT0xERVI7XG4gICAgICAgICAgICBpc0ZvY3VzZWQgJiYgcmVzZXRTZWxlY3Rpb24oKTtcbiAgICAgICAgIH1cbiAgICB9KTtcblxuICAgIGZ1bmN0aW9uIHJlc2V0U2VsZWN0aW9uKGlzRW1wdHkpIHtcbiAgICAgICAgaWYgKGluQ29tcG9zaXRpb24pXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGluQ29tcG9zaXRpb24gPSB0cnVlO1xuICAgICAgICBcbiAgICAgICAgaWYgKGlucHV0SGFuZGxlcikge1xuICAgICAgICAgICAgdmFyIHNlbGVjdGlvblN0YXJ0ID0gMDtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb25FbmQgPSBpc0VtcHR5ID8gMCA6IHRleHQudmFsdWUubGVuZ3RoIC0gMTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb25TdGFydCA9IGlzRW1wdHkgPyAyIDogMTtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb25FbmQgPSAyO1xuICAgICAgICB9XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB0ZXh0LnNldFNlbGVjdGlvblJhbmdlKHNlbGVjdGlvblN0YXJ0LCBzZWxlY3Rpb25FbmQpO1xuICAgICAgICB9IGNhdGNoKGUpe31cbiAgICAgICAgXG4gICAgICAgIGluQ29tcG9zaXRpb24gPSBmYWxzZTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiByZXNldFZhbHVlKCkge1xuICAgICAgICBpZiAoaW5Db21wb3NpdGlvbilcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdGV4dC52YWx1ZSA9IFBMQUNFSE9MREVSO1xuICAgICAgICBpZiAodXNlcmFnZW50LmlzV2ViS2l0KVxuICAgICAgICAgICAgc3luY1ZhbHVlLnNjaGVkdWxlKCk7XG4gICAgfVxuXG4gICAgdXNlcmFnZW50LmlzV2ViS2l0IHx8IGhvc3Qu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RoaXMuZ2V0SW5wdXRIYW5kbGVyID0gZnVuY3Rpb24oKSB7cmV0dXJuIGlucHV0SGFuZGxlcjt9O1xuICAgIHZhciBhZnRlckNvbnRleHRNZW51ID0gZmFsc2U7XG4gICAgXG4gICAgdmFyIHNlbmRUZXh0ID0gZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICBpZiAoaW5wdXRIYW5kbGVyKSB7XG4gICAgICAgICAgICBkYXRhID0gaW5wdXRIYW5kbGVyKGRhdGEpO1xuICAgICAgICAgICAgaW5wdXRIYW5kbGVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICBpZiAocGFzdGVkKSB7XG4gICAgICAgICAgICByZXNldFNlbGVjdGlvbigpO1xuICAgICAgICAgICAgaWYgKGRhdGEpXG4gICAgICAgICAgICAgICAgaG9zdC5vblBhc3RlKGRhdGEpO1xuICAgICAgICAgICAgcGFzdGVkID0gZmFsc2U7XG4gICAgICAgIH0gZWxzZSBpZiAoZGF0YSA9PSBQTEFDRUhPTERFUi5jaGFyQXQoMCkpIHtcbiAgICAgICAgICAgIGlmIChhZnRlckNvbnRleHRNZW51KVxuICAgICAgICAgICAgICAgIGhvc3QuZXhlY0NvbW1hbmQoXCJkZWxcIiwge3NvdXJjZTogXCJhY2VcIn0pO1xuICAgICAgICAgICAgZWxzZSAvLyBzb21lIHZlcnNpb25zIG9mIGFuZHJvaWQgZG8gbm90IGZpcmUga2V5ZG93biB3aGVuIHByZXNzaW5nIGJhY2tzcGFjZVxuICAgICAgICAgICAgICAgIGhvc3QuZXhlY0NvbW1hbmQoXCJiYWNrc3BhY2VcIiwge3NvdXJjZTogXCJhY2VcIn0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKGRhdGEuc3Vic3RyaW5nKDAsIDIpID09IFBMQUNFSE9MREVSKVxuICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnN1YnN0cigyKTtcbiAgICAgICAgICAgIGVsc2UgaWYgKGRhdGEuY2hhckF0KDApID09IFBMQUNFSE9MREVSLmNoYXJBdCgwKSlcbiAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zdWJzdHIoMSk7XG4gICAgICAgICAgICBlbHNlIGlmIChkYXRhLmNoYXJBdChkYXRhLmxlbmd0aCAtIDEpID09IFBMQUNFSE9MREVSLmNoYXJBdCgwKSlcbiAgICAgICAgICAgICAgICBkYXRhID0gZGF0YS5zbGljZSgwLCAtMSk7XG4gICAgICAgICAgICBpZiAoZGF0YS5jaGFyQXQoZGF0YS5sZW5ndGggLSAxKSA9PSBQTEFDRUhPTERFUi5jaGFyQXQoMCkpXG4gICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc2xpY2UoMCwgLTEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoZGF0YSlcbiAgICAgICAgICAgICAgICBob3N0Lm9uVGV4dElucHV0KGRhdGEpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChhZnRlckNvbnRleHRNZW51KVxuICAgICAgICAgICAgYWZ0ZXJDb250ZXh0TWVudSA9IGZhbHNlO1xuICAgIH07XG4gICAgdmFyIG9uSW5wdXQgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGlmIChpbkNvbXBvc2l0aW9uKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgZGF0YSA9IHRleHQudmFsdWU7XG4gICAgICAgIHNlbmRUZXh0KGRhdGEpO1xuICAgICAgICByZXNldFZhbHVlKCk7XG4gICAgfTtcbiAgICBcbiAgICB2YXIgaGFuZGxlQ2xpcGJvYXJkRGF0YSA9IGZ1bmN0aW9uKGUsIGRhdGEsIGZvcmNlSUVNaW1lKSB7XG4gICAgICAgIHZhciBjbGlwYm9hcmREYXRhID0gZS5jbGlwYm9hcmREYXRhIHx8IHdpbmRvdy5jbGlwYm9hcmREYXRhO1xuICAgICAgICBpZiAoIWNsaXBib2FyZERhdGEgfHwgQlJPS0VOX1NFVERBVEEpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBtaW1lID0gVVNFX0lFX01JTUVfVFlQRSB8fCBmb3JjZUlFTWltZSA/IFwiVGV4dFwiIDogXCJ0ZXh0L3BsYWluXCI7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBpZiAoZGF0YSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjbGlwYm9hcmREYXRhLnNldERhdGEobWltZSwgZGF0YSkgIT09IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY2xpcGJvYXJkRGF0YS5nZXREYXRhKG1pbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoKGUpIHtcbiAgICAgICAgICAgIGlmICghZm9yY2VJRU1pbWUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZUNsaXBib2FyZERhdGEoZSwgZGF0YSwgdHJ1ZSk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdmFyIGRvQ29weSA9IGZ1bmN0aW9uKGUsIGlzQ3V0KSB7XG4gICAgICAgIHZhciBkYXRhID0gaG9zdC5nZXRDb3B5VGV4dCgpO1xuICAgICAgICBpZiAoIWRhdGEpXG4gICAgICAgICAgICByZXR1cm4gZXZlbnQucHJldmVudERlZmF1bHQoZSk7XG5cbiAgICAgICAgaWYgKGhhbmRsZUNsaXBib2FyZERhdGEoZSwgZGF0YSkpIHtcbiAgICAgICAgICAgIGlzQ3V0ID8gaG9zdC5vbkN1dCgpIDogaG9zdC5vbkNvcHkoKTtcbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KGUpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29waWVkID0gdHJ1ZTtcbiAgICAgICAgICAgIHRleHQudmFsdWUgPSBkYXRhO1xuICAgICAgICAgICAgdGV4dC5zZWxlY3QoKTtcbiAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXtcbiAgICAgICAgICA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CIsIG9uU2VsZWN0KTtcblxuICAgIGV2ZW50LmFkZExpc3RlbmVyKHRleHQsIFwiaW5wdXRcIiwgb25JbnB1dCk7XG5cbiAgICBldmVudC5hZGRMaXN0ZW5lcih0ZXh0LCBcImN1dFwiLCBvbkN1dCk7XG4gICAgZXZlbnQuYWRkTGlzdGVuZXIodGV4dCwgXCJjb3B5XCIsIG9uQ29weSk7XG4gICAgZXZlbnQuYWRkTGlzdGVuZXIodGV4dCwgXCJwYXN0ZVwiLCBvblBhc3RlKTtcbiAgICBpZiAoISgnb25jdXQnIGluIHRleHQpIHx8ICEoJ29uY29weScgaW4gdGV4dCkgfHwgISgnb25wYXN0ZScgaW4gdGV4dCkpIHtcbiAgICAgICAgZXZlbnQuYWRkTGlzdGVuZXIocGFyZW50Tm9kZSwgXCJrZXlkb3duXCIsIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIGlmICgodXNlcmFnZW50LmlzTWFjICYmICFlLm1ldGFLZXkpIHx8ICFlLmN0cmxLZXkpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgICAgICBzd2l0Y2ggKGUua2V5Q29kZSkge1xuICAgICAgICAgICAgICAgIGNhc2UgNjc6XG4gICAgICAgICAgICAgICAgICAgIG9uQ29weShlKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSA4NjpcbiAgICAgICAgICAgICAgICAgICAgb25QYXN0ZShlKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSA4ODpcbiAgICAgICAgICAgICAgICAgICAgb25DdXQoZSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG4gICAgdmFyIG9uQ29tcG9zaXRpb25TdGFydCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKGluQ29tcG9zaXRpb24gfHwgIWhvc3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AgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIGVsc2UgaWYgKHN0ciA9PSBjLmxhc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICByZXNldFZhbHVlKCk7XG4gICAgICAgICAgICBlbHNlIGlmICghYy5sYXN0VmFsdWUgJiYgc3RyKSB7XG4gICAgICAgICAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgIHNlbmRUZXh0KHN0cik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBpbnB1dEhhbmRsZXIgPSBmdW5jdGlvbiBjb21wb3NpdGlvbklucHV0SGFuZGxlcihzdHIpIHtcbiAgICAgICAgICAgIGlmICh0aW1lcilcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpO1xuICAgICAgICAgICAgc3RyID0gc3RyLnJlcGxhY2UoL1xcdTIwMjgvZywgXCJcIik7XG4gICAgICAgICAgICBpZiAoc3RyID09IGMubGFzdFZhbHVlKVxuICAgICAgICAgICAgICAgIHJldHVybiBcIlwiO1xuICAgICAgICAgICAgaWYgKGMubGFzdFZhbHVlICYmIHRpbWVyKVxuICAgICAgICAgICAgICAgIGhvc3QudW5kbygpO1xuICAgICAgICAgICAgcmV0dXJuIHN0cjtcbiAgICAgICAgfTtcbiAgICAgICAgaG9zdC5vbkNvbXBvc2l0aW9uRW5kKCk7XG4gICAgICAgIGhvc3QucmVtb3ZlTGlzdGVuZXIoXCJtb3VzZWRvd25cIiwgb25Db21wb3NpdGlvbkVuZCk7XG4gICAgICAgIGlmIChlLnR5cGUgPT0gXCJjb21wb3NpdGlvbmVuZFwiICYmIGMucmFuZ2UpIHtcbiAgICAgICAgICAgIGhvc3Quc2VsZWN0aW9uLnNldFJhbmdlKGMucmFuZ2UpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBuZWVkc09uSW5wdXQgPVxuICAgICAgICAgICAgKCEhdXNlcmFnZW50LmlzQ2hyb21lICYmIHVzZXJhZ2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GlvbigpO1xuICAgICAgICB0aGlzLm1vdXNlZG93bkV2ZW50ID0gZXY7XG4gICAgICAgIHZhciBlZGl0b3IgPSB0aGlzLmVkaXRvcjtcblxuICAgICAgICB2YXIgYnV0dG9uID0gZXYuZ2V0QnV0dG9uKCk7XG4gICAgICAgIGlmIChidXR0b24gIT09IDApIHtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb25SYW5nZSA9IGVkaXRvci5nZXRTZWxlY3Rpb25SYW5nZSgpO1xuICAgICAgICAgICAgdmFyIHNlbGVjdGlvbkVtcHR5ID0gc2VsZWN0aW9uUmFuZ2UuaXNFbXB0eSgpO1xuICAgICAgICAgICAgZWRpdG9yLiRibG9ja1Njcm9sbGluZysrO1xuICAgICAgICAgICAgaWYgKHNlbGVjdGlvbkVtcHR5IHx8IGJ1dHRvbiA9PSAxKVxuICAgICAgICAgICAgICAgIGVkaXRvci5zZWxlY3Rpb24ubW92ZVRvUG9zaXRpb24ocG9zKTtcbiAgICAgICAgICAgIGVkaXRvci4kYmxvY2tTY3JvbGxpbmctLTtcbiAgICAgICAgICAgIGlmIChidXR0b24gPT0gMikge1xuICAgICAgICAgICAgICAgIGVkaXRvci50ZXh0SW5wdXQub25Db250ZXh0TWVudShldi5kb21FdmVudCk7XG4gICAgICAgICAgICAgICAgaWYgKCF1c2VyYWdlbnQuaXNNb3ppbGxhKVxuICAgICAgICAgICAgICAgICAgICBldi5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5tb3VzZWRvd25FdmVudC50aW1lID0gRGF0ZS5ub3coKTtcbiAgICAgICAgaWYgKGluU2VsZWN0aW9uICYmICFlZGl0b3IuaXNGb2N1c2VkKCkpIHtcbiAgICAgICAgICAgIGVkaXRvci5mb2N1cygpO1xuICAgICAgICAgICAgaWYgKHRoaXMuJGZvY3VzVGltb3V0ICYmICF0aGlzLiRjbGlja1N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9yID0gdGhpcy4kY2xpY2tTZWxlY3Rpb24uZW5kO1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZS5lbmQucm93ICE9IGN1cnNvci5yb3cgfHwgcmFuZ2UuZW5kLmNvbHVtbiAhPSBjdXJzb3IuY29sdW1uKVxuICAgICAgICAgICAgICAgICAgICBjdXJzb3IgPSByYW5nZS5zdGFydDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY21wRW5kID09IDEgJiYgY21wU3RhcnQgPj0gMCkge1xuICAgICAgICAgICAgICAgIGFuY2hvciA9IHRoaXMuJGNsaWNrU2VsZWN0aW9uLnN0YXJ0O1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZS5zdGFydC5yb3cgIT0gY3Vyc29yLnJvdyB8fCByYW5nZS5zdGFydC5jb2x1bW4gIT0gY3Vyc29yLmNvbHVtbilcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yID0gcmFuZ2UuZW5kO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjbXBTdGFydCA9PSAtMSAmJiBjbXBFbmQgPT0gMSkge1xuICAgICAgICAgICAgICAgIGN1cnNvciA9IHJhbmdlLmVuZDtcbiAgICAgICAgICAgICAgICBhbmNob3IgPSByYW5nZS5zdGFydDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIG9yaWVudGVkUmFuZ2UgPSBjYWxjUmFuZ2VPcmllbnRhdGlvbih0aGlzLiRjbGlja1NlbGVjdGlvbiwgY3Vyc29yKTtcbiAgICAgICAgICAgICAgICBjdXJzb3IgPSBvcmllbnRlZFJhbmdlLmN1cnNvcjtcbiAgICAgICAgICAgICAgICBhbmNob3IgPSBvcmllbnRlZFJhbmdlLmFuY2hvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVkaXRvci5zZWxlY3Rpb24uc2V0U2VsZWN0aW9uQW5jaG9yKGFuY2hvci5yb3csIGFuY2hvci5jb2x1bW4pO1xuICAgICAgICB9XG4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B2YXIgZGF0YVRyYW5zZmVyID0gZS5kYXRhVHJhbnNmZXI7XG4gICAgICAgIGlmIChpc0ludGVybmFsKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKGRyYWdPcGVyYXRpb24pIHtcbiAgICAgICAgICAgICAgICBjYXNlIFwibW92ZVwiOlxuICAgICAgICAgICAgICAgICAgICBpZiAocmFuZ2UuY29udGFpbnMoZHJhZ0N1cnNvci5yb3csIGRyYWdDdXJzb3IuY29sdW1uKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQ6IGRyYWdDdXJzb3IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kOiBkcmFnQ3Vyc29yXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSBlZGl0b3IubW92ZVRleHQocmFuZ2UsIGRyYWdDdXJzb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJjb3B5XCI6XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gZWRpdG9yLm1vdmVUZXh0KHJhbmdlLCBkcmFnQ3Vyc29yLCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZHJvcERhdGEgPSBkYXRhVHJhbnNmZXIuZ2V0RGF0YSgnVGV4dCcpO1xuICAgICAgICAgICAgcmFuZ2UgPSB7XG4gICAgICAgICAgICAgICAgc3RhcnQ6IGRyYWdDdXJzb3IsXG4gICAgICAgICAgICAgICAgZW5kOiBlZGl0b3Iuc2Vzc2lvbi5pbnNlcnQoZHJhZ0N1cnNvciwgZHJvcERhdGEp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hdXRvU2Nyb2xsKGN1cnNvciwgcHJldkN1cnNvcikge1xuICAgICAgICB2YXIgbm93ID0gRGF0ZS5ub3coKTtcbiAgICAgICAgdmFyIGxpbmVIZWlnaHQgPSBlZGl0b3IucmVuZGVyZXIubGF5ZXJDb25maWcubGluZUhlaWdodDtcbiAgICAgICAgdmFyIGNoYXJhY3RlcldpZHRoID0gZWRpdG9yLnJlbmRlcmVyLmxheWVyQ29uZmlnLmNoYXJhY3RlcldpZHRoO1xuICAgICAgICB2YXIgZWRpdG9yUmVjdCA9IGVkaXRvci5yZW5kZXJlci5zY3JvbGxlci5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcbiAgICAgICAgdmFyIG9mZnNldHMgPSB7XG4gICAgICAgICAgIHg6IHtcbiAgICAgICAgICAgICAgIGxlZnQ6IHggLSBlZGl0b3JSZWN0LmxlZnQsXG4gICAgICAgICAgICAgICByaWdodDogZWRpdG9yUmVjdC5yaWdodCAtIHhcbiAgICAgICAgICAgfSxcbiAgICAgICAgICAgeToge1xuICAgICAgICAgICAgICAgdG9wOiB5IC0gZWRpdG9yUmVjdC50b3AsXG4gICAgICAgICAgICAgICBib3R0b206IGVkaXRvclJlY3QuYm90dG9tIC0geVxuICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIHZhciBuZWFyZXN0WE9mZnNldCA9IE1hdGgubWluKG9mZnNldHMueC5sZWZ0LCBvZmZzZXRzLngucmlnaHQpO1xuICAgICAgICB2YXIgbmVhcmVzdFlPZmZzZXQgPSBNYXRoLm1pbihvZmZzZXRzLnkudG9wLCBvZmZzZXRzLnkuYm90dG9tKTtcbiAgICAgICAgdmFyIHNjcm9sbEN1cnNvciA9IHtyb3c6IGN1cnNvci5yb3csIGNvbHVtbjogY3Vyc29yLmNvbHVtbn07XG4gICAgICAgIGlmIChuZWFyZXN0WE9mZnNldCAvIGNoYXJhY3RlcldpZHRoIDw9IDIpIHtcbiAgICAgICAgICAgIHNjcm9sbEN1cnNvci5jb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jtcbiAgICAgICAgICAgIHRoaXMubW91c2Vkb3duRXZlbnQudGltZSA9IERhdGUubm93KCk7XG4gICAgICAgICAgICB2YXIgZXZlbnRUYXJnZXQgPSBlLmRvbUV2ZW50LnRhcmdldCB8fCBlLmRvbUV2ZW50LnNyY0VsZW1lbnQ7XG4gICAgICAgICAgICBpZiAoXCJ1bnNlbGVjdGFibGVcIiBpbiBldmVudFRhcmdldClcbiAgICAgICAgICAgICAgICBldmVudFRhcmdldC51bnNlbGVjdGFibGUgPSBcIm9uXCI7XG4gICAgICAgICAgICBpZiAoZWRpdG9yLmdldERyYWdEZWxheSgpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHVzZXJhZ2VudC5pc1dlYktpdCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmNhbmNlbERyYWcgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbW91c2VUYXJnZXQgPSBlZGl0b3IuY29udGFpbmVyO1xuICAgICAgICAgICAgICAgICAgICBtb3VzZVRhcmdldC5kcmFnZ2FibGUgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKFwiZHJhZ1dhaXRcIik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuc3RhcnREcmFnKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLmNhcHR1cmVNb3VzZShlLCB0aGlzLm9uTW91c2VEcmFnLmJpbmQodGhpcykpO1xuICAgICAgICAgICAgZS5kZWZhdWx0UHJldmVudGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG5cbn0pLmNhbGwoRHJhZ2Ryb3BIYW5kbGVyLnByb3RvdHlwZSk7XG5cblxuZnVuY3Rpb24gY2FsY0Rpc3RhbmNlKGF4LCBheSwgYngsIGJ5KSB7XG4gICAgcmV0dXJuIE1hdGguc3FydChNYXRoLnBvdyhieCAtIGF4LCAyKSArI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dldFJvd0NhY2hlSW5kZXgocm93Q2FjaGUsIHRoaXMuY3VycmVudFJvdyk7XG4gICAgICAgICAgICBpZiAoaW5kZXggPj0gMClcbiAgICAgICAgICAgICAgICBkb2NSb3cgPSB0aGlzLnNlc3Npb24uJGRvY1Jvd0NhY2hlW2luZGV4XTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBkb2NSb3c7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0U3BsaXRJbmRleCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgc3BsaXRJbmRleCA9IDA7XG4gICAgICAgIHZhciByb3dDYWNoZSA9IHRoaXMuc2Vzc2lvbi4kc2NyZWVuUm93Q2FjaGU7XG4gICAgICAgIGlmIChyb3dDYWNoZS5sZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciBjdXJyZW50SW5kZXgsIHByZXZJbmRleCA9IHRoaXMuc2Vzc2lvbi4kZ2V0Um93Q2FjaGVJbmRleChyb3dDYWNoZSwgdGhpcy5jdXJyZW50Um93KTtcbiAgICAgICAgICAgIHdoaWxlICh0aGlzLmN1cnJlbnRSb3cgLSBzcGxpdEluZGV4ID4gMCkge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRJbmRleCA9IHRoaXMuc2Vzc2lvbi4kZ2V0Um93Q2FjaGVJbmRleChyb3dDYWNoZSwgdGhpcy5jdXJyZW50Um93IC0gc3BsaXRJbmRleCAtIDEpO1xuICAgICAgICAgICAgICAgIGlmIChjdXJyZW50SW5kZXggIT09IHByZXZJbmRleClcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgICAgICBwcmV2SW5kZXggPSBjdXJyZW50SW5kZXg7XG4gICAgICAgICAgICAgICAgc3BsaXRJbmRleCsrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHNwbGl0SW5kZXg7XG4gICAgfTtcblxuICAgIHRoaXMudXBkYXRlUm93TGluZSA9IGZ1bmN0aW9uKGRvY1Jvdywgc3BsaXRJbmRleCkge1xuICAgICAgICBpZiAoZG9jUm93ID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICBkb2NSb3cgPSB0aGlzLmdldERvY3VtZW50Um93KCk7XG5cbiAgICAgICAgdGhpcy53cmFwSW5kZW50ID0gMDtcbiAgICAgICAgdGhpcy5pc0xhc3RSb3cgPSAoZG9jUm93ID09PSB0aGlzLnNlc3Npb24uZ2V0TGVuZ3RoKCkgLSAxKTtcbiAgICAgICAgdGhpcy5saW5lID0gdGhpcy5zZXNzaW9uLmdldExpbmUoZG9jUm93KTtcbiAgICAgICAgaWYgKHRoaXMuc2Vzc2lvbi4kdXNlV3JhcE1vZGUpIHtcbiAgICAgICAgICAgIHZhciBzcGxpdHMgPSB0aGlzLnNlc3Npb24uJHdyYXBEYXRhW2RvY1Jvd107XG4gICAgICAgICAgICBpZiAoc3BsaXRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNwbGl0SW5kZXggPT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICAgICAgc3BsaXRJbmRleCA9IHRoaXMuZ2V0U3BsaXRJbmRleCgpO1xuXG4gICAgICAgICAgICAgICAgaWYoc3BsaXRJbmRleCA+IDAgJiYgc3BsaXRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLndyYXBJbmRlbnQgPSBzcGxpdHMuaW5kZW50O1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbmUgPSAoc3BsaXRJbmRleCA8IHNwbGl0cy5sZW5ndGgpID9cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGluZS5zdWJzdHJpbmcoc3BsaXRzW3NwbGl0SW5kZXggLSAxXSwgc3BsaXRzW3NwbGl0cy5sZW5ndGggLSAxXSkgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGluZS5zdWJzdHJpbmcoc3BsaXRzW3NwbGl0cy5sZW5ndGggLSAxXSk7XG4gICA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kLmNvbHVtbjtcbiAgICB9O1xuICAgIHRoaXMudG9TdHJpbmcgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIChcIlJhbmdlOiBbXCIgKyB0aGlzLnN0YXJ0LnJvdyArIFwiL1wiICsgdGhpcy5zdGFydC5jb2x1bW4gK1xuICAgICAgICAgICAgXCJdIC0+IFtcIiArIHRoaXMuZW5kLnJvdyArIFwiL1wiICsgdGhpcy5lbmQuY29sdW1uICsgXCJdXCIpO1xuICAgIH07XG5cbiAgICB0aGlzLmNvbnRhaW5zID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMDtcbiAgICB9O1xuICAgIHRoaXMuY29tcGFyZVJhbmdlID0gZnVuY3Rpb24ocmFuZ2UpIHtcbiAgICAgICAgdmFyIGNtcCxcbiAgICAgICAgICAgIGVuZCA9IHJhbmdlLmVuZCxcbiAgICAgICAgICAgIHN0YXJ0ID0gcmFuZ2Uuc3RhcnQ7XG5cbiAgICAgICAgY21wID0gdGhpcy5jb21wYXJlKGVuZC5yb3csIGVuZC5jb2x1bW4pO1xuICAgICAgICBpZiAoY21wID09IDEpIHtcbiAgICAgICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICBpZiAoY21wID09IDEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gMjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY21wID09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICByZXR1cm4gLTI7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjbXAg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NvbHVtbiA9PSBjb2x1bW47XG4gICAgfTtcbiAgICB0aGlzLnNldFN0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHR5cGVvZiByb3cgPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gPSByb3cuY29sdW1uO1xuICAgICAgICAgICAgdGhpcy5zdGFydC5yb3cgPSByb3cucm93O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5zdGFydC5yb3cgPSByb3c7XG4gICAgICAgICAgICB0aGlzLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5zZXRFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodHlwZW9mIHJvdyA9PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSByb3cuY29sdW1uO1xuICAgICAgICAgICAgdGhpcy5lbmQucm93ID0gcm93LnJvdztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdztcbiAgICAgICAgICAgIHRoaXMuZW5kLmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5pbnNpZGUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc0VuZChyb3csIGNvbHVtbikgfHwgdGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG4gICAgdGhpcy5pbnNpZGVTdGFydCA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIGlmICh0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDApIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmlzRW5kKHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG4gICAgdGhpcy5pbnNpZGVFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc1N0YXJ0KHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG4gICAgdGhpcy5jb21wYXJlID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKCF0aGlzLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgIGlmIChyb3cgPT09IHRoaXMuc3RhcnQucm93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8IHRoaXMuc3RhcnQuY29sdW1uID8gLTEgOiAoY29sdW1uID4gdGhpcy5lbmQuY29sdW1uID8gMSA6IDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHJvdyA8IHRoaXMuc3RhcnQucm93KVxuICAgICAgICAgICAgcmV0dXJuIC0xO1xuXG4gICAgICAgIGlmIChyb3cgPiB0aGlzLmVuZC5yb3cpXG4gICAgICAgICAgICByZXR1cm4gMTtcblxuICAgICAgICBpZiAodGhpcy5zdGFydC5yb3cgPT09IHJvdylcbiAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPj0gdGhpcy5zdGFydC5jb2x1bW4gPyAwIDogLTE7XG5cbiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PT0gcm93KVxuICAgICAgICAgICAgcmV0dXJuIGNvbHVtbiA8PSB0aGlzLmVuZC5jb2x1bW4gPyAwIDogMTtcblxuICAgICAgICByZXR1cm4gMDtcbiAgICB9O1xuICAgIHRoaXMuY29tcGFyZVN0YXJ0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09IHJvdyAmJiB0aGlzLnN0YXJ0LmNvbHVtbiA9PSBjb2x1bW4pIHtcbiAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmNvbXBhcmVFbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uKSB7XG4gICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmNvbXBhcmVJbnNpZGUgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5lbmQucm93ID09IHJvdyAmJiB0aGlzLmVuZC5jb2x1bW4gPT0gY29sdW1uKSB7XG4gICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfSBlbHNlIGlmICh0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uKSB7XG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5jbGlwUm93cyA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93KSB7XG4gICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgdmFyIGVuZCA9IHtyb3c6IGxhc3RSb3cgKyAxLCBjb2x1bW46IDB9O1xuICAgICAgICBlbHNlIGlmICh0aGlzLmVuZC5yb3cgPCBmaXJzdFJvdylcbiAgICAgICAgICAgIHZhciBlbmQgPSB7cm93OiBmaXJzdFJvdywgY29sdW1uOiAwfTtcblxuICAgICAgICBpZiAodGhpcy5zdGFydC5yb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgdmFyIHN0YXJ0ID0ge3JvdzogbGFzdFJvdyArIDEsIGNvbHVtbjogMH07XG4gICAgICAgIGVsc2UgaWYgKHRoaXMuc3RhcnQucm93IDwgZmlyc3RSb3cpXG4gICAgICAgICAgICB2YXIgc3RhcnQgPSB7cm93OiBmaXJzdFJvdywgY29sdW1uOiAwfTtcblxuICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyhzdGFydCB8fCB0aGlzLnN0YXJ0LCBlbmQgfHwgdGhpcy5lbmQpO1xuICAgIH07XG4gICAgdGhpcy5leHRlbmQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICB2YXIgY21wID0gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTtcblxuICAgICAgICBpZiAoY21wID09IDApXG4gICAgICA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aXRlc3BhY2VSZS50ZXN0KGNoKSlcbiAgICAgICAgICAgICAgICBpbmRleCArKztcblxuICAgICAgICAgICAgaWYgKGluZGV4IDwgMSkge1xuICAgICAgICAgICAgICAgIHRva2VuUmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICAgd2hpbGUgKChjaCA9IHJpZ2h0T2ZDdXJzb3JbaW5kZXhdKSAmJiAhdG9rZW5SZS50ZXN0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICB0b2tlblJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGluZGV4ICsrO1xuICAgICAgICAgICAgICAgICAgICBpZiAod2hpdGVzcGFjZVJlLnRlc3QoY2gpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXgtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChjaCA9IHJpZ2h0T2ZDdXJzb3JbaW5kZXhdKSAmJiB3aGl0ZXNwYWNlUmUudGVzdChjaCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ICsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IDIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRva2VuUmUubGFzdEluZGV4ID0gMDtcblxuICAgICAgICByZXR1cm4gaW5kZXg7XG4gICAgfTtcblxuICAgIHRoaXMubW92ZUN1cnNvclNob3J0V29yZFJpZ2h0ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciByb3cgPSB0aGlzLmxlYWQucm93O1xuICAgICAgICB2YXIgY29sdW1uID0gdGhpcy5sZWFkLmNvbHVtbjtcbiAgICAgICAgdmFyIGxpbmUgPSB0aGlzLmRvYy5nZXRMaW5lKHJvdyk7XG4gICAgICAgIHZhciByaWdodE9mQ3Vyc29yID0gbGluZS5zdWJzdHJpbmcoY29sdW1uKTtcblxuICAgICAgICB2YXIgZm9sZCA9IHRoaXMuc2Vzc2lvbi5nZXRGb2xkQXQocm93LCBjb2x1bW4sIDEpO1xuICAgICAgICBpZiAoZm9sZClcbiAgICAgICAgICAgIHJldHVybiB0aGlzLm1vdmVDdXJzb3JUbyhmb2xkLmVuZC5yb3csIGZvbGQuZW5kLmNvbHVtbik7XG5cbiAgICAgICAgaWYgKGNvbHVtbiA9PSBsaW5lLmxlbmd0aCkge1xuICAgICAgICAgICAgdmFyIGwgPSB0aGlzLmRvYy5nZXRMZW5ndGgoKTtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICByb3crKztcbiAgICAgICAgICAgICAgICByaWdodE9mQ3Vyc29yID0gdGhpcy5kb2MuZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgfSB3aGlsZSAocm93IDwgbCAmJiAvXlxccyokLy50ZXN0KHJpZ2h0T2ZDdXJzb3IpKTtcblxuICAgICAgICAgICAgaWYgKCEvXlxccysvLnRlc3QocmlnaHRPZkN1cnNvcikpXG4gICAgICAgICAgICAgICAgcmlnaHRPZkN1cnNvciA9IFwiXCI7XG4gICAgICAgICAgICBjb2x1bW4gPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGluZGV4ID0gdGhpcy4kc2hvcnRXb3JkRW5kSW5kZXgocmlnaHRPZkN1cnNvcik7XG5cbiAgICAgICAgdGhpcy5tb3ZlQ3Vyc29yVG8ocm93LCBjb2x1bW4gKyBpbmRleCk7XG4gICAgfTtcblxuICAgIHRoaXMubW92ZUN1cnNvclNob3J0V29y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AgICB2YXIgZGF0YSA9IHRoaXMucmFuZ2VzLm1hcChmdW5jdGlvbihyKSB7XG4gICAgICAgICAgICAgICAgdmFyIHIxID0gci5jbG9uZSgpO1xuICAgICAgICAgICAgICAgIHIxLmlzQmFja3dhcmRzID0gci5jdXJzb3IgPT0gci5zdGFydDtcbiAgICAgICAgICAgICAgICByZXR1cm4gcjE7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBkYXRhID0gdGhpcy5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgZGF0YS5pc0JhY2t3YXJkcyA9IHRoaXMuaXNCYWNrd2FyZHMoKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZGF0YTtcbiAgICB9O1xuXG4gICAgdGhpcy5mcm9tSlNPTiA9IGZ1bmN0aW9uKGRhdGEpIHtcbiAgICAgICAgaWYgKGRhdGEuc3RhcnQgPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5yYW5nZUxpc3QpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRvU2luZ2xlUmFuZ2UoZGF0YVswXSk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IGRhdGEubGVuZ3RoOyBpLS07ICkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgciA9IFJhbmdlLmZyb21Qb2ludHMoZGF0YVtpXS5zdGFydCwgZGF0YVtpXS5lbmQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YVtpXS5pc0JhY2t3YXJkcylcbiAgICAgICAgICAgICAgICAgICAgICAgIHIuY3Vyc29yID0gci5zdGFydDtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5hZGRSYW5nZShyLCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgZGF0YSA9IGRhdGFbMF07XG4gICAgICA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iAgICAgICAgICAgIHZhciBhZGp1c3RlZHJlZ2V4ID0gcnVsZS5yZWdleDtcbiAgICAgICAgICAgIHZhciBtYXRjaGNvdW50ID0gbmV3IFJlZ0V4cChcIig/OihcIiArIGFkanVzdGVkcmVnZXggKyBcIil8KC4pKVwiKS5leGVjKFwiYVwiKS5sZW5ndGggLSAyO1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocnVsZS50b2tlbikpIHtcbiAgICAgICAgICAgICAgICBpZiAocnVsZS50b2tlbi5sZW5ndGggPT0gMSB8fCBtYXRjaGNvdW50ID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS50b2tlbiA9IHJ1bGUudG9rZW5bMF07XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaGNvdW50IC0gMSAhPSBydWxlLnRva2VuLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcG9ydEVycm9yKFwibnVtYmVyIG9mIGNsYXNzZXMgYW5kIHJlZ2V4cCBncm91cHMgZG9lc24ndCBtYXRjaFwiLCB7IFxuICAgICAgICAgICAgICAgICAgICAgICAgcnVsZTogcnVsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGdyb3VwQ291bnQ6IG1hdGNoY291bnQgLSAxXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBydWxlLnRva2VuID0gcnVsZS50b2tlblswXTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBydWxlLnRva2VuQXJyYXkgPSBydWxlLnRva2VuO1xuICAgICAgICAgICAgICAgICAgICBydWxlLnRva2VuID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5vbk1hdGNoID0gdGhpcy4kYXJyYXlUb2tlbnM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlb2YgcnVsZS50b2tlbiA9PSBcImZ1bmN0aW9uXCIgJiYgIXJ1bGUub25NYXRjaCkge1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaGNvdW50ID4gMSlcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5vbk1hdGNoID0gdGhpcy4kYXBwbHlUb2tlbjtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHJ1bGUub25NYXRjaCA9IHJ1bGUudG9rZW47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChtYXRjaGNvdW50ID4gMSkge1xuICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcZC8udGVzdChydWxlLnJlZ2V4KSkge1xuICAgICAgICAgICAgICAgICAgICBhZGp1c3RlZHJlZ2V4ID0gcnVsZS5yZWdleC5yZXBsYWNlKC9cXFxcKFswLTldKykvZywgZnVuY3Rpb24obWF0Y2gsIGRpZ2l0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJcXFxcXCIgKyAocGFyc2VJbnQoZGlnaXQsIDEwKSArIG1hdGNoVG90YWwgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hjb3VudCA9IDE7XG4gICAgICAgICAgICAgICAgICAgIGFkanVzdGVkcmVnZXggPSB0aGlzLnJlbW92ZUNhcHR1cmluZ0dyb3VwcyhydWxlLnJlZ2V4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFydWxlLnNwbGl0UmVnZXggJiYgdHlwZW9mIHJ1bGUudG9rZW4gIT0gXCJzdHJpbmdcIilcbiAgICAgICAgICAgICAgICAgICAgc3BsaXR0ZXJSdXJsZXMucHVzaChydWxlKTsgLy8gZmxhZyB3aWxsIGJlIGtub3duIG9ubHkgYXQgdGhlIHZlcnkgZW5kXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIG1hcHBpbmdbbWF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ICAgICBpZiAodHlwZW9mIHR5cGVzID09PSBcInN0cmluZ1wiKVxuICAgICAgICAgICAgcmV0dXJuIFt7dHlwZTogdHlwZXMsIHZhbHVlOiBzdHJ9XTtcblxuICAgICAgICB2YXIgdG9rZW5zID0gW107XG4gICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gdHlwZXMubGVuZ3RoOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAodmFsdWVzW2ldKVxuICAgICAgICAgICAgICAgIHRva2Vuc1t0b2tlbnMubGVuZ3RoXSA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogdHlwZXNbaV0sXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZXNbaV1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0b2tlbnM7XG4gICAgfTtcblxuICAgIHRoaXMuJGFycmF5VG9rZW5zID0gZnVuY3Rpb24oc3RyKSB7XG4gICAgICAgIGlmICghc3RyKVxuICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICB2YXIgdmFsdWVzID0gdGhpcy5zcGxpdFJlZ2V4LmV4ZWMoc3RyKTtcbiAgICAgICAgaWYgKCF2YWx1ZXMpXG4gICAgICAgICAgICByZXR1cm4gXCJ0ZXh0XCI7XG4gICAgICAgIHZhciB0b2tlbnMgPSBbXTtcbiAgICAgICAgdmFyIHR5cGVzID0gdGhpcy50b2tlbkFycmF5O1xuICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IHR5cGVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgaWYgKHZhbHVlc1tpICsgMV0pXG4gICAgICAgICAgICAgICAgdG9rZW5zW3Rva2Vucy5sZW5ndGhdID0ge1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiB0eXBlc1tpXSxcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlc1tpICsgMV1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0b2tlbnM7XG4gICAgfTtcblxuICAgIHRoaXMucmVtb3ZlQ2FwdHVyaW5nR3JvdXBzID0gZnVuY3Rpb24oc3JjKSB7XG4gICAgICAgIHZhciByID0gc3JjLnJlcGxhY2UoXG4gICAgICAgICAgICAvXFxbKD86XFxcXC58W15cXF1dKSo/XFxdfFxcXFwufFxcKFxcP1s6PSFdfChcXCgpL2csXG4gICAgICAgICAgICBmdW5jdGlvbih4LCB5KSB7cmV0dXJuIHkgPyBcIig/OlwiIDogeDt9XG4gICAgICAgICk7XG4gICAgICAgIHJldHVybiByO1xuICAgIH07XG5cbiAgICB0aGlzLmNyZWF0ZVNwbGl0dGVyUmVnZXhwID0gZnVuY3Rpb24oc3JjLCBmbGFnKSB7XG4gICAgICAgIGlmIChzcmMuaW5kZXhPZihcIig/PVwiKSAhPSAtMSkge1xuICAgICAgICAgICAgdmFyIHN0YWNrID0gMDtcbiAgICAgICAgICAgIHZhciBpbkNoQ2xhc3MgPSBmYWxzZTtcbiAgICAgICAgICAgIHZhciBsYXN0Q2FwdHVyZSA9IHt9O1xuICAgICAgICAgICAgc3JjLnJlcGxhY2UoLyhcXFxcLil8KFxcKCg/OlxcP1s9IV0pPyl8KFxcKSl8KFtcXFtcXF1dKS9nLCBmdW5jdGlvbihcbiAgICAgICAgICAgICAgICBtLCBlc2MsIHBhcmVuT3BlbiwgcGFyZW5DbG9zZSwgc3F1YXJlLCBpbmRleFxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluQ2hDbGFzcykge1xuICAgICAgICAgICAgICAgICAgICBpbkNoQ2xhc3MgPSBzcXVhcmUgIT0gXCJdXCI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzcXVhcmUpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5DaENsYXNzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmVuQ2xvc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YWNrID09IGxhc3RDYXB0dXJlLnN0YWNrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0Q2FwdHVyZS5lbmQgPSBpbmRleCsxO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENhcHR1cmUuc3RhY2sgPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdGFjay0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGFyZW5PcGVuKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrKys7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJlbk9wZW4ubGVuZ3RoICE9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RDYXB0dXJlLnN0YWNrID0gc3RhY2s7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0Q2FwdHVyZS5zdGFydCA9IGluZGV4O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBtO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGlmIChsYXN0Q2FwdHVyZS5lbmQgIT0gbnVsbCAmJiAvXlxcKSokLy50ZXN0KHNyYy5zdWJzdHIobGFzdENhcHR1cmUuZW5kKSkpXG4gICAgICAgICAgICAgICAgc3JjID0gc3JjLnN1YnN0cmluZygwLCBsYXN0Q2FwdHVyZS5zdGFydCkgKyBzcmMuc3Vic3RyKGxhc3RDYXB0dXJlLmVuZCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHNyYy5jaGFyQXQoMCkgIT0gXCJeXCIpIHNyYyA9IFwiXlwiICsgc3JjO1xuICAgICAgICBpZiAoc3JjLmNoYXJBdChzcmMubGVuZ3RoIC0gMSkgIT0gXCIkXCIpIHNyYyArPSBcIiRcIjtcbiAgICAgICAgXG4gICAgICAgIHJldHVybiBuZX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bXTtcbiAgICAgICAgdmFyIGxhc3RJbmRleCA9IDA7XG4gICAgICAgIHZhciBtYXRjaEF0dGVtcHRzID0gMDtcblxuICAgICAgICB2YXIgdG9rZW4gPSB7dHlwZTogbnVsbCwgdmFsdWU6IFwiXCJ9O1xuXG4gICAgICAgIHdoaWxlIChtYXRjaCA9IHJlLmV4ZWMobGluZSkpIHtcbiAgICAgICAgICAgIHZhciB0eXBlID0gbWFwcGluZy5kZWZhdWx0VG9rZW47XG4gICAgICAgICAgICB2YXIgcnVsZSA9IG51bGw7XG4gICAgICAgICAgICB2YXIgdmFsdWUgPSBtYXRjaFswXTtcbiAgICAgICAgICAgIHZhciBpbmRleCA9IHJlLmxhc3RJbmRleDtcblxuICAgICAgICAgICAgaWYgKGluZGV4IC0gdmFsdWUubGVuZ3RoID4gbGFzdEluZGV4KSB7XG4gICAgICAgICAgICAgICAgdmFyIHNraXBwZWQgPSBsaW5lLnN1YnN0cmluZyhsYXN0SW5kZXgsIGluZGV4IC0gdmFsdWUubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4udHlwZSA9PSB0eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuLnZhbHVlICs9IHNraXBwZWQ7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUpXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0ge3R5cGU6IHR5cGUsIHZhbHVlOiBza2lwcGVkfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbWF0Y2gubGVuZ3RoLTI7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaFtpICsgMV0gPT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG5cbiAgICAgICAgICAgICAgICBydWxlID0gc3RhdGVbbWFwcGluZ1tpXV07XG5cbiAgICAgICAgICAgICAgICBpZiAocnVsZS5vbk1hdGNoKVxuICAgICAgICAgICAgICAgICAgICB0eXBlID0gcnVsZS5vbk1hdGNoKHZhbHVlLCBjdXJyZW50U3RhdGUsIHN0YWNrLCBsaW5lKTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHR5cGUgPSBydWxlLnRva2VuO1xuXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUubmV4dCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGUubmV4dCA9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U3RhdGUgPSBydWxlLm5leHQ7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U3RhdGUgPSBydWxlLm5leHQoY3VycmVudFN0YXRlLCBzdGFjayk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIHN0YXRlID0gdGhpcy5zdGF0ZXNbY3VycmVudFN0YXRlXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXBvcnRFcnJvcihcInN0YXRlIGRvZXNuJ3QgZXhpc3RcIiwgY3VycmVudFN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTdGF0ZSA9IFwic3RhcnRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlID0gdGhpcy5zdGF0ZXNbY3VycmVudFN0YXRlXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtYXBwaW5nID0gdGhpcy5tYXRjaE1hcHBpbmdzW2N1cnJlbnRTdGF0ZV07XG4gICAgICAgICAgICAgICAgICAgIGxhc3RJbmRleCA9IGluZGV4O1xuICAgICAgICAgICAgICAgICAgICByZSA9IHRoaXMucmVnRXhwc1tjdXJyZW50U3RhdGVdO1xuICAgICAgICAgICAgICAgICAgICByZS5sYXN0SW5kZXggPSBpbmRleDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUuY29uc3VtZUxpbmVFbmQpXG4gICAgICAgICAgICAgICAgICAgIGxhc3RJbmRleCA9IGluZGV4O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHR5cGUgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCghcnVsZSB8fCBydWxlLm1lcmdlICE9PSBmYWxzZSkgJiYgdG9rZW4udHlwZSA9PT0gdHlwZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4udmFsdWUgKz0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udHlwZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHt0eXBlOiB0eXBlLCB2YWx1ZTogdmFsdWV9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbi50eXBlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2godG9rZW4pO1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHt0eXBlOiBudWxsLCB2YWx1ZTogXCJcIn07XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdHlwZS5sZW5ndGg7IGkrKylcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKHR5cGVbaV0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGxhc3RJbmRleCA9PSBsaW5lLmxlbmd0aClcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgbGFzdEluZGV4ID0gaW5kZXg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaEF0dGVtcHRzKysgPiBNQVhfVE9LRU5fQ09VTlQpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hBdHRlbXB0cyA+IDIgKiBsaW5lLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcG9ydEVycm9yKFwiaW5maW5pdGUgbG9vcCB3aXRoIGluIGFjZSB0b2tlbml6ZXJcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRTdGF0ZTogc3RhcnRTdGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHdoaWxlIChsYXN0SW5kZXggPCBsaW5lLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udHlwZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogbGluZS5zdWJzdHJpbmcobGFzdEluZGV4LCBsYXN0SW5kZXggKz0gMjAwMCksXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcIm92ZXJmbG93XCJcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY3VycmVudFN0YXRlID0gXCJzdGFydFwiO1xuICAgICAgICAgICAgICAgIHN0YWNrID0gW107XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodG9rZW4udHlwZSlcbiAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgXG4gICAgICAgIGlmIChzdGFjay5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBpZiAoc3RhY2tbMF0gIT09IGN1cnJlbnRTdGF0ZSlcbiAgICAgICAgICAgICAgICBzdGFjay51bnNoaWZ0KFwiI3RtcFwiLCBjdXJyZW50U3RhdGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0b2tlbnMgOiB0b2tlbnMsXG4gICAgICAgICAgICBzdGF0ZSA6IHN0YWNrLmxlbmd0aCA/IHN0YWNrIDogY3VycmVudFN0YXRlXG4gICAgICAgIH07XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLnJlcG9ydEVycm9yID0gY29uZmlnLnJlcG9ydEVycm9yO1xuICAgIFxufSkuY2FsbChUb2tlbml6ZXIucHJvdG90eXBlKTtcblxuZXhwb3J0cy5Ub2tlbml6ZXIgPSBUb2tlbml6ZXI7XG59KTtcblxuYWNlLmRlZmluZShcImFjZS9tb2RlL3RleHRfaGlnaGxpZ2h0X3J1bGVzXCIsW1wicmVxdWlyZVwiLFwiZXhwb3J0c1wiLFwibW9kdWxlXCIsXCJhY2UvbGliL2xhbmdcIl0sIGZ1bmN0aW9uKGFjZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpIHtcblwidXNlIHN0cmljdFwiO1xuXG52YXIgbGFuZyA9IGFjZXF1aXJlKFwiLi4vbGliL2xhbmdcIik7XG5cbnZhciBUZXh0SGlnaGxpZ2h0UnVsZXMgPSBmdW5jdGlvbigpIHtcblxuICAgIHRoaXMuJHJ1bGVzID0ge1xuICAgICAgICBcInN0YXJ0XCIgOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcImVtcHR5X2xpbmVcIixcbiAgICAgICAgICAgIHJlZ2V4IDogJ14kJ1xuICAgICAgICB9LCB7XG4gICAgICAgICAgICBkZWZhdWx0VG9rZW4gOiBcInRleHRcIlxuICAgICAgICB9XVxuICAgIH07XG59O1xuXG4oZnVuY3Rpb24oKSB7XG5cbiAgICB0aGlzLmFkZFJ1bGVzID0gZnVuY3Rpb24ocnVsZXMsIHByZWZpeCkge1xuICAgICAgICBpZiAoIXByZWZpeCkge1xuICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIHJ1bGVzKVxuICAgICAgICAgICAgICAgIHRoaXMuJHJ1bGVzW2tleV0gPSBydWxlc1trZXldO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIGtleSBpbiBydWxlcykge1xuICAgICAgICAgICAgdmFyIHN0YXRlID0gcnVsZXNba2V5XTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3RhdGUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgcnVsZSA9IHN0YXRlW2ldO1xuICAgICAgICAgICAgICAgIGlmIChydWxlLm5leHQgfHwgcnVsZS5vbk1hdGNoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcnVsZS5uZXh0ID09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChydWxlLm5leHQuaW5kZXhPZihwcmVmaXgpICE9PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dCA9IHByZWZpeCArIHJ1bGUubmV4dDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAocnVsZS5uZXh0U3RhdGUgJiYgcnVsZS5uZXh0U3RhdGUuaW5kZXhPZihwcmVmaXgpICE9PSAwKVxuICAgICAgICAgICAgICAg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zU3RhdGUoa2V5KSB7XG4gICAgICAgICAgICB2YXIgc3RhdGUgPSBydWxlc1trZXldO1xuICAgICAgICAgICAgc3RhdGUucHJvY2Vzc2VkID0gdHJ1ZTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3RhdGUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgcnVsZSA9IHN0YXRlW2ldO1xuICAgICAgICAgICAgICAgIHZhciB0b0luc2VydCA9IG51bGw7XG4gICAgICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkocnVsZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9JbnNlcnQgPSBydWxlO1xuICAgICAgICAgICAgICAgICAgICBydWxlID0ge307XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghcnVsZS5yZWdleCAmJiBydWxlLnN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUucmVnZXggPSBydWxlLnN0YXJ0O1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXJ1bGUubmV4dClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dCA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBydWxlLm5leHQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IHJ1bGUudG9rZW5cbiAgICAgICAgICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW46IHJ1bGUudG9rZW4gKyBcIi5lbmRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2V4OiBydWxlLmVuZCB8fCBydWxlLnN0YXJ0LFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dDogXCJwb3BcIlxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS50b2tlbiA9IHJ1bGUudG9rZW4gKyBcIi5zdGFydFwiO1xuICAgICAgICAgICAgICAgICAgICBydWxlLnB1c2ggPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgbmV4dCA9IHJ1bGUubmV4dCB8fCBydWxlLnB1c2g7XG4gICAgICAgICAgICAgICAgaWYgKG5leHQgJiYgQXJyYXkuaXNBcnJheShuZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3RhdGVOYW1lID0gcnVsZS5zdGF0ZU5hbWU7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3RhdGVOYW1lKSAge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVOYW1lID0gcnVsZS50b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3RhdGVOYW1lICE9IFwic3RyaW5nXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVOYW1lID0gc3RhdGVOYW1lWzBdIHx8IFwiXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocnVsZXNbc3RhdGVOYW1lXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZU5hbWUgKz0gaWQrKztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBydWxlc1tzdGF0ZU5hbWVdID0gbmV4dDtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5uZXh0ID0gc3RhdGVOYW1lO1xuICAgICAgICAgICAgICAgICAgICBwcm9jZXNzU3RhdGUoc3RhdGVOYW1lKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5leHQgPT0gXCJwb3BcIikge1xuICAgICAgICAgICAgICAgICAgICBydWxlLm5leHQgPSBwb3BTdGF0ZTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAocnVsZS5wdXNoKSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dFN0YXRlID0gcnVsZS5uZXh0IHx8IHJ1bGUucHVzaDtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5uZXh0ID0gcHVzaFN0YXRlO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZS5wdXNoO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChydWxlLnJ1bGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIHIgaW4gcnVsZS5ydWxlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bGVzW3JdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bGVzW3JdLnB1c2gpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGVzW3JdLnB1c2guYXBwbHkocnVsZXNbcl0sIHJ1bGUucnVsZXNbcl0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlc1tyXSA9IHJ1bGUucnVsZXNbcl07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIGluY2x1ZGVOYW1lID0gdHlwZW9mIHJ1bGUgPT0gXCJzdHJpbmdcIiA/IHJ1bGUgOiBydWxlLmluY2x1ZGU7XG4gICAgICAgICAgICAgICAgaWYgKGluY2x1ZGVOYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KGluY2x1ZGVOYW1lKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvSW5zZXJ0ID0gaW5jbHVkZU5hbWUubWFwKGZ1bmN0aW9uKHgpIHsgcmV0dXJuIHJ1bGVzW3hdOyB9KTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgdG9JbnNlcnQgPSBydWxlc1tpbmNsdWRlTmFtZV07XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRvSW5zZXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBhcmdzID0gW2ksIDFdLmNvbmNhdCh0b0luc2VydCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChydWxlLm5vRXNjYXBlKVxuICAgICAgICAgICAgICAgICAgICAgICAgYXJncyA9IGFyZ3MuZmlsdGVyKGZ1bmN0aW9uKHgpIHtyZXR1cm4gIXgubmV4dDt9KTtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGUuc3BsaWNlLmFwcGx5KHN0YXRlLCBhcmdzKTtcbiAgICAgICAgICAgICAgICAgICAgaS0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAocnVsZS5rZXl3b3JkTWFwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUudG9rZW4gPSB0aGlzLmNyZWF0ZUtleXdvcmRNYXBwZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBydWxlLmtleXdvcmRNYXAsIHJ1bGUuZGVmYXVsdFRva2VuIHx8IFwidGV4dFwiLCBydWxlLmNhc2VJbnNlbnNpdGl2ZVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZS5kZWZhdWx0VG9rZW47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIE9iamVjdC5rZXlzKHJ1bGVzKS5mb3JFYWNoKHByb2Nlc3NTdGF0ZSwgdGhpcyk7XG4gICAgfTtcblxuICAgIHRoaXMuY3JlYXRlS2V5d29yZE1hcHBlciA9IGZ1bmN0aW9uKG1hcCwgZGVmYXVsdFRva2VuLCBpZ25vcmVDYXNlLCBzcGxpdENoYXIpIHtcbiAgICAgICAgdmFyIGtleXdvcmRzID0gT2JqZWN0LmNyZWF0ZShudWxsKTtcbiAgICAgICAgT2JqZWN0LmtleXMobWFwKS5mb3JFYWNoK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aGlzLiRiZWhhdmlvdXJzICYmIHRoaXMuJGJlaGF2aW91cnNbbmFtZV0pIHtcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLiRiZWhhdmlvdXJzW25hbWVdO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmluaGVyaXQgPSBmdW5jdGlvbiAobW9kZSwgZmlsdGVyKSB7XG4gICAgICAgIGlmICh0eXBlb2YgbW9kZSA9PT0gXCJmdW5jdGlvblwiKSB7XG4gICAgICAgICAgICB2YXIgYmVoYXZpb3VycyA9IG5ldyBtb2RlKCkuZ2V0QmVoYXZpb3VycyhmaWx0ZXIpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGJlaGF2aW91cnMgPSBtb2RlLmdldEJlaGF2aW91cnMoZmlsdGVyKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmFkZEJlaGF2aW91cnMoYmVoYXZpb3Vycyk7XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldEJlaGF2aW91cnMgPSBmdW5jdGlvbiAoZmlsdGVyKSB7XG4gICAgICAgIGlmICghZmlsdGVyKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy4kYmVoYXZpb3VycztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciByZXQgPSB7fTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZmlsdGVyLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuJGJlaGF2aW91cnNbZmlsdGVyW2ldXSkge1xuICAgICAgICAgICAgICAgICAgICByZXRbZmlsdGVyW2ldXSA9IHRoaXMuJGJlaGF2aW91cnNbZmlsdGVyW2ldXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICB9XG4gICAgfTtcblxufSkuY2FsbChCZWhhdmlvdXIucHJvdG90eXBl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gICAgdGhpcy4kcm93VG9rZW5zID0gdGhpcy4kc2Vzc2lvbi5nZXRUb2tlbnModGhpcy4kcm93KTtcbiAgICAgICAgICAgIHRoaXMuJHRva2VuSW5kZXggPSB0aGlzLiRyb3dUb2tlbnMubGVuZ3RoIC0gMTtcbiAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgIHJldHVybiB0aGlzLiRyb3dUb2tlbnNbdGhpcy4kdG9rZW5JbmRleF07XG4gICAgfTsgICBcbiAgICB0aGlzLnN0ZXBGb3J3YXJkID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHRoaXMuJHRva2VuSW5kZXggKz0gMTtcbiAgICAgICAgdmFyIHJvd0NvdW50O1xuICAgICAgICB3aGlsZSAodGhpcy4kdG9rZW5JbmRleCA+PSB0aGlzLiRyb3dUb2tlbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICB0aGlzLiRyb3cgKz0gMTtcbiAgICAgICAgICAgIGlmICghcm93Q291bnQpXG4gICAgICAgICAgICAgICAgcm93Q291bnQgPSB0aGlzLiRzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICAgICAgaWYgKHRoaXMuJHJvdyA+PSByb3dDb3VudCkge1xuICAgICAgICAgICAgICAgIHRoaXMuJHJvdyA9IHJvd0NvdW50IC0gMTtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy4kcm93VG9rZW5zID0gdGhpcy4kc2Vzc2lvbi5nZXRUb2tlbnModGhpcy4kcm93KTtcbiAgICAgICAgICAgIHRoaXMuJHRva2VuSW5kZXggPSAwO1xuICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgcmV0dXJuIHRoaXMuJHJvd1Rva2Vuc1t0aGlzLiR0b2tlbkluZGV4XTtcbiAgICB9OyAgICAgIFxuICAgIHRoaXMuZ2V0Q3VycmVudFRva2VuID0gZnVuY3Rpb24gKCkge1xuICAgICAgICByZXR1cm4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gICAgICAgICAgICByZXR1cm4gZ2V0V3JhcHBlZChzZWxlY3Rpb24sIHNlbGVjdGVkLCAneycsICd9Jyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKENzdHlsZUJlaGF2aW91ci5pc1NhbmVJbnNlcnRpb24oZWRpdG9yLCBzZXNzaW9uKSkge1xuICAgICAgICAgICAgICAgIGlmICgvW1xcXVxcfVxcKV0vLnRlc3QobGluZVtjdXJzb3IuY29sdW1uXSkgfHwgZWRpdG9yLmluTXVsdGlTZWxlY3RNb2RlIHx8IG9wdGlvbnMgJiYgb3B0aW9ucy5icmFjZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnJlY29yZEF1dG9JbnNlcnQoZWRpdG9yLCBzZXNzaW9uLCBcIn1cIik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAne30nLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBDc3R5bGVCZWhhdmlvdXIucmVjb3JkTWF5YmVJbnNlcnQoZWRpdG9yLCBzZXNzaW9uLCBcIntcIik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAneycsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICh0ZXh0ID09ICd9Jykge1xuICAgICAgICAgICAgaW5pdENvbnRleHQoZWRpdG9yKTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09ICd9Jykge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGluZyA9IHNlc3Npb24uJGZpbmRPcGVuaW5nQnJhY2tldCgnfScsIHtjb2x1bW46IGN1cnNvci5jb2x1bW4gKyAxLCByb3c6IGN1cnNvci5yb3d9KTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hpbmcgIT09IG51bGwgJiYgQ3N0eWxlQmVoYXZpb3VyLmlzQXV0b0luc2VydGVkQ2xvc2luZyhjdXJzb3IsIGxpbmUsIHRleHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5wb3BBdXRvSW5zZXJ0ZWRDbG9zaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRleHQgPT0gXCJcXG5cIiB8fCB0ZXh0ID09IFwiXFxyXFxuXCIpIHtcbiAgICAgICAgICAgIGluaXRDb250ZXh0KGVkaXRvcik7XG4gICAgICAgICAgICB2YXIgY2xvc2luZyA9IFwiXCI7XG4gICAgICAgICAgICBpZiAoQ3N0eWxlQmVoYXZpb3VyLmlzTWF5YmVJbnNlcnRlZENsb3NpbmcoY3Vyc29yLCBsaW5lKSkge1xuICAgICAgICAgICAgICAgIGNsb3NpbmcgPSBsYW5nLnN0cmluZ1JlcGVhdChcIn1cIiwgY29udGV4dC5tYXliZUluc2VydGVkQnJhY2tldHMpO1xuICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5jbGVhck1heWJlSW5zZXJ0ZWRDbG9zaW5nKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbiwgY3Vyc29yLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PT0gJ30nKSB7XG4gICAgICAgICAgICAgICAgdmFyIG9wZW5CcmFjZVBvcyA9IHNlc3Npb24uZmluZE1hdGNoaW5nQnJhY2tldCh7cm93OiBjdXJzb3Iucm93LCBjb2x1bW46IGN1cnNvci5jb2x1bW4rMX0sICd9Jyk7XG4gICAgICAgICAgICAgICAgaWYgKCFvcGVuQnJhY2VQb3MpXG4gICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dF9pbmRlbnQgPSB0aGlzLiRnZXRJbmRlbnQoc2Vzc2lvbi5nZXRMaW5lKG9wZW5CcmFjZVBvcy5yb3cpKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2xvc2luZykge1xuICAgICAgICAgICAgICAgIHZhciBuZXh0X2luZGVudCA9IHRoaXMuJGdldEluZGVudChsaW5lKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLmNsZWFyTWF5YmVJbnNlcnRlZENsb3NpbmcoKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgaW5kZW50ID0gbmV4dF9pbmRlbnQgKyBzZXNzaW9uLmdldFRhYlN0cmluZygpO1xuXG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHRleHQ6ICdcXG4nICsgaW5kZW50ICsgJ1xcbicgKyBuZXh0X2luZGVudCArIGNsb3NpbmcsXG4gICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgaW5kZW50Lmxlbmd0aCwgMSwgaW5kZW50Lmxlbmd0aF1cbiAgICAgICAgICAgIH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RleHQoZWRpdG9yKTtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb24gPSBlZGl0b3IuZ2V0U2VsZWN0aW9uUmFuZ2UoKTtcbiAgICAgICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShzZWxlY3Rpb24pO1xuICAgICAgICAgICAgaWYgKHNlbGVjdGVkICE9PSBcIlwiICYmIGVkaXRvci5nZXRXcmFwQmVoYXZpb3Vyc0VuYWJsZWQoKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBnZXRXcmFwcGVkKHNlbGVjdGlvbiwgc2VsZWN0ZWQsICcoJywgJyknKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoQ3N0eWxlQmVoYXZpb3VyLmlzU2FuZUluc2VydGlvbihlZGl0b3IsIHNlc3Npb24pKSB7XG4gICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnJlY29yZEF1dG9JbnNlcnQoZWRpdG9yLCBzZXNzaW9uLCBcIilcIik7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dDogJygpJyxcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRleHQgPT0gJyknKSB7XG4gICAgICAgICAgICBpbml0Q29udGV4dChlZGl0b3IpO1xuICAgICAgICAgICAgdmFyIGN1cnNvciA9IGVkaXRvci5nZXRDdXJzb3JQb3NpdGlvbigpO1xuICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmRvYy5nZXRMaW5lKGN1cnNvci5yb3cpO1xuICAgICAgICAgICAgdmFyIHJpZ2h0Q2hhciA9IGxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4sIGN1cnNvci5jb2x1bW4gKyAxKTtcbiAgICAgICAgICAgIGlmIChyaWdodENoY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1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHRleHQgPT0gJ10nKSB7XG4gICAgICAgICAgICBpbml0Q29udGV4dChlZGl0b3IpO1xuICAgICAgICAgICAgdmFyIGN1cnNvciA9IGVkaXRvci5nZXRDdXJzb3JQb3NpdGlvbigpO1xuICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmRvYy5nZXRMaW5lKGN1cnNvci5yb3cpO1xuICAgICAgICAgICAgdmFyIHJpZ2h0Q2hhciA9IGxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4sIGN1cnNvci5jb2x1bW4gKyAxKTtcbiAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT0gJ10nKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoaW5nID0gc2Vzc2lvbi4kZmluZE9wZW5pbmdCcmFja2V0KCddJywge2NvbHVtbjogY3Vyc29yLmNvbHVtbiArIDEsIHJvdzogY3Vyc29yLnJvd30pO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZyAhPT0gbnVsbCAmJiBDc3R5bGVCZWhhdmlvdXIuaXNBdXRvSW5zZXJ0ZWRDbG9zaW5nKGN1cnNvciwgbGluZSwgdGV4dCkpIHtcbiAgICAgICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnBvcEF1dG9JbnNlcnRlZENsb3NpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHRoaXMuYWRkKFwiYnJhY2tldHNcIiwgXCJkZWxldGlvblwiLCBmdW5jdGlvbihzdGF0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AgICAgICAgICBpZiAobGVmdENoYXIgPT0gXCJcXFxcXCIgJiYgdG9rZW4gJiYgL2VzY2FwZS8udGVzdCh0b2tlbi50eXBlKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG5cbiAgICAgICAgICAgICAgICB2YXIgc3RyaW5nQmVmb3JlID0gdG9rZW4gJiYgL3N0cmluZ3xlc2NhcGUvLnRlc3QodG9rZW4udHlwZSk7XG4gICAgICAgICAgICAgICAgdmFyIHN0cmluZ0FmdGVyID0gIXJpZ2h0VG9rZW4gfHwgL3N0cmluZ3xlc2NhcGUvLnRlc3QocmlnaHRUb2tlbi50eXBlKTtcblxuICAgICAgICAgICAgICAgIHZhciBwYWlyO1xuICAgICAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT0gcXVvdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcGFpciA9IHN0cmluZ0JlZm9yZSAhPT0gc3RyaW5nQWZ0ZXI7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYWlyICYmIC9zdHJpbmdcXC5lbmQvLnRlc3QocmlnaHRUb2tlbi50eXBlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhaXIgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RyaW5nQmVmb3JlICYmICFzdHJpbmdBZnRlcilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyB3cmFwIHN0cmluZyB3aXRoIGRpZmZlcmVudCBxdW90ZVxuICAgICAgICAgICAgICAgICAgICBpZiAoc3RyaW5nQmVmb3JlICYmIHN0cmluZ0FmdGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7IC8vIGRvIG5vdCBwYWlyIHF1b3RlcyBpbnNpZGUgc3RyaW5nc1xuICAgICAgICAgICAgICAgICAgICB2YXIgd29yZFJlID0gc2Vzc2lvbi4kbW9kZS50b2tlblJlO1xuICAgICAgICAgICAgICAgICAgICB3b3JkUmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGlzV29yZEJlZm9yZSA9IHdvcmRSZS50ZXN0KGxlZnRDaGFyKTtcbiAgICAgICAgICAgICAgICAgICAgd29yZFJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpc1dvcmRBZnRlciA9IHdvcmRSZS50ZXN0KGxlZnRDaGFyKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzV29yZEJlZm9yZSB8fCBpc1dvcmRBZnRlcilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyBiZWZvcmUgb3IgYWZ0ZXIgYWxwaGFudW1lcmljXG4gICAgICAgICAgICAgICAgICAgIGlmIChyaWdodENoYXIgJiYgIS9bXFxzOywufSlcXF1cXFxcXS8udGVzdChyaWdodENoYXIpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7IC8vIHRoZXJlIGlzIHJpZ2h0Q2hhciBhbmQgaXQgaXNuJ3QgY2xvc2luZ1xuICAgICAgICAgICAgICAgICAgICBwYWlyID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dDogcGFpciA/IHF1b3RlICsgcXVvdGUgOiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLDFdXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJzdHJpbmdfZHF1b3Rlc1wiLCBcImRlbGV0aW9uXCIsIGZ1bmN0aW9uKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgcmFuZ2UpIHtcbiAgICAgICAgdmFyIHNlbGVjdGVkID0gc2Vzc2lvbi5kb2M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TtcbiAgICAgICAgdmFyIGluc2VydEF0VGFiU3RvcCA9IGZhbHNlO1xuXG4gICAgICAgIGlmICghdGhpcy5saW5lQ29tbWVudFN0YXJ0KSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuYmxvY2tDb21tZW50KVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIHZhciBsaW5lQ29tbWVudFN0YXJ0ID0gdGhpcy5ibG9ja0NvbW1lbnQuc3RhcnQ7XG4gICAgICAgICAgICB2YXIgbGluZUNvbW1lbnRFbmQgPSB0aGlzLmJsb2NrQ29tbWVudC5lbmQ7XG4gICAgICAgICAgICB2YXIgcmVnZXhwU3RhcnQgPSBuZXcgUmVnRXhwKFwiXihcXFxccyopKD86XCIgKyBsYW5nLmVzY2FwZVJlZ0V4cChsaW5lQ29tbWVudFN0YXJ0KSArIFwiKVwiKTtcbiAgICAgICAgICAgIHZhciByZWdleHBFbmQgPSBuZXcgUmVnRXhwKFwiKD86XCIgKyBsYW5nLmVzY2FwZVJlZ0V4cChsaW5lQ29tbWVudEVuZCkgKyBcIilcXFxccyokXCIpO1xuXG4gICAgICAgICAgICB2YXIgY29tbWVudCA9IGZ1bmN0aW9uKGxpbmUsIGkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGVzdFJlbW92ZShsaW5lLCBpKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmICghaWdub3JlQmxhbmtMaW5lcyB8fCAvXFxTLy50ZXN0KGxpbmUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvYy5pbnNlcnRJbkxpbmUoe3JvdzogaSwgY29sdW1uOiBsaW5lLmxlbmd0aH0sIGxpbmVDb21tZW50RW5kKTtcbiAgICAgICAgICAgICAgICAgICAgZG9jLmluc2VydEluTGluZSh7cm93OiBpLCBjb2x1bW46IG1pbkluZGVudH0sIGxpbmVDb21tZW50U3RhcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHZhciB1bmNvbW1lbnQgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgdmFyIG07XG4gICAgICAgICAgICAgICAgaWYgKG0gPSBsaW5lLm1hdGNoKHJlZ2V4cEVuZCkpXG4gICAgICAgICAgICAgICAgICAgIGRvYy5yZW1vdmVJbkxpbmUoaSwgbGluZS5sZW5ndGggLSBtWzBdLmxlbmd0aCwgbGluZS5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIGlmIChtID0gbGluZS5tYXRjaChyZWdleHBTdGFydCkpXG4gICAgICAgICAgICAgICAgICAgIGRvYy5yZW1vdmVJbkxpbmUoaSwgbVsxXS5sZW5ndGgsIG1bMF0ubGVuZ3RoKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIHZhciB0ZXN0UmVtb3ZlID0gZnVuY3Rpb24obGluZSwgcm93KSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlZ2V4cFN0YXJ0LnRlc3QobGluZSkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIHZhciB0b2tlbnMgPSBzZXNzaW9uLmdldFRva2Vucyhyb3cpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdG9rZW5zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbnNbaV0udHlwZSA9PT0gXCJjb21tZW50XCIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkodGhpcy5saW5lQ29tbWVudFN0YXJ0KSkge1xuICAgICAgICAgICAgICAgIHZhciByZWdleHBTdGFydCA9IHRoaXMubGluZUNvbW1lbnRTdGFydC5tYXAobGFuZy5lc2NhcGVSZWdFeHApLmpvaW4oXCJ8XCIpO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lQ29tbWVudFN0YXJ0ID0gdGhpcy5saW5lQ29tbWVudFN0YXJ0WzBdO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVnZXhwU3RhcnQgPSBsYW5nLmVzY2FwZVJlZ0V4cCh0aGlzLmxpbmVDb21tZW50U3RhcnQpO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lQ29tbWVudFN0YXJ0ID0gdGhpcy5saW5lQ29tbWVudFN0YXJ0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVnZXhwU3RhcnQgPSBuZXcgUmVnRXhwKFwiXihcXFxccyopKD86XCIgKyByZWdleHBTdGFydCArIFwiKSA/XCIpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpbnNlcnRBdFRhYlN0b3AgPSBzZXNzaW9uLmdldFVzZVNvZnRUYWJzKCk7XG5cbiAgICAgICAgICAgIHZhciB1bmNvbW1lbnQgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgdmFyIG0gPSBsaW5lLm1hdGNoKHJlZ2V4cFN0YXJ0KTtcbiAgICAgICAgICAgICAgICBpZiAoIW0pIHJldHVybjtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnQgPSBtWzFdLmxlbmd0aCwgZW5kID0gbVswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWYgKCFzaG91bGRJbnNlcnRTcGFjZShsaW5lLCBzdGFydCwgZW5kKSAmJiBtWzBdW2VuZCAtIDFdID09IFwiIFwiKVxuICAgICAgICAgICAgICAgICAgICBlbmQtLTtcbiAgICAgICAgICAgICAgICBkb2MucmVtb3ZlSW5MaW5lKGksIHN0YXJ0LCBlbmQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHZhciBjb21tZW50V2l0aFNwYWNlID0gbGluZUNvbW1lbnRTdGFydCArIFwiIFwiO1xuICAgICAgICAgICAgdmFyIGNvbW1lbnQgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFpZ25vcmVCbGFua0xpbmVzIHx8IC9cXFMvLnRlc3QobGluZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNob3VsZEluc2VydFNwYWNlKGxpbmUsIG1pbkluZGVudCwgbWluSW5kZW50KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvYy5pbnNlcnRJbkxpbmUoe3JvdzogaSwgY29sdW1uOiBtaW5JbmRlbnR9LCBjb21tZW50V2l0aFNwYWNlKTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgZG9jLmluc2VydEluTGluZSh7cm93OiBpLCBjb2x1bW46IG1pbkluZGVudH0sIGxpbmVDb21tZW50U3RhcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgdGVzdFJlbW92ZSA9IGZ1bmN0aW9uKGxpbmUsIGkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVnZXhwU3RhcnQudGVzdChsaW5lKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBzaG91bGRJbnNlcnRTcGFjZSA9IGZ1bmN0aW9uKGxpbmUsIGJlZm9yZSwgYWZ0ZXIpIHtcbiAgICAgICAgICAgICAgICB2YXIgc3BhY2VzID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoYmVmb3JlLS0gJiYgbGluZS5jaGFyQXQoYmVmb3JlKSA9PSBcIiBcIilcbiAgICAgICAgICAgICAgICAgICAgc3BhY2VzKys7XG4gICAgICAgICAgICAgICAgaWYgKHNwYWNlcyAlIHRhYlNpemUgIT0gMClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIHZhciBzcGFjZXMgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlIChsaW5lLmNoYXJBdChhZnRlcisrKSA9PSBcIiBcIilcbiAgICAgICAgICAgICAgICAgICAgc3BhY2VzKys7XG4gICAgICAgICAgICAgICAgaWYgKHRhYlNpemUgPiAyKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BhY2VzICUgdGFiU2l6ZSAhPSB0YWJTaXplIC0gMTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzcGFjZXMgJSB0YWJTaXplID09IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaXRlcihmdW4pIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdzsgaSA8PSBlbmRSb3c7IGkrKylcbiAgICAgICAgICAgICAgICBmdW4oZG9jLmdldExpbmUoaSksIGkpO1xuICAgICAgICB9XG5cblxuICAgICAgICB2YXIgbWluRW1wdHlMZW5ndGggPSBJbmZpbml0eTtcbiAgICAgICAgaXRlcihmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICB2YXIgaW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICAgICAgaWYgKGluZGVudCAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5kZW50IDwgbWluSW5kZW50KVxuICAgICAgICAgICAgICAgICAgICBtaW5JbmRlbnQgPSBpbmRlbnQ7XG4gICAgICAgICAgICAgICAgaWYgKHNob3VsZFJlbW92ZSAmJiAhdGVzdFJlbW92ZShsaW5lLCBpKSlcbiAgICAgICAgICAgICAgICAgICAgc2hvdWxkUmVtb3ZlID0gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1pbkVtcHR5TGVuZ3RoID4gbGluZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBtaW5FbXB0eUxlbmd0aCA9IGxpbmUubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAobWluSW5kZW50ID09IEluZmluaXR5KSB7XG4gICAgICAgICAgICBtaW5JbmRlbnQgPSBtaW5FbXB0eUxlbmd0aDtcbiAgICAgICAgICAgIGlnbm9yZUJsYW5rTGluZXMgPSBmYWxzZTtcbiAgICAgICAgICAgIHNob3VsZFJlbW92ZSA9IGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGluc2VydEF0VGFiU3RvcCAmJiBtaW5JbmRlbnQgJSB0YWJTaXplICE9IDApXG4gICAgICAgICAgICBtaW5JbmRlbnQgPSBNYXRoLmZsb29yKG1pbkluZGVudCAvIHRhYlNpemUpICogdGFiU2l6ZTtcblxuICAgICAgICBpdGVyKHNob3VsZFJlbW92ZSA/IHVuY29tbWVudCA6IGNvbW1lbnQpO1xuICAgIH07XG5cbiAgICB0aGlzLnRvZ2dsZUJsb2NrQ29tbWVudCA9IGZ1bmN0aW9uKHN0YXRlLCBzZXNzaW9uLCByYW5nZSwgY3Vyc29yKSB7XG4gICAgICAgIHZhciBjb21tZW50ID0gdGhpcy5ibG9ja0NvbW1lbnQ7XG4gICAgICAgIGlmICghY29tbWVudClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgaWYgKCFjb21tZW50LnN0YXJ0ICYmIGNvbW1lbnRbMF0pXG4gICAgICAgICAgICBjb21tZW50ID0gY29tbWVudFswXTtcblxuICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCBjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKTtcbiAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG5cbiAgICAgICAgdmFyIHNlbCA9IHNlc3Npb24uc2VsZWN0aW9uO1xuICAgICAgICB2YXIgaW5pdGlhbFJhbmdlID0gc2Vzc2lvbi5zZWxlY3Rpb24udG9PcmllbnRlZFJhbmdlKCk7XG4gICAgICAgIHZhciBzdGFydFJvdywgY29sRGlmZjtcblxuICAgICAgICBpZiAodG9rZW4gJiYgL2NvbW1lbnQvLnRlc3QodG9rZW4udHlwZSkpIHtcbiAgICAgICAgICAgIHZhciBzdGFydFJhbmdlLCBlbmRSYW5nZTtcbiAgICAgICAgICAgIHdoaWxlICh0b2tlbiAmJiAvY29tbWVudC8udGVzdCh0b2tlbi50eXBlKSkge1xuICAgICAgICAgICAgICAgIHZhciBpID0gdG9rZW4udmFsdWUuaW5kZXhPZihjb21tZW50LnN0YXJ0KTtcbiAgICAgICAgICAgICAgICBpZiAoaSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIGk7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0UmFuZ2UgPSBuZXcgUmFuZ2Uocm93LCBjb2x1bW4sIHJvdywgY29sdW1uICsgY29tbWVudC5zdGFydC5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3Ioc2Vzc2lvbiwgY3Vyc29yLnJvdywgY3Vyc29yLmNvbHVtbik7XG4gICAgICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcbiAgICAgICAgICAgIHdoaWxlICh0b2tlbiAmJiAvY29tbWVudC8udGVzdCh0b2tlbi50eXBlKSkge1xuICAgICAgICAgICAgICAgIHZhciBpID0gdG9rZW4udmFsdWUuaW5kZXhPZihjb21tZW50LmVuZCk7XG4gICAgICAgICAgICAgICAgaWYgKGkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyBpO1xuICAgICAgICAgICAgICAgICAgICBlbmRSYW5nZSA9IG5ldyBSYW5nZShyb3csIGNvbHVtbiwgcm93LCBjb2x1bW4gKyBjb21tZW50LmVuZC5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGVuZFJhbmdlKVxuICAgICAgICAgICAgICAgIHNlc3Npb24ucmVtb3ZlKGVuZFJhbmdlKTtcbiAgICAgICAgICAgIGlmIChzdGFydFJhbmdlKSB7XG4gICAgICAgICAgICAgICAgc2Vzc2lvbi5yZW1vdmUoc3RhcnRSYW5nZSk7XG4gICAgICAgICAgICAgICAgc3RhcnRSb3cgPSBzdGFydFJhbmdlLnN0YXJ0LnJvdztcbiAgICAgICAgICAgICAgICBjb2xEaWZmID0gLWNvbW1lbnQuc3RhcnQubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY29sRGlmZiA9IGNvbW1lbnQuc3RhcnQubGVuZ3RoO1xuICAgICAgICAgICAgc3RhcnRSb3cgPSByYW5nZS5zdGFydC5yb3c7XG4gICAgICAgICAgICBzZXNzaW9uLmluc2VydChyYW5nZS5lbmQsIGNvbW1lbnQuZW5kKTtcbiAgICAgICAgICAgIHNlc3Npb24uaW5z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AgICAgICAgICAgICBpZiAoYmVoYXZpb3Vyc1trZXldW2FjdGlvbl0pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJldCA9IGJlaGF2aW91cnNba2V5XVthY3Rpb25dLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHRoaXMuZ2V0S2V5d29yZHMgPSBmdW5jdGlvbihhcHBlbmQpIHtcbiAgICAgICAgaWYgKCF0aGlzLmNvbXBsZXRpb25LZXl3b3Jkcykge1xuICAgICAgICAgICAgdmFyIHJ1bGVzID0gdGhpcy4kdG9rZW5pemVyLnJ1bGVzO1xuICAgICAgICAgICAgdmFyIGNvbXBsZXRpb25LZXl3b3JkcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgcnVsZSBpbiBydWxlcykge1xuICAgICAgICAgICAgICAgIHZhciBydWxlSXRyID0gcnVsZXNbcnVsZV07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgciA9IDAsIGwgPSBydWxlSXRyLmxlbmd0aDsgciA8IGw7IHIrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGVJdHJbcl0udG9rZW4gPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgva2V5d29yZHxzdXBwb3J0fHN0b3JhZ2UvLnRlc3QocnVsZUl0cltyXS50b2tlbikpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGlvbktleXdvcmRzLnB1c2gocnVsZUl0cltyXS5yZWdleCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAodHlwZW9mIHJ1bGVJdHJbcl0udG9rZW4gPT09IFwib2JqZWN0XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGEgPSAwLCBhTGVuZ3RoID0gcnVsZUl0cltyXS50b2tlbi5sZW5ndGg7IGEgPCBhTGVuZ3RoOyBhKyspIHsgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9rZXl3b3JkfHN1cHBvcnR8c3RvcmFnZS8udGVzdChydWxlSXRyW3JdLnRva2VuW2FdKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcnVsZSA9IHJ1bGVJdHJbcl0ucmVnZXgubWF0Y2goL1xcKC4rP1xcKS9nKVthXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGlvbktleXdvcmRzLnB1c2gocnVsZS5zdWJzdHIoMSwgcnVsZS5sZW5ndGggLSAyKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jb21wbGV0aW9uS2V5d29yZHMgPSBjb21wbGV0aW9uS2V5d29yZHM7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFhcHBlbmQpXG4gICAgICAgICAgICByZXR1cm4gdGhpcy4ka2V5d29yZExpc3Q7XG4gICAgICAgIHJldHVybiBjb21wbGV0aW9uS2V5d29yZHMuY29uY2F0KHRoaXMuJGtleXdvcmRMaXN0IHx8IFtdKTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMuJGNyZWF0ZUtleXdvcmRMaXN0ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIGlmICghdGhpcy4kaGlnaGxpZ2h0UnVsZXMpXG4gICAgICAgICAgICB0aGlzLmdldFRva2VuaXplcigpO1xuICAgICAgICByZXR1cm4gdGhpcy4ka2V5d29yZ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x1bW4pICsgZGVsdGEubGluZXNbMF0gKyBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBhcmdzID0gW3JvdywgMV0uY29uY2F0KGRlbHRhLmxpbmVzKTtcbiAgICAgICAgICAgICAgICBkb2NMaW5lcy5zcGxpY2UuYXBwbHkoZG9jTGluZXMsIGFyZ3MpO1xuICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBkb2NMaW5lc1tyb3ddO1xuICAgICAgICAgICAgICAgIGRvY0xpbmVzW3JvdyArIGRlbHRhLmxpbmVzLmxlbmd0aCAtIDFdICs9IGxpbmUuc3Vic3RyaW5nKHN0YXJ0Q29sdW1uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIFwicmVtb3ZlXCI6XG4gICAgICAgICAgICB2YXIgZW5kQ29sdW1uID0gZGVsdGEuZW5kLmNvbHVtbjtcbiAgICAgICAgICAgIHZhciBlbmRSb3cgPSBkZWx0YS5lbmQucm93O1xuICAgICAgICAgICAgaWYgKHJvdyA9PT0gZW5kUm93KSB7XG4gICAgICAgICAgICAgICAgZG9jTGluZXNbcm93XSA9IGxpbmUuc3Vic3RyaW5nKDAsIHN0YXJ0Q29sdW1uKSArIGxpbmUuc3Vic3RyaW5nKGVuZENvbHVtbik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRvY0xpbmVzLnNwbGljZShcbiAgICAgICAgICAgICAgICAgICAgcm93LCBlbmRSb3cgLSByb3cgKyAxLFxuICAgICAgICAgICAgICAgICAgICBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBkb2NMaW5lc1tlbmRSb3ddLnN1YnN0cmluZyhlbmRDb2x1bW4pXG4gICAgICAgICAgICAgICAgKTtcbiAgICA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ICAgICAgICAgICAgY29sdW1uOiBkZWx0YVN0YXJ0LmNvbHVtblxuICAgICAgICB9O1xuICAgIH1cbiAgICB0aGlzLnNldFBvc2l0aW9uID0gZnVuY3Rpb24ocm93LCBjb2x1bW4sIG5vQ2xpcCkge1xuICAgICAgICB2YXIgcG9zO1xuICAgICAgICBpZiAobm9DbGlwKSB7XG4gICAgICAgICAgICBwb3MgPSB7XG4gICAgICAgICAgICAgICAgcm93OiByb3csXG4gICAgICAgICAgICAgICAgY29sdW1uOiBjb2x1bW5cbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBwb3MgPSB0aGlzLiRjbGlwUG9zaXRpb25Ub0RvY3VtZW50KHJvdywgY29sdW1uKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLnJvdyA9PSBwb3Mucm93ICYmIHRoaXMuY29sdW1uID09IHBvcy5jb2x1bW4pXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIG9sZCA9IHtcbiAgICAgICAgICAgIHJvdzogdGhpcy5yb3csXG4gICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uXG4gICAgICAgIH07XG5cbiAgICAgICAgdGhpcy5yb3cgPSBwb3Mucm93O1xuICAgICAgICB0aGlzLmNvbHVtbiA9IHBvcy5jb2x1bW47XG4gICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZVwiLCB7XG4gICAgICAgICAgICBvbGQ6IG9sZCxcbiAgICAgICAgICAgIHZhbHVlOiBwb3NcbiAgICAgICAgfSk7XG4gICAgfTtcbiAgICB0aGlzLmRldGFjaCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB0aGlzLmRvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoXCJjaGFuZ2VcIiwgdGhpcy4kb25DaGFuZ2UpO1xuICAgIH07XG4gICAgdGhpcy5hdHRhY2ggPSBmdW5jdGlvbihkb2MpIHtcbiAgICAgICAgdGhpc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3RoKCk7XG4gICAgICAgIGlmIChyb3cgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgcm93ID0gbGVuZ3RoO1xuICAgICAgICB9IGVsc2UgaWYgKHJvdyA8IDApIHtcbiAgICAgICAgICAgIHJvdyA9IDA7XG4gICAgICAgIH0gZWxzZSBpZiAocm93ID49IGxlbmd0aCkge1xuICAgICAgICAgICAgcm93ID0gbGVuZ3RoIC0gMTtcbiAgICAgICAgICAgIGNvbHVtbiA9IHVuZGVmaW5lZDtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbGluZSA9IHRoaXMuZ2V0TGluZShyb3cpO1xuICAgICAgICBpZiAoY29sdW1uID09IHVuZGVmaW5lZClcbiAgICAgICAgICAgIGNvbHVtbiA9IGxpbmUubGVuZ3RoO1xuICAgICAgICBjb2x1bW4gPSBNYXRoLm1pbihNYXRoLm1heChjb2x1bW4sIDApLCBsaW5lLmxlbmd0aCk7XG4gICAgICAgIHJldHVybiB7cm93OiByb3csIGNvbHVtbjogY29sdW1ufTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMuY2xvbmVQb3MgPSBmdW5jdGlvbihwb3MpIHtcbiAgICAgICAgcmV0dXJuIHtyb3c6IHBvcy5yb3csIGNvbHVtbjogcG9zLmNvbHVtbn07XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLnBvcyA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIHJldHVybiB7cm93OiByb3csIGNvbHVtbjogY29sdW1ufTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMuJGNsaXBQb3NpdGlvbiA9IGZ1bmN0aW9uKHBvc2l0aW9uKSB7XG4gICAgICAgIHZhciBsZW5ndGggPSB0aGlzLmdldExlbmd0aCgpO1xuICAgICAgICBpZiAocG9zaXRpb24ucm93ID49IGxlbmd0aCkge1xuICAgICAgICAgICAgcG9zaXRpb24ucm93ID0gTWF0aC5tYXgoMCwgbGVuZ3RoIC0gMSk7XG4gICAgICAg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0YXJ0Um93ID0gKCBkZWxldGVGaXJzdE5ld0xpbmUgPyBmaXJzdFJvdyAtIDEgICAgICAgICAgICAgICAgICA6IGZpcnN0Um93ICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICB2YXIgc3RhcnRDb2wgPSAoIGRlbGV0ZUZpcnN0TmV3TGluZSA/IHRoaXMuZ2V0TGluZShzdGFydFJvdykubGVuZ3RoIDogMCAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgIHZhciBlbmRSb3cgICA9ICggZGVsZXRlTGFzdE5ld0xpbmUgID8gbGFzdFJvdyArIDEgICAgICAgICAgICAgICAgICAgOiBsYXN0Um93ICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgdmFyIGVuZENvbCAgID0gKCBkZWxldGVMYXN0TmV3TGluZSAgPyAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHRoaXMuZ2V0TGluZShlbmRSb3cpLmxlbmd0aCApOyBcbiAgICAgICAgdmFyIHJhbmdlID0gbmV3IFJhbmdlKHN0YXJ0Um93LCBzdGFydENvbCwgZW5kUm93LCBlbmRDb2wpO1xuICAgICAgICB2YXIgZGVsZXRlZExpbmVzID0gdGhpcy4kbGluZXMuc2xpY2UoZmlyc3RSb3csIGxhc3RSb3cgKyAxKTtcbiAgICAgICAgXG4gICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7XG4gICAgICAgICAgICBzdGFydDogcmFuZ2Uuc3RhcnQsXG4gICAgICAgICAgICBlbmQ6IHJhbmdlLmVuZCxcbiAgICAgICAgICAgIGFjdGlvbjogXCJyZW1vdmVcIixcbiAgICAgICAgICAgIGxpbmVzOiB0aGlzLmdldExpbmVzRm9yUmFuZ2UocmFuZ2UpXG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gZGVsZXRlZExpbmVzO1xuICAgIH07XG4gICAgdGhpcy5yZW1vdmVOZXdMaW5lID0gZnVuY3Rpb24ocm93KSB7XG4gICAgICAgIGlmIChyb3cgPCB0aGlzLmdldExlbmd0aCgpIC0gMSAmJiByb3cgPj0gMCkge1xuICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKHtcbiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93LCB0aGlzLmdldExpbmUocm93KS5sZW5ndGgpLFxuICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgMSwgMCksXG4gICAgICAgICAgICAgICAgYWN0aW9uOiBcInJlbW92ZVwiLFxuICAgICAgICAgICAgICAgIGxpbmVzOiBbXCJcIiwgXCJcIl1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLnJlcGxhY2UgPSBmdW5jdGlvbihyYW5nZSwgdGV4dCkge1xuICAgICAgICBpZiAoIShyYW5nZSBpbnN0YW5jZW9mIFJhbmdlKSlcbiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhyYW5nZS5zdGFydCwgcmFuZ2UuZW5kKTtcbiAgICAgICAgaWYgKHRleHQubGVuZ3RoID09PSAwICYmIHJhbmdlLmlzRW1wdHkoKSlcbiAgICAgICAgICAgIHJldHVybiByYW5nZS5zdGFydDtcbiAgICAgICAgaWYgKHRleHQgPT0gdGhpcy5nZXRUZXh0UmFuZ2UocmFuZ2UpKVxuICAgICAgICAgICAgcmV0dXJuIHJhbmdlLmVuZDtcblxuICAgICAgICB0aGlzLnJlbW92ZShyYW5nZSk7XG4gICAgICAgIHZhciBlbmQ7XG4gICAgICAgIGlmICh0ZXh0KSB7XG4gICAgICAgICAgICBlbmQgPSB0aGlzLmluc2VydChyYW5nZS5zdGFydCwgdGV4dCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBlbmQgPSByYW5nZS5zdGFydDtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIGVuZDtcbiAgICB9O1xuICAgIHRoaXMuYXBwbHlEZWx0YXMgPSBmdW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uKGRlbHRhLCBNQVgpIHtcbiAgICAgICAgdmFyIGxpbmVzID0gZGVsdGEubGluZXM7XG4gICAgICAgIHZhciBsID0gbGluZXMubGVuZ3RoO1xuICAgICAgICB2YXIgcm93ID0gZGVsdGEuc3RhcnQucm93OyBcbiAgICAgICAgdmFyIGNvbHVtbiA9IGRlbHRhLnN0YXJ0LmNvbHVtbjtcbiAgICAgICAgdmFyIGZyb20gPSAwLCB0byA9IDA7XG4gICAgICAgIGRvIHtcbiAgICAgICAgICAgIGZyb20gPSB0bztcbiAgICAgICAgICAgIHRvICs9IE1BWCAtIDE7XG4gICAgICAgICAgICB2YXIgY2h1bmsgPSBsaW5lcy5zbGljZShmcm9tLCB0byk7XG4gICAgICAgICAgICBpZiAodG8gPiBsKSB7XG4gICAgICAgICAgICAgICAgZGVsdGEubGluZXMgPSBjaHVuaztcbiAgICAgICAgICAgICAgICBkZWx0YS5zdGFydC5yb3cgPSByb3cgKyBmcm9tO1xuICAgICAgICAgICAgICAgIGRlbHRhLnN0YXJ0LmNvbHVtbiA9IGNvbHVtbjtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNodW5rLnB1c2goXCJcIik7XG4gICAgICAgICAgICB0aGlzLmFwcGx5RGVsdGEoe1xuICAgICAgICAgICAgICAgIHN0YXJ0OiB0aGlzLnBvcyhyb3cgKyBmcm9tLCBjb2x1bW4pLFxuICAgICAgICAgICAgICAgIGVuZDogdGhpcy5wb3Mocm93ICsgdG8sIGNvbHVtbiA9IDApLFxuICAgICAgICAgICAgICAgIGFjdGlvbjogZGVsdGEuYWN0aW9uLFxuICAgICAgICAgICAgICAgIGxpbmVzOiBjaHVua1xuICAgICAgICAgICAgfSwgdHJ1ZSk7XG4gICAgICAgIH0gd2hpbGUodHJ1ZSk7XG4gICAgfTtcbiAgICB0aGlzLnJldmVydERlbHRhID0gZnVuY3Rpb24oZGVsdGEpIHtcbiAgICAgICAgdGhpcy5hcHBseUR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9rZW5pemVyO1xuXG4gICAgdmFyIHNlbGYgPSB0aGlzO1xuXG4gICAgdGhpcy4kd29ya2VyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIGlmICghc2VsZi5ydW5uaW5nKSB7IHJldHVybjsgfVxuXG4gICAgICAgIHZhciB3b3JrZXJTdGFydCA9IG5ldyBEYXRlKCk7XG4gICAgICAgIHZhciBjdXJyZW50TGluZSA9IHNlbGYuY3VycmVudExpbmU7XG4gICAgICAgIHZhciBlbmRMaW5lID0gLTE7XG4gICAgICAgIHZhciBkb2MgPSBzZWxmLmRvYztcblxuICAgICAgICB2YXIgc3RhcnRMaW5lID0gY3VycmVudExpbmU7XG4gICAgICAgIHdoaWxlIChzZWxmLmxpbmVzW2N1cnJlbnRMaW5lXSlcbiAgICAgICAgICAgIGN1cnJlbnRMaW5lKys7XG4gICAgICAgIFxuICAgICAgICB2YXIgbGVuID0gZG9jLmdldExlbmd0aCgpO1xuICAgICAgICB2YXIgcHJvY2Vzc2VkTGluZXMgPSAwO1xuICAgICAgICBzZWxmLnJ1bm5pbmcgPSBmYWxzZTtcbiAgICAgICAgd2hpbGUgKGN1cnJlbnRMaW5lIDwgbGVuKSB7XG4gICAgICAgICAgICBzZWxmLiR0b2tlbml6ZVJvdyhjdXJyZW50TGluZSk7XG4gICAgICAgICAgICBlbmRMaW5lID0gY3VycmVudExpbmU7XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgY3VycmVudExpbmUrKztcbiAgICAgICAgICAgIH0gd2hpbGUgKHNlbGYubGluZXNbY3VycmVudExpbmVdKTtcbiAgICAgICAgICAgIHByb2Nlc3NlZExpbmVzICsrO1xuICAgICAgICAgICAgaWYgKChwcm9jZXNzZWRMaW5lcyAlIDUgPT09IDApICYmIChuZXcgRGF0ZSgpIC0gd29ya2VyU3RhcnQpID4gMjApIHsgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgc2VsZi5ydW5uaW5nID0gc2V0VGltZW91dChzZWxmLiR3b3JrZXIsIDIwKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzZWxmLmN1cnJlbnRMaW5lID0gY3VycmVudExpbmU7XG4gICAgICAgIFxuICAgICAgICBpZiAoZW5kTGluZSA9PSAtMSlcbiAgICAgICAgICAgIGVuZExpbmUgPSBjdXJyZW50TGluZTtcblxuICAgICAgICBpZiAoc3RhcnRMaW5lIDw9IGVuZExpbmUpXG4gICAgICAgICAgICBzZWxmLmZpcmVVcGRhdGVFdmVudChzdGFydExpbmUsIGVuZExpbmUpO1xuICAgIH07XG59O1xuXG4oZnVuY3Rpb24oKXtcblxuICAgIG9vcC5pbXBsZW1lbnQodGhpcywgRXZlbnRFbWl0dGVyKTtcbiAgICB0aGlzLnNldFRva2VuaXplciA9IGZ1bmN0aW9uKHRva2VuaXplcikge1xuICAgICAgICB0aGlzLnRva2VuaXplciA9IHRva2VuaXplcjtcbiAgICAgICAgdGhpcy5saW5lcyA9IFtdO1xuICAgICAgICB0aGlzLnN0YXRlcyA9IFtdO1xuXG4gICAgICAgIHRoaXMuc3RhcnQoMCk7XG4gICAgfTtcbiAgICB0aGlzLnNldERvY3VtZW50ID0gZnVuY3Rpb24oZG9jKSB7XG4gICAgICAgIHRoaXMuZG9jID0gZG9jO1xuICAgICAgICB0aGlzLmxpbmVzID0gW107XG4gICAgICAgIHRoaXMuc3RhdGVzID0gW107XG5cbiAgICAgICAgdGhpcy5zdG9wKCk7XG4gICAgfTtcbiAgICB0aGlzLmZpcmVVcGRhdGVFdmVudCA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93KSB7XG4gICAgICAgIHZhciBkYXRhID0ge1xuICAgICAgICAgICAgZmlyc3Q6IGZpcnN0Um93LFxuICAgICAgICAgICAgbGFzdDogbGFzdFJvd1xuICAgICAgICB9O1xuICAgICAgICB0aGlzLl9zaWduYWwoXCJ1cGRhdGVcIiwge2RhdGE6IGRhdGF9K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ICAgICAgICAgICBjbXAsIHN0b3AsIGlzTmV3Um93ID0gdHJ1ZTtcblxuICAgICAgICBpZiAoZW5kUm93ID09IG51bGwpIHtcbiAgICAgICAgICAgIGVuZFJvdyA9IHRoaXMuZW5kLnJvdztcbiAgICAgICAgICAgIGVuZENvbHVtbiA9IHRoaXMuZW5kLmNvbHVtbjtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm9sZHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGZvbGQgPSBmb2xkc1tpXTtcblxuICAgICAgICAgICAgY21wID0gZm9sZC5yYW5nZS5jb21wYXJlU3RhcnQoZW5kUm93LCBlbmRDb2x1bW4pO1xuICAgICAgICAgICAgaWYgKGNtcCA9PSAtMSkge1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrKG51bGwsIGVuZFJvdywgZW5kQ29sdW1uLCBsYXN0RW5kLCBpc05ld1Jvdyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBzdG9wID0gY2FsbGJhY2sobnVsbCwgZm9sZC5zdGFydC5yb3csIGZvbGQuc3RhcnQuY29sdW1uLCBsYXN0RW5kLCBpc05ld1Jvdyk7XG4gICAgICAgICAgICBzdG9wID0gIXN0b3AgJiYgY2FsbGJhY2soZm9sZC5wbGFjZWhvbGRlciwgZm9sZC5zdGFydC5yb3csIGZvbGQuc3RhcnQuY29sdW1uLCBsYXN0RW5kKTtcbiAgICAgICAgICAgIGlmIChzdG9wIHx8IGNtcCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlzTmV3Um93ID0gIWZvbGQuc2FtZVJvdztcbiAgICAgICAgICAgIGxhc3RFbmQgPSBmb2xkLmVuZC5jb2x1bW47XG4gICAgICAgIH1cbiAgICAgICAgY2FsbGJhY2sobnVsbCwgZW5kUm93LCBlbmRDb2x1bW4sIGxhc3RFbmQsIGlzTmV3Um93KTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXROZXh0Rm9sZFRvID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgdmFyIGZvbGQsIGNtcDtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmZvbGRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBmb2xkID0gdGhpcy5mb2xkc1tpXTtcbiAgICAgICAgICAgIGNtcCA9IGZvbGQucmFuZ2UuY29tcGFyZUVuZChyb3csIGNvbHVtbik7XG4gICAgICAgICAgICBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZm9sZDogZm9sZCxcbiAgICAgICAgICAgICAgICAgICAga2luZDogXCJhZnRlclwiXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY21wID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZm9sZDogZm9sZCxcbiAgICAgICAgICAgICAgICAgICAga2luZDogXCJpbnNpZGVcIlxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcblxuICAgIHRoaXMuYWRkUmVtb3ZlQ2hhcnMgPSBmdW5jdGlvbihyb3csIGNvbHVtbiwgbGVuKSB7XG4gICAgICAgIHZhciByZXQgPSB0aGlzLmdldE5leHRGb2xkVG8ocm93LCBjb2x1bW4pLFxuICAgICAgICAgICAgZm9sZCwgZm9sZHM7XG4gICAgICAgIGlmIChyZXQpIHtcbiAgICAgICAgICAgIGZvbGQgPSByZXQuZm9sZDtcbiAgICAgICAgICAgIGlmIChyZXQua2luZCA9PSBcImluc2lkZVwiXG4gICAgICAgICAgICAgICAgJiYgZm9sZC5zdGFydC5jb2x1bW4gIT0gY29sdW1uXG4gICAgICAgICAgICAgICAgJiYgZm9sZC5zdGFydC5yb3cgIT0gcm93KVxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHdpbmRvdy5jb25zb2xlICYmIHdpbmRvdy5jb25zb2xlLmxvZyhyb3csIGNvbHVtbiwgZm9sZCk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGZvbGQuc3RhcnQucm93ID09IHJvdykge1xuICAgICAgICAgICAgICAgIGZvbGRzID0gdGhpcy5mb2xkcztcbiAgICAgICAgICAgICAgICB2YXIgaSA9IGZvbGRzLmluZGV4T2YoZm9sZCk7XG4gICAgICAgICAgICAgICAgaWYgKGkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gKz0gbGVuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3IgKGk7IGkgPCBmb2xkcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBmb2xkID0gZm9sZHNbaV07XG4gICAgICAgICAgICAgICAgICAgIGZvbGQuc3RhcnQuY29sdW1uICs9IGxlbjtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFmb2xkLnNhbWVSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmb2xkLmVuZC5jb2x1bW4gKz0gbGVuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gKz0gbGVuO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuc3BsaXQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICB2YXIgcG9zID0gdGhpcy5nZXROZXh0Rm9sZFRvKHJvdywgY29sdW1uKTtcbiAgICAgICAgXG4gICAgICAgIGlmICghcG9zIHx8IHBvcy5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luZU5leHQpLCAxKTtcbiAgICB9O1xuXG4gICAgdGhpcy50b1N0cmluZyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgcmV0ID0gW3RoaXMucmFuZ2UudG9TdHJpbmcoKSArIFwiOiBbXCIgXTtcblxuICAgICAgICB0aGlzLmZvbGRzLmZvckVhY2goZnVuY3Rpb24oZm9sZCkge1xuICAgICAgICAgICAgcmV0LnB1c2goXCIgIFwiICsgZm9sZC50b1N0cmluZygpKTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldC5wdXNoKFwiXVwiKTtcbiAgICAgICAgcmV0dXJuIHJldC5qb2luKFwiXFxuXCIpO1xuICAgIH07XG5cbiAgICB0aGlzLmlkeFRvUG9zaXRpb24gPSBmdW5jdGlvbihpZHgpIHtcbiAgICAgICAgdmFyIGxhc3RGb2xkRW5kQ29sdW1uID0gMDtcblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuZm9sZHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmb2xkID0gdGhpcy5mb2xkc1tpXTtcblxuICAgICAgICAgICAgaWR4IC09IGZvbGQuc3RhcnQuY29sdW1uIC0gbGFzdEZvbGRFbmRDb2x1bW47XG4gICAgICAgICAgICBpZiAoaWR4IDwgMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHJvdzogZm9sZC5zdGFydC5yb3csXG4gICAgICAgICAgICAgICAgICAgIGNvbHVtbjogZm9sZC5zdGFydC5jb2x1bW4gKyBpZHhcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZHggLT0gZm9sZC5wbGFjZWhvbGRlci5sZW5ndGg7XG4gICAgICAgICAgICBpZiAoaWR4IDwgMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBmb2xkLnN0YXJ0O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsYXN0Rm9sZEVu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BpZiAoY21wRW5kID4gMClcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIHZhciBjbXBTdGFydCA9IGNvbXBhcmVQb2ludHMocG9zLCByYW5nZS5zdGFydCk7XG4gICAgICAgICAgICBpZiAoY21wRW5kID09PSAwKVxuICAgICAgICAgICAgICAgIHJldHVybiBleGNsdWRlRWRnZXMgJiYgY21wU3RhcnQgIT09IDAgPyAtaS0yIDogaTtcbiAgICAgICAgICAgIGlmIChjbXBTdGFydCA+IDAgfHwgKGNtcFN0YXJ0ID09PSAwICYmICFleGNsdWRlRWRnZXMpKVxuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuXG4gICAgICAgICAgICByZXR1cm4gLWktMTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gLWkgLSAxO1xuICAgIH07XG5cbiAgICB0aGlzLmFkZCA9IGZ1bmN0aW9uKHJhbmdlKSB7XG4gICAgICAgIHZhciBleGNsdWRlRWRnZXMgPSAhcmFuZ2UuaXNFbXB0eSgpO1xuICAgICAgICB2YXIgc3RhcnRJbmRleCA9IHRoaXMucG9pbnRJbmRleChyYW5nZS5zdGFydCwgZXhjbHVkZUVkZ2VzKTtcbiAgICAgICAgaWYgKHN0YXJ0SW5kZXggPCAwKVxuICAgICAgICAgICAgc3RhcnRJbmRleCA9IC1zdGFydEluZGV4IC0gMTtcblxuICAgICAgICB2YXIgZW5kSW5kZXggPSB0aGlzLnBvaW50SW5kZXgocmFuZ2UuZW5kLCBleGNsdWRlRWRnZXMsIHN0YXJ0SW5kZXgpO1xuXG4gICAgICAgIGlmIChlbmRJbmRleCA8IDApXG4gICAgICAgICAgICBlbmRJbmRleCA9IC1lbmRJbmRleCAtIDE7XG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIGVuZEluZGV4Kys7XG4gICAgICAgIHJldHVybiB0aGlzLnJhbmdlcy5zcGxpY2Uoc3RhcnRJbmRleCwgZW5kSW5kZXggLSBzdGFydEluZGV4LCByYW5nZS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uICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICBpZiAoY21wID09IDAgJiYgIXJhbmdlLmlzRW1wdHkoKSAmJiAhbmV4dC5pc0VtcHR5KCkpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG5cbiAgICAgICAgICAgIGlmIChjb21wYXJlUG9pbnRzKHJhbmdlLmVuZCwgbmV4dC5lbmQpIDwgMCkge1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5yb3cgPSBuZXh0LmVuZC5yb3c7XG4gICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbiA9IG5leHQuZW5kLmNvbHVtbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGlzdC5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICByZW1vdmVkLnB1c2gobmV4dCk7XG4gICAgICAgICAgICBuZXh0ID0gcmFuZ2U7XG4gICAgICAgICAgICBpLS07XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHRoaXMucmFuZ2VzID0gbGlzdDtcblxuICAgICAgICByZXR1cm4gcmVtb3ZlZDtcbiAgICB9O1xuXG4gICAgdGhpcy5jb250YWlucyA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIHJldHVybiB0aGlzLnBvaW50SW5kZXgoe3Jvdzogcm93LCBjb2x1bW46IGNvbHVtbn0pID49IDA7XG4gICAgfTtcblxuICAgIHRoaXMuY29udGFpbnNQb2ludCA9IGZ1bmN0aW9uKHBvcykge1xuICAgICAgICByZXR1cm4gdGhpcy5wb2ludEluZGV4KHBvcykgPj0gMDtcbiAgICB9O1xuXG4gICAgdGhpcy5yYW5nZUF0UG9pbnQgPSBmdW5jdGlvbihwb3MpIHtcbiAgICAgICAgdmFyIGkgPSB0aGlzLnBvaW50SW5kZXgocG9zKTtcbiAgICAgICAgaWYgKGkgPj0gMClcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnJhbmdlc1tpXTtcbiAgIC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SA9IDAsIG4gPSByYW5nZXMubGVuZ3RoOyBpIDwgbjsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgciA9IHJhbmdlc1tpXTtcbiAgICAgICAgICAgIGlmIChyLmVuZC5yb3cgPCBzdGFydFJvdylcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChyLnN0YXJ0LnJvdyA+IHN0YXJ0Um93KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBpZiAoci5zdGFydC5yb3cgPT0gc3RhcnRSb3cgJiYgci5zdGFydC5jb2x1bW4gPj0gc3RhcnQuY29sdW1uICkge1xuICAgICAgICAgICAgICAgIGlmIChyLnN0YXJ0LmNvbHVtbiA9PSBzdGFydC5jb2x1bW4gJiYgdGhpcy4kaW5zZXJ0UmlnaHQpIHtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByLnN0YXJ0LmNvbHVtbiArPSBjb2xEaWZmO1xuICAgICAgICAgICAgICAgICAgICByLnN0YXJ0LnJvdyArPSBsaW5lRGlmO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyLmVuZC5yb3cgPT0gc3RhcnRSb3cgJiYgci5lbmQuY29sdW1uID49IHN0YXJ0LmNvbHVtbikge1xuICAgICAgICAgICAgICAgIGlmIChyLmVuZC5jb2x1bW4gPT0gc3RhcnQuY29sdW1uICYmIHRoaXMuJGluc2VydFJpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoci5lbmQuY29sdW1uID09IHN0YXJ0LmNvbHVtbiAmJiBjb2xEaWZmID4gMCAmJiBpIDwgbiAtIDEpIHsgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGlmIChyLmVuZC5jb2x1bW4gPiByLnN0YXJ0LmNvbHV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biAgICAgICAgdmFyIGZvdW5kRm9sZHMgPSBbXTtcblxuICAgICAgICBzdGFydC5jb2x1bW4gKz0gMTtcbiAgICAgICAgZW5kLmNvbHVtbiAtPSAxO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm9sZExpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgY21wID0gZm9sZExpbmVzW2ldLnJhbmdlLmNvbXBhcmVSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICBpZiAoY21wID09IDIpIHtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGNtcCA9PSAtMikge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgZm9sZHMgPSBmb2xkTGluZXNbaV0uZm9sZHM7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGZvbGRzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGZvbGQgPSBmb2xkc1tqXTtcbiAgICAgICAgICAgICAgICBjbXAgPSBmb2xkLnJhbmdlLmNvbXBhcmVSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICAgICAgaWYgKGNtcCA9PSAtMikge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNtcCA9PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgIGlmIChjbXAgPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZvdW5kRm9sZHMucHVzaChmb2xkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBzdGFydC5jb2x1bW4gLT0gM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bmUgPSBmb2xkTGluZSB8fCB0aGlzLmdldEZvbGRMaW5lKHJvdyk7XG4gICAgICAgIGlmICghZm9sZExpbmUpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICB2YXIgbGFzdEZvbGQgPSB7XG4gICAgICAgICAgICBlbmQ6IHsgY29sdW1uOiAwIH1cbiAgICAgICAgfTtcbiAgICAgICAgdmFyIHN0ciwgZm9sZDtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBmb2xkTGluZS5mb2xkcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgZm9sZCA9IGZvbGRMaW5lLmZvbGRzW2ldO1xuICAgICAgICAgICAgdmFyIGNtcCA9IGZvbGQucmFuZ2UuY29tcGFyZUVuZChyb3csIGNvbHVtbik7XG4gICAgICAgICAgICBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICAgICAgc3RyID0gdGhpc1xuICAgICAgICAgICAgICAgICAgICAuZ2V0TGluZShmb2xkLnN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICAgICAgLnN1YnN0cmluZyhsYXN0Rm9sZC5lbmQuY29sdW1uLCBmb2xkLnN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjbXAgPT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RGb2xkID0gZm9sZDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIXN0cilcbiAgICAgICAgICAgIHN0ciA9IHRoaXMuZ2V0TGluZShmb2xkLnN0YXJ0LnJvdykuc3Vic3RyaW5nKGxhc3RGb2xkLmVuZC5jb2x1bW4pO1xuXG4gICAgICAgIGlmICh0cmltID09IC0xKVxuICAgICAgICAgICAgcmV0dXJuIHN0ci5zdWJzdHJpbmcoMCwgY29sdW1uIC0gbGFzdEZvbGQuZW5kLmNvbHVtbik7XG4gICAgICAgIGVsc2UgaWYgKHRyaW0gPT0gMSlcbiAgICAgICAgICAgIHJldHVybiBzdHIuc3Vic3RyaW5nKGNvbHVtbiAtIGxhc3RGb2xkLmVuZC5jb2x1bW4pO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICByZXR1cm4gc3RyO1xuICAgIH07XG5cbiAgICB0aGlzLmdldEZvbGRMaW5lID0gZnVuY3Rpb24oZG9jUm93LCBzdGFydEZvbGRMaW5lKSB7XG4gICAgICAgIHZhciBmb2xkRGF0YSA9IHRoaXMuJGZvbGREYXRhO1xuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIGlmIChzdGFydEZvbGRMaW5lKVxuICAgICAgICAgICAgaSA9IGZvbGREYXRhLmluZGV4T2Yoc3RhcnRGb2xkTGluZSk7XG4gICAgICAgIGlmIChpID09IC0xKVxuICAgICAgICAgICAgaSA9IDA7XG4gICAgICAgIGZvciAoaTsgaSA8IGZvbGREYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSBmb2xkRGF0YVtpXTtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZS5zdGFydC5yb3cgPD0gZG9jUm93ICYmIGZvbGRMaW5lLmVuZC5yb3cgPj0gZG9jUm93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZvbGRMaW5lO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChmb2xkTGluZS5lbmQucm93ID4gZG9jUm93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcbiAgICB0aGlzLmdldE5leHRGb2xkTGluZSA9IGZ1bmN0aW9uKGRvY1Jvdywgc3RhcnRGb2xkTGluZSkge1xuICAgICAgICB2YXIgZm9sZERhdGEgPSB0aGlzLiRmb2xkRGF0YTtcbiAgICAgICAgdmFyIGkgPSAwO1xuICAgICAgICBpZiAoc3RhcnRGb2xkTGluZSlcbiAgICAgICAgICAgIGkgPSBmb2xkRGF0YS5pbmRleE9mKHN0YXJ0Rm9sZExpbmUpO1xuICAgICAgICBpZiAoaSA9PSAtMSlcbiAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICBmb3IgKGk7IGkgPCBmb2xkRGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gZm9sZERhdGFbaV07XG4gICAgICAgICAgICBpZiAoZm9sZExpbmUuZW5kLnJvdyA+PSBkb2NSb3cpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm9sZExpbmU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Rm9sZGVkUm93Q291bnQgPSBmdW5jdGlvbihmaXJzdCwgbGFzdCkge1xuICAgICAgICB2YXIgZm9sZERhdGEgPSB0aGlzLiRmb2xkRGF0YSwgcm93Q291bnQgPSBsYXN0LWZpcnN0KzE7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm9sZERhdGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGREYXRhW2ldLFxuICAgICAgICAgICAgICAgIGVuZCA9IGZvbGRMaW5lLmVuZC5yb3csXG4gICAgICAgICAgICAgICAgc3RhcnQgPSBmb2xkTGluZS5zdGFydC5yb3c7XG4gICAgICAgICAgICBpZiAoZW5kID49IGxhc3QpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhcnQgPCBsYXN0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGFydCA+PSBmaXJzdClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvd0NvdW50IC09IGxhc3Qtc3RhcnQ7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJvd0NvdW50ID0gMDsgLy8gaW4gb25lIGZvbGRcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGVuZCA+PSBmaXJzdCl7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXJ0ID49IGZpcnN0KSAvLyBmb2xkIGluc2lkZSByYW5nZVxuICAgICAgICAgICAgICAgICAgICByb3dDb3VudCAtPSAgZW5kLXN0YXJ0O1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcm93Q291bnQgLT0gIGVuZC1maXJzdCsxO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByb3dDb3VudDtcbiAgICB9O1xuXG4gICAgdGhpcy4kYWRkRm9sZExpbmUgPSBmdW5jdGlvbihmb2xkTGluZSkge1xuICAgICAgICB0aGlzLiRmb2xkRGF0YS5wdXNoKGZvbGRMaW5lKTtcbiAgICAgICAgdGhpcy4kZm9sZERhdGEuc29ydChmdW5jdGlvbihhLCBiKSB7XG4gICAgICAgICAgICByZXR1cm4gYS5zdGFydC5yb3cgLSBiLnN0YXJ0LnJvdztcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBmb2xkTGluZTtcbiAgICB9O1xuICAgIHRoaXMuYWRkRm9sZCA9IGZ1bmN0aW9uKHBsYWNlaG9sZGVyLCByYW5nZSkge1xuICAgICAgICB2YXIgZm9sZERhdGEgPSB0aGlzLiRmb2xkRGF0YTtcbiAgICAgICAgdmFyIGFkZGVkID0gZmFsc2U7XG4gICAgICAgIHZhciBmb2xkO1xuICAgICAgICBcbiAgICAgICAgaWYgKHBsYWNlaG9sZGVyIGluc3RhbmNlb2YgRm9sZClcbiAgICAgICAgICAgIGZvbGQgPSBwbGFjZWhvbGRlcjtcbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBmb2xkID0gbmV3IEZvbGQocmFuZ2UsIHBsYWNla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rm9sZCk7XG4gICAgICAgIFxuICAgICAgICBpZiAoZW5kRm9sZCAmJiAhZW5kRm9sZC5yYW5nZS5pc0VuZChlbmRSb3csIGVuZENvbHVtbikpXG4gICAgICAgICAgICB0aGlzLnJlbW92ZUZvbGQoZW5kRm9sZCk7XG4gICAgICAgIHZhciBmb2xkcyA9IHRoaXMuZ2V0Rm9sZHNJblJhbmdlKGZvbGQucmFuZ2UpO1xuICAgICAgICBpZiAoZm9sZHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgdGhpcy5yZW1vdmVGb2xkcyhmb2xkcyk7XG4gICAgICAgICAgICBmb2xkcy5mb3JFYWNoKGZ1bmN0aW9uKHN1YkZvbGQpIHtcbiAgICAgICAgICAgICAgICBmb2xkLmFkZFN1YkZvbGQoc3ViRm9sZCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm9sZERhdGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGREYXRhW2ldO1xuICAgICAgICAgICAgaWYgKGVuZFJvdyA9PSBmb2xkTGluZS5zdGFydC5yb3cpIHtcbiAgICAgICAgICAgICAgICBmb2xkTGluZS5hZGRGb2xkKGZvbGQpO1xuICAgICAgICAgICAgICAgIGFkZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRSb3cgPT0gZm9sZExpbmUuZW5kLnJvdykge1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lLmFkZEZvbGQoZm9sZCk7XG4gICAgICAgICAgICAgICAgYWRkZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGlmICghZm9sZC5zYW1lUm93KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZU5leHQgPSBmb2xkRGF0YVtpICsgMV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChmb2xkTGluZU5leHQgJiYgZm9sZExpbmVOZXh0LnN0YXJ0LnJvdyA9PSBlbmRSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLm1lcmdlKGZvbGRMaW5lTmV4dCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZW5kUm93IDw9IGZvbGRMaW5lLnN0YXJ0LnJvdykge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKCFhZGRlZClcbiAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy4kYWRkRm9sZExpbmUobmV3IEZvbGRMaW5lKHRoaXMuJGZvbGREYXRhLCBmb2xkKSk7XG5cbiAgICAgICAgaWYgKHRoaXMuJHVzZVdyYXBNb2RlKVxuICAgICAgICAgICAgdGhpcy4kdXBkYXRlV3JhcERhdGEoZm9sZExpbmUuc3RhcnQucm93LCBmb2xkTGluZS5zdGFydC5yb3cpO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICB0aGlzLiR1cGRhdGVSb3dMZW5ndGhDYWNoZShmb2xkTGluZS5zdGFydC5yb3csIGZvbGRMaW5lLnN0YXJ0LnJvdyk7XG4gICAgICAgIHRoaXMuJG1vZGlmaWVkID0gdHJ1ZTtcbiAgICAgICAgdGhpcy5fc2lnbmFsKFwiY2hhbmdlRm9sZFwiLCB7IGRhdGE6IGZvbGQsIGFjdGlvbjogXCJhZGRcIiB9KTtcblxuICAgICAgICByZXR1cm4gZm9sZDtcbiAgICB9O1xuXG4gICAgdGhpcy5hZGRGb2xkcyA9IGZ1bmN0aW9uKGZvbGRzKSB7XG4gICAgICAgIGZvbGRzLmZvckVhY2goZnVuY3Rpb24oZm9sZCkge1xuICAgICAgICAgICAg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aW5lLmVuZC5yb3c7XG4gICAgICAgIGlmIChlbmRDb2x1bW4gPT0gbnVsbClcbiAgICAgICAgICAgIGVuZENvbHVtbiA9IHRoaXMuZ2V0TGluZShlbmRSb3cpLmxlbmd0aDtcbiAgICAgICAgdmFyIGRvYyA9IHRoaXMuZG9jO1xuICAgICAgICB2YXIgdGV4dExpbmUgPSBcIlwiO1xuXG4gICAgICAgIGZvbGRMaW5lLndhbGsoZnVuY3Rpb24ocGxhY2Vob2xkZXIsIHJvdywgY29sdW1uLCBsYXN0Q29sdW1uKSB7XG4gICAgICAgICAgICBpZiAocm93IDwgc3RhcnRSb3cpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgaWYgKHJvdyA9PSBzdGFydFJvdykge1xuICAgICAgICAgICAgICAgIGlmIChjb2x1bW4gPCBzdGFydENvbHVtbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGxhc3RDb2x1bW4gPSBNYXRoLm1heChzdGFydENvbHVtbiwgbGFzdENvbHVtbik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwbGFjZWhvbGRlciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGV4dExpbmUgKz0gcGxhY2Vob2xkZXI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRleHRMaW5lICs9IGRvYy5nZXRMaW5lKHJvdykuc3Vic3RyaW5nKGxhc3RDb2x1bW4sIGNvbHVtbik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIGVuZFJvdywgZW5kQ29sdW1uKTtcbiAgICAgICAgcmV0dXJuIHRleHRMaW5lO1xuICAgIH07XG5cbiAgICB0aGlzLmdldERpc3BsYXlMaW5lID0gZnVuY3Rpb24ocm93LCBlbmRDb2x1bW4sIHN0YXJ0Um93LCBzdGFydENvbHVtbikge1xuICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLmdldEZvbGR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aWYgKHJhbmdlLmlzRW1wdHkoKSkge1xuICAgICAgICAgICAgdmFyIGN1cnNvciA9IHJhbmdlLnN0YXJ0O1xuICAgICAgICAgICAgZm9sZCA9IHRoaXMuZ2V0Rm9sZEF0KGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuXG4gICAgICAgICAgICBpZiAoZm9sZCkge1xuICAgICAgICAgICAgICAgIHRoaXMuZXhwYW5kRm9sZChmb2xkKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGJyYWNrZXRQb3MgPSB0aGlzLmZpbmRNYXRjaGluZ0JyYWNrZXQoY3Vyc29yKSkge1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZS5jb21wYXJlUG9pbnQoYnJhY2tldFBvcykgPT0gMSkge1xuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQgPSBicmFja2V0UG9zO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0ID0gYnJhY2tldFBvcztcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQuY29sdW1uKys7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4tLTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGJyYWNrZXRQb3MgPSB0aGlzLmZpbmRNYXRjaGluZ0JyYWNrZXQoe3JvdzogY3Vyc29yLnJvdywgY29sdW1uOiBjdXJzb3IuY29sdW1uICsgMX0pKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbXBhcmVQb2ludChicmFja2V0UG9zKSA9PSAxKVxuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQgPSBicmFja2V0UG9zO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQgPSBicmFja2V0UG9zO1xuXG4gIC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ndGggPCA0KVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyID0gcGxhY2Vob2xkZXIudHJpbSgpLnN1YnN0cmluZygwLCAyKSArIFwiLi5cIjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuYWRkRm9sZChwbGFjZWhvbGRlciwgcmFuZ2UpO1xuICAgIH07XG5cbiAgICB0aGlzLmdldENvbW1lbnRGb2xkUmFuZ2UgPSBmdW5jdGlvbihyb3csIGNvbHVtbiwgZGlyKSB7XG4gICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHRoaXMsIHJvdywgY29sdW1uKTtcbiAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgIHZhciB0eXBlID0gdG9rZW4udHlwZTtcbiAgICAgICAgaWYgKHRva2VuICYmIC9eY29tbWVudHxzdHJpbmcvLnRlc3QodHlwZSkpIHtcbiAgICAgICAgICAgIHR5cGUgPSB0eXBlLm1hdGNoKC9jb21tZW50fHN0cmluZy8pWzBdO1xuICAgICAgICAgICAgaWYgKHR5cGUgPT0gXCJjb21tZW50XCIpXG4gICAgICAgICAgICAgICAgdHlwZSArPSBcInxkb2Mtc3RhcnRcIjtcbiAgICAgICAgICAgIHZhciByZSA9IG5ldyBSZWdFeHAodHlwZSk7XG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBuZXcgUmFuZ2UoKTtcbiAgICAgICAgICAgIGlmIChkaXIgIT0gMSkge1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICB9IHdoaWxlICh0b2tlbiAmJiByZS50ZXN0KHRva2VuLnR5cGUpKTtcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICByYW5nZS5zdGFydC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgIHJhbmdlLnN0YXJ0LmNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgMjtcblxuICAgICAgICAgICAgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcih0aGlzLCByb3csIGNvbHVtbik7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChkaXIgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGFzdFJvdyA9IC0xO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFJvdyA9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlID0gdGhpcy5nZXRTdGF0ZShpdGVyYXRvci4kcm93KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcmUudGVzdChzdGF0ZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdFJvdyA9IGl0ZXJhdG9yLiRyb3c7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlcmF0b3IuJHJvdyA+IGxhc3RSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgcmUudGVzdCh0b2tlbi50eXBlKSk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva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gPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShyb3cpO1xuICAgICAgICAgICAgaWYgKHJhbmdlICYmIHJhbmdlLmlzTXVsdGlMaW5lKClcbiAgICAgICAgICAgICAgICAmJiByYW5nZS5lbmQucm93IDw9IGVuZFJvd1xuICAgICAgICAgICAgICAgICYmIHJhbmdlLnN0YXJ0LnJvdyA+PSBzdGFydFJvd1xuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgcm93ID0gcmFuZ2UuZW5kLnJvdztcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZCA9IHRoaXMuYWRkRm9sZChcIi4uLlwiLCByYW5nZSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChmb2xkKVxuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZC5jb2xsYXBzZUNoaWxkcmVuID0gZGVwdGg7XG4gICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7fVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLiRmb2xkU3R5bGVzID0ge1xuICAgICAgICBcIm1hbnVhbFwiOiAxLFxuICAgICAgICBcIm1hcmtiZWdpblwiOiAxLFxuICAgICAgICBcIm1hcmtiZWdpbmVuZFwiOiAxXG4gICAgfTtcbiAgICB0aGlzLiRmb2xkU3R5bGUgPSBcIm1hcmtiZWdpblwiO1xuICAgIHRoaXMuc2V0Rm9sZFN0eWxlID0gZnVuY3Rpb24oc3R5bGUpIHtcbiAgICAgICAgaWYgKCF0aGlzLiRmb2xkU3R5bGVzW3N0eWxlXSlcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcImludmFsaWQgZm9sZCBzdHlsZTogXCIgKyBzdHlsZSArIFwiW1wiICsgT2JqZWN0LmtleXModGhpcy4kZm9sZFN0eWxlcykuam9pbihcIiwgXCIpICsgXCJdXCIpO1xuICAgICAgICBcbiAgICAgICAgaWYgKHRoaXMuJGZvbGRTdH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wiKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2UoaSk7XG4gICAgICAgICAgICAgICAgaWYgKCFmaXJzdFJhbmdlKVxuICAgICAgICAgICAgICAgICAgICBmaXJzdFJhbmdlID0gcmFuZ2U7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlICYmIHJhbmdlLmVuZC5yb3cgPj0gcm93KVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGktLTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByYW5nZTogaSAhPT0gLTEgJiYgcmFuZ2UsXG4gICAgICAgICAgICBmaXJzdFJhbmdlOiBmaXJzdFJhbmdlXG4gICAgICAgIH07XG4gICAgfTtcblxuICAgIHRoaXMub25Gb2xkV2lkZ2V0Q2xpY2sgPSBmdW5jdGlvbihyb3csIGUpIHtcbiAgICAgICAgZSA9IGUuZG9tRXZlbnQ7XG4gICAgICAgIHZhciBvcHRpb25zID0ge1xuICAgICAgICAgICAgY2hpbGRyZW46IGUuc2hpZnRLZXksXG4gICAgICAgICAgICBhbGw6IGUuY3RybEtleSB8fCBlLm1ldGFLZXksXG4gICAgICAgICAgICBzaWJsaW5nczogZS5hbHRLZXlcbiAgICAgICAgfTtcbiAgICAgICAgXG4gICAgICAgIHZhciByYW5nZSA9IHRoaXMuJHRvZ2dsZUZvbGRXaWRnZXQocm93LCBvcHRpb25zKTtcbiAgICAgICAgaWYgKCFyYW5nZSkge1xuICAgICAgICAgICAgdmFyIGVsID0gKGUudGFyZ2V0IHx8IGUuc3JjRWxlbWVudCk7XG4gICAgICAgICAgICBpZiAoZWwgJiYgL2FjZV9mb2xkLXdpZGdldC8udGVzdChlbC5jbGFzc05hbWUpKVxuICAgICAgICAgICAgICAgIGVsLmNsYXNzTmFtZSArPSBcIiBhY2VfaW52YWxpZFwiO1xuICAgICAg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jaCA9IGNociAmJiBjaHIubWF0Y2goLyhbXFwoXFxbXFx7XSl8KFtcXClcXF1cXH1dKS8pO1xuICAgICAgICBpZiAoIW1hdGNoKSB7XG4gICAgICAgICAgICBjaHIgPSBsaW5lLmNoYXJBdChwb3MuY29sdW1uKTtcbiAgICAgICAgICAgIHBvcyA9IHtyb3c6IHBvcy5yb3csIGNvbHVtbjogcG9zLmNvbHVtbiArIDF9O1xuICAgICAgICAgICAgbWF0Y2ggPSBjaHIgJiYgY2hyLm1hdGNoKC8oW1xcKFxcW1xce10pfChbXFwpXFxdXFx9XSkvKTtcbiAgICAgICAgICAgIGJlZm9yZSA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmICghbWF0Y2gpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICBpZiAobWF0Y2hbMV0pIHtcbiAgICAgICAgICAgIHZhciBicmFja2V0UG9zID0gdGhpcy4kZmluZENsb3NpbmdCcmFja2V0KG1hdGNoWzFdLCBwb3MpO1xuICAgICAgICAgICAgaWYgKCFicmFja2V0UG9zKVxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgcmFuZ2UgPSBSYW5nZS5mcm9tUG9pbnRzKHBvcywgYnJhY2tldFBvcyk7XG4gICAgICAgICAgICBpZiAoIWJlZm9yZSkge1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4rKztcbiAgICAgICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4tLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJhbmdlLmN1cnNvciA9IHJhbmdlLmVuZDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBicmFja2V0UG9zID0gdGhpcy4kZmluZE9wZW5pbmdCcmFja2V0KG1hdGNoWzJdLCBwb3MpO1xuICAgICAgICAgICAgaWYgKCFicmFja2V0UG9zKVxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuIC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ZiAoIXR5cGVSZSl7XG4gICAgICAgICAgICB0eXBlUmUgPSBuZXcgUmVnRXhwKFxuICAgICAgICAgICAgICAgIFwiKFxcXFwuP1wiICtcbiAgICAgICAgICAgICAgICB0b2tlbi50eXBlLnJlcGxhY2UoXCIuXCIsIFwiXFxcXC5cIikucmVwbGFjZShcInJwYXJlblwiLCBcIi5wYXJlblwiKVxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFxiKD86ZW5kKVxcYi8sIFwiKD86c3RhcnR8YmVnaW58ZW5kKVwiKVxuICAgICAgICAgICAgICAgICsgXCIpK1wiXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHZhciB2YWx1ZUluZGV4ID0gcG9zaXRpb24uY29sdW1uIC0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgLSAyO1xuICAgICAgICB2YXIgdmFsdWUgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgIFxuICAgICAgICAgICAgd2hpbGUgKHZhbHVlSW5kZXggPj0gMCkge1xuICAgICAgICAgICAgICAgIHZhciBjaHIgPSB2YWx1ZS5jaGFyQXQodmFsdWVJbmRleCk7XG4gICAgICAgICAgICAgICAgaWYgKGNociA9PSBvcGVuQnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCAtPSAxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVwdGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtyb3c6IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbjogdmFsdWVJbmRleCArIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChjaHIgPT0gYnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCArPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWx1ZUluZGV4IC09IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIH0gd2hpbGUgKHRva2VuICYmICF0eXBlUmUudGVzdCh0b2tlbi50eXBlKSk7XG5cbiAgICAgICAgICAgIGlmICh0b2tlbiA9PSBudWxsKVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFsdWUgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgIHZhbHVlSW5kZXggPSB2YWx1ZS5sZW5ndGggLSAxO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xuXG4gICAgdGhpcy4kZmluZENsb3NpbmdCcmFja2V0ID0gZnVuY3Rpb24oYnJhY2tldCwgcG9zaXRpb24sIHR5cGVSZSkge1xuICAgICAgICB2YXIgY2xvc2luZ0JyYWNrZXQgPSB0aGlzLiRicmFja2V0c1ticmFja2V0XTtcbiAgICAgICAgdmFyIGRlcHRoID0gMTtcblxuICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcih0aGlzLCBwb3NpdGlvbi5yb3csIHBvc2l0aW9uLmNvbHVtbik7XG4gICAgICAgIHZhciB0b2tlbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbigpO1xuICAgICAgICBpZiAoIXRva2VuKVxuICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICBpZiAoIXRva2VuKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIGlmICghdHlwZVJlKXtcbiAgICAgICAgICAgIHR5cGVSZSA9IG5ldyBSZWdFeHAoXG4gICAgICAgICAgICAgICAgXCIoXFxcXC4/XCIgK1xuICAgICAgICAgICAgICAgIHRva2VuLnR5cGUucmVwbGFjZShcIi5cIiwgXCJcXFxcLlwiKS5yZXBsYWNlKFwibHBhcmVuXCIsIFwiLnBhcmVuXCIpXG4gICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXGIoPzpzdGFydHxiZWdpbilcXGIvLCBcIig/OnN0YXJ0fGJlZ2lufGVuZClcIilcbiAgICAgICAgICAgICAgICArIFwiKStcIlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgdmFsdWVJbmRleCA9IHBvc2l0aW9uLmNvbHVtbiAtIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpO1xuXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG5cbiAgICAgICAgICAgIHZhciB2YWx1ZSA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgdmFyIHZhbHVlTGVuZ3RoID0gdmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgd2hpbGUgKHZhbHVlSW5kZXggPCB2YWx1ZUxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHZhciBjaHIgPSB2YWx1ZS5jaGFyQXQodmFsdWVJbmRleCk7XG4gICAgICAgICAgICAgICAgaWYgKGNociA9PSBjbG9zaW5nQnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCAtPSAxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZGVwdGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtyb3c6IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbHVtbjogdmFsdWVJbmRleCArIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChjaHIgPT0gYnJhY2tldCkge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aCArPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWx1ZUluZGV4ICs9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgIXR5cGVSZS50ZXN0KHRva2VuLnR5cGUpKTtcblxuICAgICAgICAgICAgaWYgKHRva2VuID09IG51bGwpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIHZhbHVlSW5kZXggPSAwO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xufVxuZXhwb3J0cy5CcmFja2V0TWF0Y2ggPSBCcmFja2V0TWF0Y2g7XG5cbn0pO1xuXG5hY2UuZGVmaW5lKFwiYWNlL2VkaXRfc2Vzc2lvblwiLFtcInJlcXVpcmVcIixcImV4cG9ydHNcIixcIm1vZHVsZVwiLFwiYWNlL2xpYi9vb3BcIixcImFjZS9saWIvbGFuZ1wiLFwiYWNlL2JpZGloYW5kbGVyXCIsXCJhY2UvY29uZmlnXCIsXCJhY2UvbGliL2V2ZW50X2VtaXR0ZXJcIixcImFjZS9zZWxlY3Rpb25cIixcImFjZS9tb2RlL3RleHRcIixcImFjZS9yYW5nZVwiLFwiYWNlL2RvY3VtZW50XCIsXCJhY2UvYmFja2dyb3VuZF90b2tlbml6ZXJcIixcImFjZS9zZWFyY2hfaGlnaGxpZ2h0XCIsXCJhY2UvZWRpdF9zZXNzaW9uL2ZvbGRpbmdcIixcImFjZS9lZGl0X3Nlc3Npb24vYnJhY2tldF9tYXRjaFwi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gICAgICAgICBzZWxmLiRkZWx0YXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBncm91cDogXCJmb2xkXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWx0YXM6IHNlbGYuJGRlbHRhc0ZvbGRcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGYuJGRlbHRhc0ZvbGQgPSBbXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VsZi4kZGVsdGFzRG9jLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLiRkZWx0YXMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBncm91cDogXCJkb2NcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbHRhczogc2VsZi4kZGVsdGFzRG9jXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLiRkZWx0YXNEb2MgPSBbXTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VsZi4kZGVsdGFzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdW5kb01hbmFnZXIuZXhlY3V0ZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICBhY3Rpb246IFwiYWNldXBkYXRlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBhcmdzOiBbc2VsZi4kZGVsdGFzLCBzZWxmXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlOiBzZWxmLm1lcmdlVW5kb0RlbHRhc1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2VsZi5tZXJnZVVuZG9EZWx0YXMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBzZWxmLiRkZWx0YXMgPSBbXTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB0aGlzLiRpb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hbmdlLFxuICAgICAgICAgICAgdHlwZSA6IHR5cGUgfHwgXCJsaW5lXCIsXG4gICAgICAgICAgICByZW5kZXJlcjogdHlwZW9mIHR5cGUgPT0gXCJmdW5jdGlvblwiID8gdHlwZSA6IG51bGwsXG4gICAgICAgICAgICBjbGF6eiA6IGNsYXp6LFxuICAgICAgICAgICAgaW5Gcm9udDogISFpbkZyb250LFxuICAgICAgICAgICAgaWQ6IGlkXG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKGluRnJvbnQpIHtcbiAgICAgICAgICAgIHRoaXMuJGZyb250TWFya2Vyc1tpZF0gPSBtYXJrZXI7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwoXCJjaGFuZ2VGcm9udE1hcmtlclwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuJGJhY2tNYXJrZXJzW2lkXSA9IG1hcmtlcjtcbiAgICAgICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZUJhY2tNYXJrZXJcIik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gaWQ7XG4gICAgfTtcbiAgICB0aGlzLmFkZER5bmFtaWNNYXJrZXIgPSBmdW5jdGlvbihtYXJrZXIsIGluRnJvbnQpIHtcbiAgICAgICAgaWYgKCFtYXJrZXIudXBkYXRlKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgaWQgPSB0aGlzLiRtYXJrZXJJZCsrO1xuICAgICAgICBtYXJrZXIuaWQgPSBpZDtcbiAgICAgICAgbWFya2VyLmluRnJvbnQgPSAhIWluRnJvbnQ7XG5cbiAgICAgICAgaWYgKGluRnJvbnQpIHtcbiAgICAgICAgICAgIHRoaXMuJGZyb250TWFya2Vyc1tpZF0gPSBtYXJrZXI7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwoXCJjaGFuZ2VGcm9udE1hcmtlclwiKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuJGJhY2tNYXJrZXJzW2lkXSA9IG1hcmtlcjtcbiAgICAgICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZUJhY2tNYXJrZXJcIik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbWFya2VyO1xuICAgIH07XG4gICAgdGhpcy5yZW1vdmVNYXJrZXIgPSBmdW5jdGlvbihtYXJrZXJJZCkge1xuICAgICAgICB2YXIgbWFya2VyID0gdGhpcy4kZnJvbnRNYXJrZXJzW21hcmtlcklkXSB8fCB0aGlzLiRiYWNrTWFya2Vyc1ttYXJrZXJJZF07XG4gICAgICAgIGlmICghbWFya2VyKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBtYXJrZXJzID0gbWFya2VyLmluRnJvbnQgPyB0aGlzLiRmcm9udE1hcmtlcnMgOiB0aGlzLiRiYWNrTWFya2VycztcbiAgICAgICAgaWYgKG1hcmtlcikge1xuICAgICAgICAgICAgZGVsZXRlIChtYXJrZXJzW21hcmtlcklkXSk7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwobWFya2VyLmluRnJvbnQgPyBcImNoYW5nZUZyb250TWFya2VyXCIgOiBcImNoYW5nZUJhY2tNYXJrZXJcIik7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuZ2V0TWFya2VycyA9IGZ1bmN0aW9uKGluRnJvbnQpIHtcbiAgICAgICAgcmV0dXJuIGluRnJvbnQgPyB0aGlzLiRmcm9udE1hcmtlcnMgOiB0aGlzLiRiYWNrTWFya2VycztcbiAgICB9O1xuXG4gICAgdGhpcy5oaWdobGlnaHQgPSBmdW5jdGlvbihyZSkge1xuICAgICAgICBpZiAoIXRoaXMuJHNlYXJjaEhpZ2hsaWdodCkge1xuICAgICAgICAgICAgdmFyIGhpZ2hsaWdodCA9IG5ldyBTZWFyY2hIaWdobGlnaHQobnVsbCwgXCJhY2Vfc2VsZWN0ZWQtd29yZFwiLCBcInRleHRcIik7XG4gICAgICAgICAgICB0aGlzLi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RNb2RlKCk7XG5cbiAgICAgICAgaWYgKHRoaXMuJG1vZGVzW3BhdGhdICYmICFvcHRpb25zKSB7XG4gICAgICAgICAgICB0aGlzLiRvbkNoYW5nZU1vZGUodGhpcy4kbW9kZXNbcGF0aF0pO1xuICAgICAgICAgICAgY2IgJiYgY2IoKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLiRtb2RlSWQgPSBwYXRoO1xuICAgICAgICBjb25maWcubG9hZE1vZHVsZShbXCJtb2RlXCIsIHBhdGhdLCBmdW5jdGlvbihtKSB7XG4gICAgICAgICAgICBpZiAodGhpcy4kbW9kZUlkICE9PSBwYXRoKVxuICAgICAgICAgICAgICAgIHJldHVybiBjYiAmJiBjYigpO1xuICAgICAgICAgICAgaWYgKHRoaXMuJG1vZGVzW3BhdGhdICYmICFvcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kb25DaGFuZ2VNb2RlKHRoaXMuJG1vZGVzW3BhdGhdKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobSAmJiBtLk1vZGUpIHtcbiAgICAgICAgICAgICAgICBtID0gbmV3IG0uTW9kZShvcHRpb25zKTtcbiAgICAgICAgICAgICAgICBpZiAoIW9wdGlvbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kbW9kZXNbcGF0aF0gPSBtO1xuICAgICAgICAgICAgICAgICAgICBtLiRpZCA9IHBhdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMuJG9uQ2hhbmdlTW9kZShtKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNiICYmIGNiKCk7XG4gICAgICAgIH0uYmluZCh0aGlzKSk7XG4gICAgICAgIGlmICghdGhpcy4kbW9kZSlcbiAgICAgICAgICAgIHRoaXMuJG9uQ2hhbmdlTW9kZSh0aGlzLiRtb2Rlc1tcImFjZS9tb2RlL3RleHRcIl0sIHRydWUpO1xuICAgIH07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4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuYmdUb2tlbml6ZXIuc2V0VG9rZW5pemVyKHRva2VuaXplcik7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmJnVG9rZW5pemVyLnNldERvY3VtZW50KHRoaXMuZ2V0RG9jdW1lbnQoKSk7XG5cbiAgICAgICAgdGhpcy50b2tlblJlID0gbW9kZS50b2tlblJlO1xuICAgICAgICB0aGlzLm5vblRva2VuUmUgPSBtb2RlLm5vblRva2VuUmU7XG5cbiAgICAgICAgXG4gICAgICAgIGlmICghJGlzUGxhY2Vob2xkZXIpIHtcbiAgICAgICAgICAgIGlmIChtb2RlLmF0dGFjaFRvU2Vzc2lvbilcbiAgICAgICAgICAgICAgICBtb2RlLmF0dGFjaFRvU2Vzc2lvbih0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuJG9wdGlvbnMud3JhcE1ldGhvZC5zZXQuY2FsbCh0aGlzLCB0aGlzLiR3cmFwTWV0aG9kKTtcbiAgICAgICAgICAgIHRoaXMuJHNldEZvbGRpbmcobW9kZS5mb2xkaW5nUnVsZXMpO1xuICAgICAgICAgICAgdGhpcy5iZ1Rva2VuaXplci5zdGFydCgwKTtcbiAgICAgICAgICAgIHRoaXMuX2VtaXQoXCJjaGFuZ2VNb2RlXCIpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJHN0b3BXb3JrZXIgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuJHdvcmtlcikge1xuICAgICAgICAgICAgdGhpcy4kd29ya2VyLnRlcm1pbmF0ZSgpO1xuICAgICAgICAgICAgdGhpcy4kd29ya2VyID0gbnVsbDtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLiRzdGFydFdvcmtlciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhpcy4kd29ya2VyID0gdGhpcy4kbW9k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lV3JhcE1vZGUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuc2NyZWVuV2lkdGggPSB0aGlzLiR3cmFwTGltaXQ7XG5cbiAgICAgICAgICAgIHZhciBsaW5lcyA9IHRoaXMuZG9jLmdldEFsbExpbmVzKCk7XG4gICAgICAgICAgICB2YXIgY2FjaGUgPSB0aGlzLiRyb3dMZW5ndGhDYWNoZTtcbiAgICAgICAgICAgIHZhciBsb25nZXN0U2NyZWVuTGluZSA9IDA7XG4gICAgICAgICAgICB2YXIgZm9sZEluZGV4ID0gMDtcbiAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuJGZvbGREYXRhW2ZvbGRJbmRleF07XG4gICAgICAgICAgICB2YXIgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOiBJbmZpbml0eTtcbiAgICAgICAgICAgIHZhciBsZW4gPSBsaW5lcy5sZW5ndGg7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoaSA+IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgICAgICAgICBpID0gZm9sZExpbmUuZW5kLnJvdyArIDE7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpID49IGxlbilcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuJGZvbGREYXRhW2ZvbGRJbmRleCsrXTtcbiAgICAgICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOiBJbmZpbml0eTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoY2FjaGVbaV0gPT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgY2FjaGVbaV0gPSB0aGlzLiRnZXRTdHJpbmdTY3JlZW5XaWR0aChs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ICAgIHBvaW50ID0gZGVsdGEuc3RhcnQ7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbXBhcmUocG9pbnQucm93LCBwb2ludC5jb2x1bW4pID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLnNldFN0YXJ0KHBvaW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcG9pbnQgPSBkZWx0YS5lbmQ7XG4gICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbXBhcmUocG9pbnQucm93LCBwb2ludC5jb2x1bW4pID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc2V0RW5kKHBvaW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGFzdERlbHRhSXNJbnNlcnQgPSB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBwb2ludCA9IGRlbHRhLnN0YXJ0O1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZS5jb21wYXJlKHBvaW50LnJvdywgcG9pbnQuY29sdW1uKSA9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IFJhbmdlLmZyb21Qb2ludHMoZGVsdGEuc3RhcnQsIGRlbHRhLnN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGFzdERlbHRhSXNJbnNlcnQgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAobGFzdFVuZG9SYW5nZSAhPSBudWxsKSB7XG4gICAgICAgICAgICBpZiAoUmFuZ2UuY29tcGFyZVBvaW50cyhsYXN0VW5kb1JhbmdlLnN0YXJ0LCByYW5nZS5zdGFydCkgPT09IDApIHtcbiAgICAgICAgICAgICAgICBsYXN0VW5kb1JhbmdlLnN0YXJ0LmNvbHVtbiArPSByYW5nZS5lbmQuY29sdW1uIC0gcmFuZ2Uuc3RhcnQuY29sdW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3RhcnQgPSB0b1JhbmdlLnN0YXJ0O1xuICAgICAgICAgICAgdmFyIHJvd0RpZmYgPSBuZXdTdGFydC5yb3cgLSBvbGRTdGFydC5yb3c7XG4gICAgICAgICAgICB2YXIgY29sbERpZmYgPSBuZXdTdGFydC5jb2x1bW4gLSBvbGRTdGFydC5jb2x1bW47XG4gICAgICAgICAgICB0aGlzLmFkZEZvbGRzKGZvbGRzLm1hcChmdW5jdGlvbih4KSB7XG4gICAgICAgICAgICAgICAgeCA9IHguY2xvbmUoKTtcbiAgICAgICAgICAgICAgICBpZiAoeC5zdGFydC5yb3cgPT0gb2xkU3RhcnQucm93KVxuICAgICAgICAgICAgICAgICAgICB4LnN0YXJ0LmNvbHVtbiArPSBjb2xsRGlmZjtcbiAgICAgICAgICAgICAgICBpZiAoeC5lbmQucm93ID09IG9sZFN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICAgICAgeC5lbmQuY29sdW1uICs9IGNvbGxEaWZmO1xuICAgICAgICAgICAgICAgIHguc3RhcnQucm93ICs9IHJvd0RpZmY7XG4gICAgICAgICAgICAgICAgeC5lbmQucm93ICs9IHJvd0RpZmY7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHg7XG4gICAgICAgICAgICB9KSk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdG9SYW5nZTtcbiAgICB9O1xuICAgIHRoaXMuaW5kZW50Um93cyA9IGZ1bmN0aW9uKHN0YXJ0Um93LCBlbmRSb3csIGluZGVudFN0cmluZykge1xuICAgICAgICBpbmRlbnRTdHJpbmcgPSBpbmRlbnRTdHJpbmcucmVwbGFjZSgvXFx0L2csIHRoaXMuZ2V0VGFiU3RyaW5nKCkpO1xuICAgICAgICBmb3IgKHZhciByb3c9c3RhcnRSb3c7IHJvdzw9ZW5kUm93OyByb3crKylcbiAgICAgICAgICAgIHRoaXMuZG9jLmluc2VydEluTGluZSh7cm93OiByb3csIGNvbHVtbjogMH0sIGluZGVudFN0cmluZyk7XG4gICAgfTtcbiAgICB0aGlzLm91dGRlbnRSb3dzID0gZnVuY3Rpb24gKHJhbmdlKSB7XG4gICAgICAgIHZhciByb3dSYW5nZSA9IHJhbmdlLmNvbGxhcHNlUm93cygpO1xuICAgICAgICB2YXIgZGVsZXRlUmFuZ2UgPSBuZXcgUmFuZ2UoMCwgMCwgMCwgMCk7XG4gICAgICAgIHZhciBzaXplID0gdGhpcy5nZXRUYWJTaXplKCk7XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IHJvd1JhbmdlLnN0YXJ0LnJvdzsgaSA8PSByb3dSYW5nZS5lbmQucm93OyArK2kpIHtcbiAgICAgICAgICAgIHZhciBsaW5lID0gdGhpcy5nZXRMaW5lKGkpO1xuXG4gICAgICAgICAgICBkZWxldGVSYW5nZS5zdGFydC5yb3cgPSBpO1xuICAgICAgICAgICAgZGVsZXRlUmFuZ2UuZW5kLnJvdyA9IGk7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IHNpemU7ICsrailcbiAgICAgICAgICAgICAgICBpZiAobGluZS5jaGFyQXQoaikgIT0gJyAnKVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGlmIChqIDwgc2l6ZSAmJiBsaW5lLmNoYXJBdChqKSA9PSAnXFx0Jykge1xuICAgICAgICAgICAgICAgIGRlbGV0ZVJhbmdlLnN0YXJ0LmNvbHVtbiA9IGo7XG4gICAgICAgICAgICAgICAgZGVsZXRlUmFuZ2UuZW5kLmNvbHVtbiA9IGogKyAxO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkZWxldGVSYW5nZS5zdGFydC5jb2x1bW4gPSAwO1xuICAgICAgICAgICAgICAgIGRlbGV0ZVJhbmdlLmVuZC5jb2x1bW4gPSBqO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5yZW1vdmUoZGVsZXRlUmFuZ2UpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJG1v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cmV0dXJuIE1hdGgubWF4KDAsIE1hdGgubWluKHJvdywgdGhpcy5kb2MuZ2V0TGVuZ3RoKCktMSkpO1xuICAgIH07XG5cbiAgICB0aGlzLiRjbGlwQ29sdW1uVG9Sb3cgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAoY29sdW1uIDwgMClcbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICByZXR1cm4gTWF0aC5taW4odGhpcy5kb2MuZ2V0TGluZShyb3cpLmxlbmd0aCwgY29sdW1uKTtcbiAgICB9O1xuXG5cbiAgICB0aGlzLiRjbGlwUG9zaXRpb25Ub0RvY3VtZW50ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgY29sdW1uID0gTWF0aC5tYXgoMCwgY29sdW1uKTtcblxuICAgICAgICBpZiAocm93IDwgMCkge1xuICAgICAgICAgICAgcm93ID0gMDtcbiAgICAgICAgICAgIGNvbHVtbiA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgbGVuID0gdGhpcy5kb2MuZ2V0TGVuZ3RoKCk7XG4gICAgICAgICAgICBpZiAocm93ID49IGxlbikge1xuICAgICAgICAgICAgICAgIHJvdyA9IGxlbiAtIDE7XG4gICAgICAgICAgICAgICAgY29sdW1uID0gdGhpcy5kb2MuZ2V0TGluZShsZW4tMSkubGVuZ3RoO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb2x1bW4gPSBNYXRoLm1pbih0aGlzLmRvYy5nZXRMaW5lKHJvdykubGVuZ3RoLCBjb2x1bW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHJvdzogcm93LFxuICAgICAgICAgICAgY29sdW1uOiBjb2x1bW5cbiAgICAgICAgfTtcbiAgICB9O1xuXG4gICAgdGhpcy4kY2xpcFJhbmdlVG9Eb2N1bWVudCA9IGZ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C0gZmlyc3RSb3c7XG4gICAgICAgIHZhciByZW1vdmVkRm9sZHMgPSBudWxsO1xuICAgICAgICBcbiAgICAgICAgdGhpcy4kdXBkYXRpbmcgPSB0cnVlO1xuICAgICAgICBpZiAobGVuICE9IDApIHtcbiAgICAgICAgICAgIGlmIChhY3Rpb24gPT09IFwicmVtb3ZlXCIpIHtcbiAgICAgICAgICAgICAgICB0aGlzW3VzZVdyYXBNb2RlID8gXCIkd3JhcERhdGFcIiA6IFwiJHJvd0xlbmd0aENhY2hlXCJdLnNwbGljZShmaXJzdFJvdywgbGVuKTtcblxuICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZXMgPSB0aGlzLiRmb2xkRGF0YTtcbiAgICAgICAgICAgICAgICByZW1vdmVkRm9sZHMgPSB0aGlzLmdldEZvbGRzSW5SYW5nZShkZWx0YSk7XG4gICAgICAgICAgICAgICAgdGhpcy5yZW1vdmVGb2xkcyhyZW1vdmVkRm9sZHMpO1xuXG4gICAgICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5nZXRGb2xkTGluZShlbmQucm93KTtcbiAgICAgICAgICAgICAgICB2YXIgaWR4ID0gMDtcbiAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUuYWRkUmVtb3ZlQ2hhcnMoZW5kLnJvdywgZW5kLmNvbHVtbiwgc3RhcnQuY29sdW1uIC0gZW5kLmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLnNoaWZ0Um93KC1sZW4pO1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZUJlZm9yZSA9IHRoaXMuZ2V0Rm9sZExpbmUoZmlyc3RSb3cpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmVCZWZvcmUgJiYgZm9sZExpbmVCZWZvcmUgIT09IGZvbGRMaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZUJlZm9yZS5tZXJnZShmb2xkTGluZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZSA9IGZvbGRMaW5lQmVmb3JlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlkeCA9IGZvbGRMaW5lcy5pbmRleE9mKGZvbGRMaW5lKSArIDE7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZm9yIChpZHg7IGlkeCA8IGZvbGRMaW5lcy5sZW5ndGg7IGlkeCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGRMaW5lc1tpZHhdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUuc3RhcnQucm93ID49IGVuZC5yb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLnNoaWZ0Um93KC1sZW4pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgbGFzdFJvdyA9IGZpcnN0Um93O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgYXJncyA9IEFycmF5KGxlbik7XG4gICAgICAgICAgICAgICAgYXJncy51bnNoaWZ0KGZpcnN0Um93LCAwKTtcbiAgICAgICAgICAgICAgICB2YXIgYXJyID0gdXNlV3JhcE1vZGUgPyB0aGlzLiR3cmFwRGF0YSA6IHRoaXMuJHJvd0xlbmd0aENhY2hlO1xuICAgICAgICAgICAgICAgIGFyci5zcGxpY2UuYXBwbHkoYXJyLCBhcmdzKTtcbiAgICAgICAgICAgICAgICB2YXIgZm9sZExpbmVzID0gdGhpcy4kZm9sZERhdGE7XG4gICAgICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5nZXRGb2xkTGluZShmaXJzdFJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIGlkeCA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKGZvbGRMaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjbXAgPSBmb2xkTGluZS5yYW5nZS5jb21wYXJlSW5zaWRlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNtcCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZSA9IGZvbGRMaW5lLnNwbGl0KHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLnNoaWZ0Um93KGxlbik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUuYWRkUmVtb3ZlQ2hhcnMobGFzdFJvdywgMCwgZW5kLmNvbHVtbiAtIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgICAgICBpZiAoY21wID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5hZGRSZW1vdmVDaGFycyhmaXJzdFJvdywgMCwgZW5kLmNvbHVtbiAtIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5zaGlmdFJvdyhsZW4pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlkeCA9IGZvbGRMaW5lcy5pbmRleE9mKGZvbGRMaW5lKSArIDE7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgZm9yIChpZHg7IGlkeCA8IGZvbGRMaW5lcy5sZW5ndGg7IGlkeCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGRMaW5lc1tpZHhdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUuc3RhcnQucm93ID49IGZpcnN0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5zaGlmdFJvdyhsZW4pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbGVuID0gTWF0aC5hYnMoZGVsdGEuc3RhcnQuY29sdW1uIC0gZGVsdGEuZW5kLmNvbHVtbik7XG4gICAgICAgICAgICBpZiAoYWN0aW9uID09PSBcInJlbW92ZVwiKSB7XG4gICAgICAgICAgICAgICAgcmVtb3ZlZEZvbGRzID0gdGhpcy5nZXRGb2xkc0luUmFuZ2UoZGVsdGEpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlRm9sZHMocmVtb3ZlZEZvbGRzKTtcblxuICAgICAgICAgICAgICAgIGxlbiA9IC1sZW47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLmdldEZvbGRMaW5lKGZpcnN0Um93KTtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lLmFkZFJlbW92ZUNoYXJzKGZpcnN0Um93LCBzdGFydC5jb2x1bW4sIGxlbik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodXNlV3JhcE1vZGUgJiYgdGhpcy4kd3JhcERhdGEubGVuZ3RoICE9IHRoaXMuZG9jLmdldExlbmd0aCgpKSB7XG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKFwiZG9jLmdldExlbmd0aCgpIGFuZCAkd3JhcERhdGEubGVuZ3RoIGhhdmUgdG8gYmUgdGhlIHNhbWUhXCIpO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuJHVwZGF0aW5nID0gZmFsc2U7XG5cbiAgICAgICAgaWYgKHVzZVdyYXBNb2RlKVxuICAgICAgICAgICAg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gdGhpcy4kZ2V0RGlzcGxheVRva2VucyhsaW5lc1tyb3ddKTtcbiAgICAgICAgICAgICAgICB3cmFwRGF0YVtyb3ddID0gdGhpcy4kY29tcHV0ZVdyYXBTcGxpdHModG9rZW5zLCB3cmFwTGltaXQsIHRhYlNpemUpO1xuICAgICAgICAgICAgICAgIHJvdyArKztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdG9rZW5zID0gW107XG4gICAgICAgICAgICAgICAgZm9sZExpbmUud2FsayhmdW5jdGlvbihwbGFjZWhvbGRlciwgcm93LCBjb2x1bW4sIGxhc3RDb2x1bW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB3YWxrVG9rZW5zO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBsYWNlaG9sZGVyICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YWxrVG9rZW5zID0gdGhpcy4kZ2V0RGlzcGxheVRva2VucyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxhY2Vob2xkZXIsIHRva2Vucy5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhbGtUb2tlbnNbMF0gPSBQTEFDRUhPTERFUl9TVEFSVDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IHdhbGtUb2tlbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2Fsa1Rva2Vuc1tpXSA9IFBMQUNFSE9MREVSX0JPRFk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YWxrVG9rZW5zID0gdGhpcy4kZ2V0RGlzcGxheVRva2VucyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZXNbcm93XS5zdWJzdHJpbmcobGFzdENvbHVtbiwgY29sdW1uKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMgPSB0b2tlbnMuY29uY2F0KHdhbGtUb2tlbnMpO1xuICAgICAgICAgICAgICAgICAgICB9LmJpbmQodGhpcyksXG4gICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLmVuZC5yb3csXG4gICAgICAgICAgICAgICAgICAgIGxpbmVzW2ZvbGRMaW5lLmVuZC5yb3ddLmxlbmd0aCArIDFcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgd3JhcERhdGFbZm9sZExpbmUuc3RhcnQucm93XSA9IHRoaXMuJGNvbXB1dGVXcmFwU3BsaXRzKHRva2Vucywgd3JhcExpbWl0LCB0YWJTaXplKTtcbiAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93ICsgMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG4gICAgdmFyIENIQVIgPSAxLFxuICAgICAgICBDSEFSX0VYVCA9IDIsXG4gICAgICAgIFBMQUNFSE9MREVSX1NUQVJUID0gMyxcbiAgICAgICAgUExBQ0VIT0xERVJfQk9EWSA9ICA0LFxuICAgICAgICBQVU5DVFVBVElPTiA9IDksXG4gICAgICAgIFNQQUNFID0gMTAsXG4gICAgICAgIFRBQiA9IDExLFxuICAgICAgICBUQUJfU1BBQ0UgPSAxMjtcblxuXG4gICAgdGhpcy4kY29tcHV0ZVdyYXBTcGxpdHMgPSBmdW5jdGlvbih0b2tlbnMsIHdyYXBMaW1pdCwgdGFiU2l6ZSkge1xuICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc3BsaXRzID0gW107XG4gICAgICAgIHZhciBkaXNwbGF5TGVuZ3RoID0gdG9rZW5zLmxlbmd0aDtcbiAgICAgICAgdmFyIGxhc3RTcGxpdCA9IDAsIGxhc3REb2NTcGxpdCA9IDA7XG5cbiAgICAgICAgdmFyIGlzQ29kZSA9IHRoaXMuJHdyYXBBc0NvZGU7XG5cbiAgICAgICAgdmFyIGluZGVudGVkU29mdFdyYXAgPSB0aGlzLiRpbmRlbnRlZFNvZnRXcmFwO1xuICAgICAgICB2YXIgbWF4SW5kZW50ID0gd3JhcExpbWl0IDw9IE1hdGgubWF4KDIgKiB0YWJTaXplLCA4KVxuICAgICAgICAgICAgfHwgaW5kZW50ZWRTb2Z0V3JhcCA9PT0gZmFsc2UgPyAwIDogTWF0aC5mbG9vcih3cmFwTGltaXQgLyAyKTtcblxuICAgICAgICBmdW5jdGlvbiBnZXRXcmFwSW5kZW50KCkge1xuICAgICAgICAgICAgdmFyIGluZGVudGF0aW9uID0gMDtcbiAgICAgICAgICAgIGlmIChtYXhJbmRlbnQgPT09IDApXG4gICAgICAgICAgICAgICAgcmV0dXJuIGluZGVudGF0aW9uO1xuICAgICAgICAgICAgaWYgKGluZGVudGVkU29mdFdyYXApIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdG9rZW4gPSB0b2tlbnNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbiA9PSBTUEFDRSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGVudGF0aW9uICs9IDE7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRva2VuID09IFRBQilcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGVudGF0aW9uICs9IHRhYlNpemU7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHRva2VuID09IFRBQl9TUEFDRSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaXNDb2RlICYmIGluZGVudGVkU29mdFdyYXAgIT09IGZhbHNlKVxuICAgICAgICAgICAgICAgIGluZGVudGF0aW9uICs9IHRhYlNpemU7XG4gICAgICAgICAgICByZXR1cm4gTWF0aC5taW4oaW5kZW50YXRpb24sIG1heEluZGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gYWRkU3BsaXQoc2NyZWVuUG9zKSB7XG4gICAgICAgICAgICB2YXIgZGlzcGxheWVkID0gdG9rZW5zLnNsaWNlKGxhc3RTcGxpdCwgc2NyZWVuUG9zKTtcbiAgICAgICAgICAgIHZhciBsZW4gPSBkaXNwbGF5ZWQubGVuZ3RoO1xuICAgICAgICAgICAgZGlzcGxheWVkLmpvaW4oXCJcIilcbiAgICAgICAgICAgICAgICAucmVwbGFjZSgvMTIvZywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGxlbiAtPSAxO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnJlcGxhY2UoLzIvZywgZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGxlbiAtPSAxO1xuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBpZiAoIXNwbGl0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpbmRlbnQgPSBnZXRXcmFwSW5kZW50KCk7XG4gICAgICAgICAgICAgICAgc3BsaXRzLmluZGVudCA9IGluZGVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3REb2NTcGxpdCArPSBsZW47XG4gICAgICAgICAgICBzcGxpdHMucHVzaChsYXN0RG9jU3BsaXQpO1xuICAgICAgICAgICAgbGFzdFNwbGl0ID0gc2NyZWVuUG9zO1xuICAgICAgICB9XG4gICAgICAgIHZhciBpbmRlbnQgPSAwO1xuICAgICAgICB3aGlsZSAoZGlzcGxheUxlbmd0aCAtIGxhc3RTcGxpdCA+IHdyYXBMaW1pdCAtIGluZGVudCkge1xuICAgICAgICAgICAgdmFyIHNwbGl0ID0gbGFzdFNwbGl0ICsgd3JhcExpbWl0IC0gaW5kZW50O1xuICAgICAgICAgICAgaWYgKHRva2Vuc1tzcGxpdCAtIDFdID49IFNQQUNFICYmIHRva2Vuc1tzcGxpdF0gPj0gU1BBQ0UpIHtcbiAgICAgICAgICAgICAgICBhZGRTcGxpdChzcGxpdCk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodG9rZW5zW3NwbGl0XSA9PSBQTEFDRUhPTERFUl9TVEFSVCB8fCB0b2tlbnNbc3BsaXRdID09IFBMQUNFSE9MREVSX0JPRFkpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHNwbGl0OyBzcGxpdCAhPSBsYXN0U3BsaXQgLSAxOyBzcGxpdC0tKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbnNbc3BsaXRdID09IFBMQUNFSE9MREVSX1NUQVJUKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc3BsaXQgPiBsYXN0U3BsaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkU3BsaXQoc3BsaXQpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3BsaXQgPSBsYXN0U3BsaXQgKyB3cmFwTGltaXQ7XG4gICAgICAgICAgICAgICAgZm9yIChzcGxpdDsgc3BsaXQgPCB0b2tlbnMubGVuZ3RoOyBzcGxpdCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbnNbc3BsaXRdICE9IFBMQUNFSE9MREVSX0JPRFkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzcGxpdCA9PSB0b2tlbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrOyAgLy8gQnJlYWtzIHRoZSB3aGlsZS1sb29wLlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhZGRTcGxpdChzcGxpdCk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgbWluU3BsaXQgPSBNYXRoLm1heChzcGxpdCAtICh3cmFwTGltaXQgLSh3cmFwTGltaXQ+PjIpKSwgbGFzdFNwbGl0IC0gMSk7XG4gICAgICAgICAgICB3aGlsZSAoc3BsaXQgPiBtaW5TcGxpdCAmJiB0b2tlbnNbc3BsaXRdIDwgUExBQ0VIT0xERVJfU1RBUlQpIHtcbiAgICAgICAgICAgICAgICBzcGxpdCAtLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpc0NvZGUpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoc3BsaXQgPiBtaW5TcGxpdCAmJiB0b2tlbnNbc3BsaXRdIDwgUExBQ0VIT0xERVJfU1RBUlQpIHtcbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHdoaWxlIChzcGxpdCA+IG1pblNwbGl0ICYmIHRva2Vuc1tzcGxpdF0gPT0gUFVOQ1RVQVRJT04pIHtcbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoc3BsaXQgPiBtaW5TcGxpdCAmJiB0b2tlbnNbc3BsaXRdIDwgU1BBQ0UpIHtcbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHNwbGl0ID4gbWluU3BsaXQpIHtcbiAgICAgICAgICAgICAgICBhZGRTcGxpdCgrK3NwbGl0KTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNwbGl0ID0gbGFzdFNwbGl0ICsgd3JhcExpbWl0O1xuICAgICAgICAgICAgaWYgKHRva2Vuc1tzcGxpdF0gPT0gQ0hBUl9FWFQpXG4gICAgICAgICAgICAgICAgc3BsaXQtLTtcbiAgICAgICAgICAgIGFkZFNwbGl0KHNwbGl0IC0gaW5kZW50KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3BsaXRzO1xuICAgIH07XG4gICAgdGhpcy4kZ2V0RGlzcGxheVRva2VucyA9IGZ1bmN0aW9uKHN0ciwgb2Zmc2V0KSB7XG4gICAgICAgIHZhciBhcnIgPSBbXTtcbiAgICAgICAgdmFyIHRhYlNpemU7XG4gICAgICAgIG9mZnNldCA9IG9mZnNldCB8fCAwO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3RyLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgYyA9IHN0ci5jaGFyQ29kZUF0KGkpO1xuICAgICAgICAgICAgaWYgKGMgPT0gOSkge1xuICAgICAgICAgICAgICAgIHRhYlNpemUgPSB0aGlzLmdldFNjcmVlblRhYlNpemUoYXJyLmxlbmd0aCArIG9mZnNldCk7XG4gICAgICAgICAgICAgICAgYXJyLnB1c2goVEFCKTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBuID0gMTsgbiA8IHRhYlNpemU7IG4rKykge1xuICAgICAgICAgICAgICAgICAgICBhcnIucHVzaChUQUJfU1BBQ0UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGMgPT0gMzIpIHtcbiAgICAgICAgICAgICAgICBhcnIucHVzaChTUEFDRSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYoKGMgPiAzOSAmJiBjIDwgNDgpIHx8IChjID4gNTcgJiYgYyA8IDY0KSkge1xuICAgICAgICAgICAgICAgIGFyci5wdXNoKFBVTkNUVUFUSU9OKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGMgPj0gMHgxMTAwICYmIGlzRnVsbFdpZHRoKGMpKSB7XG4gICAgICAgICAgICAgICAgYXJyLnB1c2goQ0hBUiwgQ0hBUl9FWFQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBhcnIucHVzaChDSEFSKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH07XG4gICAgdGhpcy4kZ2V0U3RyaW5nU2NyZWVuV2lkdGggPSBmdW5jdGlvbihzdHIsIG1heFNjcmVlbkNvbHVtbiwgc2NyZWVuQ29sdW1uKSB7XG4gICAgICAgIGlmIChtYXhTY3JlZW5Db2x1bW4gPT0gMClcbiAgICAgICAgICAgIHJldHVybiBbMCwgMF07XG4gICAgICAgIGlmIChtYXhTY3JlZW5Db2x1bW4gPT0gbnVsbClcbiAgICAgICAgICAgIG1heFNjcmVlbkNvbHVtbiA9IEluZmluaXR5O1xuICAgICAgICBzY3JlZW5Db2x1bW4gPSBzY3JlZW5Db2x1bW4gfHwgMDtcblxuICAgICAgICB2YXIgYywgY29sdW1uO1xuICAgICAgICBmb3IgKGNvbHVtbiA9IDA7IGNvbHVtbiA8IHN0ci5sZW5ndGg7IGNvbHVtbisrKSB7XG4gICAgICAgICAgICBjID0gc3RyLmNoYXJDb2RlQXQoY29sdW1uKTtcbiAgICAgICAgICAgIGlmIChjID09IDkpIHtcbiAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gKz0gdGhpcy5nZXRTY3JlZW5UYWJTaXplKHNjcmVlbkNvbHVtbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID49IDB4MTEwMCAmJiBpc0Z1bGxXaWR0aChjKSkge1xuICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiArPSAyO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gKz0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzY3JlZW5Db2x1bW4gPiBtYXhTY3JlZW5Db2x1bW4pIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBbc2NyZWVuQ29sdW1uLCBjb2x1bW5dO1xuICAgIH07XG5cbiAgICB0aGlzLmxpbmVXaWRnZXRzID0gbnVsbDtcbiAgICB0aGlzLmdldFJvd0xlbmd0aCA9IGZ1bmN0aW9uKHJvdykge1xuICAgICAgICBpZiAodGhpcy5saW5lV2lkZ2V0cylcbiAgICAgICAgICAgIHZhciBoID0gdGhpcy5saW5lV2lkZ2V0c1tyb3ddICYmIHRoaXMubGluZVdpZGdldHNbcm93XS5yb3dDb3VudCB8fCAwO1xuICAgICAgICBlbHNlIFxuICAgICAgICAgICAgaCA9IDA7XG4gICAgICAgIGlmICghdGhpcy4kdXNlV3JhcE1vZGUgfHwgIXRoaXMuJHdyYXBEYXRhW3Jvd10pIHtcbiAgICAgICAgICAgIHJldHVybiAxICsgaDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLiR3cmFwRGF0YVtyb3ddLmxlbmd0aCArIDEgKyBoO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmdldFJvd0xpbmVDb3VudCA9IGZ1bmN0aW9uKHJvdykge1xuICAgICAgICBpZiA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Ghpcy5nZXRMZW5ndGgoKSAtIDE7XG4gICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuZ2V0TmV4dEZvbGRMaW5lKGRvY1Jvdyk7XG4gICAgICAgIHZhciBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6IEluZmluaXR5O1xuXG4gICAgICAgIHdoaWxlIChyb3cgPD0gc2NyZWVuUm93KSB7XG4gICAgICAgICAgICByb3dMZW5ndGggPSB0aGlzLmdldFJvd0xlbmd0aChkb2NSb3cpO1xuICAgICAgICAgICAgaWYgKHJvdyArIHJvd0xlbmd0aCA+IHNjcmVlblJvdyB8fCBkb2NSb3cgPj0gbWF4Um93KSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJvdyArPSByb3dMZW5ndGg7XG4gICAgICAgICAgICAgICAgZG9jUm93Kys7XG4gICAgICAgICAgICAgICAgaWYgKGRvY1JvdyA+IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgICAgICAgICBkb2NSb3cgPSBmb2xkTGluZS5lbmQucm93KzE7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy5nZXROZXh0Rm9sZExpbmUoZG9jUm93LCBmb2xkTGluZSk7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZG9DYWNoZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuJGRvY1Jvd0NhY2hlLnB1c2goZG9jUm93KTtcbiAgICAgICAgICAgICAgICB0aGlzLiRzY3JlZW5Sb3dDYWNoZS5wdXNoKHJvdyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZm9sZExpbmUgJiYgZm9sZExpbmUuc3RhcnQucm93IDw9IGRvY1Jvdykge1xuICAgICAgICAgICAgbGluZSA9IHRoaXMuZ2V0Rm9sZERpc3BsYXlMaW5lKGZvbGRMaW5lKTtcbiAgICAgICAgICAgIGRvY1JvdyA9IGZvbGRMaW5lLnN0YXJ0LnJvdztcbiAgICAgICAgfSBlbHNlIGlmIChyb3cgKyByb3dMZW5ndGggPD0gc2NyZWVuUm93IHx8IGRvY1JvdyA+IG1heFJvdykge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICByb3c6IG1heFJvdyxcbiAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuZ2V0TGluZShtYXhSb3cpLmxlbmd0aFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGxpbmUgPSB0aGlzLmdldExpbmUoZG9jUm93KTtcbiAgICAgICAgICAgIGZvbGRMaW5lID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICB2YXIgd3JhcEluZGVudCA9IDAsIHNwbGl0SW5kZXggPSBNYXRoLmZsb29yKHNjcmVlblJvdyAtIHJvdyk7XG4gICAgICAgIGlmICh0aGlzLiR1c2VXcmFwTW9kZSkge1xuICAgICAgICAgICAgdmFyIHNwbGl0cyA9IHRoaXMuJHdyYXBEYXRhW2RvY1Jvd107XG4gICAgICAgICAgICBpZiAoc3BsaXRzKSB7XG4gICAgICAgICAgICAgICAgY29sdW1uID0gc3BsaXRzW3NwbGl0SW5kZXhdO1xuICAgICAgICAgICAgICAgIGlmKHNwbGl0SW5kZXggPiAwICYmIHNwbGl0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgd3JhcEluZGVudCA9IHNwbGl0cy5pbmRlbnQ7XG4gICAgICAgICAgICAgICAgICAgIGRvY0NvbHVtbiA9IHNwbGl0c1tzcGxpdEluZGV4IC0gMV0gfHwgc3BsaXRzW3NwbGl0cy5sZW5ndGggLSAxXTtcbiAgICA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m9sZExpbmUgP2ZvbGRMaW5lLnN0YXJ0LnJvdyA6SW5maW5pdHk7XG5cbiAgICAgICAgd2hpbGUgKHJvdyA8IGRvY1Jvdykge1xuICAgICAgICAgICAgaWYgKHJvdyA+PSBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgICAgICByb3dFbmQgPSBmb2xkTGluZS5lbmQucm93ICsgMTtcbiAgICAgICAgICAgICAgICBpZiAocm93RW5kID4gZG9jUm93KVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuZ2V0TmV4dEZvbGRMaW5lKHJvd0VuZCwgZm9sZExpbmUpO1xuICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID9mb2xkTGluZS5zdGFydC5yb3cgOkluZmluaXR5O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgcm93RW5kID0gcm93ICsgMTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgc2NyZWVuUm93ICs9IHRoaXMuZ2V0Um93TGVuZ3RoKHJvdyk7XG4gICAgICAgICAgICByb3cgPSByb3dFbmQ7XG5cbiAgICAgICAgICAgIGlmIChkb0NhY2hlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kZG9jUm93Q2FjaGUucHVzaChyb3cpO1xuICAgICAgICAgICAgICAgIHRoaXMuJHNjcmVlblJvd0NhY2hlLnB1c2goc2NyZWVuUm93KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB2YXIgdGV4dExpbmUgPSBcIlwiO1xuICAgICAgICBpZiAoZm9sZExpbmUgJiYgcm93ID49IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgdGV4dExpbmUgPSB0aGlzLmdldEZvbGREaXNwbGF5TGluZShmb2xkTGluZSwgZG9jUm93LCBkb2NDb2x1bW4pO1xuICAgICAgICAgICAgZm9sZFN0YXJ0Um93ID0gZm9sZExpbmUuc3RhcnQucm93O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGV4dExpbmUgPSB0aGlzLmdldExpbmUoZG9jUm93KS5zdWJzdHJpbmcoMCwgZG9jQ29sdW1uKTtcbiAgICAgICAgICAgIGZvbGRTdGFydFJvdyA9IGRvY1JvdztcbiAgICAgICAgfVxuICAgICAgICB2YXIgd3JhcEluZGVudCA9IDA7XG4gICAgICAgIGlmICh0aGlzLiR1c2VXcmFwTW9kZSkge1xuICAgICAgICAgICAgdmFyIHdyYXBSb3cgPSB0aGlzLiR3cmFwRGF0YVtmb2xkU3RhcnRSb3ddO1xuICAgICAgICAgICAgaWYgKHdyYXBSb3cpIHtcbiAgICAgICAgICAgICAgICB2YXIgc2NyZWVuUm93T2Zmc2V0ID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAodGV4dExpbmUubGVuZ3RoID49IHdyYXBSb3dbc2NyZWVuUm93T2Zmc2V0XSkge1xuICAgICAgICAgICAgICAgICAgICBzY3JlZW5Sb3cgKys7XG4gICAgICAgICAgICAgICAgICAgIHNjcmVlblJvd09mZnNldCsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0ZXh0TGluZSA9IHRleHRMaW5lLnN1YnN0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgd3JhcFJvd1tzY3JlZW5Sb3dPZmZzZXQgLSAxXSB8fCAwLCB0ZXh0TGluZS5sZW5ndGhcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHdyYXBJbmRlbnQgPSBzY3JlZW5Sb3dPZmZzZXQgPiAwID8gd3JhcFJvdy5pbmRlbnQgOiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHJvdzogc2NyZWVuUm93LFxuICAgICAgICAgICAgY29sdW1uOiB3cmFwSW5kZW50ICsgdGhpcy4kZ2V0U3RyaW5nU2NyZWVuV2lkdGgodGV4dExpbmUpWzBdXG4gICAgICAgIH07XG4gICAgfTtcbiAgICB0aGlzLmRvY3VtZW50VG9TY3JlZW5Db2x1bW4gPSBmdW5jdGlvbihyb3csIGRvY0NvbHVtbikge1xuICAgICAgICByZXR1cm4gdGhpcy5kb2N1bWVudFRvU2NyZWVuUG9zaXRpb24ocm93LCBkb2NDb2x1bW4pLmNvbHVtbjtcbiAgICB9O1xuICAgIHRoaXMuZG9jdW1lbnRUb1NjcmVlblJvdyA9IGZ1bmN0aW9uKGRvY1JvdywgZG9jQ29sdW1uKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmRvY3VtZW50VG9TY3JlZW5Qb3NpdGlvbihkb2NSb3csIGRvY0NvbHVtbikucm93O1xuICAgIH07XG4gICAgdGhpcy5nZXRTY3JlZW5MZW5ndGggPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIHNjcmVlblJvd3MgPSAwO1xuICAgICAgICB2YXIgZm9sZCA9IG51bGw7XG4gICAgICAgIGlmICghdGhpcy4kdXNlV3JhcE1vZGUpIHtcbiAgICAgICAgICAgIHNjcmVlblJvd3MgPSB0aGlzLmdldExlbmd0aCgpO1xuICAgICAgICAgICAgdmFyIGZvbGREYXRhID0gdGhpcy4kZm9sZERhdGE7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZvbGREYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgZm9sZCA9IGZvbGREYXRhW2ldO1xuICAgICAgICAgICAgICAgIHNjcmVlblJvd3MgLT0gZm9sZC5lbmQucm93IC0gZm9sZC5zdGFydC5yb3c7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgbGFzdFJvdyA9IHRoaXMuJHdyYXBEYXRhLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciByb3cgPSAwLCBpID0gMDtcbiAgICAgICAgICAgIHZhciBmb2xkID0gdGhpcy4kZm9sZERhdGFbaSsrXTtcbiAgICAgICAgICAgIHZhciBmb2xkU3RhcnQgPSBmb2xkID8gZm9sZC5zdGFydC5yb3cgOkluZmluaXR5O1xuXG4gICAgICAgICAgICB3aGlsZSAocm93IDwgbGFzdFJvdykge1xuICAgICAgICAgICAgICAgIHZhciBzcGxpdHMgPSB0aGlzLiR3cmFwRGF0YVtyb3ddO1xuICAgICAgICAgICAgICAgIHNjcmVlblJvd3MgKz0gc3BsaXRzID8gc3BsaXRzLmxlbmd0aCArIDEgOiAxO1xuICAgICAgICAgICAgICAgIHJvdyArKztcbiAgICAgICAgICAgICAgICBpZiAocm93ID4gZm9sZFN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdyA9IGZvbGQuZW5kLnJvdysxO1xuICAgICAgICAgICAgICAgICAgICBmb2xkID0gdGhpcy4kZm9sZERhdGFbaSsrXTtcbiAgICAgICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZCA/Zm9sZC5zdGFydC5yb3cgOkluZmluaXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5saW5lV2lkZ2V0cylcbiAgICAgICAgICAgIHNjcmVlblJvd3MgKz0gdGhpcy4kZ2V0V2lkZ2V0U2NyZWVuTGVuZ3RoKCk7XG5cbiAgICAgICAgcmV0dXJuIHNjcmVlblJvd3M7XG4gICAgfTtcbiAgICB0aGlzLiRzZXRGb250TWV0cmljcyA9IGZ1bmN0aW9uKGZtKSB7XG4gICAgICAgIGlmICghdGhpcy4kZW5hYmxlVmFyQ2hhcikgcmV0dXJuO1xuICAgICAgICB0aGlzLiRnZXRTdHJpbmdTY3JlZW5XaWR0aCA9IGZ1bmN0aW9uKHN0ciwgbWF4U2NyZWVuQ29sdW1uLCBzY3JlZW5Db2x1bW4pIHtcbiAgICAgICAgICAgIGlmIChtYXhTY3JlZW5Db2x1bW4gPT09IDApXG4gICAgICAgICAgICAgICAgcmV0dXJuIFswLCAwXTtcbiAgICAgICAgICAgIGlmICghbWF4U2NyZWVuQ29sdW1uKVxuICAgICAgICAgICAgICAgIG1heFNjcmVlbkNvbHVtbiA9IEluZmluaXR5O1xuICAgICAgICAgICAgc2NyZWVuQ29sdW1uID0gc2NyZWVuQ29sdW1uIHx8IDA7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBjLCBjb2x1bW47XG4gICAgICAgICAgICBmb3IgKGNvbHVtbiA9IDA7IGNvbHVtbiA8IHN0ci5sZW5ndGg7IGNvbHVtbisrKSB7XG4gICAgICAgICAgICAgICAgYyA9IHN0ci5jaGFyQXQoY29sdW1uKTtcbiAgICAgICAgICAgICAgICBpZiAoYyA9PT0gXCJcXHRcIikge1xuICAgICAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gKz0gdGhpcy5nZXRTY3JlZW5UYWJTaXplKHNjcmVlbkNvbHVtbik7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uICs9IGZtLmdldENoYXJhY3RlcldpZHRoKGMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2NyZWVuQ29sdW1uID4gbWF4U2NyZWVuQ29sdW1uKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIFtzY3JlZW5Db2x1bW4sIGNvbHVtbl07XG4gICAgICAgIH07XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmRlc3Ryb3kgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuYmdUb2tlbml6ZXIpIHtcbiAgICAgICAgICAgIHRoaXMuYmdUb2tlbml6ZXIuc2V0RG9jdW1lbnQobnVsbCk7XG4gICAgICAgICAgICB0aGlzLmJnVG9rZW5pemVyID0gbnVsbDtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLiRzdG9wV29ya2VyKCk7XG4gICAgfTtcblxuICAgIHRoaXMuaXNGdWxsV2lkdGggPSBpc0Z1bGxXaWR0aDtcbiAgICBmdW5jdGlvbiBpc0Z1bGxXaWR0aChjKSB7XG4gICAgICAgIGlmIChjIDwgMHgxMTAwKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICByZXR1cm4gYyA+PSAweDExMDAgJiYgYyA8PSAweDExNUYgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgxMUEzICYmIGMgPD0gMHgxMUE3IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MTFGQSAmJiBjIDw9IDB4MTFGRiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDIzMjkgJiYgYyA8PSAweDIzMkEgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgyRTgwICYmIGMgPD0gMHgyRTk5IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MkU5QiAmJiBjIDw9IDB4MkVGMyB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDJGMDAgJiYgYyA8PSAweDJGRDUgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgyRkYwICYmIGMgPD0gMHgyRkZCIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzAwMCAmJiBjIDw9IDB4MzAzRSB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMwNDEgJiYgYyA8PSAweDMwOTYgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMDk5ICYmIGMgPD0gMHgzMEZGIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzEwNSAmJiBjIDw9IDB4MzEyRCB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMxMzEgJiYgYyA8PSAweDMxOEUgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMTkwICYmIGMgPD0gMHgzMUJBIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzFDMCAmJiBjIDw9IDB4MzFFMyB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMxRjAgJiYgYyA8PSAweDMyMUUgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMjIwICYmIGMgPD0gMHgzMjQ3IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzI1MCAmJiBjIDw9IDB4MzJGRSB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMzMDAgJiYgYyA8PSAweDREQkYgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHg0RTAwICYmIGMgPD0gMHhBNDhDIHx8XG4gICAgICAgICAgICAgICBjID49IDB4QTQ5MCAmJiBjIDw9IDB4QTRDNiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweEE5NjAgJiYgYyA8PSAweEE5N0MgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHhBQzAwICYmIGMgPD0gMHhEN0EzIHx8XG4gICAgICAgICAgICAgICBjID49IDB4RDdCMCAmJiBjIDw9IDB4RDdDNiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweEQ3Q0IgJiYgYyA8PSAweEQ3RkIgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHhGOTAwICYmIGMgPD0gMHhGQUZGIHx8XG4gICAgICAgICAgICAgICBjID49IDB4RkUxMCAmJiBjIDw9IDB4RkUxOSB8fFxuICAgICAgICAgICAgICAgYyA+PSAweEZFMzAgJiYgYyA8PSAweEZFNTIgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHhGRTU0ICYmIGMgPD0gMHhGRTY2IHx8XG4gICAgICAgICAgICAgICBjID49IDB4RkU2OCAmJiBjIDw9IDB4RkU2QiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweEZGMDEgJiYgYyA8PSAweEZGNjAgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHhGRkUwICYmIGMgPD0gMHhGRkU2O1xuICAgIH1cblxufSkuY2FsbChFZGl0U2Vzc2lvbi5wcm90b3R5cGUpO1xuXG5hY2VxdWlyZShcIi4vZWRpdF9zZX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cbiAgICAgICAgICAgICAgICB0aGlzLnNldFdyYXBMaW1pdFJhbmdlKGNvbCwgY29sKTtcbiAgICAgICAgICAgICAgICB0aGlzLnNldFVzZVdyYXBNb2RlKHRydWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuZ2V0VXNlV3JhcE1vZGUoKSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLiR3cmFwID09IC0xKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJwcmludE1hcmdpblwiO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy5nZXRXcmFwTGltaXRSYW5nZSgpLm1pbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiZnJlZVwiO1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiR3cmFwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFwib2ZmXCI7XG4gICAgICAgIH0sXG4gICAgICAgIGhhbmRsZXNTZXQ6IHRydWVcbiAgICB9LCAgICBcbiAgICB3cmFwTWV0aG9kOiB7XG4gICAgICAgIHNldDogZnVuY3Rpb24odmFsKSB7XG4gICAgICAgICAgICB2YWwgPSB2YWwgPT0gXCJhdXRvXCJcbiAgICAgICAgICAgICAgICA/IHRoaXMuJG1vZGUudHlwZSAhPSBcInRleHRcIlxuICAgICAgICAgICAgICAgIDogdmFsICE9IFwidGV4dFwiO1xuICAgICAgICAgICAgaWYgKHZhbCAhPSB0aGlzLiR3cmFwQXNDb2RlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy4kd3JhcEFzQ29kZSA9IHZhbDtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy4kdXNlV3JhcE1vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kbW9kaWZpZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLiRyZXNldFJvd0NhY2hlKDApO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLiR1cGRhdGVXcmFwRGF0YSgwLCB0aGlzLmdldExlbmd0aCgpIC0gMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpbml0aWFsVmFsdWU6IFwiYXV0b1wiXG4gICAgfSxcbiAgICBpbmRlbnRlZFNvZnRXcmFwOiB7IGluaXRpYWxWYWx1ZTogdHJ1ZSB9LFxuICAgIGZpcnN0TGluZU51bWJlcjoge1xuICAgICAgICBzZXQ6IGZ1bmN0aW9uKCkge3RoaXMuX3NpZ25hbChcImNoYW5nZUJyZWFrcG9pbnRcIik7fSxcbiAgICAgICAgaW5pdGlhbFZhbHVlOiAxXG4gICAgfSxcbiAgICB1c2VXb3JrZXI6IHtcbiAgICAgICAgc2V0OiBmdW5jdGlvbih1c2VXb3JrZXIpIHtcbiAgICAgICAgICAgIHRoaXMuJHVzZVdvcmtlciA9IHVzZVdvcmtlcjtcblxuICAgICAgICAgICAgdGhpcy4kc3RvcFdvcmtlcigpO1xuICAgICAgICAgICAgaWYgKHVzZVdvcmtlcilcbiAgICAgICAgICAgICAgICB0aGlzLiRzdGFydFdvcmtlcigpO1xuICAgICAgICB9LFxuICAgICAgICBpbml0aWFsVmFsdWU6IHRydWVcbiAgICB9LFxuICAgIHVzZVNvZnRUYWJzOiB7aW5pdGlhbFZhbHVlOiB0cnVlfSxcbiAgICB0YWJTaXplOiB7XG4gICAgICAgIHNldDogZnVuY3Rpb24odGFiU2l6ZSkge1xuICAgICAgICAgICAgaWYgKGlzTmFOKHRhYlNpemUpIHx8IHRoaXMuJHRhYlNpemUgPT09IHRhYlNpemUpIHJldHVybjtcblxuICAgICAgICAgICAgdGhpcy4kbW9kaWZpZWQgPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy4kcm93TGVuZ3RoQ2FjaGUgPSBbXTtcbiAgICAgICAgICAgIHRoaXMuJHRhYlNpemUgPSB0YWJT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2MgPT0gZWMgJiYgb3B0aW9ucy5zdGFydCAmJiBvcHRpb25zLnN0YXJ0LnN0YXJ0XG4gICAgICAgICAgICAgICAgJiYgb3B0aW9ucy5za2lwQ3VycmVudCAhPSBmYWxzZSAmJiBmaXJzdFJhbmdlLmlzRXF1YWwob3B0aW9ucy5zdGFydClcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGZpcnN0UmFuZ2UgPSBudWxsO1xuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiBmaXJzdFJhbmdlO1xuICAgIH07XG4gICAgdGhpcy5maW5kQWxsID0gZnVuY3Rpb24oc2Vzc2lvbikge1xuICAgICAgICB2YXIgb3B0aW9ucyA9IHRoaXMuJG9wdGlvbnM7XG4gICAgICAgIGlmICghb3B0aW9ucy5uZWVkbGUpXG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIHRoaXMuJGFzc2VtYmxlUmVnRXhwKG9wdGlvbnMpO1xuXG4gICAgICAgIHZhciByYW5nZSA9IG9wdGlvbnMucmFuZ2U7XG4gICAgICAgIHZhciBsaW5lcyA9IHJhbmdlXG4gICAgICAgICAgICA/IHNlc3Npb24uZ2V0TGluZXMocmFuZ2Uuc3RhcnQucm93LCByYW5nZS5lbmQucm93KVxuICAgICAgICAgICAgOiBzZXNzaW9uLmRvYy5nZXRBbGxMaW5lcygpO1xuXG4gICAgICAgIHZhciByYW5nZXMgPSBbXTtcbiAgICAgICAgdmFyIHJlID0gb3B0aW9ucy5yZTtcbiAgICAgICAgaWYgKG9wdGlvbnMuJGlzTXVsdGlMaW5lKSB7XG4gICAgICAgICAgICB2YXIgbGVuID0gcmUubGVuZ3RoO1xuICAgICAgICAgICAgdmFyIG1heFJvdyA9IGxpbmVzLmxlbmd0aCAtIGxlbjtcbiAgICAgICAgICAgIHZhciBwcmV2UmFuZ2U7XG4gICAgICAgICAgICBvdXRlcjogZm9yICh2YXIgcm93ID0gcmUub2Zmc2V0IHx8IDA7IHJvdyA8PSBtYXhSb3c7IHJvdysrKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBsZW47IGorKylcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmVzW3JvdyArIGpdLnNlYXJjaChyZVtqXSkgPT0gLTEpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnRMaW5lID0gbGluZXNbcm93XTtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IGxpbmVzW3JvdyArIGxlbiAtIDFdO1xuICAgICAgICAgICAgICAgIHZhciBzdGFydEluZGV4ID0gc3RhcnRMaW5lLmxlbmd0aCAtIHN0YXJ0TGluZS5tYXRjaChyZVswXSlbMF0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHZhciBlbmRJbmRleCA9IGxpbmUubWF0Y2gocmVbbGVuIC0gMV0pWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAocHJldlJhbmdlICYmIHByZXZSYW5nZS5lbmQucm93ID09PSByb3cgJiZcbiAgICAgICAgICAgICAgICAgICAgcHJldlJhbmdlLmVuZC5jb2x1bW4gPiBzdGFydEluZGV4XG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByYW5nZXMucHVzaChwcmV2UmFuZ2UgPSBuZXcgUmFuZ2UoXG4gICAgICAgICAgICAgICAgICAgIHJvdywgc3RhcnRJbmRleCwgcm93ICsgbGVuIC0gMSwgZW5kSW5kZXhcbiAgICAgICAgICAgICAgICApKTtcbiAgICAgICAgICAgICAgICBpZiAobGVuID4gMilcbiAgICAgICAgICAgICAgICAgICAgcm93ID0gcm93ICsgbGVuIC0gMjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGluZXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB2YXIgbWF0Y2hlcyA9IGxhbmcuZ2V0TWF0Y2hPZmZzZXRzKGxpbmVzW2ldLCByZSk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBtYXRjaGVzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IG1hdGNoZXNbal07XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlcy5wdXNoKG5ldyBSYW5nZShpLCBtYXRjaC5vZmZzZXQsIGksIG1hdGNoLm9mZnNldCArIG1hdGNoLmxlbmd0aCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyYW5nZSkge1xuICAgICAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gcmFuZ2Uuc3RhcnQuY29sdW1uO1xuICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IHJhbmdlLnN0YXJ0LmNvbHVtbjtcbiAgICAgICAgICAgIHZhciBpID0gMCwgaiA9IHJhbmdlcy5sZW5ndGggLSAxO1xuICAgICAgICAgICAgd2hpbGUgKGkgPCBqICYmIHJhbmdlc1tpXS5zdGFydC5jb2x1bW4gPCBzdGFydENvbHVtbiAmJiByYW5nZXNbaV0uc3RhcnQucm93ID09IHJhbmdlLnN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICBpKys7XG5cbiAgICAgICAgICAgIHdoaWxlIChpIDwgaiAmJiByYW5nZXNbal0uZW5kLmNvbHVtbiA+IGVuZENvbHVtbiAmJiByYW5nZXNbal0uZW5kLnJvdyA9PSByYW5nZS5lbmQucm93KVxuICAgICAgICA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KHZhciBpID0gTWF0aC5taW4oaW5wdXQubGVuZ3RoLCBpbnB1dC5sZW5ndGgpOyBpLS07ICkge1xuICAgICAgICAgICAgICAgIHZhciBjaCA9IGlucHV0W2ldO1xuICAgICAgICAgICAgICAgIGlmIChjaCAmJiBjaC50b0xvd2VyQ2FzZSgpICE9IGNoKVxuICAgICAgICAgICAgICAgICAgICByZXBsYWNlbWVudFtpXSA9IHJlcGxhY2VtZW50W2ldLnRvVXBwZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICByZXBsYWNlbWVudFtpXSA9IHJlcGxhY2VtZW50W2ldLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXBsYWNlbWVudCA9IHJlcGxhY2VtZW50LmpvaW4oXCJcIik7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHJldHVybiByZXBsYWNlbWVudDtcbiAgICB9O1xuXG4gICAgdGhpcy4kYXNzZW1ibGVSZWdFeHAgPSBmdW5jdGlvbihvcHRpb25zLCAkZGlzYWJsZUZha2VNdWx0aWxpbmUpIHtcbiAgICAgICAgaWYgKG9wdGlvbnMubmVlZGxlIGluc3RhbmNlb2YgUmVnRXhwKVxuICAgICAgICAgICAgcmV0dXJuIG9wdGlvbnMucmUgPSBvcHRpb25zLm5lZWRsZTtcblxuICAgICAgICB2YXIgbmVlZGxlID0gb3B0aW9ucy5uZWVkbGU7XG5cbiAgICAgICAgaWYgKCFvcHRpb25zLm5lZWRsZSlcbiAgICAgICAgICAgIHJldHVybiBvcHRpb25zLnJlID0gZmFsc2U7XG5cbiAgICAgICAgaWYgKCFvcHRpb25zLnJlZ0V4cClcbiAgICAgICAgICAgIG5lZWRsZSA9IGxhbmcuZXNjYXBlUmVnRXhwKG5lZWRsZSk7XG5cbiAgICAgICAgaWYgKG9wdGlvbnMud2hvbGVXb3JkKVxuICAgICAgICAgICAgbmVlZGxlID0gYWRkV29yZEJ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oZm9yRWFjaEluTGluZShyb3csIHN0YXJ0LmNvbHVtbiwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgZm9yIChyb3ctLTsgcm93ID49IGZpcnN0Um93OyByb3ctLSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvckVhY2hJbkxpbmUocm93LCBOdW1iZXIuTUFYX1ZBTFVFLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMud3JhcCA9PSBmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGZvciAocm93ID0gbGFzdFJvdywgZmlyc3RSb3cgPSBzdGFydC5yb3c7IHJvdyA+PSBmaXJzdFJvdzsgcm93LS0pXG4gICAgICAgICAgICAgICAgICAgIGlmIChmb3JFYWNoSW5MaW5lKHJvdywgTnVtYmVyLk1BWF9WQUxVRSwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHZhciBmb3JFYWNoID0gZnVuY3Rpb24oY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICB2YXIgcm93ID0gc3RhcnQucm93O1xuICAgICAgICAgICAgICAgIGlmIChmb3JFYWNoSW5MaW5lKHJvdywgc3RhcnQuY29sdW1uLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBmb3IgKHJvdyA9IHJvdyArIDE7IHJvdyA8PSBsYXN0Um93OyByb3crKylcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvckVhY2hJbkxpbmUocm93LCAwLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMud3JhcCA9PSBmYWxzZSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGZvciAocm93ID0gZmlyc3RSb3csIGxhc3RSb3cgPSBzdGFydC5yb3c7IHJvdyA8PSBsYXN0Um93OyByb3crKylcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvckVhY2hJbkxpbmUocm93LCAwLCBjYWxsYmFjaykpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBpZiAob3B0aW9ucy4kaXNNdWx0aUxpbmUpIHtcbiAgICAgICAgICAgIHZhciBsZW4gPSByZS5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgZm9yRWFjaEluTGluZSA9IGZ1bmN0aW9uKHJvdywgb2Zmc2V0LCBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHZhciBzdGFydFJvdyA9IGJhY2t3YXJkcyA/IHJvdyAtIGxlbiArIDEgOiByb3c7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXJ0Um93IDwgMCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHN0YXJ0Um93KTtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnRJbmRleCA9IGxpbmUuc2VhcmNoKHJlWzBdKTtcbiAgICAgICAgICAgICAgICBpZiAoIWJhY2t3YXJkcyAmJiBzdGFydEluZGV4IDwgb2Zmc2V0IHx8IHN0YXJ0SW5kZXggPT09IC0xKSByZXR1cm47XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCBsZW47IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHN0YXJ0Um93ICsgaSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsaW5lLnNlYXJjaChyZVtpXSkgPT0gLTEpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBlbmRJbmRleCA9IGxpbmUubWF0Y2gocmVbbGVuIC0gMV0pWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZiAoYmFja3dhcmRzICYmIGVuZEluZGV4ID4gb2Zmc2V0KSByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrKHN0YXJ0Um93LCBzdGFydEluZGV4LCBzdGFydFJvdyArIGxlbiAtIDEsIGVuZEluZGV4KSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGJhY2t3YXJkcykge1xuICAgICAgICAgICAgdmFyIGZvckVhY2hJbkxpbmUgPSBmdW5jdGlvbihyb3csIGVuZEluZGV4LCBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoZXMgPSBbXTtcbiAgICAgICAgICAgICAgICB2YXIgbSwgbGFzdCA9IDA7XG4gICAgICAgICAgICAgICAgcmUubGFzdEluZGV4ID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSgobSA9IHJlLmV4ZWMobGluZSkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBtWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgbGFzdCA9IG0uaW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGlmICghbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdCA+PSBsaW5lLmxlbmd0aCkgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICByZS5sYXN0SW5kZXggPSBsYXN0ICs9IDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKG0uaW5kZXggKyBsZW5ndGggPiBlbmRJbmRleClcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBtYXRjaGVzLnB1c2gobS5pbmRleCwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IG1hdGNoZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpIC09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbHVtbiA9IG1hdGNoZXNbaSAtIDFdO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gbWF0Y2hlc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrKHJvdywgY29sdW1uLCByb3csIGNvbHVtbiArIGxlbmd0aCkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdmFyIGZvckVhY2hJbkxpbmUgPSBmdW5jdGlvbihyb3csIHN0YXJ0SW5kZXgsIGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgICAgICB2YXIgbTtcbiAgICAgICAgICAgICAgICB2YXIgbGFzdCA9IHN0YXJ0SW5kZXg7XG4gICAgICAgICAgICAgICAgcmUubGFzdEluZGV4ID0gc3RhcnRJbmRleDtcbiAgICAgICAgICAgICAgICB3aGlsZSgobSA9IHJlLmV4ZWMobGluZSkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsZW5ndGggPSBtWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgbGFzdCA9IG0uaW5kZXg7XG4gICAgICAgICAgICAgICAgICAgIGl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YnVpbGRLZXlIYXNoKGNvbW1hbmQpO1xuICAgIH07XG5cbiAgICB0aGlzLnJlbW92ZUNvbW1hbmQgPSBmdW5jdGlvbihjb21tYW5kLCBrZWVwQ29tbWFuZCkge1xuICAgICAgICB2YXIgbmFtZSA9IGNvbW1hbmQgJiYgKHR5cGVvZiBjb21tYW5kID09PSAnc3RyaW5nJyA/IGNvbW1hbmQgOiBjb21tYW5kLm5hbWUpO1xuICAgICAgICBjb21tYW5kID0gdGhpcy5jb21tYW5kc1tuYW1lXTtcbiAgICAgICAgaWYgKCFrZWVwQ29tbWFuZClcbiAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmNvbW1hbmRzW25hbWVdO1xuICAgICAgICB2YXIgY2tiID0gdGhpcy5jb21tYW5kS2V5QmluZGluZztcbiAgICAgICAgZm9yICh2YXIga2V5SWQgaW4gY2tiKSB7XG4gICAgICAgICAgICB2YXIgY21kR3JvdXAgPSBja2Jba2V5SWRdO1xuICAgICAgICAgICAgaWYgKGNtZEdyb3VwID09IGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICBkZWxldGUgY2tiW2tleUlkXTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoQXJyYXkuaXNBcnJheShjbWRHcm91cCkpIHtcbiAgICAgICAgICAgICAgICB2YXIgaSA9IGNtZEdyb3VwLmluZGV4T2YoY29tbWFuZCk7XG4gICAgICAgICAgICAgICAgaWYgKGkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgY21kR3JvdXAuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY21kR3JvdXAubGVuZ3RoID09IDEpXG4gICAgICAgICAgICAgICAgICAgICAgICBja2Jba2V5SWRdID0gY21kR3JvdXBbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuYmluZEtleSA9IGZ1bmN0aW9uKGtleSwgY29tbWFuZCwgcG9zaXRpb24pIHtcbiAgICAgICAgaWYgKHR5cGVvZiBrZXkgPT0gXCJvYmplY3RcIiAmJiBrZXkpIHtcbiAgICAgICAgICAgIGlmIChwb3NpdGlvbiA9PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgcG9zaXRpb24gPSBrZXkucG9zaXRpb247XG4gICAgICAgICAgICBrZXkgPSBrZXlbdGhpcy5wbGF0Zm9ybV07XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFrZXkpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGlmICh0eXBlb2YgY29tbWFuZCA9PSBcImZ1bmN0aW9uXCIpXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hZGRDb21tYW5kKHtleGVjOiBjb21tYW5kLCBiaW5kS2V5OiBrZXksIG5hbWU6IGNvbW1hbmQubmFtZSB8fCBrZXl9KTtcbiAgICAgICAgXG4gICAgICAgIGtleS5zcGxpdChcInxcIikuZm9yRWFjaChmdW5jdGlvbihrZXlQYXJ0KSB7XG4gICAgICAgICAgICB2YXIgY2hhaW4gPSBcIlwiO1xuICAgICAgICAgICAgaWYgKGtleVBhcnQuaW5kZXhPZihcIiBcIikgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFydHMgPSBrZXlQYXJ0LnNwbGl0KC9cXHMrLyk7XG4gICAgICAgICAgICAgICAga2V5UGFydCA9IHBhcnRzLnBvcCgpO1xuICAgICAgICAgICAgICAgIHBhcnRzLmZvckVhY2goZnVuY3Rpb24oa2V5UGFydCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYmluZGluZyA9IHRoaXMucGFyc2VLZXlzKGtleVBhcnQpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaWQgPSBLRVlfTU9EU1tiaW5kaW5nLmhhc2hJZF0gKyBiaW5kaW5nLmtleTtcbiAgICAgICAgICAgICAgICAgICAgY2hhaW4gKz0gKGNoYWluID8gXCIgXCIgOiBcIlwiKSArIGlkO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9hZGRDb21tYW5kVG9CaW5kaW5nKGNoYWluLCBcImNoYWluS2V5c1wiKTtcbiAgICAgICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgICAgICAgICBjaGFpbiArPSBcIiBcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBiaW5kaW5nID0gdGhpcy5wYXJzZUtleXMoa2V5UGFydCk7XG4gICAgICAgICAgICB2YXIgaWQgPSBLRVlfTU9EU1tiaW5kaW5nLmhhc2hJZF0gKyBiaW5kaW5nLmtleTtcbiAgICAgICAgICAgIHRoaXMuX2FkZENvbW1hbmRUb0JpbmRpbmcoY2hhaW4gKyBpZCwgY29tbWFuZCwgcG9zaXRpb24pO1xuICAgICAgICB9LCB0aGlzKTtcbiAgICB9O1xuICAgIFxuICAgIGZ1bmN0aW9uIGdldFBvc2l0aW9uKGNvbW1hbmQpIHtcbiAgICAgICAgcmV0dXJuIHR5cGVvZiBjb21tYW5kID09IFwib2JqZWN0XCIgJiYgY29tbWFuZC5iaW5kS2V5XG4gICAgICAgICAgICAmJiBjb21tYW5kLmJpbmRLZXkucG9zaXRpb25cbiAgICAgICAgICAgIHx8IChjb21tYW5kLmlzRGVmYXVsdCA/IC0xMDAgOiAwKTtcbiAgICB9XG4gICAgdGhpcy5fYWRkQ29tbWFuZFRvQmluZGluZyA9IGZ1bmN0aW9uKGtleUlkLCBjb21tYW5kLCBwb3NpdGlvbikge1xuICAgICAgICB2YXIgY2tiID0gdGhpcy5jb21tYW5kS2V5QmluZGluZywgaTtcbiAgICAgICAgaWYgKCFjb21tYW5kKSB7XG4gICAgICAgICAgICBkZWxldGUgY2tiW2tleUlkXTtcbiAgICAgICAgfSBlbHNlIGlmICghY2tiW2tleUlkXSB8fCB0aGlzLiRzaW5nbGVDb21tYW5kKSB7XG4gICAgICAgICAgICBja2Jba2V5SWRdID0gY29tbWFuZDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICghQXJyYXkuaXNBcnJheShja2Jba2V5SWRdKSkge1xuICAgICAgICAgICAgICAgIGNrYltrZXlJZF0gPSBbY2tiW2tleUlkXV07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKChpID0gY2tiW2tleUlkXS5pbmRleE9mKGNvbW1hbmQpKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgIGNrYltrZXlJZF0uc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHBvc2l0aW9uICE9IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICBwb3NpdGlvbiA9IGdldFBvc2l0aW9uKGNvbW1hbmQpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgY29tbWFuZHMgPSBja2Jba2V5SWRdO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvbW1hbmRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIG90aGVyID0gY29tbWFuZHNbaV07XG4gICAgICAgICAgICAgICAgdmFyIG90aGVyUG9zID0gZ2V0UG9zaXRpb24ob3RoZXIpO1xuICAgICAgICAgICAgICAgIGlmIChvdGhlclBvcyA+IHBvc2l0aW9uKVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbW1hbmRzLnNwbGljZShpLCAwLCBjb21tYW5kKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLmFkZENvbW1hbmRzID0gZnVuY3Rpb24oY29tbWFuZHMpIHtcbiAgICAgICAgY29tbWFuZHMgJiYgT2JqZWN0LmtleXMoY29tbWFuZHMpLmZvckVhY2goZnVuY3Rpb24obmFtZSkge1xuICAgICAgICAgICAgdmFyIGNvbW1hbmQgPSBjb21tYW5kc1tuYW1lXTtcbiAgICAgICAgICAgIGlmICghY29tbWFuZClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29tbWFuZCA9PT0gXCJzdHJpbmdcIilcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5iaW5kS2V5KGNvbW1hbmQsIG5hbWUpO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIGNvbW1hbmQgPT09IFwiZnVuY3Rpb25cIilcbiAgICAgICAgICAgICAgICBjb21tYW5kID0geyBleGVjOiBjb21tYW5kIH07XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgY29tbWFuZCAhPT0gXCJvYmplY3RcIilcbiAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgIGlmICghY29tbWFuZC5uYW1lKVxuICAgICAgICAgICAgICAgIGNvbW1hbmQubmFtZSA9IG5hbWU7XG5cbiAgICAgICAgICAgIHRoaXMuYWRkQ29tbWFuZChjb21tYW5kKTtcbiAgICAgICAgfSwgdGhpcyk7XG4gICAgfTtcblxuICAgIHRoaXMucmVtb3ZlQ29tbWFuZHMgPSBmdW5jdGlvbihjb21tYW5kcykge1xuICAgICAgICBPYmplY3Qua2V5cyhjb21tYW5kcykuZm9yRWFjaChmdW5jdGlvbihuYW1lKSB7XG4gICAgICAgICAgICB0aGlzLnJlbW92ZUNvbW1hbmQoY29tbWFuZHNbbmFtZV0pO1xuICAgICAgICB9LCB0aGlzKTtcbiAgICB9O1xuXG4gICAgdGhpcy5iaW5kS2V5cyA9IGZ1bmN0aW9uKGtleUxpc3QpIHtcbiAgICAgICAgT2JqZWN0LmtleXMoa2V5TGlzdCkuZm9yRWFjaChmdW5jdGlvbihrZXkpIHtcbiAgICAgICAgICAgIHRoaXMuYmluZEtleShrZXksIGtleUxpc3Rba2V5XSk7XG4gICAgICAgIH0sIHRoaXMpO1xuICAgIH07XG5cbiAgICB0aGlzLl9idWlsZEtleUhhc2ggPSBmdW5jdGlvbihjb21tYW5kKSB7XG4gICAgICAgIHRoaXMuYmluZEtleShjb21tYW5kLmJpbmRLZXksIGNv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ZiAoY29tbWFuZC5uYW1lICYmIHRoaXMuJGJsb2NrU2Nyb2xsaW5nID4gMClcbiAgICAgICAgICAgICAgICB0aGlzLiRibG9ja1Njcm9sbGluZy0tO1xuICAgICAgICAgICAgdmFyIHNjcm9sbEludG9WaWV3ID0gY29tbWFuZCAmJiBjb21tYW5kLnNjcm9sbEludG9WaWV3O1xuICAgICAgICAgICAgaWYgKHNjcm9sbEludG9WaWV3KSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChzY3JvbGxJbnRvVmlldykge1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwiY2VudGVyLWFuaW1hdGVcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjcm9sbEludG9WaWV3ID0gXCJhbmltYXRlXCI7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXCJjZW50ZXJcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuc2Nyb2xsQ3Vyc29ySW50b1ZpZXcobnVsbCwgMC41KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwiYW5pbWF0ZVwiOlxuICAgICAgICAgICAgICAgICAgICBjYXNlIFwiY3Vyc29yXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNjcm9sbEN1cnNvckludG9WaWV3KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcInNlbGVjdGlvblBhcnRcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMuc2VsZWN0aW9uLmdldFJhbmdlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0gdGhpcy5yZW5kZXJlci5sYXllckNvbmZpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyYW5nZS5zdGFydC5yb3cgPj0gY29uZmlnLmxhc3RSb3cgfHwgcmFuZ2UuZW5kLnJvdyA8PSBjb25maWcuZmlyc3RSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNjcm9sbFNlbGVjdGlvbkludG9WaWV3KHRoaXMuc2VsZWN0aW9uLmFuY2hvciwgdGhpcy5zZWxlY3Rpb24ubGVhZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2Nyb2xsSW50b1ZpZXcgPT0gXCJhbmltYXRlXCIpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucmVuZGVyZXIuYW5pbWF0ZVNjcm9sbGluZyh0aGlzLmN1ck9wLnNjcm9sbFRvcCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHRoaXMucHJldk9wID0gdGhpcy5jdXJPcDtcbiAgICAgICAgICAgIHRoaXMuY3VyT3AgPSBudWxsO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLiRtZXJnZWFibGVDb21tYW5kcyA9IFtcImJhY2tzcGFjZVwiLCBcImRlbFwiLCBcImluc2VydHN0cmluZ1wiXTtcbiAgICB0aGlzLiRoaXN0b3J5VHJhY2tlciA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKCF0aGlzLiRtZXJnZVVuZG9EZWx0YXMpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIHByZXYgPSB0aGlzLnByZXZPcDtcbiAgICAgICAgdmFyIG1lcmdlYWJsZUNvbW1hbmRzID0gdGhpcy4kbWVyZ2VhYmxlQ29tbWFuZHM7XG4gICAgICAgIHZhciBzaG91bGRNZXJnZSA9IHByZXYuY29tbWFuZCAmJi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24pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHJhbmdlKVxuICAgICAgICAgICAgICAgIHNlc3Npb24uJGJyYWNrZXRIaWdobGlnaHQgPSBzZXNzaW9uLmFkZE1hcmtlcihyYW5nZSwgXCJhY2VfYnJhY2tldFwiLCBcInRleHRcIik7XG4gICAgICAgIH0sIDUwKTtcbiAgICB9O1xuICAgIHRoaXMuJGhpZ2hsaWdodFRhZ3MgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgaWYgKHRoaXMuJGhpZ2hsaWdodFRhZ1BlbmRpbmcpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcbiAgICAgICAgdGhpcy4kaGlnaGxpZ2h0VGFnUGVuZGluZyA9IHRydWU7XG4gICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICBzZWxmLiRoaWdobGlnaHRUYWdQZW5kaW5nID0gZmFsc2U7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBzZXNzaW9uID0gc2VsZi5zZXNzaW9uO1xuICAgICAgICAgICAgaWYgKCFzZXNzaW9uIHx8ICFzZXNzaW9uLmJnVG9rZW5pemVyKSByZXR1cm47XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBwb3MgPSBzZWxmLmdldEN1cnNvclBvc2l0aW9uKCk7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZWxmLnNlc3Npb24sIHBvcy5yb3csIHBvcy5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICghdG9rZW4gfHwgIS9cXGIoPzp0YWctb3Blbnx0YWctbmFtZSkvLnRlc3QodG9rZW4udHlwZSkpIHtcbiAgICAgICAgICAgICAgICBzZXNzaW9uLnJlbW92ZU1hcmtlcihzZXNzaW9uLiR0YWdIaWdobGlnaHQpO1xuICAgICAgICAgICAgICAgIHNlc3Npb24uJHRhZ0hpZ2hsaWdodCA9IG51bGw7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAodG9rZW4udHlwZS5pbmRleE9mKFwidGFnLW9wZW5cIikgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBGb3J3YXJkKCk7XG4gICAgICAgICAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgdGFnID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICB2YXIgZGVwdGggPSAwO1xuICAgICAgICAgICAgdmFyIHByZXZUb2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocHJldlRva2VuLnZhbHVlID09ICc8Jyl7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBwcmV2VG9rZW4gPSB0b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnZhbHVlID09PSB0YWcgJiYgdG9rZW4udHlwZS5pbmRleE9mKCd0YWctbmFtZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8Lycpe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoLS07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgZGVwdGggPj0gMCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBwcmV2VG9rZW47XG4gICAgICAgICAgICAgICAgICAgIHByZXZUb2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnZhbHVlID09PSB0YWcgJiYgdG9rZW4udHlwZS5pbmRleE9mKCd0YWctbmFtZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVwdGgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHJldlRva2VuLnZhbHVlID09PSAnPC8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVwdGgtLTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHByZXZUb2tlbiAmJiBkZXB0aCA8PSAwKTtcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoIXRva2VuKSB7XG4gICAgICAgICAgICAgICAgc2Vzc2lvbi5yZW1vdmVNYXJrZXIoc2Vzc2lvbi4kdGFnSGlnaGxpZ2h0KTtcb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JlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xuICAgIHRoaXMubW9kaWZ5TnVtYmVyID0gZnVuY3Rpb24oYW1vdW50KSB7XG4gICAgICAgIHZhciByb3cgPSB0aGlzLnNlbGVjdGlvbi5nZXRDdXJzb3IoKS5yb3c7XG4gICAgICAgIHZhciBjb2x1bW4gPSB0aGlzLnNlbGVjdGlvbi5nZXRDdXJzb3IoKS5jb2x1bW47XG4gICAgICAgIHZhciBjaGFyUmFuZ2UgPSBuZXcgUmFuZ2Uocm93LCBjb2x1bW4tMSwgcm93LCBjb2x1bW4pO1xuXG4gICAgICAgIHZhciBjID0gdGhpcy5zZXNzaW9uLmdldFRleHRSYW5nZShjaGFyUmFuZ2UpO1xuICAgICAgICBpZiAoIWlzTmFOKHBhcnNlRmxvYXQoYykpICYmIGlzRmluaXRlKGMpKSB7XG4gICAgICAgICAgICB2YXIgbnIgPSB0aGlzLmdldE51bWJlckF0KHJvdywgY29sdW1uKTtcbiAgICAgICAgICAgIGlmIChucikge1xuICAgICAgICAgICAgICAgIHZhciBmcCA9IG5yLnZhbHVlLmluZGV4T2YoXCIuXCIpID49IDAgPyBuci5zdGFydCArIG5yLnZhbHVlLmluZGV4T2YoXCIuXCIpICsgMSA6IG5yLmVuZDtcbiAgICAgICAgICAgICAgICB2YXIgZGVjaW1hbHMgPSBuci5zdGFydCArIG5yLnZhbHVlLmxlbmd0aCAtIGZwO1xuXG4gICAgICAgICAgICAgICAgdmFyIHQgPSBwYXJzZUZsb2F0KG5yLnZhbHVlKTtcbiAgICAgICAgICAgICAgICB0ICo9IE1hdGgucG93KDEwLCBkZWNpbWFscyk7XG5cblxuICAgICAgICAgICAgICAgIGlmKGZwICE9PSBuci5lbmQgJiYgY29sdW1uIDwgZnApe1xuICAgICAgICAgICAgICAgICAgICBhbW91bnQgKj0gTWF0aC5wb3coMTAsIG5yLmVuZCAtIGNvbHVtbiAtIDEpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGFtb3VudCAqPSBNYXRoLnBvdygxMCwgbnIuZW5kIC0gY29sdW1uKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0ICs9IGFtb3VudDtcbiAgICAgICAgICAgICAgICB0IC89IE1hdGgucG93KDEwLCBkZWNpbWFscyk7XG4gICAgICAgICAgICAgICAgdmFyIG5uciA9IHQudG9GaXhlZChkZWNpbWFscyk7XG4gICAgICAgICAgICAgICAgdmFyIHJlcGxhY2VSYW5nZSA9IG5ldyBSYW5nZShyb3csIG5yLnN0YXJ0LCByb3csIG5yLmVuZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXNzaW9uLnJlcGxhY2UocmVwbGFjZVJhbmdlLCBubnIpO1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUN1cnNvclRvKHJvdywgTWF0aC5tYXgobnIuc3RhcnQgKzEsIGNvbHVtbiArIG5uci5sZW5ndGggLSBuci52YWx1ZS5sZW5ndGgpKTtcblxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLnJlbW92ZUxpbmVzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciByb3dzID0gdGhpcy4kZ2V0U2VsZWN0ZWRSb3dzKCk7XG4gICAgICAgIHRoaXMuc2Vzc2lvbi5yZW1vdmVGdWxsTGluZXMocm93cy5maXJzdCwgcm93cy5sYXN0KTtcbiAgICAgICAgdGhpcy5jbGVhclNlbGVjdGlvbigpO1xuICAgIH07XG5cbiAgICB0aGlzLmR1cGxpY2F0ZVNlbGVjdGlvbiA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgc2VsID0gdGhpcy5zZWxlY3Rpb247XG4gICAgICAgIHZhciBkb2MgPSB0aGlzLnNlc3Npb247XG4gICAgICAgIHZhciByYW5nZSA9IHNlbC5nZXRSYW5nZSgpO1xuICAgICAgICB2YX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0gMDtcbiAgICAgICAgICAgIHZhciBsID0gcmFuZ2VzLmxlbmd0aDtcbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJhbmdlSW5kZXggPSBpO1xuICAgICAgICAgICAgICAgIHJhbmdlc1tpXS5tb3ZlQnkoZGlmZiwgMCk7XG4gICAgICAgICAgICAgICAgcm93cyA9IHRoaXMuJGdldFNlbGVjdGVkUm93cyhyYW5nZXNbaV0pO1xuICAgICAgICAgICAgICAgIHZhciBmaXJzdCA9IHJvd3MuZmlyc3Q7XG4gICAgICAgICAgICAgICAgdmFyIGxhc3QgPSByb3dzLmxhc3Q7XG4gICAgICAgICAgICAgICAgd2hpbGUgKCsraSA8IGwpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRvdGFsRGlmZikgcmFuZ2VzW2ldLm1vdmVCeSh0b3RhbERpZmYsIDApO1xuICAgICAgICAgICAgICAgICAgICB2YXIgc3ViUm93cyA9IHRoaXMuJGdldFNlbGVjdGVkUm93cyhyYW5nZXNbaV0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29weSAmJiBzdWJSb3dzLmZpcnN0ICE9IGxhc3QpXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIWNvcHkgJiYgc3ViUm93cy5maXJzdCA+IGxhc3QgKyAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGxhc3QgPSBzdWJSb3dzLmxhc3Q7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICBkaWZmID0gdGhpcy5zZXNzaW9uLiRtb3ZlTGluZXMoZmlyc3QsIGxhc3QsIGNvcHkgPyAwIDogZGlyKTtcbiAgICAgICAgICAgICAgICBpZiAoY29weSAmJiBkaXIgPT0gLTEpIHJh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IpXCI6IFwiKFwiLFxuICAgICAgICAgICAgXCIoXCI6IFwiKFwiLFxuICAgICAgICAgICAgXCJdXCI6IFwiW1wiLFxuICAgICAgICAgICAgXCJbXCI6IFwiW1wiLFxuICAgICAgICAgICAgXCJ7XCI6IFwie1wiLFxuICAgICAgICAgICAgXCJ9XCI6IFwie1wiXG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICBkbyB7XG4gICAgICAgICAgICBpZiAodG9rZW4udmFsdWUubWF0Y2goL1t7fSgpXFxbXFxdXS9nKSkge1xuICAgICAgICAgICAgICAgIGZvciAoOyBpIDwgdG9rZW4udmFsdWUubGVuZ3RoICYmICFmb3VuZDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghYnJhY2tldHNbdG9rZW4udmFsdWVbaV1dKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGJyYWNrZXRUeXBlID0gYnJhY2tldHNbdG9rZW4udmFsdWVbaV1dICsgJy4nICsgdG9rZW4udHlwZS5yZXBsYWNlKFwicnBhcmVuXCIsIFwibHBhcmVuXCIpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc05hTihkZXB0aFticmFja2V0VHlwZV0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZXB0aFticmFja2V0VHlwZV0gPSAwO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh0b2tlbi52YWx1ZVtpXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnKCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdbJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3snOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW2JyYWNrZXRUeXBlXSsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnKSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICddJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ30nOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW2JyYWNrZXRUeXBlXS0tO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRoW2JyYWNrZXRUeXBlXSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2hUeXBlID0gJ2JyYWNrZXQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh0b2tlbiAmJiB0b2tlbi50eXBlLmluZGV4T2YoJ3RhZy1uYW1lJykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzTmFOKGRlcHRoW3Rva2VuLnZhbHVlXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGhbdG9rZW4udmFsdWVdID0gMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlcHRoW3Rva2VuLnZhbHVlXSsrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8LycpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGhbdG9rZW4udmFsdWVdLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmIChkZXB0aFt0b2tlbi52YWx1ZV0gPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoVHlwZSA9ICd0YWcnO1xuICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIWZvdW5kKSB7XG4gICAgICAgICAgICAgICAgcHJldlRva2VuID0gdG9rZW47XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlICh0b2tlbiAmJiAhZm91bmQpO1xuICAgICAgICBpZiAoIW1hdGNoVHlwZSlcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgcmFuZ2UsIHBvcztcbiAgICAgICAgaWYgKG1hdGNoVHlwZSA9PT0gJ2JyYWNrZXQnKSB7XG4gICAgICAgICAgICByYW5nZSA9IHRoaXMuc2Vzc2lvbi5nZXRCcmFja2V0UmFuZ2UoY3Vyc29yKTtcbiAgICAgICAgICAgIGlmICghcmFuZ2UpIHtcbiAgICAgICAgICAgICAgICByYW5nZSA9IG5ldyBSYW5nZShcbiAgICAgICAgICAgICAgICAgICAgaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCksXG4gICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgaSAtIDEsXG4gICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIGkgLSAxXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICBwb3MgPSByYW5nZS5zdGFydDtcbiAgICAgICAgICAgICAgICBpZiAoZXhwYW5kIHx8IHBvcy5yb3cgPT09IGN1cnNvci5yb3cgJiYgTWF0aC5hYnMocG9zLmNvbHVtbiAtIGN1cnNvci5jb2x1bW4pIDwgMilcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLnNlc3Npb24uZ2V0QnJhY2tldFJhbmdlKHBvcyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobWF0Y2hUeXBlID09PSAndGFnJykge1xuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZigndGFnLW5hbWUnKSAhPT0gLTEpIFxuICAgICAgICAgICAgICAgIHZhciB0YWcgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgIHJhbmdlID0gbmV3IFJhbmdlKFxuICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpIC0gMixcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKSxcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSAtIDJcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBpZiAocmFuZ2UuY29tcGFyZShjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKSA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGZvdW5kID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHByZXZUb2tlbjtcbiAgICAgICAgICAgICAgICAgICAgcHJldlRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAocHJldlRva2VuKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJldlRva2VuLnR5cGUuaW5kZXhPZigndGFnLWNsb3NlJykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2Uuc2V0RW5kKGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLCBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT09IHRhZyAmJiB0b2tlbi50eXBlLmluZGV4T2YoJ3RhZy1uYW1lJykgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW3RhZ10rKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocHJldlRva2VuLnZhbHVlID09PSAnPC8nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoW3RhZ10tLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRoW3RhZ10gPT09IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHByZXZUb2tlbiAmJiAhZm91bmQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZigndGFnLW5hbWUnKSkge1xuICAgICAgICAgICAgICAgIHBvcyA9IHJhbmdlLnN0YXJ0O1xuICAgICAgICAgICAgICAgIGlmIChwb3Mucm93ID09IGN1cnNvci5yb3cgJiYgTWF0aC5hYnMocG9zLmNvbHVtbiAtIGN1cnNvci5jb2x1bW4pIDwgMilcbiAgICAgICAgICAgICAgICAgICAgcG9zID0gcmFuZ2UuZW5kO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcG9zID0gcmFuZ2UgJiYgcmFuZ2UuY3Vyc29yIHx8IHBvcztcbiAgICAgICAgaWYgKHBvcykge1xuICAgICAgICAgICAgaWYgKHNlbGVjdCkge1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZSAmJiBleHBhbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24uc2V0UmFuZ2UocmFuZ2UpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmFuZ2UgJiYgcmFuZ2UuaXNFcXVhbCh0aGlzLmdldFNlbGVjdGlvblJhbmdlKCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJTZWxlY3Rpb24oKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5zZWxlY3RUbyhwb3Mucm93LCBwb3MuY29sdW1uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uLm1vdmVUbyhwb3Mucm93LCBwb3MuY29sdW1uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5nb3RvTGluZSA9IGZ1bmN0aW9uKGxpbmVOdW1iZXIsIGNvbHVtbiwgYW5pbWF0ZSkge1xuICAgICAgICB0aGlzLnNlbGVjdGlvbi5jbGVhclN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vcztcbiAgICAgICAgICAgICAgICB2YXIgY29uZmlnID0gcmVuZGVyZXIubGF5ZXJDb25maWc7XG4gICAgICAgICAgICAgICAgdmFyIHRvcCA9IHBvcy50b3AgLSBjb25maWcub2Zmc2V0O1xuICAgICAgICAgICAgICAgIGlmIChwb3MudG9wID49IDAgJiYgdG9wICsgcmVjdC50b3AgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHNob3VsZFNjcm9sbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwb3MudG9wIDwgY29uZmlnLmhlaWdodCAmJlxuICAgICAgICAgICAgICAgICAgICBwb3MudG9wICsgcmVjdC50b3AgKyBjb25maWcubGluZUhlaWdodCA+IHdpbmRvdy5pbm5lckhlaWdodCkge1xuICAgICAgICAgICAgICAgICAgICBzaG91bGRTY3JvbGwgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzaG91bGRTY3JvbGwgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc2hvdWxkU2Nyb2xsICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgc2Nyb2xsQW5jaG9yLnN0eWxlLnRvcCA9IHRvcCArIFwicHhcIjtcbiAgICAgICAgICAgICAgICAgICAgc2Nyb2xsQW5jaG9yLnN0eWxlLmxlZnQgPSBwb3MubGVmdCArIFwicHhcIjtcbiAgICAgICAgICAgICAgICAgICAgc2Nyb2xsQW5jaG9yLnN0eWxlLmhlaWdodCA9IGNvbmZpZy5saW5lSGVpZ2h0ICsgXCJweFwiO1xuICAgICAgICAgICAgICAgICAgICBzY3JvbGxBbmNob3Iuc2Nyb2xsSW50b1ZpZXcoc2hvdWxkU2Nyb2xsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2hvdWxkU2Nyb2xsID0gcmVjdCA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICA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leHQucHVzaChhbm5vVGV4dCk7XG5cbiAgICAgICAgICAgIHZhciB0eXBlID0gYW5ub3RhdGlvbi50eXBlO1xuICAgICAgICAgICAgaWYgKHR5cGUgPT0gXCJlcnJvclwiKVxuICAgICAgICAgICAgICAgIHJvd0luZm8uY2xhc3NOYW1lID0gXCIgYWNlX2Vycm9yXCI7XG4gICAgICAgICAgICBlbHNlIGlmICh0eXBlID09IFwid2FybmluZ1wiICYmIHJvd0luZm8uY2xhc3NOYW1lICE9IFwiIGFjZV9lcnJvclwiKVxuICAgICAgICAgICAgICAgIHJvd0luZm8uY2xhc3NOYW1lID0gXCIgYWNlX3dhcm5pbmdcIjtcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGUgPT0gXCJpbmZvXCIgJiYgKCFyb3dJbmZvLmNsYXNzTmFtZSkpXG4gICAgICAgICAgICAgICAgcm93SW5mby5jbGFzc05hbWUgPSBcIiBhY2VfaW5mb1wiO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJHVwZGF0ZUFubm90YXRpb25zID0gZnVuY3Rpb24gKGRlbHRhKSB7XG4gICAgICAgIGlmICghdGhpcy4kYW5ub3RhdGlvbnMubGVuZ3RoKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgZmlyc3RSb3cgPSBkZWx0YS5zdGFydC5yb3c7XG4gICAgICAgIHZhciBsZW4gPSBkZWx0YS5lbmQucm93IC0gZmlyc3RSb3c7XG4gICAgICAgIGlmIChsZW4gPT09IDApIHtcbiAgICAgICAgfSBlbHNlIGlmIChkZWx0YS5hY3Rpb24gPT0gJ3JlbW92ZScpIHtcbiAgICAgICAgICAgIHRoaXMuJGFubm90YXRpb25zLnNwbGljZShmaXJzdFJvdywgbGVuICsgMSwgbnVsbCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgYXJncyA9IG5ldyBBcnJheShsZW4gKyAxKTtcbiAgICAgICAgICAgIGFyZ3MudW5zaGlmdChm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W5kZXJlcjtcblxuICAgICAgICB2YXIgY2VsbCA9IG51bGw7XG4gICAgICAgIHZhciBpbmRleCA9IC0xO1xuICAgICAgICB2YXIgcm93ID0gZmlyc3RSb3c7XG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICBpZiAocm93ID4gZm9sZFN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgcm93ID0gZm9sZC5lbmQucm93ICsgMTtcbiAgICAgICAgICAgICAgICBmb2xkID0gc2Vzc2lvbi5nZXROZXh0Rm9sZExpbmUocm93LCBmb2xkKTtcbiAgICAgICAgICAgICAgICBmb2xkU3RhcnQgPSBmb2xkID8gZm9sZC5zdGFydC5yb3cgOiBJbmZpbml0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyb3cgPiBsYXN0Um93KSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuJGNlbGxzLmxlbmd0aCA+IGluZGV4ICsgMSkge1xuICAgICAgICAgICAgICAgICAgICBjZWxsID0gdGhpcy4kY2VsbHMucG9wKCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5yZW1vdmVDaGlsZChjZWxsLmVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2VsbCA9IHRoaXMuJGNlbGxzWysraW5kZXhdO1xuICAgICAgICAgICAgaWYgKCFjZWxsKSB7XG4gICAgICAgICAgICAgICAgY2VsbCA9IHtlbGVtZW50OiBudWxsLCB0ZXh0Tm9kZTogbnVsbCwgZm9sZFdpZGdldDogbnVsbH07XG4gICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50ID0gZG9tLmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG4gICAgICAgICAgICAgICAgY2VsbC50ZXh0Tm9kZSA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCcnKTtcbiAgICAgICA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gIHZhciBjID0gZm9sZFdpZGdldHNbcm93XTtcbiAgICAgICAgICAgICAgICBpZiAoYyA9PSBudWxsKVxuICAgICAgICAgICAgICAgICAgICBjID0gZm9sZFdpZGdldHNbcm93XSA9IHNlc3Npb24uZ2V0Rm9sZFdpZGdldChyb3cpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoYykge1xuICAgICAgICAgICAgICAgIGlmICghY2VsbC5mb2xkV2lkZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9sZFdpZGdldCA9IGRvbS5jcmVhdGVFbGVtZW50KFwic3BhblwiKTtcbiAgICAgICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50LmFwcGVuZENoaWxkKGNlbGwuZm9sZFdpZGdldCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBjbGFzc05hbWUgPSBcImFjZV9mb2xkLXdpZGdldCBhY2VfXCIgKyBjO1xuICAgICAgICAgICAgICAgIGlmIChjID09IFwic3RhcnRcIiAmJiByb3cgPT0gZm9sZFN0YXJ0ICYmIHJvdyA8IGZvbGQuZW5kLnJvdylcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lICs9IFwiIGFjZV9jbG9zZWRcIjtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZSArPSBcIiBhY2Vfb3BlblwiO1xuICAgICAgICAgICAgICAgIGlmIChjZWxsLmZvbGRXaWRnZXQuY2xhc3NOYW1lICE9IGNsYXNzTmFtZSlcbiAgICAgICAgICAgICAgICAgICAgY2VsbC5mb2xkV2lkZ2V0LmNsYXNzTmFtZSA9IGNsYXNzTmFtZTtcblxuICAgICAgICAgICAgICAgIHZhciBoZWlnaHQgPSBjb25maWcubGluZUhlaWdodCArIFwicHhcIjtcbiAgICAgICAgICAgICAgICBpZiAoY2VsbC5mb2xkV2lkZ2V0LnN0eWxlLmhlaWdodCAhPSBoZWlnaHQpXG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9sZFdpZGdldC5zdHlsZS5oZWlnaHQgPSBoZWlnaHQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChjZWxsLmZvbGRXaWRnZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50LnJlbW92ZUNoaWxkKGNlbGwuZm9sZFdpZGdldCk7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9sZFdpZGdldCA9IG51bGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgdGV4dCA9IGxhc3RMaW5lTnVtYmVyID0gZ3V0dGVyUmVuZGVyZXJcbiAgICAgICAgICAgICAgICA/IGd1dHRlclJlbmRlcmVyLmdldFRleHQoc2Vzc2lvbiwgcm93KVxuICAgICAgICAgICAgICAgIDogcm93ICsgZmlyc3RMaW5lTnVtYmVyO1xuICAgICAgICAgICAgaWYgKHRleHQgIT09IGNlbGwudGV4dE5vZGUuZGF0YSlcbiAgICAgICAgICAgICAgICBjZWxsLnRleHROb2RlLmRhdGEgPSB0ZXh0O1xuXG4gICAgICAgICAgICByb3crKztcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuZWxlbWVudC5zdHlsZS5oZWlnaHQgPSBjb25maWcubWluSGVpZ2h0ICsgXCJweFwiO1xuXG4gICAgICAgIGlmICh0aGlzLiRmaXhlZFdpZHRoIHx8IHNlc3Npb24uJHVzZVdyYXBNb2RlKVxuICAgICAgICAgICAgbGFzdExpbmVOdW1iZXIgPSBzZXNzaW9uLmdldExlbmd0aCgpICsgZmlyc3RMaW5lTnVtYmVyO1xuXG4gICAgICAgIHZhciBndXR0ZXJXaWR0aCA9IGd1dHRlclJlbmRlcmVyIFxuICAgICAgICAgICAgPyBndXR0ZXJSZW5kZXJlci5nZXRXaWR0aChzZXNzaW9uLCBsYXN0TGluZU51bW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um93LCBjb25maWcubGFzdFJvdyk7XG4gICAgICAgICAgICBpZiAocmFuZ2UuaXNFbXB0eSgpKSBjb250aW51ZTtcblxuICAgICAgICAgICAgcmFuZ2UgPSByYW5nZS50b1NjcmVlblJhbmdlKHRoaXMuc2Vzc2lvbik7XG4gICAgICAgICAgICBpZiAobWFya2VyLnJlbmRlcmVyKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRvcCA9IHRoaXMuJGdldFRvcChyYW5nZS5zdGFydC5yb3csIGNvbmZpZyk7XG4gICAgICAgICAgICAgICAgdmFyIGxlZnQgPSB0aGlzLiRwYWRkaW5nICsgKHRoaXMuc2Vzc2lvbi4kYmlkaUhhbmRsZXIuaXNCaWRpUm93KHJhbmdlLnN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICAgICAgPyB0aGlzLnNlc3Npb24uJGJpZGlIYW5kbGVyLmdldFBvc0xlZnQocmFuZ2Uuc3RhcnQuY29sdW1uKVxuICAgICAgICAgICAgICAgICAgICA6IHJhbmdlLnN0YXJ0LmNvbHVtbiAqIGNvbmZpZy5jaGFyYWN0ZXJXaWR0aCk7XG4gICAgICAgICAgICAgICAgbWFya2VyLnJlbmRlcmVyKGh0bWwsIHJhbmdlLCBsZWZ0LCB0b3AsIGNvbmZpZyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hcmtlci50eXBlID09IFwiZnVsbExpbmVcIikge1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhd0Z1bGxMaW5lTWFya2VyKGh0bWwsIHJhbmdlLCBtYXJrZXIuY2xhenosIGNvbmZpZyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1hcmtlci50eXBlID09IFwic2NyZWVuTGluZVwiKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5kcmF3U2NyZWVuTGluZU1hcmtlcihodG1sLCByYW5nZSwgbWFya2VyLmNsYXp6LCBjb25maWcpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChyYW5nZS5pc011bHRpTGluZ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c3M9J2FjZV9pbnZpc2libGUgYWNlX2ludmlzaWJsZV90YWInPlwiXG4gICAgICAgICAgICAgICAgICAgICsgbGFuZy5zdHJpbmdSZXBlYXQodGhpcy5UQUJfQ0hBUiwgaSlcbiAgICAgICAgICAgICAgICAgICAgKyBcIjwvc3Bhbj5cIik7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRhYlN0ci5wdXNoKGxhbmcuc3RyaW5nUmVwZWF0KFwiIFwiLCBpKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuZGlzcGxheUluZGVudEd1aWRlcykge1xuICAgICAgICAgICAgdGhpcy4kaW5kZW50R3VpZGVSZSA9ICAvXFxzXFxTfCBcXHR8XFx0IHxcXHMkLztcbiAgICAgICAgICAgIHZhciBjbGFzc05hbWUgPSBcImFjZV9pbmRlbnQtZ3VpZGVcIjtcbiAgICAgICAgICAgIHZhciBzcGFjZUNsYXNzID0gXCJcIjtcbiAgICAgICAgICAgIHZhciB0YWJDbGFzcyA9IFwiXCI7XG4gICAgICAgICAgICBpZiAodGhpcy5zaG93SW52aXNpYmxlcykge1xuICAgICAgICAgICAgICAgIGNsYXNzTmFtZSArPSBcIiBhY2VfaW52aXNpYmxlXCI7XG4gICAgICAgICAgICAgICAgc3BhY2VDbGFzcyA9IFwiIGFjZV9pbnZpc2libGVfc3BhY2VcIjtcbiAgICAgICAgICAgICAgICB0YWJDbGFzcyA9IFwiIGFjZV9pbnZpc2libGVfdGFiXCI7XG4gICAgICAgICAgICAgICAgdmFyIHNwYWNlQ29udGVudCA9IGxhbmcuc3RyaW5nUmVwZWF0KHRoaXMuU1BBQ0VfQ0hBUiwgdGhpcy50YWJTaXplKTtcbiAgICAgICAgICAgICAgICB2YXIgdGFiQ29udGVudCA9IGxhbmcuc3RyaW5nUmVwZWF0KHRoaXMuVEFCX0NIQVIsIHRoaXMudGFiU2l6ZSk7XG4gICAgICAgICAgICB9IGVs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ciBsaW5lRWxlbWVudHNJZHggPSAwO1xuXG4gICAgICAgIGZvciAodmFyIHJvdyA9IGNvbmZpZy5maXJzdFJvdzsgcm93IDwgZmlyc3Q7IHJvdysrKSB7XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0Rm9sZExpbmUocm93KTtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgIGlmIChmb2xkTGluZS5jb250YWluc1JvdyhmaXJzdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgZmlyc3QgPSBmb2xkTGluZS5zdGFydC5yb3c7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdyA9IGZvbGRMaW5lLmVuZC5yb3c7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGluZUVsZW1lbnRzSWR4ICsrO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHJvdyA9IGZpcnN0O1xuICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TmV4dEZvbGRMaW5lKHJvdyk7XG4gICAgICAgIHZhciBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6IEluZmluaXR5O1xuXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICBpZiAocm93ID4gZm9sZFN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgcm93ID0gZm9sZExpbmUuZW5kLnJvdysxO1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy5zZXNzaW9uLmdldE5leHRGb2xkTGluZShyb3csIGZvbGRMaW5lKTtcbiAgICAgICAgICAgICAgICBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6SW5maW5pdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocm93ID4gbGFzdClcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgdmFyIGxpbmVFbGVtZW50ID0gbGluZUVsZW1lbnRzW2xpbmVFbGVtZW50c0lkeCsrXTtcbiAgICAgICAgICAgIGlmIChsaW5lRWxlbWVudCkge1xuICAgICAgICAgICAgICAgIHZhciBodG1sID0gW107XG4gICAgICAgICAgICAgICAgdGhpcy4kcmVuZGVyTGluZShcbiAgICAgICAgICAgICAgICAgICAgaHRtbCwgcm93LCAhdGhpcy4kdXNlTGluZUdyb3VwcygpLCByb3cgPT0gZm9sZFN0YXJ0ID8gZm9sZExpbmUgOiBmYWxzZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgbGluZUVsZW1lbnQuc3R5bGUuaGVpZ2h0ID0gY29uZmlnLmxpbmVIZWlnaHQgKiB0aGlzLnNlc3Npb24uZ2V0Um93TGVuZ3RoKHJvdykgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgbGluZUVsZW1lbnQuaW5uZXJIVE1MID0gaHRtbC5qb2luKFwiXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcm93Kys7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy5zY3JvbGxMaW5lcyA9IGZ1bmN0aW9uKGNvbmZpZykge1xuICAgICAgICB2YXIgb2xkQ29uZmlnID0gdGhpcy5jb25maWc7XG4gICAgICAgIHRoaXMuY29uZmlnID0gY29uZmlnO1xuXG4gICAgICAgIGlmICghb2xkQ29uZmlnIHx8IG9sZENvbmZpZy5sYXN0Um93IDwgY29uZmlnLmZpcnN0Um93KVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYXRlKGNvbmZpZyk7XG5cbiAgICAgICAgaWYgKGNvbmZpZy5sYXN0Um93IDwgb2xkQ29uZmlnLmZpcnN0Um93KVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMudXBkYX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HtcbiAgICAgICAgICAgIHZhciBmcmFnbWVudCA9IHRoaXMuJHJlbmRlckxpbmVzRnJhZ21lbnQoY29uZmlnLCBvbGRDb25maWcubGFzdFJvdyArIDEsIGNvbmZpZy5sYXN0Um93KTtcbiAgICAgICAgICAgIGVsLmFwcGVuZENoaWxkKGZyYWdtZW50KTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLiRyZW5kZXJMaW5lc0ZyYWdtZW50ID0gZnVuY3Rpb24oY29uZmlnLCBmaXJzdFJvdywgbGFzdFJvdykge1xuICAgICAgICB2YXIgZnJhZ21lbnQgPSB0aGlzLmVsZW1lbnQub3duZXJEb2N1bWVudC5jcmVhdGVEb2N1bWVudEZyYWdtZW50KCk7XG4gICAgICAgIHZhciByb3cgPSBmaXJzdFJvdztcbiAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5zZXNzaW9uLmdldE5leHRGb2xkTGluZShyb3cpO1xuICAgICAgICB2YXIgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOiBJbmZpbml0eTtcblxuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgICAgaWYgKHJvdyA+IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgICAgIHJvdyA9IGZvbGRMaW5lLmVuZC5yb3crMTtcbiAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuc2Vzc2lvbi5nZXROZXh0Rm9sZExpbmUocm93LCBmb2xkTGluZSk7XG4gICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOiBJbmZpbml0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICB2YXIgY29udGFpbmVyID0gZG9tLmNyZWF0ZUVsZW1lbnQoXCJkaXZcIik7XG5cbiAgICAgICAgICAgIHZhciBodG1sID0gW107XG4gICAgICAgICAgICB0aGlzLiRyZW5kZXJMaW5lKGh0bWwsIHJvdywgZmFsc2UsIHJvdyA9PSBmb2xkU3RhcnQgPyBmb2xkTGluZSA6IGZhbHNlKTtcbiAgICAgICAgICAgIGNvbnRhaW5lci5pbm5lckhUTUwgPSBodG1sLmpvaW4oXCJcIik7XG4gICAgICAgICAgICBpZiAodGhpcy4kdXNlTGluZUdyb3VwcygpKSB7XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLmNsYXNzTmFtZSA9ICdhY2VfbGluZV9ncm91cCc7XG4gICAgICAgICAgICAgICAgZnJhZ21lbnQuYXBwZW5kQ2hpbGQoY29udGFpbmVyKTtcbiAgICAgICAgICAgICAgICBjb250YWluZXIuc3R5bGUuaGVpZ2h0ID0gY29uZmlnLmxpbmVIZWlnaHQgKiB0aGlzLnNlc3Npb24uZ2V0Um93TGVuZ3RoKHJvdykgKyBcInB4XCI7XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgd2hpbGUoY29udGFpbmVyLmZpcnN0Q2hpbGQpXG4gICAgICAgICAgICAgICAgICAgIGZyYWdtZW50LmFwcGVuZENoaWxkKGNvbnRhaW5lci5maXJzdENoaWxkKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcm93Kys7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZyYWdtZW50O1xuICAgIH07XG5cbiAgICB0aGlzLnVwZGF0ZSA9IGZ1bmN0aW9uKGNvbmZpZykge1xuICAgICAgICB0aGlzLmNvbmZpZyA9IGNvbmZpZztcblxuICAgICAgICB2YXIgaHRtbCA9IFtdO1xuICAgICAgICB2YXIgZmlyc3RSb3cgPSBjb25maWcuZmlyc3RSb3csIGxhc3RSb3cgPSBjb25maWcubGFzdFJvdztcblxuICAgICAgICB2YXIgcm93ID0gZmlyc3RSb3c7XG4gICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuc2Vzc2lvbi5nZXROZXh0Rm9sZExpbmUocm93KTtcbiAgICAgICAgdmFyIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG5cbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICAgIGlmIChyb3cgPiBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93KzE7XG4gICAgICAgICAgICAgICAgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TmV4dEZvbGRMaW5lKHJvdywgZm9sZExpbmUpO1xuICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDpJbmZpbml0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChyb3cgPiBsYXN0Um93KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBpZiAodGhpcy4kdXNlTGluZUdyb3VwcygpKVxuICAgICAgICAgICAgICAgIGh0bWwucHVzaChcIjxkaXYgY2xhc3M9J2FjZV9saW5lX2dyb3VwJyBzdHlsZT0naGVpZ2h0OlwiLCBjb25maWcubGluZUhlaWdodCp0aGlzLnNlc3Npb24uZ2V0Um93TGVuZ3RoKHJvdyksIFwicHgnPlwiKTtcblxuICAgICAgICAgICAgdGhpcy4kcmVuZGVyTGluZShodG1sLCByb3csIGZhbHNlLCByb3cgPT0gZm9sZFN0YXJ0ID8gZm9sZExpbmUgOiBmYWxzZSk7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLiR1c2VMaW5lR3JvdXBzKCkpXG4gICAgICAgICAgICAgICAgaHRtbC5wdXNoKFwiPC9kaXY+XCIpOyAvLyBlbmQgdGhlIGxpbmUgZ3JvdXBcblxuICAgICAgICAgICAgcm93Kys7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5lbGVtZW50LmlubmVySFRN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BzZWxmLiR0YWJTdHJpbmdzW3RhYlNpemVdO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChjID09IFwiXFx1MzAwMFwiKSB7XG4gICAgICAgICAgICAgICAgdmFyIGNsYXNzVG9Vc2UgPSBzZWxmLnNob3dJbnZpc2libGVzID8gXCJhY2VfY2prIGFjZV9pbnZpc2libGUgYWNlX2ludmlzaWJsZV9zcGFjZVwiIDogXCJhY2VfY2prXCI7XG4gICAgICAgICAgICAgICAgdmFyIHNwYWNlID0gc2VsZi5zaG93SW52aXNpYmxlcyA/IHNlbGYuU1BBQ0VfQ0hBUiA6IFwiXCI7XG4gICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uICs9IDE7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiPHNwYW4gY2xhc3M9J1wiICsgY2xhc3NUb1VzZSArIFwiJyBzdHlsZT0nd2lkdGg6XCIgK1xuICAgICAgICAgICAgICAgICAgICAoc2VsZi5jb25maWcuY2hhcmFjdGVyV2lkdGggKiAyKSArXG4gICAgICAgICAgICAgICAgICAgIFwicHgnPlwiICsgc3BhY2UgKyBcIjwvc3Bhbj5cIjtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYikge1xuICAgICAgICAgICAgICAgIHJldHVybiBcIjxzcGFuIGNsYXNzPSdhY2VfaW52aXNpYmxlIGFjZV9pbnZpc2libGVfc3BhY2UgYWNlX2ludmFsaWQnPlwiICsgc2VsZi5TUEFDRV9DSEFSICsgXCI8L3NwYW4+XCI7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiArPSAxO1xuICAgICAgICAgICAgICAgIHJldHVybiBcIjxzcGFuIGNsYXNzPSdhY2VfY2prJyBzdHlsZT0nd2lkdGg6XCIgK1xuICAgICAgICAgICAgICAgICAgICAoc2VsZi5jb25maWcuY2hhcmFjdGVyV2lkdGggKiAyKSArXG4gICAgICAgICAgICAgICAgICAgIFwicHgnPlwiICsgYyArI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2YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgdmFsdWUgPSB0aGlzLnJlbmRlckluZGVudEd1aWRlKHN0cmluZ0J1aWxkZXIsIHZhbHVlLCBzcGxpdENoYXJzKTtcbiAgICAgICAgICAgICAgICBpZiAoIXZhbHVlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjaGFycyAtPSB2YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjaGFycyArIHZhbHVlLmxlbmd0aCA8IHNwbGl0Q2hhcnMpIHtcbiAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gPSB0aGlzLiRyZW5kZXJUb2tlbihzdHJpbmdCdWlsZGVyLCBzY3JlZW5Db2x1bW4sIHRva2VuLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgY2hhcnMgKz0gdmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAoY2hhcnMgKyB2YWx1ZS5sZW5ndGggPj0gc3BsaXRDaGFycykge1xuICAgICAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gPSB0aGlzLiRyZW5kZXJUb2tlbihcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIsIHNjcmVlbkNvbHVtbixcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2VuLCB2YWx1ZS5zdWJzdHJpbmcoMCwgc3BsaXRDaGFycyAtIGNoYXJzKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnN1YnN0cmluZyhzcGxpdENoYXJzIC0gY2hhcnMpO1xuICAgICAgICAgICAgICAgICAgICBjaGFycyA9IHNwbGl0Q2hhcnM7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFvbmx5Q29udGVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIucHVzaChcIjwvZGl2PlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiPGRpdiBjbGFzcz0nYWNlX2xpbmUnIHN0eWxlPSdoZWlnaHQ6XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb25maWcubGluZUhlaWdodCwgXCJweCc+XCJcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBzdHJpbmdCdWlsZGVyLnB1c2gobGFuZy5zdHJpbmdSZXBlYXQoXCJcXHhhMFwiLCBzcGxpdHMuaW5kZW50KSk7XG5cbiAgICAgICAgICAgICAgICAgICAgc3BsaXQgKys7XG4gICAgICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHNwbGl0Q2hhcnMgPSBzcGxpdHNbc3BsaXRdIHx8IE51bWJlci5NQVhfVkFMVUU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBjaGFycyArPSB2YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiA9IHRoaXMuJHJlbmRlclRva2VuKFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nQnVpbGRlciwgc2NyZWVuQ29sdW1uLCB0b2tlbiwgdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy4kcmVuZGVyU2ltcGxlTGluZSA9IGZ1bmN0aW9uKHN0cmluZ0J1aWxkZXIsIHRva2Vucykge1xuICAgICAgICB2YXIgc2NyZWVuQ29sdW1uID0gMDtcbiAgICAgICAgdmFyIHRva2V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k7XG5cblxuICAgICAgICBpZiAoIW9ubHlDb250ZW50cykge1xuICAgICAgICAgICAgc3RyaW5nQnVpbGRlci5wdXNoKFxuICAgICAgICAgICAgICAgIFwiPGRpdiBjbGFzcz0nYWNlX2xpbmUnIHN0eWxlPSdoZWlnaHQ6XCIsIFxuICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbmZpZy5saW5lSGVpZ2h0ICogKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy4kdXNlTGluZUdyb3VwcygpID8gMSA6dGhpcy5zZXNzaW9uLmdldFJvd0xlbmd0aChyb3cpXG4gICAgICAgICAgICAgICAgICAgICksIFwicHgnPlwiXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRva2Vucy5sZW5ndGgpIHtcbiAgICAgICAgICAgIHZhciBzcGxpdHMgPSB0aGlzLnNlc3Npb24uZ2V0Um93U3BsaXREYXRhKHJvdyk7XG4gICAgICAgICAgICBpZiAoc3BsaXRzICYmIHNwbGl0cy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgdGhpcy4kcmVuZGVyV3JhcHBlZExpbmUoc3RyaW5nQnVpbGRlciwgdG9rZW5zLCBzcGxpdHMsIG9ubHlDb250ZW50cyk7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgdGhpcy4kcmVuZGVyU2ltcGxlTGluZShzdHJpbmdCdWlsZGVyLCB0b2tlbnMpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRoaXMuc2hvd0ludmlzaWJsZXMpIHtcbiAgICAgICAgICAgIGlmIChmb2xkTGluZSlcbiAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93O1xuXG4gICAgICAgICAgICBzdHJpbmdCdWlsZGVyLnB1c2goXG4gICAgICAgICAgICAgICAgXCI8c3BhbiBjbGFzcz0nYWNlX2ludmlzaWJsZSBhY2VfaW52aXNpYmxlX2VvbCc+XCIsXG4gICAgICAgICAgICAgICAgcm93ID09IHRoaXMuc2Vzc2lvbi5nZXRMZW5ndGgoKSAtIDEgPyB0aGlzLkVPRl9DSEFSIDogdGhpcy5FT0xfQ0hBUixcbiAgICAgICAgICAgICAgICBcIjwvc3Bhbj5cIlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIW9ubHlDb250ZW50cylcbiAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIucHVzaChcIjwvZGl2PlwiKTtcbiAgICB9O1xuXG4gICAgdGhpcy4kZ2V0Rm9sZExpbmVUb2tlbnMgPSBmdW5jdGlvbihyb3csIGZvbGRMaW5lKSB7XG4gICAgICAgIHZhciBzZXNzaW9uID0gdGhpcy5zZXNzaW9uO1xuICAgICAgICB2YXIgcmVuZGVyVG9rZW5zID0gW107XG5cbiAgICAgICAgZnVuY3Rpb24gYWRkVG9rZW5zKHRva2VucywgZnJvbSwgdG8pIHtcbiAgICAgICAgICAgIHZhciBpZHggPSAwLCBjb2wgPSAwO1xuICAgICAgICAgICAgd2hpbGUgKChjb2wgKyB0b2tlbnNbaWR4XS52YWx1ZS5sZW5ndGgpIDwgZnJvbSkge1xuICAgICAgICAgICAgICAgIGNvbCArPSB0b2tlbnNbaWR4XS52YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWR4Kys7XG5cbiAgICAgICAgICAgICAgICBpZiAoaWR4ID09IHRva2Vucy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjb2wgIT0gZnJvbSkge1xuICAgICAgICAgICAgICAgIHZhciB2YWx1ZSA9IHRva2Vuc1tpZHhdLnZhbHVlLnN1YnN0cmluZyhmcm9tIC0gY29sKTtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoID4gKHRvIC0gZnJvbSkpXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gdmFsdWUuc3Vic3RyaW5nKDAsIHRvIC0gZnJvbSk7XG5cbiAgICAgICAgICAgICAgICByZW5kZXJUb2tlbnMucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IHRva2Vuc1tpZHhdLnR5cGUsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZVxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgY29sID0gZnJvbSArIHZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZHggKz0gMTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgd2hpbGUgKGNvbCA8IHRvICYmIGlkeCA8IHRva2Vucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSB0b2tlbnNbaWR4XS52YWx1ZTtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoICsgY29sID4gdG8pIHtcbiAgICAgICAgICAgICAgICAgICAgcmVuZGVyVG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogdG9rZW5zW2lkeF0udHlwZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZS5zdWJzdHJpbmcoMCwgdG8gLSBjb2wpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgICAgICByZW5kZXJUb2tlbnMucHVzaCh0b2tlbnNbaWR4XSk7XG4gICAgICAgICAgICAgICAgY29sICs9IHZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZHggKz0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB0b2tlbnMgPSBzZXNzaW9uLmdldFRva2Vucyhyb3cpO1xuICAgICAgICBmb2xkTGluZS53YWxrKGZ1bmN0aW9uKHBsYWNlaG9sZGVyLCByb3csIGNvbHVtbiwgbGFzdENvbHVtbiwgaXNOZXdSb3cpIHtcbiAgICAgICAgICAgIGlmIChwbGFjZWhvbGRlciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgcmVuZGVyVG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcImZvbGRcIixcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHBsYWNlaG9sZGVyXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChpc05ld1JvdylcbiAgICAgICAgICAgICAgICAgICAgdG9rZW5zID0gc2Vzc2lvbi5nZXRUb2tlbnMocm93KTtcblxuICAgICAgICAgICAgICAgIGlmICh0b2tlbnMubGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICBhZGRUb2tlbnModG9rZW5zLCBsYXN0Q29sdW1uLCBjb2x1bW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LCBmb2xkTGluZS5lbmQucm93LCB0aGlzLnNlc3Npb24uZ2V0TGluZShmb2xkTGluZS5lbmQucm93KS5sZW5ndGgpO1xuXG4gICAgICAgIHJldHVybiByZW5kZXJUb2tlbnM7XG4gICAgfTtcblxuICAgIHRoaXMuJHVzZUxpbmVHcm91cHMgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuc2Vzc2lvbi5nZXRVc2VXcmFwTW9kZSgpO1xuICAgIH07XG5cbiAgICB0aGlzLmRlc3Ryb3kgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgY2xlYXJJbnRlcnZhbCh0aGlzLiRwb2xsU2l6ZUNoYW5nZXNUaW1lcik7XG4gICAgICAgIGlmICh0aGlzLiRtZWFzdXJlTm9kZSlcbiAgICAgICAgICAgIHRoaXMuJG1lYXN1cmVOb2RlLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQodGhpcy4kbWVhc3VyZU5vZGUpO1xuICAgICAgICBkZWxldGUgdGhpcy4kbWVhc3VyZU5vZGU7XG4gICAgfTtcblxufSkuY2FsbChUZXh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sZWN0aW9ucy5sZW5ndGggPT09IDApe1xuICAgICAgICAgICAgc2VsZWN0aW9ucyA9IFt7Y3Vyc29yOiBudWxsfV07XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBpID0gMCwgbiA9IHNlbGVjdGlvbnMubGVuZ3RoOyBpIDwgbjsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgcGl4ZWxQb3MgPSB0aGlzLmdldFBpeGVsUG9zaXRpb24oc2VsZWN0aW9uc1tpXS5jdXJzb3IsIHRydWUpO1xuICAgICAgICAgICAgaWYgKChwaXhlbFBvcy50b3AgPiBjb25maWcuaGVpZ2h0ICsgY29uZmlnLm9mZnNldCB8fFxuICAgICAgICAgICAgICAgICBwaXhlbFBvcy50b3AgPCAwKSAmJiBpID4gMSkge1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgc3R5bGUgPSAodGhpcy5jdXJzb3JzW2N1cnNvckluZGV4KytdIHx8IHRoaXMuYWRkQ3Vyc29yKCkpLnN0eWxlO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoIXRoaXMuZHJhd0N1cnNvcikge1xuICAgICAgICAgICAgICAgIHN0eWxlLmxlZnQgPSBwaXhlbFBvcy5sZWZ0ICsgXCJweFwiO1xuICAgICAgICAgICAgICAgIHN0eWxlLnRvcCA9IHBpeGVsUG9zLnRvcCArIFwicHhcIjtcbiAgICAgICAgICAgICAgICBzdHlsZS53aWR0aCA9IGNvbmZpZy5jaGFyYWN0ZXJXaWR0aCArIFwicHhcIjtcbiAgICAgICAgICAgICAgICBzdHlsZS5oZWlnaHQgPSBjb25maWcubGluZUhlaWdodCArIFwicHhcIjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5kcmF3Q3Vyc29yKHN0eWxlLCBwaXhlbFBvcywgY29uZmlnLCBzZWxlY3Rpb25zW2ldLCB0aGlzLnNlc3Npb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uICAgICAgICBpZiAoQ0hBUl9DT1VOVCA9PT0gNTApIHtcbiAgICAgICAgICAgIHZhciByZWN0ID0gbnVsbDtcbiAgICAgICAgICAgIHRyeSB7IFxuICAgICAgICAgICAgICAgcmVjdCA9IHRoaXMuJG1lYXN1cmVOb2RlLmdldEJvdW5kaW5nQ2xpZW50UmVjdCgpO1xuICAgICAgICAgICAgfSBjYXRjaChlKSB7XG4gICAgICAgICAgICAgICByZWN0ID0ge3dpZHRoOiAwLCBoZWlnaHQ6MCB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHNpemUgPSB7XG4gICAgICAgICAgICAgICAgaGVpZ2h0OiByZWN0LmhlaWdodCxcbiAgICAgICAgICAgICAgICB3aWR0aDogcmVjdC53aWR0aCAvIENIQVJfQ09VTlRcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgc2l6ZSA9IHtcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IHRoaXMuJG1lYXN1cmVOb2RlLmNsaWVudEhlaWdodCxcbiAgICAgICAgICAgICAgICB3aWR0aDogdGhpcy4kbWVhc3VyZU5vZGUuY2xpZW50V2lkdGggLyBDSEFSX0NPVU5UXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIGlmIChzaXplLndpZHRoID09PSAwIHx8IHNpemUuaGVpZ2h0ID09PSAwKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIHJldHVybiBzaXplO1xuICAgIH07XG5cbiAgICB0aGlzLiRtZWFzdXJlQ2hhcldpZHRoID0gZnVuY3Rpb24oY2gpIHtcbiAgICAgICAgdGhpcy4kbWFpbi5pbm5lckhUTUwgPSBsYW5nLnN0cmluZ1JlcGVhdChjaCwgQ0hBUl9DT1VOVCk7XG4gICAgICAgIHZhciByZWN0ID0gdGhpcy4kbWFpbi5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcbiAgICAgICAgcmV0dXJ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6ZS5zY3JvbGxlckhlaWdodFxuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiBjaGFuZ2VzO1xuICAgIH07XG5cbiAgICB0aGlzLiR1cGRhdGVMaW5lcyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAoIXRoaXMuJGNoYW5nZWRMaW5lcykgcmV0dXJuO1xuICAgICAgICB2YXIgZmlyc3RSb3cgPSB0aGlzLiRjaGFuZ2VkTGluZXMuZmlyc3RSb3c7XG4gICAgICAgIHZhciBsYXN0Um93ID0gdGhpcy4kY2hhbmdlZExpbmVzLmxhc3RSb3c7XG4gICAgICAgIHRoaXMuJGNoYW5nZWRMaW5lcyA9IG51bGw7XG5cbiAgICAgICAgdmFyIGxheWVyQ29uZmlnID0gdGhpcy5sYXllckNvbmZpZztcblxuICAgICAgICBpZiAoZmlyc3RSb3cgPiBsYXllckNvbmZpZy5sYXN0Um93ICsgMSkgeyByZXR1cm47IH1cbiAgICAgICAgaWYgKGxhc3RSb3cgPCBsYXllckNvbmZpZy5maXJzdFJvdykgeyByZXR1cm47IH1cbiAgICAgICAgaWYgKGxhc3RSb3cgPT09IEluZmluaXR5KSB7XG4gICAgICAgICAgICBpZiAodGhpcy4kc2hvd0d1dHRlcilcbiAgICAgICAgICAgICAgICB0aGlzLiRndXR0ZXJMYXllci51cGRhdGUobGF5ZXJDb25maWcpO1xuICAgICAgICAgICAgdGhpcy4kdGV4dExheWVyLnVwZGF0ZShsYXllckNvbmZpZyk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy4kdGV4dExheWVyLnVwZGF0ZUxpbmVzKGxheWVyQ29uZmlnLCBmaXJzdFJvdywgbGFzdFJvdyk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH07XG5cbiAgICB0aGlzLiRnZXRMb25nZXN0TGluZSA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgY2hhckNvdW50ID0gdGhpcy5zZXNzaW9uLmdld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gICAgdmFyIF9zZWxmID0gdGhpcztcbiAgICAgICAgdGhpcy4kdGhlbWVJZCA9IHRoZW1lO1xuICAgICAgICBfc2VsZi5fZGlzcGF0Y2hFdmVudCgndGhlbWVDaGFuZ2UnLHt0aGVtZTp0aGVtZX0pO1xuXG4gICAgICAgIGlmICghdGhlbWUgfHwgdHlwZW9mIHRoZW1lID09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgIHZhciBtb2R1bGVOYW1lID0gdGhlbWUgfHwgdGhpcy4kb3B0aW9ucy50aGVtZS5pbml0aWFsVmFsdWU7XG4gICAgICAgICAgICBjb25maWcubG9hZE1vZHVsZShbXCJ0aGVtZVwiLCBtb2R1bGVOYW1lXSwgYWZ0ZXJMb2FkKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGFmdGVyTG9hZCh0aGVtZSk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBhZnRlckxvYWQobW9kdWxlKSB7XG4gICAgICAgICAgICBpZiAoX3NlbGYuJHRoZW1lSWQgIT0gdGhlbWUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNiICYmIGNiKCk7XG4gICAgICAgICAgICBpZiAoIW1vZHVsZSB8fCAhbW9kdWxlLmNzc0NsYXNzKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcImNvdWxkbid0IGxvYWQgbW9kdWxlIFwiICsgdGhlbWUgKyBcIiBvciBpdCBkaWRuJ3QgY2FsbCBkZWZpbmVcIik7XG4gICAgICAgICAgICBkb20uaW1wb3J0Q3NzU3RyaW5nKFxuICAgICAgICAgICAgICAgIG1vZHVsZS5jc3NUZXh0LFxuICAgICAgICAgICAgICAgIG1vZHVsZS5jc3NDbGFzcyxcbiAgICAgICAgICAgICAgICBfc2VsZi5jb250YWluZXIub3duZXJEb2N1bWVudFxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgaWYgKF9zZWxmLnRoZW1lKVxuICAgICAgICAgICAgICAg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pc2libGUgfHwgIXRoaXMuJGhvcml6U2Nyb2xsKVxuICAgICAgICAgICAgICAgIHRoaXMuJGxvb3Auc2NoZWR1bGUodGhpcy5DSEFOR0VfU0NST0xMKTtcbiAgICAgICAgfSxcbiAgICAgICAgaW5pdGlhbFZhbHVlOiBmYWxzZVxuICAgIH0sXG4gICAgdlNjcm9sbEJhckFsd2F5c1Zpc2libGU6IHtcbiAgICAgICAgc2V0OiBmdW5jdGlvbih2YWwpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy4kdlNjcm9sbEJhckFsd2F5c1Zpc2libGUgfHwgIXRoaXMuJHZTY3JvbGwpXG4gICAgICAgICAgICAgICAgdGhpcy4kbG9vcC5zY2hlZHVsZSh0aGlzLkNIQU5HRV9TQ1JPTEwpO1xuICAgICAgICB9LFxuICAgICAgICBpbml0aWFsVmFsdWU6IGZhbHNlXG4gICAgfSxcbiAgICBmb250U2l6ZTogIHtcbiAgICAgICAgc2V0OiBmdW5jdGlvbihzaXplKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIHNpemUgPT0gXCJudW1iZXJcIilcbiAgICAgICAgICAgICAgICBzaXplID0gc2l6ZSArIFwicHhcIjtcbiAgICAgICAgICAgIHRoaXMuY29udGFpbmVyLnN0eWxlLmZvbnRTaXplID0gc2l6ZTtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlRm9udFNpemUoKTtcbiAgICAgICAgfSxcbiAgICAgICAgaW5pdGlhbFZhbHVlOiAxMlxuICAgIH0sXG4gICAgZm9udEZhbWlseToge1xuICAgICAgICBzZXQ6IGZ1bmN0aW9uKG5hbWUpIHtcbiAgICAgICAgICAgIHRoaXMuY29udGFpbmVyLnN0eWxlLmZvbnRGYW1pbHkgPSBuYW1lO1xuICAgICAgICAgICAgdGhpcy51cGRhdGVGb250U2l6ZSgpO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtYXhMaW5lczoge1xuICAgICAgICBzZXQ6IGZ1bmN0aW9uKHZhbCkge1xuICAgIC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AgICAgICAgY2xhc3NuYW1lIDogY2xhc3NuYW1lXG4gICAgfSk7XG5cbiAgICB0aGlzLmNhbGxiYWNrSWQgPSAxO1xuICAgIHRoaXMuY2FsbGJhY2tzID0ge307XG5cbiAgICB0aGlzLiR3b3JrZXIub25tZXNzYWdlID0gdGhpcy5vbk1lc3NhZ2U7XG59O1xuXG4oZnVuY3Rpb24oKXtcblxuICAgIG9vcC5pbXBsZW1lbnQodGhpcywgRXZlbnRFbWl0dGVyKTtcblxuICAgIHRoaXMub25NZXNzYWdlID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB2YXIgbXNnID0gZS5kYXRhO1xuICAgICAgICBzd2l0Y2ggKG1zZy50eXBlKSB7XG4gICAgICAgICAgICBjYXNlIFwiZXZlbnRcIjpcbiAgICAgICAgICAgICAgICB0aGlzLl9zaWduYWwobXNnLm5hbWUsIHtkYXRhOiBtc2cuZGF0YX0pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImNhbGxcIjpcbiAgICAgICAgICAgICAgICB2YXIgY2FsbGJhY2sgPSB0aGlzLmNhbGxiYWNrc1ttc2cuaWRdO1xuICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhtc2cuZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzLmNhbGxiYWNrc1ttc2cuaWRdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJlcnJvclwiOlxuICAgICAgICAgICAgICAgIHRoaXMucmVwb3J0RXJyb3IobXNnLmRhdGEpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxvZ1wiOlxuICAgICAgICAgICAgICAgIHdpbmRvdy5jb25zb2xlICYmIGNvbnNvbGUubG9nICYmIGNvbnNvbGUubG9nLmFwcGx5KGNvb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JGZyb21VbmRvKSB7XG4gICAgICAgICAgICBpZiAoZGVsdGEuYWN0aW9uID09PSAnaW5zZXJ0Jykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSB0aGlzLm90aGVycy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb3RoZXJQb3MgPSB0aGlzLm90aGVyc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5ld1BvcyA9IHtyb3c6IG90aGVyUG9zLnJvdywgY29sdW1uOiBvdGhlclBvcy5jb2x1bW4gKyBkaXN0YW5jZUZyb21TdGFydH07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9jLmluc2VydE1lcmdlZExpbmVzKG5ld1BvcywgZGVsdGEubGluZXMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZGVsdGEuYWN0aW9uID09PSAncmVtb3ZlJykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSB0aGlzLm90aGVycy5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb3RoZXJQb3MgPSB0aGlzLm90aGVyc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5ld1BvcyA9IHtyb3c6IG90aGVyUG9zLnJvdywgY29sdW1uOiBvdGhlclBvcy5jb2x1bW4gKyBkaXN0YW5jZUZyb21TdGFydH07XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZG9jLnJlbW92ZShuZXcgUmFuZ2UobmV3UG9zLnJvdywgbmV3UG9zLmNvbHVtbiwgbmV3UG9zLnJvdywgbmV3UG9zLmNvbHVtbiAtIGxlbmd0aERpZmYpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHRoaXMuJHVwZGF0aW5nID0gZmFsc2U7XG4gICAgICAgIHRoaXMudXBkYX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DtcbiAgICAgICAgICAgIHJhbmdlID0gc2VsZWN0aW9uLnJhbmdlc1swXSB8fCByYW5nZTtcbiAgICAgICAgICAgIGVkaXRvci5yZW1vdmVTZWxlY3Rpb25NYXJrZXIocmFuZ2UpO1xuICAgICAgICB9XG4gICAgICAgIGVkaXRvci5vbmNlKFwibW91c2V1cFwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHZhciB0bXBTZWwgPSBzZWxlY3Rpb24udG9PcmllbnRlZFJhbmdlKCk7XG5cbiAgICAgICAgICAgIGlmIChvbGRSYW5nZSAmJiB0bXBTZWwuaXNFbXB0eSgpICYmIGlzU2FtZVBvaW50KG9sZFJhbmdlLmN1cnNvciwgdG1wU2VsLmN1cnNvcikpXG4gICAgICAgICAgICAgICAgc2VsZWN0aW9uLnN1YnN0cmFjdFBvaW50KHRtcFNlbC5jdXJzb3IpO1xuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKHNoaWZ0KSB7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5zdWJzdHJhY3RQb2ludChyYW5nZS5jdXJzb3IpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgZWRpdG9yLnJlbW92ZVNlbGVjdGlvbk1hcmtlcihyYW5nZSk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGRSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGRSYW5nZSh0bXBTZWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWRpdG9yLiRibG9ja1Njcm9sbGluZy0tO1xuICAgICAgICAgICAgZWRpdG9yLmluVmlydHVhbFNlbGVjdGlvbk1vZGUgPSBmYWxzZTtcbiAgICAgICAgfSk7XG5cbiAgICB9IGVsc2UgaWYgKHNlbGVjdGlvbk1vZGUgPT0gXCJib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pb24ocm93LCBzdGFydENvbHVtbiwgc3RhcnRPZmZzZXRYKSxcbiAgICAgICAgICAgICAgICB0aGlzLnNlc3Npb24uc2NyZWVuVG9Eb2N1bWVudFBvc2l0aW9uKHJvdywgZW5kQ29sdW1uLCBlbmRPZmZzZXRYKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChyYW5nZS5pc0VtcHR5KCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZG9jRW5kICYmIGlzU2FtZVBvaW50KHJhbmdlLmVuZCwgZG9jRW5kKSlcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgdmFyIGRvY0VuZCA9IHJhbmdlLmVuZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJhbmdlLmN1cnNvciA9IHhCYWNrd2FyZHMgPyByYW5nZS5zdGFydCA6IHJhbmdlLmVuZDtcbiAgICAgICAgICAgIHJlY3RTZWwucHVzaChyYW5nZSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoeUJhY2t3YXJkcylcbiAgICAgICAgICAgIHJlY3RTZWwucmV2ZXJzZSgpO1xuXG4gICAgICAgIGlmICghaW5jbHVkZUVtcHR5TGluZXMpIHtcbiAgICAgICAgICAgIHZhciBlbmQgPSByZWN0U2VsLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICB3aGlsZSAocmVjdFNlbFtlbmRdLmlzRW1wdHkoKSAmJiBlbmQgPiAwKVxuICAgICAgICAgICAgICAgIGVuZC0tO1xuICAgICAgICAgICAgaWYgKGVuZCA+IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnQgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlIChyZWN0U2VsW3N0YXJ0XS5pc0VtcHR5KCkpXG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0Kys7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gZW5kOyBpID49IHN0YXJ0OyBpLS0pIHt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ICAgcm93ID0gci5jdXJzb3Iucm93O1xuICAgICAgICB9KTtcbiAgICAgICAgXG4gICAgICAgIGlmICghcmFuZ2VzLmxlbmd0aCB8fCBzYW1lUm93UmFuZ2VzLmxlbmd0aCA9PSByYW5nZXMubGVuZ3RoIC0gMSkge1xuICAgICAgICAgICAgdmFyIHJhbmdlID0gdGhpcy5zZWxlY3Rpb24uZ2V0UmFuZ2UoKTtcbiAgICAgICAgICAgIHZhciBmciA9IHJhbmdlLnN0YXJ0LnJvdywgbHIgPSByYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgdmFyIGd1ZXNzUmFuZ2UgPSBmciA9PSBscjtcbiAgICAgICAgICAgIGlmIChndWVzc1JhbmdlKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1heCA9IHRoaXMuc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgICAgICAgICB2YXIgbGluZTtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TGluZShscik7XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoL1s9Ol0vLnRlc3QobGluZSkgJiYgKytsciA8IG1heCk7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBsaW5lID0gdGhpcy5zZXNzaW9uLmdldExpbmUoZnIpO1xuICAgICAgICAgICAgICAgIH0gd2hpbGUgKC9bPTpdLy50ZXN0KGxpbmUpICYmIC0tZnIgPiAwKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAoZnIgPCAwKSBmciA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKGxyID49IG1heCkgbHIgPSBtYXggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGxpbmVzID0gdGhpcy5zZXNzaW9uLnJlbW92ZUZ1bGxMaW5lcyhmciwgbHIpO1xuICAgICAgICAgICAgbGluZXMgPSB0aGlzLiRyZUFsaWduVGV4dChsaW5lcywgZ3Vlc3NSYW5nZSk7XG4gICAgICAgICAgICB0aGlzLnNlc3Npb24uaW5zZXJ0KHtyb3c6IGZyLCBjb2x1bW46IDB9LCBsaW5lcy5qb2luKFwiXFxuXCIpICsgXCJcXG5cIik7XG4gICAgICAgICAgICBpZiAoIWd1ZXNzUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4gPSAwO1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4gPSBsaW5lc1tsaW5lcy5sZW5ndGggLSAxXS5sZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5zZXRSYW5nZShyYW5nZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzYW1lUm93UmFuZ2VzLmZvckVhY2goZnVuY3Rpb24ocikge1xuICAgICAgICAgICAgICAgIHNlbC5zdWJzdHJhY3RQb2ludChyLmN1cnNvcik7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgdmFyIG1heENvbCA9IDA7XG4gICAgICAgICAgICB2YXIgbWluU3BhY2UgPSBJbmZpbml0eTtcbiAgICAgICAgICAgIHZhciBzcGFjZU9mZnNldHMgPSByYW5nZXMubWFwKGZ1bmN0aW9uKHIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcCA9IHIuY3Vyc29yO1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHAucm93KTtcbiAgICAgICAgICAgICAgICB2YXIgc3BhY2VPZmZzZXQgPSBsaW5lLnN1YnN0cihwLmNvbHVtbikuc2VhcmNoKC9cXFMvZyk7XG4gICAgICAgICAgICAgICAgaWYgKHNwYWNlT2Zmc2V0ID09IC0xKVxuICAgICAgICAgICAgICAgICAgICBzcGFjZU9mZnNldCA9IDA7XG5cbiAgICAgICAgICAgICAgICBpZiAocC5jb2x1bW4gPiBtYXhDb2wpXG4gICAgICAgICAgICAgICAgICAgIG1heENvbCA9IHAuY29sdW1uO1xuICAgICAgICAgICAgICAgIGlmIChzcGFjZU9mZnNldCA8IG1pblNwYWNlKVxuICAgICAgICAgICAgICAgICAgICBtaW5TcGFjZSA9IHNwYWNlT2Zmc2V0O1xuICAgICAgICAgICAgICAgIHJldHVybiBzcGFjZU9mZnNldDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmFuZ2VzLmZvckVhY2goZnVuY3Rpb24ociwgaSkge1xuICAgICAgICAgICAgICAgIHZhciBwID0gci5jdXJzb3I7XG4gICAgICAgICAgICAgICAgdmFyIGwgPSBtYXhDb2wgLSBwLmNvbHVtbjtcbiAgICAgICAgICAgICAgICB2YXIgZCA9IHNwYWNlT2Zmc2V0c1tpXSAtIG1pblNwYWNlO1xuICAgICAgICAgICAgICAgIGlmIChsID4gZClcbiAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbi5pbnNlcnQocCwgbGFuZy5zdHJpbmdSZXBlYXQoXCIgXCIsIGwgLSBkKSk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBzZXNzaW9uLnJlbW92ZShuZXcgUmFuZ2UocC5yb3csIHAuY29sdW1uLCBwLnJvdywgcC5jb2x1bW4gLSBsICsgZCkpO1xuXG4gICAgICAgICAgICAgICAgci5zdGFydC5jb2x1bW4gPSByLmVuZC5jb2x1bW4gPSBtYXhDb2w7XG4gICAgICAgICAgICAgICAgci5zdGFydC5yb3cgPSByLmVuZC5yb3cgPSBwLnJvdztcbiAgICAgICAgICAgICAgICByLmN1cnNvciA9IHIuZW5kO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzZWwuZnJvbU9yaWVudGVkUmFuZ2UocmFuZ2VzWzBdKTtcbiAgICAgICAgICAgIHRoaXMucmVuZGVyZXIudXBkYXRlQ3Vyc29yKCk7XG4gICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnVwZGF0ZUJhY2tNYXJrZXJzKCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy4kcmVBbGlnblRleHQgPSBmdW5jdGlvbihsaW5lcywgZm9yY2VMZWZ0KSB7XG4gICAgICAgIHZhciBpc0xlZnRBbGlnbmVkID0gdHJ1ZSwgaXNSaWdodEFsaWduZWQgPSB0cnVlO1xuICAgICAgICB2YXIgc3RhcnRXLCB0ZXh0VywgZW5kVztcblxuICAgICAgICByZXR1cm4gbGluZXMubWFwKGZ1bmN0aW9uKGxpbmUpIHtcbiAgICAgICAgICAgIHZhciBtID0gbGluZS5tYXRjaCgvKFxccyopKC4qPykoXFxzKikoWz06XS4qKS8pO1xuICAgICAgICAgICAgaWYgKCFtKVxuICAgICAgICAgICAgICAgIHJldHVybiBbbGluZV07XG5cbiAgICAgICAgICAgIGlmIChzdGFydFcgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHN0YXJ0VyA9IG1bMV0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHRleHRXID0gbVsyXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgZW5kVyA9IG1bM10ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHJldHVybiBtO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc3RhcnRXICsgdGV4dFcgKyBlbmRXICE9IG1bMV0ubGVuZ3RoICsgbVsyXS5sZW5ndGggKyBtWzNdLmxlbmd0aClcbiAgICAgICAgICAgICAgICBpc1JpZ2h0QWxpZ25lZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKHN0YXJ0VyAhPSBtWzFdLmxlbmd0aClcbiAgICAgICAgICAgICAgICBpc0xlZnRBbGlnbmVkID0gZmFsc2U7XG5cbiAgICAgICAgICAgIGlmIChzdGFydFcgPiBtWzFdLmxlbmd0aClcbiAgICAgICAgICAgICAgICBzdGFydFcgPSBtWzFdLmxlbmd0aDtcbiAgICAgICAgICAgIGlmICh0ZXh0VyA8IG1bMl0ubGVuZ3R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B7XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG5cbiAgICB0aGlzLmluZGVudGF0aW9uQmxvY2sgPSBmdW5jdGlvbihzZXNzaW9uLCByb3csIGNvbHVtbikge1xuICAgICAgICB2YXIgcmUgPSAvXFxTLztcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgdmFyIHN0YXJ0TGV2ZWwgPSBsaW5lLnNlYXJjaChyZSk7XG4gICAgICAgIGlmIChzdGFydExldmVsID09IC0xKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGNvbHVtbiB8fCBsaW5lLmxlbmd0aDtcbiAgICAgICAgdmFyIG1heFJvdyA9IHNlc3Npb24uZ2V0TGVuZ3RoKCk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIGVuZFJvdyA9IHJvdztcblxuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIHZhciBsZXZlbCA9IHNlc3Npb24uZ2V0TGluZShyb3cpLnNlYXJjaChyZSk7XG5cbiAgICAgICAgICAgIGlmIChsZXZlbCA9PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgaWYgKGxldmVsIDw9IHN0YXJ0TGV2ZWwpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChlbmRSb3cgPiBzdGFydFJvdykge1xuICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IHNlc3Npb24uZ2V0TGluZShlbmRSb3cpLmxlbmd0aDtcbiAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sdW1uLCBlbmRSb3csIGVuZENvbHVtbik7XG4gICAgICAgIH1cbiAgICB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ICAgICAgIGlmICh3ICYmIHcucm93Q291bnQgJiYgIXcuaGlkZGVuKVxuICAgICAgICAgICAgICAgIHNjcmVlblJvd3MgKz0gdy5yb3dDb3VudDtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBzY3JlZW5Sb3dzO1xuICAgIH07ICAgIFxuICAgIFxuICAgIHRoaXMuJG9uQ2hhbmdlRWRpdG9yID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB0aGlzLmF0dGFjaChlLmVkaXRvcik7XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmF0dGFjaCA9IGZ1bmN0aW9uKGVkaXRvcikge1xuICAgICAgICBpZiAoZWRpdG9yICAmJiBlZGl0b3Iud2lkZ2V0TWFuYWdlciAmJiBlZGl0b3Iud2lkZ2V0TWFuYWdlciAhPSB0aGlzKVxuICAgICAgICAgICAgZWRpdG9yLndpZGdldE1hbmFnZXIuZGV0YWNoKCk7XG5cbiAgICAgICAgaWYgKHRoaXMuZWRpdG9yID09IGVkaXRvcilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB0aGlzLmRldGFjaCgpO1xuICAgICAgICB0aGlzLmVkaXRvciA9IGVkaXRvcjtcbiAgICAgICAgXG4gICAgICAgIGlmIChlZGl0b3IpIHtcbiAgICAgICAgICAgIGVkaXRvci53aWRnZXRNYW5hZ2VyID0gdGhpcztcbiAgICAgICAgICAgIGVkaXRvci5yZW5kZXJlci5vbihcImJlZm9yZVJlbmRlclwiLCB0aGlzLm1lYXN1cmVXaWRnZXRzKTtcbiAgICAgICAgICAgIGVkaXRvci5yZW5kZXJlci5vbihcImFmdGVyUmVuZGVyXCIsIHRoaXMucmVuZGVyV2lkZ2V0cyk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuZGV0YWNoID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB2YXIgZWRpdG9yID0gdGhpcy5lZGl0b3I7XG4gICAgICAgIGlmICghZWRpdG9yKVxuICAgICAgICAgICAgc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gICAgICAgfSBlbHNlIGlmIChkZWx0YS5hY3Rpb24gPT0gJ3JlbW92ZScpIHtcbiAgICAgICAgICAgIHZhciByZW1vdmVkID0gbGluZVdpZGdldHMuc3BsaWNlKHN0YXJ0Um93ICsgMSwgbGVuKTtcbiAgICAgICAgICAgIHJlbW92ZWQuZm9yRWFjaChmdW5jdGlvbih3KSB7XG4gICAgICAgICAgICAgICAgdyAmJiB0aGlzLnJlbW92ZUxpbmVXaWRnZXQodyk7XG4gICAgICAgICAgICB9LCB0aGlzKTtcbiAgICAgICAgICAgIHRoaXMuJHVwZGF0ZVJvd3MoKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBhcmdzID0gbmV3IEFycmF5KGxlbik7XG4gICAgICAgICAgICBhcmdzLnVuc2hpZnQoc3RhcnRSb3csIDApO1xuICAgICAgICAgICAgbGluZVdpZGdldHMuc3BsaWNlLmFwcGx5KGxpbmVXaWRnZXRzLCBhcmdzKTtcbiAgICAgICAgICAgIHRoaXMuJHVwZGF0ZVJvd3MoKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy4kdXBkYXRlUm93cyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgbGluZVdpZGdldHMgPSB0aGlzLnNlc3Npb24ubGluZVdpZGdldHM7XG4gICAgICAgIGlmICghbGluZVdpZGdldHMpIHJldHVybjtcbiAgICAgICAgdmFyIG5vV2lkZ2V0cyA9IHRydWU7XG4gICAgICAgIGxpbmVXaWRnZXRzLmZvckVhY2goZnVuY3Rpb24odywgaSkge1xuICAgICAgICAgICAgaWYgKHcpIHtcbiAgICAgICAgICAgICAgICBub1dpZGdldHMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB3LnJvdyA9IGk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHcuJG9sZFdpZGdldCkge1xuICAgICAgICAgICAgICAgICAgICB3LiRvbGRXaWRnZXQucm93ID0gaTtcbiAgICAgICAgICAgIC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V2lkZ2V0O1xuICAgICAgICAgICAgICAgIGlmICh3LiRvbGRXaWRnZXQpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMub25XaWRnZXRDaGFuZ2VkKHcuJG9sZFdpZGdldCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHdoaWxlICh3MSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodzEuJG9sZFdpZGdldCA9PSB3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3MS4kb2xkV2lkZ2V0ID0gdy4kb2xkV2lkZ2V0O1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdzEgPSB3MS4kb2xkV2lkZ2V0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0aGlzLnNlc3Npb24uX2VtaXQoXCJjaGFuZ2VGb2xkXCIsIHtkYXRhOntzdGFydDp7cm93OiB3LnJvd319fSk7XG4gICAgICAgIHRoaXMuJHVwZGF0ZVJvd3MoKTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMuZ2V0V2lkZ2V0c0F0Um93ID0gZnVuY3Rpb24ocm93KSB7XG4gICAgICAgIHZhciBsaW5lV2lkZ2V0cyA9IHRoaXMuc2Vzc2lvbi5saW5lV2lkZ2V0cztcbiAgICAgICAgdmFyIHcgPSBsaW5lV2lkZ2V0cyAmJiBsaW5lV2lkZ2V0c1tyb3ddO1xuICAgICAgICB2YXIgbGlzdCA9IFtdO1xuICAgICAgICB3aGlsZSAodykge1xuICAgICAgICAgICAgbGlzdC5wdXNoKHcpO1xuICAgICAgICAgICAgdyA9IHcuJG9sZFdpZGdldDtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbGlzdDtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMub25XaWRnZXRDaGFuZ2VkID0gZnVuY3Rpb24odykge1xuICAgICAgICB0aGlzLnNlc3Npb24uX2NoYW5nZWRXaWRnZXRzLnB1c2godyk7XG4gICAgICAgIHRoaXMuZWRpdG9yICYmIHRoaXMuZWRpdG9yLnJlbmRlcmVyLnVwZGF0ZUZ1bGwoKTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMubWVhc3VyZVdpZGdldHMgPSBmdW5jdGlvbihlLCByZW5kZXJlcikge1xuICAgICAgICB2YXIgY2hhbmdlZFdpZGdldHMgPSB0aGlzLnNlc3Npb24uX2NoYW5nZWRXaWRnZXRzO1xuICAgICAgICB2YXIgY29uZmlnID0gcmVuZGVyZXIubGF5ZXJDb25maWc7XG4gICAgICAgIFxuICAgICAgICBpZiAoIWNoYW5nZWRXaWRnZXRzIHx8ICFjaGFuZ2VkV2lkZ2V0cy5sZW5ndGgpIHJldHVybjtcbiAgICAgICAgdmFyIG1pbiA9IEluZmluaXR5O1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYW5nZWRXaWRnZXRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgdyA9IGNoYW5nZWRXaWRnZXRzW2ldO1xuICAgICAgICAgICAgaWYgKCF3IHx8ICF3LmVsKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICh3LnNlc3Npb24gIT0gdGhpcy5zZXNzaW9uKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICghdy5faW5Eb2N1bWVudCkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlc3Npb24ubGluZVdpZGdldHNbdy5yb3ddICE9IHcpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIHcuX2luRG9jdW1lbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHJlbmRlcmVyLmNvbnRhaW5lci5hcHBlbmRDaGlsZCh3LmVsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdy5oID0gdy5lbC5vZmZzZXRIZWlnaHQ7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICghdy5maXhlZFdpZHRoKSB7XG4gICAgICAgICAgICAgICAgdy53ID0gdy5lbC5vZmZzZXRXaWR0aDtcbiAgICAgICAgICAgICAgICB3LnNjcmVlbldpZHRoID0gTWF0aC5jZWlsKHcudyAvIGNvbmZpZy5jaGFyYWN0ZXJXaWR0aCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByb3dDb3VudCA9IHcuaCAvIGNvbmZpZy5saW5lSGVpZ2h0O1xuICAgICAgICAgICAgaWYgKHcuY292ZXJMaW5lKSB7XG4gICAgICAgICAgICAgICAgcm93Q291bnQgLT0gdGhpcy5zZXNzaW9uLmdldFJvd0xpbmVDb3VudCh3LnJvdyk7XG4gICAgICAgICAgICAgICAgaWYgKHJvd0NvdW50IDwgMClcbiAgICAgICAgICAgICAgICAgICAgcm93Q291bnQgPSAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHcucm93Q291bnQgIT0gcm93Q291bnQpIHtcbiAgICAgICAgICAgICAgICB3LnJvd0NvdW50ID0gcm93Q291bnQ7XG4gICAgICAgICAgICAgICAgaWYgKHcucm93IDwgbWluKVxuICAgICAgICAgICAgICAgICAgICBtaW4gPSB3LnJvdztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAobWluICE9IEluZmluaXR5KSB7XG4gICAgICAgICAgICB0aGlzLnNlc3Npb24uX2VtaXQoXCJjaGFuZ2VGb2xkXCIsIHtkYXRhOntzdGFydDp7cm93OiBtaW59fX0pO1xuICAgICAgICAgICAgdGhpcy5zZXNzaW9uLmxpbmVXaWRnZXRXaWR0aCA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5zZXNzaW9uLl9jaGFuZ2VkV2lkZ2V0cyA9IFtdO1xuICAgIH07XG4gICAgXG4gICAgdGhpcy5yZW5kZXJXaWRnZXRzID0gZnVuY3Rpb24oZSwgcmVuZGVyZXIpIHtcbiAgICAgICAgdmFyIGNvbmZpZyA9IHJlbmRlcmVyLmxheWVyQ29uZmlnO1xuICAgICAgICB2YXIgbGluZVdpZGdldHMgPSB0aGlzLnNlc3Npb24ubGluZVdpZGdldHM7XG4gICAgICAgIGlmICghbGluZVdpZGdldHMpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBmaXJzdCA9IE1hdGgubWluKHRoaXMuZmlyc3RSb3csIGNvbmZpZy5maXJzdFJvdyk7XG4gICAgICAgIHZhciBsYXN0ID0gTWF0aC5tYXgodGhpcy5sYXN0Um93LCBjb25maWcubGFzdFJvdywgbGluZVdpZGdldHMubGVuZ3RoKTtcbiAgICAgICAgXG4gICAgICAgIHdoaWxlIChmaXJzdCA+IDAgJiYgIWxpbmVXaWRnZXRzW2ZpcnN0XSlcbiAgICAgICAgICAgIGZpcnN0LS07XG4gICAgICAgIFxuICAgICAgICB0aGlzLmZpcnN0Um93ID0gY29uZmlnLmZpcnN0Um93O1xuICAgICAgICB0aGlzLmxhc3RSb3cgPSBjb25maWcubGFzdFJvdztcblxuICAgICAgICByZW5kZXJlci4kY3Vyc29yTGF5ZXIuY29uZmlnID0gY29uZmlnO1xuICAgICAgICBmb3IgKHZhciBpID0gZmlyc3Q7IGkgPD0gbGFzdDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgdyA9IGxpbmVXaWRnZXRzW2ldO1xuICAgICAgICAgICAgaWYgKCF3IHx8ICF3LmVsKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICh3LmhpZGRlbikge1xuICAgICAgICAgICAgICAgIHcuZWwuc3R5bGUudG9wID0gLTEwMCAtICh3LnBpeGVsSGVpZ2h0IHx8IDApICsgXCJweFwiO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCF3Ll9pbkRvY3VtZW50KSB7XG4gICAgICAgICAgICAgICAgdy5faW5Eb2N1bWVudCA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmVuZGVyZXIuY29udGFpbmVyLmFwcGVuZENoaWxkKHcuZWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHRvcCA9IHJlbmRlcmVyLiRjdXJzb3JMYXllci5nZXRQaXhlbFBvc2l0aW9uKHtyb3c6IGksIGNvbHVtbjowfSwgdHJ1ZSkudG9wO1xuICAgICAgICAgICAgaWYgKCF3LmNvdmVyTGluZSlcbiAgICAgICAgICAgICAgICB0b3AgKz0gY29uZmlnLmxpbmVIZWlnaHQgKiB0aGlzLnNlc3Npb24uZ2V0Um93TGluZUNvdW50KHcucm93KTtcbiAgICAgICAgICAgIHcuZWwuc3R5bGUudG9wID0gdG9wIC0gY29uZmlnLm9mZnNldCArIFwicHhcIjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIGxlZnQgPSB3LmNvdmVyR3V0dGVyID8gMCA6IHJlbmRlcmVyLmd1dHRlcldpZHRoO1xuICAgICAgICAgICAgaWYgKCF3LmZpeGVkV2lkdGgpXG4gICAgICAgICAgICAgICAgbGVmdCAtPSByZW5kZXJlci5zY3JvbGxMZWZ0O1xuICAgICAgICAgICAgdy5lbC5zdHlsZS5sZWZ0ID0gbGVmdCArIFwicHhcIjtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHcuZnVsbFdpZHRoICYmIHcuc2NyZWVuV2lkdGgpIHtcbiAgICAgICAgICAgICAgICB3LmVsLnN0eWxlLm1pbldpZHRoID0gY29uZmlnLndpZHRoICsgMiAqIGNvbmZpZy5wYWRkaW5nICsgXCJweFwiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAody5maXhlZFdpZHRoKSB7XG4gICAgICAgICAgICAgICAgdy5lbC5zdHlsZS5yaWdodCA9IHJlbmRlcmVyLnNjcm9sbEJhci5nZXRXaWR0aCgpICsgXCJweFwiO1xuICAgICAgICAgICAgfSBlbHN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G93LmFjZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hY2UgPSBhO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBrZXkgaW4gYSkgaWYgKGEuaGFzT3duUHJvcGVydHkoa2V5KSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hY2Vba2V5XSA9IGFba2V5XTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pKCk7XG4gICAgICAgIFxubW9kdWxlLmV4cG9ydHMgPSB3aW5kb3cuYWNlLmFjZXF1aXJlKFwiYWNlL2FjZVwiKTsiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/index.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/css.js": -/*!********************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/css.js ***! - \********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("ace.define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar supportType = exports.supportType = \"align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index\";\nvar supportFunction = exports.supportFunction = \"rgb|rgba|url|attr|counter|counters\";\nvar supportConstant = exports.supportConstant = \"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\";\nvar supportConstantColor = exports.supportConstantColor = \"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen\";\nvar supportConstantFonts = exports.supportConstantFonts = \"arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\";\n\nvar numRe = exports.numRe = \"\\\\-?(?:(?:[0-9]+(?:\\\\.[0-9]+)?)|(?:\\\\.[0-9]+))\";\nvar pseudoElements = exports.pseudoElements = \"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\";\nvar pseudoClasses = exports.pseudoClasses = \"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\\\b\";\n\nvar CssHighlightRules = function() {\n\n var keywordMapper = this.createKeywordMapper({\n \"support.function\": supportFunction,\n \"support.constant\": supportConstant,\n \"support.type\": supportType,\n \"support.constant.color\": supportConstantColor,\n \"support.constant.fonts\": supportConstantFonts\n }, \"text\", true);\n\n this.$rules = {\n \"start\" : [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"ruleset\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\"\n }, {\n token: \"string\",\n regex: \"@\",\n next: \"media\"\n }, {\n token: \"keyword\",\n regex: \"#[a-z0-9-_]+\"\n }, {\n token: \"keyword\",\n regex: \"%\"\n }, {\n token: \"variable\",\n regex: \"\\\\.[a-z0-9-_]+\"\n }, {\n token: \"string\",\n regex: \":[a-z0-9-_]+\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token: \"constant\",\n regex: \"[a-z0-9-_]+\"\n }, {\n caseInsensitive: true\n }],\n\n \"media\": [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \";\",\n next: \"start\"\n }, {\n token: \"keyword\",\n regex: \"(?:media|supports|document|charset|import|namespace|media|supports|document\"\n + \"|page|font|keyframes|viewport|counter-style|font-feature-values\"\n + \"|swash|ornaments|annotation|stylistic|styleset|character-variant)\"\n }],\n\n \"comments\" : [{\n token: \"comment\", // multi line comment\n regex: \"\\\\/\\\\*\",\n push: [{\n token : \"comment\",\n regex : \"\\\\*\\\\/\",\n next : \"pop\"\n }, {\n defaultToken : \"comment\"\n }]\n }],\n\n \"ruleset\" : [{\n regex : \"-(webkit|ms|moz|o)-\",\n token : \"text\"\n }, {\n token : \"paren.rparen\",\n regex : \"\\\\}\",\n next : \"start\"\n }, {\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token : [\"constant.numeric\", \"keyword\"],\n regex : \"(\" + numRe + \")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token : \"constant.numeric\", // hex6 color\n regex : \"#[a-f0-9]{6}\"\n }, {\n token : \"constant.numeric\", // hex3 color\n regex : \"#[a-f0-9]{3}\"\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-element.css\"],\n regex : pseudoElements\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-class.css\"],\n regex : pseudoClasses\n }, {\n include: \"url\"\n }, {\n token : keywordMapper,\n regex : \"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"\n }, {\n caseInsensitive: true\n }],\n\n url: [{\n token : \"support.function\",\n regex : \"(?:url(:?-prefix)?|domain|regexp)\\\\(\",\n push: [{\n token : \"support.function\",\n regex : \"\\\\)\",\n next : \"pop\"\n }, {\n defaultToken: \"string\"\n }]\n }],\n\n strings: [{\n token : \"string.start\",\n regex : \"'\",\n push : [{\n token : \"string.end\",\n regex : \"'|$\",\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }, {\n token : \"string.start\",\n regex : '\"',\n push : [{\n token : \"string.end\",\n regex : '\"|$',\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }],\n escapes: [{\n token : \"constant.language.escape\",\n regex : /\\\\([a-fA-F\\d]{1,6}|[^a-fA-F\\d])/\n }]\n\n };\n\n this.normalizeRules();\n};\n\noop.inherits(CssHighlightRules, TextHighlightRules);\n\nexports.CssHighlightRules = CssHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/css_completions\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar propertyMap = {\n \"background\": {\"#$0\": 1},\n \"background-color\": {\"#$0\": 1, \"transparent\": 1, \"fixed\": 1},\n \"background-image\": {\"url('/$0')\": 1},\n \"background-repeat\": {\"repeat\": 1, \"repeat-x\": 1, \"repeat-y\": 1, \"no-repeat\": 1, \"inherit\": 1},\n \"background-position\": {\"bottom\":2, \"center\":2, \"left\":2, \"right\":2, \"top\":2, \"inherit\":2},\n \"background-attachment\": {\"scroll\": 1, \"fixed\": 1},\n \"background-size\": {\"cover\": 1, \"contain\": 1},\n \"background-clip\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"background-origin\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"border\": {\"solid $0\": 1, \"dashed $0\": 1, \"dotted $0\": 1, \"#$0\": 1},\n \"border-color\": {\"#$0\": 1},\n \"border-style\": {\"solid\":2, \"dashed\":2, \"dotted\":2, \"double\":2, \"groove\":2, \"hidden\":2, \"inherit\":2, \"inset\":2, \"none\":2, \"outset\":2, \"ridged\":2},\n \"border-collapse\": {\"collapse\": 1, \"separate\": 1},\n \"bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"clear\": {\"left\": 1, \"right\": 1, \"both\": 1, \"none\": 1},\n \"color\": {\"#$0\": 1, \"rgb(#$00,0,0)\": 1},\n \"cursor\": {\"default\": 1, \"pointer\": 1, \"move\": 1, \"text\": 1, \"wait\": 1, \"help\": 1, \"progress\": 1, \"n-resize\": 1, \"ne-resize\": 1, \"e-resize\": 1, \"se-resize\": 1, \"s-resize\": 1, \"sw-resize\": 1, \"w-resize\": 1, \"nw-resize\": 1},\n \"display\": {\"none\": 1, \"block\": 1, \"inline\": 1, \"inline-block\": 1, \"table-cell\": 1},\n \"empty-cells\": {\"show\": 1, \"hide\": 1},\n \"float\": {\"left\": 1, \"right\": 1, \"none\": 1},\n \"font-family\": {\"Arial\":2,\"Comic Sans MS\":2,\"Consolas\":2,\"Courier New\":2,\"Courier\":2,\"Georgia\":2,\"Monospace\":2,\"Sans-Serif\":2, \"Segoe UI\":2,\"Tahoma\":2,\"Times New Roman\":2,\"Trebuchet MS\":2,\"Verdana\": 1},\n \"font-size\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"font-weight\": {\"bold\": 1, \"normal\": 1},\n \"font-style\": {\"italic\": 1, \"normal\": 1},\n \"font-variant\": {\"normal\": 1, \"small-caps\": 1},\n \"height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"letter-spacing\": {\"normal\": 1},\n \"line-height\": {\"normal\": 1},\n \"list-style-type\": {\"none\": 1, \"disc\": 1, \"circle\": 1, \"square\": 1, \"decimal\": 1, \"decimal-leading-zero\": 1, \"lower-roman\": 1, \"upper-roman\": 1, \"lower-greek\": 1, \"lower-latin\": 1, \"upper-latin\": 1, \"georgian\": 1, \"lower-alpha\": 1, \"upper-alpha\": 1},\n \"margin\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"overflow\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-x\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-y\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"padding\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"page-break-after\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"page-break-before\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"position\": {\"absolute\": 1, \"relative\": 1, \"fixed\": 1, \"static\": 1},\n \"right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"table-layout\": {\"fixed\": 1, \"auto\": 1},\n \"text-decoration\": {\"none\": 1, \"underline\": 1, \"line-through\": 1, \"blink\": 1},\n \"text-align\": {\"left\": 1, \"right\": 1, \"center\": 1, \"justify\": 1},\n \"text-transform\": {\"capitalize\": 1, \"uppercase\": 1, \"lowercase\": 1, \"none\": 1},\n \"top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"vertical-align\": {\"top\": 1, \"bottom\": 1},\n \"visibility\": {\"hidden\": 1, \"visible\": 1},\n \"white-space\": {\"nowrap\": 1, \"normal\": 1, \"pre\": 1, \"pre-line\": 1, \"pre-wrap\": 1},\n \"width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"word-spacing\": {\"normal\": 1},\n \"filter\": {\"alpha(opacity=$0100)\": 1},\n\n \"text-shadow\": {\"$02px 2px 2px #777\": 1},\n \"text-overflow\": {\"ellipsis-word\": 1, \"clip\": 1, \"ellipsis\": 1},\n \"-moz-border-radius\": 1,\n \"-moz-border-radius-topright\": 1,\n \"-moz-border-radius-bottomright\": 1,\n \"-moz-border-radius-topleft\": 1,\n \"-moz-border-radius-bottomleft\": 1,\n \"-webkit-border-radius\": 1,\n \"-webkit-border-top-right-radius\": 1,\n \"-webkit-border-top-left-radius\": 1,\n \"-webkit-border-bottom-right-radius\": 1,\n \"-webkit-border-bottom-left-radius\": 1,\n \"-moz-box-shadow\": 1,\n \"-webkit-box-shadow\": 1,\n \"transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-moz-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-webkit-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1 }\n};\n\nvar CssCompletions = function() {\n\n};\n\n(function() {\n\n this.completionsDefined = false;\n\n this.defineCompletions = function() {\n if (document) {\n var style = document.createElement('c').style;\n\n for (var i in style) {\n if (typeof style[i] !== 'string')\n continue;\n\n var name = i.replace(/[A-Z]/g, function(x) {\n return '-' + x.toLowerCase();\n });\n\n if (!propertyMap.hasOwnProperty(name))\n propertyMap[name] = 1;\n }\n }\n\n this.completionsDefined = true;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n if (!this.completionsDefined) {\n this.defineCompletions();\n }\n\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (state==='ruleset'){\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/:[^;]+$/.test(line)) {\n /([\\w\\-]+):[^:]*$/.test(line);\n\n return this.getPropertyValueCompletions(state, session, pos, prefix);\n } else {\n return this.getPropertyCompletions(state, session, pos, prefix);\n }\n }\n\n return [];\n };\n\n this.getPropertyCompletions = function(state, session, pos, prefix) {\n var properties = Object.keys(propertyMap);\n return properties.map(function(property){\n return {\n caption: property,\n snippet: property + ': $0;',\n meta: \"property\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getPropertyValueCompletions = function(state, session, pos, prefix) {\n var line = session.getLine(pos.row).substr(0, pos.column);\n var property = (/([\\w\\-]+):[^:]*$/.exec(line) || {})[1];\n\n if (!property)\n return [];\n var values = [];\n if (property in propertyMap && typeof propertyMap[property] === \"object\") {\n values = Object.keys(propertyMap[property]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"property value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(CssCompletions.prototype);\n\nexports.CssCompletions = CssCompletions;\n});\n\nace.define(\"ace/mode/behaviour/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar CstyleBehaviour = acequire(\"./cstyle\").CstyleBehaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\n\nvar CssBehaviour = function () {\n\n this.inherit(CstyleBehaviour);\n\n this.add(\"colon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ':') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n if (!line.substring(cursor.column).match(/^\\s*;/)) {\n return {\n text: ':;',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"colon\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar === ';') {\n range.end.column ++;\n return range;\n }\n }\n }\n });\n\n this.add(\"semicolon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ';') {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ';') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n });\n\n};\noop.inherits(CssBehaviour, CstyleBehaviour);\n\nexports.CssBehaviour = CssBehaviour;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/css_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/css_completions\",\"ace/mode/behaviour/css\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CssCompletions = acequire(\"./css_completions\").CssCompletions;\nvar CssBehaviour = acequire(\"./behaviour/css\").CssBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = CssHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CssBehaviour();\n this.$completer = new CssCompletions();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.foldingRules = \"cStyle\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n var tokens = this.getTokenizer().getLineTokens(line, state).tokens;\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n var match = line.match(/^.*\\{\\s*$/);\n if (match) {\n indent += tab;\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/css */ \"../../../../brace@0.11.1/node_modules/brace/worker/css.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/css\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9icmFjZUAwLjExLjEvbm9kZV9tb2R1bGVzL2JyYWNlL21vZGUvY3NzLmpzP2ExZDUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLOztBQUVMO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBLHVCQUF1QjtBQUN2QjtBQUNBLFNBQVM7QUFDVDtBQUNBLHVCQUF1QjtBQUN2QixTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0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hcmVuXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxce1wiLFxuICAgICAgICAgICAgbmV4dDogIFwicnVsZXNldFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXH1cIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmdcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIkBcIixcbiAgICAgICAgICAgIG5leHQ6ICBcIm1lZGlhXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwia2V5d29yZFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiI1thLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwia2V5d29yZFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiJVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInZhcmlhYmxlXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxcLlthLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nXCIsXG4gICAgICAgICAgICByZWdleDogXCI6W2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLFxuICAgICAgICAgICAgcmVnZXggOiBudW1SZVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiW2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBjYXNlSW5zZW5zaXRpdmU6IHRydWVcbiAgICAgICAgfV0sXG5cbiAgICAgICAgXCJtZWRpYVwiOiBbe1xuICAgICAgICAgICAgaW5jbHVkZSA6IFtcInN0cmluZ3NcIiwgXCJ1cmxcIiwgXCJjb21tZW50c1wiXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJwYXJlbi5scGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFx7XCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXH1cIixcbiAgICAgICAgICAgIG5leHQ6ICBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nXCIsXG4gICAgICAgICAgICByZWdleDogXCI7XCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIig/Om1lZGlhfHN1cHBvcnRzfGRvY3VtZW50fGNoYXJzZXR8aW1wb3J0fG5hbWVzcGFjZXxtZWRpYXxzdXBwb3J0c3xkb2N1bWVudFwiXG4gICAgICAgICAgICAgICAgKyBcInxwYWdlfGZvbnR8a2V5ZnJhbWVzfHZpZXdwb3J0fGNvdW50ZXItc3R5bGV8Zm9udC1mZWF0dXJlLXZhbHVlc1wiXG4gICAgICAgICAgICAgICAgKyBcInxzd2FzaHxvcm5hbWVudHN8YW5ub3RhdGlvbnxzdHlsaXN0aWN8c3R5bGVzZXR8Y2hhcmFjdGVyLXZhcmlhbnQpXCJcbiAgICAgICAgfV0sXG5cbiAgICAgICAgXCJjb21tZW50c1wiIDogW3tcbiAgICAgICAgICAgIHRva2VuOiBcImNvbW1lbnRcIiwgLy8gbXVsdGkgbGluZSBjb21tZW50XG4gICAgICAgICAgICByZWdleDogXCJcXFxcL1xcXFwqXCIsXG4gICAgICAgICAgICBwdXNoOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwqXFxcXC9cIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9XSxcblxuICAgICAgICBcInJ1bGVzZXRcIiA6IFt7XG4gICAgICAgICAgICByZWdleCA6IFwiLSh3ZWJraXR8bXN8bW96fG8pLVwiLFxuICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ucnBhcmVuXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXH1cIixcbiAgICAgICAgICAgIG5leHQgOiBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZSA6IFtcInN0cmluZ3NcIiwgXCJ1cmxcIiwgXCJjb21tZW50c1wiXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFtcImNvbnN0YW50Lm51bWVyaWNcIiwgXCJrZXl3b3JkXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIG51bVJlICsgXCIpKGNofGNtfGRlZ3xlbXxleHxmcnxnZHxncmFkfEh6fGlufGtIenxtbXxtc3xwY3xwdHxweHxyYWR8cmVtfHN8dHVybnx2aHx2bXx2d3wlKVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsXG4gICAgICAgICAgICByZWdleCA6IG51bVJlXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsICAvLyBoZXg2IGNvbG9yXG4gICAgICAgICAgICByZWdleCA6IFwiI1thLWYwLTldezZ9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIiwgLy8gaGV4MyBjb2xvclxuICAgICAgICAgICAgcmVnZXggOiBcIiNbYS1mMC05XXszfVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogW1wicHVuY3R1YXRpb25cIiwgXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUucHNldWRvLWVsZW1lbnQuY3NzXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBwc2V1ZG9FbGVtZW50c1xuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFtcInB1bmN0dWF0aW9uXCIsIFwiZW50aXR5Lm90aGVyLmF0dHJpYnV0ZS1uYW1lLnBzZXVkby1jbGFzcy5jc3NcIl0sXG4gICAgICAgICAgICByZWdleCA6IHBzZXVkb0NsYXNzZXNcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZTogXCJ1cmxcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IGtleXdvcmRNYXBwZXIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXC0/W2EtekEtWl9dW2EtekEtWjAtOV9cXFxcLV0qXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgY2FzZUluc2Vuc2l0aXZlOiB0cnVlXG4gICAgICAgIH1dLFxuXG4gICAgICAgIHVybDogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiKD86dXJsKDo/LXByZWZpeCk/fGRvbWFpbnxyZWdleHApXFxcXChcIixcbiAgICAgICAgICAgIHB1c2g6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN1cHBvcnQuZnVuY3Rpb25cIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXClcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfV0sXG5cbiAgICAgICAgc3RyaW5nczogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuc3RhcnRcIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCInXCIsXG4gICAgICAgICAgICBwdXNoIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLmVuZFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCInfCRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgaW5jbHVkZSA6IFwiZXNjYXBlc1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1xcXFwkLyxcbiAgICAgICAgICAgICAgICBjb25zdW1lTGluZUVuZDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5zdGFydFwiLFxuICAgICAgICAgICAgcmVnZXggOiAnXCInLFxuICAgICAgICAgICAgcHVzaCA6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5lbmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcInwkJyxcbiAgICAgICAgICAgICAgICBuZXh0OiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgaW5jbHVkZSA6IFwiZXNjYXBlc1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxh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y5kZWZpbmVDb21wbGV0aW9ucyA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAoZG9jdW1lbnQpIHtcbiAgICAgICAgICAgIHZhciBzdHlsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2MnKS5zdHlsZTtcblxuICAgICAgICAgICAgZm9yICh2YXIgaSBpbiBzdHlsZSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygc3R5bGVbaV0gIT09ICdzdHJpbmcnKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgICAgIHZhciBuYW1lID0gaS5yZXBsYWNlKC9bQS1aXS9nLCBmdW5jdGlvbih4KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnLScgKyB4LnRvTG93ZXJDYXNlKCk7XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoIXByb3BlcnR5TWFwLmhhc093blByb3BlcnR5KG5hbWUpKVxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eU1hcFtuYW1lXSA9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNvbXBsZXRpb25zRGVmaW5lZCA9IHRydWU7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Q29tcGxldGlvbnMgPSBmdW5jdGlvbihzdGF0ZSwgc2Vzc2lvbiwgcG9zLCBwcmVmaXgpIHtcbiAgICAgICAgaWYgKCF0aGlzLmNvbXBsZXRpb25zRGVmaW5lZCkge1xuICAgICAgICAgICAgdGhpcy5kZWZpbmVDb21wbGV0aW9ucygpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHRva2VuID0gc2Vzc2lvbi5nZXRUb2tlbkF0KHBvcy5yb3csIHBvcy5jb2x1bW4pO1xuXG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIGlmIChzdGF0ZT09PSdydWxlc2V0Jyl7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShwb3Mucm93KS5zdWJzdHIoMCwgcG9zLmNvbHVtbik7XG4gICAgICAgICAgICBpZiAoLzpbXjtdKyQvLnRlc3QobGluZSkpIHtcbiAgICAgICAgICAgICAgICAvKFtcXHdcXC1dKyk6W146XSokLy50ZXN0KGxpbmUpO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0UHJvcGVydHlWYWx1ZUNvbXBsZXRpb25zKHN0YXRlLCBzZXNzaW9uLCBwb3MsIHByZWZpeCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldFByb3BlcnR5Q29tcGxldGlvbnMoc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBbXTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRQcm9wZXJ0eUNvbXBsZXRpb25zID0gZnVuY3Rpb24oc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KSB7XG4gICAgICAgIHZhciBwcm9wZXJ0aWVzID0gT2JqZWN0LmtleXMocHJvcGVydHlNYXApO1xuICAgICAgICByZXR1cm4gcHJvcGVydGllcy5tYXAoZnVuY3Rpb24ocHJvcGVydHkpe1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBjYXB0aW9uOiBwcm9wZXJ0eSxcbiAgICAgICAgICAgICAgICBzbmlwcGV0OiBwcm9wZXJ0eSArICc6ICQwOycsXG4gICAgICAgICAgICAgICAgbWV0YTogXCJwcm9wZXJ0eVwiLFxuICAgICAgICAgICAgICAgIHNjb3JlOiBOdW1iZXIuTUFYX1ZBTFVFXG4gICAgICAgICAgICB9O1xuICAgICAgICB9KTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRQcm9wZXJ0eVZhbHVlQ29tcGxldGlvbnMgPSBmdW5jdGlvbihzdGF0ZSwgc2Vzc2lvbiwgcG9zLCBwcmVmaXgpIHtcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocG9zLnJvdykuc3Vic3RyKDAsIHBvcy5jb2x1bW4pO1xuICAgICAgICB2YXIgcHJvcGVydHkgPSAoLyhbXFx3XFwtXSspOlteOl0qJC8uZXhlYyhsaW5lKSB8fCB7fSlbMV07XG5cbiAgICAgICAgaWYgKCFwcm9wZXJ0eSlcbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgdmFyIHZhbHVlcyA9IFtdO1xuICAgICAgICBpZiAocHJvcGVydHkgaW4gcHJvcGVydHlNYXAgJiYgdHlwZW9mIHByb3BlcnR5TWFwW3Byb3BlcnR5XSA9PT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgdmFsdWVzID0gT2JqZWN0LmtleXMocHJvcGVydHlNYXBbcHJvcGVydHldKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdmFsdWVzLm1hcChmdW5jdGlvbih2YWx1ZSl7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIGNhcHRpb246IHZhbHVlLFxuICAgICAgICAgICAgICAgIHNuaXBwZXQ6IHZhbHVlLFxuICAgICAgICAgICAgICAgIG1ldGE6IFwicHJvcGVydHkgdmFsdWVcIixcbiAgICAgICAgICAgICAgICBzY29yZTogTnVtYmVyLk1BWF9WQUxVRVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSk7XG4gICAgfTtcblxufSkuY2FsbChDc3NDb21wbGV0aW9ucy5wcm90b3R5cGUpO1xuXG5leHBvcnRzLkNzc0NvbXBsZXRpb25zID0gQ3NzQ29tcGxldGlvbnM7XG59KTtcblxuYWNlLmRlZmluZShcImFjZS9tb2RlL2JlaGF2aW91ci9jc3NcIixbXCJyZXF1aXJlXCIsXCJleHBvcnRzXCIsXCJtb2R1bGVcIixcImFjZS9saWIvb29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AgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUgPT09ICdzdXBwb3J0LnR5cGUnKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmRvYy5nZXRMaW5lKGN1cnNvci5yb3cpO1xuICAgICAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PT0gJzonKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4pLm1hdGNoKC9eXFxzKjsvKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAnOjsnLFxuICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJjb2xvblwiLCBcImRlbGV0aW9uXCIsIGZ1bmN0aW9uIChzdGF0ZSwgYWN0aW9uLCBlZGl0b3IsIHNlc3Npb24sIHJhbmdlKSB7XG4gICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShyYW5nZSk7XG4gICAgICAgI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gcm93KTtcbiAgICAgICAgXG4gICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2godGhpcy5mb2xkaW5nU3RhcnRNYXJrZXIpO1xuICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBpID0gbWF0Y2guaW5kZXg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5vcGVuaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHJhbmdlID0gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSArIG1hdGNoWzBdLmxlbmd0aCwgMSk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChyYW5nZSAmJiAhcmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgIGlmIChmb3JjZU11bHRpbGluZSkge1xuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IHRoaXMuZ2V0U2VjdGlvblJhbmdlKHNlc3Npb24sIHJvdyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChmb2xkU3R5bGUgIT0gXCJhbGxcIilcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZm9sZFN0eWxlID09PSBcIm1hcmtiZWdpblwiKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2godGhpcy5mb2xkaW5nU3RvcE1hcmtlcik7XG4gICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgdmFyIGkgPSBtYXRjaC5pbmRleCArIG1hdGNoWzBdLmxlbmd0aDtcblxuICAgICAgICAgICAgaWYgKG1hdGNoWzFdKVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNsb3NpbmdCcmFja2V0QmxvY2soc2Vzc2lvbiwgbWF0Y2hbMV0sIHJvdywgaSk7XG5cbiAgICAgICAgICAgIHJldHVybiBzZXNzaW9uLmdldENvbW1lbnRGb2xkUmFuZ2Uocm93LCBpLCAtMSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHRoaXMuZ2V0U2VjdGlvblJhbmdlID0gZnVuY3Rpb24oc2Vzc2lvbiwgcm93KSB7XG4gICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgIHZhciBzdGFydEluZGVudCA9IGxpbmUuc2VhcmNoKC9cXFMvKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICB2YXIgc3RhcnRDb2x1bW4gPSBsaW5lLmxlbmd0aDtcbiAgICAgICAgcm93ID0gcm93ICsgMTtcbiAgICAgICAgdmFyIGVuZFJvdyA9IHJvdztcbiAgICAgICAgdmFyIG1heFJvdyA9IHNlc3Npb24uZ2V0TGVuZ3RoKCk7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIGluZGVudCA9IGxpbmUuc2VhcmNoKC9cXFMvKTtcbiAgICAgICAgICAgIGlmIChpbmRlbnQgPT09IC0xKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgaWYgIChzdGFydEluZGVudCA+IGluZGVudClcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIHZhciBzdWJSYW5nZSA9IHRoaXMuZ2V0Rm9sZFdpZGdldFJhbmdlKHNlc3Npb24sIFwiYWxsXCIsIHJvdyk7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmIChzdWJSYW5nZSkge1xuICAgICAgICAgICAgICAgIGlmIChzdWJSYW5nZS5zdGFydC5yb3cgPD0gc3RhcnRSb3cpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzdWJSYW5nZS5pc011bHRpTGluZSgpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJvdyA9IHN1YlJhbmdlLmVuZC5yb3c7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzdGFydEluZGVudCA9PSBpbmRlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZW5kUm93ID0gcm93O1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBzZXNzaW9uLmdldExpbmUoZW5kUm93KS5sZW5ndGgpO1xuICAgIH07XG4gICAgdGhpcy5nZXRDb21tZW50UmVnaW9uQmxvY2sgPSBmdW5jdGlvbihzZXNzaW9uLCBsaW5lLCByb3cpIHtcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5zZWFyY2goL1xccyokLyk7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB2YXIgc3RhcnRSb3cgPSByb3c7XG4gICAgICAgIFxuICAgICAgICB2YXIgcmUgPSAvXlxccyooPzpcXC9cXCp8XFwvXFwvfC0tKSM/KGVuZCk/cmVnaW9uXFxiLztcbiAgICAgICAgdmFyIGRlcHRoID0gMTtcbiAgICAgICAgd2hpbGUgKCsrcm93IDwgbWF4Um93KSB7XG4gICAgICAgICAgICBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICB2YXIgbSA9IHJlLmV4ZWMobGluZSk7XG4gICAgICAgICAgIC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oc2Vzc2lvbikge1xuICAgICAgICB2YXIgd29ya2VyID0gbmV3IFdvcmtlckNsaWVudChbXCJhY2VcIl0sIHJlcXVpcmUoXCIuLi93b3JrZXIvY3NzXCIpLCBcIldvcmtlclwiKTtcbiAgICAgICAgd29ya2VyLmF0dGFjaFRvRG9jdW1lbnQoc2Vzc2lvbi5nZXREb2N1bWVudCgpKTtcblxuICAgICAgICB3b3JrZXIub24oXCJhbm5vdGF0ZVwiLCBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICBzZXNzaW9uLnNldEFubm90YXRpb25zKGUuZGF0YSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHdvcmtlci5vbihcInRlcm1pbmF0ZVwiLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHNlc3Npb24uY2xlYXJBbm5vdGF0aW9ucygpO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gd29ya2VyO1xuICAgIH07XG5cbiAgICB0aGlzLiRpZCA9IFwiYWNlL21vZGUvY3NzXCI7XG59KS5jYWxsKE1vZGUucHJvdG90eXBlKTtcblxuZXhwb3J0cy5Nb2RlID0gTW9kZTtcblxufSk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/css.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/html.js": -/*!*********************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/html.js ***! - \*********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\n\nvar JavaScriptHighlightRules = function(options) {\n var keywordMapper = this.createKeywordMapper({\n \"variable.language\":\n \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\" , // Pseudo\n \"keyword\":\n \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|function|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\n \"storage.type\":\n \"const|let|var|function\",\n \"constant.language\":\n \"null|Infinity|NaN|undefined\",\n \"support.function\":\n \"alert\",\n \"constant.language.boolean\": \"true|false\"\n }, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n\n this.$rules = {\n \"no_regex\" : [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n {\n token : \"string\",\n regex : \"'(?=.)\",\n next : \"qstring\"\n }, {\n token : \"string\",\n regex : '\"(?=.)',\n next : \"qqstring\"\n }, {\n token : \"constant.numeric\", // hexadecimal, octal and binary\n regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token : \"constant.numeric\", // decimal integers and floats\n regex : /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"support.function\",\n \"punctuation.operator\", \"entity.name.function\", \"text\",\"keyword.operator\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(prototype)(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"text\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"keyword\",\n regex : \"from(?=\\\\s*('|\\\"))\"\n }, {\n token : \"keyword\",\n regex : \"(?:\" + kwBeforeRe + \")\\\\b\",\n next : \"start\"\n }, {\n token : [\"support.constant\"],\n regex : /that\\b/\n }, {\n token : [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex : /(console)(\\.)(warn|info|log|error|time|trace|timeEnd|assert)\\b/\n }, {\n token : keywordMapper,\n regex : identifierRe\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/,\n next : \"property\"\n }, {\n token : \"storage.type\",\n regex : /=>/\n }, {\n token : \"keyword.operator\",\n regex : /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next : \"start\"\n }, {\n token : \"punctuation.operator\",\n regex : /[?:,;.]/,\n next : \"start\"\n }, {\n token : \"paren.lparen\",\n regex : /[\\[({]/,\n next : \"start\"\n }, {\n token : \"paren.rparen\",\n regex : /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token : \"text\",\n regex : \"\\\\s+\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(?:(\\\\s+)(\\\\w+))?(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/\n }, {\n token : \"support.function\",\n regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|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(?=\\()/\n }, {\n token : \"support.function.dom\",\n 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|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token : \"support.constant\",\n 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/\n }, {\n token : \"identifier\",\n regex : identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token : \"text\",\n regex : \"\\\\s+|^$\",\n next : \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token : \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token : \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token : \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"function_arguments\": [\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \"[, ]+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : '\"|$',\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : \"'|$\",\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n\n\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function(val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token : \"string.quasi.start\",\n regex : /`/,\n push : [{\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"paren.quasi.start\",\n regex : /\\${/,\n push : \"start\"\n }, {\n token : \"string.quasi.end\",\n regex : /`/,\n next : \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n });\n\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n\n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"no_regex\") ]);\n\n this.normalizeRules();\n};\n\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\n\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch : function(val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n } else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex : \"\",\n onMatch : function(value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{type: this.token, value: value}];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n token : \"text.tag-whitespace.xml\",\n regex : \"\\\\s+\"\n }, {\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n stateName : \"jsx_attr_q\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n stateName : \"jsx_attr_qq\",\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\n\nfunction comments(next) {\n return [\n {\n token : \"comment\", // multi line comment\n regex : /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"\\\\*\\\\/\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }, {\n token : \"comment\",\n regex : \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"$|^\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = JavaScriptHighlightRules;\n \n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n this.$quotes = {'\"': '\"', \"'\": \"'\", \"`\": \"`\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n } else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/javascript */ \"../../../../brace@0.11.1/node_modules/brace/worker/javascript.js\"), \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(results) {\n session.setAnnotations(results.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/javascript\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n\nace.define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar supportType = exports.supportType = \"align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index\";\nvar supportFunction = exports.supportFunction = \"rgb|rgba|url|attr|counter|counters\";\nvar supportConstant = exports.supportConstant = \"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\";\nvar supportConstantColor = exports.supportConstantColor = \"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen\";\nvar supportConstantFonts = exports.supportConstantFonts = \"arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\";\n\nvar numRe = exports.numRe = \"\\\\-?(?:(?:[0-9]+(?:\\\\.[0-9]+)?)|(?:\\\\.[0-9]+))\";\nvar pseudoElements = exports.pseudoElements = \"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\";\nvar pseudoClasses = exports.pseudoClasses = \"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\\\b\";\n\nvar CssHighlightRules = function() {\n\n var keywordMapper = this.createKeywordMapper({\n \"support.function\": supportFunction,\n \"support.constant\": supportConstant,\n \"support.type\": supportType,\n \"support.constant.color\": supportConstantColor,\n \"support.constant.fonts\": supportConstantFonts\n }, \"text\", true);\n\n this.$rules = {\n \"start\" : [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"ruleset\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\"\n }, {\n token: \"string\",\n regex: \"@\",\n next: \"media\"\n }, {\n token: \"keyword\",\n regex: \"#[a-z0-9-_]+\"\n }, {\n token: \"keyword\",\n regex: \"%\"\n }, {\n token: \"variable\",\n regex: \"\\\\.[a-z0-9-_]+\"\n }, {\n token: \"string\",\n regex: \":[a-z0-9-_]+\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token: \"constant\",\n regex: \"[a-z0-9-_]+\"\n }, {\n caseInsensitive: true\n }],\n\n \"media\": [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \";\",\n next: \"start\"\n }, {\n token: \"keyword\",\n regex: \"(?:media|supports|document|charset|import|namespace|media|supports|document\"\n + \"|page|font|keyframes|viewport|counter-style|font-feature-values\"\n + \"|swash|ornaments|annotation|stylistic|styleset|character-variant)\"\n }],\n\n \"comments\" : [{\n token: \"comment\", // multi line comment\n regex: \"\\\\/\\\\*\",\n push: [{\n token : \"comment\",\n regex : \"\\\\*\\\\/\",\n next : \"pop\"\n }, {\n defaultToken : \"comment\"\n }]\n }],\n\n \"ruleset\" : [{\n regex : \"-(webkit|ms|moz|o)-\",\n token : \"text\"\n }, {\n token : \"paren.rparen\",\n regex : \"\\\\}\",\n next : \"start\"\n }, {\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token : [\"constant.numeric\", \"keyword\"],\n regex : \"(\" + numRe + \")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token : \"constant.numeric\", // hex6 color\n regex : \"#[a-f0-9]{6}\"\n }, {\n token : \"constant.numeric\", // hex3 color\n regex : \"#[a-f0-9]{3}\"\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-element.css\"],\n regex : pseudoElements\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-class.css\"],\n regex : pseudoClasses\n }, {\n include: \"url\"\n }, {\n token : keywordMapper,\n regex : \"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"\n }, {\n caseInsensitive: true\n }],\n\n url: [{\n token : \"support.function\",\n regex : \"(?:url(:?-prefix)?|domain|regexp)\\\\(\",\n push: [{\n token : \"support.function\",\n regex : \"\\\\)\",\n next : \"pop\"\n }, {\n defaultToken: \"string\"\n }]\n }],\n\n strings: [{\n token : \"string.start\",\n regex : \"'\",\n push : [{\n token : \"string.end\",\n regex : \"'|$\",\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }, {\n token : \"string.start\",\n regex : '\"',\n push : [{\n token : \"string.end\",\n regex : '\"|$',\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }],\n escapes: [{\n token : \"constant.language.escape\",\n regex : /\\\\([a-fA-F\\d]{1,6}|[^a-fA-F\\d])/\n }]\n\n };\n\n this.normalizeRules();\n};\n\noop.inherits(CssHighlightRules, TextHighlightRules);\n\nexports.CssHighlightRules = CssHighlightRules;\n\n});\n\nace.define(\"ace/mode/css_completions\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar propertyMap = {\n \"background\": {\"#$0\": 1},\n \"background-color\": {\"#$0\": 1, \"transparent\": 1, \"fixed\": 1},\n \"background-image\": {\"url('/$0')\": 1},\n \"background-repeat\": {\"repeat\": 1, \"repeat-x\": 1, \"repeat-y\": 1, \"no-repeat\": 1, \"inherit\": 1},\n \"background-position\": {\"bottom\":2, \"center\":2, \"left\":2, \"right\":2, \"top\":2, \"inherit\":2},\n \"background-attachment\": {\"scroll\": 1, \"fixed\": 1},\n \"background-size\": {\"cover\": 1, \"contain\": 1},\n \"background-clip\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"background-origin\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"border\": {\"solid $0\": 1, \"dashed $0\": 1, \"dotted $0\": 1, \"#$0\": 1},\n \"border-color\": {\"#$0\": 1},\n \"border-style\": {\"solid\":2, \"dashed\":2, \"dotted\":2, \"double\":2, \"groove\":2, \"hidden\":2, \"inherit\":2, \"inset\":2, \"none\":2, \"outset\":2, \"ridged\":2},\n \"border-collapse\": {\"collapse\": 1, \"separate\": 1},\n \"bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"clear\": {\"left\": 1, \"right\": 1, \"both\": 1, \"none\": 1},\n \"color\": {\"#$0\": 1, \"rgb(#$00,0,0)\": 1},\n \"cursor\": {\"default\": 1, \"pointer\": 1, \"move\": 1, \"text\": 1, \"wait\": 1, \"help\": 1, \"progress\": 1, \"n-resize\": 1, \"ne-resize\": 1, \"e-resize\": 1, \"se-resize\": 1, \"s-resize\": 1, \"sw-resize\": 1, \"w-resize\": 1, \"nw-resize\": 1},\n \"display\": {\"none\": 1, \"block\": 1, \"inline\": 1, \"inline-block\": 1, \"table-cell\": 1},\n \"empty-cells\": {\"show\": 1, \"hide\": 1},\n \"float\": {\"left\": 1, \"right\": 1, \"none\": 1},\n \"font-family\": {\"Arial\":2,\"Comic Sans MS\":2,\"Consolas\":2,\"Courier New\":2,\"Courier\":2,\"Georgia\":2,\"Monospace\":2,\"Sans-Serif\":2, \"Segoe UI\":2,\"Tahoma\":2,\"Times New Roman\":2,\"Trebuchet MS\":2,\"Verdana\": 1},\n \"font-size\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"font-weight\": {\"bold\": 1, \"normal\": 1},\n \"font-style\": {\"italic\": 1, \"normal\": 1},\n \"font-variant\": {\"normal\": 1, \"small-caps\": 1},\n \"height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"letter-spacing\": {\"normal\": 1},\n \"line-height\": {\"normal\": 1},\n \"list-style-type\": {\"none\": 1, \"disc\": 1, \"circle\": 1, \"square\": 1, \"decimal\": 1, \"decimal-leading-zero\": 1, \"lower-roman\": 1, \"upper-roman\": 1, \"lower-greek\": 1, \"lower-latin\": 1, \"upper-latin\": 1, \"georgian\": 1, \"lower-alpha\": 1, \"upper-alpha\": 1},\n \"margin\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"overflow\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-x\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-y\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"padding\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"page-break-after\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"page-break-before\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"position\": {\"absolute\": 1, \"relative\": 1, \"fixed\": 1, \"static\": 1},\n \"right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"table-layout\": {\"fixed\": 1, \"auto\": 1},\n \"text-decoration\": {\"none\": 1, \"underline\": 1, \"line-through\": 1, \"blink\": 1},\n \"text-align\": {\"left\": 1, \"right\": 1, \"center\": 1, \"justify\": 1},\n \"text-transform\": {\"capitalize\": 1, \"uppercase\": 1, \"lowercase\": 1, \"none\": 1},\n \"top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"vertical-align\": {\"top\": 1, \"bottom\": 1},\n \"visibility\": {\"hidden\": 1, \"visible\": 1},\n \"white-space\": {\"nowrap\": 1, \"normal\": 1, \"pre\": 1, \"pre-line\": 1, \"pre-wrap\": 1},\n \"width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"word-spacing\": {\"normal\": 1},\n \"filter\": {\"alpha(opacity=$0100)\": 1},\n\n \"text-shadow\": {\"$02px 2px 2px #777\": 1},\n \"text-overflow\": {\"ellipsis-word\": 1, \"clip\": 1, \"ellipsis\": 1},\n \"-moz-border-radius\": 1,\n \"-moz-border-radius-topright\": 1,\n \"-moz-border-radius-bottomright\": 1,\n \"-moz-border-radius-topleft\": 1,\n \"-moz-border-radius-bottomleft\": 1,\n \"-webkit-border-radius\": 1,\n \"-webkit-border-top-right-radius\": 1,\n \"-webkit-border-top-left-radius\": 1,\n \"-webkit-border-bottom-right-radius\": 1,\n \"-webkit-border-bottom-left-radius\": 1,\n \"-moz-box-shadow\": 1,\n \"-webkit-box-shadow\": 1,\n \"transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-moz-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-webkit-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1 }\n};\n\nvar CssCompletions = function() {\n\n};\n\n(function() {\n\n this.completionsDefined = false;\n\n this.defineCompletions = function() {\n if (document) {\n var style = document.createElement('c').style;\n\n for (var i in style) {\n if (typeof style[i] !== 'string')\n continue;\n\n var name = i.replace(/[A-Z]/g, function(x) {\n return '-' + x.toLowerCase();\n });\n\n if (!propertyMap.hasOwnProperty(name))\n propertyMap[name] = 1;\n }\n }\n\n this.completionsDefined = true;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n if (!this.completionsDefined) {\n this.defineCompletions();\n }\n\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (state==='ruleset'){\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/:[^;]+$/.test(line)) {\n /([\\w\\-]+):[^:]*$/.test(line);\n\n return this.getPropertyValueCompletions(state, session, pos, prefix);\n } else {\n return this.getPropertyCompletions(state, session, pos, prefix);\n }\n }\n\n return [];\n };\n\n this.getPropertyCompletions = function(state, session, pos, prefix) {\n var properties = Object.keys(propertyMap);\n return properties.map(function(property){\n return {\n caption: property,\n snippet: property + ': $0;',\n meta: \"property\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getPropertyValueCompletions = function(state, session, pos, prefix) {\n var line = session.getLine(pos.row).substr(0, pos.column);\n var property = (/([\\w\\-]+):[^:]*$/.exec(line) || {})[1];\n\n if (!property)\n return [];\n var values = [];\n if (property in propertyMap && typeof propertyMap[property] === \"object\") {\n values = Object.keys(propertyMap[property]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"property value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(CssCompletions.prototype);\n\nexports.CssCompletions = CssCompletions;\n});\n\nace.define(\"ace/mode/behaviour/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar CstyleBehaviour = acequire(\"./cstyle\").CstyleBehaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\n\nvar CssBehaviour = function () {\n\n this.inherit(CstyleBehaviour);\n\n this.add(\"colon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ':') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n if (!line.substring(cursor.column).match(/^\\s*;/)) {\n return {\n text: ':;',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"colon\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar === ';') {\n range.end.column ++;\n return range;\n }\n }\n }\n });\n\n this.add(\"semicolon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ';') {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ';') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n });\n\n};\noop.inherits(CssBehaviour, CstyleBehaviour);\n\nexports.CssBehaviour = CssBehaviour;\n});\n\nace.define(\"ace/mode/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/css_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/css_completions\",\"ace/mode/behaviour/css\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CssCompletions = acequire(\"./css_completions\").CssCompletions;\nvar CssBehaviour = acequire(\"./behaviour/css\").CssBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = CssHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CssBehaviour();\n this.$completer = new CssCompletions();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.foldingRules = \"cStyle\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n var tokens = this.getTokenizer().getLineTokens(line, state).tokens;\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n var match = line.match(/^.*\\{\\s*$/);\n if (match) {\n indent += tab;\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/css */ \"../../../../brace@0.11.1/node_modules/brace/worker/css.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/css\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n\n});\n\nace.define(\"ace/mode/xml_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar XmlHighlightRules = function(normalize) {\n var tagRegex = \"[_:a-zA-Z\\xc0-\\uffff][-_:.a-zA-Z0-9\\xc0-\\uffff]*\";\n\n this.$rules = {\n start : [\n {token : \"string.cdata.xml\", regex : \"<\\\\!\\\\[CDATA\\\\[\", next : \"cdata\"},\n {\n token : [\"punctuation.instruction.xml\", \"keyword.instruction.xml\"],\n regex : \"(<\\\\?)(\" + tagRegex + \")\", next : \"processing_instruction\"\n },\n {token : \"comment.start.xml\", regex : \"<\\\\!--\", next : \"comment\"},\n {\n token : [\"xml-pe.doctype.xml\", \"xml-pe.doctype.xml\"],\n regex : \"(<\\\\!)(DOCTYPE)(?=[\\\\s])\", next : \"doctype\", caseInsensitive: true\n },\n {include : \"tag\"},\n {token : \"text.end-tag-open.xml\", regex: \"\",\n next : \"start\"\n }],\n\n doctype : [\n {include : \"whitespace\"},\n {include : \"string\"},\n {token : \"xml-pe.doctype.xml\", regex : \">\", next : \"start\"},\n {token : \"xml-pe.xml\", regex : \"[-_a-zA-Z0-9:]+\"},\n {token : \"punctuation.int-subset\", regex : \"\\\\[\", push : \"int_subset\"}\n ],\n\n int_subset : [{\n token : \"text.xml\",\n regex : \"\\\\s+\"\n }, {\n token: \"punctuation.int-subset.xml\",\n regex: \"]\",\n next: \"pop\"\n }, {\n token : [\"punctuation.markup-decl.xml\", \"keyword.markup-decl.xml\"],\n regex : \"(<\\\\!)(\" + tagRegex + \")\",\n push : [{\n token : \"text\",\n regex : \"\\\\s+\"\n },\n {\n token : \"punctuation.markup-decl.xml\",\n regex : \">\",\n next : \"pop\"\n },\n {include : \"string\"}]\n }],\n\n cdata : [\n {token : \"string.cdata.xml\", regex : \"\\\\]\\\\]>\", next : \"start\"},\n {token : \"text.xml\", regex : \"\\\\s+\"},\n {token : \"text.xml\", regex : \"(?:[^\\\\]]|\\\\](?!\\\\]>))+\"}\n ],\n\n comment : [\n {token : \"comment.end.xml\", regex : \"-->\", next : \"start\"},\n {defaultToken : \"comment.xml\"}\n ],\n\n reference : [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }],\n\n attr_reference : [{\n token : \"constant.language.escape.reference.attribute-value.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }],\n\n tag : [{\n token : [\"meta.tag.punctuation.tag-open.xml\", \"meta.tag.punctuation.end-tag-open.xml\", \"meta.tag.tag-name.xml\"],\n regex : \"(?:(<)|(\", next : \"start\"}\n ]\n }],\n\n tag_whitespace : [\n {token : \"text.tag-whitespace.xml\", regex : \"\\\\s+\"}\n ],\n whitespace : [\n {token : \"text.whitespace.xml\", regex : \"\\\\s+\"}\n ],\n string: [{\n token : \"string.xml\",\n regex : \"'\",\n push : [\n {token : \"string.xml\", regex: \"'\", next: \"pop\"},\n {defaultToken : \"string.xml\"}\n ]\n }, {\n token : \"string.xml\",\n regex : '\"',\n push : [\n {token : \"string.xml\", regex: '\"', next: \"pop\"},\n {defaultToken : \"string.xml\"}\n ]\n }],\n\n attributes: [{\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n include: \"tag_whitespace\"\n }, {\n include: \"attribute_value\"\n }],\n\n attribute_value: [{\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"attr_reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"attr_reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }]\n };\n\n if (this.constructor === XmlHighlightRules)\n this.normalizeRules();\n};\n\n\n(function() {\n\n this.embedTagRules = function(HighlightRules, prefix, tag){\n this.$rules.tag.unshift({\n token : [\"meta.tag.punctuation.tag-open.xml\", \"meta.tag.\" + tag + \".tag-name.xml\"],\n regex : \"(<)(\" + tag + \"(?=\\\\s|>|$))\",\n next: [\n {include : \"attributes\"},\n {token : \"meta.tag.punctuation.tag-close.xml\", regex : \"/?>\", next : prefix + \"start\"}\n ]\n });\n\n this.$rules[tag + \"-end\"] = [\n {include : \"attributes\"},\n {token : \"meta.tag.punctuation.tag-close.xml\", regex : \"/?>\", next: \"start\",\n onMatch : function(value, currentState, stack) {\n stack.splice(0);\n return this.token;\n }}\n ];\n\n this.embedRules(HighlightRules, prefix, [{\n token: [\"meta.tag.punctuation.end-tag-open.xml\", \"meta.tag.\" + tag + \".tag-name.xml\"],\n regex : \"(|$))\",\n next: tag + \"-end\"\n }, {\n token: \"string.cdata.xml\",\n regex : \"<\\\\!\\\\[CDATA\\\\[\"\n }, {\n token: \"string.cdata.xml\",\n regex : \"\\\\]\\\\]>\"\n }]);\n };\n\n}).call(TextHighlightRules.prototype);\n\noop.inherits(XmlHighlightRules, TextHighlightRules);\n\nexports.XmlHighlightRules = XmlHighlightRules;\n});\n\nace.define(\"ace/mode/html_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/css_highlight_rules\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/xml_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar XmlHighlightRules = acequire(\"./xml_highlight_rules\").XmlHighlightRules;\n\nvar tagMap = lang.createMap({\n a : 'anchor',\n button \t : 'form',\n form : 'form',\n img : 'image',\n input : 'form',\n label : 'form',\n option : 'form',\n script : 'script',\n select : 'form',\n textarea : 'form',\n style : 'style',\n table : 'table',\n tbody : 'table',\n td : 'table',\n tfoot : 'table',\n th : 'table',\n tr : 'table'\n});\n\nvar HtmlHighlightRules = function() {\n XmlHighlightRules.call(this);\n\n this.addRules({\n attributes: [{\n include : \"tag_whitespace\"\n }, {\n token : \"entity.other.attribute-name.xml\",\n regex : \"[-_a-zA-Z0-9:.]+\"\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\",\n push : [{\n include: \"tag_whitespace\"\n }, {\n token : \"string.unquoted.attribute-value.html\",\n regex : \"[^<>='\\\"`\\\\s]+\",\n next : \"pop\"\n }, {\n token : \"empty\",\n regex : \"\",\n next : \"pop\"\n }]\n }, {\n include : \"attribute_value\"\n }],\n tag: [{\n token : function(start, tag) {\n var group = tagMap[tag];\n return [\"meta.tag.punctuation.\" + (start == \"<\" ? \"\" : \"end-\") + \"tag-open.xml\",\n \"meta.tag\" + (group ? \".\" + group : \"\") + \".tag-name.xml\"];\n },\n regex : \"(\", next : \"start\"}\n ]\n });\n\n this.embedTagRules(CssHighlightRules, \"css-\", \"style\");\n this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), \"js-\", \"script\");\n\n if (this.constructor === HtmlHighlightRules)\n this.normalizeRules();\n};\n\noop.inherits(HtmlHighlightRules, XmlHighlightRules);\n\nexports.HtmlHighlightRules = HtmlHighlightRules;\n});\n\nace.define(\"ace/mode/behaviour/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\nvar lang = acequire(\"../../lib/lang\");\n\nfunction is(token, type) {\n return token.type.lastIndexOf(type + \".xml\") > -1;\n}\n\nvar XmlBehaviour = function () {\n\n this.add(\"string_dquotes\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '\"' || text == \"'\") {\n var quote = text;\n var selected = session.doc.getTextRange(editor.getSelectionRange());\n if (selected !== \"\" && selected !== \"'\" && selected != '\"' && editor.getWrapBehavioursEnabled()) {\n return {\n text: quote + selected + quote,\n selection: false\n };\n }\n\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n if (rightChar == quote && (is(token, \"attribute-value\") || is(token, \"string\"))) {\n return {\n text: \"\",\n selection: [1, 1]\n };\n }\n\n if (!token)\n token = iterator.stepBackward();\n\n if (!token)\n return;\n\n while (is(token, \"tag-whitespace\") || is(token, \"whitespace\")) {\n token = iterator.stepBackward();\n }\n var rightSpace = !rightChar || rightChar.match(/\\s/);\n if (is(token, \"attribute-equals\") && (rightSpace || rightChar == '>') || (is(token, \"decl-attribute-equals\") && (rightSpace || rightChar == '?'))) {\n return {\n text: quote + quote,\n selection: [1, 1]\n };\n }\n }\n });\n\n this.add(\"string_dquotes\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"autoclosing\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '>') {\n var position = editor.getSelectionRange().start;\n var iterator = new TokenIterator(session, position.row, position.column);\n var token = iterator.getCurrentToken() || iterator.stepBackward();\n if (!token || !(is(token, \"tag-name\") || is(token, \"tag-whitespace\") || is(token, \"attribute-name\") || is(token, \"attribute-equals\") || is(token, \"attribute-value\")))\n return;\n if (is(token, \"reference.attribute-value\"))\n return;\n if (is(token, \"attribute-value\")) {\n var firstChar = token.value.charAt(0);\n if (firstChar == '\"' || firstChar == \"'\") {\n var lastChar = token.value.charAt(token.value.length - 1);\n var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;\n if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)\n return;\n }\n }\n while (!is(token, \"tag-name\")) {\n token = iterator.stepBackward();\n if (token.value == \"<\") {\n token = iterator.stepForward();\n break;\n }\n }\n\n var tokenRow = iterator.getCurrentTokenRow();\n var tokenColumn = iterator.getCurrentTokenColumn();\n if (is(iterator.stepBackward(), \"end-tag-open\"))\n return;\n\n var element = token.value;\n if (tokenRow == position.row)\n element = element.substring(0, position.column - tokenColumn);\n\n if (this.voidElements.hasOwnProperty(element.toLowerCase()))\n return;\n\n return {\n text: \">\" + \"\",\n selection: [1, 1]\n };\n }\n });\n\n this.add(\"autoindent\", \"insertion\", function (state, action, editor, session, text) {\n if (text == \"\\n\") {\n var cursor = editor.getCursorPosition();\n var line = session.getLine(cursor.row);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n if (token && token.type.indexOf(\"tag-close\") !== -1) {\n if (token.value == \"/>\")\n return;\n while (token && token.type.indexOf(\"tag-name\") === -1) {\n token = iterator.stepBackward();\n }\n\n if (!token) {\n return;\n }\n\n var tag = token.value;\n var row = iterator.getCurrentTokenRow();\n token = iterator.stepBackward();\n if (!token || token.type.indexOf(\"end-tag\") !== -1) {\n return;\n }\n\n if (this.voidElements && !this.voidElements[tag]) {\n var nextToken = session.getTokenAt(cursor.row, cursor.column+1);\n var line = session.getLine(row);\n var nextIndent = this.$getIndent(line);\n var indent = nextIndent + session.getTabString();\n\n if (nextToken && nextToken.value === \" -1;\n}\n\n(function() {\n\n this.getFoldWidget = function(session, foldStyle, row) {\n var tag = this._getFirstTagInLine(session, row);\n\n if (!tag)\n return this.getCommentFoldWidget(session, row);\n\n if (tag.closing || (!tag.tagName && tag.selfClosing))\n return foldStyle == \"markbeginend\" ? \"end\" : \"\";\n\n if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))\n return \"\";\n\n if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))\n return \"\";\n\n return \"start\";\n };\n\n this.getCommentFoldWidget = function(session, row) {\n if (/comment/.test(session.getState(row)) && /';\n break;\n }\n }\n return tag;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == '/>';\n return tag;\n }\n tag.start.column += token.value.length;\n }\n\n return null;\n };\n\n this._findEndTagInLine = function(session, row, tagName, startColumn) {\n var tokens = session.getTokens(row);\n var column = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n column += token.value.length;\n if (column < startColumn)\n continue;\n if (is(token, \"end-tag-open\")) {\n token = tokens[i + 1];\n if (token && token.value == tagName)\n return true;\n }\n }\n return false;\n };\n this._readTagForward = function(iterator) {\n var token = iterator.getCurrentToken();\n if (!token)\n return null;\n\n var tag = new Tag();\n do {\n if (is(token, \"tag-open\")) {\n tag.closing = is(token, \"end-tag-open\");\n tag.start.row = iterator.getCurrentTokenRow();\n tag.start.column = iterator.getCurrentTokenColumn();\n } else if (is(token, \"tag-name\")) {\n tag.tagName = token.value;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == \"/>\";\n tag.end.row = iterator.getCurrentTokenRow();\n tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;\n iterator.stepForward();\n return tag;\n }\n } while(token = iterator.stepForward());\n\n return null;\n };\n \n this._readTagBackward = function(iterator) {\n var token = iterator.getCurrentToken();\n if (!token)\n return null;\n\n var tag = new Tag();\n do {\n if (is(token, \"tag-open\")) {\n tag.closing = is(token, \"end-tag-open\");\n tag.start.row = iterator.getCurrentTokenRow();\n tag.start.column = iterator.getCurrentTokenColumn();\n iterator.stepBackward();\n return tag;\n } else if (is(token, \"tag-name\")) {\n tag.tagName = token.value;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == \"/>\";\n tag.end.row = iterator.getCurrentTokenRow();\n tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;\n }\n } while(token = iterator.stepBackward());\n\n return null;\n };\n \n this._pop = function(stack, tag) {\n while (stack.length) {\n \n var top = stack[stack.length-1];\n if (!tag || top.tagName == tag.tagName) {\n return stack.pop();\n }\n else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {\n stack.pop();\n continue;\n } else {\n return null;\n }\n }\n };\n \n this.getFoldWidgetRange = function(session, foldStyle, row) {\n var firstTag = this._getFirstTagInLine(session, row);\n \n if (!firstTag) {\n return this.getCommentFoldWidget(session, row)\n && session.getCommentFoldRange(row, session.getLine(row).length);\n }\n \n var isBackward = firstTag.closing || firstTag.selfClosing;\n var stack = [];\n var tag;\n \n if (!isBackward) {\n var iterator = new TokenIterator(session, row, firstTag.start.column);\n var start = {\n row: row,\n column: firstTag.start.column + firstTag.tagName.length + 2\n };\n if (firstTag.start.row == firstTag.end.row)\n start.column = firstTag.end.column;\n while (tag = this._readTagForward(iterator)) {\n if (tag.selfClosing) {\n if (!stack.length) {\n tag.start.column += tag.tagName.length + 2;\n tag.end.column -= 2;\n return Range.fromPoints(tag.start, tag.end);\n } else\n continue;\n }\n \n if (tag.closing) {\n this._pop(stack, tag);\n if (stack.length == 0)\n return Range.fromPoints(start, tag.start);\n }\n else {\n stack.push(tag);\n }\n }\n }\n else {\n var iterator = new TokenIterator(session, row, firstTag.end.column);\n var end = {\n row: row,\n column: firstTag.start.column\n };\n \n while (tag = this._readTagBackward(iterator)) {\n if (tag.selfClosing) {\n if (!stack.length) {\n tag.start.column += tag.tagName.length + 2;\n tag.end.column -= 2;\n return Range.fromPoints(tag.start, tag.end);\n } else\n continue;\n }\n \n if (!tag.closing) {\n this._pop(stack, tag);\n if (stack.length == 0) {\n tag.start.column += tag.tagName.length + 2;\n if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)\n tag.start.column = tag.end.column;\n return Range.fromPoints(tag.start, end);\n }\n }\n else {\n stack.push(tag);\n }\n }\n }\n \n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/folding/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/mixed\",\"ace/mode/folding/xml\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar MixedFoldMode = acequire(\"./mixed\").FoldMode;\nvar XmlFoldMode = acequire(\"./xml\").FoldMode;\nvar CStyleFoldMode = acequire(\"./cstyle\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(voidElements, optionalTags) {\n MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {\n \"js-\": new CStyleFoldMode(),\n \"css-\": new CStyleFoldMode()\n });\n};\n\noop.inherits(FoldMode, MixedFoldMode);\n\n});\n\nace.define(\"ace/mode/html_completions\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\n\nvar commonAttributes = [\n \"accesskey\",\n \"class\",\n \"contenteditable\",\n \"contextmenu\",\n \"dir\",\n \"draggable\",\n \"dropzone\",\n \"hidden\",\n \"id\",\n \"inert\",\n \"itemid\",\n \"itemprop\",\n \"itemref\",\n \"itemscope\",\n \"itemtype\",\n \"lang\",\n \"spellcheck\",\n \"style\",\n \"tabindex\",\n \"title\",\n \"translate\"\n];\n\nvar eventAttributes = [\n \"onabort\",\n \"onblur\",\n \"oncancel\",\n \"oncanplay\",\n \"oncanplaythrough\",\n \"onchange\",\n \"onclick\",\n \"onclose\",\n \"oncontextmenu\",\n \"oncuechange\",\n \"ondblclick\",\n \"ondrag\",\n \"ondragend\",\n \"ondragenter\",\n \"ondragleave\",\n \"ondragover\",\n \"ondragstart\",\n \"ondrop\",\n \"ondurationchange\",\n \"onemptied\",\n \"onended\",\n \"onerror\",\n \"onfocus\",\n \"oninput\",\n \"oninvalid\",\n \"onkeydown\",\n \"onkeypress\",\n \"onkeyup\",\n \"onload\",\n \"onloadeddata\",\n \"onloadedmetadata\",\n \"onloadstart\",\n \"onmousedown\",\n \"onmousemove\",\n \"onmouseout\",\n \"onmouseover\",\n \"onmouseup\",\n \"onmousewheel\",\n \"onpause\",\n \"onplay\",\n \"onplaying\",\n \"onprogress\",\n \"onratechange\",\n \"onreset\",\n \"onscroll\",\n \"onseeked\",\n \"onseeking\",\n \"onselect\",\n \"onshow\",\n \"onstalled\",\n \"onsubmit\",\n \"onsuspend\",\n \"ontimeupdate\",\n \"onvolumechange\",\n \"onwaiting\"\n];\n\nvar globalAttributes = commonAttributes.concat(eventAttributes);\n\nvar attributeMap = {\n \"html\": {\"manifest\": 1},\n \"head\": {},\n \"title\": {},\n \"base\": {\"href\": 1, \"target\": 1},\n \"link\": {\"href\": 1, \"hreflang\": 1, \"rel\": {\"stylesheet\": 1, \"icon\": 1}, \"media\": {\"all\": 1, \"screen\": 1, \"print\": 1}, \"type\": {\"text/css\": 1, \"image/png\": 1, \"image/jpeg\": 1, \"image/gif\": 1}, \"sizes\": 1},\n \"meta\": {\"http-equiv\": {\"content-type\": 1}, \"name\": {\"description\": 1, \"keywords\": 1}, \"content\": {\"text/html; charset=UTF-8\": 1}, \"charset\": 1},\n \"style\": {\"type\": 1, \"media\": {\"all\": 1, \"screen\": 1, \"print\": 1}, \"scoped\": 1},\n \"script\": {\"charset\": 1, \"type\": {\"text/javascript\": 1}, \"src\": 1, \"defer\": 1, \"async\": 1},\n \"noscript\": {\"href\": 1},\n \"body\": {\"onafterprint\": 1, \"onbeforeprint\": 1, \"onbeforeunload\": 1, \"onhashchange\": 1, \"onmessage\": 1, \"onoffline\": 1, \"onpopstate\": 1, \"onredo\": 1, \"onresize\": 1, \"onstorage\": 1, \"onundo\": 1, \"onunload\": 1},\n \"section\": {},\n \"nav\": {},\n \"article\": {\"pubdate\": 1},\n \"aside\": {},\n \"h1\": {},\n \"h2\": {},\n \"h3\": {},\n \"h4\": {},\n \"h5\": {},\n \"h6\": {},\n \"header\": {},\n \"footer\": {},\n \"address\": {},\n \"main\": {},\n \"p\": {},\n \"hr\": {},\n \"pre\": {},\n \"blockquote\": {\"cite\": 1},\n \"ol\": {\"start\": 1, \"reversed\": 1},\n \"ul\": {},\n \"li\": {\"value\": 1},\n \"dl\": {},\n \"dt\": {},\n \"dd\": {},\n \"figure\": {},\n \"figcaption\": {},\n \"div\": {},\n \"a\": {\"href\": 1, \"target\": {\"_blank\": 1, \"top\": 1}, \"ping\": 1, \"rel\": {\"nofollow\": 1, \"alternate\": 1, \"author\": 1, \"bookmark\": 1, \"help\": 1, \"license\": 1, \"next\": 1, \"noreferrer\": 1, \"prefetch\": 1, \"prev\": 1, \"search\": 1, \"tag\": 1}, \"media\": 1, \"hreflang\": 1, \"type\": 1},\n \"em\": {},\n \"strong\": {},\n \"small\": {},\n \"s\": {},\n \"cite\": {},\n \"q\": {\"cite\": 1},\n \"dfn\": {},\n \"abbr\": {},\n \"data\": {},\n \"time\": {\"datetime\": 1},\n \"code\": {},\n \"var\": {},\n \"samp\": {},\n \"kbd\": {},\n \"sub\": {},\n \"sup\": {},\n \"i\": {},\n \"b\": {},\n \"u\": {},\n \"mark\": {},\n \"ruby\": {},\n \"rt\": {},\n \"rp\": {},\n \"bdi\": {},\n \"bdo\": {},\n \"span\": {},\n \"br\": {},\n \"wbr\": {},\n \"ins\": {\"cite\": 1, \"datetime\": 1},\n \"del\": {\"cite\": 1, \"datetime\": 1},\n \"img\": {\"alt\": 1, \"src\": 1, \"height\": 1, \"width\": 1, \"usemap\": 1, \"ismap\": 1},\n \"iframe\": {\"name\": 1, \"src\": 1, \"height\": 1, \"width\": 1, \"sandbox\": {\"allow-same-origin\": 1, \"allow-top-navigation\": 1, \"allow-forms\": 1, \"allow-scripts\": 1}, \"seamless\": {\"seamless\": 1}},\n \"embed\": {\"src\": 1, \"height\": 1, \"width\": 1, \"type\": 1},\n \"object\": {\"param\": 1, \"data\": 1, \"type\": 1, \"height\" : 1, \"width\": 1, \"usemap\": 1, \"name\": 1, \"form\": 1, \"classid\": 1},\n \"param\": {\"name\": 1, \"value\": 1},\n \"video\": {\"src\": 1, \"autobuffer\": 1, \"autoplay\": {\"autoplay\": 1}, \"loop\": {\"loop\": 1}, \"controls\": {\"controls\": 1}, \"width\": 1, \"height\": 1, \"poster\": 1, \"muted\": {\"muted\": 1}, \"preload\": {\"auto\": 1, \"metadata\": 1, \"none\": 1}},\n \"audio\": {\"src\": 1, \"autobuffer\": 1, \"autoplay\": {\"autoplay\": 1}, \"loop\": {\"loop\": 1}, \"controls\": {\"controls\": 1}, \"muted\": {\"muted\": 1}, \"preload\": {\"auto\": 1, \"metadata\": 1, \"none\": 1 }},\n \"source\": {\"src\": 1, \"type\": 1, \"media\": 1},\n \"track\": {\"kind\": 1, \"src\": 1, \"srclang\": 1, \"label\": 1, \"default\": 1},\n \"canvas\": {\"width\": 1, \"height\": 1},\n \"map\": {\"name\": 1},\n \"area\": {\"shape\": 1, \"coords\": 1, \"href\": 1, \"hreflang\": 1, \"alt\": 1, \"target\": 1, \"media\": 1, \"rel\": 1, \"ping\": 1, \"type\": 1},\n \"svg\": {},\n \"math\": {},\n \"table\": {\"summary\": 1},\n \"caption\": {},\n \"colgroup\": {\"span\": 1},\n \"col\": {\"span\": 1},\n \"tbody\": {},\n \"thead\": {},\n \"tfoot\": {},\n \"tr\": {},\n \"td\": {\"headers\": 1, \"rowspan\": 1, \"colspan\": 1},\n \"th\": {\"headers\": 1, \"rowspan\": 1, \"colspan\": 1, \"scope\": 1},\n \"form\": {\"accept-charset\": 1, \"action\": 1, \"autocomplete\": 1, \"enctype\": {\"multipart/form-data\": 1, \"application/x-www-form-urlencoded\": 1}, \"method\": {\"get\": 1, \"post\": 1}, \"name\": 1, \"novalidate\": 1, \"target\": {\"_blank\": 1, \"top\": 1}},\n \"fieldset\": {\"disabled\": 1, \"form\": 1, \"name\": 1},\n \"legend\": {},\n \"label\": {\"form\": 1, \"for\": 1},\n \"input\": {\n \"type\": {\"text\": 1, \"password\": 1, \"hidden\": 1, \"checkbox\": 1, \"submit\": 1, \"radio\": 1, \"file\": 1, \"button\": 1, \"reset\": 1, \"image\": 31, \"color\": 1, \"date\": 1, \"datetime\": 1, \"datetime-local\": 1, \"email\": 1, \"month\": 1, \"number\": 1, \"range\": 1, \"search\": 1, \"tel\": 1, \"time\": 1, \"url\": 1, \"week\": 1},\n \"accept\": 1, \"alt\": 1, \"autocomplete\": {\"on\": 1, \"off\": 1}, \"autofocus\": {\"autofocus\": 1}, \"checked\": {\"checked\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"formaction\": 1, \"formenctype\": {\"application/x-www-form-urlencoded\": 1, \"multipart/form-data\": 1, \"text/plain\": 1}, \"formmethod\": {\"get\": 1, \"post\": 1}, \"formnovalidate\": {\"formnovalidate\": 1}, \"formtarget\": {\"_blank\": 1, \"_self\": 1, \"_parent\": 1, \"_top\": 1}, \"height\": 1, \"list\": 1, \"max\": 1, \"maxlength\": 1, \"min\": 1, \"multiple\": {\"multiple\": 1}, \"name\": 1, \"pattern\": 1, \"placeholder\": 1, \"readonly\": {\"readonly\": 1}, \"acequired\": {\"acequired\": 1}, \"size\": 1, \"src\": 1, \"step\": 1, \"width\": 1, \"files\": 1, \"value\": 1},\n \"button\": {\"autofocus\": 1, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"formaction\": 1, \"formenctype\": 1, \"formmethod\": 1, \"formnovalidate\": 1, \"formtarget\": 1, \"name\": 1, \"value\": 1, \"type\": {\"button\": 1, \"submit\": 1}},\n \"select\": {\"autofocus\": 1, \"disabled\": 1, \"form\": 1, \"multiple\": {\"multiple\": 1}, \"name\": 1, \"size\": 1, \"readonly\":{\"readonly\": 1}},\n \"datalist\": {},\n \"optgroup\": {\"disabled\": 1, \"label\": 1},\n \"option\": {\"disabled\": 1, \"selected\": 1, \"label\": 1, \"value\": 1},\n \"textarea\": {\"autofocus\": {\"autofocus\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"maxlength\": 1, \"name\": 1, \"placeholder\": 1, \"readonly\": {\"readonly\": 1}, \"acequired\": {\"acequired\": 1}, \"rows\": 1, \"cols\": 1, \"wrap\": {\"on\": 1, \"off\": 1, \"hard\": 1, \"soft\": 1}},\n \"keygen\": {\"autofocus\": 1, \"challenge\": {\"challenge\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"keytype\": {\"rsa\": 1, \"dsa\": 1, \"ec\": 1}, \"name\": 1},\n \"output\": {\"for\": 1, \"form\": 1, \"name\": 1},\n \"progress\": {\"value\": 1, \"max\": 1},\n \"meter\": {\"value\": 1, \"min\": 1, \"max\": 1, \"low\": 1, \"high\": 1, \"optimum\": 1},\n \"details\": {\"open\": 1},\n \"summary\": {},\n \"command\": {\"type\": 1, \"label\": 1, \"icon\": 1, \"disabled\": 1, \"checked\": 1, \"radiogroup\": 1, \"command\": 1},\n \"menu\": {\"type\": 1, \"label\": 1},\n \"dialog\": {\"open\": 1}\n};\n\nvar elements = Object.keys(attributeMap);\n\nfunction is(token, type) {\n return token.type.lastIndexOf(type + \".xml\") > -1;\n}\n\nfunction findTagName(session, pos) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n while (token && !is(token, \"tag-name\")){\n token = iterator.stepBackward();\n }\n if (token)\n return token.value;\n}\n\nfunction findAttributeName(session, pos) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n while (token && !is(token, \"attribute-name\")){\n token = iterator.stepBackward();\n }\n if (token)\n return token.value;\n}\n\nvar HtmlCompletions = function() {\n\n};\n\n(function() {\n\n this.getCompletions = function(state, session, pos, prefix) {\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (is(token, \"tag-name\") || is(token, \"tag-open\") || is(token, \"end-tag-open\"))\n return this.getTagCompletions(state, session, pos, prefix);\n if (is(token, \"tag-whitespace\") || is(token, \"attribute-name\"))\n return this.getAttributeCompletions(state, session, pos, prefix);\n if (is(token, \"attribute-value\"))\n return this.getAttributeValueCompletions(state, session, pos, prefix);\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/&[a-z]*$/i.test(line))\n return this.getHTMLEntityCompletions(state, session, pos, prefix);\n\n return [];\n };\n\n this.getTagCompletions = function(state, session, pos, prefix) {\n return elements.map(function(element){\n return {\n value: element,\n meta: \"tag\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getAttributeCompletions = function(state, session, pos, prefix) {\n var tagName = findTagName(session, pos);\n if (!tagName)\n return [];\n var attributes = globalAttributes;\n if (tagName in attributeMap) {\n attributes = attributes.concat(Object.keys(attributeMap[tagName]));\n }\n return attributes.map(function(attribute){\n return {\n caption: attribute,\n snippet: attribute + '=\"$0\"',\n meta: \"attribute\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getAttributeValueCompletions = function(state, session, pos, prefix) {\n var tagName = findTagName(session, pos);\n var attributeName = findAttributeName(session, pos);\n \n if (!tagName)\n return [];\n var values = [];\n if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === \"object\") {\n values = Object.keys(attributeMap[tagName][attributeName]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"attribute value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getHTMLEntityCompletions = function(state, session, pos, prefix) {\n var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];\n\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"html entity\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(HtmlCompletions.prototype);\n\nexports.HtmlCompletions = HtmlCompletions;\n});\n\nace.define(\"ace/mode/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text\",\"ace/mode/javascript\",\"ace/mode/css\",\"ace/mode/html_highlight_rules\",\"ace/mode/behaviour/xml\",\"ace/mode/folding/html\",\"ace/mode/html_completions\",\"ace/worker/worker_client\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptMode = acequire(\"./javascript\").Mode;\nvar CssMode = acequire(\"./css\").Mode;\nvar HtmlHighlightRules = acequire(\"./html_highlight_rules\").HtmlHighlightRules;\nvar XmlBehaviour = acequire(\"./behaviour/xml\").XmlBehaviour;\nvar HtmlFoldMode = acequire(\"./folding/html\").FoldMode;\nvar HtmlCompletions = acequire(\"./html_completions\").HtmlCompletions;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar voidElements = [\"area\", \"base\", \"br\", \"col\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"menuitem\", \"param\", \"source\", \"track\", \"wbr\"];\nvar optionalEndTags = [\"li\", \"dt\", \"dd\", \"p\", \"rt\", \"rp\", \"optgroup\", \"option\", \"colgroup\", \"td\", \"th\"];\n\nvar Mode = function(options) {\n this.fragmentContext = options && options.fragmentContext;\n this.HighlightRules = HtmlHighlightRules;\n this.$behaviour = new XmlBehaviour();\n this.$completer = new HtmlCompletions();\n \n this.createModeDelegates({\n \"js-\": JavaScriptMode,\n \"css-\": CssMode\n });\n \n this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.blockComment = {start: \"\"};\n\n this.voidElements = lang.arrayToMap(voidElements);\n\n this.getNextLineIndent = function(state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function(state, line, input) {\n return false;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n if (this.constructor != Mode)\n return;\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/html */ \"../../../../brace@0.11.1/node_modules/brace/worker/html.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n if (this.fragmentContext)\n worker.call(\"setOptions\", [{context: this.fragmentContext}]);\n\n worker.on(\"error\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/html\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9icmFjZUAwLjExLjEvbm9kZV9tb2R1bGVzL2JyYWNlL21vZGUvaHRtbC5qcz8xZTc3Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFHQTs7QUFFQSxDQUFDOztBQUVEO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDs7QUFFQSx5Q0FBeUMsRUFBRTtBQUMzQyxzQkFBc0IsRUFBRTtBQUN4QixXQUFXLFlBQVksS0FBSztBQUM1QixvQkFBb0IsSUFBSTtB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aXMuY3JlYXRlS2V5d29yZE1hcHBlcih7XG4gICAgICAgIFwidmFyaWFibGUubGFuZ3VhZ2VcIjpcbiAgICAgICAgICAgIFwiQXJyYXl8Qm9vbGVhbnxEYXRlfEZ1bmN0aW9ufEl0ZXJhdG9yfE51bWJlcnxPYmplY3R8UmVnRXhwfFN0cmluZ3xQcm94eXxcIiAgKyAvLyBDb25zdHJ1Y3RvcnNcbiAgICAgICAgICAgIFwiTmFtZXNwYWNlfFFOYW1lfFhNTHxYTUxMaXN0fFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBFNFhcbiAgICAgICAgICAgIFwiQXJyYXlCdWZmZXJ8RmxvYXQzMkFycmF5fEZsb2F0NjRBcnJheXxJbnQxNkFycmF5fEludDMyQXJyYXl8SW50OEFycmF5fFwiICAgK1xuICAgICAgICAgICAgXCJVaW50MTZBcnJheXxVaW50MzJBcnJheXxVaW50OEFycmF5fFVpbnQ4Q2xhbXBlZEFycmF5fFwiICAgICAgICAgICAgICAgICAgICArXG4gICAgICAgICAgICBcIkVycm9yfEV2YWxFcnJvcnxJbnRlcm5hbEVycm9yfFJhbmdlRXJyb3J8UmVmZXJlbmNlRXJyb3J8U3RvcEl0ZXJhdGlvbnxcIiAgICsgLy8gRXJyb3JzXG4gICAgICAgICAgICBcIlN5bnRheEVycm9yfFR5cGVFcnJvcnxVUklFcnJvcnxcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiZGVjb2RlVVJJfGRlY29kZVVSSUNvbXBvbmVudHxlbmNvZGVVUkl8ZW5jb2RlVVJJQ29tcG9uZW50fGV2YWx8aXNGaW5pdGV8XCIgKyAvLyBOb24tY29uc3RydWN0b3IgZnVuY3Rpb25zXG4gICAgICAgICAgICBcImlzTmFOfHBhcnNlRmxvYXR8cGFyc2VJbnR8XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiSlNPTnxNYXRofFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBPdGhlclxuICAgICAgICAgICAgXCJ0aGlzfGFyZ3VtZW50c3xwcm90b3R5cGV8d2luZG93fGRvY3VtZW50XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAsIC8vIFBzZXVkb1xuICAgICAgICBcImtleXdvcmRcIjpcbiAgICAgICAgICAgIFwiY29uc3R8eWllbGR8aW1wb3J0fGdldHxzZXR8YXN5bmN8YXdhaXR8XCIgK1xuICAgICAgICAgICAgXCJicmVha3xjYXNlfGNhdGNofGNvbnRpbnVlfGRlZmF1bHR8ZGVsZXRlfGRvfGVsc2V8ZmluYWxseXxmb3J8ZnVuY3Rpb258XCIgK1xuICAgICAgICAgICAgXCJpZnxpbnxvZnxpbnN0YW5jZW9mfG5ld3xyZXR1cm58c3dpdGNofHRocm93fHRyeXx0eXBlb2Z8bGV0fHZhcnx3aGlsZXx3aXRofGRlYnVnZ2VyfFwiICtcbiAgICAgICAgICAgIFwiX19wYXJlbnRfX3xfX2NvdW50X198ZXNjYXBlfHVuZXNjYXBlfHdpdGh8X19wcm90b19ffFwiICtcbiAgICAgICAgICAgIFwiY2xhc3N8ZW51bXxleHRlbmRzfHN1cGVyfGV4cG9ydHxpbXBsZW1lbnRzfHByaXZhdGV8cHVibGljfGludGVyZmFjZXxwYWNrYWdlfHByb3RlY3RlZHxzdGF0aWNcIixcbiAgICAgICAgXCJzdG9yYWdlLnR5cGVcIjpcbiAgICAgICAgICAgIFwiY29uc3R8bGV0fHZhcnxmdW5jdGlvblwiLFxuICAgICAgICBcImNvbnN0YW50Lmxhbmd1YWdlXCI6XG4gICAgICAgICAgICBcIm51bGx8SW5maW5pdHl8TmFOfHVuZGVmaW5lZFwiLFxuICAgICAgICBcInN1cHBvcnQuZnVuY3Rpb25cIjpcbiAgICAgICAgICAgIFwiYWxlcnRcIixcbiAgICAgICAgXCJjb25zdGFudC5sYW5ndWFnZS5ib29sZWFuXCI6IFwidHJ1ZXxmYWxzZVwiXG4gICAgfSwgXCJpZGVudGlmaWVyXCIpO1xuICAgIHZhciBrd0JlZm9yZVJlID0gXCJjYXNlfGRvfGVsc2V8ZmluYWxseXxpbnxpbnN0YW5jZW9mfHJldHVybnx0aHJvd3x0cnl8dHlwZW9mfHlpZWxkfHZvaWRcIjtcblxuICAgIHZhciBlc2NhcGVkUmUgPSBcIlxcXFxcXFxcKD86eFswLTlhLWZBLUZdezJ9fFwiICsgLy8gaGV4XG4gICAgICAgIFwidVswLTlhLWZBLUZdezR9fFwiICsgLy8gdW5pY29kZVxuICAgICAgICBcInV7WzAtOWEtZkEtRl17MSw2fX18XCIgKyAvLyBlczYgdW5pY29kZVxuICAgICAgICBcIlswLTJdWzAtN117MCwyfXxcIiArIC8vIG9jdFxuICAgICAgICBcIjNbMC03XVswLTddP3xcIiArIC8vIG9jdFxuICAgICAgICBcIls0LTddWzAtN10/fFwiICsgLy9vY3RcbiAgICAgICAgXCIuKVwiO1xuXG4gICAgdGhpcy4kcnVsZXMgPSB7XG4gICAgICAgIFwibm9fcmVnZXhcIiA6IFtcbiAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRTdGFydFJ1bGUoXCJkb2Mtc3RhcnRcIiksXG4gICAgICAgICAgICBjb21tZW50cyhcIm5vX3JlZ2V4XCIpLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiJyg/PS4pXCIsXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcIig/PS4pJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwicXFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleGFkZWNpbWFsLCBvY3RhbCBhbmQgYmluYXJ5XG4gICAgICAgICAgICAgICAgcmVnZXggOiAvMCg/Olt4WF1bMC05YS1mQS1GXSt8W29PXVswLTddK3xbYkJdWzAxXSspXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGRlY2ltYWwgaW50ZWdlcnMgYW5kIGZsb2F0c1xuICAgICAgICAgICAgICAgIHJlZ2V4IDogLyg/OlxcZFxcZCooPzpcXC5cXGQqKT98XFwuXFxkKykoPzpbZUVdWystXT9cXGQrXFxiKT8vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcImtleXdvcmQub3BlcmF0b3JcIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikocHJvdG90eXBlKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLCBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArXCIpKFxcXFxzKikoPSkoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInRleHRcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKykoXFxcXHcrKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoZnVuY3Rpb24pKFxcXFxzKykoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0XCIsIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFxzKikoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwidGV4dFwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiZnJvbSg/PVxcXFxzKignfFxcXCIpKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKD86XCIgKyBrd0JlZm9yZVJlICsgXCIpXFxcXGJcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdXBwb3J0LmNvbnN0YW50XCJdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL3RoYXRcXGIvXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdG9yYWdlLnR5cGVcIiwgXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLCBcInN1cHBvcnQuZnVuY3Rpb24uZmlyZWJ1Z1wiXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IC8oY29uc29sZSkoXFwuKSh3YXJufGluZm98bG9nfGVycm9yfHRpbWV8dHJhY2V8dGltZUVuZHxhc3NlcnQpXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDoga2V5d29yZE1hcHBlcixcbiAgICAgICAgICAgICAgICByZWdleCA6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1suXSg/IVsuXSkvLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJwcm9wZXJ0eVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogLz0+L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvLS18XFwrXFwrfFxcLnszfXw9PT18PT18PXwhPXwhPT18PCs9P3w+Kz0/fCF8JiZ8XFx8XFx8fFxcPzp8WyEkJSYqK1xcLX5cXC9eXT0/LyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1s/Oiw7Ll0vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXFsoe10vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXF0pfV0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXiMhLiokL1xuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBwcm9wZXJ0eTogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxccytcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKSg/OihcXFxccyspKFxcXFx3KykpPyhcXFxccyopKFxcXFwoKVwiLF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ICByZWdleCA6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlwiLFxuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwic3RhcnRcIjogW1xuICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFN0YXJ0UnVsZShcImRvYy1zdGFydFwiKSxcbiAgICAgICAgICAgIGNvbW1lbnRzKFwic3RhcnRcIiksXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwvXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrfF4kXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwicmVnZXhcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5rZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXFxcXFxcXFwoPzp1W1xcXFxkYS1mQS1GXXs0fXx4W1xcXFxkYS1mQS1GXXsyfXwuKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIi9bc3huZ2lteV0qXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImludmFsaWRcIixcbiAgICAgICAgICAgICAgICByZWdleDogL1xce1xcZCtcXGIsP1xcZCpcXH1bKypdfFsrKiReP11bKypdfFskXl1bP118XFw/ezMsfS9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IC9cXChcXD9bOj0hXXxcXCl8XFx7XFxkK1xcYiw/XFxkKlxcfXxbKypdXFw/fFsoKSReKyo/Ll0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmRlbGltaXRlclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFx8L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFxbXFxePy8sXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmcucmVnZXhwXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5jaGFyY2xhc3Mua2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFxcXFxcKD86dVtcXFxcZGEtZkEtRl17NH18eFtcXFxcZGEtZkEtRl17Mn18LilcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIl1cIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcInJlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCItXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIiRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nLnJlZ2V4cC5jaGFyYWNodGVyY2xhc3NcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwidmFyaWFibGUucGFyYW1ldGVyXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiWywgXStcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiZW1wdHlcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJxcXN0cmluZ1wiIDogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IGVzY2FwZWRSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXFxcXFwkXCIsXG4gICAgICAgICAgICAgICAgY29uc3VtZUxpbmVFbmQgIDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcInwkJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcInFzdHJpbmdcIiA6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxcXFxcJFwiLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kICA6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIid8JFwiLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XG4gICAgICAgIF1cbiAgICB9O1xuXG5cbiAgICBpZiAoIW9wdGlvbnMgfHwgIW9wdGlvbnMubm9FUzYpIHtcbiAgICAgICAgdGhpcy4kcnVsZXMubm9fcmVnZXgudW5zaGlmdCh7XG4gICAgICAgICAgICByZWdleDogXCJbe31dXCIsIG9uTWF0Y2g6IGZ1bmN0aW9uKHZhbCwgc3RhdGUsIHN0YWNrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gdmFsID09IFwie1wiID8gdGhpcy5uZXh0U3RhdGUgOiBcIlwiO1xuICAgICAgICAgICAgICAgIGlmICh2YWwgPT0gXCJ7XCIgJiYgc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQoXCJzdGFydFwiLCBzdGF0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbCA9PSBcIn1cIiAmJiBzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmV4dC5pbmRleE9mKFwic3RyaW5nXCIpICE9IC0xIHx8IHRoaXMubmV4dC5pbmRleE9mKFwianN4XCIpICE9IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicGFyZW4ucXVhc2kuZW5kXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWwgPT0gXCJ7XCIgPyBcInBhcmVuLmxwYXJlblwiIDogXCJwYXJlbi5ycGFyZW5cIjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBuZXh0U3RhdGU6IFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnF1YXNpLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6IC9gLyxcbiAgICAgICAgICAgIHB1c2ggIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ucXVhc2kuc3RhcnRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9cXCR7LyxcbiAgICAgICAgICAgICAgICBwdXNoICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcucXVhc2kuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvYC8sXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZy5xdWFzaVwiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoIW9wdGlvbnMgfHwgb3B0aW9ucy5qc3ggIT0gZmFsc2UpXG4gIC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gICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW3tcbiAgICAgICAgICAgICAgICB0eXBlOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLlwiICsgKG9mZnNldCA9PSAxID8gXCJcIiA6IFwiZW5kLVwiKSArIFwidGFnLW9wZW4ueG1sXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbC5zbGljZSgwLCBvZmZzZXQpXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJtZXRhLnRhZy50YWctbmFtZS54bWxcIixcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLnN1YnN0cihvZmZzZXQpXG4gICAgICAgICAgICB9XTtcbiAgICAgICAgfSxcbiAgICAgICAgcmVnZXggOiBcIjwvP1wiICsgdGFnUmVnZXggKyBcIlwiLFxuICAgICAgICBuZXh0OiBcImpzeEF0dHJpYnV0ZXNcIixcbiAgICAgICAgbmV4dFN0YXRlOiBcImpzeFwiXG4gICAgfTtcbiAgICB0aGlzLiRydWxlcy5zdGFydC51bnNoaWZ0KGpzeFRhZyk7XG4gICAgdmFyIGpzeEpzUnVsZSA9IHtcbiAgICAgICAgcmVnZXg6IFwie1wiLFxuICAgICAgICB0b2tlbjogXCJwYXJlbi5xdWFzaS5zdGFydFwiLFxuICAgICAgICBwdXNoOiBcInN0YXJ0XCJcbiAgICB9O1xuICAgIHRoaXMuJHJ1bGVzLmpzeCA9IFtcbiAgICAgICAganN4SnNSdWxlLFxuICAgICAgICBqc3hUYWcsXG4gICAgICAgIHtpbmNsdWRlIDogXCJyZWZlcmVuY2VcIn0sXG4gICAgICAgIHtkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJ9XG4gICAgXTtcbiAgICB0aGlzLiRydWxlcy5qc3hBdHRyaWJ1dGVzID0gW3tcbiAgICAgICAgdG9rZW4gOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLnRhZy1jbG9zZS54bWxcIixcbiAgICAgICAgcmVnZXggOiBcIi8/PlwiLFxuICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsdWUsIGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50U3RhdGUgPT0gc3RhY2tbMF0pXG4gICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGFja1swXSA9PSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbMV0tLTtcbiAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5zcGxpY2UoMCwgMik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2tbMF0gfHwgXCJzdGFydFwiO1xuICAgICAgICAgICAgcmV0dXJuIFt7dHlwZTogdGhpcy50b2tlbiwgdmFsdWU6IHZhbHVlfV07XG4gICAgICAgIH0sXG4gICAgICAgIG5leHRTdGF0ZTogXCJqc3hcIlxuICAgIH0sXG4gICAganN4SnNSdWxlLFxuICAgIGNvbW1lbnRzKFwianN4QXR0cmlidXRlc1wiKSxcbiAgICB7XG4gICAgICAgIHRva2VuIDogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogdGFnUmVnZXhcbiAgICB9LCB7XG4gICAgICAgIHRva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AgICBqc3hUYWdcbiAgICBdO1xuICAgIHRoaXMuJHJ1bGVzLnJlZmVyZW5jZSA9IFt7XG4gICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGUucmVmZXJlbmNlLnhtbFwiLFxuICAgICAgICByZWdleCA6IFwiKD86JiNbMC05XSs7KXwoPzomI3hbMC05YS1mQS1GXSs7KXwoPzomW2EtekEtWjAtOV86XFxcXC4tXSs7KVwiXG4gICAgfV07XG59XG5cbmZ1bmN0aW9uIGNvbW1lbnRzKG5leHQpIHtcbiAgICByZXR1cm4gW1xuICAgICAgICB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLCAvLyBtdWx0aSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgIHJlZ2V4IDogL1xcL1xcKi8sXG4gICAgICAgICAgICBuZXh0OiBbXG4gICAgICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFRhZ1J1bGUoKSxcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcImNvbW1lbnRcIiwgcmVnZXggOiBcIlxcXFwqXFxcXC9cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXC9cXFxcL1wiLFxuICAgICAgICAgICAgbmV4dDogW1xuICAgICAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRUYWdSdWxlKCksXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJjb21tZW50XCIsIHJlZ2V4IDogXCIkfF5cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICA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IgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0YXJ0TWFya2VyKTtcbiAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICB2YXIgaSA9IG1hdGNoLmluZGV4O1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMub3BlbmluZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByYW5nZSA9IHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGkgKyBtYXRjaFswXS5sZW5ndGgsIDEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocmFuZ2UgJiYgIXJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLmdldFNlY3Rpb25SYW5nZShzZXNzaW9uLCByb3cpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZFN0eWxlICE9IFwiYWxsXCIpXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvbGRTdHlsZSA9PT0gXCJtYXJrYmVnaW5cIilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0b3BNYXJrZXIpO1xuICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBpID0gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9zaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuXG4gICAgICAgICAgICByZXR1cm4gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSwgLTEpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldFNlY3Rpb25SYW5nZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdykge1xuICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICB2YXIgc3RhcnRJbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5sZW5ndGg7XG4gICAgICAgIHJvdyA9IHJvdyArIDE7XG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBpbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgICAgICBpZiAoaW5kZW50ID09PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICAoc3RhcnRJbmRlbnQgPiBpbmRlbnQpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB2YXIgc3ViUmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShzZXNzaW9uLCBcImFsbFwiLCByb3cpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc3ViUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3ViUmFuZ2Uuc3RhcnQucm93IDw9IHN0YXJ0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3ViUmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBzdWJSYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRJbmRlbnQgPT0gaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgc2Vzc2lvbi5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0Q29tbWVudFJlZ2lvbkJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgbGluZSwgcm93KSB7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUuc2VhcmNoKC9cXHMqJC8pO1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlID0gL15cXHMqKD86XFwvXFwqfFxcL1xcL3wtLSkjPyhlbmQpP3JlZ2lvblxcYi87XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIG0gPSByZS5leGVjKGxpbmUpO1xuICAgICAgICAgICAga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biAgICAgICAgdmFyIGluZGVudCA9IHRoaXMuJGdldEluZGVudChsaW5lKTtcblxuICAgICAgICB2YXIgdG9rZW5pemVkTGluZSA9IHRoaXMuZ2V0VG9rZW5pemVyKCkuZ2V0TGluZVRva2VucyhsaW5lLCBzdGF0ZSk7XG4gICAgICAgIHZhciB0b2tlbnMgPSB0b2tlbml6ZWRMaW5lLnRva2VucztcbiAgICAgICAgdmFyIGVuZFN0YXRlID0gdG9rZW5pemVkTGluZS5zdGF0ZTtcblxuICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCAmJiB0b2tlbnNbdG9rZW5zLmxlbmd0aC0xXS50eXBlID09IFwiY29tbWVudFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gaW5kZW50O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHN0YXRlID09IFwic3RhcnRcIiB8fCBzdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL14uKig/OlxcYmNhc2VcXGIuKjp8W1xce1xcKFxcW10pXFxzKiQvKTtcbiAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgIGluZGVudCArPSB0YWI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdGUgPT0gXCJkb2Mtc3RhcnRcIikge1xuICAgICAgICAgICAgaWYgKGVuZFN0YXRlID09IFwic3RhcnRcIiB8fCBlbmRTdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL15cXHMqKFxcLz8pXFwqLyk7XG4gICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgaW5kZW50ICs9IFwi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AgICAgICBpbmNsdWRlIDogW1wic3RyaW5nc1wiLCBcInVybFwiLCBcImNvbW1lbnRzXCJdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXHtcIixcbiAgICAgICAgICAgIG5leHQ6ICBcInJ1bGVzZXRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFx9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nXCIsXG4gICAgICAgICAgICByZWdleDogXCJAXCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJtZWRpYVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIiNbYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIiVcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJ2YXJpYWJsZVwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXC5bYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgcmVnZXg6IFwiOlthLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIixcbiAgICAgICAgICAgIHJlZ2V4IDogbnVtUmVcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwiY29uc3RhbnRcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlthLXowLTktX10rXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgY2FzZUluc2Vuc2l0aXZlOiB0cnVlXG4gICAgICAgIH1dLFxuXG4gICAgICAgIFwibWVkaWFcIjogW3tcbiAgICAgICAgICAgIGluY2x1ZGUgOiBbXCJzdHJpbmdzXCIsIFwidXJsXCIsIFwiY29tbWVudHNcIl1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicGFyZW4ubHBhcmVuXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxce1wiLFxuICAgICAgICAgICAgbmV4dDogIFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFx9XCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgcmVnZXg6IFwiO1wiLFxuICAgICAgICAgICAgbmV4dDogIFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICByZWdleDogXCIoPzptZWRpYXxzdXBwb3J0c3xkb2N1bWVudHxjaGFyc2V0fGltcG9ydHxuYW1lc3BhY2V8bWVkaWF8c3VwcG9ydHN8ZG9jdW1lbnRcIlxuICAgICAgICAgICAgICAgICsgXCJ8cGFnZXxmb250fGtleWZyYW1lc3x2aWV3cG9ydHxjb3VudGVyLXN0eWxlfGZvbnQtZmVhdHVyZS12YWx1ZXNcIlxuICAgICAgICAgICAgICAgICsgXCJ8c3dhc2h8b3JuYW1lbnRzfGFubm90YXRpb258c3R5bGlzdGljfHN0eWxlc2V0fGNoYXJhY3Rlci12YXJpYW50KVwiXG4gICAgICAgIH1dLFxuXG4gICAgICAgIFwiY29tbWVudHNcIiA6IFt7XG4gICAgICAgICAgICB0b2tlbjogXCJjb21tZW50XCIsIC8vIG11bHRpIGxpbmUgY29tbWVudFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXC9cXFxcKlwiLFxuICAgICAgICAgICAgcHVzaDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcKlxcXFwvXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW4gOiBcImNvbW1lbnRcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfV0sXG5cbiAgICAgICAgXCJydWxlc2V0XCIgOiBbe1xuICAgICAgICAgICAgcmVnZXggOiBcIi0od2Via2l0fG1zfG1venxvKS1cIixcbiAgICAgICAgICAgIHRva2VuIDogXCJ0ZXh0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFx9XCIsXG4gICAgICAgICAgICBuZXh0IDogXCJzdGFydFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGUgOiBbXCJzdHJpbmdzXCIsIFwidXJsXCIsIFwiY29tbWVudHNcIl1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJjb25zdGFudC5udW1lcmljXCIsIFwia2V5d29yZFwiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBudW1SZSArIFwiKShjaHxjbXxkZWd8ZW18ZXh8ZnJ8Z2R8Z3JhZHxIenxpbnxrSHp8bW18bXN8cGN8cHR8cHh8cmFkfHJlbXxzfHR1cm58dmh8dm18dnd8JSlcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLFxuICAgICAgICAgICAgcmVnZXggOiBudW1SZVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAgLy8gaGV4NiBjb2xvclxuICAgICAgICAgICAgcmVnZXggOiBcIiNbYS1mMC05XXs2fVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleDMgY29sb3JcbiAgICAgICAgICAgIHJlZ2V4IDogXCIjW2EtZjAtOV17M31cIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFtcInB1bmN0dWF0aW9uXCIsIFwiZW50aXR5Lm90aGVyLmF0dHJpYnV0ZS1uYW1lLnBzZXVkby1lbGVtZW50LmNzc1wiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogcHNldWRvRWxlbWVudHNcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJwdW5jdHVhdGlvblwiLCBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS5wc2V1ZG8tY2xhc3MuY3NzXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBwc2V1ZG9DbGFzc2VzXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwidXJsXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBrZXl3b3JkTWFwcGVyLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwtP1thLXpBLVpfXVthLXpBLVowLTlfXFxcXC1dKlwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGNhc2VJbnNlbnNpdGl2ZTogdHJ1ZVxuICAgICAgICB9XSxcblxuICAgICAgICB1cmw6IFt7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3VwcG9ydC5mdW5jdGlvblwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIig/OnVybCg6Py1wcmVmaXgpP3xkb21haW58cmVnZXhwKVxcXFwoXCIsXG4gICAgICAgICAgICBwdXNoOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwpXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH1dLFxuXG4gICAgICAgIHN0cmluZ3M6IFt7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6IFwiJ1wiLFxuICAgICAgICAgICAgcHVzaCA6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5lbmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiJ3wkXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGluY2x1ZGUgOiBcImVzY2FwZXNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9cXFxcJC8sXG4gICAgICAgICAgICAgICAgY29uc3VtZUxpbmVFbmQ6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuc3RhcnRcIixcbiAgICAgICAgICAgIHJlZ2V4IDogJ1wiJyxcbiAgICAgICAgICAgIHB1c2ggOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAnXCJ8JCcsXG4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5cGVvZiBzdHlsZVtpXSAhPT0gJ3N0cmluZycpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBpLnJlcGxhY2UoL1tBLVpdL2csIGZ1bmN0aW9uKHgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICctJyArIHgudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmICghcHJvcGVydHlNYXAuaGFzT3duUHJvcGVydHkobmFtZSkpXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5TWFwW25hbWVdID0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuY29tcGxldGlvbnNEZWZpbmVkID0gdHJ1ZTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRDb21wbGV0aW9ucyA9IGZ1bmN0aW9uKHN0YXRlLCBzZXNzaW9uLCBwb3MsIHByZWZpeCkge1xuICAgICAgICBpZiAoIXRoaXMuY29tcGxldGlvbnNEZWZpbmVkKSB7XG4gICAgICAgICAgICB0aGlzLmRlZmluZUNvbXBsZXRpb25zKCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdG9rZW4gPSBzZXNzaW9uLmdldFRva2VuQXQocG9zLnJvdywgcG9zLmNvbHVtbik7XG5cbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgaWYgKHN0YXRlPT09J3J1bGVzZXQnKXtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHBvcy5yb3cpLnN1YnN0cigwLCBwb3MuY29sdW1uKTtcbiAgICAgICAgICAgIGlmICgvOlteO10rJC8udGVzdChsaW5lKSkge1xuICAgICAgICAgICAgICAgIC8oW1xcd1xcLV0rKTpbXjpdKiQvLnRlc3QobGluZSk7XG5cbiAgICAgICAgICAgIC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yLnJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIHJpZ2h0Q2hhciA9IGxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4sIGN1cnNvci5jb2x1bW4gKyAxKTtcbiAgICAgICAgICAgICAgICBpZiAocmlnaHRDaGFyID09PSAnOicpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJycsXG4gICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbikubWF0Y2goL15cXHMqOy8pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICc6OycsXG4gICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcImNvbG9uXCIsIFwiZGVsZXRpb25cIiwgZnVuY3Rpb24gKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgcmFuZ2UpIHtcbiAgICAgICAgdmFyIHNlbGVjdGVkID0gc2Vzc2lvbi5kb2MuZ2V0VGV4dFJhbmdlKHJhbmdlKTtcbiAgICAgICAgaWYgKCFyYW5nZS5pc011bHRpTGluZSgpICYmIHNlbGVjdGVkID09PSAnOicpIHtcbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHNlc3Npb24sIGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgICAgICBpZiAodG9rZW4gJiYgdG9rZW4udmFsdWUubWF0Y2goL1xccysvKSkge1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodG9rZW4gJiYgdG9rZW4udHlwZSA9PT0gJ3N1cHBvcnQudHlwZScpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZG9jLmdldExpbmUocmFuZ2Uuc3RhcnQucm93KTtcbiAgICAgICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcocmFuZ2UuZW5kLmNvbHVtbiwgcmFuZ2UuZW5kLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT09ICc7Jykge1xuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uICsrO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcInNlbWljb2xvblwiLCBcImluc2VydGlvblwiLCBmdW5jdGlvbiAoc3RhdGUsIGFjdGlvbiwgZWRpdG9yLCBzZXNzaW9uLCB0ZXh0KSB7XG4gICAgICAgIGlmICh0ZXh0ID09PSAnOycpIHtcbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhj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ByZWdleDogXCI8L1wifSxcbiAgICAgICAgICAgIHt0b2tlbiA6IFwidGV4dC50YWctb3Blbi54bWxcIiwgcmVnZXg6IFwiPFwifSxcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJyZWZlcmVuY2VcIn0sXG4gICAgICAgICAgICB7ZGVmYXVsdFRva2VuIDogXCJ0ZXh0LnhtbFwifVxuICAgICAgICBdLFxuXG4gICAgICAgIHByb2Nlc3NpbmdfaW5zdHJ1Y3Rpb24gOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS5kZWNsLWF0dHJpYnV0ZS1uYW1lLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiB0YWdSZWdleFxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwia2V5d29yZC5vcGVyYXRvci5kZWNsLWF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiPVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwid2hpdGVzcGFjZVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwic3RyaW5nXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcInB1bmN0dWF0aW9uLnhtbC1kZWNsLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFw/PlwiLFxuICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICB9XSxcblxuICAgICAgICBkb2N0eXBlIDogW1xuICAgICAgICAgICAge2luY2x1ZGUgOiBcIndoaXRlc3BhY2VcIn0sXG4gICAgICAgICAgICB7aW5jbHVkZSA6IFwic3RyaW5nXCJ9LFxuICAgICAgICAgICAge3Rva2VuIDogXCJ4bWwtcGUuZG9jdHlwZS54bWxcIiwgcmVnZXggOiBcIj5cIiwgbmV4dCA6IFwic3RhcnRcIn0sXG4gICAgICAgICAgICB7dG9rZW4gOiBcInhtbC1wZS54bWxcIiwgcmVnZXggOiBcIlstX2EtekEtWjAtOTpdK1wifSxcbiAgICAgICAgICAgIHt0b2tlbiA6IFwicHVuY3R1YXRpb24uaW50LXN1YnNldFwiLCByZWdleCA6IFwiXFxcXFtcIiwgcHVzaCA6IFwiaW50X3N1YnNldFwifVxuICAgICAgICBdLFxuXG4gICAgICAgIGludF9zdWJzZXQgOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInRleHQueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicHVuY3R1YXRpb24uaW50LXN1YnNldC54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIl1cIixcbiAgICAgICAgICAgIG5leHQ6IFwicG9wXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJwdW5jdHVhdGlvbi5tYXJrdXAtZGVjbC54bWxcIiwgXCJrZXl3b3JkLm1hcmt1cC1kZWNsLnhtbFwiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPFxcXFwhKShcIiArIHRhZ1JlZ2V4ICsgXCIpXCIsXG4gICAgICAgICAgICBwdXNoIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxccytcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicHVuY3R1YXRpb24ubWFya3VwLWRlY2wueG1sXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIj5cIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJzdHJpbmdcIn1dXG4gICAgICAgIH1dLFxuXG4gICAgICAgIGNkY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gICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6ICdcIicsXG4gICAgICAgICAgICBwdXNoIDogW1xuICAgICAgICAgICAgICAgIHt0b2tlbiA6IFwic3RyaW5nLnhtbFwiLCByZWdleDogJ1wiJywgbmV4dDogXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwic3RyaW5nLnhtbFwifVxuICAgICAgICAgICAgXVxuICAgICAgICB9XSxcblxuICAgICAgICBhdHRyaWJ1dGVzOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogdGFnUmVnZXhcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmQub3BlcmF0b3IuYXR0cmlidXRlLWVxdWFscy54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCI9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZTogXCJ0YWdfd2hpdGVzcGFjZVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwiYXR0cmlidXRlX3ZhbHVlXCJcbiAgICAgICAgfV0sXG5cbiAgICAgICAgYXR0cmlidXRlX3ZhbHVlOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5hdHRyaWJ1dGUtdmFsdWUueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiJ1wiLFxuICAgICAgICAgICAgcHVzaCA6IFtcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcInN0cmluZy5hdHRyaWJ1dGUtdmFsdWUueG1sXCIsIHJlZ2V4OiBcIidcIiwgbmV4dDogXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2luY2x1ZGUgOiBcImF0dHJfcmVm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gICAgICAgICAgICAgIHtpbmNsdWRlIDogXCJhdHRyaWJ1dGVzXCJ9LFxuICAgICAgICAgICAgICAgIHt0b2tlbiA6IFwibWV0YS50YWcucHVuY3R1YXRpb24udGFnLWNsb3NlLnhtbFwiLCByZWdleCA6IFwiLz8+XCIsIG5leHQgOiBwcmVmaXggKyBcInN0YXJ0XCJ9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRoaXMuJHJ1bGVzW3RhZyArIFwiLWVuZFwiXSA9IFtcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJhdHRyaWJ1dGVzXCJ9LFxuICAgICAgICAgICAge3Rva2VuIDogXCJtZXRhLnRhZy5wdW5jdHVhdGlvbi50YWctY2xvc2UueG1sXCIsIHJlZ2V4IDogXCIvPz5cIiwgIG5leHQ6IFwic3RhcnRcIixcbiAgICAgICAgICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsdWUsIGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc3BsaWNlKDApO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy50b2tlbjtcbiAgICAgICAgICAgIH19XG4gICAgICAgIF07XG5cbiAgICAgICAgdGhpcy5lbWJlZFJ1bGVzKEhpZ2hsaWdodFJ1bGVzLCBwcmVmaXgsIFt7XG4gICAgICAgICAgICB0b2tlbjogW1wibWV0YS50YWcucHVuY3R1YXRpb24uZW5kLXRhZy1vcGVuLnhtbFwiLCBcIm1ldGEudGFnLlwiICsgdGFnICsgXCIudGFnLW5hbWUueG1sXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBcIig8LykoXCIgKyB0YWcgKyBcIig/PVxcXFxzfD58JCkpXCIsXG4gICAgICAgICAgICBuZXh0OiB0YWcgKyBcIi1lbmRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmcuY2RhdGEueG1sXCIsXG4gICAg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ogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiWy1fYS16QS1aMC05Oi5dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yLmF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiPVwiLFxuICAgICAgICAgICAgcHVzaCA6IFt7XG4gICAgICAgICAgICAgICAgaW5jbHVkZTogXCJ0YWdfd2hpdGVzcGFjZVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy51bnF1b3RlZC5hdHRyaWJ1dGUtdmFsdWUuaHRtbFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbXjw+PSdcXFwiYFxcXFxzXStcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJwb3BcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfSwge1xuICAgICAgICAgICAgaW5jbHVkZSA6IFwiYXR0cmlidXRlX3ZhbHVlXCJcbiAgICAgICAgfV0sXG4gICAgICAgIHRhZzogW3tcbiAgICAgICAgICAgIHRva2VuIDogZnVuY3Rpb24oc3RhcnQsIHRhZykge1xuICAgICAgICAgICAgICAgIHZhciBncm91cCA9IHRhZ01hcFt0YWddO1xuICAgICAgICAgICAgICAgIHJldHVybiBbXCJtZXRhLnRhZy5wdW5jdHVhdGlvbi5cIiArIChzdGFydCA9PSBcIjxcIiA/IFwiXCIgOiBcImVuZC1cIikgKyBcInRhZy1vcGVuLnhtbFwiLFxuICAgICAgICAgICAgICAgICAgICBcIm1ldGEudGFnXCIg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kge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IHF1b3RlICsgc2VsZWN0ZWQgKyBxdW90ZSxcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBmYWxzZVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCBjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKTtcbiAgICAgICAgICAgIHZhciB0b2tlbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbigpO1xuXG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09IHF1b3RlICYmIChpcyh0b2tlbiwgXCJhdHRyaWJ1dGUtdmFsdWVcIikgfHwgaXModG9rZW4sIFwic3RyaW5nXCIpKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IFwiXCIsXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuXG4gICAgICAgICAgICBpZiAoIXRva2VuKVxuICAgICAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICAgICAgd2h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gKGlzKHRva2VuLCBcInJlZmVyZW5jZS5hdHRyaWJ1dGUtdmFsdWVcIikpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgaWYgKGlzKHRva2VuLCBcImF0dHJpYnV0ZS12YWx1ZVwiKSkge1xuICAgICAgICAgICAgICAgIHZhciBmaXJzdENoYXIgPSB0b2tlbi52YWx1ZS5jaGFyQXQoMCk7XG4gICAgICAgICAgICAgICAgaWYgKGZpcnN0Q2hhciA9PSAnXCInIHx8IGZpcnN0Q2hhciA9PSBcIidcIikge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGFzdENoYXIgPSB0b2tlbi52YWx1ZS5jaGFyQXQodG9rZW4udmFsdWUubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0b2tlbkVuZCA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW5FbmQgPiBwb3NpdGlvbi5jb2x1bW4gfHwgdG9rZW5FbmQgPT0gcG9zaXRpb24uY29sdW1uICYmIGZpcnN0Q2hhciAhPSBsYXN0Q2hhcilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB3aGlsZSAoIWlzKHRva2VuLCBcInRhZy1uYW1lXCIpKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT0gXCI8XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhci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ci5yb3cpO1xuICAgICAgICAgICAgdmFyIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3Ioc2Vzc2lvbiwgY3Vyc29yLnJvdywgY3Vyc29yLmNvbHVtbik7XG4gICAgICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcblxuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZihcInRhZy1jbG9zZVwiKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT0gXCIvPlwiKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgd2hpbGUgKHRva2VuICYmIHRva2VuLnR5cGUuaW5kZXhPZihcInRhZy1uYW1lXCIpID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghdG9rZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHZhciB0YWcgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgICAgICB2YXIgcm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICBpZiAoIXRva2VuIHx8IHRva2VuLnR5cGUuaW5kZXhPZihcImVuZC10YWdcIikgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAodGhpcy52b2lkRWxlbWVudHMgJiYgIXRoaXMudm9pZEVsZW1lbnRzW3RhZ10pIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5leHRUb2tlbiA9IHNlc3Npb24uZ2V0VG9rZW5BdChjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKzEpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbmV4dEluZGVudCA9IHRoaXMuJGdldEluZGVudChsaW5lKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGluZGVudCA9IG5leHRJbmRlbnQgKyBzZXNzaW9uLmdldFRhYlN0cmluZygpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0VG9rZW4gJiYgbmV4dFRva2VuLnZhbHVlID09PSBcIjwvXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogXCJcXG5cIiArIGluZGVudCArIFwiXFxuXCIgKyBuZXh0SW5kZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIGluZGVudC5sZW5ndGgsIDEsIGluZGVudC5sZW5ndGhdXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiBcIlxcblwiICsgaW5kZW50XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbn07XG5cbm9vcC5pbmhlcml0cyhYbWxCZWhhdmlvdXIsIEJlaGF2aW91cik7XG5cbmV4cG9ydHMuWG1sQmVoYXZpb3VyID0gWG1sQmVoYXZpb3VyO1xufSk7XG5cbmFjZS5kZWZpbmUoXCJhY2UvbW9kZS9mb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dGFnLmNsb3NpbmcgPSBpcyh0b2tlbiwgXCJlbmQtdGFnLW9wZW5cIik7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbKytpXTtcbiAgICAgICAgICAgICAgICBpZiAoIXRva2VuKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB0YWcudGFnTmFtZSA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgICAgIHRhZy5lbmQuY29sdW1uICs9IHRva2VuLnZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBmb3IgKGkrKzsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHRva2Vuc1tpXTtcbiAgICAgICAgICAgICAgICAgICAgdGFnLmVuZC5jb2x1bW4gKz0gdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaXModG9rZW4sIFwidGFnLWNsb3NlXCIpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuc2VsZkNsb3NpbmcgPSB0b2tlbi52YWx1ZSA9PSAnLz4nO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhZztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXModG9rZW4sIFwidGFnLWNsb3NlXCIpKSB7XG4gICAgICAgICAgICAgICAgdGFnLnNlbGZDbG9zaW5nID0gdG9rZW4udmFsdWUgPT0gJy8+JztcbiAgICAgICAgICAgICAgICByZXR1cm4gdGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGFnLnN0YXJ0LmNvbHVtbiArPSB0b2tlbi52YWx1ZS5sZW5ndGg7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gbnVsbDtcbiAgICB9O1xuXG4gICAgdGhpcy5fZmluZEVuZFRhZ0luTGluZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdywgdGFnTmFtZSwgc3RhcnRDb2x1bW4pIHtcbiAgICAgICAgdmFyIHRva2VucyA9IHNlc3Npb24uZ2V0VG9rZW5zKHJvdyk7XG4gICAgICAgIHZhciBjb2x1bW4gPSAwO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIHRva2VuID0gdG9rZW5zW2ldO1xuICAgICAgICAgICAgY29sdW1uICs9IHRva2VuLnZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgIGlmIChjb2x1bW4gPCBzdGFydENvbHVtbilcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChpcyh0b2tlbiwgXCJlbmQtdGFnLW9wZW5cIikpIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IHRva2Vuc1tpICsgMV07XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnZhbHVlID09IHRhZ05hbWUpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xuICAgIHRoaXMuX3JlYWRUYWdGb3J3YXJkID0gZnVuY3Rpb24oaXRlcmF0b3IpIHtcbiAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICB2YXIgdGFnID0gbmV3IFRhZygpO1xuICAgICAgICBkbyB7XG4gICAgICAgICAgICBpZiAoaXModG9rZW4sIFwidGFnLW9wZW5cIikpIHtcbiAgICAgICAgICAgICAgICB0YWcuY2xvc2luZyA9IGlzKHRva2VuLCBcImVuZC10YWctb3BlblwiKTtcbiAgICAgICAgICAgICAgICB0YWcuc3RhcnQucm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICAgICAgdGFnLnN0YXJ0LmNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpcyh0b2tlbiwgXCJ0YWctbmFtZVwiKSkge1xuICAgICAgICAgICAgICAgIHRhZy50YWdOYW1lID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzKHRva2VuLCBcInRhZy1jbG9zZVwiKSkge1xuICAgICAgICAgICAgICAgIHRhZy5zZWxmQ2xvc2luZyA9IHRva2VuLnZhbHVlID09IFwiLz5cIjtcbiAgICAgICAgICAgICAgICB0YWcuZW5kLnJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgICAgIHRhZy5lbmQuY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyB0b2tlbi52YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlKHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKSk7XG5cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLl9yZWFkVGFnQmFja3dhcmQgPSBmdW5jdGlvbihpdGVyYXRvcikge1xuICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuXG4gICAgICAgIHZhciB0YWcgPSBuZXcgVGFnKCk7XG4gICAgICAgIGRvIHtcbiAgICAgICAgICAgIGlmIChpcyh0b2tlbiwgXCJ0YWctb3BlblwiKSkge1xuICAgICAgICAgICAgICAgIHRhZy5jbG9zaW5nID0gaXModG9rZW4sIFwiZW5kLXRhZy1vcGVuXCIpO1xuICAgICAgICAgICAgICAgIHRhZy5zdGFydC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgICAgICB0YWcuc3RhcnQuY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCk7XG4gICAgICAgICAgICAgICAgaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhZztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXModG9rZW4sIFwidGFnLW5hbWVcIikpIHtcbiAgICAgICAgICAgICAgICB0YWcudGFnTmFtZSA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpcyh0b2tlbiwgXCJ0YWctY2xvc2VcIikpIHtcbiAgICAgICAgICAgICAgICB0YWcuc2VsZkNsb3NpbmcgPSB0b2tlbi52YWx1ZSA9PSBcIi8+XCI7XG4gICAgICAgICAgICAgICAgdGFnLmVuZC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlKHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCkpO1xuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG4gICAgXG4gICAgdGhpcy5fcG9wID0gZnVuY3Rpb24oc3RhY2ssIHRhZykge1xuICAgICAgICB3aGlsZSAoc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciB0b3AgPSBzdGFja1tzdGFjay5sZW5ndGgtMV07XG4gICAgICAgICAgICBpZiAoIXRhZyB8fCB0b3AudGFnTmFtZSA9PSB0YWcudGFnTmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBzdGFjay5wb3AoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHRoaXMub3B0aW9uYWxFbmRUYWdzLmhhc093blByb3BlcnR5KHRvcC50YWdOYW1lKSkge1xuICAgICAgICAgICAgICAgIHN0YWNrLnBvcCgpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uLCBmb2xkU3R5bGUsIHJvdykge1xuICAgICAgICB2YXIgZmlyc3RUYWcgPSB0aGlzLl9nZXRGaXJzdFRhZ0luTGluZShzZXNzaW9uLCByb3cpO1xuICAgICAgICBcbiAgICAgICAgaWYgKCFmaXJzdFRhZykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0Q29tbWVudEZvbGRXaWRnZXQoc2Vzc2lvbiwgcm93KVxuICAgICAgICAgICAgICAgICYmIHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIHNlc3Npb24uZ2V0TGluZShyb3cpLmxlbmd0aCk7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHZhciBpc0JhY2t3YXJkID0gZmlyc3RUYWcuY2xvc2luZyB8fCBmaXJzdFRhZy5zZWxmQ2xvc2luZztcbiAgICAgICAgdmFyIHN0YWNrID0gW107XG4gICAgICAgIHZhciB0YWc7XG4gICAgICAgIFxuICAgICAgICBpZiAoIWlzQmFja3dhcmQpIHtcbiAgICAgICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHNlc3Npb24sIHJvdywgZmlyc3RUYWcuc3RhcnQuY29sdW1uKTtcbiAgICAgICAgICAgIHZhciBzdGFydCA9IHtcbiAgICAgICAgICAgICAgICByb3c6IHJvdyxcbiAgICAgICAgICAgICAgICBjb2x1bW46IGZpcnN0VGFnLnN0YXJ0LmNvbHVtbiArIGZpcnN0VGFnLnRhZ05hbWUubGVuZ3RoICsgMlxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChmaXJzdFRhZy5zdGFydC5yb3cgPT0gZmlyc3RUYWcuZW5kLnJvdylcbiAgICAgICAgICAgICAgICBzdGFydC5jb2x1bW4gPSBmaXJzdFRhZy5lbmQuY29sdW1uO1xuICAgICAgICAgICAgd2hpbGUgKHRhZyA9IHRoaXMuX3JlYWRUYWdGb3J3YXJkKGl0ZXJhdG9yKSkge1xuICAgICAgICAgICAgICAgIGlmICh0YWcuc2VsZkNsb3NpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5zdGFydC5jb2x1bW4gKz0gdGFnLnRhZ05hbWUubGVuZ3RoICsgMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5lbmQuY29sdW1uIC09IDI7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyh0YWcuc3RhcnQsIHRhZy5lbmQpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAodGFnLmNsb3NpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcG9wKHN0YWNrLCB0YWcpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhY2subGVuZ3RoID09IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmFuZ2UuZnJvbVBvaW50cyhzdGFydCwgdGFnLnN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnB1c2godGFnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCByb3csIGZpcnN0VGFnLmVuZC5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIGVuZCA9IHtcbiAgICAgICAgICAgICAgICByb3c6IHJvdyxcbiAgICAgICAgICAgICAgICBjb2x1bW46IGZpcnN0VGFnLnN0YXJ0LmNvbHVtblxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgd2hpbGUgKHRhZyA9IHRoaXMuX3JlYWRUYWdCYWNrd2FyZChpdGVyYXRvcikpIHtcbiAgICAgICAgICAgICAgICBpZiAodGFnLnNlbGZDbG9zaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuc3RhcnQuY29sdW1uICs9IHRhZy50YWdOYW1lLmxlbmd0aCArIDI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiAtPSAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHModGFnLnN0YXJ0LCB0YWcuZW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKCF0YWcuY2xvc2luZykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9wb3Aoc3RhY2ssIHRhZyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGFjay5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFnLnN0YXJ0LmNvbHVtbiArPSB0YWcudGFnTmFtZS5sZW5ndGggKyAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRhZy5zdGFydC5yb3cgPT0gdGFnLmVuZC5yb3cgJiYgdGFnLnN0YXJ0LmNvbHVtbiA8IHRhZy5lbmQuY29sdW1uKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5zdGFydC5jb2x1bW4gPSB0YWcuZW5kLmNvbHVtbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHRhZy5zdGFydCwgZW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sucHVzaCh0YWcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBcbiAgICB9O1xuXG59KS5jYWxsKEZvbGRNb2RlLnByb3RvdHlwZSk7XG5cbn0pO1xuXG5hY2UuZGVmaW5lKFwiYWNlL21vZGUvZm9sZGluZy9odG1sXCIsW1wicmVxdWlyZVwiLFwiZXhwb3J0c1wiLFwibW9kdWxlXCIsXCJhY2UvbGliL29vcFwiLFwiYWNlL21vZGUvZm9sZGluZy9taXhlZFwiLFwiYWNlL21vZGUvZm9sZGluZy94bWxcIixcImFjZS9tb2RlL2ZvbGRpbmcvY3N0eWxlXCJdLCBmdW5jdGlvbihhY2VxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7XG5cInVzZSBzdHJp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ICAgcmV0dXJuIFtdO1xuICAgIH07XG5cbiAgICB0aGlzLmdldFRhZ0NvbXBsZXRpb25zID0gZnVuY3Rpb24oc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KSB7XG4gICAgICAgIHJldHVybiBlbGVtZW50cy5tYXAoZnVuY3Rpb24oZWxlbWVudCl7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHZhbHVlOiBlbGVtZW50LFxuICAgICAgICAgICAgICAgIG1ldGE6IFwidGFnXCIsXG4gICAgICAgICAgICAgICAgc2NvcmU6IE51bWJlci5NQVhfVkFMVUVcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0pO1xuICAgIH07XG5cbiAgICB0aGlzLmdldEF0dHJpYnV0ZUNvbXBsZXRpb25zID0gZnVuY3Rpb24oc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KSB7XG4gICAgICAgIHZhciB0YWdOYW1lID0gZmluZFRhZ05hbWUoc2Vzc2lvbiwgcG9zKTtcbiAgICAgICAgaWYgKCF0YWdOYW1lKVxuICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICB2YXIgYXR0cmlidXRlcyA9IGdsb2JhbEF0dHJpYnV0ZXM7XG4gICAgICAgIGlmICh0YWdOYW1lIGluIGF0dHJpYnV0ZU1hcCkge1xuICAgICAgICAgICAgYXR0cmlidXRlcyA9IGF0dHJpYnV0ZXMuY29uY2F0KE9iamVjdC5rZXlzKGF0dHJpYnV0ZU1hcFt0YWdOYW1lXSkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBhdHRyaWJ1dGVzLm1hcChmdW5jdGlvbihhdHRyaWJ1dGUpe1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBjYXB0aW9uOiBhdHRyaWJ1dGUsXG4gICAgICAgICAgICAgICAgc25pcHBldDogYXR0cmlidXRlICsgJz1cIiQwXCInLFxuICAgICAgICAgICAgICAgIG1ldGE6IFwiYXR0cm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cbn0pLmNhbGwoTW9kZS5wcm90b3R5cGUpO1xuXG5leHBvcnRzLk1vZGUgPSBNb2RlO1xufSk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/html.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/javascript.js": -/*!***************************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/javascript.js ***! - \***************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\n\nvar JavaScriptHighlightRules = function(options) {\n var keywordMapper = this.createKeywordMapper({\n \"variable.language\":\n \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\" , // Pseudo\n \"keyword\":\n \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|function|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\n \"storage.type\":\n \"const|let|var|function\",\n \"constant.language\":\n \"null|Infinity|NaN|undefined\",\n \"support.function\":\n \"alert\",\n \"constant.language.boolean\": \"true|false\"\n }, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n\n this.$rules = {\n \"no_regex\" : [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n {\n token : \"string\",\n regex : \"'(?=.)\",\n next : \"qstring\"\n }, {\n token : \"string\",\n regex : '\"(?=.)',\n next : \"qqstring\"\n }, {\n token : \"constant.numeric\", // hexadecimal, octal and binary\n regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token : \"constant.numeric\", // decimal integers and floats\n regex : /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"support.function\",\n \"punctuation.operator\", \"entity.name.function\", \"text\",\"keyword.operator\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(prototype)(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"text\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"keyword\",\n regex : \"from(?=\\\\s*('|\\\"))\"\n }, {\n token : \"keyword\",\n regex : \"(?:\" + kwBeforeRe + \")\\\\b\",\n next : \"start\"\n }, {\n token : [\"support.constant\"],\n regex : /that\\b/\n }, {\n token : [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex : /(console)(\\.)(warn|info|log|error|time|trace|timeEnd|assert)\\b/\n }, {\n token : keywordMapper,\n regex : identifierRe\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/,\n next : \"property\"\n }, {\n token : \"storage.type\",\n regex : /=>/\n }, {\n token : \"keyword.operator\",\n regex : /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next : \"start\"\n }, {\n token : \"punctuation.operator\",\n regex : /[?:,;.]/,\n next : \"start\"\n }, {\n token : \"paren.lparen\",\n regex : /[\\[({]/,\n next : \"start\"\n }, {\n token : \"paren.rparen\",\n regex : /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token : \"text\",\n regex : \"\\\\s+\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(?:(\\\\s+)(\\\\w+))?(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/\n }, {\n token : \"support.function\",\n regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|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(?=\\()/\n }, {\n token : \"support.function.dom\",\n 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|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token : \"support.constant\",\n 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/\n }, {\n token : \"identifier\",\n regex : identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token : \"text\",\n regex : \"\\\\s+|^$\",\n next : \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token : \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token : \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token : \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"function_arguments\": [\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \"[, ]+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : '\"|$',\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : \"'|$\",\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n\n\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function(val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token : \"string.quasi.start\",\n regex : /`/,\n push : [{\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"paren.quasi.start\",\n regex : /\\${/,\n push : \"start\"\n }, {\n token : \"string.quasi.end\",\n regex : /`/,\n next : \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n });\n\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n\n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"no_regex\") ]);\n\n this.normalizeRules();\n};\n\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\n\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch : function(val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n } else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex : \"\",\n onMatch : function(value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{type: this.token, value: value}];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n token : \"text.tag-whitespace.xml\",\n regex : \"\\\\s+\"\n }, {\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n stateName : \"jsx_attr_q\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n stateName : \"jsx_attr_qq\",\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\n\nfunction comments(next) {\n return [\n {\n token : \"comment\", // multi line comment\n regex : /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"\\\\*\\\\/\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }, {\n token : \"comment\",\n regex : \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"$|^\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = JavaScriptHighlightRules;\n \n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n this.$quotes = {'\"': '\"', \"'\": \"'\", \"`\": \"`\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n } else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/javascript */ \"../../../../brace@0.11.1/node_modules/brace/worker/javascript.js\"), \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(results) {\n session.setAnnotations(results.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/javascript\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9icmFjZUAwLjExLjEvbm9kZV9tb2R1bGVzL2JyYWNlL21vZGUvamF2YXNjcmlwdC5qcz83N2EwIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFHQTs7QUFFQSxDQUFDOztBQUVEO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDs7QUFFQSx5Q0FBeUMsRUFBRTtBQUMzQyxzQkFBc0IsRUFBRTtBQUN4QixXQUFXLFlBQVksS0FBSztBQUM1QixvQkFBb0IsSUFBSTtBQUN4QjtBQUNBO0FBQ0E7O0FBRUE7QUFDQTt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VJbnR8XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiSlNPTnxNYXRofFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBPdGhlclxuICAgICAgICAgICAgXCJ0aGlzfGFyZ3VtZW50c3xwcm90b3R5cGV8d2luZG93fGRvY3VtZW50XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAsIC8vIFBzZXVkb1xuICAgICAgICBcImtleXdvcmRcIjpcbiAgICAgICAgICAgIFwiY29uc3R8eWllbGR8aW1wb3J0fGdldHxzZXR8YXN5bmN8YXdhaXR8XCIgK1xuICAgICAgICAgICAgXCJicmVha3xjYXNlfGNhdGNofGNvbnRpbnVlfGRlZmF1bHR8ZGVsZXRlfGRvfGVsc2V8ZmluYWxseXxmb3J8ZnVuY3Rpb258XCIgK1xuICAgICAgICAgICAgXCJpZnxpbnxvZnxpbnN0YW5jZW9mfG5ld3xyZXR1cm58c3dpdGNofHRocm93fHRyeXx0eXBlb2Z8bGV0fHZhcnx3aGlsZXx3aXRofGRlYnVnZ2VyfFwiICtcbiAgICAgICAgICAgIFwiX19wYXJlbnRfX3xfX2NvdW50X198ZXNjYXBlfHVuZXNjYXBlfHdpdGh8X19wcm90b19ffFwiICtcbiAgICAgICAgICAgIFwiY2xhc3N8ZW51bXxleHRlbmRzfHN1cGVyfGV4cG9ydHxpbXBsZW1lbnRzfHByaXZhdGV8cHVibGljfGludGVyZmFjZXxwYWNrYWdlfHByb3RlY3RlZHxzdGF0aWNcIixcbiAgICAgICAgXCJzdG9yYWdlLnR5cGVcIjpcbiAgICAgICAgICAgIFwiY29uc3R8bGV0fHZhcnxmdW5jdGlvblwiLFxuICAgICAgICBcImNvbnN0YW50Lmxhbmd1YWdlXCI6XG4gICAgICAgICAgICBcIm51bGx8SW5maW5pdHl8TmFOfHVuZGVmaW5lZFwiLFxuICAgICAgICBcInN1cHBvcnQuZnVuY3Rpb25cIjpcbiAgICAgICAgICAgIFwiYWxlcnRcIixcbiAgICAgICAgXCJjb25zdGFudC5sYW5ndWFnZS5ib29sZWFuXCI6IFwidHJ1ZXxmYWxzZVwiXG4gICAgfSwgXCJpZGVudGlmaWVyXCIpO1xuICAgIHZhciBrd0JlZm9yZVJlID0gXCJjYXNlfGRvfGVsc2V8ZmluYWxseXxpbnxpbnN0YW5jZW9mfHJldHVybnx0aHJvd3x0cnl8dHlwZW9mfHlpZWxkfHZvaWRcIjtcblxuICAgIHZhciBlc2NhcGVkUmUgPSBcIlxcXFxcXFxcKD86eFswLTlhLWZBLUZdezJ9fFwiICsgLy8gaGV4XG4gICAgICAgIFwidVswLTlhLWZBLUZdezR9fFwiICsgLy8gdW5pY29kZVxuICAgICAgICBcInV7WzAtOWEtZkEtRl17MSw2fX18XCIgKyAvLyBlczYgdW5pY29kZVxuICAgICAgICBcIlswLTJdWzAtN117MCwyfXxcIiArIC8vIG9jdFxuICAgICAgICBcIjNbMC03XVswLTddP3xcIiArIC8vIG9jdFxuICAgICAgICBcIls0LTddWzAtN10/fFwiICsgLy9vY3RcbiAgICAgICAgXCIuKVwiO1xuXG4gICAgdGhpcy4kcnVsZXMgPSB7XG4gICAgICAgIFwibm9fcmVnZXhcIiA6IFtcbiAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRTdGFydFJ1bGUoXCJkb2Mtc3RhcnRcIiksXG4gICAgICAgICAgICBjb21tZW50cyhcIm5vX3JlZ2V4XCIpLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiJyg/PS4pXCIsXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcIig/PS4pJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwicXFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleGFkZWNpbWFsLCBvY3RhbCBhbmQgYmluYXJ5XG4gICAgICAgICAgICAgICAgcmVnZXggOiAvMCg/Olt4WF1bMC05YS1mQS1GXSt8W29PXVswLTddK3xbYkJdWzAxXSspXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGRlY2ltYWwgaW50ZWdlcnMgYW5kIGZsb2F0c1xuICAgICAgICAgICAgICAgIHJlZ2V4IDogLyg/OlxcZFxcZCooPzpcXC5cXGQqKT98XFwuXFxkKykoPzpbZUVdWystXT9cXGQrXFxiKT8vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcImtleXdvcmQub3BlcmF0b3JcIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikocHJvdG90eXBlKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLCBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArXCIpKFxcXFxzKikoPSkoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInRleHRcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKykoXFxcXHcrKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoZnVuY3Rpb24pKFxcXFxzKykoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0XCIsIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFxzKikoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwidGV4dFwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiZnJvbSg/PVxcXFxzKignfFxcXCIpKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKD86XCIgKyBrd0JlZm9yZVJlICsgXCIpXFxcXGJcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdXBwb3J0LmNvbnN0YW50XCJdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL3RoYXRcXGIvXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdG9yYWdlLnR5cGVcIiwgXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLCBcInN1cHBvcnQuZnVuY3Rpb24uZmlyZWJ1Z1wiXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IC8oY29uc29sZSkoXFwuKSh3YXJufGluZm98bG9nfGVycm9yfHRpbWV8dHJhY2V8dGltZUVuZHxhc3NlcnQpXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDoga2V5d29yZE1hcHBlcixcbiAgICAgICAgICAgICAgICByZWdleCA6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1suXSg/IVsuXSkvLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJwcm9wZXJ0eVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogLz0+L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvLS18XFwrXFwrfFxcLnszfXw9PT18PT18PXwhPXwhPT18PCs9P3w+Kz0/fCF8JiZ8XFx8XFx8fFxcPzp8WyEkJSYqK1xcLX5cXC9eXT0/LyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1s/Oiw7Ll0vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXFsoe10vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXF0pfV0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXiMhLiokL1xuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBwcm9wZXJ0eTogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxccytcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW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AgICAgdG9rZW4gOiBcImlkZW50aWZpZXJcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlwiLFxuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwic3RhcnRcIjogW1xuICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFN0YXJ0UnVsZShcImRvYy1zdGFydFwiKSxcbiAgICAgICAgICAgIGNvbW1lbnRzKFwic3RhcnRcIiksXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwvXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrfF4kXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwicmVnZXhcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5rZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXFxcXFxcXFwoPzp1W1xcXFxkYS1mQS1GXXs0fXx4W1xcXFxkYS1mQS1GXXsyfXwuKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIi9bc3huZ2lteV0qXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImludmFsaWRcIixcbiAgICAgICAgICAgICAgICByZWdleDogL1xce1xcZCtcXGIsP1xcZCpcXH1bKypdfFsrKiReP11bKypdfFskXl1bP118XFw/ezMsfS9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IC9cXChcXD9bOj0hXXxcXCl8XFx7XFxkK1xcYiw/XFxkKlxcfXxbKypdXFw/fFsoKSReKyo/Ll0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmRlbGltaXRlclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFx8L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFxbXFxePy8sXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmcucmVnZXhwXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5jaGFyY2xhc3Mua2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFxcXFxcKD86dVtcXFxcZGEtZkEtRl17NH18eFtcXFxcZGEtZkEtRl17Mn18LilcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIl1cIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcInJlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCItXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIiRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nLnJlZ2V4cC5jaGFyYWNodGVyY2xhc3NcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwidmFyaWFibGUucGFyYW1ldGVyXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiWywgXStcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiZW1wdHlcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJxcXN0cmluZ1wiIDogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IGVzY2FwZWRSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXFxcXFwkXCIsXG4gICAgICAgICAgICAgICAgY29uc3VtZUxpbmVFbmQgIDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcInwkJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcInFzdHJpbmdcIiA6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxcXFxcJFwiLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kICA6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIid8JFwiLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XG4gICAgICAgIF1cbiAgICB9O1xuXG5cbiAgICBpZiAoIW9wdGlvbnMgfHwgIW9wdGlvbnMubm9FUzYpIHtcbiAgICAgICAgdGhpcy4kcnVsZXMubm9fcmVnZXgudW5zaGlmdCh7XG4gICAgICAgICAgICByZWdleDogXCJbe31dXCIsIG9uTWF0Y2g6IGZ1bmN0aW9uKHZhbCwgc3RhdGUsIHN0YWNrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gdmFsID09IFwie1wiID8gdGhpcy5uZXh0U3RhdGUgOiBcIlwiO1xuICAgICAgICAgICAgICAgIGlmICh2YWwgPT0gXCJ7XCIgJiYgc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQoXCJzdGFydFwiLCBzdGF0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbCA9PSBcIn1cIiAmJiBzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmV4dC5pbmRleE9mKFwic3RyaW5nXCIpICE9IC0xIHx8IHRoaXMubmV4dC5pbmRleE9mKFwianN4XCIpICE9IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicGFyZW4ucXVhc2kuZW5kXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWwgPT0gXCJ7XCIgPyBcInBhcmVuLmxwYXJlblwiIDogXCJwYXJlbi5ycGFyZW5cIjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBuZXh0U3RhdGU6IFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnF1YXNpLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6IC9gLyxcbiAgICAgICAgICAgIHB1c2ggIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ucXVhc2kuc3RhcnRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9cXCR7LyxcbiAgICAgICAgICAgICAgICBwdXNoICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcucXVhc2kuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvYC8sXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZy5xdWFzaVwiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiA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1xuICAgICAgICAgICAgICAgICAgICBzdGFja1sxXS0tO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW3tcbiAgICAgICAgICAgICAgICB0eXBlOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLlwiICsgKG9mZnNldCA9PSAxID8gXCJcIiA6IFwiZW5kLVwiKSArIFwidGFnLW9wZW4ueG1sXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbC5zbGljZSgwLCBvZmZzZXQpXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJtZXRhLnRhZy50YWctbmFtZS54bWxcIixcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLnN1YnN0cihvZmZzZXQpXG4gICAgICAgICAgICB9XTtcbiAgICAgICAgfSxcbiAgICAgICAgcmVnZXggOiBcIjwvP1wiICsgdGFnUmVnZXggKyBcIlwiLFxuICAgICAgICBuZXh0OiBcImpzeEF0dHJpYnV0ZXNcIixcbiAgICAgICAgbmV4dFN0YXRlOiBcImpzeFwiXG4gICAgfTtcbiAgICB0aGlzLiRydWxlcy5zdGFydC51bnNoaWZ0KGpzeFRhZyk7XG4gICAgdmFyIGpzeEpzUnVsZSA9IHtcbiAgICAgICAgcmVnZXg6IFwie1wiLFxuICAgICAgICB0b2tlbjogXCJwYXJlbi5xdWFzaS5zdGFydFwiLFxuICAgICAgICBwdXNoOiBcInN0YXJ0XCJcbiAgICB9O1xuICAgIHRoaXMuJHJ1bGVzLmpzeCA9IFtcbiAgICAgICAganN4SnNSdWxlLFxuICAgICAgICBqc3hUYWcsXG4gICAgICAgIHtpbmNsdWRlIDogXCJyZWZlcmVuY2VcIn0sXG4gICAgICAgIHtkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJ9XG4gICAgXTtcbiAgICB0aGlzLiRydWxlcy5qc3hBdHRyaWJ1dGVzID0gW3tcbiAgICAgICAgdG9rZW4gOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLnRhZy1jbG9zZS54bWxcIixcbiAgICAgICAgcmVnZXggOiBcIi8/PlwiLFxuICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsdWUsIGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50U3RhdGUgPT0gc3RhY2tbMF0pXG4gICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGFja1swXSA9PSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbMV0tLTtcbiAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5zcGxpY2UoMCwgMik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2tbMF0gfHwgXCJzdGFydFwiO1xuICAgICAgICAgICAgcmV0dXJuIFt7dHlwZTogdGhpcy50b2tlbiwgdmFsdWU6IHZhbHVlfV07XG4gICAgICAgIH0sXG4gICAgICAgIG5leHRTdGF0ZTogXCJqc3hcIlxuICAgIH0sXG4gICAganN4SnNSdWxlLFxuICAgIGNvbW1lbnRzKFwianN4QXR0cmlidXRlc1wiKSxcbiAgICB7XG4gICAgICAgIHRva2VuIDogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUueG1sXCIsXG4gICAgICA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R0cmlidXRlLXZhbHVlLnhtbFwifVxuICAgICAgICBdXG4gICAgfSxcbiAgICBqc3hUYWdcbiAgICBdO1xuICAgIHRoaXMuJHJ1bGVzLnJlZmVyZW5jZSA9IFt7XG4gICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGUucmVmZXJlbmNlLnhtbFwiLFxuICAgICAgICByZWdleCA6IFwiKD86JiNbMC05XSs7KXwoPzomI3hbMC05YS1mQS1GXSs7KXwoPzomW2EtekEtWjAtOV86XFxcXC4tXSs7KVwiXG4gICAgfV07XG59XG5cbmZ1bmN0aW9uIGNvbW1lbnRzKG5leHQpIHtcbiAgICByZXR1cm4gW1xuICAgICAgICB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLCAvLyBtdWx0aSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgIHJlZ2V4IDogL1xcL1xcKi8sXG4gICAgICAgICAgICBuZXh0OiBbXG4gICAgICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFRhZ1J1bGUoKSxcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcImNvbW1lbnRcIiwgcmVnZXggOiBcIlxcXFwqXFxcXC9cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXC9cXFxcL1wiLFxuICAgICAgICAgICAgbmV4dDogW1xuICAgICAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRUYWdSdWxlKCksXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJjb21tZW50XCIsIHJlZ2V4IDogXCIkf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Nlc3Npb24sIGxpbmUsIHJvdyk7XG4gICAgICAgIFxuICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0YXJ0TWFya2VyKTtcbiAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICB2YXIgaSA9IG1hdGNoLmluZGV4O1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMub3BlbmluZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByYW5nZSA9IHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGkgKyBtYXRjaFswXS5sZW5ndGgsIDEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocmFuZ2UgJiYgIXJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLmdldFNlY3Rpb25SYW5nZShzZXNzaW9uLCByb3cpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZFN0eWxlICE9IFwiYWxsXCIpXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvbGRTdHlsZSA9PT0gXCJtYXJrYmVnaW5cIilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0b3BNYXJrZXIpO1xuICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBpID0gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9zaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuXG4gICAgICAgICAgICByZXR1cm4gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSwgLTEpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldFNlY3Rpb25SYW5nZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdykge1xuICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICB2YXIgc3RhcnRJbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5sZW5ndGg7XG4gICAgICAgIHJvdyA9IHJvdyArIDE7XG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBpbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgICAgICBpZiAoaW5kZW50ID09PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICAoc3RhcnRJbmRlbnQgPiBpbmRlbnQpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB2YXIgc3ViUmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShzZXNzaW9uLCBcImFsbFwiLCByb3cpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc3ViUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3ViUmFuZ2Uuc3RhcnQucm93IDw9IHN0YXJ0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3ViUmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBzdWJSYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRJbmRlbnQgPT0gaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgc2Vzc2lvbi5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0Q29tbWVudFJlZ2lvbkJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgbGluZSwgcm93KSB7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUuc2VhcmNoKC9cXHMqJC8pO1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlID0gL15cXHMqKD86XFwvXFwqfFxcL1xcL3wtLSkjPyhlbmQpP3JlZ2lvblxcYi87XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICA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UluZGVudCA9IGZ1bmN0aW9uKHN0YXRlLCBsaW5lLCB0YWIpIHtcbiAgICAgICAgdmFyIGluZGVudCA9IHRoaXMuJGdldEluZGVudChsaW5lKTtcblxuICAgICAgICB2YXIgdG9rZW5pemVkTGluZSA9IHRoaXMuZ2V0VG9rZW5pemVyKCkuZ2V0TGluZVRva2VucyhsaW5lLCBzdGF0ZSk7XG4gICAgICAgIHZhciB0b2tlbnMgPSB0b2tlbml6ZWRMaW5lLnRva2VucztcbiAgICAgICAgdmFyIGVuZFN0YXRlID0gdG9rZW5pemVkTGluZS5zdGF0ZTtcblxuICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCAmJiB0b2tlbnNbdG9rZW5zLmxlbmd0aC0xXS50eXBlID09IFwiY29tbWVudFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gaW5kZW50O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHN0YXRlID09IFwic3RhcnRcIiB8fCBzdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL14uKig/OlxcYmNhc2VcXGIuKjp8W1xce1xcKFxcW10pXFxzKiQvKTtcbiAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgIGluZGVudCArPSB0YWI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdGUgPT0gXCJkb2Mtc3RhcnRcIikge1xuICAgICAgICAgICAgaWYgKGVuZFN0YXRlID09IFwic3RhcnRcIiB8fCBlbmRTdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL15cXHMqKFxcLz8pXFwqLyk7XG4gICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0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AgICAgcmV0dXJuIHdvcmtlcjtcbiAgICB9O1xuXG4gICAgdGhpcy4kaWQgPSBcImFjZS9tb2RlL2phdmFzY3JpcHRcIjtcbn0pLmNhbGwoTW9kZS5wcm90b3R5cGUpO1xuXG5leHBvcnRzLk1vZGUgPSBNb2RlO1xufSk7XG4iXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/javascript.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/jsx.js": -/*!********************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/mode/jsx.js ***! - \********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.define(\"ace/mode/jsx_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar JsxHighlightRules = function() {\n var keywords = lang.arrayToMap(\n (\"break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|\" +\n \"if|throw|\" +\n \"delete|in|try|\" +\n \"class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|\" +\n \"number|int|string|boolean|variant|\" +\n \"log|assert\").split(\"|\")\n );\n \n var buildinConstants = lang.arrayToMap(\n (\"null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined\").split(\"|\")\n );\n \n var reserved = lang.arrayToMap(\n (\"debugger|with|\" +\n \"const|export|\" +\n \"let|private|public|yield|protected|\" +\n \"extern|native|as|operator|__fake__|__readonly__\").split(\"|\")\n );\n \n var identifierRe = \"[a-zA-Z_][a-zA-Z0-9_]*\\\\b\";\n \n this.$rules = {\n \"start\" : [\n {\n token : \"comment\",\n regex : \"\\\\/\\\\/.*$\"\n },\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n {\n token : \"comment\", // multi line comment\n regex : \"\\\\/\\\\*\",\n next : \"comment\"\n }, {\n token : \"string.regexp\",\n regex : \"[/](?:(?:\\\\[(?:\\\\\\\\]|[^\\\\]])+\\\\])|(?:\\\\\\\\/|[^\\\\]/]))*[/]\\\\w*\\\\s*(?=[).,;]|$)\"\n }, {\n token : \"string\", // single line\n regex : '[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]'\n }, {\n token : \"string\", // single line\n regex : \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"\n }, {\n token : \"constant.numeric\", // hex\n regex : \"0[xX][0-9a-fA-F]+\\\\b\"\n }, {\n token : \"constant.numeric\", // float\n regex : \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"\n }, {\n token : \"constant.language.boolean\",\n regex : \"(?:true|false)\\\\b\"\n }, {\n token : [\n \"storage.type\",\n \"text\",\n \"entity.name.function\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")\"\n }, {\n token : function(value) {\n if (value == \"this\")\n return \"variable.language\";\n else if (value == \"function\")\n return \"storage.type\";\n else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value))\n return \"keyword\";\n else if (buildinConstants.hasOwnProperty(value))\n return \"constant.language\";\n else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value))\n return \"language.support.class\";\n else\n return \"identifier\";\n },\n regex : identifierRe\n }, {\n token : \"keyword.operator\",\n regex : \"!|%|&|\\\\*|\\\\-\\\\-|\\\\-|\\\\+\\\\+|\\\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\\\|\\\\||\\\\?\\\\:|\\\\*=|%=|\\\\+=|\\\\-=|&=|\\\\^=|\\\\b(?:in|instanceof|new|delete|typeof|void)\"\n }, {\n token : \"punctuation.operator\",\n regex : \"\\\\?|\\\\:|\\\\,|\\\\;|\\\\.\"\n }, {\n token : \"paren.lparen\",\n regex : \"[[({<]\"\n }, {\n token : \"paren.rparen\",\n regex : \"[\\\\])}>]\"\n }, {\n token : \"text\",\n regex : \"\\\\s+\"\n }\n ],\n \"comment\" : [\n {\n token : \"comment\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : \"start\"\n }, {\n defaultToken : \"comment\"\n }\n ]\n };\n \n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"start\") ]);\n};\n\noop.inherits(JsxHighlightRules, TextHighlightRules);\n\nexports.JsxHighlightRules = JsxHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/jsx\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/jsx_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JsxHighlightRules = acequire(\"./jsx_highlight_rules\").JsxHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nfunction Mode() {\n this.HighlightRules = JsxHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n}\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\") {\n var match = line.match(/^.*[\\{\\(\\[]\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.$id = \"ace/mode/jsx\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vL2hvbWUvamVzc2ljYS9Eb2N1bWVudHMvY29kZXMvbWFwL25vZGVfbW9kdWxlcy8ucG5wbS9icmFjZUAwLjExLjEvbm9kZV9tb2R1bGVzL2JyYWNlL21vZGUvanN4LmpzP2Q1M2EiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7OztBQUdBOztBQUVBLENBQUM7O0FBRUQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ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G4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbW1lbnRcIiwgLy8gbXVsdGkgbGluZSBjb21tZW50XG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwvXFxcXCpcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJjb21tZW50XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbL10oPzooPzpcXFxcWyg/OlxcXFxcXFxcXXxbXlxcXFxdXSkrXFxcXF0pfCg/OlxcXFxcXFxcL3xbXlxcXFxdL10pKSpbL11cXFxcdypcXFxccyooPz1bKS4sO118JClcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIiwgLy8gc2luZ2xlIGxpbmVcbiAgICAgICAgICAgICAgICByZWdleCA6ICdbXCJdKD86KD86XFxcXFxcXFwuKXwoPzpbXlwiXFxcXFxcXFxdKSkqP1tcIl0nXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZ1wiLCAvLyBzaW5nbGUgbGluZVxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbJ10oPzooPzpcXFxcXFxcXC4pfCg/OlteJ1xcXFxcXFxcXSkpKj9bJ11cIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIwW3hYXVswLTlhLWZBLUZdK1xcXFxiXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAvLyBmbG9hdFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbKy1dP1xcXFxkKyg/Oig/OlxcXFwuXFxcXGQqKT8oPzpbZUVdWystXT9cXFxcZCspPyk/XFxcXGJcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5ib29sZWFuXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIig/OnRydWV8ZmFsc2UpXFxcXGJcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKGZ1bmN0aW9uKShcXFxccyspKFwiICsgaWRlbnRpZmllclJlICsgXCIpXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IGZ1bmN0aW9uKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PSBcInRoaXNcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcInZhcmlhYmxlLmxhbmd1YWdlXCI7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbHVlID09IFwiZnVuY3Rpb25cIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcInN0b3JhZ2UudHlwZVwiO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChrZXl3b3Jkcy5oYXNPd25Qcm9wZXJ0eSh2YWx1ZSkgfHwgcmVzZXJ2ZWQuaGFzT3duUHJvcGVydHkodmFsdWUpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwia2V5d29yZFwiO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChidWlsZGluQ29uc3RhbnRzLmhhc093blByb3BlcnR5KHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImNvbnN0YW50Lmxhbmd1YWdlXCI7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKC9eXz9bQS1aXVthLXpBLVowLTlfXSokLy50ZXN0KHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImxhbmd1YWdlLnN1cHBvcnQuY2xhc3NcIjtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiaWRlbnRpZmllclwiO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBpZGVudGlmaWVyUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwia2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIhfCV8JnxcXFxcKnxcXFxcLVxcXFwtfFxcXFwtfFxcXFwrXFxcXCt8XFxcXCt8fnw9PXw9fCE9fDw9fD49fDw8PXw+Pj18Pj4+PXw8Pnw8fD58IXwmJnxcXFxcfFxcXFx8fFxcXFw/XFxcXDp8XFxcXCo9fCU9fFxcXFwrPXxcXFxcLT18Jj18XFxcXF49fFxcXFxiKD86aW58aW5zdGFuY2VvZnxuZXd8ZGVsZXRlfHR5cGVvZnx2b2lkKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFw/fFxcXFw6fFxcXFwsfFxcXFw7fFxcXFwuXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ubHBhcmVuXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIltbKHs8XVwiXG4gICAgICAgICAgICB9LCB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sIDEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocmFuZ2UgJiYgIXJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLmdldFNlY3Rpb25SYW5nZShzZXNzaW9uLCByb3cpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZFN0eWxlICE9IFwiYWxsXCIpXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvbGRTdHlsZSA9PT0gXCJtYXJrYmVnaW5cIilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0b3BNYXJrZXIpO1xuICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBpID0gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9zaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuXG4gICAgICAgICAgICByZXR1cm4gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSwgLTEpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldFNlY3Rpb25SYW5nZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdykge1xuICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICB2YXIgc3RhcnRJbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5sZW5ndGg7XG4gICAgICAgIHJvdyA9IHJvdyArIDE7XG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBpbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgICAgICBpZiAoaW5kZW50ID09PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICAoc3RhcnRJbmRlbnQgPiBpbmRlbnQpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB2YXIgc3ViUmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShzZXNzaW9uLCBcImFsbFwiLCByb3cpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc3ViUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3ViUmFuZ2Uuc3RhcnQucm93IDw9IHN0YXJ0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3ViUmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBzdWJSYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRJbmRlbnQgPT0gaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgc2Vzc2lvbi5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0Q29tbWVudFJlZ2lvbkJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgbGluZSwgcm93KSB7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUuc2VhcmNoKC9cXHMqJC8pO1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlID0gL15cXHMqKD86XFwvXFwqfFxcL1xcL3wtLSkjPyhlbmQpP3JlZ2lvblxcYi87XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIG0gPSByZS5leGVjKGxpbmUpO1xuICAgICAgICAgICAgaWYgKCFtKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChtWzFdKSBkZXB0aC0tO1xuICAgICAgICAgICAgZWxzZSBkZXB0aCsrO1xuXG4gICAgICAgICAgICBpZiAoIWRlcHRoKSBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIGlmIChlbmRSb3cgPiBzdGFydFJvdykge1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgbGluZS5sZW5ndGgpO1xuICAgICAgICB9XG4gICAgfTtcblxufSkuY2FsbChGb2xkTW9kZS5wcm90b3R5cGUpO1xuXG59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nB1dCkge1xuICAgICAgICByZXR1cm4gdGhpcy4kb3V0ZGVudC5jaGVja091dGRlbnQobGluZSwgaW5wdXQpO1xuICAgIH07XG5cbiAgICB0aGlzLmF1dG9PdXRkZW50ID0gZnVuY3Rpb24oc3RhdGUsIGRvYywgcm93KSB7XG4gICAgICAgIHRoaXMuJG91dGRlbnQuYXV0b091dGRlbnQoZG9jLCByb3cpO1xuICAgIH07XG5cbiAgICB0aGlzLiRpZCA9IFwiYWNlL21vZGUvanN4XCI7XG59KS5jYWxsKE1vZGUucHJvdG90eXBlKTtcblxuZXhwb3J0cy5Nb2RlID0gTW9kZTtcbn0pO1xuIl0sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/jsx.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/worker/css.js": -/*!**********************************************************************************************************!*\ - !*** /home/jessica/Documents/codes/map/node_modules/.pnpm/brace@0.11.1/node_modules/brace/worker/css.js ***! - \**********************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("module.exports.id = 'ace/mode/css_worker';\nmodule.exports.src = \"\\\"no use strict\\\";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\\\"\\\";testPath;){var alias=paths[testPath];if(\\\"string\\\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\\\/*$/,\\\"/\\\")+(tail||alias.main||alias.name);if(alias===!1)return\\\"\\\";var i=testPath.lastIndexOf(\\\"/\\\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\\\"log\\\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\\\"error\\\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\\\"!\\\")){var chunks=moduleName.split(\\\"!\\\");return window.normalizeModule(parentId,chunks[0])+\\\"!\\\"+window.normalizeModule(parentId,chunks[1])}if(\\\".\\\"==moduleName.charAt(0)){var base=parentId.split(\\\"/\\\").slice(0,-1).join(\\\"/\\\");for(moduleName=(base?base+\\\"/\\\":\\\"\\\")+moduleName;-1!==moduleName.indexOf(\\\".\\\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\\\.\\\\//,\\\"\\\").replace(/\\\\/\\\\.\\\\//,\\\"/\\\").replace(/[^\\\\/]+\\\\/\\\\.\\\\.\\\\//,\\\"\\\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\\\"worker.js acequire() accepts only (parentId, id) as arguments\\\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\\\"unable to load \\\"+id);var path=resolveModuleId(id,window.acequire.tlns);return\\\".js\\\"!=path.slice(-3)&&(path+=\\\".js\\\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\\\"string\\\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\\\"function\\\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\\\"require\\\",\\\"exports\\\",\\\"module\\\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\\\"require\\\":return req;case\\\"exports\\\":return module.exports;case\\\"module\\\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\\\"ace/lib/event_emitter\\\").EventEmitter,oop=window.acequire(\\\"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};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\\\"Unknown command:\\\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\\\"ace/lib/es5-shim\\\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define(\\\"ace/lib/oop\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},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/lang\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.last=function(a){return a[a.length-1]},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 deepCopy(obj){if(\\\"object\\\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if(\\\"[object Object]\\\"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(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(/ [\\\"+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/apply_delta\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\\\"\\\";switch(delta.action){case\\\"insert\\\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\\\"remove\\\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\\\"ace/lib/event_emitter\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";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),listeners=listeners.slice();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){listeners=listeners.slice();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){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},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/anchor\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/lib/event_emitter\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.columnthis.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.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._signal(\\\"change\\\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\\\"change\\\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\\\"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/document\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/apply_delta\\\",\\\"ace/lib/event_emitter\\\",\\\"ace/range\\\",\\\"ace/anchor\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),applyDelta=acequire(\\\"./apply_delta\\\").applyDelta,EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Range=acequire(\\\"./range\\\").Range,Anchor=acequire(\\\"./anchor\\\").Anchor,Document=function(textOrLines){this.$lines=[\\\"\\\"],0===textOrLines.length?this.$lines=[\\\"\\\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).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._signal(\\\"changeNewLineMode\\\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\\\"windows\\\":return\\\"\\\\r\\\\n\\\";case\\\"unix\\\":return\\\"\\\\n\\\";default:return this.$autoNewLine||\\\"\\\\n\\\"}},this.$autoNewLine=\\\"\\\",this.$newLineMode=\\\"auto\\\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\\\"changeNewLineMode\\\"))},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){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\\\"\\\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\\\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\\\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\\\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\\\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\\\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\\\"),this.insertMergedLines(position,[\\\"\\\",\\\"\\\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},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):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\\\"\\\"]),column=0):(lines=[\\\"\\\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\\\"remove\\\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\\\"remove\\\",lines:[\\\"\\\",\\\"\\\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\\\"insert\\\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\\\"change\\\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\\\"\\\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\\\"insert\\\"==delta.action?\\\"remove\\\":\\\"insert\\\",lines:delta.lines.slice()})},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+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\\\"ace/worker/mirror\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/range\\\",\\\"ace/document\\\",\\\"ace/lib/lang\\\"],function(acequire,exports){\\\"use strict\\\";acequire(\\\"../range\\\").Range;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){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:\\\"insert\\\",start:data[i],lines:data[i+1]};else var d={action:\\\"remove\\\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(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(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\\\"ace/mode/css/csslint\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports,module){function objectToString(o){return Object.prototype.toString.call(o)}function clone(parent,circular,depth,prototype){function _clone(parent,depth){if(null===parent)return null;if(0==depth)return parent;var child;if(\\\"object\\\"!=typeof parent)return parent;if(util.isArray(parent))child=[];else if(util.isRegExp(parent))child=RegExp(parent.source,util.getRegExpFlags(parent)),parent.lastIndex&&(child.lastIndex=parent.lastIndex);else if(util.isDate(parent))child=new Date(parent.getTime());else{if(useBuffer&&Buffer.isBuffer(parent))return child=new Buffer(parent.length),parent.copy(child),child;child=prototype===void 0?Object.create(Object.getPrototypeOf(parent)):Object.create(prototype)}if(circular){var index=allParents.indexOf(parent);if(-1!=index)return allChildren[index];allParents.push(parent),allChildren.push(child)}for(var i in parent)child[i]=_clone(parent[i],depth-1);return child}var allParents=[],allChildren=[],useBuffer=\\\"undefined\\\"!=typeof Buffer;return circular===void 0&&(circular=!0),depth===void 0&&(depth=1/0),_clone(parent,depth)}function Reporter(lines,ruleset){this.messages=[],this.stats=[],this.lines=lines,this.ruleset=ruleset}var parserlib={};(function(){function EventTarget(){this._listeners={}}function StringReader(text){this._input=text.replace(/\\\\n\\\\r?/g,\\\"\\\\n\\\"),this._line=1,this._col=1,this._cursor=0}function SyntaxError(message,line,col){this.col=col,this.line=line,this.message=message}function SyntaxUnit(text,line,col,type){this.col=col,this.line=line,this.text=text,this.type=type}function TokenStreamBase(input,tokenData){this._reader=input?new StringReader(\\\"\\\"+input):null,this._token=null,this._tokenData=tokenData,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}EventTarget.prototype={constructor:EventTarget,addListener:function(type,listener){this._listeners[type]||(this._listeners[type]=[]),this._listeners[type].push(listener)},fire:function(event){if(\\\"string\\\"==typeof event&&(event={type:event}),event.target!==void 0&&(event.target=this),event.type===void 0)throw Error(\\\"Event object missing 'type' property.\\\");if(this._listeners[event.type])for(var listeners=this._listeners[event.type].concat(),i=0,len=listeners.length;len>i;i++)listeners[i].call(this,event)},removeListener:function(type,listener){if(this._listeners[type])for(var listeners=this._listeners[type],i=0,len=listeners.length;len>i;i++)if(listeners[i]===listener){listeners.splice(i,1);break}}},StringReader.prototype={constructor:StringReader,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(count){var c=null;return count=count===void 0?1:count,this._cursori;i++)nameMap.push(tokenData[i].name),tokenData[tokenData[i].name]=i,tokenData[i].text&&(typeMap[tokenData[i].text]=i);return tokenData.name=function(tt){return nameMap[tt]},tokenData.type=function(c){return typeMap[c]},tokenData},TokenStreamBase.prototype={constructor:TokenStreamBase,match:function(tokenTypes,channel){tokenTypes instanceof Array||(tokenTypes=[tokenTypes]);\\nfor(var tt=this.get(channel),i=0,len=tokenTypes.length;len>i;)if(tt==tokenTypes[i++])return!0;return this.unget(),!1},mustMatch:function(tokenTypes){var token;if(tokenTypes instanceof Array||(tokenTypes=[tokenTypes]),!this.match.apply(this,arguments))throw token=this.LT(1),new SyntaxError(\\\"Expected \\\"+this._tokenData[tokenTypes[0]].name+\\\" at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol)},advance:function(tokenTypes,channel){for(;0!==this.LA(0)&&!this.match(tokenTypes,channel);)this.get();return this.LA(0)},get:function(channel){var token,info,tokenInfo=this._tokenData,i=(this._reader,0);if(tokenInfo.length,this._lt.length&&this._ltIndex>=0&&this._ltIndex-1&&!tokenInfo[token.type].hide&&(token.channel=tokenInfo[token.type].channel,this._token=token,this._lt.push(token),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),info=tokenInfo[token.type],info&&(info.hide||void 0!==info.channel&&channel!==info.channel)?this.get(channel):token.type},LA:function(index){var tt,total=index;if(index>0){if(index>5)throw Error(\\\"Too much lookahead.\\\");for(;total;)tt=this.get(),total--;for(;index>total;)this.unget(),total++}else if(0>index){if(!this._lt[this._ltIndex+index])throw Error(\\\"Too much lookbehind.\\\");tt=this._lt[this._ltIndex+index].type}else tt=this._token.type;return tt},LT:function(index){return this.LA(index),this._lt[this._ltIndex+index-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(tokenType){return 0>tokenType||tokenType>this._tokenData.length?\\\"UNKNOWN_TOKEN\\\":this._tokenData[tokenType].name},tokenType:function(tokenName){return this._tokenData[tokenName]||-1},unget:function(){if(!this._ltIndexCache.length)throw Error(\\\"Too much lookahead.\\\");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}},parserlib.util={StringReader:StringReader,SyntaxError:SyntaxError,SyntaxUnit:SyntaxUnit,EventTarget:EventTarget,TokenStreamBase:TokenStreamBase}})(),function(){function Combinator(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.COMBINATOR_TYPE),this.type=\\\"unknown\\\",/^\\\\s+$/.test(text)?this.type=\\\"descendant\\\":\\\">\\\"==text?this.type=\\\"child\\\":\\\"+\\\"==text?this.type=\\\"adjacent-sibling\\\":\\\"~\\\"==text&&(this.type=\\\"sibling\\\")}function MediaFeature(name,value){SyntaxUnit.call(this,\\\"(\\\"+name+(null!==value?\\\":\\\"+value:\\\"\\\")+\\\")\\\",name.startLine,name.startCol,Parser.MEDIA_FEATURE_TYPE),this.name=name,this.value=value}function MediaQuery(modifier,mediaType,features,line,col){SyntaxUnit.call(this,(modifier?modifier+\\\" \\\":\\\"\\\")+(mediaType?mediaType:\\\"\\\")+(mediaType&&features.length>0?\\\" and \\\":\\\"\\\")+features.join(\\\" and \\\"),line,col,Parser.MEDIA_QUERY_TYPE),this.modifier=modifier,this.mediaType=mediaType,this.features=features}function Parser(options){EventTarget.call(this),this.options=options||{},this._tokenStream=null}function PropertyName(text,hack,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_NAME_TYPE),this.hack=hack}function PropertyValue(parts,line,col){SyntaxUnit.call(this,parts.join(\\\" \\\"),line,col,Parser.PROPERTY_VALUE_TYPE),this.parts=parts}function PropertyValueIterator(value){this._i=0,this._parts=value.parts,this._marks=[],this.value=value}function PropertyValuePart(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE),this.type=\\\"unknown\\\";var temp;if(/^([+\\\\-]?[\\\\d\\\\.]+)([a-z]+)$/i.test(text))switch(this.type=\\\"dimension\\\",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case\\\"em\\\":case\\\"rem\\\":case\\\"ex\\\":case\\\"px\\\":case\\\"cm\\\":case\\\"mm\\\":case\\\"in\\\":case\\\"pt\\\":case\\\"pc\\\":case\\\"ch\\\":case\\\"vh\\\":case\\\"vw\\\":case\\\"vmax\\\":case\\\"vmin\\\":this.type=\\\"length\\\";break;case\\\"deg\\\":case\\\"rad\\\":case\\\"grad\\\":this.type=\\\"angle\\\";break;case\\\"ms\\\":case\\\"s\\\":this.type=\\\"time\\\";break;case\\\"hz\\\":case\\\"khz\\\":this.type=\\\"frequency\\\";break;case\\\"dpi\\\":case\\\"dpcm\\\":this.type=\\\"resolution\\\"}else/^([+\\\\-]?[\\\\d\\\\.]+)%$/i.test(text)?(this.type=\\\"percentage\\\",this.value=+RegExp.$1):/^([+\\\\-]?\\\\d+)$/i.test(text)?(this.type=\\\"integer\\\",this.value=+RegExp.$1):/^([+\\\\-]?[\\\\d\\\\.]+)$/i.test(text)?(this.type=\\\"number\\\",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type=\\\"color\\\",temp=RegExp.$1,3==temp.length?(this.red=parseInt(temp.charAt(0)+temp.charAt(0),16),this.green=parseInt(temp.charAt(1)+temp.charAt(1),16),this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^rgb\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\\\\(\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^rgba\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\\\\(\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^hsl\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\\\\([\\\"']?([^\\\\)\\\"']+)[\\\"']?\\\\)/i.test(text)?(this.type=\\\"uri\\\",this.uri=RegExp.$1):/^([^\\\\(]+)\\\\(/i.test(text)?(this.type=\\\"function\\\",this.name=RegExp.$1,this.value=text):/^[\\\"'][^\\\"']*[\\\"']/.test(text)?(this.type=\\\"string\\\",this.value=eval(text)):Colors[text.toLowerCase()]?(this.type=\\\"color\\\",temp=Colors[text.toLowerCase()].substring(1),this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16)):/^[\\\\,\\\\/]$/.test(text)?(this.type=\\\"operator\\\",this.value=text):/^[a-z\\\\-_\\\\u0080-\\\\uFFFF][a-z0-9\\\\-_\\\\u0080-\\\\uFFFF]*$/i.test(text)&&(this.type=\\\"identifier\\\",this.value=text)}function Selector(parts,line,col){SyntaxUnit.call(this,parts.join(\\\" \\\"),line,col,Parser.SELECTOR_TYPE),this.parts=parts,this.specificity=Specificity.calculate(this)}function SelectorPart(elementName,modifiers,text,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_PART_TYPE),this.elementName=elementName,this.modifiers=modifiers}function SelectorSubPart(text,type,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_SUB_PART_TYPE),this.type=type,this.args=[]}function Specificity(a,b,c,d){this.a=a,this.b=b,this.c=c,this.d=d}function isHexDigit(c){return null!==c&&h.test(c)}function isDigit(c){return null!==c&&/\\\\d/.test(c)}function isWhitespace(c){return null!==c&&/\\\\s/.test(c)}function isNewLine(c){return null!==c&&nl.test(c)}function isNameStart(c){return null!==c&&/[a-z_\\\\u0080-\\\\uFFFF\\\\\\\\]/i.test(c)}function isNameChar(c){return null!==c&&(isNameStart(c)||/[0-9\\\\-\\\\\\\\]/.test(c))}function isIdentStart(c){return null!==c&&(isNameStart(c)||/\\\\-\\\\\\\\/.test(c))}function mix(receiver,supplier){for(var prop in supplier)supplier.hasOwnProperty(prop)&&(receiver[prop]=supplier[prop]);return receiver}function TokenStream(input){TokenStreamBase.call(this,input,Tokens)}function ValidationError(message,line,col){this.col=col,this.line=line,this.message=message}var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit,Colors={aliceblue:\\\"#f0f8ff\\\",antiquewhite:\\\"#faebd7\\\",aqua:\\\"#00ffff\\\",aquamarine:\\\"#7fffd4\\\",azure:\\\"#f0ffff\\\",beige:\\\"#f5f5dc\\\",bisque:\\\"#ffe4c4\\\",black:\\\"#000000\\\",blanchedalmond:\\\"#ffebcd\\\",blue:\\\"#0000ff\\\",blueviolet:\\\"#8a2be2\\\",brown:\\\"#a52a2a\\\",burlywood:\\\"#deb887\\\",cadetblue:\\\"#5f9ea0\\\",chartreuse:\\\"#7fff00\\\",chocolate:\\\"#d2691e\\\",coral:\\\"#ff7f50\\\",cornflowerblue:\\\"#6495ed\\\",cornsilk:\\\"#fff8dc\\\",crimson:\\\"#dc143c\\\",cyan:\\\"#00ffff\\\",darkblue:\\\"#00008b\\\",darkcyan:\\\"#008b8b\\\",darkgoldenrod:\\\"#b8860b\\\",darkgray:\\\"#a9a9a9\\\",darkgrey:\\\"#a9a9a9\\\",darkgreen:\\\"#006400\\\",darkkhaki:\\\"#bdb76b\\\",darkmagenta:\\\"#8b008b\\\",darkolivegreen:\\\"#556b2f\\\",darkorange:\\\"#ff8c00\\\",darkorchid:\\\"#9932cc\\\",darkred:\\\"#8b0000\\\",darksalmon:\\\"#e9967a\\\",darkseagreen:\\\"#8fbc8f\\\",darkslateblue:\\\"#483d8b\\\",darkslategray:\\\"#2f4f4f\\\",darkslategrey:\\\"#2f4f4f\\\",darkturquoise:\\\"#00ced1\\\",darkviolet:\\\"#9400d3\\\",deeppink:\\\"#ff1493\\\",deepskyblue:\\\"#00bfff\\\",dimgray:\\\"#696969\\\",dimgrey:\\\"#696969\\\",dodgerblue:\\\"#1e90ff\\\",firebrick:\\\"#b22222\\\",floralwhite:\\\"#fffaf0\\\",forestgreen:\\\"#228b22\\\",fuchsia:\\\"#ff00ff\\\",gainsboro:\\\"#dcdcdc\\\",ghostwhite:\\\"#f8f8ff\\\",gold:\\\"#ffd700\\\",goldenrod:\\\"#daa520\\\",gray:\\\"#808080\\\",grey:\\\"#808080\\\",green:\\\"#008000\\\",greenyellow:\\\"#adff2f\\\",honeydew:\\\"#f0fff0\\\",hotpink:\\\"#ff69b4\\\",indianred:\\\"#cd5c5c\\\",indigo:\\\"#4b0082\\\",ivory:\\\"#fffff0\\\",khaki:\\\"#f0e68c\\\",lavender:\\\"#e6e6fa\\\",lavenderblush:\\\"#fff0f5\\\",lawngreen:\\\"#7cfc00\\\",lemonchiffon:\\\"#fffacd\\\",lightblue:\\\"#add8e6\\\",lightcoral:\\\"#f08080\\\",lightcyan:\\\"#e0ffff\\\",lightgoldenrodyellow:\\\"#fafad2\\\",lightgray:\\\"#d3d3d3\\\",lightgrey:\\\"#d3d3d3\\\",lightgreen:\\\"#90ee90\\\",lightpink:\\\"#ffb6c1\\\",lightsalmon:\\\"#ffa07a\\\",lightseagreen:\\\"#20b2aa\\\",lightskyblue:\\\"#87cefa\\\",lightslategray:\\\"#778899\\\",lightslategrey:\\\"#778899\\\",lightsteelblue:\\\"#b0c4de\\\",lightyellow:\\\"#ffffe0\\\",lime:\\\"#00ff00\\\",limegreen:\\\"#32cd32\\\",linen:\\\"#faf0e6\\\",magenta:\\\"#ff00ff\\\",maroon:\\\"#800000\\\",mediumaquamarine:\\\"#66cdaa\\\",mediumblue:\\\"#0000cd\\\",mediumorchid:\\\"#ba55d3\\\",mediumpurple:\\\"#9370d8\\\",mediumseagreen:\\\"#3cb371\\\",mediumslateblue:\\\"#7b68ee\\\",mediumspringgreen:\\\"#00fa9a\\\",mediumturquoise:\\\"#48d1cc\\\",mediumvioletred:\\\"#c71585\\\",midnightblue:\\\"#191970\\\",mintcream:\\\"#f5fffa\\\",mistyrose:\\\"#ffe4e1\\\",moccasin:\\\"#ffe4b5\\\",navajowhite:\\\"#ffdead\\\",navy:\\\"#000080\\\",oldlace:\\\"#fdf5e6\\\",olive:\\\"#808000\\\",olivedrab:\\\"#6b8e23\\\",orange:\\\"#ffa500\\\",orangered:\\\"#ff4500\\\",orchid:\\\"#da70d6\\\",palegoldenrod:\\\"#eee8aa\\\",palegreen:\\\"#98fb98\\\",paleturquoise:\\\"#afeeee\\\",palevioletred:\\\"#d87093\\\",papayawhip:\\\"#ffefd5\\\",peachpuff:\\\"#ffdab9\\\",peru:\\\"#cd853f\\\",pink:\\\"#ffc0cb\\\",plum:\\\"#dda0dd\\\",powderblue:\\\"#b0e0e6\\\",purple:\\\"#800080\\\",red:\\\"#ff0000\\\",rosybrown:\\\"#bc8f8f\\\",royalblue:\\\"#4169e1\\\",saddlebrown:\\\"#8b4513\\\",salmon:\\\"#fa8072\\\",sandybrown:\\\"#f4a460\\\",seagreen:\\\"#2e8b57\\\",seashell:\\\"#fff5ee\\\",sienna:\\\"#a0522d\\\",silver:\\\"#c0c0c0\\\",skyblue:\\\"#87ceeb\\\",slateblue:\\\"#6a5acd\\\",slategray:\\\"#708090\\\",slategrey:\\\"#708090\\\",snow:\\\"#fffafa\\\",springgreen:\\\"#00ff7f\\\",steelblue:\\\"#4682b4\\\",tan:\\\"#d2b48c\\\",teal:\\\"#008080\\\",thistle:\\\"#d8bfd8\\\",tomato:\\\"#ff6347\\\",turquoise:\\\"#40e0d0\\\",violet:\\\"#ee82ee\\\",wheat:\\\"#f5deb3\\\",white:\\\"#ffffff\\\",whitesmoke:\\\"#f5f5f5\\\",yellow:\\\"#ffff00\\\",yellowgreen:\\\"#9acd32\\\",activeBorder:\\\"Active window border.\\\",activecaption:\\\"Active window caption.\\\",appworkspace:\\\"Background color of multiple document interface.\\\",background:\\\"Desktop background.\\\",buttonface:\\\"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttonhighlight:\\\"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttonshadow:\\\"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttontext:\\\"Text on push buttons.\\\",captiontext:\\\"Text in caption, size box, and scrollbar arrow box.\\\",graytext:\\\"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.\\\",greytext:\\\"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.\\\",highlight:\\\"Item(s) selected in a control.\\\",highlighttext:\\\"Text of item(s) selected in a control.\\\",inactiveborder:\\\"Inactive window border.\\\",inactivecaption:\\\"Inactive window caption.\\\",inactivecaptiontext:\\\"Color of text in an inactive caption.\\\",infobackground:\\\"Background color for tooltip controls.\\\",infotext:\\\"Text color for tooltip controls.\\\",menu:\\\"Menu background.\\\",menutext:\\\"Text in menus.\\\",scrollbar:\\\"Scroll bar gray area.\\\",threeddarkshadow:\\\"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedface:\\\"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedhighlight:\\\"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedlightshadow:\\\"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedshadow:\\\"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",window:\\\"Window background.\\\",windowframe:\\\"Window frame.\\\",windowtext:\\\"Text in windows.\\\"};Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator,MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,Parser.DEFAULT_TYPE=0,Parser.COMBINATOR_TYPE=1,Parser.MEDIA_FEATURE_TYPE=2,Parser.MEDIA_QUERY_TYPE=3,Parser.PROPERTY_NAME_TYPE=4,Parser.PROPERTY_VALUE_TYPE=5,Parser.PROPERTY_VALUE_PART_TYPE=6,Parser.SELECTOR_TYPE=7,Parser.SELECTOR_PART_TYPE=8,Parser.SELECTOR_SUB_PART_TYPE=9,Parser.prototype=function(){var prop,proto=new EventTarget,additions={constructor:Parser,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var count,token,tt,tokenStream=this._tokenStream;for(this.fire(\\\"startstylesheet\\\"),this._charset(),this._skipCruft();tokenStream.peek()==Tokens.IMPORT_SYM;)this._import(),this._skipCruft();for(;tokenStream.peek()==Tokens.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(tt=tokenStream.peek();tt>Tokens.EOF;){try{switch(tt){case Tokens.MEDIA_SYM:this._media(),this._skipCruft();break;case Tokens.PAGE_SYM:this._page(),this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case Tokens.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case Tokens.UNKNOWN_SYM:if(tokenStream.get(),this.options.strict)throw new SyntaxError(\\\"Unknown @ rule.\\\",tokenStream.LT(0).startLine,tokenStream.LT(0).startCol);for(this.fire({type:\\\"error\\\",error:null,message:\\\"Unknown @ rule: \\\"+tokenStream.LT(0).value+\\\".\\\",line:tokenStream.LT(0).startLine,col:tokenStream.LT(0).startCol}),count=0;tokenStream.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE;)count++;for(;count;)tokenStream.advance([Tokens.RBRACE]),count--;break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(tt){case Tokens.CHARSET_SYM:throw token=tokenStream.LT(1),this._charset(!1),new SyntaxError(\\\"@charset not allowed here.\\\",token.startLine,token.startCol);case Tokens.IMPORT_SYM:throw token=tokenStream.LT(1),this._import(!1),new SyntaxError(\\\"@import not allowed here.\\\",token.startLine,token.startCol);case Tokens.NAMESPACE_SYM:throw token=tokenStream.LT(1),this._namespace(!1),new SyntaxError(\\\"@namespace not allowed here.\\\",token.startLine,token.startCol);default:tokenStream.get(),this._unexpectedToken(tokenStream.token())}}}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col})}tt=tokenStream.peek()}tt!=Tokens.EOF&&this._unexpectedToken(tokenStream.token()),this.fire(\\\"endstylesheet\\\")},_charset:function(emit){var charset,token,line,col,tokenStream=this._tokenStream;tokenStream.match(Tokens.CHARSET_SYM)&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.mustMatch(Tokens.STRING),token=tokenStream.token(),charset=token.value,this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),emit!==!1&&this.fire({type:\\\"charset\\\",charset:charset,line:line,col:col}))},_import:function(emit){var uri,importToken,tokenStream=this._tokenStream,mediaList=[];tokenStream.mustMatch(Tokens.IMPORT_SYM),importToken=tokenStream.token(),this._readWhitespace(),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/^(?:url\\\\()?[\\\"']?([^\\\"']+?)[\\\"']?\\\\)?$/,\\\"$1\\\"),this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:\\\"import\\\",uri:uri,media:mediaList,line:importToken.startLine,col:importToken.startCol})},_namespace:function(emit){var line,col,prefix,uri,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.NAMESPACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(prefix=tokenStream.token().value,this._readWhitespace()),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/(?:url\\\\()?[\\\"']([^\\\"']+)[\\\"']\\\\)?/,\\\"$1\\\"),this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:\\\"namespace\\\",prefix:prefix,uri:uri,line:line,col:col})},_media:function(){var line,col,mediaList,tokenStream=this._tokenStream;for(tokenStream.mustMatch(Tokens.MEDIA_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:\\\"startmedia\\\",media:mediaList,line:line,col:col});;)if(tokenStream.peek()==Tokens.PAGE_SYM)this._page();else if(tokenStream.peek()==Tokens.FONT_FACE_SYM)this._font_face();else if(tokenStream.peek()==Tokens.VIEWPORT_SYM)this._viewport();else if(!this._ruleset())break;tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:\\\"endmedia\\\",media:mediaList,line:line,col:col})},_media_query_list:function(){var tokenStream=this._tokenStream,mediaList=[];for(this._readWhitespace(),(tokenStream.peek()==Tokens.IDENT||tokenStream.peek()==Tokens.LPAREN)&&mediaList.push(this._media_query());tokenStream.match(Tokens.COMMA);)this._readWhitespace(),mediaList.push(this._media_query());return mediaList},_media_query:function(){var tokenStream=this._tokenStream,type=null,ident=null,token=null,expressions=[];if(tokenStream.match(Tokens.IDENT)&&(ident=tokenStream.token().value.toLowerCase(),\\\"only\\\"!=ident&&\\\"not\\\"!=ident?(tokenStream.unget(),ident=null):token=tokenStream.token()),this._readWhitespace(),tokenStream.peek()==Tokens.IDENT?(type=this._media_type(),null===token&&(token=tokenStream.token())):tokenStream.peek()==Tokens.LPAREN&&(null===token&&(token=tokenStream.LT(1)),expressions.push(this._media_expression())),null===type&&0===expressions.length)return null;for(this._readWhitespace();tokenStream.match(Tokens.IDENT);)\\\"and\\\"!=tokenStream.token().value.toLowerCase()&&this._unexpectedToken(tokenStream.token()),this._readWhitespace(),expressions.push(this._media_expression());return new MediaQuery(ident,type,expressions,token.startLine,token.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var token,tokenStream=this._tokenStream,feature=null,expression=null;return tokenStream.mustMatch(Tokens.LPAREN),this._readWhitespace(),feature=this._media_feature(),this._readWhitespace(),tokenStream.match(Tokens.COLON)&&(this._readWhitespace(),token=tokenStream.LT(1),expression=this._expression()),tokenStream.mustMatch(Tokens.RPAREN),this._readWhitespace(),new MediaFeature(feature,expression?new SyntaxUnit(expression,token.startLine,token.startCol):null)},_media_feature:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.IDENT),SyntaxUnit.fromToken(tokenStream.token())},_page:function(){var line,col,tokenStream=this._tokenStream,identifier=null,pseudoPage=null;tokenStream.mustMatch(Tokens.PAGE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(identifier=tokenStream.token().value,\\\"auto\\\"===identifier.toLowerCase()&&this._unexpectedToken(tokenStream.token())),tokenStream.peek()==Tokens.COLON&&(pseudoPage=this._pseudo_page()),this._readWhitespace(),this.fire({type:\\\"startpage\\\",id:identifier,pseudo:pseudoPage,line:line,col:col}),this._readDeclarations(!0,!0),this.fire({type:\\\"endpage\\\",id:identifier,pseudo:pseudoPage,line:line,col:col})},_margin:function(){var line,col,tokenStream=this._tokenStream,marginSym=this._margin_sym();return marginSym?(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this.fire({type:\\\"startpagemargin\\\",margin:marginSym,line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endpagemargin\\\",margin:marginSym,line:line,col:col}),!0):!1},_margin_sym:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])?SyntaxUnit.fromToken(tokenStream.token()):null},_pseudo_page:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.COLON),tokenStream.mustMatch(Tokens.IDENT),tokenStream.token().value},_font_face:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.FONT_FACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:\\\"startfontface\\\",line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endfontface\\\",line:line,col:col})},_viewport:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.VIEWPORT_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:\\\"startviewport\\\",line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endviewport\\\",line:line,col:col})},_operator:function(inFunction){var tokenStream=this._tokenStream,token=null;return(tokenStream.match([Tokens.SLASH,Tokens.COMMA])||inFunction&&tokenStream.match([Tokens.PLUS,Tokens.STAR,Tokens.MINUS]))&&(token=tokenStream.token(),this._readWhitespace()),token?PropertyValuePart.fromToken(token):null},_combinator:function(){var token,tokenStream=this._tokenStream,value=null;return tokenStream.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(token=tokenStream.token(),value=new Combinator(token.value,token.startLine,token.startCol),this._readWhitespace()),value},_unary_operator:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.MINUS,Tokens.PLUS])?tokenStream.token().value:null},_property:function(){var tokenValue,token,line,col,tokenStream=this._tokenStream,value=null,hack=null;return tokenStream.peek()==Tokens.STAR&&this.options.starHack&&(tokenStream.get(),token=tokenStream.token(),hack=token.value,line=token.startLine,col=token.startCol),tokenStream.match(Tokens.IDENT)&&(token=tokenStream.token(),tokenValue=token.value,\\\"_\\\"==tokenValue.charAt(0)&&this.options.underscoreHack&&(hack=\\\"_\\\",tokenValue=tokenValue.substring(1)),value=new PropertyName(tokenValue,hack,line||token.startLine,col||token.startCol),this._readWhitespace()),value},_ruleset:function(){var tt,selectors,tokenStream=this._tokenStream;try{selectors=this._selectors_group()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.RBRACE]),tt!=Tokens.RBRACE)throw ex;return!0}return selectors&&(this.fire({type:\\\"startrule\\\",selectors:selectors,line:selectors[0].line,col:selectors[0].col}),this._readDeclarations(!0),this.fire({type:\\\"endrule\\\",selectors:selectors,line:selectors[0].line,col:selectors[0].col})),selectors},_selectors_group:function(){var selector,tokenStream=this._tokenStream,selectors=[];if(selector=this._selector(),null!==selector)for(selectors.push(selector);tokenStream.match(Tokens.COMMA);)this._readWhitespace(),selector=this._selector(),null!==selector?selectors.push(selector):this._unexpectedToken(tokenStream.LT(1));return selectors.length?selectors:null},_selector:function(){var tokenStream=this._tokenStream,selector=[],nextSelector=null,combinator=null,ws=null;if(nextSelector=this._simple_selector_sequence(),null===nextSelector)return null;for(selector.push(nextSelector);;)if(combinator=this._combinator(),null!==combinator)selector.push(combinator),nextSelector=this._simple_selector_sequence(),null===nextSelector?this._unexpectedToken(tokenStream.LT(1)):selector.push(nextSelector);else{if(!this._readWhitespace())break;ws=new Combinator(tokenStream.token().value,tokenStream.token().startLine,tokenStream.token().startCol),combinator=this._combinator(),nextSelector=this._simple_selector_sequence(),null===nextSelector?null!==combinator&&this._unexpectedToken(tokenStream.LT(1)):(null!==combinator?selector.push(combinator):selector.push(ws),selector.push(nextSelector))}return new Selector(selector,selector[0].line,selector[0].col)},_simple_selector_sequence:function(){var line,col,tokenStream=this._tokenStream,elementName=null,modifiers=[],selectorText=\\\"\\\",components=[function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,\\\"id\\\",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],i=0,len=components.length,component=null;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol,elementName=this._type_selector(),elementName||(elementName=this._universal()),null!==elementName&&(selectorText+=elementName);;){if(tokenStream.peek()===Tokens.S)break;for(;len>i&&null===component;)component=components[i++].call(this);if(null===component){if(\\\"\\\"===selectorText)return null;break}i=0,modifiers.push(component),selectorText+=\\\"\\\"+component,component=null}return\\\"\\\"!==selectorText?new SelectorPart(elementName,modifiers,selectorText,line,col):null},_type_selector:function(){var tokenStream=this._tokenStream,ns=this._namespace_prefix(),elementName=this._element_name();return elementName?(ns&&(elementName.text=ns+elementName.text,elementName.col-=ns.length),elementName):(ns&&(tokenStream.unget(),ns.length>1&&tokenStream.unget()),null)},_class:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.DOT)?(tokenStream.mustMatch(Tokens.IDENT),token=tokenStream.token(),new SelectorSubPart(\\\".\\\"+token.value,\\\"class\\\",token.startLine,token.startCol-1)):null},_element_name:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.IDENT)?(token=tokenStream.token(),new SelectorSubPart(token.value,\\\"elementName\\\",token.startLine,token.startCol)):null},_namespace_prefix:function(){var tokenStream=this._tokenStream,value=\\\"\\\";return(tokenStream.LA(1)===Tokens.PIPE||tokenStream.LA(2)===Tokens.PIPE)&&(tokenStream.match([Tokens.IDENT,Tokens.STAR])&&(value+=tokenStream.token().value),tokenStream.mustMatch(Tokens.PIPE),value+=\\\"|\\\"),value.length?value:null},_universal:function(){var ns,tokenStream=this._tokenStream,value=\\\"\\\";return ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.match(Tokens.STAR)&&(value+=\\\"*\\\"),value.length?value:null},_attrib:function(){var ns,token,tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.LBRACKET)?(token=tokenStream.token(),value=token.value,value+=this._readWhitespace(),ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.mustMatch(Tokens.IDENT),value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),value+=tokenStream.token().value,value+=this._readWhitespace()),tokenStream.mustMatch(Tokens.RBRACKET),new SelectorSubPart(value+\\\"]\\\",\\\"attribute\\\",token.startLine,token.startCol)):null},_pseudo:function(){var line,col,tokenStream=this._tokenStream,pseudo=null,colons=\\\":\\\";return tokenStream.match(Tokens.COLON)&&(tokenStream.match(Tokens.COLON)&&(colons+=\\\":\\\"),tokenStream.match(Tokens.IDENT)?(pseudo=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol-colons.length):tokenStream.peek()==Tokens.FUNCTION&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol-colons.length,pseudo=this._functional_pseudo()),pseudo&&(pseudo=new SelectorSubPart(colons+pseudo,\\\"pseudo\\\",line,col))),pseudo},_functional_pseudo:function(){var tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.FUNCTION)&&(value=tokenStream.token().value,value+=this._readWhitespace(),value+=this._expression(),tokenStream.mustMatch(Tokens.RPAREN),value+=\\\")\\\"),value},_expression:function(){for(var tokenStream=this._tokenStream,value=\\\"\\\";tokenStream.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION,Tokens.SLASH]);)value+=tokenStream.token().value,value+=this._readWhitespace();return value.length?value:null},_negation:function(){var line,col,arg,tokenStream=this._tokenStream,value=\\\"\\\",subpart=null;return tokenStream.match(Tokens.NOT)&&(value=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol,value+=this._readWhitespace(),arg=this._negation_arg(),value+=arg,value+=this._readWhitespace(),tokenStream.match(Tokens.RPAREN),value+=tokenStream.token().value,subpart=new SelectorSubPart(value,\\\"not\\\",line,col),subpart.args.push(arg)),subpart},_negation_arg:function(){var line,col,part,tokenStream=this._tokenStream,args=[this._type_selector,this._universal,function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,\\\"id\\\",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo],arg=null,i=0,len=args.length;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol;len>i&&null===arg;)arg=args[i].call(this),i++;return null===arg&&this._unexpectedToken(tokenStream.LT(1)),part=\\\"elementName\\\"==arg.type?new SelectorPart(arg,[],\\\"\\\"+arg,line,col):new SelectorPart(null,[arg],\\\"\\\"+arg,line,col)},_declaration:function(){var tokenStream=this._tokenStream,property=null,expr=null,prio=null,invalid=null,propertyName=\\\"\\\";if(property=this._property(),null!==property){tokenStream.mustMatch(Tokens.COLON),this._readWhitespace(),expr=this._expr(),expr&&0!==expr.length||this._unexpectedToken(tokenStream.LT(1)),prio=this._prio(),propertyName=\\\"\\\"+property,(this.options.starHack&&\\\"*\\\"==property.hack||this.options.underscoreHack&&\\\"_\\\"==property.hack)&&(propertyName=property.text);try{this._validateProperty(propertyName,expr)}catch(ex){invalid=ex}return this.fire({type:\\\"property\\\",property:property,value:expr,important:prio,line:property.line,col:property.col,invalid:invalid}),!0}return!1},_prio:function(){var tokenStream=this._tokenStream,result=tokenStream.match(Tokens.IMPORTANT_SYM);return this._readWhitespace(),result},_expr:function(inFunction){var values=(this._tokenStream,[]),value=null,operator=null;if(value=this._term(inFunction),null!==value)for(values.push(value);;){if(operator=this._operator(inFunction),operator&&values.push(operator),value=this._term(inFunction),null===value)break;\\nvalues.push(value)}return values.length>0?new PropertyValue(values,values[0].line,values[0].col):null},_term:function(inFunction){var token,line,col,tokenStream=this._tokenStream,unary=null,value=null,endChar=null;return unary=this._unary_operator(),null!==unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(value=this._ie_function(),null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol)):inFunction&&tokenStream.match([Tokens.LPAREN,Tokens.LBRACE,Tokens.LBRACKET])?(token=tokenStream.token(),endChar=token.endChar,value=token.value+this._expr(inFunction).text,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.mustMatch(Tokens.type(endChar)),value+=endChar,this._readWhitespace()):tokenStream.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(value=tokenStream.token().value,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),this._readWhitespace()):(token=this._hexcolor(),null===token?(null===unary&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol),null===value&&(value=tokenStream.LA(3)==Tokens.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(value=token.value,null===unary&&(line=token.startLine,col=token.startCol))),null!==value?new PropertyValuePart(null!==unary?unary+value:value,line,col):null},_function:function(){var lt,tokenStream=this._tokenStream,functionText=null,expr=null;if(tokenStream.match(Tokens.FUNCTION)){if(functionText=tokenStream.token().value,this._readWhitespace(),expr=this._expr(!0),functionText+=expr,this.options.ieFilters&&tokenStream.peek()==Tokens.EQUALS)do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&<!=Tokens.S&<!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=\\\")\\\",this._readWhitespace()}return functionText},_ie_function:function(){var lt,tokenStream=this._tokenStream,functionText=null;if(tokenStream.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){functionText=tokenStream.token().value;do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&<!=Tokens.S&<!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=\\\")\\\",this._readWhitespace()}return functionText},_hexcolor:function(){var color,tokenStream=this._tokenStream,token=null;if(tokenStream.match(Tokens.HASH)){if(token=tokenStream.token(),color=token.value,!/#[a-f0-9]{3,6}/i.test(color))throw new SyntaxError(\\\"Expected a hex color but found '\\\"+color+\\\"' at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol);this._readWhitespace()}return token},_keyframes:function(){var token,tt,name,tokenStream=this._tokenStream,prefix=\\\"\\\";for(tokenStream.mustMatch(Tokens.KEYFRAMES_SYM),token=tokenStream.token(),/^@\\\\-([^\\\\-]+)\\\\-/.test(token.value)&&(prefix=RegExp.$1),this._readWhitespace(),name=this._keyframe_name(),this._readWhitespace(),tokenStream.mustMatch(Tokens.LBRACE),this.fire({type:\\\"startkeyframes\\\",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tt=tokenStream.peek();tt==Tokens.IDENT||tt==Tokens.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),tt=tokenStream.peek();this.fire({type:\\\"endkeyframes\\\",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tokenStream.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),SyntaxUnit.fromToken(tokenStream.token())},_keyframe_rule:function(){var keyList=(this._tokenStream,this._key_list());this.fire({type:\\\"startkeyframerule\\\",keys:keyList,line:keyList[0].line,col:keyList[0].col}),this._readDeclarations(!0),this.fire({type:\\\"endkeyframerule\\\",keys:keyList,line:keyList[0].line,col:keyList[0].col})},_key_list:function(){var tokenStream=this._tokenStream,keyList=[];for(keyList.push(this._key()),this._readWhitespace();tokenStream.match(Tokens.COMMA);)this._readWhitespace(),keyList.push(this._key()),this._readWhitespace();return keyList},_key:function(){var token,tokenStream=this._tokenStream;if(tokenStream.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(tokenStream.token());if(tokenStream.match(Tokens.IDENT)){if(token=tokenStream.token(),/from|to/i.test(token.value))return SyntaxUnit.fromToken(token);tokenStream.unget()}this._unexpectedToken(tokenStream.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]););},_readDeclarations:function(checkStart,readMargins){var tt,tokenStream=this._tokenStream;this._readWhitespace(),checkStart&&tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(tokenStream.match(Tokens.SEMICOLON)||readMargins&&this._margin());else{if(!this._declaration())break;if(!tokenStream.match(Tokens.SEMICOLON))break}this._readWhitespace()}tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.SEMICOLON,Tokens.RBRACE]),tt==Tokens.SEMICOLON)this._readDeclarations(!1,readMargins);else if(tt!=Tokens.RBRACE)throw ex}},_readWhitespace:function(){for(var tokenStream=this._tokenStream,ws=\\\"\\\";tokenStream.match(Tokens.S);)ws+=tokenStream.token().value;return ws},_unexpectedToken:function(token){throw new SyntaxError(\\\"Unexpected token '\\\"+token.value+\\\"' at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(property,value){Validation.validate(property,value)},parse:function(input){this._tokenStream=new TokenStream(input,Tokens),this._stylesheet()},parseStyleSheet:function(input){return this.parse(input)},parseMediaQuery:function(input){this._tokenStream=new TokenStream(input,Tokens);var result=this._media_query();return this._verifyEnd(),result},parsePropertyValue:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._expr();return this._readWhitespace(),this._verifyEnd(),result},parseRule:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._ruleset();return this._readWhitespace(),this._verifyEnd(),result},parseSelector:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._selector();return this._readWhitespace(),this._verifyEnd(),result},parseStyleAttribute:function(input){input+=\\\"}\\\",this._tokenStream=new TokenStream(input,Tokens),this._readDeclarations()}};for(prop in additions)additions.hasOwnProperty(prop)&&(proto[prop]=additions[prop]);return proto}();var Properties={\\\"align-items\\\":\\\"flex-start | flex-end | center | baseline | stretch\\\",\\\"align-content\\\":\\\"flex-start | flex-end | center | space-between | space-around | stretch\\\",\\\"align-self\\\":\\\"auto | flex-start | flex-end | center | baseline | stretch\\\",\\\"-webkit-align-items\\\":\\\"flex-start | flex-end | center | baseline | stretch\\\",\\\"-webkit-align-content\\\":\\\"flex-start | flex-end | center | space-between | space-around | stretch\\\",\\\"-webkit-align-self\\\":\\\"auto | flex-start | flex-end | center | baseline | stretch\\\",\\\"alignment-adjust\\\":\\\"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | \\\",\\\"alignment-baseline\\\":\\\"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical\\\",animation:1,\\\"animation-delay\\\":{multi:\\\"
    directive.\n var ignorePreventDefaultCount_1 = type.isAnchor && !target.href ? 1 : 0;\n e.preventDefault = function () {\n if (ignorePreventDefaultCount_1-- <= 0)\n $timeout.cancel(transition_1);\n };\n }\n };\n }\n /** @hidden */\n function defaultOpts(el, $state) {\n return {\n relative: stateContext(el) || $state.$current,\n inherit: true,\n source: 'sref',\n };\n }\n /** @hidden */\n function bindEvents(element, scope, hookFn, uiStateOpts) {\n var events;\n if (uiStateOpts) {\n events = uiStateOpts.events;\n }\n if (!isArray(events)) {\n events = ['click'];\n }\n var on = element.on ? 'on' : 'bind';\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n element[on](event_1, hookFn);\n }\n scope.$on('$destroy', function () {\n var off = element.off ? 'off' : 'unbind';\n for (var _i = 0, events_2 = events; _i < events_2.length; _i++) {\n var event_2 = events_2[_i];\n element[off](event_2, hookFn);\n }\n });\n }\n /**\n * `ui-sref`: A directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of the `ui-sref` is the name of the state to link to.\n *\n * #### Example:\n * This will activate the `home` state when the link is clicked.\n * ```html\n * Home\n * ```\n *\n * ### Relative Links\n * You can also use relative state paths within `ui-sref`, just like a relative path passed to `$state.go()` ([[StateService.go]]).\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create a relative `ui-sref` which always targets the same destination.\n *\n * #### Example:\n * Both these links are relative to the parent state, even when a child state is currently active.\n * ```html\n * child 1 state\n * child 2 state\n * ```\n *\n * This link activates the parent state.\n * ```html\n * Return\n * ```\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * #### Example:\n * Assuming the `users` state has a url of `/users/`\n * ```html\n * Users\n * ```\n *\n * ### Parameter Values\n * In addition to the state name, a `ui-sref` can include parameter values which are applied when activating the state.\n * Param values can be provided in the `ui-sref` value after the state name, enclosed by parentheses.\n * The content inside the parentheses is an expression, evaluated to the parameter values.\n *\n * #### Example:\n * This example renders a list of links to users.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ user.displayName }}\n *
  • \n * ```\n *\n * Note:\n * The parameter values expression is `$watch`ed for updates.\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-sref-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-sref-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Examples\n * If you have the following template:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n * \n * ```\n *\n * Then (assuming the current state is `contacts`) the rendered html including hrefs would be:\n *\n * ```html\n * Home\n * About\n * Next page\n *\n *
      \n *
    • \n * Joe\n *
    • \n *
    • \n * Alice\n *
    • \n *
    • \n * Bob\n *
    • \n *
    \n *\n * Home\n * ```\n *\n * ### Notes\n *\n * - You can use `ui-sref` to change **only the parameter values** by omitting the state name and parentheses.\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n *\n * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).\n * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.\n */\n var uiSrefDirective;\n uiSrefDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var ref = parseStateRef(attrs.uiSref);\n rawDef.uiState = ref.state;\n rawDef.uiStateOpts = attrs.uiSrefOpts ? scope.$eval(attrs.uiSrefOpts) : {};\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n if (ref.paramExpr) {\n scope.$watch(ref.paramExpr, function (val) {\n rawDef.uiStateParams = extend({}, val);\n update();\n }, true);\n rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));\n }\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n var hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n ];\n /**\n * `ui-state`: A fully dynamic directive for linking to a state\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * **This directive is very similar to [[uiSref]], but it `$observe`s and `$watch`es/evaluates all its inputs.**\n *\n * A directive which links to a state (and optionally, parameters).\n * When clicked, this directive activates the linked state with the supplied parameter values.\n *\n * ### Linked State\n * The attribute value of `ui-state` is an expression which is `$watch`ed and evaluated as the state to link to.\n * **This is in contrast with `ui-sref`, which takes a state name as a string literal.**\n *\n * #### Example:\n * Create a list of links.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Relative Links\n * If the expression evaluates to a relative path, it is processed like [[uiSref]].\n * You just need to be aware that the path is relative to the state that *created* the link.\n * This allows a state to create relative `ui-state` which always targets the same destination.\n *\n * ### hrefs\n * If the linked state has a URL, the directive will automatically generate and\n * update the `href` attribute (using the [[StateService.href]] method).\n *\n * ### Parameter Values\n * In addition to the state name expression, a `ui-state` can include parameter values which are applied when activating the state.\n * Param values should be provided using the `ui-state-params` attribute.\n * The `ui-state-params` attribute value is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * This example renders a list of links with param values.\n * The state's `userId` parameter value comes from each user's `user.id` property.\n * ```html\n *
  • \n * {{ link.displayName }}\n *
  • \n * ```\n *\n * ### Transition Options\n * You can specify [[TransitionOptions]] to pass to [[StateService.go]] by using the `ui-state-opts` attribute.\n * Options are restricted to `location`, `inherit`, and `reload`.\n * The value of the `ui-state-opts` is `$watch`ed and evaluated as an expression.\n *\n * #### Example:\n * ```html\n * Home\n * ```\n *\n * ### Other DOM Events\n *\n * You can also customize which DOM events to respond to (instead of `click`) by\n * providing an `events` array in the `ui-state-opts` attribute.\n *\n * #### Example:\n * ```html\n * \n * ```\n *\n * ### Highlighting the active link\n * This directive can be used in conjunction with [[uiSrefActive]] to highlight the active link.\n *\n * ### Notes\n *\n * - You can use `ui-params` to change **only the parameter values** by omitting the state name and supplying only `ui-state-params`.\n * However, it might be simpler to use [[uiSref]] parameter-only links.\n *\n * #### Example:\n * Sets the `lang` parameter to `en` and remains on the same state.\n *\n * ```html\n * English\n * ```\n *\n * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.\n * ```\n */\n var uiStateDirective;\n uiStateDirective = [\n '$uiRouter',\n '$timeout',\n function $StateRefDynamicDirective($uiRouter, $timeout) {\n var $state = $uiRouter.stateService;\n return {\n restrict: 'A',\n require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n link: function (scope, element, attrs, uiSrefActive) {\n var type = getTypeInfo(element);\n var active = uiSrefActive[1] || uiSrefActive[0];\n var unlinkInfoFn = null;\n var hookFn;\n var rawDef = {};\n var getDef = function () { return processedDef($state, element, rawDef); };\n var inputAttrs = ['uiState', 'uiStateParams', 'uiStateOpts'];\n var watchDeregFns = inputAttrs.reduce(function (acc, attr) { return ((acc[attr] = noop), acc); }, {});\n function update() {\n var def = getDef();\n if (unlinkInfoFn)\n unlinkInfoFn();\n if (active)\n unlinkInfoFn = active.$$addStateInfo(def.uiState, def.uiStateParams);\n if (def.href != null)\n attrs.$set(type.attr, def.href);\n }\n inputAttrs.forEach(function (field) {\n rawDef[field] = attrs[field] ? scope.$eval(attrs[field]) : null;\n attrs.$observe(field, function (expr) {\n watchDeregFns[field]();\n watchDeregFns[field] = scope.$watch(expr, function (newval) {\n rawDef[field] = newval;\n update();\n }, true);\n });\n });\n update();\n scope.$on('$destroy', $uiRouter.stateRegistry.onStatesChanged(update));\n scope.$on('$destroy', $uiRouter.transitionService.onSuccess({}, update));\n if (!type.clickable)\n return;\n hookFn = clickHook(element, $state, $timeout, type, getDef);\n bindEvents(element, scope, hookFn, rawDef.uiStateOpts);\n },\n };\n },\n ];\n /**\n * `ui-sref-active` and `ui-sref-active-eq`: A directive that adds a CSS class when a `ui-sref` is active\n *\n * A directive working alongside [[uiSref]] and [[uiState]] to add classes to an element when the\n * related directive's state is active (and remove them when it is inactive).\n *\n * The primary use-case is to highlight the active link in navigation menus,\n * distinguishing it from the inactive menu items.\n *\n * ### Linking to a `ui-sref` or `ui-state`\n * `ui-sref-active` can live on the same element as `ui-sref`/`ui-state`, or it can be on a parent element.\n * If a `ui-sref-active` is a parent to more than one `ui-sref`/`ui-state`, it will apply the CSS class when **any of the links are active**.\n *\n * ### Matching\n *\n * The `ui-sref-active` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state **or any child state is active**.\n * This is a \"fuzzy match\" which uses [[StateService.includes]].\n *\n * The `ui-sref-active-eq` directive applies the CSS class when the `ui-sref`/`ui-state`'s target state is directly active (not when child states are active).\n * This is an \"exact match\" which uses [[StateService.is]].\n *\n * ### Parameter values\n * If the `ui-sref`/`ui-state` includes parameter values, the current parameter values must match the link's values for the link to be highlighted.\n * This allows a list of links to the same state with different parameters to be rendered, and the correct one highlighted.\n *\n * #### Example:\n * ```html\n *
  • \n * {{ user.lastName }}\n *
  • \n * ```\n *\n * ### Examples\n *\n * Given the following template:\n * #### Example:\n * ```html\n * \n * ```\n *\n * When the app state is `app.user` (or any child state),\n * and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n *\n * ```html\n * \n * ```\n *\n * ### Glob mode\n *\n * It is possible to pass `ui-sref-active` an expression that evaluates to an object.\n * The objects keys represent active class names and values represent the respective state names/globs.\n * `ui-sref-active` will match if the current active state **includes** any of\n * the specified state names/globs, even the abstract ones.\n *\n * #### Example:\n * Given the following template, with \"admin\" being an abstract state:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * Arrays are also supported as values in the `ngClass`-like interface.\n * This allows multiple states to add `active` class.\n *\n * #### Example:\n * Given the following template, with \"admin.roles\" being the current state, the class will be added too:\n * ```html\n *
    \n * Roles\n *
    \n * ```\n *\n * When the current state is \"admin.roles\" the \"active\" class will be applied to both the `
    ` and `` elements.\n * It is important to note that the state names/globs passed to `ui-sref-active` override any state provided by a linked `ui-sref`.\n *\n * ### Notes:\n *\n * - The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`\n */\n var uiSrefActiveDirective;\n uiSrefActiveDirective = [\n '$state',\n '$stateParams',\n '$interpolate',\n '$uiRouter',\n function $StateRefActiveDirective($state, $stateParams, $interpolate, $uiRouter) {\n return {\n restrict: 'A',\n controller: [\n '$scope',\n '$element',\n '$attrs',\n function ($scope, $element, $attrs) {\n var states = [];\n var activeEqClass;\n var uiSrefActive;\n // There probably isn't much point in $observing this\n // uiSrefActive and uiSrefActiveEq share the same directive object with some\n // slight difference in logic routing\n activeEqClass = $interpolate($attrs.uiSrefActiveEq || '', false)($scope);\n try {\n uiSrefActive = $scope.$eval($attrs.uiSrefActive);\n }\n catch (e) {\n // Do nothing. uiSrefActive is not a valid expression.\n // Fall back to using $interpolate below\n }\n uiSrefActive = uiSrefActive || $interpolate($attrs.uiSrefActive || '', false)($scope);\n setStatesFromDefinitionObject(uiSrefActive);\n // Allow uiSref to communicate with uiSrefActive[Equals]\n this.$$addStateInfo = function (newState, newParams) {\n // we already got an explicit state provided by ui-sref-active, so we\n // shadow the one that comes from ui-sref\n if (isObject(uiSrefActive) && states.length > 0) {\n return;\n }\n var deregister = addState(newState, newParams, uiSrefActive);\n update();\n return deregister;\n };\n function updateAfterTransition(trans) {\n trans.promise.then(update, noop);\n }\n $scope.$on('$destroy', setupEventListeners());\n if ($uiRouter.globals.transition) {\n updateAfterTransition($uiRouter.globals.transition);\n }\n function setupEventListeners() {\n var deregisterStatesChangedListener = $uiRouter.stateRegistry.onStatesChanged(handleStatesChanged);\n var deregisterOnStartListener = $uiRouter.transitionService.onStart({}, updateAfterTransition);\n var deregisterStateChangeSuccessListener = $scope.$on('$stateChangeSuccess', update);\n return function cleanUp() {\n deregisterStatesChangedListener();\n deregisterOnStartListener();\n deregisterStateChangeSuccessListener();\n };\n }\n function handleStatesChanged() {\n setStatesFromDefinitionObject(uiSrefActive);\n }\n function setStatesFromDefinitionObject(statesDefinition) {\n if (isObject(statesDefinition)) {\n states = [];\n forEach(statesDefinition, function (stateOrName, activeClass) {\n // Helper function to abstract adding state.\n var addStateForClass = function (stateOrName, activeClass) {\n var ref = parseStateRef(stateOrName);\n addState(ref.state, $scope.$eval(ref.paramExpr), activeClass);\n };\n if (isString(stateOrName)) {\n // If state is string, just add it.\n addStateForClass(stateOrName, activeClass);\n }\n else if (isArray(stateOrName)) {\n // If state is an array, iterate over it and add each array item individually.\n forEach(stateOrName, function (stateOrName) {\n addStateForClass(stateOrName, activeClass);\n });\n }\n });\n }\n }\n function addState(stateName, stateParams, activeClass) {\n var state = $state.get(stateName, stateContext($element));\n var stateInfo = {\n state: state || { name: stateName },\n params: stateParams,\n activeClass: activeClass,\n };\n states.push(stateInfo);\n return function removeState() {\n removeFrom(states)(stateInfo);\n };\n }\n // Update route state\n function update() {\n var splitClasses = function (str) { return str.split(/\\s/).filter(identity); };\n var getClasses = function (stateList) {\n return stateList\n .map(function (x) { return x.activeClass; })\n .map(splitClasses)\n .reduce(unnestR, []);\n };\n var allClasses = getClasses(states).concat(splitClasses(activeEqClass)).reduce(uniqR, []);\n var fuzzyClasses = getClasses(states.filter(function (x) { return $state.includes(x.state.name, x.params); }));\n var exactlyMatchesAny = !!states.filter(function (x) { return $state.is(x.state.name, x.params); }).length;\n var exactClasses = exactlyMatchesAny ? splitClasses(activeEqClass) : [];\n var addClasses = fuzzyClasses.concat(exactClasses).reduce(uniqR, []);\n var removeClasses = allClasses.filter(function (cls) { return !inArray(addClasses, cls); });\n $scope.$evalAsync(function () {\n addClasses.forEach(function (className) { return $element.addClass(className); });\n removeClasses.forEach(function (className) { return $element.removeClass(className); });\n });\n }\n update();\n },\n ],\n };\n },\n ];\n ng\n .module('ui.router.state')\n .directive('uiSref', uiSrefDirective)\n .directive('uiSrefActive', uiSrefActiveDirective)\n .directive('uiSrefActiveEq', uiSrefActiveDirective)\n .directive('uiState', uiStateDirective);\n\n /** @publicapi @module ng1 */ /** */\n /**\n * `isState` Filter: truthy if the current state is the parameter\n *\n * Translates to [[StateService.is]] `$state.is(\"stateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state is 'stateName'
    \n * ```\n */\n $IsStateFilter.$inject = ['$state'];\n function $IsStateFilter($state) {\n var isFilter = function (state, params, options) {\n return $state.is(state, params, options);\n };\n isFilter.$stateful = true;\n return isFilter;\n }\n /**\n * `includedByState` Filter: truthy if the current state includes the parameter\n *\n * Translates to [[StateService.includes]]` $state.is(\"fullOrPartialStateName\")`.\n *\n * #### Example:\n * ```html\n *
    show if state includes 'fullOrPartialStateName'
    \n * ```\n */\n $IncludedByStateFilter.$inject = ['$state'];\n function $IncludedByStateFilter($state) {\n var includesFilter = function (state, params, options) {\n return $state.includes(state, params, options);\n };\n includesFilter.$stateful = true;\n return includesFilter;\n }\n ng.module('ui.router.state').filter('isState', $IsStateFilter).filter('includedByState', $IncludedByStateFilter);\n\n /** @publicapi @module directives */ /** */\n /**\n * `ui-view`: A viewport directive which is filled in by a view from the active state.\n *\n * ### Attributes\n *\n * - `name`: (Optional) A view name.\n * The name should be unique amongst the other views in the same state.\n * You can have views of the same name that live in different states.\n * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).\n *\n * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.\n * Uses [[$uiViewScroll]] to do the scrolling.\n *\n * - `onload`: Expression to evaluate whenever the view updates.\n *\n * #### Example:\n * A view can be unnamed or named.\n * ```html\n * \n *
    \n *\n * \n *
    \n *\n * \n * \n * ```\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a\n * single view and it is unnamed then you can populate it like so:\n *\n * ```html\n *
    \n * $stateProvider.state(\"home\", {\n * template: \"

    HELLO!

    \"\n * })\n * ```\n *\n * The above is a convenient shortcut equivalent to specifying your view explicitly with the\n * [[Ng1StateDeclaration.views]] config property, by name, in this case an empty name:\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * But typically you'll only use the views property if you name your view or have more than one view\n * in the same template. There's not really a compelling reason to name a view if its the only one,\n * but you could if you wanted, like so:\n *\n * ```html\n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"main\": {\n * template: \"

    HELLO!

    \"\n * }\n * }\n * })\n * ```\n *\n * Really though, you'll use views to set up multiple views:\n *\n * ```html\n *
    \n *
    \n *
    \n * ```\n *\n * ```js\n * $stateProvider.state(\"home\", {\n * views: {\n * \"\": {\n * template: \"

    HELLO!

    \"\n * },\n * \"chart\": {\n * template: \"\"\n * },\n * \"data\": {\n * template: \"\"\n * }\n * }\n * })\n * ```\n *\n * #### Examples for `autoscroll`:\n * ```html\n * \n * \n *\n * \n * \n * \n * \n * ```\n *\n * Resolve data:\n *\n * The resolved data from the state's `resolve` block is placed on the scope as `$resolve` (this\n * can be customized using [[Ng1ViewDeclaration.resolveAs]]). This can be then accessed from the template.\n *\n * Note that when `controllerAs` is being used, `$resolve` is set on the controller instance *after* the\n * controller is instantiated. The `$onInit()` hook can be used to perform initialization code which\n * depends on `$resolve` data.\n *\n * #### Example:\n * ```js\n * $stateProvider.state('home', {\n * template: '',\n * resolve: {\n * user: function(UserService) { return UserService.fetchUser(); }\n * }\n * });\n * ```\n */\n var uiView;\n // eslint-disable-next-line prefer-const\n uiView = [\n '$view',\n '$animate',\n '$uiViewScroll',\n '$interpolate',\n '$q',\n function $ViewDirective($view, $animate, $uiViewScroll, $interpolate, $q) {\n function getRenderer() {\n return {\n enter: function (element, target, cb) {\n if (ng.version.minor > 2) {\n $animate.enter(element, null, target).then(cb);\n }\n else {\n $animate.enter(element, null, target, cb);\n }\n },\n leave: function (element, cb) {\n if (ng.version.minor > 2) {\n $animate.leave(element).then(cb);\n }\n else {\n $animate.leave(element, cb);\n }\n },\n };\n }\n function configsEqual(config1, config2) {\n return config1 === config2;\n }\n var rootData = {\n $cfg: { viewDecl: { $context: $view._pluginapi._rootViewContext() } },\n $uiView: {},\n };\n var directive = {\n count: 0,\n restrict: 'ECA',\n terminal: true,\n priority: 400,\n transclude: 'element',\n compile: function (tElement, tAttrs, $transclude) {\n return function (scope, $element, attrs) {\n var onloadExp = attrs['onload'] || '', autoScrollExp = attrs['autoscroll'], renderer = getRenderer(), inherited = $element.inheritedData('$uiView') || rootData, name = $interpolate(attrs['uiView'] || attrs['name'] || '')(scope) || '$default';\n var previousEl, currentEl, currentScope, viewConfig;\n var activeUIView = {\n $type: 'ng1',\n id: directive.count++,\n name: name,\n fqn: inherited.$uiView.fqn ? inherited.$uiView.fqn + '.' + name : name,\n config: null,\n configUpdated: configUpdatedCallback,\n get creationContext() {\n // The context in which this ui-view \"tag\" was created\n var fromParentTagConfig = parse('$cfg.viewDecl.$context')(inherited);\n // Allow \n // See https://github.com/angular-ui/ui-router/issues/3355\n var fromParentTag = parse('$uiView.creationContext')(inherited);\n return fromParentTagConfig || fromParentTag;\n },\n };\n trace.traceUIViewEvent('Linking', activeUIView);\n function configUpdatedCallback(config) {\n if (config && !(config instanceof Ng1ViewConfig))\n return;\n if (configsEqual(viewConfig, config))\n return;\n trace.traceUIViewConfigUpdated(activeUIView, config && config.viewDecl && config.viewDecl.$context);\n viewConfig = config;\n updateView(config);\n }\n $element.data('$uiView', { $uiView: activeUIView });\n updateView();\n var unregister = $view.registerUIView(activeUIView);\n scope.$on('$destroy', function () {\n trace.traceUIViewEvent('Destroying/Unregistering', activeUIView);\n unregister();\n });\n function cleanupLastView() {\n if (previousEl) {\n trace.traceUIViewEvent('Removing (previous) el', previousEl.data('$uiView'));\n previousEl.remove();\n previousEl = null;\n }\n if (currentScope) {\n trace.traceUIViewEvent('Destroying scope', activeUIView);\n currentScope.$destroy();\n currentScope = null;\n }\n if (currentEl) {\n var _viewData_1 = currentEl.data('$uiViewAnim');\n trace.traceUIViewEvent('Animate out', _viewData_1);\n renderer.leave(currentEl, function () {\n _viewData_1.$$animLeave.resolve();\n previousEl = null;\n });\n previousEl = currentEl;\n currentEl = null;\n }\n }\n function updateView(config) {\n var newScope = scope.$new();\n var animEnter = $q.defer(), animLeave = $q.defer();\n var $uiViewData = {\n $cfg: config,\n $uiView: activeUIView,\n };\n var $uiViewAnim = {\n $animEnter: animEnter.promise,\n $animLeave: animLeave.promise,\n $$animLeave: animLeave,\n };\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoading\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description\n *\n * Fired once the view **begins loading**, *before* the DOM is rendered.\n *\n * @param {Object} event Event object.\n * @param {string} viewName Name of the view.\n */\n newScope.$emit('$viewContentLoading', name);\n var cloned = $transclude(newScope, function (clone) {\n clone.data('$uiViewAnim', $uiViewAnim);\n clone.data('$uiView', $uiViewData);\n renderer.enter(clone, $element, function onUIViewEnter() {\n animEnter.resolve();\n if (currentScope)\n currentScope.$emit('$viewContentAnimationEnded');\n if ((isDefined(autoScrollExp) && !autoScrollExp) || scope.$eval(autoScrollExp)) {\n $uiViewScroll(clone);\n }\n });\n cleanupLastView();\n });\n currentEl = cloned;\n currentScope = newScope;\n /**\n * @ngdoc event\n * @name ui.router.state.directive:ui-view#$viewContentLoaded\n * @eventOf ui.router.state.directive:ui-view\n * @eventType emits on ui-view directive scope\n * @description *\n * Fired once the view is **loaded**, *after* the DOM is rendered.\n *\n * @param {Object} event Event object.\n */\n currentScope.$emit('$viewContentLoaded', config || viewConfig);\n currentScope.$eval(onloadExp);\n }\n };\n },\n };\n return directive;\n },\n ];\n $ViewDirectiveFill.$inject = ['$compile', '$controller', '$transitions', '$view', '$q'];\n /** @hidden */\n function $ViewDirectiveFill($compile, $controller, $transitions, $view, $q) {\n var getControllerAs = parse('viewDecl.controllerAs');\n var getResolveAs = parse('viewDecl.resolveAs');\n return {\n restrict: 'ECA',\n priority: -400,\n compile: function (tElement) {\n var initial = tElement.html();\n tElement.empty();\n return function (scope, $element) {\n var data = $element.data('$uiView');\n if (!data) {\n $element.html(initial);\n $compile($element.contents())(scope);\n return;\n }\n var cfg = data.$cfg || { viewDecl: {}, getTemplate: noop };\n var resolveCtx = cfg.path && new ResolveContext(cfg.path);\n $element.html(cfg.getTemplate($element, resolveCtx) || initial);\n trace.traceUIViewFill(data.$uiView, $element.html());\n var link = $compile($element.contents());\n var controller = cfg.controller;\n var controllerAs = getControllerAs(cfg);\n var resolveAs = getResolveAs(cfg);\n var locals = resolveCtx && getLocals(resolveCtx);\n scope[resolveAs] = locals;\n if (controller) {\n var controllerInstance = ($controller(controller, extend({}, locals, { $scope: scope, $element: $element })));\n if (controllerAs) {\n scope[controllerAs] = controllerInstance;\n scope[controllerAs][resolveAs] = locals;\n }\n // TODO: Use $view service as a central point for registering component-level hooks\n // Then, when a component is created, tell the $view service, so it can invoke hooks\n // $view.componentLoaded(controllerInstance, { $scope: scope, $element: $element });\n // scope.$on('$destroy', () => $view.componentUnloaded(controllerInstance, { $scope: scope, $element: $element }));\n $element.data('$ngControllerController', controllerInstance);\n $element.children().data('$ngControllerController', controllerInstance);\n registerControllerCallbacks($q, $transitions, controllerInstance, scope, cfg);\n }\n // Wait for the component to appear in the DOM\n if (isString(cfg.component)) {\n var kebobName = kebobString(cfg.component);\n var tagRegexp_1 = new RegExp(\"^(x-|data-)?\" + kebobName + \"$\", 'i');\n var getComponentController = function () {\n var directiveEl = [].slice\n .call($element[0].children)\n .filter(function (el) { return el && el.tagName && tagRegexp_1.exec(el.tagName); });\n return directiveEl && ng.element(directiveEl).data(\"$\" + cfg.component + \"Controller\");\n };\n var deregisterWatch_1 = scope.$watch(getComponentController, function (ctrlInstance) {\n if (!ctrlInstance)\n return;\n registerControllerCallbacks($q, $transitions, ctrlInstance, scope, cfg);\n deregisterWatch_1();\n });\n }\n link(scope);\n };\n },\n };\n }\n /** @hidden */\n var hasComponentImpl = typeof ng.module('ui.router')['component'] === 'function';\n /** @hidden incrementing id */\n var _uiCanExitId = 0;\n /** @hidden TODO: move these callbacks to $view and/or `/hooks/components.ts` or something */\n function registerControllerCallbacks($q, $transitions, controllerInstance, $scope, cfg) {\n // Call $onInit() ASAP\n if (isFunction(controllerInstance.$onInit) &&\n !((cfg.viewDecl.component || cfg.viewDecl.componentProvider) && hasComponentImpl)) {\n controllerInstance.$onInit();\n }\n var viewState = tail(cfg.path).state.self;\n var hookOptions = { bind: controllerInstance };\n // Add component-level hook for onUiParamsChanged\n if (isFunction(controllerInstance.uiOnParamsChanged)) {\n var resolveContext = new ResolveContext(cfg.path);\n var viewCreationTrans_1 = resolveContext.getResolvable('$transition$').data;\n // Fire callback on any successful transition\n var paramsUpdated = function ($transition$) {\n // Exit early if the $transition$ is the same as the view was created within.\n // Exit early if the $transition$ will exit the state the view is for.\n if ($transition$ === viewCreationTrans_1 || $transition$.exiting().indexOf(viewState) !== -1)\n return;\n var toParams = $transition$.params('to');\n var fromParams = $transition$.params('from');\n var getNodeSchema = function (node) { return node.paramSchema; };\n var toSchema = $transition$.treeChanges('to').map(getNodeSchema).reduce(unnestR, []);\n var fromSchema = $transition$.treeChanges('from').map(getNodeSchema).reduce(unnestR, []);\n // Find the to params that have different values than the from params\n var changedToParams = toSchema.filter(function (param) {\n var idx = fromSchema.indexOf(param);\n return idx === -1 || !fromSchema[idx].type.equals(toParams[param.id], fromParams[param.id]);\n });\n // Only trigger callback if a to param has changed or is new\n if (changedToParams.length) {\n var changedKeys_1 = changedToParams.map(function (x) { return x.id; });\n // Filter the params to only changed/new to params. `$transition$.params()` may be used to get all params.\n var newValues = filter(toParams, function (val, key) { return changedKeys_1.indexOf(key) !== -1; });\n controllerInstance.uiOnParamsChanged(newValues, $transition$);\n }\n };\n $scope.$on('$destroy', $transitions.onSuccess({}, paramsUpdated, hookOptions));\n }\n // Add component-level hook for uiCanExit\n if (isFunction(controllerInstance.uiCanExit)) {\n var id_1 = _uiCanExitId++;\n var cacheProp_1 = '_uiCanExitIds';\n // Returns true if a redirect transition already answered truthy\n var prevTruthyAnswer_1 = function (trans) {\n return !!trans && ((trans[cacheProp_1] && trans[cacheProp_1][id_1] === true) || prevTruthyAnswer_1(trans.redirectedFrom()));\n };\n // If a user answered yes, but the transition was later redirected, don't also ask for the new redirect transition\n var wrappedHook = function (trans) {\n var promise;\n var ids = (trans[cacheProp_1] = trans[cacheProp_1] || {});\n if (!prevTruthyAnswer_1(trans)) {\n promise = $q.when(controllerInstance.uiCanExit(trans));\n promise.then(function (val) { return (ids[id_1] = val !== false); });\n }\n return promise;\n };\n var criteria = { exiting: viewState.name };\n $scope.$on('$destroy', $transitions.onBefore(criteria, wrappedHook, hookOptions));\n }\n }\n ng.module('ui.router.state').directive('uiView', uiView);\n ng.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n\n /** @publicapi @module ng1 */ /** */\n /** @hidden */\n function $ViewScrollProvider() {\n var useAnchorScroll = false;\n this.useAnchorScroll = function () {\n useAnchorScroll = true;\n };\n this.$get = [\n '$anchorScroll',\n '$timeout',\n function ($anchorScroll, $timeout) {\n if (useAnchorScroll) {\n return $anchorScroll;\n }\n return function ($element) {\n return $timeout(function () {\n $element[0].scrollIntoView();\n }, 0, false);\n };\n },\n ];\n }\n ng.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n\n /**\n * Main entry point for angular 1.x build\n * @publicapi @module ng1\n */ /** */\n var index$1 = 'ui.router';\n\n exports.$injector = $injector;\n exports.$q = $q;\n exports.BaseLocationServices = BaseLocationServices;\n exports.BaseUrlRule = BaseUrlRule;\n exports.BrowserLocationConfig = BrowserLocationConfig;\n exports.Glob = Glob;\n exports.HashLocationService = HashLocationService;\n exports.HookBuilder = HookBuilder;\n exports.MemoryLocationConfig = MemoryLocationConfig;\n exports.MemoryLocationService = MemoryLocationService;\n exports.NATIVE_INJECTOR_TOKEN = NATIVE_INJECTOR_TOKEN;\n exports.Ng1ViewConfig = Ng1ViewConfig;\n exports.Param = Param;\n exports.ParamFactory = ParamFactory;\n exports.ParamType = ParamType;\n exports.ParamTypes = ParamTypes;\n exports.PathNode = PathNode;\n exports.PathUtils = PathUtils;\n exports.PushStateLocationService = PushStateLocationService;\n exports.Queue = Queue;\n exports.RegisteredHook = RegisteredHook;\n exports.Rejection = Rejection;\n exports.Resolvable = Resolvable;\n exports.ResolveContext = ResolveContext;\n exports.StateBuilder = StateBuilder;\n exports.StateMatcher = StateMatcher;\n exports.StateObject = StateObject;\n exports.StateParams = StateParams;\n exports.StateProvider = StateProvider;\n exports.StateQueueManager = StateQueueManager;\n exports.StateRegistry = StateRegistry;\n exports.StateService = StateService;\n exports.TargetState = TargetState;\n exports.Trace = Trace;\n exports.Transition = Transition;\n exports.TransitionEventType = TransitionEventType;\n exports.TransitionHook = TransitionHook;\n exports.TransitionService = TransitionService;\n exports.UIRouter = UIRouter;\n exports.UIRouterGlobals = UIRouterGlobals;\n exports.UIRouterPluginBase = UIRouterPluginBase;\n exports.UrlConfig = UrlConfig;\n exports.UrlMatcher = UrlMatcher;\n exports.UrlMatcherFactory = UrlMatcherFactory;\n exports.UrlRouter = UrlRouter;\n exports.UrlRouterProvider = UrlRouterProvider;\n exports.UrlRuleFactory = UrlRuleFactory;\n exports.UrlRules = UrlRules;\n exports.UrlService = UrlService;\n exports.ViewService = ViewService;\n exports._extend = _extend;\n exports._inArray = _inArray;\n exports._pushTo = _pushTo;\n exports._removeFrom = _removeFrom;\n exports.all = all;\n exports.allTrueR = allTrueR;\n exports.ancestors = ancestors;\n exports.and = and;\n exports.any = any;\n exports.anyTrueR = anyTrueR;\n exports.applyPairs = applyPairs;\n exports.arrayTuples = arrayTuples;\n exports.assertFn = assertFn;\n exports.assertMap = assertMap;\n exports.assertPredicate = assertPredicate;\n exports.beforeAfterSubstr = beforeAfterSubstr;\n exports.buildUrl = buildUrl;\n exports.compose = compose;\n exports.copy = copy;\n exports.core = index;\n exports.createProxyFunctions = createProxyFunctions;\n exports.curry = curry;\n exports.default = index$1;\n exports.defaultResolvePolicy = defaultResolvePolicy;\n exports.defaultTransOpts = defaultTransOpts;\n exports.defaults = defaults;\n exports.deregAll = deregAll;\n exports.eq = eq;\n exports.equals = equals;\n exports.extend = extend;\n exports.filter = filter;\n exports.find = find;\n exports.flatten = flatten;\n exports.flattenR = flattenR;\n exports.fnToString = fnToString;\n exports.forEach = forEach;\n exports.fromJson = fromJson;\n exports.functionToString = functionToString;\n exports.getLocals = getLocals;\n exports.getNg1ViewConfigFactory = getNg1ViewConfigFactory;\n exports.getParams = getParams;\n exports.hashLocationPlugin = hashLocationPlugin;\n exports.hostRegex = hostRegex;\n exports.identity = identity;\n exports.inArray = inArray;\n exports.inherit = inherit;\n exports.invoke = invoke;\n exports.is = is;\n exports.isArray = isArray;\n exports.isDate = isDate;\n exports.isDefined = isDefined;\n exports.isFunction = isFunction;\n exports.isInjectable = isInjectable;\n exports.isNull = isNull;\n exports.isNullOrUndefined = isNullOrUndefined;\n exports.isNumber = isNumber;\n exports.isObject = isObject;\n exports.isPromise = isPromise;\n exports.isRegExp = isRegExp;\n exports.isString = isString;\n exports.isUndefined = isUndefined;\n exports.joinNeighborsR = joinNeighborsR;\n exports.kebobString = kebobString;\n exports.keyValsToObjectR = keyValsToObjectR;\n exports.locationPluginFactory = locationPluginFactory;\n exports.makeEvent = makeEvent;\n exports.makeStub = makeStub;\n exports.map = map;\n exports.mapObj = mapObj;\n exports.matchState = matchState;\n exports.maxLength = maxLength;\n exports.memoryLocationPlugin = memoryLocationPlugin;\n exports.mergeR = mergeR;\n exports.ng1ViewsBuilder = ng1ViewsBuilder;\n exports.noop = noop;\n exports.not = not;\n exports.omit = omit;\n exports.or = or;\n exports.padString = padString;\n exports.pairs = pairs;\n exports.parse = parse;\n exports.parseUrl = parseUrl$1;\n exports.pattern = pattern;\n exports.pick = pick;\n exports.pipe = pipe;\n exports.pluck = pluck;\n exports.prop = prop;\n exports.propEq = propEq;\n exports.pushR = pushR;\n exports.pushStateLocationPlugin = pushStateLocationPlugin;\n exports.pushTo = pushTo;\n exports.removeFrom = removeFrom;\n exports.resolvablesBuilder = resolvablesBuilder;\n exports.resolvePolicies = resolvePolicies;\n exports.root = root;\n exports.services = services;\n exports.servicesPlugin = servicesPlugin;\n exports.silenceUncaughtInPromise = silenceUncaughtInPromise;\n exports.silentRejection = silentRejection;\n exports.splitEqual = splitEqual;\n exports.splitHash = splitHash;\n exports.splitOnDelim = splitOnDelim;\n exports.splitQuery = splitQuery;\n exports.stringify = stringify;\n exports.stripLastPathElement = stripLastPathElement;\n exports.tail = tail;\n exports.toJson = toJson;\n exports.trace = trace;\n exports.trimHashVal = trimHashVal;\n exports.uniqR = uniqR;\n exports.unnest = unnest;\n exports.unnestR = unnestR;\n exports.val = val;\n exports.values = values;\n exports.watchDigests = watchDigests;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=angular-ui-router.js.map\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vQHVpcm91dGVyK2FuZ3VsYXJqc0AxLjAuMzAvbm9kZV9tb2R1bGVzL0B1aXJvdXRlci9hbmd1bGFyanMvcmVsZWFzZS9hbmd1bGFyLXVpLXJvdXRlci5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsSUFBSSxLQUE0RCxvQkFBb0IsbUJBQU8sQ0FBQyx3QkFBUztBQUNyRyxJQUFJLENBQ3NGO0FBQzFGLENBQUMsNkNBQTZDOztBQUU5QztBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwwQkFBMEIsTUFBcUM7QUFDL0Qsc0RBQXNELFFBQVE7QUFDOUQsNkNBQTZDLFFBQVE7QUFDckQsNkRBQTZELFFBQVE7QUFDckU7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQ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HRoZSByb290LlxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGFuY2VzdG9ycyhmaXJzdCwgc2Vjb25kKSB7XG4gICAgICAgIHZhciBwYXRoID0gW107XG4gICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpmb3JpblxuICAgICAgICBmb3IgKHZhciBuIGluIGZpcnN0LnBhdGgpIHtcbiAgICAgICAgICAgIGlmIChmaXJzdC5wYXRoW25dICE9PSBzZWNvbmQucGF0aFtuXSlcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIHBhdGgucHVzaChmaXJzdC5wYXRoW25dKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcGF0aDtcbiAgICB9XG4gICAgLyoqXG4gICAgICogUmV0dXJuIGEgY29weSBvZiB0aGUgb2JqZWN0IG9ubHkgY29udGFpbmluZyB0aGUgd2hpdGVsaXN0ZWQgcHJvcGVydGllcy5cbiAgICAgKlxuICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgKiBgYGBcbiAgICAgKiB2YXIgZm9vID0geyBhOiAxLCBiOiAyLCBjOiAzIH07XG4gICAgICogdmFyIGFiID0gcGljayhmb28sIFsnYScsICdiJ10pOyAvLyB7IGE6IDEsIGI6IDIgfVxuICAgICAqIGBgYFxuICAgICAqIEBwYXJhbSBvYmogdGhlIHNvdXJjZSBvYmplY3RcbiAgICAgKiBAcGFyYW0gcHJvcE5hbWVzIGFuIEFycmF5IG9mIHN0cmluZ3MsIHdoaWNoIGFyZSB0aGUgd2hpdGVsaXN0ZWQgcHJvcGVydHkgbmFtZXNcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBwaWNrKG9iaiwgcHJvcE5hbWVzKSB7XG4gICAgICAgIHZhciBvYmpDb3B5ID0ge307XG4gICAgICAgIGZvciAodmFyIF9wcm9wIGluIG9iaikge1xuICAgICAgICAgICAgaWYgKHByb3BOYW1lcy5pbmRleE9mKF9wcm9wKSAhPT0gLTEpIHtcbiAgICAg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gICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICByZXN1bHQucHVzaChbYXJnc1swXVtpXSwgYXJnc1sxXVtpXV0pO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKFthcmdzWzBdW2ldLCBhcmdzWzFdW2ldLCBhcmdzWzJdW2ldXSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goW2FyZ3NbMF1baV0sIGFyZ3NbMV1baV0sIGFyZ3NbMl1baV0sIGFyZ3NbM11baV1dKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0LnB1c2goYXJncy5tYXAoZnVuY3Rpb24gKGFycmF5KSB7IHJldHVybiBhcnJheVtpXTsgfSkpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBtYXhBcnJheUxlbjsgaSsrKSB7XG4gICAgICAgICAgICBfbG9vcF8xKGkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfVxuICAgIC8qKlxuICAgICAqIFJlZHVjZSBmdW5jdGlvbiB3aGljaCBidWlsZHMgYW4gb2JqZWN0IGZyb20gYW4gYXJyYXkgb2YgW2tleSwgdmFsdWVdIHBhaXJzLlxuICAgICAqXG4gICAgICogRWFjaCBpdGVyYXRpb24gc2V0cyB0aGUga2V5L3ZhbCBwYWlyIG9uIHRoZSBtZW1vIG9iamVjdCwgdGhlbiByZXR1cm5zIHRoZSBtZW1vIGZvciB0aGUgbmV4dCBpdGVyYXRpb24u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Z3VtZW50c1tpXTtcbiAgICAgICAgICAgIGlmICghb2JqKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgdmFyIGtleXMgPSBPYmplY3Qua2V5cyhvYmopO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBrZXlzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgdG9PYmpba2V5c1tqXV0gPSBvYmpba2V5c1tqXV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRvT2JqO1xuICAgIH1cbiAgICBmdW5jdGlvbiBfZXF1YWxzKG8xLCBvMikge1xuICAgICAgICBpZiAobzEgPT09IG8yKVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIGlmIChvMSA9PT0gbnVsbCB8fCBvMiA9PT0gbnVsbClcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgaWYgKG8xICE9PSBvMSAmJiBvMiAhPT0gbzIpXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTsgLy8gTmFOID09PSBOYU5cbiAgICAgICAgdmFyIHQxID0gdHlwZW9mIG8xLCB0MiA9IHR5cGVvZiBvMjtcbiAgICAgICAgaWYgKHQxICE9PSB0MiB8fCB0MSAhPT0gJ29iamVjdCcpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIHZhciB0dXAgPSBbbzEsIG8yXTtcbiAgICAgICAgaWYgKGFsbChpc0FycmF5KSh0dXApKVxuICAgICAgICAgICAgcmV0dXJuIF9hcnJheXNFcShvMSwgbzIpO1xuICAgICAgICBpZiAoYWxsKGlzRGF0ZSkodHVwKSlcbiAgICAgICAgICAgIHJldHVybiBvMS5nZXRUaW1lKCkgPT09IG8yLmdldFRpbWUoKTtcbiAgICAgICAgaWYgKGFsbChpc1JlZ0V4cCkodHVwKSlcbiAgICAgICAgICAgIHJldHVybiBvMS50b1N0cmluZygpID09PSBv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ICB8IGAnWCdgICwgYCdBLlgnYCAsIGAnWi5ZLlgnYCAgICAgICAgICAgICAgICAgICB8IGAnQSdgICwgYCdBLmxvZ2luLlonYCAgICAgICAgICAgICB8XG4gICAgICogfCBgJ0EuKiouWCdgICB8IGAnQS5YJ2AgLCBgJ0EuQi5YJ2AgLCBgJ0EuQi5DLlgnYCAgICAgICAgICAgICB8IGAnQSdgICwgYCdBLkIuQydgICAgICAgICAgICAgICAgICB8XG4gICAgICpcbiAgICAgKiBAcGFja2FnZURvY3VtZW50YXRpb25cbiAgICAgKi9cbiAgICB2YXIgR2xvYiA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZnVuY3Rpb24gR2xvYih0ZXh0KSB7XG4gICAgICAgICAgICB0aGlzLnRleHQgPSB0ZXh0O1xuICAgICAgICAgICAgdGhpcy5nbG9iID0gdGV4dC5zcGxpdCgnLicpO1xuICAgICAgICAgICAgdmFyIHJlZ2V4cFN0cmluZyA9IHRoaXMudGV4dFxuICAgICAgICAgICAgICAgIC5zcGxpdCgnLicpXG4gICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoc2VnKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNlZyA9PT0gJyoqJylcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICcoPzp8KD86XFxcXC5bXi5dKikqKSc7XG4gICAgICAgICAgICAgICAgaWYgKHNlZyA9PT0gJyonKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ1xcXFwuW14uXSonO1xuICAgICAgICAgICAgICAgIHJldHVybiAnXFxcXC4nICsgc2VnO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAuam9pbignJyk7XG4gICAgICAgICAgICB0aGlzLnJlZ2V4cCA9IG5ldyBSZWdFeHAoJ14nICsgcmVnZXhwU3RyaW5nICsgJyQnKTtcbiAgICAgICAgfVxuICAgICAgICAvKiogUmV0dXJucyB0cnVlIGlmIHRoZSBzdHJpb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ZW50bHkgcnVubmluZyB0cmFuc2l0aW9uLlxuICAgICAgICAgKi9cbiAgICAgICAgUmVqZWN0VHlwZVtSZWplY3RUeXBlW1wiSUdOT1JFRFwiXSA9IDVdID0gXCJJR05PUkVEXCI7XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBUaGUgdHJhbnNpdGlvbiBlcnJvcmVkLlxuICAgICAgICAgKlxuICAgICAgICAgKiBUaGlzIGdlbmVyYWxseSBtZWFucyBhIGhvb2sgdGhyZXcgYW4gZXJyb3Igb3IgcmV0dXJuZWQgYSByZWplY3RlZCBwcm9taXNlXG4gICAgICAgICAqL1xuICAgICAgICBSZWplY3RUeXBlW1JlamVjdFR5cGVbXCJFUlJPUlwiXSA9IDZdID0gXCJFUlJPUlwiO1xuICAgIH0pKGV4cG9ydHMuUmVqZWN0VHlwZSB8fCAoZXhwb3J0cy5SZWplY3RUeXBlID0ge30pKTtcbiAgICAvKiogQGludGVybmFsICovXG4gICAgdmFyIGlkID0gMDtcbiAgICB2YXIgUmVqZWN0aW9uID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBSZWplY3Rpb24odHlwZSwgbWVzc2FnZSwgZGV0YWlsKSB7XG4gICAgICAgICAgICAvKiogQGludGVybmFsICovXG4gICAgICAgICAgICB0aGlzLiRpZCA9IGlkKys7XG4gICAgICAgICAgICB0aGlzLnR5cGUgPSB0eXBlO1xuICAgICAgICAgICAgdGhpcy5tZXNzYWdlID0gbWVzc2FnZTtcbiAgICAgICAgICAgIHRoaXMuZGV0YWlsID0gZGV0YWlsO1xuICAgICAgICB9XG4gICAgICAgIC8qKiBSZXR1cm5zIHRydWUgaWYgdGhlIG9iaiBpcyBhIHJlamVjdGVkIHByb21pc2UgY3JlYXRlZCBmcm9tIHRoZSBgYXNQcm9taXNlYCBmYWN0b3J5ICovXG4gICAgICAgIFJlamVjdGlvbi5pc1JlamVjdGlvblByb21pc2UgPSBmdW5jdGlvbiA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gICAgICAgfTtcbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmVuYWJsZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBjYXRlZ29yaWVzID0gW107XG4gICAgICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgYXJndW1lbnRzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgIGNhdGVnb3JpZXNbX2ldID0gYXJndW1lbnRzW19pXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuX3NldCh0cnVlLCBjYXRlZ29yaWVzKTtcbiAgICAgICAgfTtcbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmRpc2FibGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgY2F0ZWdvcmllcyA9IFtdO1xuICAgICAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IGFyZ3VtZW50cy5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgICAgICBjYXRlZ29yaWVzW19pXSA9IGFyZ3VtZW50c1tfaV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLl9zZXQoZmFsc2UsIGNhdGVnb3JpZXMpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0cmlldmVzIHRoZSBlbmFibGVkIHN0YXRldXMgb2YgYSBbW0NhdGVnb3J5XV1cbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogdHJhY2UuZW5hYmxlZChcIlZJRVdDT05GSUdcIik7IC8vIHRydWUgb3IgZmFsc2VcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqIEByZXR1cm5zIGJvb2xlYW4gdHJ1ZSBpZiB0aGUgY2F0ZWdvcnkgaXMgZW5hYmxlZFxuICAgICAgICAgKi9cbiAgICAgICAgVHJhY2UucHJvdG90eXBlLmVuYWJsZWQgPSBmdW5jdGlvbiAoY2F0ZWdvcnkpIHtcbiAgICAgICAgICAgIHJldHVybiAhIXRoaXMuX2VuYWJsZWRbbm9ybWFsaXplZENhdChjYXRlZ29yeSldO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsIGNhbGxlZCBieSB1aS1yb3V0ZXIgY29kZSAqL1xuICAgICAgICBUcmFjZS5wcm90b3R5cGUudHJhY2VUcmFuc2l0aW9uU3RhcnQgPSBmdW5jdGlvbiAodHJhbnMpIHtcbiAgICAgICAgICAgIGlmICghdGhpcy5lbmFibGVkKGV4cG9ydHMuQ2F0ZWdvcnkuVFJBTlNJVElPTikpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgc2FmZUNvbnNvbGUubG9nKHRyYW5zTGJsKHRyYW5zKSArIFwiOiBTdGFydGVkICAtPiBcIiArIHN0cmluZ2lmeSh0cmFucykpO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsIGNhbGxlZCBieSB1aS1yb3V0ZXIgY29kZSAqL1xuICAgICAgICBUcmFjZS5wcm90b3R5cGUudHJhY2VUcmFuc2l0aW9uSWdub3JlZCA9IGZ1bmN0aW9uICh0cmFucykge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmVuYWJsZWQoZXhwb3J0cy5DYXRlZ29yeS5UUkFOU0lUSU9OKSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBzYWZlQ29uc29sZS5sb2codHJhbnNMYmwodHJhbnMpICsgXCI6IElnbm9yZWQgIDw+IFwiICsgc3RyaW5naWZ5KHRyYW5zKSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW50ZXJuYWwgY2FsbGVkIGJ5IHVpLXJvdXRlciBjb2RlICovXG4gICAgICAgIFRyYWNlLnByb3RvdHlwZS50cmFjZUhvb2tJbnZvY2F0aW9uID0gZnVuY3Rpb24gKHN0ZXAsIHRyYW5zLCBvcHRpb25zKSB7XG4gICAgICAgICAgICBpZiAoIXRoaXMuZW5hYmxlZChle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AgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBzYWZlQ29uc29sZS5sb2codHJhbnNMYmwodHJhbnMpICsgXCI6IDwtIFJlamVjdGVkIFwiICsgc3RyaW5naWZ5KHRyYW5zKSArIFwiLCByZWFzb246IFwiICsgcmVhc29uKTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIEBpbnRlcm5hbCBjYWxsZWQgYnkgdWktcm91dGVyIGNvZGUgKi9cbiAgICAgICAgVHJhY2UucHJvdG90eXBlLnRyYWNlU3VjY2VzcyA9IGZ1bmN0aW9uIChmaW5hbFN0YXRlLCB0cmFucykge1xuICAgICAgICAgICAgaWYgKCF0aGlzLmVuYWJsZWQoZXhwb3J0cy5DYXRlZ29yeS5UUkFOU0lUSU9OKSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBzYWZlQ29uc29sZS5sb2codHJhbnNMYmwodHJhbnMpICsgXCI6IDwtIFN1Y2Nlc3MgIFwiICsgc3RyaW5naWZ5KHRyYW5zKSArIFwiLCBmaW5hbCBzdGF0ZTogXCIgKyBmaW5hbFN0YXRlLm5hbWUpO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsIGNhbGxlZCBieSB1aS1yb3V0ZXIgY29kZSAqL1xuICAgICAgICBUcmFjZS5wcm90b3R5cGUudHJhY2VVSVZpZXdFdmVudCA9IGZ1bmN0aW9uIChldmVudCwgdmlld0RhdGEsIGV4dHJhKSB7XG4gICAgICAgICAgICBpZiAoZXh0cmEgPT09IHZvaWQgMCkgeyBleHRyYSA9ICcnOyB9XG4gICAgICAgICAgICBpZiAoIXRoaXMuZW5hYmxlZChleHBvcnRzLkNhdGVnb3J5LlVJVklFVykpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgc2FmZUNvbnNvbGUubG9nKFwidWktdmlldzogXCIgKyBwYWRTdHJpbmcoMzAsIGV2ZW50KSArIFwiIFwiICsgdWlWaWV3U3RyaW5nK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XQ09ORklHKSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB2YXIgdWl2aGVhZGVyID0gJ3VpdmlldyBjb21wb25lbnQgZnFuJztcbiAgICAgICAgICAgIHZhciBjZmdoZWFkZXIgPSAndmlldyBjb25maWcgc3RhdGUgKHZpZXcgbmFtZSknO1xuICAgICAgICAgICAgdmFyIG1hcHBpbmcgPSBwYWlyc1xuICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKF9hKSB7XG4gICAgICAgICAgICAgICAgdmFyIF9iO1xuICAgICAgICAgICAgICAgIHZhciB1aVZpZXcgPSBfYS51aVZpZXcsIHZpZXdDb25maWcgPSBfYS52aWV3Q29uZmlnO1xuICAgICAgICAgICAgICAgIHZhciB1aXYgPSB1aVZpZXcgJiYgdWlWaWV3LmZxbjtcbiAgICAgICAgICAgICAgICB2YXIgY2ZnID0gdmlld0NvbmZpZyAmJiB2aWV3Q29uZmlnLnZpZXdEZWNsLiRjb250ZXh0Lm5hbWUgKyBcIjogKFwiICsgdmlld0NvbmZpZy52aWV3RGVjbC4kbmFtZSArIFwiKVwiO1xuICAgICAgICAgICAgICAgIHJldHVybiBfYiA9IHt9LCBfYlt1aXZoZWFkZXJdID0gdWl2LCBfYltjZmdoZWFkZXJdID0gY2ZnLCBfYjtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgLnNvcnQoZnVuY3Rpb24gKGEsIGIpIHsgcmV0dXJuIChhW3VpdmhlYWRlcl0gfHwgJycpLmxvY2FsZUNvbXBhcmUoYlt1aXZoZWFkZXJdIHx8ICcnKTsgfSk7XG4gICAgICAgICAgICBzYWZlQ29uc29sZS50YWJsZShtYXBwaW5nKTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIEBpbnRlcm5hbCBjYWxsZWQgYnkgdWktcm91dGVyIGNvZGUgKi9cbiAgICAgICAgVHJhY2UucHJvdG90eXBlLnRyYWNlVmlld1NlcnZpY2VFdmVudCA9IGZ1bm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leSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBQYXJhbVR5cGUucHJvdG90eXBlLmVuY29kZSA9IGZ1bmN0aW9uICh2YWwsIGtleSkge1xuICAgICAgICAgICAgcmV0dXJuIHZhbDtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqIEBpbmhlcml0ZG9jICovXG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUuZGVjb2RlID0gZnVuY3Rpb24gKHZhbCwga2V5KSB7XG4gICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgUGFyYW1UeXBlLnByb3RvdHlwZS5lcXVhbHMgPSBmdW5jdGlvbiAoYSwgYikge1xuICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnRyaXBsZS1lcXVhbHNcbiAgICAgICAgICAgIHJldHVybiBhID09IGI7XG4gICAgICAgIH07XG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUuJHN1YlBhdHRlcm4gPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgc3ViID0gdGhpcy5wYXR0ZXJuLnRvU3RyaW5nKCk7XG4gICAgICAgICAgICByZXR1cm4gc3ViLnN1YnN0cigxLCBzdWIubGVuZ3RoIC0gMik7XG4gICAgICAgIH07XG4gICAgICAgIFBhcmFtVHlwZS5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gXCJ7UGFyYW1UeXBlOlwiICsgdGhpcy5uYW1lICsgXCJ9XCI7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBHaXZlbiBhbiBlbmNvZGVkIHN0cmluZywgb3IgYSBkZWNvZGVkIG9iamVjdCwgcmV0dXJucyBhIGRlY29kZWQgb2JqZWN0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aClcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCInYXV0bycgYXJyYXkgbW9kZSBpcyBmb3IgcXVlcnkgcGFyYW1ldGVycyBvbmx5XCIpO1xuICAgICAgICAgICAgcmV0dXJuIG5ldyBBcnJheVR5cGUodGhpcywgbW9kZSk7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBQYXJhbVR5cGU7XG4gICAgfSgpKTtcbiAgICAvKiogV3JhcHMgdXAgYSBgUGFyYW1UeXBlYCBvYmplY3QgdG8gaGFuZGxlIGFycmF5IHZhbHVlcy4gKi9cbiAgICBmdW5jdGlvbiBBcnJheVR5cGUodHlwZSwgbW9kZSkge1xuICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAvLyBXcmFwIG5vbi1hcnJheSB2YWx1ZSBhcyBhcnJheVxuICAgICAgICBmdW5jdGlvbiBhcnJheVdyYXAodmFsKSB7XG4gICAgICAgICAgICByZXR1cm4gaXNBcnJheSh2YWwpID8gdmFsIDogaXNEZWZpbmVkKHZhbCkgPyBbdmFsXSA6IFtdO1xuICAgICAgICB9XG4gICAgICAgIC8vIFVud3JhcCBhcnJheSB2YWx1ZSBmb3IgXCJhdXRvXCIgbW9kZS4gUmV0dXJuIHVuZGVmaW5lZCBmb3IgZW1wdHkgYXJyYXkuXG4gICAgICAgIGZ1bmN0aW9uIGFycmF5VW53cmFwKHZhbCkge1xuICAgICAgICAgICAgc3dpdGNoICh2YWwubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1vZGUgPT09ICdhdXRvJyA/IHZhbFswXSA6IHZhbDtcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsO1xuICAgICAgICAgIC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SByaWdodC5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlZnQubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjYWxsYmFjayhsZWZ0W2ldLCByaWdodFtpXSkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBbJ2VuY29kZScsICdkZWNvZGUnLCAnZXF1YWxzJywgJyRub3JtYWxpemUnXS5mb3JFYWNoKGZ1bmN0aW9uIChuYW1lKSB7XG4gICAgICAgICAgICB2YXIgcGFyYW1UeXBlRm4gPSB0eXBlW25hbWVdLmJpbmQodHlwZSk7XG4gICAgICAgICAgICB2YXIgd3JhcHBlckZuID0gbmFtZSA9PT0gJ2VxdWFscycgPyBhcnJheUVxdWFsc0hhbmRsZXIgOiBhcnJheUhhbmRsZXI7XG4gICAgICAgICAgICBfdGhpc1tuYW1lXSA9IHdyYXBwZXJGbihwYXJhbVR5cGVGbik7XG4gICAgICAgIH0pO1xuICAgICAgICBleHRlbmQodGhpcywge1xuICAgICAgICAgICAgZHluYW1pYzogdHlwZS5keW5hbWljLFxuICAgICAgICAgICAgbmFtZTogdHlwZS5uYW1lLFxuICAgICAgICAgICAgcGF0dGVybjogdHlwZS5wYXR0ZXJuLFxuICAgICAgICAgICAgaW5oZXJpdDogdHlwZS5pbmhlcml0LFxuICAgICAgICAgICAgcmF3OiB0eXBlLnJhdyxcbiAgICAgICAgICAgIGlzOiBhcnJheUhhbmRsZXIodHlwZS5pcy5iaW5kKHR5cGUpLCB0cnVlKSxcbiAgICAgICAgICAgICRhcnJheU1vZGU6IG1vZGUsXG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIHZhciBo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gICAgICAgaWYgKHVybFR5cGUpXG4gICAgICAgICAgICByZXR1cm4gdXJsVHlwZTtcbiAgICAgICAgaWYgKCFjZmcudHlwZSkge1xuICAgICAgICAgICAgdmFyIHR5cGUgPSBsb2NhdGlvbiA9PT0gZXhwb3J0cy5EZWZUeXBlLkNPTkZJR1xuICAgICAgICAgICAgICAgID8gJ2FueSdcbiAgICAgICAgICAgICAgICA6IGxvY2F0aW9uID09PSBleHBvcnRzLkRlZlR5cGUuUEFUSFxuICAgICAgICAgICAgICAgICAgICA/ICdwYXRoJ1xuICAgICAgICAgICAgICAgICAgICA6IGxvY2F0aW9uID09PSBleHBvcnRzLkRlZlR5cGUuU0VBUkNIXG4gICAgICAgICAgICAgICAgICAgICAgICA/ICdxdWVyeSdcbiAgICAgICAgICAgICAgICAgICAgICAgIDogJ3N0cmluZyc7XG4gICAgICAgICAgICByZXR1cm4gcGFyYW1UeXBlcy50eXBlKHR5cGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjZmcudHlwZSBpbnN0YW5jZW9mIFBhcmFtVHlwZSA/IGNmZy50eXBlIDogcGFyYW1UeXBlcy50eXBlKGNmZy50eXBlKTtcbiAgICB9XG4gICAgLyoqIHJldHVybnMgZmFsc2UsIHRydWUsIG9yIHRoZSBzcXVhc2ggdmFsdWUgdG8gaW5kaWNhdGUgdGhlIFwiZGVmYXVsdCBwYXJhbWV0ZXIgdXJsIHNxdWFzaCBwb2xpY3lcIi4gKi9cbiAgICBmdW5jdGlvbiBnZXRTcXVhc2hQb2xpY3koY29uZmlnLCBpc09wdGlvbmFsLCBkZWZhdWx0UG9saWN5KSB7XG4gICAgICAgIHZhciBzcXVhc2ggPSBjb25maWcuc3F1YXNoO1xuICAgICAgICBpZiAoIWlzT3B0aW9uYWwgfHwgc3F1YXNoID09PSBmYWxzZSlcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgaWYgKCFpc0RlZmluZWQoc3F1YXNoKSB8fCBzcXVhc2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b3IoXCJEZWZhdWx0IHZhbHVlIChcIiArIGRlZmF1bHRWYWx1ZSArIFwiKSBmb3IgcGFyYW1ldGVyICdcIiArIF90aGlzLmlkICsgXCInIGlzIG5vdCBhbiBpbnN0YW5jZSBvZiBQYXJhbVR5cGUgKFwiICsgX3RoaXMudHlwZS5uYW1lICsgXCIpXCIpO1xuICAgICAgICAgICAgICAgIGlmIChfdGhpcy5jb25maWcuJCRmblsnX19jYWNoZWFibGUnXSkge1xuICAgICAgICAgICAgICAgICAgICBfdGhpcy5fZGVmYXVsdFZhbHVlQ2FjaGUgPSB7IGRlZmF1bHRWYWx1ZTogZGVmYXVsdFZhbHVlIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBkZWZhdWx0VmFsdWU7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIHJlcGxhY2VTcGVjaWFsVmFsdWVzID0gZnVuY3Rpb24gKHZhbCkge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIF9pID0gMCwgX2EgPSBfdGhpcy5yZXBsYWNlOyBfaSA8IF9hLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgdHVwbGUgPSBfYVtfaV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh0dXBsZS5mcm9tID09PSB2YWwpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHVwbGUudG87XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFsdWUgPSByZXBsYWNlU3BlY2lhbFZhbHVlcyh2YWx1ZSk7XG4gICAgICAgICAgICByZXR1cm4gaXNVbmRlZmluZWQodmFsdWUpID8gZ2V0RGVmYXVsdFZhbHVlKCkgOiB0aGlzLnR5cGUuJG5vcm1hbGl6ZSh2YWx1ZSk7XG4gICAgICAgIH07XG4gICAgICAgIFBhcmFtLnByb3RvdHlwZS5pc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YXJhbVR5cGVzKCkge1xuICAgICAgICAgICAgdGhpcy5lbnF1ZXVlID0gdHJ1ZTtcbiAgICAgICAgICAgIHRoaXMudHlwZVF1ZXVlID0gW107XG4gICAgICAgICAgICB0aGlzLmRlZmF1bHRUeXBlcyA9IHBpY2soUGFyYW1UeXBlcy5wcm90b3R5cGUsIFtcbiAgICAgICAgICAgICAgICAnaGFzaCcsXG4gICAgICAgICAgICAgICAgJ3N0cmluZycsXG4gICAgICAgICAgICAgICAgJ3F1ZXJ5JyxcbiAgICAgICAgICAgICAgICAncGF0aCcsXG4gICAgICAgICAgICAgICAgJ2ludCcsXG4gICAgICAgICAgICAgICAgJ2Jvb2wnLFxuICAgICAgICAgICAgICAgICdkYXRlJyxcbiAgICAgICAgICAgICAgICAnanNvbicsXG4gICAgICAgICAgICAgICAgJ2FueScsXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIC8vIFJlZ2lzdGVyIGRlZmF1bHQgdHlwZXMuIFN0b3JlIHRoZW0gaW4gdGhlIHByb3RvdHlwZSBvZiB0aGlzLnR5cGVzLlxuICAgICAgICAgICAgdmFyIG1ha2VUeXBlID0gZnVuY3Rpb24gKGRlZmluaXRpb24sIG5hbWUpIHsgcmV0dXJuIG5ldyBQYXJhbVR5cGUoZXh0ZW5kKHsgbmFtZTogbmFtZSB9LCBkZWZpbml0aW9uKSk7IH07XG4gICAgICAgICAgICB0aGlzLnR5cGVzID0gaW5oZXJpdChtYXAodGhpcy5kZWZhdWx0VHlwZXMsIG1ha2VUeXBlKSwge30pO1xuICAgICAgICB9XG4gICAgICAgIFBhcmFtVHlwZXMucHJvdG90eXBlLmRpc3Bvc2UgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB0aGlzLnR5cGVzID0ge307XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBSZWdpc3RlcnMgYSBwYXJhbWV0ZXIgdHlwZVxuICAgICAgICAgKlxuICAgICAgICAgKiBFbmQgdXNl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ZhdWx0VHlwZUJhc2UsIGRlZik7XG4gICAgICAgIH07XG4gICAgICAgIC8vIERlZmF1bHQgUGFyYW1ldGVyIFR5cGUgRGVmaW5pdGlvbnNcbiAgICAgICAgZXh0ZW5kKFBhcmFtVHlwZXMucHJvdG90eXBlLCB7XG4gICAgICAgICAgICBzdHJpbmc6IG1ha2VEZWZhdWx0VHlwZSh7fSksXG4gICAgICAgICAgICBwYXRoOiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIHBhdHRlcm46IC9bXi9dKi8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIHF1ZXJ5OiBtYWtlRGVmYXVsdFR5cGUoe30pLFxuICAgICAgICAgICAgaGFzaDogbWFrZURlZmF1bHRUeXBlKHtcbiAgICAgICAgICAgICAgICBpbmhlcml0OiBmYWxzZSxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgaW50OiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGRlY29kZTogZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gcGFyc2VJbnQodmFsLCAxMCk7IH0sXG4gICAgICAgICAgICAgICAgaXM6IGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFpc051bGxPclVuZGVmaW5lZCh2YWwpICYmIHRoaXMuZGVjb2RlKHZhbC50b1N0cmluZygpKSA9PT0gdmFsO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcGF0dGVybjogLy0/XFxkKy8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIGJvb2w6IG1ha2VEZWZhdWx0VHlwZSh7XG4gICAgICAgICAgICAgICAgZW5jb2RlOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiAodmFsICYmIDEpIHx8IDA7IH0sXG4gICAgICAgICAgICAgICAgZGVjb2RlOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiBwYXJzZUludCh2YWwsIDEwKSAhPT0gMDsgfSxcbiAgICAgICAgICAgICAgICBpczogaXMoQm9vbGVhbiksXG4gICAgICAgICAgICAgICAgcGF0dGVybjogLzB8MS8sXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIGRhdGU6IG1ha2VEZWZhdWx0VHlwZSh7XG4gICAgICAgICAgICAgICAgZW5jb2RlOiBmdW5jdGlvbiAodmFsKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAhdGhpcy5pcyh2YWwpXG4gICAgICAgICAgICAgICAgICAgICAgICA/IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgOiBbdmFsLmdldEZ1bGxZZWFyKCksICgnMCcgKyAodmFsLmdldE1vbnRoKCkgKyAxKSkuc2xpY2UoLTIpLCAoJzAnICsgdmFsLmdldERhdGUoKSkuc2xpY2UoLTIpXS5qb2luKCctJyk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBkZWNvZGU6IGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuaXModmFsKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWw7XG4gICAgICAgICAgICAgICAgICAgIHZhciBtYXRjaCA9IHRoaXMuY2FwdHVyZS5leGVjKHZhbCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYXRjaCA/IG5ldyBEYXRlKG1hdGNoWzFdLCBtYXRjaFsyXSAtIDEsIG1hdGNoWzNdKSA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGlzOiBmdW5jdGlvbiAodmFsKSB7IHJldHVybiB2YWwgaW5zdGFuY2VvZiBEYXRlICYmICFpc05hTih2YWwudmFsdWVPZigpKTsgfSxcbiAgICAgICAgICAgICAgICBlcXVhbHM6IGZ1bmN0aW9uIChsLCByKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBbJ2dldEZ1bGxZZWFyJywgJ2dldE1vbnRoJywgJ2dldERhdGUnXS5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgZm4pIHsgcmV0dXJuIGFjYyAmJiBsW2ZuXSgpID09PSByW2ZuXSgpOyB9LCB0cnVlKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHBhdHRlcm46IC9bMC05XXs0fS0oPzowWzEtOV18MVswLTJdKS0oPzowWzEtOV18WzEtMl1bMC05XXwzWzAtMV0pLyxcbiAgICAgICAgICAgICAgICBjYXB0dXJlOiAvKFswLTldezR9KS0oMFsxLTldfDFbMC0yXSktKDBbMS05XXxbMS0yXVswLTldfDNbMC0xXSkvLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBqc29uOiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGVuY29kZTogdG9Kc29uLFxuICAgICAgICAgICAgICAgIGRlY29kZTogZnJvbUpzb24sXG4gICAgICAgICAgICAgICAgaXM6IGlzKE9iamVjdCksXG4gICAgICAgICAgICAgICAgZXF1YWxzOiBlcXVhbHMsXG4gICAgICAgICAgICAgICAgcGF0dGVybjogL1teL10qLyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgLy8gZG9lcyBub3QgZW5jb2RlL2RlY29kZVxuICAgICAgICAgICAgYW55OiBtYWtlRGVmYXVsdFR5cGUoe1xuICAgICAgICAgICAgICAgIGVuY29kZTogaWRlbnRpdHksXG4gICAgICAgICAgICAgICAgZGVjb2RlOiBpZGVudGl0eSxcbiAgICAgICAgICAgICAgICBpczogZnVuY3Rpb24gKCkgeyByZXR1cm4gdHJ1ZTsgfSxcbiAgICAgICAgICAgICAgICBlcXVhbHM6IGVxdWFscyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICB9KTtcbiAgICB9XG4gICAgaW5pdERlZmF1bHRUeXBlcygpO1xuXG4gICAgdmFyIFN0YXRlUGFyYW1zID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rp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SB7fSwgaW5oZXJpdExpc3QgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gcGFyZW50cykge1xuICAgICAgICAgICAgICAgIGlmICghcGFyZW50c1tpXSB8fCAhcGFyZW50c1tpXS5wYXJhbXMpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIHBhcmVudFBhcmFtcyA9IE9iamVjdC5rZXlzKHBhcmVudHNbaV0ucGFyYW1zKTtcbiAgICAgICAgICAgICAgICBpZiAoIXBhcmVudFBhcmFtcy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogaW4gcGFyZW50UGFyYW1zKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpbmhlcml0TGlzdC5pbmRleE9mKHBhcmVudFBhcmFtc1tqXSkgPj0gMClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICBpbmhlcml0TGlzdC5wdXNoKHBhcmVudFBhcmFtc1tqXSk7XG4gICAgICAgICAgICAgICAgICAgIGluaGVyaXRlZFtwYXJlbnRQYXJhbXNbal1dID0gdGhpc1twYXJlbnRQYXJhbXNbal1dO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBleHRlbmQoe30sIGluaGVyaXRlZCwgbmV3UGFyYW1zKTtcbiAgICAgICAgfTtcbiAgICAgICAgcmV0dXJuIFN0YXRlUGFyYW1zO1xuICAgIH0oKSk7XG5cbiAgICAvKipcbiAgICAgKiBBIG5vZGUgaW4gYSBbW1RyZWVDaGFuZ2VzXV0gcGF0aFxuICAgICAqXG4gICAgICogRm9yIGEgW1tUcmVlQ2hhbmdlc11dIHBhdGgsIHRoaXMgY2xhc3MgaG9sZHMgdGhlIHN0YXRlZnVsIGluZm9ybWF0aW9uIGZvciBhIHNpbmdsZSBub2R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BhcmFtIHZhbHVlcyAqL1xuICAgICAgICAgICAgZnVuY3Rpb24gYXBwbHlUb1BhcmFtcyhyZXRhaW5lZE5vZGUsIGlkeCkge1xuICAgICAgICAgICAgICAgIHZhciBjbG9uZWQgPSByZXRhaW5lZE5vZGUuY2xvbmUoKTtcbiAgICAgICAgICAgICAgICBjbG9uZWQucGFyYW1WYWx1ZXMgPSB0b1BhdGhbaWR4XS5wYXJhbVZhbHVlcztcbiAgICAgICAgICAgICAgICByZXR1cm4gY2xvbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGZyb20sIHJldGFpbmVkLCBleGl0aW5nLCBlbnRlcmluZywgdG87XG4gICAgICAgICAgICBmcm9tID0gZnJvbVBhdGg7XG4gICAgICAgICAgICByZXRhaW5lZCA9IGZyb20uc2xpY2UoMCwga2VlcCk7XG4gICAgICAgICAgICBleGl0aW5nID0gZnJvbS5zbGljZShrZWVwKTtcbiAgICAgICAgICAgIC8vIENyZWF0ZSBhIG5ldyByZXRhaW5lZCBwYXRoICh3aXRoIHNoYWxsb3cgY29waWVzIG9mIG5vZGVzKSB3aGljaCBoYXZlIHRoZSBwYXJhbXMgb2YgdGhlIHRvUGF0aCBtYXBwZWRcbiAgICAgICAgICAgIHZhciByZXRhaW5lZFdpdGhUb1BhcmFtcyA9IHJldGFpbmVkLm1hcChhcHBseVRvUGFyYW1zKTtcbiAgICAgICAgICAgIGVudGVyaW5nID0gdG9QYXRoLnNsaWNlKGtlZXApO1xuICAgICAgICAgICAgdG8gPSByZXRhaW5lZFdpdGhUb1BhcmFtcy5jb25jYXQoZW50ZXJpbmcpO1xuICAgICAgICAgICAgcmV0dXJuIHsgZnJvbTogZnJvbSwgdG86IHRvLCByZXRhaW5lZDogcmV0YWluZWQsIHJldGFpbmVkV2l0aFRvUGFyYW1zOiByZXRhaW5lZFdpdGhUb1BhcmFtcywgZXhpdGluZzogZXhpdGluZywgZW50ZXJpbmc6IGVudGVyaW5nIH07XG4gICAgICAg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tcbiAgICAgICAgICAgIGlmIChhcmcxIGluc3RhbmNlb2YgUmVzb2x2YWJsZSkge1xuICAgICAgICAgICAgICAgIGV4dGVuZCh0aGlzLCBhcmcxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRnVuY3Rpb24ocmVzb2x2ZUZuKSkge1xuICAgICAgICAgICAgICAgIGlmIChpc051bGxPclVuZGVmaW5lZChhcmcxKSlcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCduZXcgUmVzb2x2YWJsZSgpOiB0b2tlbiBhcmd1bWVudCBpcyByZXF1aXJlZCcpO1xuICAgICAgICAgICAgICAgIGlmICghaXNGdW5jdGlvbihyZXNvbHZlRm4pKVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ25ldyBSZXNvbHZhYmxlKCk6IHJlc29sdmVGbiBhcmd1bWVudCBtdXN0IGJlIGEgZnVuY3Rpb24nKTtcbiAgICAgICAgICAgICAgICB0aGlzLnRva2VuID0gYXJnMTtcbiAgICAgICAgICAgICAgICB0aGlzLnBvbGljeSA9IHBvbGljeTtcbiAgICAgICAgICAgICAgICB0aGlzLnJlc29sdmVGbiA9IHJlc29sdmVGbjtcbiAgICAgICAgICAgICAgICB0aGlzLmRlcHMgPSBkZXBzIHx8IFtdO1xuICAgICAgICAgICAgICAgIHRoaXMuZGF0YSA9IGRhdGE7XG4gICAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlZCA9IGRhdGEgIT09IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICB0aGlzLnByb21pc2UgPSB0aGlzLnJlc29sdmVkID8gc2VydmljZXMuJHEud2hlbih0aGlzLmRhdGEpIDogdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoaXNPYmplY3QoYXJnMSkgJiYgYXJnMS50b2tlbiAmJiAoYXJnMS5oYXNPd25Qcm9wZXJ0eSgncmVzb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ICAgdmFyIHN0YXRlID0gbm9kZSAmJiBub2RlLnN0YXRlO1xuICAgICAgICAgICAgdmFyIGFzeW5jUG9saWN5ID0gdGhpcy5nZXRQb2xpY3koc3RhdGUpLmFzeW5jO1xuICAgICAgICAgICAgdmFyIGN1c3RvbUFzeW5jUG9saWN5ID0gaXNGdW5jdGlvbihhc3luY1BvbGljeSkgPyBhc3luY1BvbGljeSA6IGlkZW50aXR5O1xuICAgICAgICAgICAgLy8gQWZ0ZXIgdGhlIGZpbmFsIHZhbHVlIGhhcyBiZWVuIHJlc29sdmVkLCB1cGRhdGUgdGhlIHN0YXRlIG9mIHRoZSBSZXNvbHZhYmxlXG4gICAgICAgICAgICB2YXIgYXBwbHlSZXNvbHZlZFZhbHVlID0gZnVuY3Rpb24gKHJlc29sdmVkVmFsdWUpIHtcbiAgICAgICAgICAgICAgICBfdGhpcy5kYXRhID0gcmVzb2x2ZWRWYWx1ZTtcbiAgICAgICAgICAgICAgICBfdGhpcy5yZXNvbHZlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgX3RoaXMucmVzb2x2ZUZuID0gbnVsbDtcbiAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVJlc29sdmFibGVSZXNvbHZlZChfdGhpcywgdHJhbnMpO1xuICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5kYXRhO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8vIFNldHMgdGhlIHByb21pc2UgcHJvcGVydHkgZmlyc3QsIHRoZW4gZ2V0c1Jlc29sdmFibGVEZXBlbmRlbmNpZXMgaW4gdGhlIGNvbnRleHQgb2YgdGhlIHByb21pc2UgY2hhaW4uIEFsd2F5cyB3YWl0cyBvbmUgdGljay5cbiAgICAgICAgICAgIHJldHVybiAodGhpcy5wcm9taXNlID0gJHFcbiAgICAgICAgICAgICAgICAud2hlbigpXG4gICAgICAgICAgICAgICAgLnRoZW4oZ2V0UmVzb2x2YWJsZURlcGVuZGVuY2llcylcbiAgICAgICAgICA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xuICAgICAgICAgICAgICAgIC8vIEZvciB0aGUgbWF0Y2hpbmcgUmVzb2x2YWJsZXMsIHN0YXJ0IHRoZWlyIGFzeW5jIGZldGNoIHByb2Nlc3MuXG4gICAgICAgICAgICAgICAgdmFyIHN1YkNvbnRleHQgPSBfdGhpcy5zdWJDb250ZXh0KG5vZGUuc3RhdGUpO1xuICAgICAgICAgICAgICAgIHZhciBnZXRSZXN1bHQgPSBmdW5jdGlvbiAocikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gclxuICAgICAgICAgICAgICAgICAgICAgICAgLmdldChzdWJDb250ZXh0LCB0cmFucylcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJldHVybiBhIHR1cGxlIHRoYXQgaW5jbHVkZXMgdGhlIFJlc29sdmFibGUncyB0b2tlblxuICAgICAgICAgICAgICAgICAgICAgICAgLnRoZW4oZnVuY3Rpb24gKHZhbHVlKSB7IHJldHVybiAoeyB0b2tlbjogci50b2tlbiwgdmFsdWU6IHZhbHVlIH0pOyB9KTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG5vd2FpdC5mb3JFYWNoKGdldFJlc3VsdCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjYy5jb25jYXQod2FpdC5tYXAoZ2V0UmVzdWx0KSk7XG4gICAgICAgICAgICB9LCBbXSk7XG4gICAgICAgICAgICAvLyBXYWl0IGZvciBhbGwgdGhlIFwiV0FJVFwiIHJlc29sdmFibGVzXG4gICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEuYWxsKHByb21pc2VzKTtcbiAgICAgICAgfTtcbiAgICAgICAgUmVzb2x2ZUNvbnRleHQucHJvdG90eXBlLmluamVjdG9yID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2luamVjdG9yIHx8ICh0aGlzLl9pbmplY3RvciA9IG5ldyBVSUluamVjdG9ySW1wbCh0aGlzKSk7XG4gICAgICAgIH07XG4gICAg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2YWlsYWJsZVJlc29sdmFibGVzID0gc3ViUGF0aFxuICAgICAgICAgICAgICAgIC5yZWR1Y2UoZnVuY3Rpb24gKGFjYywgX25vZGUpIHsgcmV0dXJuIGFjYy5jb25jYXQoX25vZGUucmVzb2x2YWJsZXMpOyB9LCBbXSkgLy8gYWxsIG9mIHN1YnBhdGgncyByZXNvbHZhYmxlc1xuICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24gKHJlcykgeyByZXR1cm4gcmVzICE9PSByZXNvbHZhYmxlOyB9KTsgLy8gZmlsdGVyIG91dCB0aGUgYHJlc29sdmFibGVgIGFyZ3VtZW50XG4gICAgICAgICAgICB2YXIgZ2V0RGVwZW5kZW5jeSA9IGZ1bmN0aW9uICh0b2tlbikge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGluZyA9IGF2YWlsYWJsZVJlc29sdmFibGVzLmZpbHRlcihmdW5jdGlvbiAocikgeyByZXR1cm4gci50b2tlbiA9PT0gdG9rZW47IH0pO1xuICAgICAgICAgICAgICAgIGlmIChtYXRjaGluZy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0YWlsKG1hdGNoaW5nKTtcbiAgICAgICAgICAgICAgICB2YXIgZnJvbUluamVjdG9yID0gX3RoaXMuaW5qZWN0b3IoKS5nZXROYXRpdmUodG9rZW4pO1xuICAgICAgICAgICAgICAgIGlmIChpc1VuZGVmaW5lZChmcm9tSW5qZWN0b3IpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ291bGQgbm90IGZpbmQgRGVwZW5kZW5jeSBJbmplY3Rpb24gdG9rZW46ICcgKyBzdHJpbmdpZnkodG9rZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBSZXNvbHZhYmxlKHRva2VuLCBmdW5jdGlvbiAoKSB7IHJldHVybiBmcm9tSW5qZWN0b3I7IH0sIFtdLCBmcm9tSW5qZWN0b3IpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmRlcHMubWFwKGdldERlcGVuZGVuY3kpO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gUmVzb2x2ZUNvbnRleHQ7XG4gICAgfSgpKTtcbiAgICAvKiogQGludGVybmFsICovXG4gICAgdmFyIFVJSW5qZWN0b3JJbXBsID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBVSUluamVjdG9ySW1wbChjb250ZXh0KSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRleHQgPSBjb250ZXh0O1xuICAgICAgICAgICAgdGhpcy5uYXRpdmUgPSB0aGlzLmdldChOQVRJVkVfSU5KRUNUT1JfVE9LRU4pIHx8IHNlcnZpY2VzLiRpbmplY3RvcjtcbiAgICAgICAgfVxuICAgICAgICBVSUluamVjdG9ySW1wbC5wcm90b3R5cGUuZ2V0ID0gZnVuY3Rpb24gKHRva2VuKSB7XG4gICAgICAgICAgICB2YXIgcmVzb2x2YWJsZSA9IHRoaXMuY29udGV4dC5nZXRSZXNvbHZhYmxlKHRva2VuKTtcbiAgICAgICAgICAgIGlmIChyZXNvbHZhYmxlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY29udGV4dC5nZXRQb2xpY3kocmVzb2x2YWJsZSkuYXN5bmMgPT09ICdOT1dBSVQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmdldCh0aGlzLmNvbnRleHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIXJlc29sdmFibGUucmVzb2x2ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdSZXNvbHZhYmxlIGFzeW5jIC5nZXQoKSBub3QgY29tcGxldGU6JyArIHN0cmluZ2lmeShyZXNvbHZhYmxlLnRva2VuKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZhYmxlLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5nZXROYXRpdmUodG9rZW4pO1xuICAgICAgICB9O1xuICAgICAgICBVSUluamVjdG9ySW1wbC5wcm90b3R5cGUuZ2V0QXN5bmMgPSBmdW5jdGlvbiAodG9rZW4pIHtcbiAgICAgICAgICAgIHZhciByZXNvbHZhYmxlID0gdGhpcy5jb250ZXh0LmdldFJlc29sdmFibGUodG9rZW4pO1xuICAgICAgICAgICAgaWYgKHJlc29sdmFibGUpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc29sdmFibGUuZ2V0KHRoaXMuY29udGV4dCk7XG4gICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbih0aGlzLm5hdGl2ZS5nZXQodG9rZW4pKTtcbiAgICAgICAgfTtcbiAgICAgICAgVUlJbmplY3RvckltcGwucHJvdG90eXBlLmdldE5hdGl2ZSA9IGZ1bmN0aW9uICh0b2tlbikge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMubmF0aXZlICYmIHRoaXMubmF0aXZlLmdldCh0b2tlbik7XG4gICAgICAgIH07XG4gICAgICAgIHJldHVybiBVSUluamVjdG9ySW1wbDtcbiAgICB9KCkpO1xuXG4gICAgdmFyIHBhcnNlVXJsID0gZnVuY3Rpb24gKHVybCkge1xuICAgICAgICBpZiAoIWlzU3RyaW5nKHVybCkpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIHZhciByb290ID0gdXJsLmNoYXJBdCgwKSA9PT0gJ14nO1xuICAgICAgICByZXR1cm4geyB2YWw6IHJvb3QgPyB1cmwuc3Vic3RyaW5nKDEpIDogdXJsLCByb290OiByb290IH07XG4gICAgfTtcbiAgICBmdW5jdGlvbiBuYW1lQnVpbGRlcihzdGF0ZSkge1xuICAgICAgICByZXR1cm4gc3RhdGUubmFtZTtcbiAgIC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0aGF0IGluamVjdHMgdGhlIG5hbWVkIHNlcnZpY2VcbiAgICAgKiAgIG15R3JhdWx0UmVzb2x2ZTogXCJTb21lU2VydmljZVwiXG4gICAgICogfVxuICAgICAqXG4gICAgICogb3I6XG4gICAgICpcbiAgICAgKiBbXG4gICAgICogICBuZXcgUmVzb2x2YWJsZShcIm15Rm9vUmVzb2x2ZVwiLCBmdW5jdGlvbigpIHsgcmV0dXJuIFwibXlGb29EYXRhXCIgfSksXG4gICAgICogICBuZXcgUmVzb2x2YWJsZShcIm15QmFyUmVzb2x2ZVwiLCBmdW5jdGlvbihkZXApIHsgcmV0dXJuIGRlcC5mZXRjaFNvbWV0aGluZ0FzUHJvbWlzZSgpIH0sIFsgXCJEZXBlbmRlbmN5TmFtZVwiIF0pLFxuICAgICAqICAgeyBwcm92aWRlOiBcIm15QmF6UmVzb2x2ZVwiLCB1c2VGYWN0b3J5OiBmdW5jdGlvbihkZXApIHsgZGVwLmZldGNoU29tZXRoaW5nQXNQcm9taXNlKCkgfSwgZGVwczogWyBcIkRlcGVuZGVuY3lOYW1lXCIgXSB9XG4gICAgICogXVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIHJlc29sdmFibGVzQnVpbGRlcihzdGF0ZSkge1xuICAgICAgICAvKiogY29udmVydCByZXNvbHZlOiB7fSBhbmQgcmVzb2x2ZVBvbGljeToge30gb2JqZWN0cyB0byBhbiBhcnJheSBvZiB0dXBsZXMgKi9cbiAgICAgICAgdmFyIG9iamVjdHMyVHVwbGVzID0gZnVuY3Rpb24gKHJlc29sdmVPYmosIHJlc29sdmVQb2xpY2llcykge1xuICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKHJlc29sdmVPYmogfHwge30pLm1hcChmdW5jdGlvbiAodG9rZW4pIHsgcmV0dXJuICh7XG4gICAgICAgICAgICAgICAgdG9rZW46IHRva2VuLFxuICAgICAgICAgICAgICAgIHZhbDogcmVzb2x2ZU9ialt0b2tlbl0sXG4gICAgICAgICAgICA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VkIFN0YXRlIG9iamVjdFxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgYnVpbHQgU3RhdGUgb2JqZWN0XG4gICAgICAgICAqL1xuICAgICAgICBTdGF0ZUJ1aWxkZXIucHJvdG90eXBlLmJ1aWxkID0gZnVuY3Rpb24gKHN0YXRlKSB7XG4gICAgICAgICAgICB2YXIgX2EgPSB0aGlzLCBtYXRjaGVyID0gX2EubWF0Y2hlciwgYnVpbGRlcnMgPSBfYS5idWlsZGVycztcbiAgICAgICAgICAgIHZhciBwYXJlbnQgPSB0aGlzLnBhcmVudE5hbWUoc3RhdGUpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCAmJiAhbWF0Y2hlci5maW5kKHBhcmVudCwgdW5kZWZpbmVkLCBmYWxzZSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBidWlsZGVycykge1xuICAgICAgICAgICAgICAgIGlmICghYnVpbGRlcnMuaGFzT3duUHJvcGVydHkoa2V5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgdmFyIGNoYWluID0gYnVpbGRlcnNba2V5XS5yZWR1Y2UoZnVuY3Rpb24gKHBhcmVudEZuLCBzdGVwKSB7IHJldHVybiBmdW5jdGlvbiAoX3N0YXRlKSB7IHJldHVybiBzdGVwKF9zdGF0ZSwgcGFyZW50Rm4pOyB9OyB9LCBub29wKTtcbiAgICAgICAgICAgICAgICBzdGF0ZVtrZXldID0gY2hhaW4oc3RhdGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICB9O1xuICAgICAgICBTdGF0ZUJ1aWxkZXIucHJvdG90eXBlLnBhcmVudE5hbWUgPSBmdW5jdGlvbiAoc3RhdGUpIHtcbiAgICAgICAgICAgIC8vIG5hbWUgPSAnZm9vLmJhci5iYXouKionXG4gICAgICAgICAgICB2YXIgbmFtZSA9IHN0YXRlLm5hbWUgfHwgJyc7XG4gICAgICAgICAgICAvLyBzZWdtZW50cyA9IFsnZm9vJywgJ2JhcicsICdiYXonLCAnLioqJ11cbiAgICAgICAgICAgIHZhciBzZWdtZW50cyA9IG5hbWUuc3BsaXQoJy4nKTtcbiAgICAgICAgICAgIC8vIHNlZ21lbnRzID0gWydmb28nLCAnYmFyJywgJ2JheiddXG4gICAgICAgICAgICB2YXIgbGFzdFNlZ21lbnQgPSBzZWdtZW50cy5wb3AoKTtcbiAgICAgICAgICAgIC8vIHNlZ21lbnRzID0gWydmb28nLCAnYmFyJ10gKGlnbm9yZSAuKiogc2VnbWVudCBmb3IgZnV0dXJlIHN0YXRlcylcbiAgICAgICAgICAgIGlmIChsYXN0U2VnbWVudCA9PT0gJyoqJylcbiAgICAgICAgICAgICAgICBzZWdtZW50cy5wb3AoKTtcbiAgICAgICAgICAgIGlmIChzZWdtZW50cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUucGFyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlN0YXRlcyB0aGF0IHNwZWNpZnkgdGhlICdwYXJlbnQ6JyBwcm9wZXJ0eSBzaG91bGQgbm90IGhhdmUgYSAnLicgaW4gdGhlaXIgbmFtZSAoXCIgKyBuYW1lICsgXCIpXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyAnZm9vLmJhcidcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VnbWVudHMuam9pbignLicpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFzdGF0ZS5wYXJlbnQpXG4gICAgICAgICAgICAgICAgcmV0dXJuICcnO1xuICAgICAgICAgICAgcmV0dXJuIGlzU3RyaW5nKHN0YXRlLnBhcmVudCkgPyBzdGF0ZS5wYXJlbnQgOiBzdGF0ZS5wYXJlbnQubmFtZTtcbiAgICAgICAgfT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mVzb2x2ZVBhdGggPSBmdW5jdGlvbiAobmFtZSwgYmFzZSkge1xuICAgICAgICAgICAgaWYgKCFiYXNlKVxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIk5vIHJlZmVyZW5jZSBwb2ludCBnaXZlbiBmb3IgcGF0aCAnXCIgKyBuYW1lICsgXCInXCIpO1xuICAgICAgICAgICAgdmFyIGJhc2VTdGF0ZSA9IHRoaXMuZmluZChiYXNlKTtcbiAgICAgICAgICAgIHZhciBzcGxpdE5hbWUgPSBuYW1lLnNwbGl0KCcuJyk7XG4gICAgICAgICAgICB2YXIgcGF0aExlbmd0aCA9IHNwbGl0TmFtZS5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgaSA9IDAsIGN1cnJlbnQgPSBiYXNlU3RhdGU7XG4gICAgICAgICAgICBmb3IgKDsgaSA8IHBhdGhMZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChzcGxpdE5hbWVbaV0gPT09ICcnICYmIGkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGJhc2VTdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzcGxpdE5hbWVbaV0gPT09ICdeJykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWN1cnJlbnQucGFyZW50KVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwiUGF0aCAnXCIgKyBuYW1lICsgXCInIG5vdCB2YWxpZCBmb3Igc3RhdGUgJ1wiICsgYmFzZVN0YXRlLm5hbWUgKyBcIidcIik7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBjdXJyZW50LnBhcmVudDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICA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FtZSkgeyByZXR1cm4gX3RoaXMuc3RhdGVzLmhhc093blByb3BlcnR5KG5hbWUpICYmIF90aGlzLnN0YXRlc1tuYW1lXTsgfTtcbiAgICAgICAgICAgIHZhciBub3RpZnlMaXN0ZW5lcnMgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlZ2lzdGVyZWQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIF90aGlzLmxpc3RlbmVycy5mb3JFYWNoKGZ1bmN0aW9uIChsaXN0ZW5lcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxpc3RlbmVyKCdyZWdpc3RlcmVkJywgcmVnaXN0ZXJlZC5tYXAoZnVuY3Rpb24gKHMpIHsgcmV0dXJuIHMuc2VsZjsgfSkpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgd2hpbGUgKHF1ZXVlLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc3RhdGUgPSBxdWV1ZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgIHZhciBuYW1lXzEgPSBzdGF0ZS5uYW1lO1xuICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBidWlsZGVyLmJ1aWxkKHN0YXRlKTtcbiAgICAgICAgICAgICAgICB2YXIgb3JwaGFuSWR4ID0gb3JwaGFucy5pbmRleE9mKHN0YXRlKTtcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBleGlzdGluZ1N0YXRlID0gZ2V0U3RhdGUobmFtZV8xKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGV4aXN0aW5nU3RhdGUgJiYgZXhpc3RpbmdTdGF0ZS5uYW1lID09PSBuYW1lXzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIlN0YXRlICdcIiArIG5hbWVfMSArIFwiJyBpcyBhbHJlYWR5IGRlZmluZWRcIik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4aXN0aW5nRnV0dXJlU3RhdGUgPSBnZXRTdGF0ZShuYW1lXzEgKyAnLioqJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChleGlzdGluZ0Z1dHVyZVN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBSZW1vdmUgZnV0dXJlIHN0YXRlIG9mIHRoZSBzYW1lIG5hbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucm91dGVyLnN0YXRlUmVnaXN0cnkuZGVyZWdpc3RlcihleGlzdGluZ0Z1dHVyZVN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdGF0ZXNbbmFtZV8xXSA9IHN0YXRlO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmF0dGFjaFJvdXRlKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9ycGhhbklkeCA+PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgb3JwaGFucy5zcGxpY2Uob3JwaGFuSWR4LCAxKTtcbiAgICAgICAgICAgICAgICAgICAgcmVnaXN0ZXJlZC5wdXNoKHN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBwcmV2ID0gcHJldmlvdXNRdWV1ZUxlbmd0aFtuYW1lXzFdO1xuICAgICAgICAgICAgICAgIHByZXZpb3VzUXVldWVMZW5ndGhbbmFtZV8xXSA9IHF1ZXVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBpZiAob3JwaGFuSWR4ID49IDAgJiYgcHJldiA9PT0gcXVldWUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFdhaXQgdW50aWwgdHdvIGNvbnN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0gb2JqZWN0cywgY2hhaW5zIHRoZW0gdG9nZXRoZXIuXG4gICAgICAgICAqIEVhY2ggaG9vayBpcyBpbnZva2VkIGFmdGVyIHRoZSBwcmV2aW91cyBvbmUgY29tcGxldGVzLlxuICAgICAgICAgKlxuICAgICAgICAgKiAjIyMjIEV4YW1wbGU6XG4gICAgICAgICAqIGBgYGpzXG4gICAgICAgICAqIHZhciBob29rczogVHJhbnNpdGlvbkhvb2tbXSA9IGdldEhvb2tzKCk7XG4gICAgICAgICAqIGxldCBwcm9taXNlOiBQcm9taXNlPGFueT4gPSBUcmFuc2l0aW9uSG9vay5jaGFpbihob29rcyk7XG4gICAgICAgICAqXG4gICAgICAgICAqIHByb21pc2UudGhlbihoYW5kbGVTdWNjZXNzLCBoYW5kbGVFcnJvcik7XG4gICAgICAgICAqIGBgYFxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gaG9va3MgdGhlIGxpc3Qgb2YgaG9va3MgdG8gY2hhaW4gdG9nZXRoZXJcbiAgICAgICAgICogQHBhcmFtIHdhaXRGb3IgaWYgcHJvdmlkZWQsIHRoZSBjaGFpbiBpcyBgLnRoZW4oKWAnZWQgb2ZmIHRoaXMgcHJvbWlzZVxuICAgICAgICAgKiBAcmV0dXJucyBhIGBQcm9taXNlYCBmb3Igc2VxdWVudGlhbGx5IGludm9raW5nIHRoZSBob29rcyAoaW4gb3JkZXIpXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5jaGFpbiA9IGZ1bmN0aW9uIChob29rcywgd2FpdEZvcikge1xuICAgICAgICAgICAgLy8gQ2hhaW4gdGhlIG5leHQgaG9vayBvZmYgdGhlIHByZXZpb3VzXG4gICAgICAgICAgICB2YXIgY3JlYXRlSG9va0NoYWluUiA9IGZ1bmN0aW9uIChwcmV2LCBuZXh0SG9vaykgeyByZXR1cm4gcHJldi50aGVuKGZ1bmN0aW9uICgpIHsgcmV0dXJuIG5leHRIb29rLmludm9rZUhvb2soKTsg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IDA7IGlkeCA8IGhvb2tzLmxlbmd0aDsgaWR4KyspIHtcbiAgICAgICAgICAgICAgICB2YXIgaG9va1Jlc3VsdCA9IGhvb2tzW2lkeF0uaW52b2tlSG9vaygpO1xuICAgICAgICAgICAgICAgIGlmIChpc1Byb21pc2UoaG9va1Jlc3VsdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbWFpbmluZ0hvb2tzID0gaG9va3Muc2xpY2UoaWR4ICsgMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBUcmFuc2l0aW9uSG9vay5jaGFpbihyZW1haW5pbmdIb29rcywgaG9va1Jlc3VsdCkudGhlbihkb25lQ2FsbGJhY2spO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBkb25lQ2FsbGJhY2soKTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJ1biBhbGwgVHJhbnNpdGlvbkhvb2tzLCBpZ25vcmluZyB0aGVpciByZXR1cm4gdmFsdWUuXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5ydW5BbGxIb29rcyA9IGZ1bmN0aW9uIChob29rcykge1xuICAgICAgICAgICAgaG9va3MuZm9yRWFjaChmdW5jdGlvbiAoaG9vaykgeyByZXR1cm4gaG9vay5pbnZva2VIb29rKCk7IH0pO1xuICAgICAgICB9O1xuICAgICAgICBUcmFuc2l0aW9uSG9vay5wcm90b3R5cGUubG9nRXJyb3IgPSBmdW5jdGlvbiAoZXJyKSB7XG4gICAgICAgICAgICB0aGlzLnRyYW5zaXRpb24ucm91dGVyLnN0YXRlU2VydmljZS5kZWZhdWx0RXJyb3JIYW5kbGVyKCkoZXJyKTtcbiAgICAgICAgfTtcbiAgICAgICAgVHJhbnNpdGlvbkhvb2sucHJvdG90eXBlLmludm9rZUhvb2sgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzO1xuICAgICAgICAgICAgdmFyIGhvb2sgPSB0aGlzLnJlZ2lzdGVyZWRIb29rO1xuICAgICAgICAgICAgaWYgKGhvb2suX2RlcmVnaXN0ZXJlZClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB2YXIgbm90Q3VycmVudCA9IHRoaXMuZ2V0Tm90Q3VycmVudFJlamVjdGlvbigpO1xuICAgICAgICAgICAgaWYgKG5vdEN1cnJlbnQpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vdEN1cnJlbnQ7XG4gICAgICAgICAgICB2YXIgb3B0aW9ucyA9IHRoaXMub3B0aW9ucztcbiAgICAgICAgICAgIHRyYWNlLnRyYWNlSG9va0ludm9jYXRpb24odGhpcywgdGhpcy50cmFuc2l0aW9uLCBvcHRpb25zKTtcbiAgICAgICAgICAgIHZhciBpbnZva2VDYWxsYmFjayA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGhvb2suY2FsbGJhY2suY2FsbChvcHRpb25zLmJpbmQsIF90aGlzLnRyYW5zaXRpb24sIF90aGlzLnN0YXRlQ29udGV4dCk7IH07XG4gICAgICAgICAgICB2YXIgbm9ybWFsaXplRXJyID0gZnVuY3Rpb24gKGVycikgeyByZXR1cm4gUmVqZWN0aW9uLm5vcm1hbGl6ZShlcnIpLnRvUHJvbWlzZSgpOyB9O1xuICAgICAgICAgICAgdmFyIGhhbmRsZUVycm9yID0gZnVuY3Rpb24gKGVycikgeyByZXR1cm4gaG9vay5ldmVudFR5cGUuZ2V0RXJyb3JIYW5kbGVyKF90aGlzKShlcnIpOyB9O1xuICAgICAgICAgICAgdmFyIGhhbmRsZVJlc3VsdCA9IGZ1bmN0aW9uIChyZXN1bHQpIHsgcmV0dXJuIGhvb2suZXZlbnRUeXBlLmdldFJlc3VsdEhhbmRsZXIoX3RoaXMpKHJlc3VsdCk7IH07XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHZhciByZXN1bHQgPSBpbnZva2VDYWxsYmFjaygpO1xuICAgICAgICAgICAgICAgIGlmICghdGhpcy50eXBlLnN5bmNocm9ub3VzICYmIGlzUHJvbWlzZShyZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQuY2F0Y2gobm9ybWFsaXplRXJyKS50aGVuKGhhbmRsZVJlc3VsdCwgaGFuZGxlRXJyb3IpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZVJlc3VsdChyZXN1bHQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoIChlcnIpIHtcbiAgICAgICAgICAgICAgICAvLyBJZiBjYWxsYmFjayB0aHJvd3MgKHN5bmNocm9ub3VzbHkpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZUVycm9yKFJlamVjdGlvbi5ub3JtYWxpemUoZXJyKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICBpZiAoaG9vay5pbnZva2VMaW1pdCAmJiArK2hvb2suaW52b2tlQ291bnQgPj0gaG9vay5pbnZva2VMaW1pdCkge1xuICAgICAgICAgICAgICAgICAgICBob29rLmRlcmVnaXN0ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBUaGlzIG1ldGhvZCBoYW5kbGVzIHRoZSByZXR1cm4gdmFsdWUgb2YgYSBUcmFuc2l0aW9uIEhvb2suXG4gICAgICAgICAqXG4gICAgICAgICAqIEEgaG9vayBjYW4gcmV0dXJuIGZhbHNlIChjYW5jZWwpLCBhIFRhcmdldFN0YXRlIChyZWRpcmVjdCksXG4gICAgICAgICAqIG9yIGEgcHJvbWlzZSAod2hpY2ggbWF5IGxhdGVyIHJlc29sdmUgdG8gZmFsc2Ugb3IgYSByZWRpcmVjdClcbiAgICAgICAgICpcbiAgICAgICAgICogVGhpcyBhbHNvIGhhbmRsZXMgXCJ0cmFuc2l0aW9uIHN1cGVyc2VkZWRcIiAtLSB3aGVuIGEgbmV3IHRyYW5zaXRpb25cbiAgICAgICAgICogd2FzIHN0YXJ0ZWQgd2hpbGUgdGhlIGhvb2sgd2FzIHN0aWxsIHJ1bm5pbmdcbiAgICAgICAgICovXG4gICAgICAgIFRyYW5zaXRpb25Ib29rLnByb3RvdHlwZS5oYW5kbGVIb29rUmVzdWx0ID0gZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHZhciBub3RDdXJyZW50ID0gdGhpcy5nZXROb3RDdXJyZW50UmVqZWN0aW9uKCk7XG4gICAgICAgICAgICBpZiAobm90Q3VycmVudClcbiAgICAgICAgICAgICAgICByZXR1cm4gbm90Q3VycmVudDtcbiAgICAgICAgICAgIC8vIEhvb2sgcmV0dXJuZWQgYSBwcm9taXNlXG4gICAgICAgICAgICBpZiAoaXNQcm9taXNlKHJlc3VsdCkpIHtcbiAgICAgICAgICAgICAgICAvLyBXYWl0IGZvciB0aGUgcHJvbWlzZSwgdGhlbiByZXByb2Nlc3Mgd2l0aCB0aGUgcmVzdWx0aW5nIHZhbHVlXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdC50aGVuKGZ1bmN0aW9uICh2YWwpIHsgcmV0dXJuIF90aGlzLmhhbmRsZUhvb2tSZXN1bHQodmFsKTsgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0cmFjZS50cmFjZUhvb2tSZXN1bHQocmVzdWx0LCB0aGlzLnRyYW5zaXRpb24sIHRoaXMub3B0aW9ucyk7XG4gICAgICAgICAgICAvLyBIb29rIHJldHVybmVkIGZhbHNlXG4gICAgICAgICAgICBpZiAocmVzdWx0ID09PSBmYWxzZSkge1xuICAgICAgICAgICAgICA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ICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiB7XG4gICAgICAgICAqICAgdG86IHRydWUsXG4gICAgICAgICAqICAgZnJvbTogdHJ1ZSxcbiAgICAgICAgICogICBlbnRlcmluZzogdHJ1ZSxcbiAgICAgICAgICogICBleGl0aW5nOiB0cnVlLFxuICAgICAgICAgKiAgIHJldGFpbmVkOiB0cnVlLFxuICAgICAgICAgKiB9XG4gICAgICAgICAqL1xuICAgICAgICBSZWdpc3RlcmVkSG9vay5wcm90b3R5cGUuX2dldERlZmF1bHRNYXRjaENyaXRlcmlhID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIG1hcE9iaih0aGlzLnRyYW5TdmMuX3BsdWdpbmFwaS5fZ2V0UGF0aFR5cGVzKCksIGZ1bmN0aW9uICgpIHsgcmV0dXJuIHRydWU7IH0pO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0cyBtYXRjaGluZyBub2RlcyBhcyBbW0lNYXRjaGluZ05vZGVzXV1cbiAgICAgICAgICpcbiAgICAgICAgICogQ3JlYXRlIGEgSU1hdGNoaW5nTm9kZXMgb2JqZWN0IGZyb20gdGhlIFRyYW5zaXRpb25Ib29rVHlwZXMgdGhhdCBpcyByb3VnaGx5IGVxdWl2YWxlbnQgdG86XG4gICAgICAgICAqXG4gICAgICAgICAqIGBgYGpzXG4gICAgICAgICAqIGxldCBtYXRjaGVzOiBJTWF0Y2hpbmdOb2RlcyA9IHtcbiAgICAgICAgICogICB0bzogICAgICAgX21hdGNoaW5nTm9kZXMoW3RhaWwodHJlZUNoYW5nZXMudG8pXSwgICBtYy50byksXG4gICAgICAgICAqICAgZnJvbTogICAgIF9tYXRjaGluZ05vZGVzKFt0YWlsKHRyZWVDaGFuZ2VzLmZyb20pXSwgbWMuZnJvbSksXG4gICAgICAgICAqICAgZXhpdGluZzogIF9tYXRjaGluZ05vZGVzKHRyZWVDaGFuZ2VzLmV4aXRpbmcsICAgICAgbWMu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mFyIG1hdGNoaW5nTm9kZXMgPSBtYXRjaGVzW2hvb2tUeXBlLmNyaXRlcmlhTWF0Y2hQYXRoLm5hbWVdO1xuICAgICAgICAgICAgICAgIC8vIFJldHVybiBhbiBhcnJheSBvZiBIb29rVHVwbGVzXG4gICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoaW5nTm9kZXMubWFwKGZ1bmN0aW9uIChub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBfb3B0aW9ucyA9IGV4dGVuZCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBiaW5kOiBob29rLmJpbmQsXG4gICAgICAgICAgICAgICAgICAgICAgICB0cmFjZURhdGE6IHsgaG9va1R5cGU6IGhvb2tUeXBlLm5hbWUsIGNvbnRleHQ6IG5vZGUgfSxcbiAgICAgICAgICAgICAgICAgICAgfSwgYmFzZUhvb2tPcHRpb25zKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlID0gaG9va1R5cGUuY3JpdGVyaWFNYXRjaFBhdGguc2NvcGUgPT09IGV4cG9ydHMuVHJhbnNpdGlvbkhvb2tTY29wZS5TVEFURSA/IG5vZGUuc3RhdGUuc2VsZiA6IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHZhciB0cmFuc2l0aW9uSG9vayA9IG5ldyBUcmFuc2l0aW9uSG9vayh0cmFuc2l0aW9uLCBzdGF0ZSwgaG9vaywgX29wdGlvbnMpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBob29rOiBob29rLCBub2RlOiBub2RlLCB0cmFuc2l0aW9uSG9vazogdHJhbnNpdGlvbkhvb2sgfTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gbWF0Y2hpbmdIb29rc1xuICAgICAgICAgICAgICAgIC5tYXAobWFrZVRyYW5zaXRpb25Ib29rcylcbiAgICAgICAgICAgICAgICAucmVkdWNlKHVubmVzdFIsIFtdKVxuICAgICAgICAgICA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gICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS4kZnJvbSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0YWlsKHRoaXMuX3RyZWVDaGFuZ2VzLmZyb20pLnN0YXRlO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQGludGVybmFsXG4gICAgICAgICAqIEByZXR1cm5zIHRoZSBpbnRlcm5hbCB0byBbU3RhdGVdIG9iamVjdFxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvbi5wcm90b3R5cGUuJHRvID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRhaWwodGhpcy5fdHJlZUNoYW5nZXMudG8pLnN0YXRlO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0dXJucyB0aGUgXCJmcm9tIHN0YXRlXCJcbiAgICAgICAgICpcbiAgICAgICAgICogUmV0dXJucyB0aGUgc3RhdGUgdGhhdCB0aGUgdHJhbnNpdGlvbiBpcyBjb21pbmcgKmZyb20qLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyBUaGUgc3RhdGUgZGVjbGFyYXRpb24gb2JqZWN0IGZvciB0aGUgVHJhbnNpdGlvbidzIChcImZyb20gc3RhdGVcIikuXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS5mcm9tID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJGZyb20oKS5zZWxmO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmV0dXJucyB0aGUgXCJ0byBzdGF0ZVwiXG4gICAgICAgICAqXG4gICAgICAgICAqIFJldHVybnMgdGhlIHN0YXRlIHRoYXQgdGhlIHRyYW5zaXRpb24gaXMgZ29pbmcgKnRvKi5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgVGhlIHN0YXR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0aW9uIChub2RlKSB7IHJldHVybiAhcmVsb2FkU3RhdGUgfHwgIW5vZGUuc3RhdGUuaW5jbHVkZXNbcmVsb2FkU3RhdGUubmFtZV07IH0pLmxlbmd0aDtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgbmV3VEMgPSB0aGlzLnRyZWVDaGFuZ2VzKCk7XG4gICAgICAgICAgICB2YXIgcGVuZFRDID0gcGVuZGluZyAmJiBwZW5kaW5nLnRyZWVDaGFuZ2VzKCk7XG4gICAgICAgICAgICBpZiAocGVuZFRDICYmIHNhbWUocGVuZFRDLnRvLCBuZXdUQy50bykgJiYgc2FtZShwZW5kVEMuZXhpdGluZywgbmV3VEMuZXhpdGluZykpXG4gICAgICAgICAgICAgICAgcmV0dXJuICdTYW1lQXNQZW5kaW5nJztcbiAgICAgICAgICAgIGlmIChuZXdUQy5leGl0aW5nLmxlbmd0aCA9PT0gMCAmJiBuZXdUQy5lbnRlcmluZy5sZW5ndGggPT09IDAgJiYgc2FtZShuZXdUQy5mcm9tLCBuZXdUQy50bykpXG4gICAgICAgICAgICAgICAgcmV0dXJuICdTYW1lQXNDdXJyZW50JztcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIFJ1bnMgdGhlIHRyYW5zaXRpb25cbiAgICAgICAgICpcbiAgICAgICAgICogVGhpcyBtZXRob2QgaXMgZ2VuZXJhbGx5IGNhbGxlZCBmcm9tIHRoZSBbW1N0YXRlU2VydmljZS50cmFuc2l0aW9uVG9dXVxuICAgICAgICAgKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgYSBwcm9taXNlIGZvciBhIHN1Y2Nlc3NmdWwgdHJhbnNpdGlvbi5cbiAgICAgICAgICovXG4gICAgICAgIFRyYW5zaXRpb24ucHJvdG90eXBlLnJ1biA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICB2YXIgcnVuQWxsSG9va3MgPSBUcmFuc2l0aW9uSG9vay5ydW5BbGxIb29rcztcbiAgICAgICAgICAgIC8vIEdldHMgdHJhbnNpdGlvbiBob29rcyBhcnJheSBmb3IgdGhlIGdpdmVuIHBoYXNlXG4gICAgICAgICAgICB2YXIgZ2V0SG9va3NGb3IgPSBmdW5jdGlvbiAocGhhc2UpIHsgcmV0dXJuIF90aGlzLl9ob29rQnVpbGRlci5idWlsZEhvb2tzRm9yUGhhc2UocGhhc2UpOyB9O1xuICAgICAgICAgICAgLy8gV2hlbiB0aGUgY2hhaW4gaXMgY29tcGxldGUsIHRoZW4gcmVzb2x2ZSBvciByZWplY3QgdGhlIGRlZmVycmVkXG4gICAgICAgICAgICB2YXIgdHJhbnNpdGlvblN1Y2Nlc3MgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdHJhY2UudHJhY2VTdWNjZXNzKF90aGlzLiR0bygpLCBfdGhpcyk7XG4gICAgICAgICAgICAgICAgX3RoaXMuc3VjY2VzcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgX3RoaXMuX2RlZmVycmVkLnJlc29sdmUoX3RoaXMudG8oKSk7XG4gICAgICAgICAgICAgICAgcnVuQWxsSG9va3MoZ2V0SG9va3NGb3IoZXhwb3J0cy5UcmFuc2l0aW9uSG9va1BoYXNlLlNVQ0NFU1MpKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgdHJhbnNpdGlvbkVycm9yID0gZnVuY3Rpb24gKHJlYXNvbikge1xuICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlRXJyb3IocmVhc29uLCBfdGhpcyk7XG4gICAgICAgICAgICAgICAgX3RoaXMuc3VjY2VzcyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIF90aGlzLl9kZWZlcnJlZC5yZWplY3QocmVhc29uKTtcbiAgICAgICAgICAgICAgICBfdGhpcy5fZXJyb3IgPSByZWFzb247XG4gICAgICAgICAgICA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aXMpO1xuICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVHJhbnNpdGlvblN0YXJ0KF90aGlzKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbih1bmRlZmluZWQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHZhciBhbGxCZWZvcmVIb29rcyA9IGdldEhvb2tzRm9yKGV4cG9ydHMuVHJhbnNpdGlvbkhvb2tQaGFzZS5CRUZPUkUpO1xuICAgICAgICAgICAgVHJhbnNpdGlvbkhvb2suaW52b2tlSG9va3MoYWxsQmVmb3JlSG9va3MsIHN0YXJ0VHJhbnNpdGlvbilcbiAgICAgICAgICAgICAgICAudGhlbihydW5UcmFuc2l0aW9uKVxuICAgICAgICAgICAgICAgIC50aGVuKHRyYW5zaXRpb25TdWNjZXNzLCB0cmFuc2l0aW9uRXJyb3IpO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucHJvbWlzZTtcbiAgICAgICAgfTtcbiAgICAgICAgLyoqXG4gICAgICAgICAqIENoZWNrcyBpZiB0aGUgVHJhbnNpdGlvbiBpcyB2YWxpZFxuICAgICAgICAgKlxuICAgICAgICAgKiBAcmV0dXJucyB0cnVlIGlmIHRoZSBUcmFuc2l0aW9uIGlzIHZhbGlkXG4gICAgICAgICAqL1xuICAgICAgICBUcmFuc2l0aW9uLnByb3RvdHlwZS52YWxpZCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiAhdGhpcy5lcnJvcigpIHx8IHRoaXMuc3VjY2VzcyAhPT0gdW5kZWZpbmVkO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQWJvcnRzIHRoaXMgdHJhbnNpdGlvblxuICAgICAgICAgKlxuICAgICAgICAgKiBJbXBlcmF0aXZlIEFQSSB0byBhYm9ydCBhIFRyYW5zaXRpb24uXG4gICAgICAgICAqIFRoaXMgb25seSBhcHBsaWVzIHRvIFRyYW5zaXRpb25zIHRoYX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XRjaGVkIGdyb3VwcyBpbnN0ZWFkIG9mIG51bGxcbiAgICAgICAgICAgICAgICB2YXIgaWQgPSBtWzJdIHx8IG1bM107XG4gICAgICAgICAgICAgICAgdmFyIHJlZ2V4cCA9IGlzU2VhcmNoID8gbVs0XSA6IG1bNF0gfHwgKG1bMV0gPT09ICcqJyA/ICdbXFxcXHNcXFxcU10qJyA6IG51bGwpO1xuICAgICAgICAgICAgICAgIHZhciBtYWtlUmVnZXhwVHlwZSA9IGZ1bmN0aW9uIChzdHIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGluaGVyaXQocGFyYW1UeXBlcy50eXBlKGlzU2VhcmNoID8gJ3F1ZXJ5JyA6ICdwYXRoJyksIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdHRlcm46IG5ldyBSZWdFeHAoc3RyLCBfdGhpcy5jb25maWcuY2FzZUluc2Vuc2l0aXZlID8gJ2knIDogdW5kZWZpbmVkKSxcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBpZDogaWQsXG4gICAgICAgICAgICAgICAgICAgIHJlZ2V4cDogcmVnZXhwLFxuICAgICAgICAgICAgICAgICAgICBzZWdtZW50OiBwYXR0ZXJuLnN1YnN0cmluZyhsYXN0LCBtLmluZGV4KSxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogIXJlZ2V4cCA/IG51bGwgOiBwYXJhbVR5cGVzLnR5cGUocmVnZXhwKSB8fCBtYWtlUmVnZXhwVHlwZShyZWdleHApLFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGRldGFpbHM7XG4gICAgICAgICAgICB2YXIgc2VnbWVudDtcbiAgICAgICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTpuby1jb25kaXRpb25hbC1hc3NpZ25tZW50XG4gICAgICAgICAgICB3aGlsZSAoKG1hdGNoQXJyYXkgPSBwbGFjZWhvbGRlci5leGVjKHBhdHRlcm4pKSkge1xuICAgICAgICAgICAgICAgIGRldGFpbHMgPSBtYXRjaERldGFpbHMobWF0Y2hBcnJheSwgZmFsc2UpO1xuICAgICAgICAgICAgICAgIGlmIChkZXRhaWxzLnNlZ21lbnQuaW5kZXhPZignPycpID49IDApXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrOyAvLyB3ZSdyZSBpbnRvIHRoZSBzZWFyY2ggcGFydFxuICAgICAgICAgICAgICAgIGNoZWNrUGFyYW1FcnJvcnMoZGV0YWlscy5pZCk7XG4gICAgICAgICAgICAgICAgdGhpcy5fcGFyYW1zLnB1c2gocGFyYW1GYWN0b3J5LmZyb21QYXRoKGRldGFpbHMuaWQsIGRldGFpbHMudHlwZSwgY29uZmlnLnN0YXRlKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5fc2VnbWVudHMucHVzaChkZXRhaWxzLnNlZ21lbnQpO1xuICAgICAgICAgICAgICAgIHBhdHRlcm5zLnB1c2goW2RldGFpbHMuc2VnbWVudCwgdGFpbCh0aGlzLl9wYXJhbXMpXSk7XG4gICAgICAgICAgICAgICAgbGFzdCA9IHBsYWNlaG9sZGVyLmxhc3RJbmRleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNlZ21lbnQgPSBwYXR0ZXJuLnN1YnN0cmluZyhsYXN0KTtcbiAgICAgICAgICAgIC8vIEZpbmQgYW55IHNlYXJjaCBwYXJhbWV0ZXIgbmFtZXMgYW5kIHJlbW92ZSB0aGVtIGZyb20gdGhlIGxhc3Qgc2VnbWVudFxuICAgICAgICAgICAgdmFyIGkgPSBzZWdtZW50LmluZGV4T2YoJz8nKTtcbiAgICAgICAgICAgIGlmIChpID49IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc2VhcmNoID0gc2VnbWVudC5zdWJzdHJpbmcoaSk7XG4gICAgICAgICAgICAgICAgc2VnbWVudCA9IHNlZ21lbnQuc3Vic3RyaW5nKDAsIGkpO1xuICAgICAgICAgICAgICAgIGlmIChzZWFyY2gubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICBsYXN0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm5vLWNvbmRpdGlvbmFsLWFzc2lnbm1lbnRcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChtYXRjaEFycmF5ID0gc2VhcmNoUGxhY2Vob2xkZXIuZXhlYyhzZWFyY2gpKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGV0YWlscyA9IG1hdGNoRGV0YWlscyhtYXRjaEFycmF5LCB0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrUGFyYW1FcnJvcnMoZGV0YWlscy5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9wYXJhbXMucHVzaChwYXJhbUZhY3RvcnkuZnJvbVNlYXJjaChkZXRhaWxzLmlkLCBkZXRhaWxzLnR5cGUsIGNvbmZpZy5zdGF0ZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdCA9IHBsYWNlaG9sZGVyLmxhc3RJbmRleDtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNoZWNrIGlmID8mXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLl9zZWdtZW50cy5wdXNoKHNlZ21lbnQpO1xuICAgICAgICAgICAgdGhpcy5fY29tcGlsZWQgPSBwYXR0ZXJucy5tYXAoZnVuY3Rpb24gKF9wYXR0ZXJuKSB7IHJldHVybiBxdW90ZVJlZ0V4cC5hcHBseShudWxsLCBfcGF0dGVybik7IH0pLmNvbmNhdChxdW90ZVJlZ0V4cChzZWdtZW50KSk7XG4gICAgICAgIH1cbiAgICAgICAgLyoqIEBpbnRlcm5hbCAqL1xu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NsYXNoIGxpdGVyYWxzICcvJywgc3RyaW5nIGxpdGVyYWxzLCBhbmQgUGFyYW0gb2JqZWN0c1xuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFRoaXMgZXhhbXBsZSBtYXRjaGVyIG1hdGNoZXMgc3RyaW5ncyBsaWtlIFwiL2Zvby86cGFyYW0vdGFpbFwiOlxuICAgICAgICAgICAgICogdmFyIG1hdGNoZXIgPSAkdW1mLmNvbXBpbGUoXCIvZm9vXCIpLmFwcGVuZCgkdW1mLmNvbXBpbGUoXCIvOnBhcmFtXCIpKS5hcHBlbmQoJHVtZi5jb21waWxlKFwiL1wiKSkuYXBwZW5kKCR1bWYuY29tcGlsZShcInRhaWxcIikpO1xuICAgICAgICAgICAgICogdmFyIHJlc3VsdCA9IHNlZ21lbnRzKG1hdGNoZXIpOyAvLyBbICcvJywgJ2ZvbycsICcvJywgUGFyYW0sICcvJywgJ3RhaWwnIF1cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBDYWNoZXMgdGhlIHJlc3VsdCBhcyBgbWF0Y2hlci5fY2FjaGUuc2VnbWVudHNgXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHZhciBzZWdtZW50cyA9IGZ1bmN0aW9uIChtYXRjaGVyKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChtYXRjaGVyLl9jYWNoZS5zZWdtZW50cyA9XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXIuX2NhY2hlLnNlZ21lbnRzIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXRjaGVyLl9jYWNoZS5wYXRoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChVcmxNYXRjaGVyLnBhdGhTZWdtZW50c0FuZFBhcmFtcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVkdWNlKHVubmVzdFIsIFtdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2Uoam9pbk5laWdoYm9yc1IsIFtdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHgpIHsgcmV0dXJuIChpc1N0cmluZyh4KSA/IHNwbGl0T25TbGFzaCh4KSA6IHgpOyB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgdGhlIHNvcnQgd2VpZ2h0IGZvciBlYWNoIHNlZ21lbnQgb2YgYSBVcmxNYXRjaGVyXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogQ2FjaGVzIHRoZSByZXN1bHQgYXMgYG1hdGNoZXIuX2NhY2hlLndlaWdodHNgXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHZhciB3ZWlnaHRzID0gZnVuY3Rpb24gKG1hdGNoZXIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKG1hdGNoZXIuX2NhY2hlLndlaWdodHMgPVxuICAgICAgICAgICAgICAgICAgICBtYXRjaGVyLl9jYWNoZS53ZWlnaHRzIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWdtZW50cyhtYXRjaGVyKS5tYXAoZnVuY3Rpb24gKHNlZ21lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTb3J0IHNsYXNoZXMgZmlyc3QsIHRoZW4gc3RhdGljIHN0cmluZ3MsIHRoZSBQYXJhbXNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2VnbWVudCA9PT0gJy8nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNTdHJpbmcoc2VnbWVudCkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWdtZW50IGluc3RhbmNlb2YgUGFyYW0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogUGFkcyBzaG9ydGVyIGFycmF5IGluLXBsYWNlIChtdXRhdGVzKVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB2YXIgcGFkQXJyYXlzID0gZnVuY3Rpb24gKGwsIHIsIHBhZFZhbCkge1xuICAgICAgICAgICAgICAgIHZhciBsZW4gPSBNYXRoLm1heChsLmxlbmd0aCwgci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIHdoaWxlIChsLmxlbmd0aCA8IGxlbilcbiAgICAgICAgICAgICAgICAgICAgbC5wdXNoKHBhZFZhbCk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHIubGVuZ3RoIDwgbGVuKVxuICAgICAgICAgICAgICAgICAgICByLnB1c2gocGFkVmFsKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgd2VpZ2h0c0EgPSB3ZWlnaHRzKGEpLCB3ZWlnaHRzQiA9IHdlaWdodHMoYik7XG4gICAgICAgICAgICBwYWRBcnJheXMod2VpZ2h0c0EsIHdlaWdodHNCLCAwKTtcbiAgICAgICAgICAgIHZhciBfcGFpcnMgPSBhcnJheVR1cGxlcyh3ZWlnaHRzQSwgd2VpZ2h0c0IpO1xuICAgICAgICAgICAgdmFyIGNtcCwgaTtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBfcGFpcnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjbXAgPSBfcGFpcnNbaV1bMF0gLSBfcGFpcnNbaV1bMV07XG4gICAgICAgICAgICAgICAgaWYgKGNtcCAhPT0gMClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNtcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQ3JlYXRlcyBhIG5ldyBjb25jYXRlbmF0ZWQgVXJsTWF0Y2hlclxuICAgICAgICAgKlxuICAgICAgICAgKiBCdWlsZHMgYSBuZXcgVXJsTWF0Y2hlciBieSBhcHBlbmRpbmcgYW5vdGhlciBVcmxNYXRjaGVyIHRvIHRoaXMgb25lLlxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gdXJsIEEgYFVybE1hdGNoZXJgIGluc3RhbmNlIHRvIGFwcGVuZCBhcyBhIGNoaWxkIG9mIHRoZSBjdXJyZW50IGBVcmxNYXRjaGVyYC5cbiAgICAgICAgICovXG4gICAgICAgIFVybE1hdGNoZXIucHJvdG90eXBlLmFwcGVuZCA9IGZ1bmN0aW9uICh1cmwpIHtcbiAgICAgICAgICAgIHRoaXMuX2NoaWxkcmVuLnB1c2godXJsKTtcbiAgICAgICAgICAgIHVybC5fY2FjaGUgPSB7XG4gICAgICAgICAgICAgICAgcGF0aDogdGhpcy5fY2FjaGUucGF0aC5jb25jYXQodXJsKSxcbiAgICAgICAgICAgICAgICBwYXJlbnQ6IHRoaXMsXG4gICAgICAgICAgICAgICAgcGF0dGVybjogbnVsbCxcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICByZXR1cm4gdXJsO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGludGVybmFsICovXG4gICAgICAgIFVybE1hdGNoZXIucHJvdG90eXBlLmlzUm9vdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLl9jYWNoZS5wYXRoWzBdID09PSB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICAvKiogUmV0dXJucyB0aGUgaW5wdXQgcGF0dGVybiBzdHJpbmcgKi9cbiAgICAgICAgVXJsTWF0Y2hlci5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXR0ZXJuO1xuICAgICAgICB9O1xuICAgICAgICBVcmxNYXRjaGVyLnByb3RvdHlwZS5fZ2V0RGVjb2RlZFBhcmFtVmFsdWUgPSBmdW5jdGlvbiAodmFsdWUsIHBhcmFtKSB7XG4gICAgICAgICAgICBpZiAoaXNEZWZpbmVkKHZhbHVlKSkge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNvbmZpZy5kZWNvZGVQYXJhbXMgJiYgIXBhcmFtLnR5cGUucmF3KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0FycmF5KHZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5tYXAoZnVuY3Rpb24gKHBhcmFtVmFsdWUpIHsgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudChwYXJhbVZhbHVlKTsgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IGRlY29kZVVSSUNvbXBvbmVudCh2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJhbS50eXBlLmRlY29kZSh2YWx1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcGFyYW0udmFsdWUodmFsdWUpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogVGVzdHMgdGhlIHNwZWNpZmllZCB1cmwvcGF0aCBhZ2FpbnN0IHRoaXMgbWF0Y2hlci5cbiAgICAgICAgICpcbiAgICAgICAgICogVGVzdHMgaWYgdGhlIGdpdmVuIHVybCBtYXRjaGVzIHRoaXMgbWF0Y2hlcidzIHBhdHRlcm4sIGFuZCByZXR1cm5zIGFuIG9iamVjdCBjb250YWluaW5nIHRoZSBjYXB0dXJlZFxuICAgICAgICAgKiBwYXJhb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FtIG9wdGlvbnNcbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgVGhlIGNhcHR1cmVkIHBhcmFtZXRlciB2YWx1ZXMuXG4gICAgICAgICAqL1xuICAgICAgICBVcmxNYXRjaGVyLnByb3RvdHlwZS5leGVjID0gZnVuY3Rpb24gKHBhdGgsIHNlYXJjaCwgaGFzaCwgb3B0aW9ucykge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIGlmIChzZWFyY2ggPT09IHZvaWQgMCkgeyBzZWFyY2ggPSB7fTsgfVxuICAgICAgICAgICAgdmFyIG1hdGNoID0gbWVtb2l6ZVRvKHRoaXMuX2NhY2hlLCAncGF0dGVybicsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbmV3IFJlZ0V4cChbXG4gICAgICAgICAgICAgICAgICAgICdeJyxcbiAgICAgICAgICAgICAgICAgICAgdW5uZXN0KF90aGlzLl9jYWNoZS5wYXRoLm1hcChwcm9wKCdfY29tcGlsZWQnKSkpLmpvaW4oJycpLFxuICAgICAgICAgICAgICAgICAgICBfdGhpcy5jb25maWcuc3RyaWN0ID09PSBmYWxzZSA/ICcvPycgOiAnJyxcbiAgICAgICAgICAgICAgICAgICAgJyQnLFxuICAgICAgICAgICAgICAgIF0uam9pbignJyksIF90aGlzLmNvbmZpZy5jYXNlSW5zZW5zaXRpdmUgPyAnaScgOiB1bmRlZmluZWQpO1xuICAgICAgICAgICAgfSkuZXhlYyhwYXRoKTtcbiAgICAgICAgICAgIGlmICghbWF0Y2gpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAvLyBvcHRpb25zID0gZGVmYXVsdHMob3B0aW9ucywgeyBpc29sYXRlOiBmYWxzZSB9KTtcbiAgICAgICAgICAgIHZhciBhbGxQYXJhbXMgPSB0aGlzLnBhcmFtZXRlcnMoKSwgcGF0aFBhcmFtcyA9IGFsbFBhcmFtcy5maWx0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AgICAgIHJldHVybiBtYXAoYWxsUmV2ZXJzZWQsIHVucXVvdGVEYXNoZXMpLnJldmVyc2UoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgblBhdGhTZWdtZW50czsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHBhcmFtID0gcGF0aFBhcmFtc1tpXTtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSBtYXRjaFtpICsgMV07XG4gICAgICAgICAgICAgICAgLy8gaWYgdGhlIHBhcmFtIHZhbHVlIG1hdGNoZXMgYSBwcmUtcmVwbGFjZSBwYWlyLCByZXBsYWNlIHRoZSB2YWx1ZSBiZWZvcmUgZGVjb2RpbmcuXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwYXJhbS5yZXBsYWNlLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbS5yZXBsYWNlW2pdLmZyb20gPT09IHZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJhbS5yZXBsYWNlW2pdLnRvO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgJiYgcGFyYW0uYXJyYXkgPT09IHRydWUpXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gZGVjb2RlUGF0aEFycmF5KHZhbHVlKTtcbiAgICAgICAgICAgICAgICB2YWx1ZXNbcGFyYW0uaWRdID0gdGhpcy5fZ2V0RGVjb2RlZFBhcmFtVmFsdWUodmFsdWUsIHBhcmFtKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNlYXJjaFBhcmFtcy5mb3JFYWNoKGZ1bmN0aW9uIChwYXJhbSkge1xuICAgICAgICAgICAgICAgIHZhciB2YWx1ZSA9IHNlYXJjaFtwYXJhbS5pZF07XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBwYXJhbS5yZXBsYWNlLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbS5yZXBsYWNlW2pdLmZyb20gPT09IHZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJhbS5yZXBsYWNlW2pdLnRvO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YWx1ZXNbcGFyYW0uaWRdID0gX3RoaXMuX2dldERlY29kZWRQYXJhbVZhbHVlKHZhbHVlLCBwYXJhbSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmIChoYXNoKVxuICAgICAgICAgICAgICAgIHZhbHVlc1snIyddID0gaGFzaDtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZXM7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICogUmV0dXJucyBhbGwgdGhlIFtbUGFyYW1dXSBvYmplY3RzIG9mIGFsbCBwYXRoIGFuZCBzZWFyY2ggcGFyYW1ldGVycyBvZiB0aGlzIHBhdHRlcm4gaW4gb3JkZXIgb2YgYXBwZWFyYW5jZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMge0FycmF5LjxQYXJhbT59ICBBbiBhcnJheSBvZiBbW1BhcmFtXV0gb2JqZWN0cy4gTXVzdCBiZSB0cmVhdGVkIGFzIHJlYWQtb25seS4gSWYgdGhlXG4gICAgICAgICAqICAgIHBhdHRlcm4gaGFzIG5vIHBhcmFtZXRlcnMsIGFuIGVtcHR5IGFycmF5IGlzIHJldHVybmVkLlxuICAgICAgICAgKi9cbiAgICAgICAgVXJsTWF0Y2hlci5wcm90b3R5cGUucGFyYW1ldGVycyA9IGZ1bmN0aW9uIChvcHRzKSB7XG4gICAgICAgICAgICBpZiAob3B0cyA9PT0gdm9pZCAwKSB7IG9wdHMgPSB7fTsgfVxuICAgICAgICAgICAgaWYgKG9wdHMuaW5oZXJpdCA9PT0gZmFsc2UpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuX3BhcmFtcztcbiAgICAgICAgICAgIHJldHVybiB1bm5lc3QodGhpcy5fY2FjaGUucGF0aC5tYXAoZnVuY3Rpb24gKG1hdGNoZXIpIHsgcmV0dXJuIG1hdGNoZXIuX3BhcmFtczsgfSkpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogQGludGVybmFsXG4gICAgICAgICAqIFJldHVybnMgYSBzaW5nbGUgcGFyYW1ldGVyIGZyb20gdGhpcyBVcmxNYXRjaGVyIGJ5IGlkXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBpZFxuICAgICAgICAgKiBAcGFyYW0gb3B0c1xuICAgICAgICAgKiBAcmV0dXJucyB7VHxQYXJhbXxhbnl8Ym9vbGVhbnxVcmxNYXRjaGVyfG51bGx9XG4gICAgICAgICAqL1xuICAgICAgICBVcmxNYXRjaGVyLnByb3RvdHlwZS5wYXJhbWV0ZXIgPSBmdW5jdGlvbiAoaWQsIG9wdHMpIHtcbiAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgICAgICBpZiAob3B0cyA9PT0gdm9pZCAwKSB7IG9wdHMgPSB7fTsgfVxuICAgICAgICAgICAgdmFyIGZpbmRQYXJhbSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBfaSA9IDAsIF9hID0gX3RoaXMuX3BhcmFtczsgX2kgPCBfYS5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmFtID0gX2FbX2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW0uaWQgPT09IGlkKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhcmFtO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgcGFyZW50ID0gdGhpcy5fY2F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gICAgICAgICAgICAgICAgLm1hcChVcmxNYXRjaGVyLnF1ZXJ5UGFyYW1zKVxuICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pXG4gICAgICAgICAgICAgICAgLm1hcChnZXREZXRhaWxzKTtcbiAgICAgICAgICAgIHZhciBpc0ludmFsaWQgPSBmdW5jdGlvbiAocGFyYW0pIHsgcmV0dXJuIHBhcmFtLmlzVmFsaWQgPT09IGZhbHNlOyB9O1xuICAgICAgICAgICAgaWYgKHBhdGhTZWdtZW50c0FuZFBhcmFtcy5jb25jYXQocXVlcnlQYXJhbXMpLmZpbHRlcihpc0ludmFsaWQpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHaXZlbiBhIFBhcmFtLCBhcHBsaWVzIHRoZSBwYXJhbWV0ZXIgdmFsdWUsIHRoZW4gcmV0dXJucyBkZXRhaWxlZCBpbmZvcm1hdGlvbiBhYm91dCBpdFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBmdW5jdGlvbiBnZXREZXRhaWxzKHBhcmFtKSB7XG4gICAgICAgICAgICAgICAgLy8gTm9ybWFsaXplIHRvIHR5cGVkIHZhbHVlXG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gcGFyYW0udmFsdWUodmFsdWVzW3BhcmFtLmlkXSk7XG4gICAgICAgICAgICAgICAgdmFyIGlzVmFsaWQgPSBwYXJhbS52YWxpZGF0ZXModmFsdWUpO1xuICAgICAgICAgICAgICAgIHZhciBpc0RlZmF1bHRWYWx1ZSA9IHBhcmFtLmlzRGVmYXVsdFZhbHVlKHZhbHVlKTtcbiAgICAgICAgICAgICAgICAvLyBDaGVjayBpZiB3ZSdyZSBpbiBzcXVhc2ggbW9kZSBmb3IgdGhlIHBhcmFtZXRlclxuICAgICAgICAgICAgICAgIHZhciBzcXVhc2ggPSBpc0RlZmF1bHR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NsYXNoIGZyb20gdGhlIHBhdGhcbiAgICAgICAgICAgICAgICBpZiAoc3F1YXNoID09PSB0cnVlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjLm1hdGNoKC9cXC8kLykgPyBhY2Muc2xpY2UoMCwgLTEpIDogYWNjO1xuICAgICAgICAgICAgICAgIC8vIElmIHNxdWFzaCBpcyBhIHN0cmluZywgdXNlIHRoZSBzdHJpbmcgZm9yIHRoZSBwYXJhbSB2YWx1ZVxuICAgICAgICAgICAgICAgIGlmIChpc1N0cmluZyhzcXVhc2gpKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjICsgc3F1YXNoO1xuICAgICAgICAgICAgICAgIGlmIChzcXVhc2ggIT09IGZhbHNlKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjOyAvLyA/XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQgPT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYztcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGlzIHBhcmFtZXRlciB2YWx1ZSBpcyBhbiBhcnJheSwgZW5jb2RlIHRoZSB2YWx1ZSB1c2luZyBlbmNvZGVEYXNoZXNcbiAgICAgICAgICAgICAgICBpZiAoaXNBcnJheShlbmNvZGVkKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIG1hcChlbmNvZGVkLCBVcmxNYXRjaGVyLmVuY29kZURhc2hlcykuam9pbignLScpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBwYXJhbWV0ZXIgdHlwZSBpcyBcInJhd1wiLCB0aGVuIGRvIG5vdCBlbmNvZGVVUklDb21wb25lbnRcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0ucmF3KVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjICsgZW5jb2RlZDtcbiAgICAgICAgICAgICAgICAvLyBFbmNvZGUgdGhlIHZhbHVlXG4gICAgICAgICAgICAgICAgcmV0dXJuIGFjYyArIGVuY29kZVVSSUNvbXBvbmVudChlbmNvZGVkKTtcbiAgICAgICAgICAgIH0sICcnKTtcbiAgICAgICAgICAgIC8vIEJ1aWxkIHRoZSBxdWVyeSBzdHJpbmcgYnkgYXBwbHlpbmcgcGFyYW1ldGVyIHZhbHVlcyAoYXJyYXkgb3IgcmVndWxhcilcbiAgICAgICAgICAgIC8vIHRoZW4gbWFwcGluZyB0byBrZXk9dmFsdWUsIHRoZW4gZmxhdHRlbmluZyBhbmQgam9pbmluZyB1c2luZyBcIiZcIlxuICAgICAgICAgICAgdmFyIHF1ZXJ5U3RyaW5nID0gcXVlcnlQYXJhbXNcbiAgICAgICAgICAgICAgICAubWFwKGZ1bmN0aW9uIChwYXJhbURldGFpbHMpIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFyYW0gPSBwYXJhbURldGFpbHMucGFyYW0sIHNxdWFzaCA9IHBhcmFtRGV0YWlscy5zcXVhc2gsIGVuY29kZWQgPSBwYXJhbURldGFpbHMuZW5jb2RlZCwgaXNEZWZhdWx0VmFsdWUgPSBwYXJhbURldGFpbHMuaXNEZWZhdWx0VmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQgPT0gbnVsbCB8fCAoaXNEZWZhdWx0VmFsdWUgJiYgc3F1YXNoICE9PSBmYWxzZSkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBpZiAoIWlzQXJyYXkoZW5jb2RlZCkpXG4gICAgICAgICAgICAgICAgICAgIGVuY29kZWQgPSBbZW5jb2RlZF07XG4gICAgICAgICAgICAgICAgaWYgKGVuY29kZWQubGVuZ3RoID09PSAwKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgaWYgKCFwYXJhbS5yYXcpXG4gICAgICAgICAgICAgICAgICAgIGVuY29kZWQgPSBtYXAoZW5jb2RlZCwgZW5jb2RlVVJJQ29tcG9uZW50KTtcbiAgICAgICAg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0aW9uKG9iamVjdFtuYW1lXSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgVXJsTWF0Y2hlckZhY3RvcnkucHJvdG90eXBlLiRnZXQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgdXJsQ29uZmlnID0gdGhpcy5yb3V0ZXIudXJsU2VydmljZS5jb25maWc7XG4gICAgICAgICAgICB1cmxDb25maWcucGFyYW1UeXBlcy5lbnF1ZXVlID0gZmFsc2U7XG4gICAgICAgICAgICB1cmxDb25maWcucGFyYW1UeXBlcy5fZmx1c2hUeXBlUXVldWUoKTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gVXJsTWF0Y2hlckZhY3Rvcnk7XG4gICAgfSgpKTtcblxuICAgIC8qKlxuICAgICAqIENyZWF0ZXMgYSBbW1VybFJ1bGVdXVxuICAgICAqXG4gICAgICogQ3JlYXRlcyBhIFtbVXJsUnVsZV1dIGZyb20gYTpcbiAgICAgKlxuICAgICAqIC0gYHN0cmluZ2BcbiAgICAgKiAtIFtbVXJsTWF0Y2hlcl1dXG4gICAgICogLSBgUmVnRXhwYFxuICAgICAqIC0gW1tTdGF0ZU9iamVjdF1dXG4gICAgICovXG4gICAgdmFyIFVybFJ1bGVGYWN0b3J5ID0gLyoqIEBjbGFzcyAqLyAoZnVuY3Rpb24gKCkge1xuICAgICAgICBmdW5jdGlvbiBVcmxSdWxlRmFjdG9yeShyb3V0ZXIpIHtcbiAgICAgICAgICAgIHRoaXMucm91dGVyID0gcm91dGVyO1xuICAgICAgICB9XG4gICAgICAgIFVybFJ1bGVGYWN0b3J5LnByb3RvdHlwZS5jb21waWxlID0gZnVuY3Rpb24gKHN0cikge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMucm91dGVyLnVybE1hdGNo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gJHVybCA9IHRoaXMucm91dGVyLmxvY2F0aW9uU2VydmljZTtcbiAgICAgICAgICAgIGlmIChyZWFkKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sb2NhdGlvbiA9ICR1cmwudXJsKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCR1cmwudXJsKCkgPT09IHRoaXMubG9jYXRpb24pXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgJHVybC51cmwodGhpcy5sb2NhdGlvbiwgdHJ1ZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBJbnRlcm5hbCBBUEkuXG4gICAgICAgICAqXG4gICAgICAgICAqIFB1c2hlcyBhIG5ldyBsb2NhdGlvbiB0byB0aGUgYnJvd3NlciBoaXN0b3J5LlxuICAgICAgICAgKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICogQHBhcmFtIHVybE1hdGNoZXJcbiAgICAgICAgICogQHBhcmFtIHBhcmFtc1xuICAgICAgICAgKiBAcGFyYW0gb3B0aW9uc1xuICAgICAgICAgKi9cbiAgICAgICAgVXJsUm91dGVyLnByb3RvdHlwZS5wdXNoID0gZnVuY3Rpb24gKHVybE1hdGNoZXIsIHBhcmFtcywgb3B0aW9ucykge1xuICAgICAgICAgICAgdmFyIHJlcGxhY2UgPSBvcHRpb25zICYmICEhb3B0aW9ucy5yZXBsYWNlO1xuICAgICAgICAgICAgdGhpcy5yb3V0ZXIudXJsU2VydmljZS51cmwodXJsTWF0Y2hlci5mb3JtYXQocGFyYW1zIHx8IHt9KSwgcmVwbGFjZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBCdWlsZHMgYW5kIHJldHVybnMgYSBVUkwgd2l0aCBpbnRlcnBvbGF0ZWQgcGFyYW1ldGVyc1xuICAgICAgICAgKlxuICAgICAgICAgKiAjIyMjIEV4YW1wbG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YW1lU3VnYXJbMl07IC8vIHNldCB2aWV3LW5hbWUgdG8gXCJmb28uYmFyXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh1aVZpZXdOYW1lLmNoYXJBdCgwKSA9PT0gJyEnKSB7XG4gICAgICAgICAgICAgICAgdWlWaWV3TmFtZSA9IHVpVmlld05hbWUuc3Vic3RyKDEpO1xuICAgICAgICAgICAgICAgIHVpVmlld0NvbnRleHRBbmNob3IgPSAnJzsgLy8gdGFyZ2V0IGFic29sdXRlbHkgZnJvbSByb290XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBoYW5kbGUgcGFyZW50IHJlbGF0aXZlIHRhcmdldGluZyBcIl4uXi5eXCJcbiAgICAgICAgICAgIHZhciByZWxhdGl2ZU1hdGNoID0gL14oXFxeKD86XFwuXFxeKSopJC87XG4gICAgICAgICAgICBpZiAocmVsYXRpdmVNYXRjaC5leGVjKHVpVmlld0NvbnRleHRBbmNob3IpKSB7XG4gICAgICAgICAgICAgICAgdmFyIGFuY2hvclN0YXRlID0gdWlWaWV3Q29udGV4dEFuY2hvci5zcGxpdCgnLicpLnJlZHVjZShmdW5jdGlvbiAoYW5jaG9yLCB4KSB7IHJldHVybiBhbmNob3IucGFyZW50OyB9LCBjb250ZXh0KTtcbiAgICAgICAgICAgICAgICB1aVZpZXdDb250ZXh0QW5jaG9yID0gYW5jaG9yU3RhdGUubmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHVpVmlld0NvbnRleHRBbmNob3IgPT09ICcuJykge1xuICAgICAgICAgICAgICAgIHVpVmlld0NvbnRleHRBbmNob3IgPSBjb250ZXh0Lm5hbWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4geyB1aVZpZXdOYW1lOiB1aVZpZXdOYW1lLCB1aVZpZXdDb250ZXh0QW5jaG9yOiB1aVZpZXdDb250ZXh0QW5jaG9yIH07XG4gICAgICAgIH07XG4gICAgICAgI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SBWaWV3Q29uZmlnJ3MgdGFyZ2V0IG5hbWVcbiAgICAgICAgICogICAgLSB0aGUgcGFyZW50IHVpLXZpZXcncyBjb250ZXh0IG1hdGNoZXMgdGhlIFZpZXdDb25maWcncyBhbmNob3JcbiAgICAgICAgICogLSBBbmQgdGhlIHJlbWFpbmluZyBzZWdtZW50cyAoaW5kZXggMS4ubikgb2YgdGhlIFZpZXdDb25maWcncyB0YXJnZXQgbmFtZSBtYXRjaCB0aGUgdGFpbCBvZiB0aGUgdWktdmlldydzIGZxblxuICAgICAgICAgKlxuICAgICAgICAgKiBFeGFtcGxlOlxuICAgICAgICAgKlxuICAgICAgICAgKiBET006XG4gICAgICAgICAqIDx1aS12aWV3PiAgICAgICAgICAgICAgICAgICAgICAgIDwhLS0gY3JlYXRlZCBpbiB0aGUgcm9vdCBjb250ZXh0IChuYW1lOiBcIlwiKSAtLT5cbiAgICAgICAgICogICA8dWktdmlldyBuYW1lPVwiZm9vXCI+ICAgICAgICAgICAgICAgIDwhLS0gY3JlYXRlZCBpbiB0aGUgY29udGV4dCBuYW1lZDogXCJBXCIgICAgICAtLT5cbiAgICAgICAgICogICAgIDx1aS12aWV3PiAgICAgICAgICAgICAgICAgICAgPCEtLSBjcmVhdGVkIGluIHRoZSBjb250ZXh0IG5hbWVkOiBcIkEuQlwiICAgIC0tPlxuICAgICAgICAgKiAgICAgICA8dWktdmlldyBuYW1lPVwiYmFyXCI+ICAgICAgICAgICAgPCEtLSBjcmVhdGVkIGluIHRoZSBjb250ZXh0IG5hbWVkOiBcIkEuQi5DXCIgIC0tPlxuICAgICAgICAgKiAgICAgICA8L3VpLXZpZXc+XG4gICAgICAgICAqICAgICA8L3VpLXZpZXc+XG4gICAgICAgICAqICAgPC91aS12aWV3PlxuICAgICAgICAgKiA8L3VpLXZpZXc+XG4gICAgICAgICAqXG4gICAgICAgICAqIHVpVmlld3M6IFtcbiAgICAgICAgICogIHsgZnFuOiBcIiRkZWZhdWx0XCIsICAgICAgICAgICA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4gdGhlIHVybCBtYXRjaGVzIGVpdGhlciBgXCJcImAgb3IgYFwiL1wiYC5cbiAgICAgICAgICpcbiAgICAgICAgICogTm90ZTogVGhlIHJ1bGUgaXMgaW50ZW5kZWQgdG8gYmUgdXNlZCB3aGVuIHRoZSByb290IG9mIHRoZSBhcHBsaWNhdGlvbiBpcyBkaXJlY3RseSBsaW5rZWQgdG8uXG4gICAgICAgICAqIFdoZW4gdGhlIFVSTCBpcyAqbm90KiBgXCJcImAgb3IgYFwiL1wiYCBhbmQgZG9lc24ndCBtYXRjaCBvdGhlciBydWxlcywgdGhlIFtbb3RoZXJ3aXNlXV0gcnVsZSBpcyB0cmlnZ2VyZWQuXG4gICAgICAgICAqIFRoaXMgYWxsb3dzIDQwNC1saWtlIGJlaGF2aW9yIHdoZW4gYW4gdW5rbm93biBVUkwgaXMgZGVlcC1saW5rZWQuXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogU3RhcnQgYXBwIGF0IGBob21lYCBzdGF0ZS5cbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLmluaXRpYWwoeyBzdGF0ZTogJ2hvbWUnIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogIyMjIyBFeGFtcGxlOlxuICAgICAgICAgKiBTdGFydCBhcHAgYXQgYC9ob21lYCAoYnkgdXJsKVxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiAuaW5pdGlhbCgnL2hvbWUnKTtcbiAgICAgICAgICogYGBgXG4gICAgICAgICAqXG4gICAgICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgICAgICogV2hlbiBubyBvdGhlciB1cmwgcnVsZSBtYXRjaGVzLCBnbyB0byBgaG9tZWAgc3RhdGVcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLmluaXRpYWwoKG1hdGNoVmFsdWUsIHVybCwgcm91dGVyKSA9PiB7XG4gICAgICAgICAqICAgY29uc29sZS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aGlzLl9pc1N0cmljdE1vZGUgPSB0cnVlO1xuICAgICAgICAgICAgLyoqIEBpbnRlcm5hbCAqLyB0aGlzLl9kZWZhdWx0U3F1YXNoUG9saWN5ID0gZmFsc2U7XG4gICAgICAgICAgICAvKiogQGludGVybmFsICovIHRoaXMuZGlzcG9zZSA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnBhcmFtVHlwZXMuZGlzcG9zZSgpOyB9O1xuICAgICAgICAgICAgLy8gRGVsZWdhdGUgdGhlc2UgY2FsbHMgdG8gdGhlIGN1cnJlbnQgTG9jYXRpb25Db25maWcgaW1wbGVtZW50YXRpb25cbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogR2V0cyB0aGUgYmFzZSBIcmVmLCBlLmcuLCBgaHR0cDovL2xvY2FsaG9zdC9hcHByb290L2BcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBhcHBsaWNhdGlvbidzIGJhc2UgaHJlZlxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmJhc2VIcmVmID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMucm91dGVyLmxvY2F0aW9uQ29uZmlnLmJhc2VIcmVmKCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgb3Igc2V0cyB0aGUgaGFzaFByZWZpeFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFRoaXMgb25seSBhcHBsaWVzIHdoZW4gbm90IHJ1bm5pbmcgaW4gW1todG1sNU1vZGVdXSAocHVzaHN0YXRlIG1vZGUpXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogSWYgdGhlIGN1cnJlbnQgdXJsIGlzIGBodHRwOi8vbG9jYWxob3N0L2FwcCMhL3Vpcm91dGVyL3BhdGgvI2FuY2hvcmAsIGl0IHJldHVybnMgYCFgIHdoaWNoIGlzIHRoZSBwcmVmaXggZm9yIHRoZSBcImhhc2hiYW5nXCIgcG9ydGlvbi5cbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBoYXNoIHByZWZpeFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmhhc2hQcmVmaXggPSBmdW5jdGlvbiAobmV3cHJlZml4KSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25Db25maWcuaGFzaFByZWZpeChuZXdwcmVmaXgpOyB9O1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBob3N0LCBlLmcuLCBgbG9jYWxob3N0YFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHByb3RvY29sXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuaG9zdCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvbkNvbmZpZy5ob3N0KCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFJldHVybnMgdHJ1ZSB3aGVuIHJ1bm5pbmcgaW4gcHVzaHN0YXRlIG1vZGVcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRydWUgd2hlbiBydW5uaW5nIGluIGh0bWw1IG1vZGUgKHB1c2hzdGF0ZSBtb2RlKS5cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5odG1sNU1vZGUgPSBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25Db25maWcuaHRtbDVNb2RlKCk7IH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgdGhlIHBvcnQsIGUuZy4sIGA4MGBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBwb3J0IG51bWJlclxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLnBvcnQg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sICovIHRoaXMuaW50ZXJjZXB0RGVmZXJyZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogVGhlIG5lc3RlZCBbW1VybFJ1bGVzXV0gQVBJIGZvciBtYW5hZ2luZyBVUkwgcnVsZXMgYW5kIHJld3JpdGVzXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogU2VlOiBbW1VybFJ1bGVzXV0gZm9yIGRldGFpbHNcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy5ydWxlcyA9IG5ldyBVcmxSdWxlcyh0aGlzLnJvdXRlcik7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFRoZSBuZXN0ZWQgW1tVcmxDb25maWddXSBBUEkgdG8gY29uZmlndXJlIHRoZSBVUkwgYW5kIHJldHJpZXZlIFVSTCBpbmZvcm1hdGlvblxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIFNlZTogW1tVcmxDb25maWddXSBmb3IgZGV0YWlsc1xuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmNvbmZpZyA9IG5ldyBVcmxDb25maWcodGhpcy5yb3V0ZXIpO1xuICAgICAgICAgICAgLy8gRGVsZWdhdGUgdGhlc2UgY2FsbHMgdG8gdGhlIGN1cnJlbnQgTG9jYXRpb25TZXJ2aWNlcyBpbXBsZW1lbnRhdGlvblxuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBjdXJyZW50IHVybCwgb3IgdXBkYXRlcyB0aGUgdXJsXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogIyMjIEdldHRpbmcgdGhlIGN1cnJlbnQgVVJMXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogV2hlbiBubyBhcmd1bWVudHMgYXJlIHBhc3NlZCwgcmV0dXJucyB0aGUgY3VycmVudCBVUkwuXG4gICAgICAgICAgICAgKiBUaGUgVVJMIGlzIG5vcm1hbGl6ZWQgdXNpbmcgdGhlIGludGVybmFsIFtbcGF0aF1dL1tbc2VhcmNoXV0vW1toYXNoXV0gdmFsdWVzLlxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEZvciBleGFtcGxlLCB0aGUgVVJMIG1heSBiZSBzdG9yZWQgaW4gdGhlIGhhc2ggKFtbSGFzaExvY2F0aW9uU2VydmljZXNdXSkgb3JcbiAgICAgICAgICAgICAqIGhhdmUgYSBiYXNlIEhSRUYgcHJlcGVuZGVkIChbW1B1c2hTdGF0ZUxvY2F0aW9uU2VydmljZXNdXSkuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogVGhlIHJhdyBVUkwgaW4gdGhlIGJyb3dzZXIgbWlnaHQgYmU6XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKiBodHRwOi8vbXlzaXRlLmNvbS9zb21lcGF0aC9pbmRleC5odG1sIy9pbnRlcm5hbC9wYXRoLzEyMz9wYXJhbTE9Zm9vI2FuY2hvclxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogb3JcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqIGh0dHA6Ly9teXNpdGUuY29tL2Jhc2VwYXRoL2ludGVybmFsL3BhdGgvMTIzP3BhcmFtMT1mb28jYW5jaG9yXG4gICAgICAgICAgICAgKiBgYGBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiB0aGVuIHRoaXMgbWV0aG9kIHJldHVybnM6XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogYGBgXG4gICAgICAgICAgICAgKiAvaW50ZXJuYWwvcGF0aC8xMjM/cGFyYW0xPWZvbyNhbmNob3JcbiAgICAgICAgICAgICAqIGBgYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiAjIyMjIEV4YW1wbGU6XG4gICAgICAgICAgIC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aGlzIG5ldyB1cmxcbiAgICAgICAgICAgICAqIEBwYXJhbSBzdGF0ZSBUaGUgaGlzdG9yeSdzIHN0YXRlIG9iamVjdCwgaS5lLiwgcHVzaFN0YXRlIChpZiB0aGUgTG9jYXRpb25TZXJ2aWNlcyBpbXBsZW1lbnRhdGlvbiBzdXBwb3J0cyBpdClcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSB1cmwgKGFmdGVyIHBvdGVudGlhbGx5IGJlaW5nIHByb2Nlc3NlZClcbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgdGhpcy51cmwgPSBmdW5jdGlvbiAobmV3dXJsLCByZXBsYWNlLCBzdGF0ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25TZXJ2aWNlLnVybChuZXd1cmwsIHJlcGxhY2UsIHN0YXRlKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIEdldHMgdGhlIHBhdGggcGFydCBvZiB0aGUgY3VycmVudCB1cmxcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBJZiB0aGUgY3VycmVudCBVUkwgaXMgYC9zb21lL3BhdGg/cXVlcnk9dmFsdWUjYW5jaG9yYCwgdGhpcyByZXR1cm5zIGAvc29tZS9wYXRoYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHBhdGggcG9ydGlvbiBvZiB0aGUgdXJsXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMucGF0aCA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvblNlcnZpY2UucGF0aCgpOyB9O1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBHZXRzIHRoZSBzZWFyY2ggcGFydCBvZiB0aGUgY3VycmVudCB1cmwgYXMgYW4gb2JqZWN0XG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogSWYgdGhlIGN1cnJlbnQgVVJMIGlzIGAvc29tZS9wYXRoP3F1ZXJ5PXZhbHVlI2FuY2hvcmAsIHRoaXMgcmV0dXJucyBgeyBxdWVyeTogJ3ZhbHVlJyB9YFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEByZXR1cm4gdGhlIHNlYXJjaCAocXVlcnkpIHBvcnRpb24gb2YgdGhlIHVybCwgYXMgYW4gb2JqZWN0XG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMuc2VhcmNoID0gZnVuY3Rpb24gKCkgeyByZXR1cm4gX3RoaXMucm91dGVyLmxvY2F0aW9uU2VydmljZS5zZWFyY2goKTsgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogR2V0cyB0aGUgaGFzaCBwYXJ0IG9mIHRoZSBjdXJyZW50IHVybFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIElmIHRoZSBjdXJyZW50IFVSTCBpcyBgL3NvbWUvcGF0aD9xdWVyeT12YWx1ZSNhbmNob3JgLCB0aGlzIHJldHVybnMgYGFuY2hvcmBcbiAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgKiBAcmV0dXJuIHRoZSBoYXNoIChhbmNob3IpIHBvcnRpb24gb2YgdGhlIHVybFxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB0aGlzLmhhc2ggPSBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5yb3V0ZXIubG9jYXRpb25TZXJ2aWNlLmhhc2goKTsgfTtcbiAgICAgICAgICAgIC8qKlxuICAgICAgICAgICAgICogQGludGVybmFsXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogUmVnaXN0ZXJzIGEgbG93IGxldmVsIHVybCBjaGFuZ2UgaGFuZGxlclxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIE5vdGU6IEJlY2F1c2UgdGhpcyBpcyBhIGxvdyBsZXZlbCBoYW5kbGVyLCBpdCdzIG5vdCByZWNvbW1lbmRlZCBmb3IgZ2VuZXJhbCB1c2UuXG4gICAgICAgICAgICAgKlxuICAgICAgICAgICAgICogIyMjIyBFeGFtcGxlOlxuICAgICAgICAgICAgICogYGBganNcbiAgICAgICAgICAgICAqIGxldCBkZXJlZ2lzdGVyRm4gPSBsb2NhdGlvblNlcnZpY2VzLm9uQ2hhbmdlKChldnQpID0+IGNvbnNvbGUubG9nKFwidXJsIGNoYW5nZVwiLCBldnQpKTtcbiAgICAgICAgICAgICAqIGBgYFxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBwYXJhbSBjYWxsYmFjayBhIGZ1bmN0aW9uIHRoYXQgd2lsbCBiZSBjYWxsZWQgd2hlbiB0aGUgdXJsIGlzIGNoYW5naW5nXG4gICAgICAgICAgICAgKiBAcmV0dXJuIGEgZnVuY3Rpb24gdGhhdCBkZS1yZWdpc3RlcnMgdGhlIGNhbGxiYWNrXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIHRoaXMub25DaGFuZ2UgPSBmdW5jdGlvbiAoY2FsbGJhY2spIHsgcmV0dXJuIF90aGlzLnJvdXRlci5sb2NhdGlvblNlcnZpY2Uub25DaGFuZ2UoY2FsbGJhY2spOyB9O1xuICAgICAgICB9XG4gICAgICAgIC8qKiBAaW50ZXJuYWwgKi9cbiAgICAgICAgVXJsU2VydmljZS5wcm90b3R5cGUuZGlzcG9zZSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHRoaXMubGlzdGVuKGZhbHNlKTtcbiAgICAgICAgICAgIHRoaXMucnVsZXMuZGlzcG9zZSgpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogR2V0cyB0aGUgY3VycmVudCBVUkwgcGFydHNcbiAgICAgICAgICpcbiAgICAgICAgICogVGhpcyBtZXRob2QgcmV0dXJucyB0aGUgZGlmZmVyZW50IHBhcnRzIG9mIHRoZSBjdXJyZW50IFVSTCAodG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pcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogZXhwb3J0IGNsYXNzIE15QXV0aFBsdWdpbiBpbXBsZW1lbnRzIFVJUm91dGVyUGx1Z2luIHtcbiAgICAgICAgICogICBjb25zdHJ1Y3Rvcihyb3V0ZXI6IFVJUm91dGVyLCBvcHRpb25zOiBhbnkpIHtcbiAgICAgICAgICogICAgIHRoaXMubmFtZSA9IFwiTXlBdXRoUGx1Z2luXCI7XG4gICAgICAgICAqICAgICBsZXQgJHRyYW5zaXRpb25zID0gcm91dGVyLnRyYW5zaXRpb25TZXJ2aWNlO1xuICAgICAgICAgKiAgICAgbGV0ICRzdGF0ZSA9IHJvdXRlci5zdGF0ZVNlcnZpY2U7XG4gICAgICAgICAqXG4gICAgICAgICAqICAgICBsZXQgYXV0aENyaXRlcmlhID0ge1xuICAgICAgICAgKiAgICAgICB0bzogKHN0YXRlKSA9PiBzdGF0ZS5kYXRhICYmIHN0YXRlLmRhdGEucmVxdWlyZXNBdXRoXG4gICAgICAgICAqICAgICB9O1xuICAgICAgICAgKlxuICAgICAgICAgKiAgICAgZnVuY3Rpb24gYXV0aEhvb2sodHJhbnNpdGlvbjogVHJhbnNpdGlvbikge1xuICAgICAgICAgKiAgICAgICBsZXQgYXV0aFNlcnZpY2UgPSB0cmFuc2l0aW9uLmluamVjdG9yKCkuZ2V0KCdBdXRoU2VydmljZScpO1xuICAgICAgICAgKiAgICAgICBpZiAoIWF1dGhTZXJ2aWNlLmlzQXV0aGVudGljYXRlZCgpKSB7XG4gICAgICAgICAqICAgICAgICAgcmV0dXJuICRzdGF0ZS50YXJnZXQoJ2xvZ2luJyk7XG4gICAgICAgICAqICAgICAgIH1cbiAgICAgICAgICogICAgIH1cbiAgICAgICAgICpcbiAgICAgICAgICogICAgICR0cmFuc2l0aW9ucy5vblN0YXJ0KGF1dGhDcml0ZXJpYSwgYXV0aEhvb2spO1xuICAgICAgICAgKiAgIH1cbiAgICAgICAgICogfVxuICAgICAgICAgKiBgYGBc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nkgdGhlIHRyYW5zaXRpb24gKGJ5IHJldHVybmluZyBhIFRhcmdldFN0YXRlKVxuICAgICAqXG4gICAgICogYGBgXG4gICAgICogLnN0YXRlKCdhYmMnLCB7XG4gICAgICogICBjb21wb25lbnQ6ICdmb29Db21wb25lbnQnLFxuICAgICAqICAgbGF6eUxvYWQ6ICgpID0+IGltcG9ydCgnLi9mb29Db21wb25lbnQnKVxuICAgICAqICAgfSk7XG4gICAgICogYGBgXG4gICAgICpcbiAgICAgKiBTZWUgW1tTdGF0ZURlY2xhcmF0aW9uLmxhenlMb2FkXV1cbiAgICAgKi9cbiAgICB2YXIgbGF6eUxvYWRIb29rID0gZnVuY3Rpb24gKHRyYW5zaXRpb24pIHtcbiAgICAgICAgdmFyIHJvdXRlciA9IHRyYW5zaXRpb24ucm91dGVyO1xuICAgICAgICBmdW5jdGlvbiByZXRyeVRyYW5zaXRpb24oKSB7XG4gICAgICAgICAgICBpZiAodHJhbnNpdGlvbi5vcmlnaW5hbFRyYW5zaXRpb24oKS5vcHRpb25zKCkuc291cmNlICE9PSAndXJsJykge1xuICAgICAgICAgICAgICAgIC8vIFRoZSBvcmlnaW5hbCB0cmFuc2l0aW9uIHdhcyBub3QgdHJpZ2dlcmVkIHZpYSB1cmwgc3luY1xuICAgICAgICAgICAgICAgIC8vIFRoZSBsYXp5IHN0YXRlIHNob3VsZCBiZSBsb2FkZWQgbm93LCBzbyByZS10cnkgdGhlIG9yaWdpbmFsIHRyYW5zaXRpb25cbiAgICAgICAgICAgICAgICB2YXIgb3JpZyA9IHRyYW5zaXRpb24udGFyZ2V0U3RhdGUoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcm91dGVyLnN0YXRlU2VydmljZS50YXJnZXQob3JpZy5pZGVudGlmaWVyKCksIG9yaWcucGFyYW1zKCksIG9yaWcub3B0aW9ucygpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFRoZSBvcmlnaW5hbCB0cmFuc2l0aW9uIHdhcyB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LWludm9rZWRcbiAgICAgICAgdmFyIHByb21pc2UgPSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICBpZiAoIXByb21pc2UpIHtcbiAgICAgICAgICAgIHZhciBzdWNjZXNzID0gZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBzdGF0ZS5sYXp5TG9hZDtcbiAgICAgICAgICAgICAgICBkZWxldGUgc3RhdGUuJCRzdGF0ZSgpLmxhenlMb2FkO1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICAgICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGVycm9yID0gZnVuY3Rpb24gKGVycikge1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBsYXp5TG9hZEZuWydfcHJvbWlzZSddO1xuICAgICAgICAgICAgICAgIHJldHVybiBzZXJ2aWNlcy4kcS5yZWplY3QoZXJyKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBwcm9taXNlID0gbGF6eUxvYWRGblsnX3Byb21pc2UnXSA9IHNlcnZpY2VzLiRxXG4gICAgICAgICAgICAgICAgLndoZW4obGF6eUxvYWRGbih0cmFuc2l0aW9uLCBzdGF0ZSkpXG4gICAgICAgICAgICAgICAgLnRoZW4odXBkYXRlU3RhdGVSZWdpc3RyeSlcbiAgICAgICAgICAgICAgICAudGhlbihzdWNjZXNzLCBlcnJvcik7XG4gICAgICAgIH1cbiAgICAgICAgLyoqIFJlZ2lzdGVyIGFueSBsYXp5IGxvYWRlZCBzdGF0ZSBkZWZpbml0aW9ucyAqL1xuICAgICAgICBmdW5jdGlvbiB1cGRhdGVTdGF0ZVJlZ2lzdHJ5KHJlc3VsdCkge1xuICAgICAgICAgICAgaWYgKHJlc3VsdCAmJiBBcnJheS5pc0FycmF5KHJlc3VsdC5zdGF0ZXMpKSB7XG4gICAgICAg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ICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uU3RhcnQgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25FeGl0ID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uUmV0YWluID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uRW50ZXIgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25GaW5pc2ggPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKiBAaW5oZXJpdGRvYyAqL1xuICAgICAgICBUcmFuc2l0aW9uU2VydmljZS5wcm90b3R5cGUub25TdWNjZXNzID0gZnVuY3Rpb24gKGNyaXRlcmlhLCBjYWxsYmFjaywgb3B0aW9ucykge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9O1xuICAgICAgICAvKiogQGluaGVyaXRkb2MgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLm9uRXJyb3IgPSBmdW5jdGlvbiAoY3JpdGVyaWEsIGNhbGxiYWNrLCBvcHRpb25zKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBkaXNwb3NlXG4gICAgICAgICAqIEBpbnRlcm5hbFxuICAgICAgICAgKi9cbiAgICAgICAgVHJhbnNpdGlvblNlcnZpY2UucHJvdG90eXBlLmRpc3Bvc2UgPSBmdW5jdGlvbiAocm91dGVyKSB7XG4gICAgICAgICAgICB2YWx1ZXModGhpcy5fcmVnaXN0ZXJlZEhvb2tzKS5mb3JFYWNoKGZ1bmN0aW9uIChob29rc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGhvb2tzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoaG9vaykge1xuICAgICAgICAgICAgICAgICAgICBob29rLl9kZXJlZ2lzdGVyZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICByZW1vdmVGcm9tKGhvb2tzQXJyYXksIGhvb2spO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgbmV3IFtbVHJhbnNpdGlvbl1dIG9iamVjdFxuICAgICAgICAgKlxuICAgICAgICAgKiBUaGlzIGlzIGEgZmFjdG9yeSBmdW5jdGlvbiBmb3IgY3JlYXRpbmcgbmV3IFRyYW5zaXRpb24gb2JqZWN0cy5cbiAgICAgICAgICogSXQgaXMgdXNlZCBpbnRlcm5hbGx5IGJ5IHRoZSBbW1N0YXRlU2VydmljZV1dIGFuZCBzaG91bGQgZ2VuZXJhbGx5IG5vd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ICAgICAgICAgICAgdGhpcy5fZGVmYXVsdEVycm9ySGFuZGxlciA9IGZ1bmN0aW9uICRkZWZhdWx0RXJyb3JIYW5kbGVyKCRlcnJvciQpIHtcbiAgICAgICAgICAgICAgICBpZiAoJGVycm9yJCBpbnN0YW5jZW9mIEVycm9yICYmICRlcnJvciQuc3RhY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkLnN0YWNrKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoJGVycm9yJCBpbnN0YW5jZW9mIFJlamVjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKCRlcnJvciQudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgkZXJyb3IkLmRldGFpbCAmJiAkZXJyb3IkLmRldGFpbC5zdGFjaylcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJGVycm9yJC5kZXRhaWwuc3RhY2spO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcigkZXJyb3IkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGdldHRlcnMgPSBbJ2N1cnJlbnQnLCAnJGN1cnJlbnQnLCAncGFyYW1zJywgJ3RyYW5zaXRpb24nXTtcbiAgICAgICAgICAgIHZhciBib3VuZEZucyA9IE9iamVjdC5rZXlzKFN0YXRlU2VydmljZS5wcm90b3R5cGUpLmZpbHRlcihub3QoaW5BcnJheShnZXR0ZXJzKSkpO1xuICAgICAgICAgICAgY3JlYXRlUHJveHlGdW5jdGlvbnModmFsKFN0YXRlU2VydmljZS5wcm90b3R5cGUpLCB0aGlzLCB2YWwodG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gICAgICB9LFxuICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXG4gICAgICAgICAgICBjb25maWd1cmFibGU6IHRydWVcbiAgICAgICAgfSk7XG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShTdGF0ZVNlcnZpY2UucHJvdG90eXBlLCBcImN1cnJlbnRcIiwge1xuICAgICAgICAgICAgLyoqXG4gICAgICAgICAgICAgKiBUaGUgY3VycmVudCBbW1N0YXRlRGVjbGFyYXRpb25dXVxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIFRoaXMgaXMgYSBwYXNzdGhyb3VnaCB0aHJvdWdoIHRvIFtbVUlSb3V0ZXJHbG9iYWxzLmN1cnJlbnRdXVxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yb3V0ZXIuZ2xvYmFscy5jdXJyZW50O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlXG4gICAgICAgIH0pO1xuICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkoU3RhdGVTZXJ2aWNlLnByb3RvdHlwZSwgXCIkY3VycmVudFwiLCB7XG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIFRoZSBjdXJyZW50IFtbU3RhdGVPYmplY3RdXSAoYW4gaW50ZXJuYWwgQVBJKVxuICAgICAgICAgICAgICpcbiAgICAgICAgICAgICAqIEBkZXByZWNhdGVkIFRoaXMgaXMgYSBwYXNzdGhyb3VnaCB0aHJvdWdoIHRvIFtbVUlSb3V0ZXJHbG9iYWxzLiRjdXJyZW50XV1cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM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uICAgICAgICAgKlxuICAgICAgICAgKiBAaW50ZXJuYWxcbiAgICAgICAgICovXG4gICAgICAgIFN0YXRlU2VydmljZS5wcm90b3R5cGUuX2hhbmRsZUludmFsaWRUYXJnZXRTdGF0ZSA9IGZ1bmN0aW9uIChmcm9tUGF0aCwgdG9TdGF0ZSkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHZhciBmcm9tU3RhdGUgPSBQYXRoVXRpbHMubWFrZVRhcmdldFN0YXRlKHRoaXMucm91dGVyLnN0YXRlUmVnaXN0cnksIGZyb21QYXRoKTtcbiAgICAgICAgICAgIHZhciBnbG9iYWxzID0gdGhpcy5yb3V0ZXIuZ2xvYmFscztcbiAgICAgICAgICAgIHZhciBsYXRlc3RUaGluZyA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIGdsb2JhbHMudHJhbnNpdGlvbkhpc3RvcnkucGVla1RhaWwoKTsgfTtcbiAgICAgICAgICAgIHZhciBsYXRlc3QgPSBsYXRlc3RUaGluZygpO1xuICAgICAgICAgICAgdmFyIGNhbGxiYWNrUXVldWUgPSBuZXcgUXVldWUodGhpcy5pbnZhbGlkQ2FsbGJhY2tzLnNsaWNlKCkpO1xuICAgICAgICAgICAgdmFyIGluamVjdG9yID0gbmV3IFJlc29sdmVDb250ZXh0KGZyb21QYXRoKS5pbmplY3RvcigpO1xuICAgICAgICAgICAgdmFyIGNoZWNrRm9yUmVkaXJlY3QgPSBmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgaWYgKCEocmVzdWx0IGluc3RhbmNlb2YgVGFyZ2V0U3RhdGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIHRhcmdldCA9IHJlc3VsdDtcbiAgICAgICAgICAgICAgICAvLyBSZWNyZWF0ZSB0aGUgVGFyZ2V0U3RhdGUsIGluIGNhc2UgdGhlIHN0YXRlIGlzIG5vdyBkZWZpbmVkLlxuICAgICAgICAgICAgICAgIHRhcmdldCA9IF90aGlzLnRhcmdldCh0YXJnZXQuaWRlbnRpZmllcigpLCB0YXJnZXQucGFyYW1zKCksIHRhcmdldC5vcHRpb25zKCkpO1xuICAgICAgICAgICAgICAgIGlmICghdGFyZ2V0LnZhbGlkKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJlamVjdGlvbi5pbnZhbGlkKHRhcmdldC5lcnJvcigpKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGxhdGVzdFRoaW5nKCkgIT09IGxhdGVzdCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmVqZWN0aW9uLnN1cGVyc2VkZWQoKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIF90aGlzLnRyYW5zaXRpb25Ubyh0YXJnZXQuaWRlbnRpZmllcigpLCB0YXJnZXQucGFyYW1zKCksIHRhcmdldC5vcHRpb25zKCkpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGludm9rZU5leHRDYWxsYmFjaygpIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dENhbGxiYWNrID0gY2FsbGJhY2tRdWV1ZS5kZXF1ZXVlKCk7XG4gICAgICAgICAgICAgICAgaWYgKG5leHRDYWxsYmFjayA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUmVqZWN0aW9uLmludmFsaWQodG9TdGF0ZS5lcnJvcigpKS50b1Byb21pc2UoKTtcbiAgICAgICAgICAgICAgICB2YXIgY2FsbGJhY2tSZXN1bHQgPSBzZXJ2aWNlcy4kcS53aGVuKG5leHRDYWxsYmFjayh0b1N0YXRlLCBmcm9tU3RhdGUsIGluamVjdG9yKSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrUmVzdWx0LnRoZW4oY2hlY2tGb3JSZWRpcmVjdCkudGhlbihmdW5jdGlvbiAocmVzdWx0KSB7IHJldHVybiByZXN1bHQgfHwgaW52b2tlTmV4dENhbGxiYWNrKCk7IH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGludm9rZU5leHRDYWxsYmFjaygpO1xuICAgICAgICB9O1xuICAgICAgICAvKipcbiAgICAgICAgICogUmVnaXN0ZXJzIGFuIEludmFsaWQgU3RhdGUgaGFuZGxlclxuICAgICAgICAgKlxuICAgICAgICAgKiBSZWdpc3RlcnMgYSBbW09uSW52YWxpZENhbGxiYWNrXV0gZnVuY3Rpb24gdG8gYmUgaW52b2tlZCB3aGVuIFtbU3RhdGVTZXJ2aWNlLnRyYW5zaXRpb25Ub11dXG4gICAgICAgICAqIGhhcyBiZWVuIGNhbGxlZCB3aXRoIGFuIGludmFsaWQgc3RhdGUgcmVmZXJlbmNlIHBhcmFtZXRlclxuICAgICAgICAgKlxuICAgICAgICAgKiBFeGFtcGxlOlxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiBzdGF0ZVNlcnZpY2Uub25JbnZhbGlkKGZ1bmN0aW9uKHRvLCBmcm9tLCBpbmplY3Rvcikge1xuICAgICAgICAgKiAgIGlmICh0by5uYW1lKCkgPT09ICdmb28nKSB7XG4gICAgICAgICAqICAgICBsZXQgbGF6eUxvYWRlciA9IGluamVjdG9yLmdldCgnTGF6eUxvYWRTZXJ2aWNlJyk7XG4gICAgICAgICAqICAgICByZXR1cm4gbGF6eUxvYWRlci5sb2FkKCdmb28nKVxuICAgICAgICAgKiAgICAgICAgIC50aGVuKCgpID0+IHN0YXRlU2VydmljZS50YXJnZXQoJ2ZvbycpKTtcbiAgICAgICAgICogICB9XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHtmdW5jdGlvbn0gY2FsbGJhY2sgaW52b2t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LXJlc29sdmVkLCBhbmQgY29tcG9uZW50cyByZWluc3RhbnRpYXRlZC5cbiAgICAgICAgICpcbiAgICAgICAgICogIyMjIyBFeGFtcGxlOlxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiBsZXQgYXBwIGFuZ3VsYXIubW9kdWxlKCdhcHAnLCBbJ3VpLnJvdXRlciddKTtcbiAgICAgICAgICpcbiAgICAgICAgICogYXBwLmNvbnRyb2xsZXIoJ2N0cmwnLCBmdW5jdGlvbiAoJHNjb3BlLCAkc3RhdGUpIHtcbiAgICAgICAgICogICAkc2NvcGUucmVsb2FkID0gZnVuY3Rpb24oKXtcbiAgICAgICAgICogICAgICRzdGF0ZS5yZWxvYWQoKTtcbiAgICAgICAgICogICB9XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogTm90ZTogYHJlbG9hZCgpYCBpcyBqdXN0IGFuIGFsaWFzIGZvcjpcbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogJHN0YXRlLnRyYW5zaXRpb25Ubygkc3RhdGUuY3VycmVudCwgJHN0YXRlLnBhcmFtcywge1xuICAgICAgICAgKiAgIHJlbG9hZDogdHJ1ZSwgaW5oZXJpdDogZmFsc2VcbiAgICAgICAgICogfSk7XG4gICAgICAgICAqIGBgYFxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0gcmVsb2FkU3RhdGUgQSBzdGF0ZSBuYW1lIG9yIGEgc3RhdGUgb2JqZWN0LlxuICAgICAgICAgKiAgICBJZiBwcmVzZW50LCB0aGlzIHN0YXRlIGFuZCBhbGwgaXRzIGNoaWxkcmVuIHdpbGwgYmUgcmVsb2FkZWQsIGJ1dCBhbmNlc3RvcnMgd2lsbCBub3QgcmVsb2FkLlxuICAgICAgICAgKlxuICAgICAgICAgKiAjIyMjIEV4YW1wbGU6XG4gICAgICAgICAqIGBgYGpzXG4gICAgICAgICAqIC8vYXNzdW1pbm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gY2hhaW5lZCB0byB0aGUgbmV3IFRyYW5zaXRpb24ncyBwcm9taXNlLlxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICB2YXIgcmVqZWN0ZWRUcmFuc2l0aW9uSGFuZGxlciA9IGZ1bmN0aW9uICh0cmFucykgeyByZXR1cm4gZnVuY3Rpb24gKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgaWYgKGVycm9yIGluc3RhbmNlb2YgUmVqZWN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpc0xhdGVzdCA9IHJvdXRlci5nbG9iYWxzLmxhc3RTdGFydGVkVHJhbnNpdGlvbklkIDw9IHRyYW5zLiRpZDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVycm9yLnR5cGUgPT09IGV4cG9ydHMuUmVqZWN0VHlwZS5JR05PUkVEKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpc0xhdGVzdCAmJiByb3V0ZXIudXJsUm91dGVyLnVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29uc2lkZXIgaWdub3JlZCBgVHJhbnNpdGlvbi5ydW4oKWAgYXMgYSBzdWNjZXNzZnVsIGB0cmFuc2l0aW9uVG9gXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEud2hlbihnbG9iYWxzLmN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXRhaWwgPSBlcnJvci5kZXRhaWw7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvci50eXBlID09PSBleHBvcnRzLlJlamVjdFR5cGUuU1VQRVJTRURFRCAmJiBlcnJvci5yZWRpcmVjdGVkICYmIGRldGFpbCBpbnN0YW5jZW9mIFRhcmdldFN0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBgVHJhbnNpdGlvbi5ydW4oKWAgd2FzIHJlZGlyZWN0ZWQsIGFsbG93IHRoZSBgdHJhbnNpdGlvblRvKClgIHByb21pc2UgdG8gcmVzb2x2ZSBzdWNjZXNzZnVsbHlcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJ5IHJldHVybmluZyB0aGUgcHJvbWlzZSBmb3IgdGhlIG5ldyAocmVkaXJlY3QpIGBUcmFuc2l0aW9uLnJ1bigpYC5cbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWRpcmVjdCA9IHRyYW5zLnJlZGlyZWN0KGRldGFpbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVkaXJlY3QucnVuKCkuY2F0Y2gocmVqZWN0ZWRUcmFuc2l0aW9uSGFuZGxlcihyZWRpcmVjdCkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnJvci50eXBlID09PSBleHBvcnRzLlJlamVjdFR5cGUuQUJPUlRFRCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaXNMYXRlc3QgJiYgcm91dGVyLnVybFJvdXRlci51cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzZXJ2aWNlcy4kcS5yZWplY3QoZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBlcnJvckhhbmRsZXIgPSBfdGhpcy5kZWZhdWx0RXJyb3JIYW5kbGVyKCk7XG4gICAgICAgICAgICAgICAgZXJyb3JIYW5kbGVyKGVycm9yKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VydmljZXMuJHEucmVqZWN0KGVycm9yKTtcbiAgICAgICAgICAgIH07IH07XG4gICAgICAgICAgICB2YXIgdHJhbnNpdGlvbiA9IHRoaXMucm91dGVyLnRyYW5zaXRpb25TZXJ2aWNlLmNyZWF0ZShjdXJyZW50UGF0aCwgcmVmKTtcbiAgICAgICAgICAgIHZhciB0cmFuc2l0aW9uVG9Qcm9taXNlID0gdHJhb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gICAgICAgIHJlamVjdCh2YWwpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKiBAcmV0dXJucyBhIGRlZmVycmVkIG9iamVjdCwgd2hpY2ggaGFzIGByZXNvbHZlYCBhbmQgYHJlamVjdGAgZnVuY3Rpb25zICovXG4gICAgICAgIGRlZmVyOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICB2YXIgZGVmZXJyZWQgPSB7fTtcbiAgICAgICAgICAgIGRlZmVycmVkLnByb21pc2UgPSBuZXcgUHJvbWlzZShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7XG4gICAgICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZSA9IHJlc29sdmU7XG4gICAgICAgICAgICAgICAgZGVmZXJyZWQucmVqZWN0ID0gcmVqZWN0O1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gZGVmZXJyZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKiBMaWtlIFByb21pc2UuYWxsKCksIGJ1dCBhbHNvIHN1cHBvcnRzIG9iamVjdCBrZXkvcHJvbWlzZSBub3RhdGlvbiBsaWtlICRxICovXG4gICAgICAgIGFsbDogZnVuY3Rpb24gKHByb21pc2VzKSB7XG4gICAgICAgICAgICBpZiAoaXNBcnJheShwcm9taXNlcykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gUHJvbWlzZS5hbGwocHJvbWlzZXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHByb21pc2VzKSkge1xuICAgICAgICAgICAgICAgIC8vIENvbnZlcnQgcHJvbWlzZXMgbWFwIHRvIHByb21pc2VzIGFycmF5LlxuICAgICAgICAgICAgICAgIC8vIFdoZW4gZWFjaCBwcm9taXNlIHJlc29sdmVzLCBtYXAgaXQgdG8gYSB0dXBsZSB7IGtleToga2V5LCB2YWw6IHZhbCB9XG4gICAgICAgICAgICAgICAgdmFyIGNoYWluID0gT2JqZWN0LmtleXMocHJvbWlzZXMpLm1hcChmdW5jdGlvbiAoa2V5KSB7IHJldHVybiBwcm9taXNlc1trZXldLnRoZW4oZnVuY3Rpb24gKHZhbCkgeyByZXR1cm4gKHsga2V5OiBrZXksIHZhbDogdmFsIH0pOyB9KTsgfSk7XG4gICAgICAgICAgICAgICAgLy8gVGhlbiB3YWl0IGZvciBhbGwgcHJvbWlzZXMgdG8gcmVzb2x2ZSwgYW5kIGNvbnZlcnQgdGhlbSBiYWNrIHRvIGFuIG9iamVjdFxuICAgICAgICAgICAgICAgIHJldHVybiAkcS5hbGwoY2hhaW4pLnRoZW4oZnVuY3Rpb24gKHZhbHVlcykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWVzLnJlZHVjZShmdW5jdGlvbiAoYWNjLCB0dXBsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWNjW3R1cGxlLmtleV0gPSB0dXBsZS52YWw7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgICAgICB9LCB7fSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgfTtcblxuICAgIC8vIGdsb2JhbGx5IGF2YWlsYWJsZSBpbmplY3RhYmxlc1xuICAgIHZhciBnbG9iYWxzID0ge307XG4gICAgdmFyIFNUUklQX0NPTU1FTlRTID0gLygoXFwvXFwvLiokKXwoXFwvXFwqW1xcc1xcU10qP1xcKlxcLykpL2dtO1xuICAgIHZhciBBUkdVTUVOVF9OQU1FUyA9IC8oW15cXHMsXSspL2c7XG4gICAgLyoqXG4gICAgICogQSBiYXNpYyBhbmd1bGFyMS1saWtlIGluamVjdG9yIGFwaVxuICAgICAqXG4gICAgICogVGhpcyBvYmplY3QgaW1wbGVtZW50cyBmb3VyIG1ldGhvZHMgc2ltaWxhciB0byB0aGVcbiAgICAgKiBbYW5ndWxhciAxIGRlcGVuZGVuY3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JIGNhbid0IGZpbmQgaW5qZWN0YWJsZTogJ1wiICsga2V5ICsgXCInXCI7IH0pO1xuICAgICAgICAgICAgdmFyIGFyZ3MgPSBwYXJhbXMuZmlsdGVyKGVuc3VyZUV4aXN0KS5tYXAoZnVuY3Rpb24gKHgpIHsgcmV0dXJuIGFsbFt4XTsgfSk7XG4gICAgICAgICAgICBpZiAoaXNGdW5jdGlvbihmbikpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZuLmFwcGx5KGNvbnRleHQsIGFyZ3MpO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHJldHVybiBmbi5zbGljZSgtMSlbMF0uYXBwbHkoY29udGV4dCwgYXJncyk7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBSZXR1cm5zIGEgZnVuY3Rpb24ncyBkZXBlbmRlbmNpZXNcbiAgICAgICAgICpcbiAgICAgICAgICogQW5hbHl6ZXMgYSBmdW5jdGlvbiAob3IgYXJyYXkpIGFuZCByZXR1cm5zIGFuIGFycmF5IG9mIERJIHRva2VucyB0aGF0IHRoZSBmdW5jdGlvbiByZXF1aXJlcy5cbiAgICAgICAgICogQHJldHVybiBhbiBhcnJheSBvZiBgc3RyaW5nYHNcbiAgICAgICAgICovXG4gICAgICAgIGFubm90YXRlOiBmdW5jdGlvbiAoZm4pIHtcbiAgICAgICAgICAgIGlmICghaXNJbmplY3RhYmxlKGZuKSlcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXCJOb3QgYW4gaW5qZWN0YWJsZSBmdW5jdGlvbjogXCIgKyBmbik7XG4gICAgICAgICAgICBpZiAoZm4gJiYgZm4uJGluamVjdClcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4uJGluamVjdDtcbiAgICAgICAgICAgIGlmIChpc0FycmF5KGZuKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gZm4uc2xpY2UoMCwgLTEpO1xuICAgICAgICAgICAgdmFyIGZuU3RyID0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0ZXIsIF9pc0h0bWw1KSB7XG4gICAgICAgICAgICBpZiAoX2lzSHRtbDUgPT09IHZvaWQgMCkgeyBfaXNIdG1sNSA9IGZhbHNlOyB9XG4gICAgICAgICAgICB0aGlzLl9pc0h0bWw1ID0gX2lzSHRtbDU7XG4gICAgICAgICAgICB0aGlzLl9iYXNlSHJlZiA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgIHRoaXMuX2hhc2hQcmVmaXggPSAnJztcbiAgICAgICAgfVxuICAgICAgICBCcm93c2VyTG9jYXRpb25Db25maWcucHJvdG90eXBlLnBvcnQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBpZiAobG9jYXRpb24ucG9ydCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBOdW1iZXIobG9jYXRpb24ucG9ydCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wcm90b2NvbCgpID09PSAnaHR0cHMnID8gNDQzIDogODA7XG4gICAgICAgIH07XG4gICAgICAgIEJyb3dzZXJMb2NhdGlvbkNvbmZpZy5wcm90b3R5cGUucHJvdG9jb2wgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gbG9jYXRpb24ucHJvdG9jb2wucmVwbGFjZSgvOi9nLCAnJyk7XG4gICAgICAgIH07XG4gICAgICAgIEJyb3dzZXJMb2NhdGlvbkNvbmZpZy5wcm90b3R5cGUuaG9zdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ob3N0bmFtZTtcbiAgICAgICAgfTtcbiAgICAgICAgQnJvd3NlckxvY2F0aW9uQ29uZmlnLnByb3RvdHlwZS5odG1sNU1vZGUgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5faXNIdG1sNTtcbiAgICAgICAgfTtcbiAgICAgICAgQnJvd3NlckxvY2F0aW9uQ29uZmlnLnByb3RvdHlwZS5oYXNoUHJlZml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jb3B5OiBjb3B5LFxuICAgICAgICBfZXh0ZW5kOiBfZXh0ZW5kLFxuICAgICAgICBzaWxlbmNlVW5jYXVnaHRJblByb21pc2U6IHNpbGVuY2VVbmNhdWdodEluUHJvbWlzZSxcbiAgICAgICAgc2lsZW50UmVqZWN0aW9uOiBzaWxlbnRSZWplY3Rpb24sXG4gICAgICAgIG1ha2VTdHViOiBtYWtlU3R1YixcbiAgICAgICAgc2VydmljZXM6IHNlcnZpY2VzLFxuICAgICAgICBHbG9iOiBHbG9iLFxuICAgICAgICBjdXJyeTogY3VycnksXG4gICAgICAgIGNvbXBvc2U6IGNvbXBvc2UsXG4gICAgICAgIHBpcGU6IHBpcGUsXG4gICAgICAgIHByb3A6IHByb3AsXG4gICAgICAgIHByb3BFcTogcHJvcEVxLFxuICAgICAgICBwYXJzZTogcGFyc2UsXG4gICAgICAgIG5vdDogbm90LFxuICAgICAgICBhbmQ6IGFuZCxcbiAgICAgICAgb3I6IG9yLFxuICAgICAgICBhbGw6IGFsbCxcbiAgICAgICAgYW55OiBhbnksXG4gICAgICAgIGlzOiBpcyxcbiAgICAgICAgZXE6IGVxLFxuICAgICAgICB2YWw6IHZhbCxcbiAgICAgICAgaW52b2tlOiBpbnZva2UsXG4gICAgICAgIHBhdHRlcm46IHBhdHRlcm4sXG4gICAgICAgIGlzVW5kZWZpbmVkOiBpc1VuZGVmaW5lZCxcbiAgICAgICAgaXNEZWZpbmVkOiBpc0RlZmluZWQsXG4gICAgICAgIGlzTnVsbDogaXNOdWxsLFxuICAgICAgICBpc051bGxPclVuZGVmaW5lZDogaXNOdWxsT3JVbmRlZmluZWQsXG4gICAgICAgIGlzRnVuY3Rpb246IGlzRnVuY3Rpb24sXG4gICAgICAgIGlzTnVtYmVyOiBpc051bWJlcixcbiAgICAgICAgaXNTdHJpbmc6IGlzU3RyaW5nLFxuICAgICAgICBpc09iamVjdDogaXNPYmplY3QsXG4gICAgICAgIGlzQXJyYXk6IGlzQXJyYXksXG4gICAgICAg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mF1bHQ6IHBpY2soc3RhdGUsIGFsbFZpZXdLZXlzKSB9O1xuICAgICAgICBmb3JFYWNoKHZpZXdzT2JqZWN0LCBmdW5jdGlvbiAoY29uZmlnLCBuYW1lKSB7XG4gICAgICAgICAgICAvLyBBY2NvdW50IGZvciB2aWV3czogeyBcIlwiOiB7IHRlbXBsYXRlLi4uIH0gfVxuICAgICAgICAgICAgbmFtZSA9IG5hbWUgfHwgJyRkZWZhdWx0JztcbiAgICAgICAgICAgIC8vIEFjY291bnQgZm9yIHZpZXdzOiB7IGhlYWRlcjogXCJoZWFkZXJDb21wb25lbnRcIiB9XG4gICAgICAgICAgICBpZiAoaXNTdHJpbmcoY29uZmlnKSlcbiAgICAgICAgICAgICAgICBjb25maWcgPSB7IGNvbXBvbmVudDogY29uZmlnIH07XG4gICAgICAgICAgICAvLyBNYWtlIGEgc2hhbGxvdyBjb3B5IG9mIHRoZSBjb25maWcgb2JqZWN0XG4gICAgICAgICAgICBjb25maWcgPSBleHRlbmQoe30sIGNvbmZpZyk7XG4gICAgICAgICAgICAvLyBEbyBub3QgYWxsb3cgYSB2aWV3IHRvIG1peCBwcm9wcyBmb3IgY29tcG9uZW50LXN0eWxlIHZpZXcgd2l0aCBwcm9wcyBmb3IgdGVtcGxhdGUvY29udHJvbGxlci1zdHlsZSB2aWV3XG4gICAgICAgICAgICBpZiAoaGFzQW55S2V5KGNvbXBLZXlzLCBjb25maWcpICYmIGhhc0FueUtleShub25Db21wS2V5cywgY29uZmlnKSkge1xuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcIkNhbm5vdCBjb21iaW5lOiBcIiArIGNvbXBLZXlzLmpvaW4oJ3wnKSArIFwiIHdpdGg6IFwiICsgbm9uQ29tcEtleXMuam9pbignfCcpICsgXCIgaW4gc3RhdGV2aWV3OiAnXCIgKyBuYW1lICsgXCJAXCIgKyBzdGF0ZS5uYW1lICsgXCInXCIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uZmlnLnJlc29sdmVBcyA9IGNvbmZpZy5yZXNvbHZlQXMgfHwgJyRyZXNvbHZlJztcbiAgICAgICAgICAgIGNvbmZpZy4kdHlwZSA9ICduZzEnO1xuICAgICAgICAgICAgY29uZmlnLiRjb250ZXh0ID0gc3RhdGU7XG4gICAgICAgICAgICBjb25maWcuJG5hbWUgPSBuYW1lO1xuICAgICAgICAgICAgdmFyIG5vcm1hbGl6ZWQgPSBWaWV3U2VydmljZS5ub3JtYWxpemVVSVZpZXdUYXJnZXQoY29uZmlnLiRjb250ZXh0LCBjb25maWcuJG5hbWUpO1xuICAgICAgICAgICAgY29uZmlnLiR1aVZpZXdOYW1lID0gbm9ybWFsaXplZC51aVZpZXdOYW1lO1xuICAgICAgICAgICAgY29uZmlnLiR1aVZpZXdDb250ZXh0QW5jaG9yID0gbm9ybWFsaXplZC51aVZpZXdDb250ZXh0QW5jaG9yO1xuICAgICAgICAgICAgdmlld3NbbmFtZV0gPSBjb25maWc7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gdmlld3M7XG4gICAgfVxuICAgIC8qKiBAaGlkZGVuICovXG4gICAgdmFyIGlkJDEgPSAwO1xuICAgIC8qKiBAaW50ZXJuYWxhcGkgKi9cbiAgICB2YXIgTmcxVmlld0NvbmZpZyA9IC8qKiBAY2xhc3MgKi8gKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgZnVuY3Rpb24gTmcxVmlld0NvbmZpZyhwYXRoLCB2aWV3RGVjbCwgZmFjdG9yeSkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHRoaXMucGF0aCA9IHBhdGg7XG4gICAgICAgICAgICB0aGlzLnZpZXdEZWNsID0gdmlld0RlY2w7XG4gICAgICAgICAgICB0aGlzLmZhY3RvcnkgPSBmYWN0b3J5O1xuICAgICAgICAgICAgdGhpcy4kaWQgPSBpZCQxKys7XG4gICAgICAgICAgICB0aGlzLmxvYWRlZCA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5nZXRUZW1wbGF0ZSA9IGZ1bmN0aW9uICh1aVZpZXcsIGNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX3RoaXMuY29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgID8gX3RoaXMuZmFjdG9yeS5tYWtlQ29tcG9uZW50VGVtcGxhdGUodWlWaWV3LCBjb250ZXh0LCBfdGhpcy5jb21wb25lbnQsIF90aGlzLnZpZXdEZWNsLmJpbmRpbmdzKVxuICAgICAgICAgICAgICAgICAgICA6IF90aGlzLnRlbXBsYXRlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBOZzFWaWV3Q29uZmlnLnByb3RvdHlwZS5sb2FkID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgICAgIHZhciAkcSA9IHNlcnZpY2VzLiRxO1xuICAgICAgICAgICAgdmFyIGNvbnRleHQgPSBuZXcgUmVzb2x2ZUNvbnRleHQodGhpcy5wYXRoKTtcbiAgICAgICAgICAgIHZhciBwYXJhbXMgPSB0aGlzLnBhdGgucmVkdWNlKGZ1bmN0aW9uIChhY2MsIG5vZGUpIHsgcmV0dXJuIGV4dGVuZChhY2MsIG5vZGUucGFyYW1WYWx1ZXMpOyB9LCB7fSk7XG4gICAgICAgICAgICB2YXIgcHJvbWlzZXMgPSB7XG4gICAgICAgICAgICAgICAgdGVtcGxhdGU6ICRxLndoZW4odGhpcy5mYWN0b3J5LmZyb21Db25maWcodGhpcy52aWV3RGVjbCwgcGFyYW1zLCBjb250ZXh0KSksXG4gICAgICAgICAgICAgICAgY29udHJvbGxlcjogJHEud2hlbih0aGlzLmdldENvbnRyb2xsZXIoY29udGV4dCkpLFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiAkcS5hbGwocHJvbWlzZXMpLnRoZW4oZnVuY3Rpb24gKHJlc3VsdHMpIHtcbiAgICAgICAgICAgICA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aXNEZWZpbmVkKGNvbmZpZy50ZW1wbGF0ZVByb3ZpZGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyBhc1RlbXBsYXRlKHRoaXMuZnJvbVByb3ZpZGVyKGNvbmZpZy50ZW1wbGF0ZVByb3ZpZGVyLCBwYXJhbXMsIGNvbnRleHQpKVxuICAgICAgICAgICAgICAgICAgICAgICAgOiBpc0RlZmluZWQoY29uZmlnLmNvbXBvbmVudClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFzQ29tcG9uZW50KGNvbmZpZy5jb21wb25lbnQpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBpc0RlZmluZWQoY29uZmlnLmNvbXBvbmVudFByb3ZpZGVyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGFzQ29tcG9uZW50KHRoaXMuZnJvbUNvbXBvbmVudFByb3ZpZGVyKGNvbmZpZy5jb21wb25lbnRQcm92aWRlciwgcGFyYW1zLCBjb250ZXh0KSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBhc1RlbXBsYXRlKGRlZmF1bHRUZW1wbGF0ZSk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgdGVtcGxhdGUgZnJvbSBhIHN0cmluZyBvciBhIGZ1bmN0aW9uIHJldHVybmluZyBhIHN0cmluZy5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHRlbXBsYXRlIGh0bWwgdGVtcGxhdGUgYXMgYSBzdHJpbmcgb3IgZnVuY3Rpb24gdGhhdCByZXR1cm5zIGFuIGh0bWwgdGVtcGxhdGUgYXMgYSBzdHJpbmcuXG4gICAgICAgICAqIEBwYXJhbSBwYXJhbXMgUGFyYW1ldGVycyB0byBwYXNzIHRvIHRoZSB0ZW1wbGF0ZSBmdW5jdGlvbi5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybiB7c3RyaW5nfG9iamVjdH0gVGhl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AodXJsID09IG51bGwpXG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICBpZiAodGhpcy5fdXNlSHR0cCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLiRodHRwXG4gICAgICAgICAgICAgICAgICAgIC5nZXQodXJsLCB7IGNhY2hlOiB0aGlzLiR0ZW1wbGF0ZUNhY2hlLCBoZWFkZXJzOiB7IEFjY2VwdDogJ3RleHQvaHRtbCcgfSB9KVxuICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3BvbnNlLmRhdGE7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdGhpcy4kdGVtcGxhdGVSZXF1ZXN0KHVybCk7XG4gICAgICAgIH07XG4gICAgICAgIC8qKlxuICAgICAgICAgKiBDcmVhdGVzIGEgdGVtcGxhdGUgYnkgaW52b2tpbmcgYW4gaW5qZWN0YWJsZSBwcm92aWRlciBmdW5jdGlvbi5cbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIHByb3ZpZGVyIEZ1bmN0aW9uIHRvIGludm9rZSB2aWEgYGxvY2Fsc2BcbiAgICAgICAgICogQHBhcmFtIHtGdW5jdGlvbn0gaW5qZWN0Rm4gYSBmdW5jdGlvbiB1c2VkIHRvIGludm9rZSB0aGUgdGVtcGxhdGUgcHJvdmlkZXJcbiAgICAgICAgICogQHJldHVybiB7c3RyaW5nfFByb21pc2UuPHN0cmluZz59IFRoZSB0ZW1wbGF0ZSBodG1sIGFzIGEgc3RyaW5nLCBvciBhIHByb21pc2VcbiAgICAgICAgICogZm9yIHRoYXQgc3RyaW5nLlxuICAgICAgICAgKi9cbiAgICAgICAgVGVtcGxhdGVGYWN0b3J5LnByb3RvdHlwZS5mcm9tUHJvdmlkZXIgPSBmdW5jdGlvbiAocHJvdmlkZXIs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fVwiXG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdAJylcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF0dHJOYW1lICsgXCI9J3t7XCIgKyBwcmVmaXggKyBcIiRyZXNvbHZlLlwiICsgcmVzb2x2ZU5hbWUgKyBcIn19J1wiO1xuICAgICAgICAgICAgICAgIC8vIFdpcmUgXCImXCIgY2FsbGJhY2tzIHRvIHJlc29sdmVzIHRoYXQgcmV0dXJuIGEgY2FsbGJhY2sgZnVuY3Rpb25cbiAgICAgICAgICAgICAgICAvLyBHZXQgdGhlIHJlc3VsdCBvZiB0aGUgcmVzb2x2ZSAoc2hvdWxkIGJlIGEgZnVuY3Rpb24pIGFuZCBhbm5vdGF0ZSBpdCB0byBnZXQgaXRzIGFyZ3VtZW50cy5cbiAgICAgICAgICAgICAgICAvLyBzb21lLWF0dHI9XCIkcmVzb2x2ZS5zb21lUmVzb2x2ZVJlc3VsdE5hbWUoZm9vLCBiYXIpXCJcbiAgICAgICAgICAgICAgICBpZiAodHlwZSA9PT0gJyYnKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSBjb250ZXh0LmdldFJlc29sdmFibGUocmVzb2x2ZU5hbWUpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgZm4gPSByZXMgJiYgcmVzLmRhdGE7XG4gICAgICAgICAgICAgICAgICAgIHZhciBhcmdzID0gKGZuICYmIHNlcnZpY2VzLiRpbmplY3Rvci5hbm5vdGF0ZShmbikpIHx8IFtdO1xuICAgICAgICAgICAgICAgICAgICAvLyBhY2NvdW50IGZvciBhcnJheSBzdHlsZSBpbmplY3Rpb24sIGkuZS4sIFsnZm9vJywgZnVuY3Rpb24oZm9vKSB7fV1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGFycmF5SWR4U3RyID0gaXNBcnJheShmbikgPyBcIltcIiArIChmbi5sZW5ndGggLSAxKSArIFwiXVwiIDogJyc7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybi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9OYW1lID0gKHN0YXRlLm5hbWUgKyAnLicgKyBuYW1lKS5yZXBsYWNlKCcuJywgJy8nKTtcbiAgICAgICAgICogICAgIGNvbmZpZy50ZW1wbGF0ZVVybCA9IGNvbmZpZy50ZW1wbGF0ZVVybCB8fCAnL3BhcnRpYWxzLycgKyBhdXRvTmFtZSArICcuaHRtbCc7XG4gICAgICAgICAqICAgICByZXN1bHRbbmFtZV0gPSBjb25maWc7XG4gICAgICAgICAqICAgfSk7XG4gICAgICAgICAqICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICogfSk7XG4gICAgICAgICAqXG4gICAgICAgICAqICRzdGF0ZVByb3ZpZGVyLnN0YXRlKCdob21lJywge1xuICAgICAgICAgKiAgIHZpZXdzOiB7XG4gICAgICAgICAqICAgICAnY29udGFjdC5saXN0JzogeyBjb250cm9sbGVyOiAnTGlzdENvbnRyb2xsZXInIH0sXG4gICAgICAgICAqICAgICAnY29udGFjdC5pdGVtJzogeyBjb250cm9sbGVyOiAnSXRlbUNvbnRyb2xsZXInIH1cbiAgICAgICAgICogICB9XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICpcbiAgICAgICAgICogYGBganNcbiAgICAgICAgICogLy8gQXV0by1wb3B1bGF0ZXMgbGlzdCBhbmQgaXRlbSB2aWV3cyB3aXRoIC9wYXJ0aWFscy9ob21lL2NvbnRhY3QvbGlzdC5odG1sLFxuICAgICAgICAgKiAvLyBhbmQgL3BhcnRpYWxzL2hvbWUvY29udGFjdC9pdGVtLmh0bWwsIHJlc3BlY3RpdmVseS5cbiAgICAgICAgICogJHN0YXRlLmdvKCdob21lJyk7XG4gICAgICAgICAqIGBgYFxuICAgICAgICAgKlxuICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gbmFtZSBUaGUgbmFtZSBvZiB0aGUgYnVpbGRlciBmdW5jdGlvbiB0byBkZWNvcmF0ZS5cbiAgICAgICAgICogQHBhcmFtIH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GhlIHJvdXRlciBzdGFydHMuXG4gICAgICAgICAqIE9uY2UgdGhlIGluaXRpYWxpemF0aW9uIGlzIGNvbXBsZXRlLCBjYWxsIFtbbGlzdGVuXV0gdG8gdGVsbCBVSS1Sb3V0ZXIgdG8gc3RhcnQgd2F0Y2hpbmcgYW5kIHN5bmNocm9uaXppbmcgdGhlIFVSTC5cbiAgICAgICAgICpcbiAgICAgICAgICogIyMjIyBFeGFtcGxlOlxuICAgICAgICAgKiBgYGBqc1xuICAgICAgICAgKiB2YXIgYXBwID0gYW5ndWxhci5tb2R1bGUoJ2FwcCcsIFsndWkucm91dGVyJ10pO1xuICAgICAgICAgKlxuICAgICAgICAgKiBhcHAuY29uZmlnKGZ1bmN0aW9uICgkdXJsUm91dGVyUHJvdmlkZXIpIHtcbiAgICAgICAgICogICAvLyBQcmV2ZW50ICR1cmxSb3V0ZXIgZnJvbSBhdXRvbWF0aWNhbGx5IGludGVyY2VwdGluZyBVUkwgY2hhbmdlcztcbiAgICAgICAgICogICAkdXJsUm91dGVyUHJvdmlkZXIuZGVmZXJJbnRlcmNlcHQoKTtcbiAgICAgICAgICogfSlcbiAgICAgICAgICpcbiAgICAgICAgICogYXBwLnJ1bihmdW5jdGlvbiAoTXlTZXJ2aWNlLCAkdXJsUm91dGVyLCAkaHR0cCkge1xuICAgICAgICAgKiAgICRodHRwLmdldChcIi9zdHVmZlwiKS50aGVuKGZ1bmN0aW9uKHJlc3ApIHtcbiAgICAgICAgICogICAgIE15U2VydmljZS5kb1N0dWZmKHJlc3AuZGF0YSk7XG4gICAgICAgICAqICAgICAkdXJsUm91dGVyLmxpc3RlbigpO1xuICAgICAgICAgKiAgICAgJHVybFJvdXRlci5zeW5jKCk7XG4gICAgICAgICAqICAgfSk7XG4gICAgICAgICAqIH0pO1xuICAgICAgICAgKiBgYGBcbiAgICAgICAgICpcbiAgICAgICAgICogQHBhcmFtIGRlZmVyIEluZGljYXRlcyB3aGV0aGVyIHRvIGRlZmVyIGxvY2F0a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lSb3V0ZXInXTtcbiAgICBmdW5jdGlvbiBydW5CbG9jaygkaW5qZWN0b3IsICRxLCAkdWlSb3V0ZXIpIHtcbiAgICAgICAgc2VydmljZXMuJGluamVjdG9yID0gJGluamVjdG9yO1xuICAgICAgICBzZXJ2aWNlcy4kcSA9ICRxO1xuICAgICAgICAvLyBodHRwczovL2dpdGh1Yi5jb20vYW5ndWxhci11aS91aS1yb3V0ZXIvaXNzdWVzLzM2NzhcbiAgICAgICAgaWYgKCFPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoJGluamVjdG9yLCAnc3RyaWN0RGknKSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAkaW5qZWN0b3IuaW52b2tlKGZ1bmN0aW9uIChjaGVja1N0cmljdERpKSB7IH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgJGluamVjdG9yLnN0cmljdERpID0gISEvc3RyaWN0IG1vZGUvLmV4ZWMoZXJyb3IgJiYgZXJyb3IudG9TdHJpbmcoKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gVGhlICRpbmplY3RvciBpcyBub3cgYXZhaWxhYmxlLlxuICAgICAgICAvLyBGaW5kIGFueSByZXNvbHZhYmxlcyB0aGF0IGhhZCBkZXBlbmRlbmN5IGFubm90YXRpb24gZGVmZXJyZWRcbiAgICAgICAgJHVpUm91dGVyLnN0YXRlUmVnaXN0cnlcbiAgICAgICAgICAgIC5nZXQoKVxuICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAoeCkgeyByZXR1cm4geC4kJHN0YXRlKCkucmVzb2x2YWJsZXM7IH0pXG4gICAgICAgICAgICAucmVkdWNlKHVubmVzdFIsIFtdKVxuICAgICAgICAgICAgLmZpbHRlcihmdW5jdGlvbiAoeCkgeyByZXR1cm4geC5kZXBzID09PSAnZGVmZXJyZWQnOyB9KVxuIC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dWx0Q291bnRfMSA9IHR5cGUuaXNBbmNob3IgJiYgIXRhcmdldC5ocmVmID8gMSA6IDA7XG4gICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlnbm9yZVByZXZlbnREZWZhdWx0Q291bnRfMS0tIDw9IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAkdGltZW91dC5jYW5jZWwodHJhbnNpdGlvbl8xKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH1cbiAgICAvKiogQGhpZGRlbiAqL1xuICAgIGZ1bmN0aW9uIGRlZmF1bHRPcHRzKGVsLCAkc3RhdGUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHJlbGF0aXZlOiBzdGF0ZUNvbnRleHQoZWwpIHx8ICRzdGF0ZS4kY3VycmVudCxcbiAgICAgICAgICAgIGluaGVyaXQ6IHRydWUsXG4gICAgICAgICAgICBzb3VyY2U6ICdzcmVmJyxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiBiaW5kRXZlbnRzKGVsZW1lbnQsIHNjb3BlLCBob29rRm4sIHVpU3RhdGVPcHRzKSB7XG4gICAgICAgIHZhciBldmVudHM7XG4gICAgICAgIGlmICh1aVN0YXRlT3B0cykge1xuICAgICAgICAgICAgZXZlbnRzID0gdWlTdGF0ZU9wdHMuZXZlbnRzO1xuICAgICAgICB9XG4gICAgICAgIGlmICghaXNBcnJheShldmVudHMpKSB7XG4gICAgICAgICAgICBldmVudHMgPSBbJ2NsaWNrJ107XG4gICAgICAgIH1cbiAgICAgICAgdmFyIG9uID0gZWxlbWVudC5vbiA/ICdvbicgOiAnYmluZCc7XG4gICAgICAgIGZvciAodmFyIF9pID0gMCwgZXZlbnRzXzEgPSBldmVudHM7IF9pIDwgZXZlbnRz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hdHRycy51aVNyZWYpO1xuICAgICAgICAgICAgICAgICAgICByYXdEZWYudWlTdGF0ZSA9IHJlZi5zdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgcmF3RGVmLnVpU3RhdGVPcHRzID0gYXR0cnMudWlTcmVmT3B0cyA/IHNjb3BlLiRldmFsKGF0dHJzLnVpU3JlZk9wdHMpIDoge307XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWYgPSBnZXREZWYoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bmxpbmtJbmZvRm4pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5saW5rSW5mb0ZuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aXZlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGlua0luZm9GbiA9IGFjdGl2ZS4kJGFkZFN0YXRlSW5mbyhkZWYudWlTdGF0ZSwgZGVmLnVpU3RhdGVQYXJhbXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlZi5ocmVmICE9IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnMuJHNldCh0eXBlLmF0dHIsIGRlZi5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAocmVmLnBhcmFtRXhwcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGUuJHdhdGNoKHJlZi5wYXJhbUV4cHIsIGZ1bmN0aW9uICh2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdEZWYudWlTdGF0ZVBhcmFtcyA9IGV4dGVuZCh7fSwgdmFsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICA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1xuICAgICAgICAgICAgICAgICAgICB2YXIgYWN0aXZlID0gdWlTcmVmQWN0aXZlWzFdIHx8IHVpU3JlZkFjdGl2ZVswXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVubGlua0luZm9GbiA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHZhciBob29rRm47XG4gICAgICAgICAgICAgICAgICAgIHZhciByYXdEZWYgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGdldERlZiA9IGZ1bmN0aW9uICgpIHsgcmV0dXJuIHByb2Nlc3NlZERlZigkc3RhdGUsIGVsZW1lbnQsIHJhd0RlZik7IH07XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbnB1dEF0dHJzID0gWyd1aVN0YXRlJywgJ3VpU3RhdGVQYXJhbXMnLCAndWlTdGF0ZU9wdHMnXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHdhdGNoRGVyZWdGbnMgPSBpbnB1dEF0dHJzLnJlZHVjZShmdW5jdGlvbiAoYWNjLCBhdHRyKSB7IHJldHVybiAoKGFjY1thdHRyXSA9IG5vb3ApLCBhY2MpOyB9LCB7fSk7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHVwZGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZWYgPSBnZXREZWYoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1bmxpbmtJbmZvRm4pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5saW5rSW5mb0ZuKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWN0aXZlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVubGlua0luZm9GbiA9IGFjdGl2ZS4kJGFkZFN0YXRlSW5mbyhkZWYudWlTdGF0ZSwgZGVmLnVpU3RhdGVQYXJhbXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlZi5ocmVmICE9IG51bGwpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cnMuJHNldCh0eXBlLmF0dHIsIGRlZi5ocmVmKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpbnB1dEF0dHJzLmZvckVhY2goZnVuY3Rpb24gKGZpZWxkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByYXdEZWZbZmllbGRdID0gYXR0cnNbZmllbGRdID8gc2NvcGUuJGV2YWwoYXR0cnNbZmllbGRdKSA6IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRycy4kb2JzZXJ2ZShmaWVsZCwgZnVuY3Rpb24gKGV4cHIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YXRjaERlcmVnRm5zW2ZpZWxkXSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhdGNoRGVyZWdGbnNbZmllbGRdID0gc2NvcGUuJHdhdGNoKGV4cHIsIGZ1bmN0aW9uIChuZXd2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmF3RGVmW2ZpZWxkXSA9IG5ld3ZhbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS4kb24oJyRkZXN0cm95JywgJHVpUm91dGVyLnN0YXRlUmVnaXN0cnkub25TdGF0ZXNDaGFuZ2VkKHVwZGF0ZSkpO1xuICAgICAgICAgICAgICAgICAgICBzY29wZS4kb24oJyRkZXN0cm95JywgJHVpUm91dGVyLnRyYW5zaXRpb25TZXJ2aWNlLm9uU3VjY2Vzcyh7fSwgdXBkYXRlKSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghdHlwZS5j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AnQScsXG4gICAgICAgICAgICAgICAgY29udHJvbGxlcjogW1xuICAgICAgICAgICAgICAgICAgICAnJHNjb3BlJyxcbiAgICAgICAgICAgICAgICAgICAgJyRlbGVtZW50JyxcbiAgICAgICAgICAgICAgICAgICAgJyRhdHRycycsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uICgkc2NvcGUsICRlbGVtZW50LCAkYXR0cnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0ZXMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3RpdmVFcUNsYXNzO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVpU3JlZkFjdGl2ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZXJlIHByb2JhYmx5IGlzbid0IG11Y2ggcG9pbnQgaW4gJG9ic2VydmluZyB0aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB1aVNyZWZBY3RpdmUgYW5kIHVpU3JlZkFjdGl2ZUVxIHNoYXJlIHRoZSBzYW1lIGRpcmVjdGl2ZSBvYmplY3Qgd2l0aCBzb21lXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzbGlnaHQgZGlmZmVyZW5jZSBpbiBsb2dpYyByb3V0aW5nXG4gICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVFcUNsYXNzID0gJGludGVycG9sYXRlKCRhdHRycy51aVNyZWZBY3RpdmVFcSB8fCAnJywgZmFsc2UpKCRzY29wZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVpU3JlZkFjdGl2ZSA9ICRzY29wZS4kZXZhbCgkYXR0cnMudWlTcmVmQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRG8gbm90aGluZy4gdWlTcmVmQWN0aXZlIGlzIG5vdCBhIHZhbGlkIGV4cHJlc3Npb24uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRmFsbCBiYWNrIHRvIHVzaW5nICRpbnRlcnBvbGF0ZSBiZWxvd1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdWlTcmVmQWN0aXZlID0gdWlTcmVmQWN0aXZlIHx8ICRpbnRlcnBvbGF0ZSgkYXR0cnMudWlTcmVmQWN0aXZlIHx8ICcnLCBmYWxzZSkoJHNjb3BlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0YXRlc0Zyb21EZWZpbml0aW9uT2JqZWN0KHVpU3JlZkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBbGxvdyB1aVNyZWYgdG8gY29tbXVuaWNhdGUgd2l0aCB1aVNyZWZBY3RpdmVbRXF1YWxzXVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy4kJGFkZFN0YXRlSW5mbyA9IGZ1bmN0aW9uIChuZXdTdGF0ZSwgbmV3UGFyYW1zKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2UgYWxyZWFkeSBnb3QgYW4gZXhwbGljaXQgc3RhdGUgcHJvdmlkZWQgYnkgdWktc3JlZi1hY3RpdmUsIHNvIHdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2hhZG93IHRoZSBvbmUgdGhhdCBjb21lcyBmcm9tIHVpLXNyZWZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNPYmplY3QodWlTcmVmQWN0aXZlKSAmJiBzdGF0ZXMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXJlZ2lzdGVyID0gYWRkU3RhdGUobmV3U3RhdGUsIG5ld1BhcmFtcywgdWlTcmVmQWN0aXZlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVyZWdpc3RlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB1cGRhdGVBZnRlclRyYW5zaXRpb24odHJhbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFucy5wcm9taXNlLnRoZW4odXBkYXRlLCBub29wKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICRzY29wZS4kb24oJyRkZXN0cm95Jywgc2V0dXBFdmVudExpc3RlbmVycygpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkdWlSb3V0ZXIuZ2xvYmFscy50cmFuc2l0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlQWZ0ZXJUcmFuc2l0aW9uKCR1aVJvdXRlci5nbG9iYWxzLnRyYW5zaXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gc2V0dXBFdmVudExpc3RlbmVycygpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVyZWdpc3RlclN0YXRlc0NoYW5nZWRMaXN0ZW5lciA9ICR1aVJvdXRlci5zdGF0ZVJlZ2lzdHJ5Lm9uU3RhdGVzQ2hhbmdlZChoYW5kbGVTdGF0ZXNDaGFuZ2VkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGVyZWdpc3Rlck9uU3RhcnRMaXN0ZW5lciA9ICR1aVJvdXRlci50cmFuc2l0aW9uU2VydmljZS5vblN0YXJ0KHt9LCB1cGRhdGVBZnRlclRyYW5zaXRpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZXJlZ2lzdGVyU3RhdGVDaGFuZ2VTdWNjZXNzTGlzdGVuZXIgPSAkc2NvcGUuJG9uKCckc3RhdGVDaGFuZ2VTdWNjZXNzJywgdXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gY2xlYW5VcCgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVyZWdpc3RlclN0YXRlc0NoYW5nZWRMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXJlZ2lzdGVyT25TdGFydExpc3RlbmVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcmVnaXN0ZXJTdGF0ZUNoYW5nZVN1Y2Nlc3NMaXN0ZW5lcigpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBoYW5kbGVTdGF0ZXNDaGFuZ2VkKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0YXRlc0Zyb21EZWZpbml0aW9uT2JqZWN0KHVpU3JlZkFjdGl2ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBzZXRTdGF0ZXNGcm9tRGVmaW5pdGlvbk9iamVjdChzdGF0ZXNEZWZpbml0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzT2JqZWN0KHN0YXRlc0RlZmluaXRpb24pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlcyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JFYWNoKHN0YXRlc0RlZmluaXRpb24sIGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSwgYWN0aXZlQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhlbHBlciBmdW5jdGlvbiB0byBhYnN0cmFjdCBhZGRpbmcgc3RhdGUuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWRkU3RhdGVGb3JDbGFzcyA9IGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSwgYWN0aXZlQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVmID0gcGFyc2VTdGF0ZVJlZihzdGF0ZU9yTmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkU3RhdGUocmVmLnN0YXRlLCAkc2NvcGUuJGV2YWwocmVmLnBhcmFtRXhwciksIGFjdGl2ZUNsYXNzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNTdHJpbmcoc3RhdGVPck5hbWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgc3RhdGUgaXMgc3RyaW5nLCBqdXN0IGFkZCBpdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRTdGF0ZUZvckNsYXNzKHN0YXRlT3JOYW1lLCBhY3RpdmVDbGFzcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChpc0FycmF5KHN0YXRlT3JOYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHN0YXRlIGlzIGFuIGFycmF5LCBpdGVyYXRlIG92ZXIgaXQgYW5kIGFkZCBlYWNoIGFycmF5IGl0ZW0gaW5kaXZpZHVhbGx5LlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvckVhY2goc3RhdGVPck5hbWUsIGZ1bmN0aW9uIChzdGF0ZU9yTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRTdGF0ZUZvckNsYXNzKHN0YXRlT3JOYW1lLCBhY3RpdmVDbGFzcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGFkZFN0YXRlKHN0YXRlTmFtZSwgc3RhdGVQYXJhbXMsIGFjdGl2ZUNsYXNzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlID0gJHN0YXRlLmdldChzdGF0ZU5hbWUsIHN0YXRlQ29udGV4dCgkZWxlbWVudCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0ZUluZm8gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlOiBzdGF0ZSB8fCB7IG5hbWU6IHN0YXRlTmFtZSB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXM6IHN0YXRlUGFyYW1zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY3RpdmVDbGFzczogYWN0aXZlQ2xhc3MsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZXMucHVzaChzdGF0ZUluZm8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiByZW1vdmVTdGF0ZSgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlRnJvbShzdGF0ZXMpKHN0YXRlSW5mbyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSByb3V0ZSBzdGF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gdXBkYXRlKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzcGxpdENsYXNzZXMgPSBmdW5jdGlvbiAoc3RyKSB7IHJldHVybiBzdHIuc3BsaXQoL1xccy8pLmZpbHRlcihpZGVudGl0eSk7IH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGdldENsYXNzZXMgPSBmdW5jdGlvbiAoc3RhdGVMaXN0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdGF0ZUxpc3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAoZnVuY3Rpb24gKHgpIHsgcmV0dXJuIHguYWN0aXZlQ2xhc3M7IH0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKHNwbGl0Q2xhc3NlcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZWR1Y2UodW5uZXN0UiwgW10pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGFsbENsYXNzZXMgPSBnZXRDbGFzc2VzKHN0YXRlcykuY29uY2F0KHNwbGl0Q2xhc3NlcyhhY3RpdmVFcUNsYXNzKSkucmVkdWNlKHVuaXFSLCBbXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZ1enp5Q2xhc3NlcyA9IGdldENsYXNzZXMoc3RhdGVzLmZpbHRlcihmdW5jdGlvbiAoeCkgey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zIG9uIGAkcmVzb2x2ZWAgZGF0YS5cbiAgICAgKlxuICAgICAqICMjIyMgRXhhbXBsZTpcbiAgICAgKiBgYGBqc1xuICAgICAqICRzdGF0ZVByb3ZpZGVyLnN0YXRlKCdob21lJywge1xuICAgICAqICAgdGVtcGxhdGU6ICc8bXktY29tcG9uZW50IHVzZXI9XCIkcmVzb2x2ZS51c2VyXCI+PC9teS1jb21wb25lbnQ+JyxcbiAgICAgKiAgIHJlc29sdmU6IHtcbiAgICAgKiAgICAgdXNlcjogZnVuY3Rpb24oVXNlclNlcnZpY2UpIHsgcmV0dXJuIFVzZXJTZXJ2aWNlLmZldGNoVXNlcigpOyB9XG4gICAgICogICB9XG4gICAgICogfSk7XG4gICAgICogYGBgXG4gICAgICovXG4gICAgdmFyIHVpVmlldztcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcHJlZmVyLWNvbnN0XG4gICAgdWlWaWV3ID0gW1xuICAgICAgICAnJHZpZXcnLFxuICAgICAgICAnJGFuaW1hdGUnLFxuICAgICAgICAnJHVpVmlld1Njcm9sbCcsXG4gICAgICAgICckaW50ZXJwb2xhdGUnLFxuICAgICAgICAnJHEnLFxuICAgICAgICBmdW5jdGlvbiAkVmlld0RpcmVjdGl2ZSgkdmlldywgJGFuaW1hdGUsICR1aVZpZXdTY3JvbGwsICRpbnRlcnBvbGF0ZSwgJHEpIHtcbiAgICAgICAgICAgIGZ1bmN0aW9uIGdldFJlbmRlcmVyKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGVudGVyOiBmdW5jdGlvbiAoZWxlbWVudCwgdGFyZ2V0LCBjYikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5nLnZlcnNpb24ubWlub3IgPiAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJGFuaW1hdGUuZW50ZXIoZWxlbWVudCwgbnVsbCwgdGFyZ2V0KS50aGVuKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmVudGVyKGVsZW1lbnQsIG51bGwsIHRhcmdldCwgY2IpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBsZWF2ZTogZnVuY3Rpb24gKGVsZW1lbnQsIGNiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmcudmVyc2lvbi5taW5vciA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYW5pbWF0ZS5sZWF2ZShlbGVtZW50KS50aGVuKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICRhbmltYXRlLmxlYXZlKGVsZW1lbnQsIGNiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29uZmlnc0VxdWFsKGNvbmZpZzEsIGNvbmZpZzIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnMSA9PT0gY29uZmlnMjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByb290RGF0YSA9IHtcbiAgICAgICAgICAgICAgICAkY2ZnOiB7IHZpZXdEZWNsOiB7ICRjb250ZXh0OiAkdmlldy5fcGx1Z2luYXBpLl9yb290Vmlld0NvbnRleHQoKSB9IH0sXG4gICAgICAgICAgICAgICAgJHVpVmlldzoge30sXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIGRpcmVjdGl2ZSA9IHtcbiAgICAgICAgICAgICAgICBjb3VudDogMCxcbiAgICAgICAgICAgICAgICByZXN0cmljdDogJ0VDQScsXG4gICAgICAgICAgICAgICAgdGVybWluYWw6IHRydWUsXG4gICAgICAgICAgICAgICAgcHJpb3JpdHk6IDQwMCxcbiAgICAgICAgICAgICAgICB0cmFuc2NsdWRlOiAnZWxlbWVudCcsXG4gICAgICAgICAgICAgICAgY29tcGlsZTogZnVuY3Rpb24gKHRFbGVtZW50LCB0QXR0cnMsICR0cmFuc2NsdWRlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2NvcGUsICRlbGVtZW50LCBhdHRycykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG9ubG9hZEV4cCA9IGF0dHJzWydvbmxvYWQnXSB8fCAnJywgYXV0b1Njcm9sbEV4cCA9IGF0dHJzWydhdXRvc2Nyb2xsJ10sIHJlbmRlcmVyID0gZ2V0UmVuZGVyZXIoKSwgaW5oZXJpdGVkID0gJGVsZW1lbnQuaW5oZXJpdGVkRGF0YSgnJHVpVmlldycpIHx8IHJvb3REYXRhLCBuYW1lID0gJGludGVycG9sYXRlKGF0dHJzWyd1aVZpZXcnXSB8fCBhdHRyc1snbmFtZSddIHx8ICcnKShzY29wZSkgfHwgJyRkZWZhdWx0JztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwcmV2aW91c0VsLCBjdXJyZW50RWwsIGN1cnJlbnRTY29wZSwgdmlld0NvbmZpZztcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhY3RpdmVVSVZpZXcgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJHR5cGU6ICduZzEnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkaXJlY3RpdmUuY291bnQrKyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZxbjogaW5oZXJpdGVkLiR1aVZpZXcuZnFuID8gaW5oZXJpdGVkLiR1aVZpZXcuZnFuICsgJy4nICsgbmFtZSA6IG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZ1VwZGF0ZWQ6IGNvbmZpZ1VwZGF0ZWRDYWxsYmFjayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXQgY3JlYXRpb25Db250ZXh0KCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgY29udGV4dCBpbiB3aGljaCB0aGlzIHVpLXZpZXcgXCJ0YWdcIiB3YXMgY3JlYXRlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZnJvbVBhcmVudFRhZ0NvbmZpZyA9IHBhcnNlKCckY2ZnLnZpZXdEZWNsLiRjb250ZXh0JykoaW5oZXJpdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWxsb3cgPHVpLXZpZXcgbmFtZT1cImZvb1wiPjx1aS12aWV3IG5hbWU9XCJiYXJcIj48L3VpLXZpZXc+PC91aS12aWV3PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTZWUgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXItdWkvdWktcm91dGVyL2lzc3Vlcy8zMzU1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmcm9tUGFyZW50VGFnID0gcGFyc2UoJyR1aVZpZXcuY3JlYXRpb25Db250ZXh0JykoaW5oZXJpdGVkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZyb21QYXJlbnRUYWdDb25maWcgfHwgZnJvbVBhcmVudFRhZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RXZlbnQoJ0xpbmtpbmcnLCBhY3RpdmVVSVZpZXcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY29uZmlnVXBkYXRlZENhbGxiYWNrKGNvbmZpZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcgJiYgIShjb25maWcgaW5zdGFuY2VvZiBOZzFWaWV3Q29uZmlnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWdzRXF1YWwodmlld0NvbmZpZywgY29uZmlnKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3Q29uZmlnVXBkYXRlZChhY3RpdmVVSVZpZXcsIGNvbmZpZyAmJiBjb25maWcudmlld0RlY2wgJiYgY29uZmlnLnZpZXdEZWNsLiRjb250ZXh0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWV3Q29uZmlnID0gY29uZmlnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcoY29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50LmRhdGEoJyR1aVZpZXcnLCB7ICR1aVZpZXc6IGFjdGl2ZVVJVmlldyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVZpZXcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1bnJlZ2lzdGVyID0gJHZpZXcucmVnaXN0ZXJVSVZpZXcoYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlLiRvbignJGRlc3Ryb3knLCBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2UudHJhY2VVSVZpZXdFdmVudCgnRGVzdHJveWluZy9VbnJlZ2lzdGVyaW5nJywgYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnJlZ2lzdGVyKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNsZWFudXBMYXN0VmlldygpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJldmlvdXNFbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVVJVmlld0V2ZW50KCdSZW1vdmluZyAocHJldmlvdXMpIGVsJywgcHJldmlvdXNFbC5kYXRhKCckdWlWaWV3JykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c0VsLnJlbW92ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2aW91c0VsID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRTY29wZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFjZS50cmFjZVVJVmlld0V2ZW50KCdEZXN0cm95aW5nIHNjb3BlJywgYWN0aXZlVUlWaWV3KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLiRkZXN0cm95KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50RWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF92aWV3RGF0YV8xID0gY3VycmVudEVsLmRhdGEoJyR1aVZpZXdBbmltJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RXZlbnQoJ0FuaW1hdGUgb3V0JywgX3ZpZXdEYXRhXzEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJlci5sZWF2ZShjdXJyZW50RWwsIGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF92aWV3RGF0YV8xLiQkYW5pbUxlYXZlLnJlc29sdmUoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZpb3VzRWwgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldmlvdXNFbCA9IGN1cnJlbnRFbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudEVsID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB1cGRhdGVWaWV3KGNvbmZpZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuZXdTY29wZSA9IHNjb3BlLiRuZXcoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYW5pbUVudGVyID0gJHEuZGVmZXIoKSwgYW5pbUxlYXZlID0gJHEuZGVmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgJHVpVmlld0RhdGEgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRjZmc6IGNvbmZpZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHVpVmlldzogYWN0aXZlVUlWaWV3LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICR1aVZpZXdBbmltID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkYW5pbUVudGVyOiBhbmltRW50ZXIucHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGFuaW1MZWF2ZTogYW5pbUxlYXZlLnByb21pc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQkYW5pbUxlYXZlOiBhbmltTGVhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmdkb2MgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmFtZSB1aS5yb3V0ZXIuc3RhdGUuZGlyZWN0aXZlOnVpLXZpZXcjJHZpZXdDb250ZW50TG9hZGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBldmVudE9mIHVpLnJvdXRlci5zdGF0ZS5kaXJlY3RpdmU6dWktdmlld1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBldmVudFR5cGUgZW1pdHMgb24gdWktdmlldyBkaXJlY3RpdmUgc2NvcGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAZGVzY3JpcHRpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEZpcmVkIG9uY2UgdGhlIHZpZXcgKipiZWdpbnMgbG9hZGluZyoqLCAqYmVmb3JlKiB0aGUgRE9NIGlzIHJlbmRlcmVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IEV2ZW50IG9iamVjdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gdmlld05hbWUgTmFtZSBvZiB0aGUgdmlldy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdTY29wZS4kZW1pdCgnJHZpZXdDb250ZW50TG9hZGluZycsIG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjbG9uZWQgPSAkdHJhbnNjbHVkZShuZXdTY29wZSwgZnVuY3Rpb24gKGNsb25lKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb25lLmRhdGEoJyR1aVZpZXdBbmltJywgJHVpVmlld0FuaW0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9uZS5kYXRhKCckdWlWaWV3JywgJHVpVmlld0RhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW5kZXJlci5lbnRlcihjbG9uZSwgJGVsZW1lbnQsIGZ1bmN0aW9uIG9uVUlWaWV3RW50ZXIoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltRW50ZXIucmVzb2x2ZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRTY29wZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGVtaXQoJyR2aWV3Q29udGVudEFuaW1hdGlvbkVuZGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGlzRGVmaW5lZChhdXRvU2Nyb2xsRXhwKSAmJiAhYXV0b1Njcm9sbEV4cCkgfHwgc2NvcGUuJGV2YWwoYXV0b1Njcm9sbEV4cCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdWlWaWV3U2Nyb2xsKGNsb25lKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFudXBMYXN0VmlldygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRFbCA9IGNsb25lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUgPSBuZXdTY29wZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmdkb2MgZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBAbmFtZSB1aS5yb3V0ZXIuc3RhdGUuZGlyZWN0aXZlOnVpLXZpZXcjJHZpZXdDb250ZW50TG9hZGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQGV2ZW50T2YgdWkucm91dGVyLnN0YXRlLmRpcmVjdGl2ZTp1aS12aWV3XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQGV2ZW50VHlwZSBlbWl0cyBvbiB1aS12aWV3IGRpcmVjdGl2ZSBzY29wZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEBkZXNjcmlwdGlvbiAgICAgICAgICAgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIEZpcmVkIG9uY2UgdGhlIHZpZXcgaXMgKipsb2FkZWQqKiwgKmFmdGVyKiB0aGUgRE9NIGlzIHJlbmRlcmVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICogQHBhcmFtIHtPYmplY3R9IGV2ZW50IEV2ZW50IG9iamVjdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGVtaXQoJyR2aWV3Q29udGVudExvYWRlZCcsIGNvbmZpZyB8fCB2aWV3Q29uZmlnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuJGV2YWwob25sb2FkRXhwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIHJldHVybiBkaXJlY3RpdmU7XG4gICAgICAgIH0sXG4gICAgXTtcbiAgICAkVmlld0RpcmVjdGl2ZUZpbGwuJGluamVjdCA9IFsnJGNvbXBpbGUnLCAnJGNvbnRyb2xsZXInLCAnJHRyYW5zaXRpb25zJywgJyR2aWV3JywgJyRxJ107XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICBmdW5jdGlvbiAkVmlld0RpcmVjdGl2ZUZpbGwoJGNvbXBpbGUsICRjb250cm9sbGVyLCAkdHJhbnNpdGlvbnMsICR2aWV3LCAkcSkge1xuICAgICAgICB2YXIgZ2V0Q29udHJvbGxlckFzID0gcGFyc2UoJ3ZpZXdEZWNsLmNvbnRyb2xsZXJBcycpO1xuICAgICAgICB2YXIgZ2V0UmVzb2x2ZUFzID0gcGFyc2UoJ3ZpZXdEZWNsLnJlc29sdmVBcycpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcmVzdHJpY3Q6ICdFQ0EnLFxuICAgICAgICAgICAgcHJpb3JpdHk6IC00MDAsXG4gICAgICAgICAgICBjb21waWxlOiBmdW5jdGlvbiAodEVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgaW5pdGlhbCA9IHRFbGVtZW50Lmh0bWwoKTtcbiAgICAgICAgICAgICAgICB0RWxlbWVudC5lbXB0eSgpO1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc2NvcGUsICRlbGVtZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gJGVsZW1lbnQuZGF0YSgnJHVpVmlldycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50Lmh0bWwoaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkY29tcGlsZSgkZWxlbWVudC5jb250ZW50cygpKShzY29wZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdmFyIGNmZyA9IGRhdGEuJGNmZyB8fCB7IHZpZXdEZWNsOiB7fSwgZ2V0VGVtcGxhdGU6IG5vb3AgfTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVDdHggPSBjZmcucGF0aCAmJiBuZXcgUmVzb2x2ZUNvbnRleHQoY2ZnLnBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5odG1sKGNmZy5nZXRUZW1wbGF0ZSgkZWxlbWVudCwgcmVzb2x2ZUN0eCkgfHwgaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgICAgIHRyYWNlLnRyYWNlVUlWaWV3RmlsbChkYXRhLiR1aVZpZXcsICRlbGVtZW50Lmh0bWwoKSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gJGNvbXBpbGUoJGVsZW1lbnQuY29udGVudHMoKSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb250cm9sbGVyID0gY2ZnLmNvbnRyb2xsZXI7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb250cm9sbGVyQXMgPSBnZXRDb250cm9sbGVyQXMoY2ZnKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc29sdmVBcyA9IGdldFJlc29sdmVBcyhjZmcpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgbG9jYWxzID0gcmVzb2x2ZUN0eCAmJiBnZXRMb2NhbHMocmVzb2x2ZUN0eCk7XG4gICAgICAgICAgICAgICAgICAgIHNjb3BlW3Jlc29sdmVBc10gPSBsb2NhbHM7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cm9sbGVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29udHJvbGxlckluc3RhbmNlID0gKCRjb250cm9sbGVyKGNvbnRyb2xsZXIsIGV4dGVuZCh7fSwgbG9jYWxzLCB7ICRzY29wZTogc2NvcGUsICRlbGVtZW50OiAkZWxlbWVudCB9KSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRyb2xsZXJBcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb3BlW2NvbnRyb2xsZXJBc10gPSBjb250cm9sbGVySW5zdGFuY2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvcGVbY29udHJvbGxlckFzXVtyZXNvbHZlQXNdID0gbG9jYWxzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVE9ETzogVXNlICR2aWV3IHNlcnZpY2UgYXMgYSBjZW50cmFsIHBvaW50IGZvciByZWdpc3RlcmluZyBjb21wb25lbnQtbGV2ZWwgaG9va3NcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZW4sIHdoZW4gYSBjb21wb25lbnQgaXMgY3JlYXRlZCwgdGVsbCB0aGUgJHZpZXcgc2VydmljZSwgc28gaXQgY2FuIGludm9rZSBob29rc1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gJHZpZXcuY29tcG9uZW50TG9hZGVkKGNvbnRyb2xsZXJJbnN0YW5jZSwgeyAkc2NvcGU6IHNjb3BlLCAkZWxlbWVudDogJGVsZW1lbnQgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzY29wZS4kb24oJyRkZXN0cm95JywgKCkgPT4gJHZpZXcuY29tcG9uZW50VW5sb2FkZWQoY29udHJvbGxlckluc3RhbmNlLCB7ICRzY29wZTogc2NvcGUsICRlbGVtZW50OiAkZWxlbWVudCB9KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5kYXRhKCckbmdDb250cm9sbGVyQ29udHJvbGxlcicsIGNvbnRyb2xsZXJJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAkZWxlbWVudC5jaGlsZHJlbigpLmRhdGEoJyRuZ0NvbnRyb2xsZXJDb250cm9sbGVyJywgY29udHJvbGxlckluc3RhbmNlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyQ29udHJvbGxlckNhbGxiYWNrcygkcSwgJHRyYW5zaXRpb25zLCBjb250cm9sbGVySW5zdGFuY2UsIHNjb3BlLCBjZmcpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIFdhaXQgZm9yIHRoZSBjb21wb25lbnQgdG8gYXBwZWFyIGluIHRoZSBET01cbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzU3RyaW5nKGNmZy5jb21wb25lbnQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIga2Vib2JOYW1lID0ga2Vib2JTdHJpbmcoY2ZnLmNvbXBvbmVudCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGFnUmVnZXhwXzEgPSBuZXcgUmVnRXhwKFwiXih4LXxkYXRhLSk/XCIgKyBrZWJvYk5hbWUgKyBcIiRcIiwgJ2knKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBnZXRDb21wb25lbnRDb250cm9sbGVyID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkaXJlY3RpdmVFbCA9IFtdLnNsaWNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jYWxsKCRlbGVtZW50WzBdLmNoaWxkcmVuKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmlsdGVyKGZ1bmN0aW9uIChlbCkgeyByZXR1cm4gZWwgJiYgZWwudGFnTmFtZSAmJiB0YWdSZWdleHBfMS5leGVjKGVsLnRhZ05hbWUpOyB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGlyZWN0aXZlRWwgJiYgbmcuZWxlbWVudChkaXJlY3RpdmVFbCkuZGF0YShcIiRcIiArIGNmZy5jb21wb25lbnQgKyBcIkNvbnRyb2xsZXJcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRlcmVnaXN0ZXJXYXRjaF8xID0gc2NvcGUuJHdhdGNoKGdldENvbXBvbmVudENvbnRyb2xsZXIsIGZ1bmN0aW9uIChjdHJsSW5zdGFuY2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWN0cmxJbnN0YW5jZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ2lzdGVyQ29udHJvbGxlckNhbGxiYWNrcygkcSwgJHRyYW5zaXRpb25zLCBjdHJsSW5zdGFuY2UsIHNjb3BlLCBjZmcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcmVnaXN0ZXJXYXRjaF8xKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsaW5rKHNjb3BlKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqIEBoaWRkZW4gKi9cbiAgICB2YXIgaGFzQ29tcG9uZW50SW1wbCA9IHR5cGVvZiBuZy5tb2R1bGUoJ3VpLnJvdXRlcicpWydjb21wb25lbnQnXSA9PT0gJ2Z1bmN0aW9uJztcbiAgICAvKiogQGhpZGRlbiBpbmNyZW1lbnRpbmcgaWQgKi9cbiAgICB2YXIgX3VpQ2FuRXhpdElkID0gMDtcbiAgICAvKiogQGhpZGRlbiBUT0RPOiBtb3ZlIHRoZXNlIGNhbGxiYWNrcyB0byAkdmlldyBhbmQvb3IgYC9ob29rcy9jb21wb25lbnRzLnRzY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5jaG9yU2Nyb2xsID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdXNlQW5jaG9yU2Nyb2xsID0gdHJ1ZTtcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy4kZ2V0ID0gW1xuICAgICAgICAgICAgJyRhbmNob3JTY3JvbGwnLFxuICAgICAgICAgICAgJyR0aW1lb3V0JyxcbiAgICAgICAgICAgIGZ1bmN0aW9uICgkYW5jaG9yU2Nyb2xsLCAkdGltZW91dCkge1xuICAgICAgICAgICAgICAgIGlmICh1c2VBbmNob3JTY3JvbGwpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRhbmNob3JTY3JvbGw7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoJGVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICR0aW1lb3V0KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICRlbGVtZW50WzBdLnNjcm9sbEludG9WaWV3KCk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDAsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgXTtcbiAgICB9XG4gICAgbmcubW9kdWxlKCd1aS5yb3V0ZXIuc3RhdGUnKS5wcm92aWRlcignJHVpVmlld1Njcm9sbCcsICRWaWV3U2Nyb2xsUHJvdmlkZXIpO1xuXG4gICAgLyoqXG4gICAgICogTWFpbiBlbnRyeSBwb2ludCBmb3IgYW5ndWxhciAxLnggYnVpbGRcbiAgICAgKiBAcHVibGljYXBpIEBtb2R1bGUgbmcxXG4gICAgICovIC8qKiAqL1xuICAgIHZhciBpbmRleCQxID0gJ3VpLnJvdXRlcic7XG5cbiAgICBleHBvcnRzLiRpbmplY3RvciA9ICRpbmplY3RvcjtcbiAgICBleHBvcnRzLiRxID0gJHE7XG4gICAgZXhwb3J0cy5CYXNlTG9jYXRpb25TZ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W50UmVqZWN0aW9uO1xuICAgIGV4cG9ydHMuc3BsaXRFcXVhbCA9IHNwbGl0RXF1YWw7XG4gICAgZXhwb3J0cy5zcGxpdEhhc2ggPSBzcGxpdEhhc2g7XG4gICAgZXhwb3J0cy5zcGxpdE9uRGVsaW0gPSBzcGxpdE9uRGVsaW07XG4gICAgZXhwb3J0cy5zcGxpdFF1ZXJ5ID0gc3BsaXRRdWVyeTtcbiAgICBleHBvcnRzLnN0cmluZ2lmeSA9IHN0cmluZ2lmeTtcbiAgICBleHBvcnRzLnN0cmlwTGFzdFBhdGhFbGVtZW50ID0gc3RyaXBMYXN0UGF0aEVsZW1lbnQ7XG4gICAgZXhwb3J0cy50YWlsID0gdGFpbDtcbiAgICBleHBvcnRzLnRvSnNvbiA9IHRvSnNvbjtcbiAgICBleHBvcnRzLnRyYWNlID0gdHJhY2U7XG4gICAgZXhwb3J0cy50cmltSGFzaFZhbCA9IHRyaW1IYXNoVmFsO1xuICAgIGV4cG9ydHMudW5pcVIgPSB1bmlxUjtcbiAgICBleHBvcnRzLnVubmVzdCA9IHVubmVzdDtcbiAgICBleHBvcnRzLnVubmVzdFIgPSB1bm5lc3RSO1xuICAgIGV4cG9ydHMudmFsID0gdmFsO1xuICAgIGV4cG9ydHMudmFsdWVzID0gdmFsdWVzO1xuICAgIGV4cG9ydHMud2F0Y2hEaWdlc3RzID0gd2F0Y2hEaWdlc3RzO1xuXG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICdfX2VzTW9kdWxlJywgeyB2YWx1ZTogdHJ1ZSB9KTtcblxufSkpKTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWFuZ3VsYXItdWktcm91dGVyLmpzLm1hcFxuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../@uirouter+angularjs@1.0.30/node_modules/@uirouter/angularjs/release/angular-ui-router.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/index.js": -/*!************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/index.js ***! - \************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -eval("module.exports = __webpack_require__(/*! ./lib/axios */ \"../../../../axios@0.21.4/node_modules/axios/lib/axios.js\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9pbmRleC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBQSxtSEFBdUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvaW5kZXguanM/MWE5MCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoJy4vbGliL2F4aW9zJyk7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/index.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js": -/*!***********************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js ***! - \***********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar settle = __webpack_require__(/*! ./../core/settle */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js\");\nvar cookies = __webpack_require__(/*! ./../helpers/cookies */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js\");\nvar buildURL = __webpack_require__(/*! ./../helpers/buildURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\");\nvar buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js\");\nvar parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js\");\nvar isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js\");\nvar createError = __webpack_require__(/*! ../core/createError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\");\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n var responseType = config.responseType;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n var fullPath = buildFullPath(config.baseURL, config.url);\n request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n var response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(createError('Request aborted', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(createError(\n timeoutErrorMessage,\n config,\n config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?\n cookies.read(config.xsrfCookieName) :\n undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (!requestData) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvYWRhcHRlcnMveGhyLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyw0RUFBWTtBQUNoQyxhQUFhLG1CQUFPLENBQUMsd0ZBQWtCO0FBQ3ZDLGNBQWMsbUJBQU8sQ0FBQyxnR0FBc0I7QUFDNUMsZUFBZSxtQkFBTyxDQUFDLGtHQUF1QjtBQUM5QyxvQkFBb0IsbUJBQU8sQ0FBQyxvR0FBdUI7QUFDbkQsbUJBQW1CLG1CQUFPLENBQUMsMEdBQTJCO0FBQ3RELHNCQUFzQixtQkFBTyxDQUFDLGdIQUE4QjtBQUM1RCxrQkFBa0IsbUJBQU8sQ0FBQyxnR0FBcUI7O0FBRS9DO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSw2Q0FBNkM7QUFDN0M7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFD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XG5cbiAgICAvLyBOb3QgYWxsIGJyb3dzZXJzIHN1cHBvcnQgdXBsb2FkIGV2ZW50c1xuICAgIGlmICh0eXBlb2YgY29uZmlnLm9uVXBsb2FkUHJvZ3Jlc3MgPT09ICdmdW5jdGlvbicgJiYgcmVxdWVzdC51cGxvYWQpIHtcbiAgICAgIHJlcXVlc3QudXBsb2FkLmFkZEV2ZW50TGlzdGVuZXIoJ3Byb2dyZXNzJywgY29uZmlnLm9uVXBsb2FkUHJvZ3Jlc3MpO1xuICAgIH1cblxuICAgIGlmIChjb25maWcuY2FuY2VsVG9rZW4pIHtcbiAgICAgIC8vIEhhbmRsZSBjYW5jZWxsYXRpb25cbiAgICAgIGNvbmZpZy5jYW5jZWxUb2tlbi5wcm9taXNlLnRoZW4oZnVuY3Rpb24gb25DYW5jZWxlZChjYW5jZWwpIHtcbiAgICAgICAgaWYgKCFyZXF1ZXN0KSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG5cbiAgICAgICAgcmVxdWVzdC5hYm9ydCgpO1xuICAgICAgICByZWplY3QoY2FuY2VsKTtcbiAgICAgICAgLy8gQ2xlYW4gdXAgcmVxdWVzdFxuICAgICAgICByZXF1ZXN0ID0gbnVsbDtcbiAgICAgIH0pO1xuICAgIH1cblxuICAgIGlmICghcmVxdWVzdERhdGEpIHtcbiAgICAgIHJlcXVlc3REYXRhID0gbnVsbDtcbiAgICB9XG5cbiAgICAvLyBTZW5kIHRoZSByZXF1ZXN0XG4gICAgcmVxdWVzdC5zZW5kKHJlcXVlc3REYXRhKTtcbiAgfSk7XG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/axios.js": -/*!****************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/axios.js ***! - \****************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\");\nvar Axios = __webpack_require__(/*! ./core/Axios */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js\");\nvar mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\");\nvar defaults = __webpack_require__(/*! ./defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(mergeConfig(axios.defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\");\naxios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js\");\naxios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\");\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(/*! ./helpers/spread */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js\");\n\n// Expose isAxiosError\naxios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js\");\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports[\"default\"] = axios;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvYXhpb3MuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsWUFBWSxtQkFBTyxDQUFDLHlFQUFTO0FBQzdCLFdBQVcsbUJBQU8sQ0FBQyx1RkFBZ0I7QUFDbkMsWUFBWSxtQkFBTyxDQUFDLG1GQUFjO0FBQ2xDLGtCQUFrQixtQkFBTyxDQUFDLCtGQUFvQjtBQUM5QyxlQUFlLG1CQUFPLENBQUMsK0VBQVk7O0FBRW5DO0FBQ0E7QUFDQTtBQUNBLFdBQVcsUUFBUTtBQUNuQixZQUFZLE9BQU87QUFDbkI7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsZUFBZSxtQkFBTyxDQUFDLHlGQUFpQjtBQUN4QyxvQkFBb0IsbUJBQU8sQ0FBQyxtR0FBc0I7QUFDbEQsaUJBQWlCLG1CQUFPLENBQUMsNkZBQW1COztBQUU1QztBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWUsbUJBQU8sQ0FBQywyRkFBa0I7O0FBRXpDO0FBQ0EscUJBQXFCLG1CQUFPLENBQUMsdUdBQXdCOztBQUVyRDs7QUFFQTtBQUNBLHlCQUFzQiIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi4vLi4vLi4vL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S5leHBvcnRzLmRlZmF1bHQgPSBheGlvcztcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/axios.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js": -/*!************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js ***! - \************************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY2FuY2VsL0NhbmNlbC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsU0FBUztBQUNwQjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7O0FBRUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NhbmNlbC9DYW5jZWwuanM/Mjg3NSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogQSBgQ2FuY2VsYCBpcyBhbiBvYmplY3QgdGhhdCBpcyB0aHJvd24gd2hlbiBhbiBvcGVyYXRpb24gaXMgY2FuY2VsZWQuXG4gKlxuICogQGNsYXNzXG4gKiBAcGFyYW0ge3N0cmluZz19IG1lc3NhZ2UgVGhlIG1lc3NhZ2UuXG4gKi9cbmZ1bmN0aW9uIENhbmNlbChtZXNzYWdlKSB7XG4gIHRoaXMubWVzc2FnZSA9IG1lc3NhZ2U7XG59XG5cbkNhbmNlbC5wcm90b3R5cGUudG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgcmV0dXJuICdDYW5jZWwnICsgKHRoaXMubWVzc2FnZSA/ICc6ICcgKyB0aGlzLm1lc3NhZ2UgOiAnJyk7XG59O1xuXG5DYW5jZWwucHJvdG90eXBlLl9fQ0FOQ0VMX18gPSB0cnVlO1xuXG5tb2R1bGUuZXhwb3J0cyA9IENhbmNlbDtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js": -/*!*****************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js ***! - \*****************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar Cancel = __webpack_require__(/*! ./Cancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/Cancel.js\");\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY2FuY2VsL0NhbmNlbFRva2VuLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLGFBQWEsbUJBQU8sQ0FBQyxrRkFBVTs7QUFFL0I7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLFVBQVU7QUFDckI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxHQUFHOztBQUVIO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0EsR0FBRztBQUNIOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jYW5jZWwvQ2FuY2VsVG9rZW4uanM/M2U5ZiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBDYW5jZWwgPSByZXF1aXJlKCcuL0NhbmNlbCcpO1x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HJvd0lmUmVxdWVzdGVkKCkge1xuICBpZiAodGhpcy5yZWFzb24pIHtcbiAgICB0aHJvdyB0aGlzLnJlYXNvbjtcbiAgfVxufTtcblxuLyoqXG4gKiBSZXR1cm5zIGFuIG9iamVjdCB0aGF0IGNvbnRhaW5zIGEgbmV3IGBDYW5jZWxUb2tlbmAgYW5kIGEgZnVuY3Rpb24gdGhhdCwgd2hlbiBjYWxsZWQsXG4gKiBjYW5jZWxzIHRoZSBgQ2FuY2VsVG9rZW5gLlxuICovXG5DYW5jZWxUb2tlbi5zb3VyY2UgPSBmdW5jdGlvbiBzb3VyY2UoKSB7XG4gIHZhciBjYW5jZWw7XG4gIHZhciB0b2tlbiA9IG5ldyBDYW5jZWxUb2tlbihmdW5jdGlvbiBleGVjdXRvcihjKSB7XG4gICAgY2FuY2VsID0gYztcbiAgfSk7XG4gIHJldHVybiB7XG4gICAgdG9rZW46IHRva2VuLFxuICAgIGNhbmNlbDogY2FuY2VsXG4gIH07XG59O1xuXG5tb2R1bGUuZXhwb3J0cyA9IENhbmNlbFRva2VuO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/CancelToken.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js": -/*!**************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js ***! - \**************************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY2FuY2VsL2lzQ2FuY2VsLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY2FuY2VsL2lzQ2FuY2VsLmpzP2UwNTYiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQ2FuY2VsKHZhbHVlKSB7XG4gIHJldHVybiAhISh2YWx1ZSAmJiB2YWx1ZS5fX0NBTkNFTF9fKTtcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js": -/*!*********************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js ***! - \*********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar buildURL = __webpack_require__(/*! ../helpers/buildURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\");\nvar InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js\");\nvar dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js\");\nvar mergeConfig = __webpack_require__(/*! ./mergeConfig */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\");\nvar validator = __webpack_require__(/*! ../helpers/validator */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js\");\n\nvar validators = validator.validators;\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n var transitional = config.transitional;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),\n clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')\n }, false);\n }\n\n // filter out skipped interceptors\n var requestInterceptorChain = [];\n var synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n var responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n var promise;\n\n if (!synchronousRequestInterceptors) {\n var chain = [dispatchRequest, undefined];\n\n Array.prototype.unshift.apply(chain, requestInterceptorChain);\n chain = chain.concat(responseInterceptorChain);\n\n promise = Promise.resolve(config);\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n }\n\n\n var newConfig = config;\n while (requestInterceptorChain.length) {\n var onFulfilled = requestInterceptorChain.shift();\n var onRejected = requestInterceptorChain.shift();\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected(error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest(newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n while (responseInterceptorChain.length) {\n promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9BeGlvcy5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsNEVBQVk7QUFDaEMsZUFBZSxtQkFBTyxDQUFDLGdHQUFxQjtBQUM1Qyx5QkFBeUIsbUJBQU8sQ0FBQyx3R0FBc0I7QUFDdkQsc0JBQXNCLG1CQUFPLENBQUMsa0dBQW1CO0FBQ2pELGtCQUFrQixtQkFBTyxDQUFDLDBGQUFlO0FBQ3pDLGdCQUFnQixtQkFBTyxDQUFDLGtHQUFzQjs7QUFFOUM7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFX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AgICAgIGRhdGE6IChjb25maWcgfHwge30pLmRhdGFcbiAgICB9KSk7XG4gIH07XG59KTtcblxudXRpbHMuZm9yRWFjaChbJ3Bvc3QnLCAncHV0JywgJ3BhdGNoJ10sIGZ1bmN0aW9uIGZvckVhY2hNZXRob2RXaXRoRGF0YShtZXRob2QpIHtcbiAgLyplc2xpbnQgZnVuYy1uYW1lczowKi9cbiAgQXhpb3MucHJvdG90eXBlW21ldGhvZF0gPSBmdW5jdGlvbih1cmwsIGRhdGEsIGNvbmZpZykge1xuICAgIHJldHVybiB0aGlzLnJlcXVlc3QobWVyZ2VDb25maWcoY29uZmlnIHx8IHt9LCB7XG4gICAgICBtZXRob2Q6IG1ldGhvZCxcbiAgICAgIHVybDogdXJsLFxuICAgICAgZGF0YTogZGF0YVxuICAgIH0pKTtcbiAgfTtcbn0pO1xuXG5tb2R1bGUuZXhwb3J0cyA9IEF4aW9zO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/Axios.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js": -/*!**********************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js ***! - \**********************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9JbnRlcmNlcHRvck1hbmFnZXIuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsWUFBWSxtQkFBTyxDQUFDLDRFQUFZOztBQUVoQztBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxVQUFVO0FBQ3JCLFdBQVcsVUFBVTtBQUNyQjtBQUNBLFlBQVksUUFBUTtBQUNwQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsUUFBUTtBQUNuQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxVQUFVO0FBQ3JCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEdBQUc7QUFDSDs7QUFFQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi4vLi4vLi4vLi4vYXhpb3N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ZnJvbSB0aGUgc3RhY2tcbiAqXG4gKiBAcGFyYW0ge051bWJlcn0gaWQgVGhlIElEIHRoYXQgd2FzIHJldHVybmVkIGJ5IGB1c2VgXG4gKi9cbkludGVyY2VwdG9yTWFuYWdlci5wcm90b3R5cGUuZWplY3QgPSBmdW5jdGlvbiBlamVjdChpZCkge1xuICBpZiAodGhpcy5oYW5kbGVyc1tpZF0pIHtcbiAgICB0aGlzLmhhbmRsZXJzW2lkXSA9IG51bGw7XG4gIH1cbn07XG5cbi8qKlxuICogSXRlcmF0ZSBvdmVyIGFsbCB0aGUgcmVnaXN0ZXJlZCBpbnRlcmNlcHRvcnNcbiAqXG4gKiBUaGlzIG1ldGhvZCBpcyBwYXJ0aWN1bGFybHkgdXNlZnVsIGZvciBza2lwcGluZyBvdmVyIGFueVxuICogaW50ZXJjZXB0b3JzIHRoYXQgbWF5IGhhdmUgYmVjb21lIGBudWxsYCBjYWxsaW5nIGBlamVjdGAuXG4gKlxuICogQHBhcmFtIHtGdW5jdGlvbn0gZm4gVGhlIGZ1bmN0aW9uIHRvIGNhbGwgZm9yIGVhY2ggaW50ZXJjZXB0b3JcbiAqL1xuSW50ZXJjZXB0b3JNYW5hZ2VyLnByb3RvdHlwZS5mb3JFYWNoID0gZnVuY3Rpb24gZm9yRWFjaChmbikge1xuICB1dGlscy5mb3JFYWNoKHRoaXMuaGFuZGxlcnMsIGZ1bmN0aW9uIGZvckVhY2hIYW5kbGVyKGgpIHtcbiAgICBpZiAoaCAhPT0gbnVsbCkge1xuICAgICAgZm4oaCk7XG4gICAgfVxuICB9KTtcbn07XG5cbm1vZHVsZS5leHBvcnRzID0gSW50ZXJjZXB0b3JNYW5hZ2VyO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/InterceptorManager.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js": -/*!*****************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js ***! - \*****************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js\");\nvar combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js\");\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n * @returns {string} The combined full path\n */\nmodule.exports = function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9idWlsZEZ1bGxQYXRoLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLG9CQUFvQixtQkFBTyxDQUFDLDBHQUEwQjtBQUN0RCxrQkFBa0IsbUJBQU8sQ0FBQyxzR0FBd0I7O0FBRWxEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkIsV0FBVyxRQUFRO0FBQ25CLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9sa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OiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/buildFullPath.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js": -/*!***************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js ***! - \***************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar enhanceError = __webpack_require__(/*! ./enhanceError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\");\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9jcmVhdGVFcnJvci5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixtQkFBbUIsbUJBQU8sQ0FBQyw0RkFBZ0I7O0FBRTNDO0FBQ0E7QUFDQTtBQUNBLFdBQVcsUUFBUTtBQUNuQixXQUFXLFFBQVE7QUFDbkIsV0FBVyxRQUFRO0FBQ25CLFdBQVcsUUFBUTtBQUNuQixXQUFXLFFBQVE7QUFDbkIsYUFBYSxPQUFPO0FBQ3BCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2NvcmUvY3JlYXRlRXJyb3IuanM/MGJkMiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciBlbmhhbmNlRXJyb3IgPSByZXF1aXJlKCcuL2VuaGFuY2VFcnJvcicpO1xuXG4vKipcbiAqIENyZWF0ZSBhbiBFcnJvciB3aXRoIHRoZSBzcGVjaWZpZWQgbWVzc2FnZSwgY29uZmlnLCBlcnJvciBjb2RlLCByZXF1ZXN0IGFuZCByZXNwb25zZS5cbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gbWVzc2FnZSBUaGUgZXJyb3IgbWVzc2FnZS5cbiAqIEBwYXJhbSB7T2JqZWN0fSBjb25maWcgVGhlIGNvbmZpZy5cbiAqIEBwYXJhbSB7c3RyaW5nfSBbY29kZV0gVGhlIGVycm9yIGNvZGUgKGZvciBleGFtcGxlLCAnRUNPTk5BQk9SVEVEJykuXG4gKiBAcGFyYW0ge09iamVjdH0gW3JlcXVlc3RdIFRoZSByZXF1ZXN0LlxuICogQHBhcmFtIHtPYmplY3R9IFtyZXNwb25zZV0gVGhlIHJlc3BvbnNlLlxuICogQHJldHVybnMge0Vycm9yfSBUaGUgY3JlYXRlZCBlcnJvci5cbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjcmVhdGVFcnJvcihtZXNzYWdlLCBjb25maWcsIGNvZGUsIHJlcXVlc3QsIHJlc3BvbnNlKSB7XG4gIHZhciBlcnJvciA9IG5ldyBFcnJvcihtZXNzYWdlKTtcbiAgcmV0dXJuIGVuaGFuY2VFcnJvcihlcnJvciwgY29uZmlnLCBjb2RlLCByZXF1ZXN0LCByZXNwb25zZSk7XG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js": -/*!*******************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js ***! - \*******************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar transformData = __webpack_require__(/*! ./transformData */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js\");\nvar isCancel = __webpack_require__(/*! ../cancel/isCancel */ \"../../../../axios@0.21.4/node_modules/axios/lib/cancel/isCancel.js\");\nvar defaults = __webpack_require__(/*! ../defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.data,\n config.headers,\n config.transformRequest\n );\n\n // Flatten headers\n config.headers = utils.merge(\n config.headers.common || {},\n config.headers[config.method] || {},\n config.headers\n );\n\n utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n function cleanHeaderConfig(method) {\n delete config.headers[method];\n }\n );\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n response.data,\n response.headers,\n config.transformResponse\n );\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n reason.response.data,\n reason.response.headers,\n config.transformResponse\n );\n }\n }\n\n return Promise.reject(reason);\n });\n};\n//# sour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lc3BvbnNlO1xuICB9LCBmdW5jdGlvbiBvbkFkYXB0ZXJSZWplY3Rpb24ocmVhc29uKSB7XG4gICAgaWYgKCFpc0NhbmNlbChyZWFzb24pKSB7XG4gICAgICB0aHJvd0lmQ2FuY2VsbGF0aW9uUmVxdWVzdGVkKGNvbmZpZyk7XG5cbiAgICAgIC8vIFRyYW5zZm9ybSByZXNwb25zZSBkYXRhXG4gICAgICBpZiAocmVhc29uICYmIHJlYXNvbi5yZXNwb25zZSkge1xuICAgICAgICByZWFzb24ucmVzcG9uc2UuZGF0YSA9IHRyYW5zZm9ybURhdGEuY2FsbChcbiAgICAgICAgICBjb25maWcsXG4gICAgICAgICAgcmVhc29uLnJlc3BvbnNlLmRhdGEsXG4gICAgICAgICAgcmVhc29uLnJlc3BvbnNlLmhlYWRlcnMsXG4gICAgICAgICAgY29uZmlnLnRyYW5zZm9ybVJlc3BvbnNlXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgcmV0dXJuIFByb21pc2UucmVqZWN0KHJlYXNvbik7XG4gIH0pO1xufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/dispatchRequest.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js": -/*!****************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js ***! - \****************************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n\n error.request = request;\n error.response = response;\n error.isAxiosError = true;\n\n error.toJSON = function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: this.config,\n code: this.code\n };\n };\n return error;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9lbmhhbmNlRXJyb3IuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWI7QUFDQTtBQUNBO0FBQ0EsV0FBVyxPQUFPO0FBQ2xCLFdBQVcsUUFBUTtBQUNuQixXQUFXLFFBQVE7QUFDbkIsV0FBVyxRQUFRO0FBQ25CLFdBQVcsUUFBUTtBQUNuQixhQUFhLE9BQU87QUFDcEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9jb3JlL2VuaGFuY2VFcnJvci5qcz82ZTkwIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBVcGRhdGUgYW4gRXJyb3Igd2l0aCB0aGUgc3BlY2lmaWVkIGNvbmZpZywgZXJyb3IgY29kZSwgYW5kIHJlc3BvbnNlLlxuICpcbiAqIEBwYXJhbSB7RXJyb3J9IGVycm9yIFRoZS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aGlzLmNvbHVtbk51bWJlcixcbiAgICAgIHN0YWNrOiB0aGlzLnN0YWNrLFxuICAgICAgLy8gQXhpb3NcbiAgICAgIGNvbmZpZzogdGhpcy5jb25maWcsXG4gICAgICBjb2RlOiB0aGlzLmNvZGVcbiAgICB9O1xuICB9O1xuICByZXR1cm4gZXJyb3I7XG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js": -/*!***************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js ***! - \***************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n * @returns {Object} New object resulting from merging config2 to config1\n */\nmodule.exports = function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n var config = {};\n\n var valueFromConfig2Keys = ['url', 'method', 'data'];\n var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];\n var defaultToConfig2Keys = [\n 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',\n 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',\n 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',\n 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',\n 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'\n ];\n var directMergeKeys = ['validateStatus'];\n\n function getMergedValue(target, source) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge(target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n function mergeDeepProperties(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n }\n\n utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n }\n });\n\n utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);\n\n utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {\n if (!utils.isUndefined(config2[prop])) {\n config[prop] = getMergedValue(undefined, config2[prop]);\n } else if (!utils.isUndefined(config1[prop])) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n utils.forEach(directMergeKeys, function merge(prop) {\n if (prop in config2) {\n config[prop] = getMergedValue(config1[prop], config2[prop]);\n } else if (prop in config1) {\n config[prop] = getMergedValue(undefined, config1[prop]);\n }\n });\n\n var axiosKeys = valueFromConfig2Keys\n .concat(mergeDeepPropertiesKeys)\n .concat(defaultToConfig2Keys)\n .concat(directMergeKeys);\n\n var otherKeys = Object\n .keys(config1)\n .concat(Object.keys(config2))\n .filter(function filterAxiosKeys(key) {\n return axiosKeys.indexOf(key) === -1;\n });\n\n utils.forEach(otherKeys, mergeDeepProperties);\n\n return config;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvY29yZS9tZXJnZUNvbmZpZy5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsMEVBQVU7O0FBRTlCO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0F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MpXG4gICAgLmNvbmNhdChkZWZhdWx0VG9Db25maWcyS2V5cylcbiAgICAuY29uY2F0KGRpcmVjdE1lcmdlS2V5cyk7XG5cbiAgdmFyIG90aGVyS2V5cyA9IE9iamVjdFxuICAgIC5rZXlzKGNvbmZpZzEpXG4gICAgLmNvbmNhdChPYmplY3Qua2V5cyhjb25maWcyKSlcbiAgICAuZmlsdGVyKGZ1bmN0aW9uIGZpbHRlckF4aW9zS2V5cyhrZXkpIHtcbiAgICAgIHJldHVybiBheGlvc0tleXMuaW5kZXhPZihrZXkpID09PSAtMTtcbiAgICB9KTtcblxuICB1dGlscy5mb3JFYWNoKG90aGVyS2V5cywgbWVyZ2VEZWVwUHJvcGVydGllcyk7XG5cbiAgcmV0dXJuIGNvbmZpZztcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/mergeConfig.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js": -/*!**********************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js ***! - \**********************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar createError = __webpack_require__(/*! ./createError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/createError.js\");\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError(\n 'Request failed with status code ' + response.status,\n response.config,\n null,\n response.request,\n response\n ));\n }\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXh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ZGF0ZVN0YXR1cztcbiAgaWYgKCFyZXNwb25zZS5zdGF0dXMgfHwgIXZhbGlkYXRlU3RhdHVzIHx8IHZhbGlkYXRlU3RhdHVzKHJlc3BvbnNlLnN0YXR1cykpIHtcbiAgICByZXNvbHZlKHJlc3BvbnNlKTtcbiAgfSBlbHNlIHtcbiAgICByZWplY3QoY3JlYXRlRXJyb3IoXG4gICAgICAnUmVxdWVzdCBmYWlsZWQgd2l0aCBzdGF0dXMgY29kZSAnICsgcmVzcG9uc2Uuc3RhdHVzLFxuICAgICAgcmVzcG9uc2UuY29uZmlnLFxuICAgICAgbnVsbCxcbiAgICAgIHJlc3BvbnNlLnJlcXVlc3QsXG4gICAgICByZXNwb25zZVxuICAgICkpO1xuICB9XG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/settle.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js": -/*!*****************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js ***! - \*****************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar defaults = __webpack_require__(/*! ./../defaults */ \"../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\");\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n var context = this || defaults;\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn.call(context, data, headers);\n });\n\n return data;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLC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aGUgcmVzdWx0aW5nIHRyYW5zZm9ybWVkIGRhdGFcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiB0cmFuc2Zvcm1EYXRhKGRhdGEsIGhlYWRlcnMsIGZucykge1xuICB2YXIgY29udGV4dCA9IHRoaXMgfHwgZGVmYXVsdHM7XG4gIC8qZXNsaW50IG5vLXBhcmFtLXJlYXNzaWduOjAqL1xuICB1dGlscy5mb3JFYWNoKGZucywgZnVuY3Rpb24gdHJhbnNmb3JtKGZuKSB7XG4gICAgZGF0YSA9IGZuLmNhbGwoY29udGV4dCwgZGF0YSwgaGVhZGVycyk7XG4gIH0pO1xuXG4gIHJldHVybiBkYXRhO1xufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/core/transformData.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/defaults.js": -/*!*******************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/defaults.js ***! - \*******************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\nvar normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js\");\nvar enhanceError = __webpack_require__(/*! ./core/enhanceError */ \"../../../../axios@0.21.4/node_modules/axios/lib/core/enhanceError.js\");\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(/*! ./adapters/xhr */ \"../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\");\n } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {\n // For node use HTTP adapter\n adapter = __webpack_require__(/*! ./adapters/http */ \"../../../../axios@0.21.4/node_modules/axios/lib/adapters/xhr.js\");\n }\n return adapter;\n}\n\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nvar defaults = {\n\n transitional: {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n },\n\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Accept');\n normalizeHeaderName(headers, 'Content-Type');\n\n if (utils.isFormData(data) ||\n utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {\n setContentTypeIfUnset(headers, 'application/json');\n return stringifySafely(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n var transitional = this.transitional;\n var silentJSONParsing = transitional && transitional.silentJSONParsing;\n var forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';\n\n if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw enhanceError(e, this, 'E_JSON_PARSE');\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvZGVmYXVsdHMuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsWUFBWSxtQkFBTyxDQUFDLHlFQUFTO0FBQzdCLDBCQUEwQixtQkFBTyxDQUFDLHFIQUErQjtBQUNqRSxtQkFBbUIsbUJBQU8sQ0FBQyxpR0FBcUI7O0FBRWhEO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsY0FBYyxtQkFBTyxDQUFDLHVGQUFnQjtBQUN0QyxJQUFJO0FBQ0o7QUFDQSxjQUFjLG1CQUFPLENBQUMsd0ZBQWlCO0FBQ3ZDO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsTUFBTTtBQUNOO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQT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c1ttZXRob2RdID0ge307XG59KTtcblxudXRpbHMuZm9yRWFjaChbJ3Bvc3QnLCAncHV0JywgJ3BhdGNoJ10sIGZ1bmN0aW9uIGZvckVhY2hNZXRob2RXaXRoRGF0YShtZXRob2QpIHtcbiAgZGVmYXVsdHMuaGVhZGVyc1ttZXRob2RdID0gdXRpbHMubWVyZ2UoREVGQVVMVF9DT05URU5UX1RZUEUpO1xufSk7XG5cbm1vZHVsZS5leHBvcnRzID0gZGVmYXVsdHM7XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/defaults.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js": -/*!***********************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js ***! - \***********************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9iaW5kLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQTtBQUNBLG9CQUFvQixpQkFBaUI7QUFDckM7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9iaW5kLmpzP2I3MzMiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGJpbmQoZm4sIHRoaXNBcmcpIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHdyYXAoKSB7XG4gICAgdmFyIGFyZ3MgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCk7XG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmdzLmxlbmd0aDsgaSsrKSB7XG4gICAgICBhcmdzW2ldID0gYXJndW1lbnRzW2ldO1xuICAgIH1cbiAgICByZXR1cm4gZm4uYXBwbHkodGhpc0FyZywgYXJncyk7XG4gIH07XG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js": -/*!***************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js ***! - \***************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n } else {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n var hashmarkIndex = url.indexOf('#');\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9idWlsZFVSTC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYixZQUFZLG1CQUFPLENBQUMsNEVBQVk7O0FBRWhDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkIsV0FBVyxRQUFRO0FBQ25CLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsSUFBSTtBQUNKO0FBQ0EsSUFBSTtBQUNKOztBQUVBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSxRQUFRO0FBQ1I7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxVQUFVO0FBQ1Y7QUFDQTtBQUNBO0FBQ0EsT0FBTztBQUNQLEtBQUs7O0FBRUw7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQ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9mKCcjJyk7XG4gICAgaWYgKGhhc2htYXJrSW5kZXggIT09IC0xKSB7XG4gICAgICB1cmwgPSB1cmwuc2xpY2UoMCwgaGFzaG1hcmtJbmRleCk7XG4gICAgfVxuXG4gICAgdXJsICs9ICh1cmwuaW5kZXhPZignPycpID09PSAtMSA/ICc/JyA6ICcmJykgKyBzZXJpYWxpemVkUGFyYW1zO1xuICB9XG5cbiAgcmV0dXJuIHVybDtcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/buildURL.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js": -/*!******************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js ***! - \******************************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9jb21iaW5lVVJMcy5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBYTs7QUFFYjtBQUNBO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkIsV0FBVyxRQUFRO0FBQ25CLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvY29tYmluZVVSTHMuanM/ZjdiNSJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbi8qKlxuICogQ3JlYXRlcyBhIG5ldyBVUkwgYnkgY29tYmluaW5nIHRoZSBzcGVjaWZpZWQgVVJMc1xuICpcbiAqIEBwYXJhbSB7c3RyaW5nfSBiYXNlVVJMIFRoZSBiYXNlIFVSTFxuICogQHBhcmFtIHtzdHJpbmd9IHJlbGF0aXZlVVJMIFRoZSByZWxhdGl2ZSBVUkxcbiAqIEByZXR1cm5zIHtzdHJpbmd9IFRoZSBjb21iaW5lZCBVUkxcbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBjb21iaW5lVVJMcyhiYXNlVVJMLCByZWxhdGl2ZVVSTCkge1xuICByZXR1cm4gcmVsYXRpdmVVUkxcbiAgICA/IGJhc2VVUkwucmVwbGFjZSgvXFwvKyQvLCAnJykgKyAnLycgKyByZWxhdGl2ZVVSTC5yZXBsYWNlKC9eXFwvKy8sICcnKVxuICAgIDogYmFzZVVSTDtcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/combineURLs.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js": -/*!**************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js ***! - \**************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs support document.cookie\n (function standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n })() :\n\n // Non standard browser env (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() { return null; },\n remove: function remove() {}\n };\n })()\n);\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9jb29raWVzLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQyw0RUFBWTs7QUFFaEM7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBLDJDQUEyQztBQUMzQyxTQUFTOztBQUVUO0FBQ0EsNERBQTRELHdCQUF3QjtBQUNwRjtBQUNBLFNBQVM7O0FBRVQ7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLOztBQUVMO0FBQ0E7QUFDQTtBQUNBLGtDQUFrQztBQUNsQyxnQ0FBZ0MsY0FBYztBQUM5QztBQUNBO0FBQ0EsS0FBSztBQUNMIiwic291cmNlcyI6WyJ3ZWJwYWNr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N1cmUgPT09IHRydWUpIHtcbiAgICAgICAgICAgIGNvb2tpZS5wdXNoKCdzZWN1cmUnKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBkb2N1bWVudC5jb29raWUgPSBjb29raWUuam9pbignOyAnKTtcbiAgICAgICAgfSxcblxuICAgICAgICByZWFkOiBmdW5jdGlvbiByZWFkKG5hbWUpIHtcbiAgICAgICAgICB2YXIgbWF0Y2ggPSBkb2N1bWVudC5jb29raWUubWF0Y2gobmV3IFJlZ0V4cCgnKF58O1xcXFxzKikoJyArIG5hbWUgKyAnKT0oW147XSopJykpO1xuICAgICAgICAgIHJldHVybiAobWF0Y2ggPyBkZWNvZGVVUklDb21wb25lbnQobWF0Y2hbM10pIDogbnVsbCk7XG4gICAgICAgIH0sXG5cbiAgICAgICAgcmVtb3ZlOiBmdW5jdGlvbiByZW1vdmUobmFtZSkge1xuICAgICAgICAgIHRoaXMud3JpdGUobmFtZSwgJycsIERhdGUubm93KCkgLSA4NjQwMDAwMCk7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgfSkoKSA6XG5cbiAgLy8gTm9uIHN0YW5kYXJkIGJyb3dzZXIgZW52ICh3ZWIgd29ya2VycywgcmVhY3QtbmF0aXZlKSBsYWNrIG5lZWRlZCBzdXBwb3J0LlxuICAgIChmdW5jdGlvbiBub25TdGFuZGFyZEJyb3dzZXJFbnYoKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB3cml0ZTogZnVuY3Rpb24gd3JpdGUoKSB7fSxcbiAgICAgICAgcmVhZDogZnVuY3Rpb24gcmVhZCgpIHsgcmV0dXJuIG51bGw7IH0sXG4gICAgICAgIHJlbW92ZTogZnVuY3Rpb24gcmVtb3ZlKCkge31cbiAgICAgIH07XG4gICAgfSkoKVxuKTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/cookies.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js": -/*!********************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js ***! - \********************************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9pc0Fic29sdXRlVVJMLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViO0FBQ0E7QUFDQTtBQUNBLFdBQVcsUUFBUTtBQUNuQixhQUFhLFNBQVM7QUFDdEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvaXNBYnNvbHV0ZVVSTC5qcz82MDgxIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgdGhlIHNwZWNpZmllZCBVUkwgaXMgYWJzb2x1dGVcbiAqXG4gKiBAcGFyYW0ge3N0cmluZ30gdXJsIFRoZSBVUkwgdG8gdGVzdFxuICogQHJldHVybnMge2Jvb2xlYW59IFRydWUgaWYgdGhlIHNwZWNpZmllZCBVUkwgaXMgYWJzb2x1dGUsIG90aGVyd2lzZSBmYWxzZVxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQWJzb2x1dGVVUkwodXJsKSB7XG4gIC8vIEEgVVJMIGlzIGNvbnNpZGVyZWQgYWJzb2x1dGUgaWYgaXQgYmVnaW5zIHdpdGggXCI8c2NoZW1lPjovL1wiIG9yIFwiLy9cIiAocHJvdG9jb2wtcmVsYXRpdmUgVVJMKS5cbiAgLy8gUkZDIDM5ODYgZGVmaW5lcyBzY2hlbWUgbmFtZSBhcyBhIHNlcXVlbmNlIG9mIGNoYXJhY3RlcnMgYmVnaW5uaW5nIHdpdGggYSBsZXR0ZXIgYW5kIGZvbGxvd2VkXG4gIC8vIGJ5IGFueSBjb21iaW5hdGlvbiBvZiBsZXR0ZXJzLCBkaWdpdHMsIHBsdXMsIHBlcmlvZCwgb3IgaHlwaGVuLlxuICByZXR1cm4gL14oW2Etel1bYS16XFxkXFwrXFwtXFwuXSo6KT9cXC9cXC8vaS50ZXN0KHVybCk7XG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAbsoluteURL.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js": -/*!*******************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js ***! - \*******************************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nmodule.exports = function isAxiosError(payload) {\n return (typeof payload === 'object') && (payload.isAxiosError === true);\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9pc0F4aW9zRXJyb3IuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWI7QUFDQTtBQUNBO0FBQ0EsV0FBVyxHQUFHO0FBQ2QsYUFBYSxTQUFTO0FBQ3RCO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL2lzQXhpb3NFcnJvci5qcz9mZDQyIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgdGhlIHBheWxvYWQgaXMgYW4gZXJyb3IgdGhyb3duIGJ5IEF4aW9zXG4gKlxuICogQHBhcmFtIHsqfSBwYXlsb2FkIFRoZSB2YWx1ZSB0byB0ZXN0XG4gKiBAcmV0dXJucyB7Ym9vbGVhbn0gVHJ1ZSBpZiB0aGUgcGF5bG9hZCBpcyBhbiBlcnJvciB0aHJvd24gYnkgQXhpb3MsIG90aGVyd2lzZSBmYWxzZVxuICovXG5tb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIGlzQXhpb3NFcnJvcihwYXlsb2FkKSB7XG4gIHJldHVybiAodHlwZW9mIHBheWxvYWQgPT09ICdvYmplY3QnKSAmJiAocGF5bG9hZC5pc0F4aW9zRXJyb3IgPT09IHRydWUpO1xufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isAxiosError.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js": -/*!**********************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js ***! - \**********************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = (\n utils.isStandardBrowserEnv() ?\n\n // Standard browser envs have full support of the APIs needed to test\n // whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrig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gKiBAcGFyYW0ge1N0cmluZ30gcmVxdWVzdFVSTCBUaGUgVVJMIHRvIHRlc3RcbiAgICAqIEByZXR1cm5zIHtib29sZWFufSBUcnVlIGlmIFVSTCBzaGFyZXMgdGhlIHNhbWUgb3JpZ2luLCBvdGhlcndpc2UgZmFsc2VcbiAgICAqL1xuICAgICAgcmV0dXJuIGZ1bmN0aW9uIGlzVVJMU2FtZU9yaWdpbihyZXF1ZXN0VVJMKSB7XG4gICAgICAgIHZhciBwYXJzZWQgPSAodXRpbHMuaXNTdHJpbmcocmVxdWVzdFVSTCkpID8gcmVzb2x2ZVVSTChyZXF1ZXN0VVJMKSA6IHJlcXVlc3RVUkw7XG4gICAgICAgIHJldHVybiAocGFyc2VkLnByb3RvY29sID09PSBvcmlnaW5VUkwucHJvdG9jb2wgJiZcbiAgICAgICAgICAgIHBhcnNlZC5ob3N0ID09PSBvcmlnaW5VUkwuaG9zdCk7XG4gICAgICB9O1xuICAgIH0pKCkgOlxuXG4gIC8vIE5vbiBzdGFuZGFyZCBicm93c2VyIGVudnMgKHdlYiB3b3JrZXJzLCByZWFjdC1uYXRpdmUpIGxhY2sgbmVlZGVkIHN1cHBvcnQuXG4gICAgKGZ1bmN0aW9uIG5vblN0YW5kYXJkQnJvd3NlckVudigpIHtcbiAgICAgIHJldHVybiBmdW5jdGlvbiBpc1VSTFNhbWVPcmlnaW4oKSB7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfTtcbiAgICB9KSgpXG4pO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/isURLSameOrigin.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js": -/*!**************************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js ***! - \**************************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9ub3JtYWxpemVIZWFkZXJOYW1lLmpzLmpzIiwibWFwcGluZ3MiOiJBQUFhOztBQUViLFlBQVksbUJBQU8sQ0FBQywwRUFBVTs7QUFFOUI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsR0FBRztBQUNIIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL25vcm1hbGl6ZUhlYWRlck5hbWUuanM/ZWRkZiJdLCJzb3VyY2VzQ29udGVudCI6WyIndXNlIHN0cmljdCc7XG5cbnZhciB1dGlscyA9IHJlcXVpcmUoJy4uL3V0aWxzJyk7XG5cbm1vZHVsZS5leHBvcnRzID0gZnVuY3Rpb24gbm9ybWFsaXplSGVhZGVyTmFtZShoZWFkZXJzLCBub3JtYWxpemVkTmFtZSkge1xuICB1dGlscy5mb3JFYWNoKGhlYWRlcnMsIGZ1bmN0aW9uIHByb2Nlc3NIZWFkZXIodmFsdWUsIG5hbWUpIHtcbiAgICBpZiAobmFtZSAhPT0gbm9ybWFsaXplZE5hbWUgJiYgbmFtZS50b1VwcGVyQ2FzZSgpID09PSBub3JtYWxpemVkTmFtZS50b1VwcGVyQ2FzZSgpKSB7XG4gICAgICBoZWFkZXJzW25vcm1hbGl6ZWROYW1lXSA9IHZhbHVlO1xuICAgICAgZGVsZXRlIGhlYWRlcnNbbmFtZV07XG4gICAgfVxuICB9KTtcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/normalizeHeaderName.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js": -/*!*******************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js ***! - \*******************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar utils = __webpack_require__(/*! ./../utils */ \"../../../../axios@0.21.4/node_modules/axios/lib/utils.js\");\n\n// Headers whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nvar ignoreDuplicateOf = [\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n];\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) { return parsed; }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {\n return;\n }\n if (key === 'set-cookie') {\n parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n }\n });\n\n return parsed;\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9wYXJzZUhlYWRlcnMuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsWUFBWSxtQkFBTyxDQUFDLDRFQUFZOztBQUVoQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsV0FBVyxRQUFRO0FBQ25CLGFBQWEsUUFBUTtBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUEsa0JBQWtCOztBQUVsQjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxRQUFRO0FBQ1I7QUFDQTtBQUNBO0FBQ0EsR0FBRzs7QUFFSDtBQUNBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uLi8uLi8uLi8uLi9heGlvc0AwLjIxLjQvbm9kZV9tb2R1bGVzL2F4aW9zL2xpYi9oZWxwZXJzL3BhcnNlSGVhZGVycy5qcz9iMjA1Il0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxudmFyIHV0aWxzID0gcmVxdWlyZSgnLi8uLi91dGlscycpO1xuXG4vLyBIZWFkZXJzIHdob3NlIGR1cGxpY2F0ZXMgYXJlIGlnbm9yZWQgYnkgbm9kZVxuLy8gYy5mLiBodHRwczovL25vZGVqcy5vcmcvYXBpL2h0dHAuaHRtbCNodHRwX21lc3NhZ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gICAgaSA9IGxpbmUuaW5kZXhPZignOicpO1xuICAgIGtleSA9IHV0aWxzLnRyaW0obGluZS5zdWJzdHIoMCwgaSkpLnRvTG93ZXJDYXNlKCk7XG4gICAgdmFsID0gdXRpbHMudHJpbShsaW5lLnN1YnN0cihpICsgMSkpO1xuXG4gICAgaWYgKGtleSkge1xuICAgICAgaWYgKHBhcnNlZFtrZXldICYmIGlnbm9yZUR1cGxpY2F0ZU9mLmluZGV4T2Yoa2V5KSA+PSAwKSB7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGlmIChrZXkgPT09ICdzZXQtY29va2llJykge1xuICAgICAgICBwYXJzZWRba2V5XSA9IChwYXJzZWRba2V5XSA/IHBhcnNlZFtrZXldIDogW10pLmNvbmNhdChbdmFsXSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBwYXJzZWRba2V5XSA9IHBhcnNlZFtrZXldID8gcGFyc2VkW2tleV0gKyAnLCAnICsgdmFsIDogdmFsO1xuICAgICAgfVxuICAgIH1cbiAgfSk7XG5cbiAgcmV0dXJuIHBhcnNlZDtcbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/parseHeaders.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js": -/*!*************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js ***! - \*************************************************************************/ -/***/ ((module) => { - -"use strict"; -eval("\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy9zcHJlYWQuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLCtCQUErQjtBQUMvQjtBQUNBO0FBQ0EsV0FBVyxVQUFVO0FBQ3JCLGFBQWE7QUFDYjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4uLy4uLy4uLy4uL2F4aW9zQDAuMjEuNC9ub2RlX21vZHVsZXMvYXhpb3MvbGliL2hlbHBlcnMvc3ByZWFkLmpzPzc2NGIiXSwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG4vKipcbiAqIFN5bnRhY3RpYyBzdWdhciBmb3IgaW52b2tpbmcgYSBmdW5jdGlvbiBhbmQgZXhwYW5kaW5nIGFuIGFycmF5IGZvciBhcmd1bWVudHMuXG4gKlxuICogQ29tbW9uIHVzZSBjYXNlIHdvdWxkIGJlIHRvIHVzZSBgRnVuY3Rpb24ucHJvdG90eXBlLmFwcGx5YC5cbiAqXG4gKiAgYGBganNcbiAqICBmdW5jdGlvbiBmKHgsIHksIHopIHt9XG4gKiAgdmFyIGFyZ3MgPSBbMSwgMiwgM107XG4gKiAgZi5hcHBseShudWxsLCBhcmdzKTtcbiAqICBgYGBcbiAqXG4gKiBXaXRoIGBzcHJlYWRgIHRoaXMgZXhhbXBsZSBjYW4gYmUgcmUtd3JpdHRlbi5cbiAqXG4gKiAgYGBganNcbiAqICBzcHJlYWQoZnVuY3Rpb24oeCwgeSwgeikge30pKFsxLCAyLCAzXSk7XG4gKiAgYGBgXG4gKlxuICogQHBhcmFtIHtGdW5jdGlvbn0gY2FsbGJhY2tcbiAqIEByZXR1cm5zIHtGdW5jdGlvbn1cbiAqL1xubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbiBzcHJlYWQoY2FsbGJhY2spIHtcbiAgcmV0dXJuIGZ1bmN0aW9uIHdyYXAoYXJyKSB7XG4gICAgcmV0dXJuIGNhbGxiYWNrLmFwcGx5KG51bGwsIGFycik7XG4gIH07XG59O1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/spread.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js": -/*!****************************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js ***! - \****************************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar pkg = __webpack_require__(/*! ./../../package.json */ \"../../../../axios@0.21.4/node_modules/axios/package.json\");\n\nvar validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nvar deprecatedWarnings = {};\nvar currentVerArr = pkg.version.split('.');\n\n/**\n * Compare package versions\n * @param {string} version\n * @param {string?} thanVersion\n * @returns {boolean}\n */\nfunction isOlderVersion(version, thanVersion) {\n var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;\n var destVer = version.split('.');\n for (var i = 0; i < 3; i++) {\n if (pkgVersionArr[i] > destVer[i]) {\n return true;\n } else if (pkgVersionArr[i] < destVer[i]) {\n return false;\n }\n }\n return false;\n}\n\n/**\n * Transitional option validator\n * @param {function|boolean?} validator\n * @param {string?} version\n * @param {string} message\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n var isDeprecated = version && isOlderVersion(version);\n\n function formatMessage(opt, desc) {\n return '[Axios v' + pkg.version + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return function(value, opt, opts) {\n if (validator === false) {\n throw new Error(formatMessage(opt, ' has been removed in ' + version));\n }\n\n if (isDeprecated && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\n/**\n * Assert object's properties type\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new TypeError('options must be an object');\n }\n var keys = Object.keys(options);\n var i = keys.length;\n while (i-- > 0) {\n var opt = keys[i];\n var validator = schema[opt];\n if (validator) {\n var value = options[opt];\n var result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new TypeError('option ' + opt + ' must be ' + result);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw Error('Unknown option ' + opt);\n }\n }\n}\n\nmodule.exports = {\n isOlderVersion: isOlderVersion,\n assertOptions: assertOptions,\n validators: validators\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvaGVscGVycy92YWxpZGF0b3IuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsVUFBVSxtQkFBTyxDQUFDLHNGQUFzQjs7QUFFeEM7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNB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ZGVmaW5lZCB8fCB2YWxpZGF0b3IodmFsdWUsIG9wdCwgb3B0aW9ucyk7XG4gICAgICBpZiAocmVzdWx0ICE9PSB0cnVlKSB7XG4gICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoJ29wdGlvbiAnICsgb3B0ICsgJyBtdXN0IGJlICcgKyByZXN1bHQpO1xuICAgICAgfVxuICAgICAgY29udGludWU7XG4gICAgfVxuICAgIGlmIChhbGxvd1Vua25vd24gIT09IHRydWUpIHtcbiAgICAgIHRocm93IEVycm9yKCdVbmtub3duIG9wdGlvbiAnICsgb3B0KTtcbiAgICB9XG4gIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIGlzT2xkZXJWZXJzaW9uOiBpc09sZGVyVmVyc2lvbixcbiAgYXNzZXJ0T3B0aW9uczogYXNzZXJ0T3B0aW9ucyxcbiAgdmFsaWRhdG9yczogdmFsaWRhdG9yc1xufTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/helpers/validator.js\n"); - -/***/ }), - -/***/ "../../../../axios@0.21.4/node_modules/axios/lib/utils.js": -/*!****************************************************************!*\ - !*** ../../../../axios@0.21.4/node_modules/axios/lib/utils.js ***! - \****************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -eval("\n\nvar bind = __webpack_require__(/*! ./helpers/bind */ \"../../../../axios@0.21.4/node_modules/axios/lib/helpers/bind.js\");\n\n// utils is a library of generic helper functions non-specific to axios\n\nvar toString = Object.prototype.toString;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Array, otherwise false\n */\nfunction isArray(val) {\n return toString.call(val) === '[object Array]';\n}\n\n/**\n * Determine if a value is undefined\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nfunction isUndefined(val) {\n return typeof val === 'undefined';\n}\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nfunction isArrayBuffer(val) {\n return toString.call(val) === '[object ArrayBuffer]';\n}\n\n/**\n * Determine if a value is a FormData\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nfunction isFormData(val) {\n return (typeof FormData !== 'undefined') && (val instanceof FormData);\n}\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n var result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a String, otherwise false\n */\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n/**\n * Determine if a value is a Number\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Number, otherwise false\n */\nfunction isNumber(val) {\n return typeof val === 'number';\n}\n\n/**\n * Determine if a value is an Object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is an Object, otherwise false\n */\nfunction isObject(val) {\n return val !== null && typeof val === 'object';\n}\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {Object} val The value to test\n * @return {boolean} True if value is a plain Object, otherwise false\n */\nfunction isPlainObject(val) {\n if (toString.call(val) !== '[object Object]') {\n return false;\n }\n\n var prototype = Object.getPrototypeOf(val);\n return prototype === null || prototype === Object.prototype;\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Date, otherwise false\n */\nfunction isDate(val) {\n return toString.call(val) === '[object Date]';\n}\n\n/**\n * Determine if a value is a File\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a File, otherwise false\n */\nfunction isFile(val) {\n return toString.call(val) === '[object File]';\n}\n\n/**\n * Determine if a value is a Blob\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nfunction isBlob(val) {\n return toString.call(val) === '[object Blob]';\n}\n\n/**\n * Determine if a value is a Function\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nfunction isFunction(val) {\n return toString.call(val) === '[object Function]';\n}\n\n/**\n * Determine if a value is a Stream\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nfunction isStream(val) {\n return isObject(val) && isFunction(val.pipe);\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {Object} val The value to test\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nfunction isURLSearchParams(val) {\n return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;\n}\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n * @returns {String} The String freed of excess whitespace\n */\nfunction trim(str) {\n return str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\n}\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||\n navigator.product === 'NativeScript' ||\n navigator.product === 'NS')) {\n return false;\n }\n return (\n typeof window !== 'undefined' &&\n typeof document !== 'undefined'\n );\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n var result = {};\n function assignValue(val, key) {\n if (isPlainObject(result[key]) && isPlainObject(val)) {\n result[key] = merge(result[key], val);\n } else if (isPlainObject(val)) {\n result[key] = merge({}, val);\n } else if (isArray(val)) {\n result[key] = val.slice();\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n * @return {string} content value without BOM\n */\nfunction stripBOM(content) {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isPlainObject: isPlainObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim,\n stripBOM: stripBOM\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYXhpb3NAMC4yMS40L25vZGVfbW9kdWxlcy9heGlvcy9saWIvdXRpbHMuanMuanMiLCJtYXBwaW5ncyI6IkFBQWE7O0FBRWIsV0FBVyxtQkFBTyxDQUFDLHVGQUFnQjs7QUFFbkM7O0FBRUE7O0FBRUE7QUFDQTtBQUNBO0FBQ0EsV0FBVyxRQUFRO0FBQ25CLGFBQWEsU0FBUztBQUN0QjtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXLFFBQVE7QUFDbkIsYUFBYSxTQUFTO0FBQ3RCO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBLFdBQVcsUUFBUTtBQUNuQixhQUFhLFNBQVM7QUFDdEI7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxXQUFXL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VVJMU2VhcmNoUGFyYW1zOiBpc1VSTFNlYXJjaFBhcmFtcyxcbiAgaXNTdGFuZGFyZEJyb3dzZXJFbnY6IGlzU3RhbmRhcmRCcm93c2VyRW52LFxuICBmb3JFYWNoOiBmb3JFYWNoLFxuICBtZXJnZTogbWVyZ2UsXG4gIGV4dGVuZDogZXh0ZW5kLFxuICB0cmltOiB0cmltLFxuICBzdHJpcEJPTTogc3RyaXBCT01cbn07XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../axios@0.21.4/node_modules/axios/lib/utils.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/index.js": -/*!************************************************************!*\ - !*** ../../../../brace@0.11.1/node_modules/brace/index.js ***! - \************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -eval("/* ***** BEGIN LICENSE BLOCK *****\n * Distributed under the BSD license:\n *\n * Copyright (c) 2010, Ajax.org B.V.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of Ajax.org B.V. nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * ***** END LICENSE BLOCK ***** */\n\n/**\n * Define a module along with a payload\n * @param module a name for the payload\n * @param payload a function to call with (acequire, exports, module) params\n */\n\n(function() {\n\nvar ACE_NAMESPACE = \"ace\";\n\nvar global = (function() { return this; })();\nif (!global && typeof window != \"undefined\") global = window; // strict mode\n\n\nif (!ACE_NAMESPACE && typeof acequirejs !== \"undefined\")\n return;\n\n\nvar define = function(module, deps, payload) {\n if (typeof module !== \"string\") {\n if (define.original)\n define.original.apply(this, arguments);\n else {\n console.error(\"dropping module because define wasn\\'t a string.\");\n console.trace();\n }\n return;\n }\n if (arguments.length == 2)\n payload = deps;\n if (!define.modules[module]) {\n define.payloads[module] = payload;\n define.modules[module] = null;\n }\n};\n\ndefine.modules = {};\ndefine.payloads = {};\n\n/**\n * Get at functionality define()ed using the function above\n */\nvar _acequire = function(parentId, module, callback) {\n if (typeof module === \"string\") {\n var payload = lookup(parentId, module);\n if (payload != undefined) {\n callback && callback();\n return payload;\n }\n } else if (Object.prototype.toString.call(module) === \"[object Array]\") {\n var params = [];\n for (var i = 0, l = module.length; i < l; ++i) {\n var dep = lookup(parentId, module[i]);\n if (dep == undefined && acequire.original)\n return;\n params.push(dep);\n }\n return callback && callback.apply(null, params) || true;\n }\n};\n\nvar acequire = function(module, callback) {\n var packagedModule = _acequire(\"\", module, callback);\n if (packagedModule == undefined && acequire.original)\n return acequire.original.apply(this, arguments);\n return packagedModule;\n};\n\nvar normalizeModule = function(parentId, moduleName) {\n // normalize plugin acequires\n if (moduleName.indexOf(\"!\") !== -1) {\n var chunks = moduleName.split(\"!\");\n return normalizeModule(parentId, chunks[0]) + \"!\" + normalizeModule(parentId, chunks[1]);\n }\n // normalize relative acequires\n if (moduleName.charAt(0) == \".\") {\n var base = parentId.split(\"/\").slice(0, -1).join(\"/\");\n moduleName = base + \"/\" + moduleName;\n\n while(moduleName.indexOf(\".\") !== -1 && previous != moduleName) {\n var previous = moduleName;\n moduleName = moduleName.replace(/\\/\\.\\//, \"/\").replace(/[^\\/]+\\/\\.\\.\\//, \"\");\n }\n }\n return moduleName;\n};\n\n/**\n * Internal function to lookup moduleNames and resolve them by calling the\n * definition function if needed.\n */\nvar lookup = function(parentId, moduleName) {\n moduleName = normalizeModule(parentId, moduleName);\n\n var module = define.modules[moduleName];\n if (!module) {\n module = define.payloads[moduleName];\n if (typeof module === 'function') {\n var exports = {};\n var mod = {\n id: moduleName,\n uri: '',\n exports: exports,\n packaged: true\n };\n\n var req = function(module, callback) {\n return _acequire(moduleName, module, callback);\n };\n\n var returnValue = module(req, exports, mod);\n exports = returnValue || mod.exports;\n define.modules[moduleName] = exports;\n delete define.payloads[moduleName];\n }\n module = define.modules[moduleName] = exports || module;\n }\n return module;\n};\n\nfunction exportAce(ns) {\n var root = global;\n if (ns) {\n if (!global[ns])\n global[ns] = {};\n root = global[ns];\n }\n\n if (!root.define || !root.define.packaged) {\n define.original = root.define;\n root.define = define;\n root.define.packaged = true;\n }\n\n if (!root.acequire || !root.acequire.packaged) {\n acequire.original = root.acequire;\n root.acequire = acequire;\n root.acequire.packaged = true;\n }\n}\n\nexportAce(ACE_NAMESPACE);\n\n})();\n\nace.define(\"ace/lib/regexp\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\n var real = {\n exec: RegExp.prototype.exec,\n test: RegExp.prototype.test,\n match: String.prototype.match,\n replace: String.prototype.replace,\n split: String.prototype.split\n },\n compliantExecNpcg = real.exec.call(/()??/, \"\")[1] === undefined, // check `exec` handling of nonparticipating capturing groups\n compliantLastIndexIncrement = function () {\n var x = /^/g;\n real.test.call(x, \"\");\n return !x.lastIndex;\n }();\n\n if (compliantLastIndexIncrement && compliantExecNpcg)\n return;\n RegExp.prototype.exec = function (str) {\n var match = real.exec.apply(this, arguments),\n name, r2;\n if ( typeof(str) == 'string' && match) {\n if (!compliantExecNpcg && match.length > 1 && indexOf(match, \"\") > -1) {\n r2 = RegExp(this.source, real.replace.call(getNativeFlags(this), \"g\", \"\"));\n real.replace.call(str.slice(match.index), r2, function () {\n for (var i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined)\n match[i] = undefined;\n }\n });\n }\n if (this._xregexp && this._xregexp.captureNames) {\n for (var i = 1; i < match.length; i++) {\n name = this._xregexp.captureNames[i - 1];\n if (name)\n match[name] = match[i];\n }\n }\n if (!compliantLastIndexIncrement && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n }\n return match;\n };\n if (!compliantLastIndexIncrement) {\n RegExp.prototype.test = function (str) {\n var match = real.exec.call(this, str);\n if (match && this.global && !match[0].length && (this.lastIndex > match.index))\n this.lastIndex--;\n return !!match;\n };\n }\n\n function getNativeFlags (regex) {\n return (regex.global ? \"g\" : \"\") +\n (regex.ignoreCase ? \"i\" : \"\") +\n (regex.multiline ? \"m\" : \"\") +\n (regex.extended ? \"x\" : \"\") + // Proposed for ES4; included in AS3\n (regex.sticky ? \"y\" : \"\");\n }\n\n function indexOf (array, item, from) {\n if (Array.prototype.indexOf) // Use the native array method if available\n return array.indexOf(item, from);\n for (var i = from || 0; i < array.length; i++) {\n if (array[i] === item)\n return i;\n }\n return -1;\n }\n\n});\n\nace.define(\"ace/lib/es5-shim\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\nfunction Empty() {}\n\nif (!Function.prototype.bind) {\n Function.prototype.bind = function bind(that) { // .length is 1\n var target = this;\n if (typeof target != \"function\") {\n throw new TypeError(\"Function.prototype.bind called on incompatible \" + target);\n }\n var args = slice.call(arguments, 1); // for normal call\n var bound = function () {\n\n if (this instanceof bound) {\n\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n\n }\n\n };\n if(target.prototype) {\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n return bound;\n };\n}\nvar call = Function.prototype.call;\nvar prototypeOfArray = Array.prototype;\nvar prototypeOfObject = Object.prototype;\nvar slice = prototypeOfArray.slice;\nvar _toString = call.bind(prototypeOfObject.toString);\nvar owns = call.bind(prototypeOfObject.hasOwnProperty);\nvar defineGetter;\nvar defineSetter;\nvar lookupGetter;\nvar lookupSetter;\nvar supportsAccessors;\nif ((supportsAccessors = owns(prototypeOfObject, \"__defineGetter__\"))) {\n defineGetter = call.bind(prototypeOfObject.__defineGetter__);\n defineSetter = call.bind(prototypeOfObject.__defineSetter__);\n lookupGetter = call.bind(prototypeOfObject.__lookupGetter__);\n lookupSetter = call.bind(prototypeOfObject.__lookupSetter__);\n}\nif ([1,2].splice(0).length != 2) {\n if(function() { // test IE < 9 to splice bug - see issue #138\n function makeArray(l) {\n var a = new Array(l+2);\n a[0] = a[1] = 0;\n return a;\n }\n var array = [], lengthBefore;\n \n array.splice.apply(array, makeArray(20));\n array.splice.apply(array, makeArray(26));\n\n lengthBefore = array.length; //46\n array.splice(5, 0, \"XXX\"); // add one element\n\n lengthBefore + 1 == array.length\n\n if (lengthBefore + 1 == array.length) {\n return true;// has right splice implementation without bugs\n }\n }()) {//IE 6/7\n var array_splice = Array.prototype.splice;\n Array.prototype.splice = function(start, deleteCount) {\n if (!arguments.length) {\n return [];\n } else {\n return array_splice.apply(this, [\n start === void 0 ? 0 : start,\n deleteCount === void 0 ? (this.length - start) : deleteCount\n ].concat(slice.call(arguments, 2)))\n }\n };\n } else {//IE8\n Array.prototype.splice = function(pos, removeCount){\n var length = this.length;\n if (pos > 0) {\n if (pos > length)\n pos = length;\n } else if (pos == void 0) {\n pos = 0;\n } else if (pos < 0) {\n pos = Math.max(length + pos, 0);\n }\n\n if (!(pos+removeCount < length))\n removeCount = length - pos;\n\n var removed = this.slice(pos, pos+removeCount);\n var insert = slice.call(arguments, 2);\n var add = insert.length; \n if (pos === length) {\n if (add) {\n this.push.apply(this, insert);\n }\n } else {\n var remove = Math.min(removeCount, length - pos);\n var tailOldPos = pos + remove;\n var tailNewPos = tailOldPos + add - remove;\n var tailCount = length - tailOldPos;\n var lengthAfterRemove = length - remove;\n\n if (tailNewPos < tailOldPos) { // case A\n for (var i = 0; i < tailCount; ++i) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } else if (tailNewPos > tailOldPos) { // case B\n for (i = tailCount; i--; ) {\n this[tailNewPos+i] = this[tailOldPos+i];\n }\n } // else, add == remove (nothing to do)\n\n if (add && pos === lengthAfterRemove) {\n this.length = lengthAfterRemove; // truncate array\n this.push.apply(this, insert);\n } else {\n this.length = lengthAfterRemove + add; // reserves space\n for (i = 0; i < add; ++i) {\n this[pos+i] = insert[i];\n }\n }\n }\n return removed;\n };\n }\n}\nif (!Array.isArray) {\n Array.isArray = function isArray(obj) {\n return _toString(obj) == \"[object Array]\";\n };\n}\nvar boxedString = Object(\"a\"),\n splitString = boxedString[0] != \"a\" || !(0 in boxedString);\n\nif (!Array.prototype.forEach) {\n Array.prototype.forEach = function forEach(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n thisp = arguments[1],\n i = -1,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(); // TODO message\n }\n\n while (++i < length) {\n if (i in self) {\n fun.call(thisp, self[i], i, object);\n }\n }\n };\n}\nif (!Array.prototype.map) {\n Array.prototype.map = function map(fun /*, thisp*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = Array(length),\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self)\n result[i] = fun.call(thisp, self[i], i, object);\n }\n return result;\n };\n}\nif (!Array.prototype.filter) {\n Array.prototype.filter = function filter(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n result = [],\n value,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self) {\n value = self[i];\n if (fun.call(thisp, value, i, object)) {\n result.push(value);\n }\n }\n }\n return result;\n };\n}\nif (!Array.prototype.every) {\n Array.prototype.every = function every(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && !fun.call(thisp, self[i], i, object)) {\n return false;\n }\n }\n return true;\n };\n}\nif (!Array.prototype.some) {\n Array.prototype.some = function some(fun /*, thisp */) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0,\n thisp = arguments[1];\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n\n for (var i = 0; i < length; i++) {\n if (i in self && fun.call(thisp, self[i], i, object)) {\n return true;\n }\n }\n return false;\n };\n}\nif (!Array.prototype.reduce) {\n Array.prototype.reduce = function reduce(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n\n var i = 0;\n var result;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i++];\n break;\n }\n if (++i >= length) {\n throw new TypeError(\"reduce of empty array with no initial value\");\n }\n } while (true);\n }\n\n for (; i < length; i++) {\n if (i in self) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n }\n\n return result;\n };\n}\nif (!Array.prototype.reduceRight) {\n Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {\n var object = toObject(this),\n self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n object,\n length = self.length >>> 0;\n if (_toString(fun) != \"[object Function]\") {\n throw new TypeError(fun + \" is not a function\");\n }\n if (!length && arguments.length == 1) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n\n var result, i = length - 1;\n if (arguments.length >= 2) {\n result = arguments[1];\n } else {\n do {\n if (i in self) {\n result = self[i--];\n break;\n }\n if (--i < 0) {\n throw new TypeError(\"reduceRight of empty array with no initial value\");\n }\n } while (true);\n }\n\n do {\n if (i in this) {\n result = fun.call(void 0, result, self[i], i, object);\n }\n } while (i--);\n\n return result;\n };\n}\nif (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {\n Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n\n var i = 0;\n if (arguments.length > 1) {\n i = toInteger(arguments[1]);\n }\n i = i >= 0 ? i : Math.max(0, length + i);\n for (; i < length; i++) {\n if (i in self && self[i] === sought) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) {\n Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {\n var self = splitString && _toString(this) == \"[object String]\" ?\n this.split(\"\") :\n toObject(this),\n length = self.length >>> 0;\n\n if (!length) {\n return -1;\n }\n var i = length - 1;\n if (arguments.length > 1) {\n i = Math.min(i, toInteger(arguments[1]));\n }\n i = i >= 0 ? i : length - Math.abs(i);\n for (; i >= 0; i--) {\n if (i in self && sought === self[i]) {\n return i;\n }\n }\n return -1;\n };\n}\nif (!Object.getPrototypeOf) {\n Object.getPrototypeOf = function getPrototypeOf(object) {\n return object.__proto__ || (\n object.constructor ?\n object.constructor.prototype :\n prototypeOfObject\n );\n };\n}\nif (!Object.getOwnPropertyDescriptor) {\n var ERR_NON_OBJECT = \"Object.getOwnPropertyDescriptor called on a \" +\n \"non-object: \";\n Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT + object);\n if (!owns(object, property))\n return;\n\n var descriptor, getter, setter;\n descriptor = { enumerable: true, configurable: true };\n if (supportsAccessors) {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n\n var getter = lookupGetter(object, property);\n var setter = lookupSetter(object, property);\n object.__proto__ = prototype;\n\n if (getter || setter) {\n if (getter) descriptor.get = getter;\n if (setter) descriptor.set = setter;\n return descriptor;\n }\n }\n descriptor.value = object[property];\n return descriptor;\n };\n}\nif (!Object.getOwnPropertyNames) {\n Object.getOwnPropertyNames = function getOwnPropertyNames(object) {\n return Object.keys(object);\n };\n}\nif (!Object.create) {\n var createEmpty;\n if (Object.prototype.__proto__ === null) {\n createEmpty = function () {\n return { \"__proto__\": null };\n };\n } else {\n createEmpty = function () {\n var empty = {};\n for (var i in empty)\n empty[i] = null;\n empty.constructor =\n empty.hasOwnProperty =\n empty.propertyIsEnumerable =\n empty.isPrototypeOf =\n empty.toLocaleString =\n empty.toString =\n empty.valueOf =\n empty.__proto__ = null;\n return empty;\n }\n }\n\n Object.create = function create(prototype, properties) {\n var object;\n if (prototype === null) {\n object = createEmpty();\n } else {\n if (typeof prototype != \"object\")\n throw new TypeError(\"typeof prototype[\"+(typeof prototype)+\"] != 'object'\");\n var Type = function () {};\n Type.prototype = prototype;\n object = new Type();\n object.__proto__ = prototype;\n }\n if (properties !== void 0)\n Object.defineProperties(object, properties);\n return object;\n };\n}\n\nfunction doesDefinePropertyWork(object) {\n try {\n Object.defineProperty(object, \"sentinel\", {});\n return \"sentinel\" in object;\n } catch (exception) {\n }\n}\nif (Object.defineProperty) {\n var definePropertyWorksOnObject = doesDefinePropertyWork({});\n var definePropertyWorksOnDom = typeof document == \"undefined\" ||\n doesDefinePropertyWork(document.createElement(\"div\"));\n if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) {\n var definePropertyFallback = Object.defineProperty;\n }\n}\n\nif (!Object.defineProperty || definePropertyFallback) {\n var ERR_NON_OBJECT_DESCRIPTOR = \"Property description must be an object: \";\n var ERR_NON_OBJECT_TARGET = \"Object.defineProperty called on non-object: \"\n var ERR_ACCESSORS_NOT_SUPPORTED = \"getters & setters can not be defined \" +\n \"on this javascript engine\";\n\n Object.defineProperty = function defineProperty(object, property, descriptor) {\n if ((typeof object != \"object\" && typeof object != \"function\") || object === null)\n throw new TypeError(ERR_NON_OBJECT_TARGET + object);\n if ((typeof descriptor != \"object\" && typeof descriptor != \"function\") || descriptor === null)\n throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);\n if (definePropertyFallback) {\n try {\n return definePropertyFallback.call(Object, object, property, descriptor);\n } catch (exception) {\n }\n }\n if (owns(descriptor, \"value\")) {\n\n if (supportsAccessors && (lookupGetter(object, property) ||\n lookupSetter(object, property)))\n {\n var prototype = object.__proto__;\n object.__proto__ = prototypeOfObject;\n delete object[property];\n object[property] = descriptor.value;\n object.__proto__ = prototype;\n } else {\n object[property] = descriptor.value;\n }\n } else {\n if (!supportsAccessors)\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n if (owns(descriptor, \"get\"))\n defineGetter(object, property, descriptor.get);\n if (owns(descriptor, \"set\"))\n defineSetter(object, property, descriptor.set);\n }\n\n return object;\n };\n}\nif (!Object.defineProperties) {\n Object.defineProperties = function defineProperties(object, properties) {\n for (var property in properties) {\n if (owns(properties, property))\n Object.defineProperty(object, property, properties[property]);\n }\n return object;\n };\n}\nif (!Object.seal) {\n Object.seal = function seal(object) {\n return object;\n };\n}\nif (!Object.freeze) {\n Object.freeze = function freeze(object) {\n return object;\n };\n}\ntry {\n Object.freeze(function () {});\n} catch (exception) {\n Object.freeze = (function freeze(freezeObject) {\n return function freeze(object) {\n if (typeof object == \"function\") {\n return object;\n } else {\n return freezeObject(object);\n }\n };\n })(Object.freeze);\n}\nif (!Object.preventExtensions) {\n Object.preventExtensions = function preventExtensions(object) {\n return object;\n };\n}\nif (!Object.isSealed) {\n Object.isSealed = function isSealed(object) {\n return false;\n };\n}\nif (!Object.isFrozen) {\n Object.isFrozen = function isFrozen(object) {\n return false;\n };\n}\nif (!Object.isExtensible) {\n Object.isExtensible = function isExtensible(object) {\n if (Object(object) === object) {\n throw new TypeError(); // TODO message\n }\n var name = '';\n while (owns(object, name)) {\n name += '?';\n }\n object[name] = true;\n var returnValue = owns(object, name);\n delete object[name];\n return returnValue;\n };\n}\nif (!Object.keys) {\n var hasDontEnumBug = true,\n dontEnums = [\n \"toString\",\n \"toLocaleString\",\n \"valueOf\",\n \"hasOwnProperty\",\n \"isPrototypeOf\",\n \"propertyIsEnumerable\",\n \"constructor\"\n ],\n dontEnumsLength = dontEnums.length;\n\n for (var key in {\"toString\": null}) {\n hasDontEnumBug = false;\n }\n\n Object.keys = function keys(object) {\n\n if (\n (typeof object != \"object\" && typeof object != \"function\") ||\n object === null\n ) {\n throw new TypeError(\"Object.keys called on a non-object\");\n }\n\n var keys = [];\n for (var name in object) {\n if (owns(object, name)) {\n keys.push(name);\n }\n }\n\n if (hasDontEnumBug) {\n for (var i = 0, ii = dontEnumsLength; i < ii; i++) {\n var dontEnum = dontEnums[i];\n if (owns(object, dontEnum)) {\n keys.push(dontEnum);\n }\n }\n }\n return keys;\n };\n\n}\nif (!Date.now) {\n Date.now = function now() {\n return new Date().getTime();\n };\n}\nvar ws = \"\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\" +\n \"\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\" +\n \"\\u2029\\uFEFF\";\nif (!String.prototype.trim || ws.trim()) {\n ws = \"[\" + ws + \"]\";\n var trimBeginRegexp = new RegExp(\"^\" + ws + ws + \"*\"),\n trimEndRegexp = new RegExp(ws + ws + \"*$\");\n String.prototype.trim = function trim() {\n return String(this).replace(trimBeginRegexp, \"\").replace(trimEndRegexp, \"\");\n };\n}\n\nfunction toInteger(n) {\n n = +n;\n if (n !== n) { // isNaN\n n = 0;\n } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) {\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\n }\n return n;\n}\n\nfunction isPrimitive(input) {\n var type = typeof input;\n return (\n input === null ||\n type === \"undefined\" ||\n type === \"boolean\" ||\n type === \"number\" ||\n type === \"string\"\n );\n}\n\nfunction toPrimitive(input) {\n var val, valueOf, toString;\n if (isPrimitive(input)) {\n return input;\n }\n valueOf = input.valueOf;\n if (typeof valueOf === \"function\") {\n val = valueOf.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n toString = input.toString;\n if (typeof toString === \"function\") {\n val = toString.call(input);\n if (isPrimitive(val)) {\n return val;\n }\n }\n throw new TypeError();\n}\nvar toObject = function (o) {\n if (o == null) { // this matches both null and undefined\n throw new TypeError(\"can't convert \"+o+\" to object\");\n }\n return Object(o);\n};\n\n});\n\nace.define(\"ace/lib/fixoldbrowsers\",[\"require\",\"exports\",\"module\",\"ace/lib/regexp\",\"ace/lib/es5-shim\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./regexp\");\nacequire(\"./es5-shim\");\n\n});\n\nace.define(\"ace/lib/dom\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar XHTML_NS = \"http://www.w3.org/1999/xhtml\";\n\nexports.getDocumentHead = function(doc) {\n if (!doc)\n doc = document;\n return doc.head || doc.getElementsByTagName(\"head\")[0] || doc.documentElement;\n};\n\nexports.createElement = function(tag, ns) {\n return document.createElementNS ?\n document.createElementNS(ns || XHTML_NS, tag) :\n document.createElement(tag);\n};\n\nexports.hasCssClass = function(el, name) {\n var classes = (el.className + \"\").split(/\\s+/g);\n return classes.indexOf(name) !== -1;\n};\nexports.addCssClass = function(el, name) {\n if (!exports.hasCssClass(el, name)) {\n el.className += \" \" + name;\n }\n};\nexports.removeCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g);\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n classes.splice(index, 1);\n }\n el.className = classes.join(\" \");\n};\n\nexports.toggleCssClass = function(el, name) {\n var classes = el.className.split(/\\s+/g), add = true;\n while (true) {\n var index = classes.indexOf(name);\n if (index == -1) {\n break;\n }\n add = false;\n classes.splice(index, 1);\n }\n if (add)\n classes.push(name);\n\n el.className = classes.join(\" \");\n return add;\n};\nexports.setCssClass = function(node, className, include) {\n if (include) {\n exports.addCssClass(node, className);\n } else {\n exports.removeCssClass(node, className);\n }\n};\n\nexports.hasCssString = function(id, doc) {\n var index = 0, sheets;\n doc = doc || document;\n\n if (doc.createStyleSheet && (sheets = doc.styleSheets)) {\n while (index < sheets.length)\n if (sheets[index++].owningElement.id === id) return true;\n } else if ((sheets = doc.getElementsByTagName(\"style\"))) {\n while (index < sheets.length)\n if (sheets[index++].id === id) return true;\n }\n\n return false;\n};\n\nexports.importCssString = function importCssString(cssText, id, doc) {\n doc = doc || document;\n if (id && exports.hasCssString(id, doc))\n return null;\n \n var style;\n \n if (id)\n cssText += \"\\n/*# sourceURL=ace/css/\" + id + \" */\";\n \n if (doc.createStyleSheet) {\n style = doc.createStyleSheet();\n style.cssText = cssText;\n if (id)\n style.owningElement.id = id;\n } else {\n style = exports.createElement(\"style\");\n style.appendChild(doc.createTextNode(cssText));\n if (id)\n style.id = id;\n\n exports.getDocumentHead(doc).appendChild(style);\n }\n};\n\nexports.importCssStylsheet = function(uri, doc) {\n if (doc.createStyleSheet) {\n doc.createStyleSheet(uri);\n } else {\n var link = exports.createElement('link');\n link.rel = 'stylesheet';\n link.href = uri;\n\n exports.getDocumentHead(doc).appendChild(link);\n }\n};\n\nexports.getInnerWidth = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingLeft\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingRight\"), 10) + \n element.clientWidth\n );\n};\n\nexports.getInnerHeight = function(element) {\n return (\n parseInt(exports.computedStyle(element, \"paddingTop\"), 10) +\n parseInt(exports.computedStyle(element, \"paddingBottom\"), 10) +\n element.clientHeight\n );\n};\n\nexports.scrollbarWidth = function(document) {\n var inner = exports.createElement(\"ace_inner\");\n inner.style.width = \"100%\";\n inner.style.minWidth = \"0px\";\n inner.style.height = \"200px\";\n inner.style.display = \"block\";\n\n var outer = exports.createElement(\"ace_outer\");\n var style = outer.style;\n\n style.position = \"absolute\";\n style.left = \"-10000px\";\n style.overflow = \"hidden\";\n style.width = \"200px\";\n style.minWidth = \"0px\";\n style.height = \"150px\";\n style.display = \"block\";\n\n outer.appendChild(inner);\n\n var body = document.documentElement;\n body.appendChild(outer);\n\n var noScrollbar = inner.offsetWidth;\n\n style.overflow = \"scroll\";\n var withScrollbar = inner.offsetWidth;\n\n if (noScrollbar == withScrollbar) {\n withScrollbar = outer.clientWidth;\n }\n\n body.removeChild(outer);\n\n return noScrollbar-withScrollbar;\n};\n\nif (typeof document == \"undefined\") {\n exports.importCssString = function() {};\n return;\n}\n\nif (window.pageYOffset !== undefined) {\n exports.getPageScrollTop = function() {\n return window.pageYOffset;\n };\n\n exports.getPageScrollLeft = function() {\n return window.pageXOffset;\n };\n}\nelse {\n exports.getPageScrollTop = function() {\n return document.body.scrollTop;\n };\n\n exports.getPageScrollLeft = function() {\n return document.body.scrollLeft;\n };\n}\n\nif (window.getComputedStyle)\n exports.computedStyle = function(element, style) {\n if (style)\n return (window.getComputedStyle(element, \"\") || {})[style] || \"\";\n return window.getComputedStyle(element, \"\") || {};\n };\nelse\n exports.computedStyle = function(element, style) {\n if (style)\n return element.currentStyle[style];\n return element.currentStyle;\n };\nexports.setInnerHtml = function(el, innerHtml) {\n var element = el.cloneNode(false);//document.createElement(\"div\");\n element.innerHTML = innerHtml;\n el.parentNode.replaceChild(element, el);\n return element;\n};\n\nif (\"textContent\" in document.documentElement) {\n exports.setInnerText = function(el, innerText) {\n el.textContent = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.textContent;\n };\n}\nelse {\n exports.setInnerText = function(el, innerText) {\n el.innerText = innerText;\n };\n\n exports.getInnerText = function(el) {\n return el.innerText;\n };\n}\n\nexports.getParentWindow = function(document) {\n return document.defaultView || document.parentWindow;\n};\n\n});\n\nace.define(\"ace/lib/oop\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.inherits = function(ctor, superCtor) {\n ctor.super_ = superCtor;\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n};\n\nexports.mixin = function(obj, mixin) {\n for (var key in mixin) {\n obj[key] = mixin[key];\n }\n return obj;\n};\n\nexports.implement = function(proto, mixin) {\n exports.mixin(proto, mixin);\n};\n\n});\n\nace.define(\"ace/lib/keys\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./fixoldbrowsers\");\n\nvar oop = acequire(\"./oop\");\nvar Keys = (function() {\n var ret = {\n MODIFIER_KEYS: {\n 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta'\n },\n\n KEY_MODS: {\n \"ctrl\": 1, \"alt\": 2, \"option\" : 2, \"shift\": 4,\n \"super\": 8, \"meta\": 8, \"command\": 8, \"cmd\": 8\n },\n\n FUNCTION_KEYS : {\n 8 : \"Backspace\",\n 9 : \"Tab\",\n 13 : \"Return\",\n 19 : \"Pause\",\n 27 : \"Esc\",\n 32 : \"Space\",\n 33 : \"PageUp\",\n 34 : \"PageDown\",\n 35 : \"End\",\n 36 : \"Home\",\n 37 : \"Left\",\n 38 : \"Up\",\n 39 : \"Right\",\n 40 : \"Down\",\n 44 : \"Print\",\n 45 : \"Insert\",\n 46 : \"Delete\",\n 96 : \"Numpad0\",\n 97 : \"Numpad1\",\n 98 : \"Numpad2\",\n 99 : \"Numpad3\",\n 100: \"Numpad4\",\n 101: \"Numpad5\",\n 102: \"Numpad6\",\n 103: \"Numpad7\",\n 104: \"Numpad8\",\n 105: \"Numpad9\",\n '-13': \"NumpadEnter\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"Numlock\",\n 145: \"Scrolllock\"\n },\n\n PRINTABLE_KEYS: {\n 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5',\n 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a',\n 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h',\n 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o',\n 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v',\n 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.',\n 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',\n 219: '[', 220: '\\\\',221: ']', 222: \"'\", 111: '/', 106: '*'\n }\n };\n var name, i;\n for (i in ret.FUNCTION_KEYS) {\n name = ret.FUNCTION_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n for (i in ret.PRINTABLE_KEYS) {\n name = ret.PRINTABLE_KEYS[i].toLowerCase();\n ret[name] = parseInt(i, 10);\n }\n oop.mixin(ret, ret.MODIFIER_KEYS);\n oop.mixin(ret, ret.PRINTABLE_KEYS);\n oop.mixin(ret, ret.FUNCTION_KEYS);\n ret.enter = ret[\"return\"];\n ret.escape = ret.esc;\n ret.del = ret[\"delete\"];\n ret[173] = '-';\n \n (function() {\n var mods = [\"cmd\", \"ctrl\", \"alt\", \"shift\"];\n for (var i = Math.pow(2, mods.length); i--;) { \n ret.KEY_MODS[i] = mods.filter(function(x) {\n return i & ret.KEY_MODS[x];\n }).join(\"-\") + \"-\";\n }\n })();\n\n ret.KEY_MODS[0] = \"\";\n ret.KEY_MODS[-1] = \"input-\";\n\n return ret;\n})();\noop.mixin(exports, Keys);\n\nexports.keyCodeToString = function(keyCode) {\n var keyString = Keys[keyCode];\n if (typeof keyString != \"string\")\n keyString = String.fromCharCode(keyCode);\n return keyString.toLowerCase();\n};\n\n});\n\nace.define(\"ace/lib/useragent\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.OS = {\n LINUX: \"LINUX\",\n MAC: \"MAC\",\n WINDOWS: \"WINDOWS\"\n};\nexports.getOS = function() {\n if (exports.isMac) {\n return exports.OS.MAC;\n } else if (exports.isLinux) {\n return exports.OS.LINUX;\n } else {\n return exports.OS.WINDOWS;\n }\n};\nif (typeof navigator != \"object\")\n return;\n\nvar os = (navigator.platform.match(/mac|win|linux/i) || [\"other\"])[0].toLowerCase();\nvar ua = navigator.userAgent;\nexports.isWin = (os == \"win\");\nexports.isMac = (os == \"mac\");\nexports.isLinux = (os == \"linux\");\nexports.isIE = \n (navigator.appName == \"Microsoft Internet Explorer\" || navigator.appName.indexOf(\"MSAppHost\") >= 0)\n ? parseFloat((ua.match(/(?:MSIE |Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1])\n : parseFloat((ua.match(/(?:Trident\\/[0-9]+[\\.0-9]+;.*rv:)([0-9]+[\\.0-9]+)/)||[])[1]); // for ie\n \nexports.isOldIE = exports.isIE && exports.isIE < 9;\nexports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === \"Gecko\";\nexports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv:(\\d+)/)||[])[1], 10) < 4;\nexports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == \"[object Opera]\";\nexports.isWebKit = parseFloat(ua.split(\"WebKit/\")[1]) || undefined;\n\nexports.isChrome = parseFloat(ua.split(\" Chrome/\")[1]) || undefined;\n\nexports.isAIR = ua.indexOf(\"AdobeAIR\") >= 0;\n\nexports.isIPad = ua.indexOf(\"iPad\") >= 0;\n\nexports.isChromeOS = ua.indexOf(\" CrOS \") >= 0;\n\nexports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream;\n\nif (exports.isIOS) exports.isMac = true;\n\n});\n\nace.define(\"ace/lib/event\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keys = acequire(\"./keys\");\nvar useragent = acequire(\"./useragent\");\n\nvar pressedKeys = null;\nvar ts = 0;\n\nexports.addListener = function(elem, type, callback) {\n if (elem.addEventListener) {\n return elem.addEventListener(type, callback, false);\n }\n if (elem.attachEvent) {\n var wrapper = function() {\n callback.call(elem, window.event);\n };\n callback._wrapper = wrapper;\n elem.attachEvent(\"on\" + type, wrapper);\n }\n};\n\nexports.removeListener = function(elem, type, callback) {\n if (elem.removeEventListener) {\n return elem.removeEventListener(type, callback, false);\n }\n if (elem.detachEvent) {\n elem.detachEvent(\"on\" + type, callback._wrapper || callback);\n }\n};\nexports.stopEvent = function(e) {\n exports.stopPropagation(e);\n exports.preventDefault(e);\n return false;\n};\n\nexports.stopPropagation = function(e) {\n if (e.stopPropagation)\n e.stopPropagation();\n else\n e.cancelBubble = true;\n};\n\nexports.preventDefault = function(e) {\n if (e.preventDefault)\n e.preventDefault();\n else\n e.returnValue = false;\n};\nexports.getButton = function(e) {\n if (e.type == \"dblclick\")\n return 0;\n if (e.type == \"contextmenu\" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))\n return 2;\n if (e.preventDefault) {\n return e.button;\n }\n else {\n return {1:0, 2:2, 4:1}[e.button];\n }\n};\n\nexports.capture = function(el, eventHandler, releaseCaptureHandler) {\n function onMouseUp(e) {\n eventHandler && eventHandler(e);\n releaseCaptureHandler && releaseCaptureHandler(e);\n\n exports.removeListener(document, \"mousemove\", eventHandler, true);\n exports.removeListener(document, \"mouseup\", onMouseUp, true);\n exports.removeListener(document, \"dragstart\", onMouseUp, true);\n }\n\n exports.addListener(document, \"mousemove\", eventHandler, true);\n exports.addListener(document, \"mouseup\", onMouseUp, true);\n exports.addListener(document, \"dragstart\", onMouseUp, true);\n \n return onMouseUp;\n};\n\nexports.addTouchMoveListener = function (el, callback) {\n var startx, starty;\n exports.addListener(el, \"touchstart\", function (e) {\n var touches = e.touches;\n var touchObj = touches[0];\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n });\n exports.addListener(el, \"touchmove\", function (e) {\n var touches = e.touches;\n if (touches.length > 1) return;\n\n var touchObj = touches[0];\n\n e.wheelX = startx - touchObj.clientX;\n e.wheelY = starty - touchObj.clientY;\n\n startx = touchObj.clientX;\n starty = touchObj.clientY;\n\n callback(e);\n });\n};\n\nexports.addMouseWheelListener = function(el, callback) {\n if (\"onmousewheel\" in el) {\n exports.addListener(el, \"mousewheel\", function(e) {\n var factor = 8;\n if (e.wheelDeltaX !== undefined) {\n e.wheelX = -e.wheelDeltaX / factor;\n e.wheelY = -e.wheelDeltaY / factor;\n } else {\n e.wheelX = 0;\n e.wheelY = -e.wheelDelta / factor;\n }\n callback(e);\n });\n } else if (\"onwheel\" in el) {\n exports.addListener(el, \"wheel\", function(e) {\n var factor = 0.35;\n switch (e.deltaMode) {\n case e.DOM_DELTA_PIXEL:\n e.wheelX = e.deltaX * factor || 0;\n e.wheelY = e.deltaY * factor || 0;\n break;\n case e.DOM_DELTA_LINE:\n case e.DOM_DELTA_PAGE:\n e.wheelX = (e.deltaX || 0) * 5;\n e.wheelY = (e.deltaY || 0) * 5;\n break;\n }\n \n callback(e);\n });\n } else {\n exports.addListener(el, \"DOMMouseScroll\", function(e) {\n if (e.axis && e.axis == e.HORIZONTAL_AXIS) {\n e.wheelX = (e.detail || 0) * 5;\n e.wheelY = 0;\n } else {\n e.wheelX = 0;\n e.wheelY = (e.detail || 0) * 5;\n }\n callback(e);\n });\n }\n};\n\nexports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) {\n var clicks = 0;\n var startX, startY, timer; \n var eventNames = {\n 2: \"dblclick\",\n 3: \"tripleclick\",\n 4: \"quadclick\"\n };\n\n function onMousedown(e) {\n if (exports.getButton(e) !== 0) {\n clicks = 0;\n } else if (e.detail > 1) {\n clicks++;\n if (clicks > 4)\n clicks = 1;\n } else {\n clicks = 1;\n }\n if (useragent.isIE) {\n var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;\n if (!timer || isNewClick)\n clicks = 1;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600);\n\n if (clicks == 1) {\n startX = e.clientX;\n startY = e.clientY;\n }\n }\n \n e._clicks = clicks;\n\n eventHandler[callbackName](\"mousedown\", e);\n\n if (clicks > 4)\n clicks = 0;\n else if (clicks > 1)\n return eventHandler[callbackName](eventNames[clicks], e);\n }\n function onDblclick(e) {\n clicks = 2;\n if (timer)\n clearTimeout(timer);\n timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600);\n eventHandler[callbackName](\"mousedown\", e);\n eventHandler[callbackName](eventNames[clicks], e);\n }\n if (!Array.isArray(elements))\n elements = [elements];\n elements.forEach(function(el) {\n exports.addListener(el, \"mousedown\", onMousedown);\n if (useragent.isOldIE)\n exports.addListener(el, \"dblclick\", onDblclick);\n });\n};\n\nvar getModifierHash = useragent.isMac && useragent.isOpera && !(\"KeyboardEvent\" in window)\n ? function(e) {\n return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);\n }\n : function(e) {\n return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);\n };\n\nexports.getModifierString = function(e) {\n return keys.KEY_MODS[getModifierHash(e)];\n};\n\nfunction normalizeCommandKeys(callback, e, keyCode) {\n var hashId = getModifierHash(e);\n\n if (!useragent.isMac && pressedKeys) {\n if (e.getModifierState && (e.getModifierState(\"OS\") || e.getModifierState(\"Win\")))\n hashId |= 8;\n if (pressedKeys.altGr) {\n if ((3 & hashId) != 3)\n pressedKeys.altGr = 0;\n else\n return;\n }\n if (keyCode === 18 || keyCode === 17) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (keyCode === 17 && location === 1) {\n if (pressedKeys[keyCode] == 1)\n ts = e.timeStamp;\n } else if (keyCode === 18 && hashId === 3 && location === 2) {\n var dt = e.timeStamp - ts;\n if (dt < 50)\n pressedKeys.altGr = true;\n }\n }\n }\n \n if (keyCode in keys.MODIFIER_KEYS) {\n keyCode = -1;\n }\n if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {\n keyCode = -1;\n }\n \n if (!hashId && keyCode === 13) {\n var location = \"location\" in e ? e.location : e.keyLocation;\n if (location === 3) {\n callback(e, hashId, -keyCode);\n if (e.defaultPrevented)\n return;\n }\n }\n \n if (useragent.isChromeOS && hashId & 8) {\n callback(e, hashId, keyCode);\n if (e.defaultPrevented)\n return;\n else\n hashId &= ~8;\n }\n if (!hashId && !(keyCode in keys.FUNCTION_KEYS) && !(keyCode in keys.PRINTABLE_KEYS)) {\n return false;\n }\n \n return callback(e, hashId, keyCode);\n}\n\n\nexports.addCommandKeyListener = function(el, callback) {\n var addListener = exports.addListener;\n if (useragent.isOldGecko || (useragent.isOpera && !(\"KeyboardEvent\" in window))) {\n var lastKeyDownKeyCode = null;\n addListener(el, \"keydown\", function(e) {\n lastKeyDownKeyCode = e.keyCode;\n });\n addListener(el, \"keypress\", function(e) {\n return normalizeCommandKeys(callback, e, lastKeyDownKeyCode);\n });\n } else {\n var lastDefaultPrevented = null;\n\n addListener(el, \"keydown\", function(e) {\n pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;\n var result = normalizeCommandKeys(callback, e, e.keyCode);\n lastDefaultPrevented = e.defaultPrevented;\n return result;\n });\n\n addListener(el, \"keypress\", function(e) {\n if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {\n exports.stopEvent(e);\n lastDefaultPrevented = null;\n }\n });\n\n addListener(el, \"keyup\", function(e) {\n pressedKeys[e.keyCode] = null;\n });\n\n if (!pressedKeys) {\n resetPressedKeys();\n addListener(window, \"focus\", resetPressedKeys);\n }\n }\n};\nfunction resetPressedKeys() {\n pressedKeys = Object.create(null);\n}\n\nif (typeof window == \"object\" && window.postMessage && !useragent.isOldIE) {\n var postMessageId = 1;\n exports.nextTick = function(callback, win) {\n win = win || window;\n var messageName = \"zero-timeout-message-\" + postMessageId;\n exports.addListener(win, \"message\", function listener(e) {\n if (e.data == messageName) {\n exports.stopPropagation(e);\n exports.removeListener(win, \"message\", listener);\n callback();\n }\n });\n win.postMessage(messageName, \"*\");\n };\n}\n\n\nexports.nextFrame = typeof window == \"object\" && (window.requestAnimationFrame\n || window.mozRequestAnimationFrame\n || window.webkitRequestAnimationFrame\n || window.msRequestAnimationFrame\n || window.oRequestAnimationFrame);\n\nif (exports.nextFrame)\n exports.nextFrame = exports.nextFrame.bind(window);\nelse\n exports.nextFrame = function(callback) {\n setTimeout(callback, 17);\n };\n});\n\nace.define(\"ace/lib/lang\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.last = function(a) {\n return a[a.length - 1];\n};\n\nexports.stringReverse = function(string) {\n return string.split(\"\").reverse().join(\"\");\n};\n\nexports.stringRepeat = function (string, count) {\n var result = '';\n while (count > 0) {\n if (count & 1)\n result += string;\n\n if (count >>= 1)\n string += string;\n }\n return result;\n};\n\nvar trimBeginRegexp = /^\\s\\s*/;\nvar trimEndRegexp = /\\s\\s*$/;\n\nexports.stringTrimLeft = function (string) {\n return string.replace(trimBeginRegexp, '');\n};\n\nexports.stringTrimRight = function (string) {\n return string.replace(trimEndRegexp, '');\n};\n\nexports.copyObject = function(obj) {\n var copy = {};\n for (var key in obj) {\n copy[key] = obj[key];\n }\n return copy;\n};\n\nexports.copyArray = function(array){\n var copy = [];\n for (var i=0, l=array.length; i PLACEHOLDER.length)\n data = data.substr(9);\n else if (data.substr(0, 4) == PLACEHOLDER.substr(0, 4))\n data = data.substr(4, data.length - PLACEHOLDER.length + 1);\n else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n if (data == PLACEHOLDER.charAt(0)) {\n } else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n\n if (data)\n host.onTextInput(data);\n }\n if (copied) {\n copied = false;\n }\n if (afterContextMenu)\n afterContextMenu = false;\n };\n var onInput = function(e) {\n if (inComposition)\n return;\n var data = text.value;\n sendText(data);\n resetValue();\n };\n\n var handleClipboardData = function(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch(e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function(e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n if (useragent.isIOS) {\n cut = isCut;\n text.value = \"\\n aa\" + data + \"a a\\n\";\n text.setSelectionRange(4, 4 + data.length);\n copied = {\n value: data\n };\n }\n isCut ? host.onCut() : host.onCopy();\n if (!useragent.isIOS) event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function(){\n copied = false;\n resetValue();\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n\n var onCut = function(e) {\n doCopy(e, true);\n };\n\n var onCopy = function(e) {\n doCopy(e, false);\n };\n\n var onPaste = function(e) {\n var data = handleClipboardData(e);\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n\n event.addListener(text, \"select\", onSelect);\n\n event.addListener(text, \"input\", onInput);\n\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n var onCompositionStart = function(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly)\n return;\n inComposition = {};\n inComposition.canUndo = host.session.$undoManager;\n host.onCompositionStart();\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", onCompositionEnd);\n if (inComposition.canUndo && !host.selection.isEmpty()) {\n host.insert(\"\");\n host.session.markUndoGroup();\n host.selection.clearSelection();\n }\n host.session.markUndoGroup();\n };\n\n var onCompositionUpdate = function() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n var val = text.value.replace(/\\x01/g, \"\");\n if (inComposition.lastValue === val) return;\n\n host.onCompositionUpdate(val);\n if (inComposition.lastValue)\n host.undo();\n if (inComposition.canUndo)\n inComposition.lastValue = val;\n if (inComposition.lastValue) {\n var r = host.selection.getRange();\n host.insert(inComposition.lastValue);\n host.session.markUndoGroup();\n inComposition.range = host.selection.getRange();\n host.selection.setRange(r);\n host.selection.clearSelection();\n }\n };\n\n var onCompositionEnd = function(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n var c = inComposition;\n inComposition = false;\n var timer = setTimeout(function() {\n timer = null;\n var str = text.value.replace(/\\x01/g, \"\");\n if (inComposition)\n return;\n else if (str == c.lastValue)\n resetValue();\n else if (!c.lastValue && str) {\n resetValue();\n sendText(str);\n }\n });\n inputHandler = function compositionInputHandler(str) {\n if (timer)\n clearTimeout(timer);\n str = str.replace(/\\x01/g, \"\");\n if (str == c.lastValue)\n return \"\";\n if (c.lastValue && timer)\n host.undo();\n return str;\n };\n host.onCompositionEnd();\n host.removeListener(\"mousedown\", onCompositionEnd);\n if (e.type == \"compositionend\" && c.range) {\n host.selection.setRange(c.range);\n }\n var needsOnInput =\n (!!useragent.isChrome && useragent.isChrome >= 53) ||\n (!!useragent.isWebKit && useragent.isWebKit >= 603);\n\n if (needsOnInput) {\n onInput();\n }\n };\n\n\n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50);\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n if (useragent.isGecko) {\n event.addListener(text, \"text\", function(){syncComposition.schedule();});\n } else {\n event.addListener(text, \"keyup\", function(){syncComposition.schedule();});\n event.addListener(text, \"keydown\", function(){syncComposition.schedule();});\n }\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function() {\n return text;\n };\n\n this.setReadOnly = function(readOnly) {\n text.readOnly = readOnly;\n };\n\n this.onContextMenu = function(e) {\n afterContextMenu = true;\n resetSelection(host.selection.isEmpty());\n host._emit(\"nativecontextmenu\", {target: host, domEvent: e});\n this.moveToMouse(e, true);\n };\n\n this.moveToMouse = function(e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + \"height:\" + text.style.height + \";\"\n + (useragent.isIE ? \"opacity:0.1;\" : \"\");\n\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight -2;\n var move = function(e) {\n text.style.left = e.clientX - left - 2 + \"px\";\n text.style.top = Math.min(e.clientY - top - 2, maxTop) + \"px\";\n };\n move(e);\n\n if (e.type != \"mousedown\")\n return;\n\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$keepTextAreaAtCursor = null;\n\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n if (host.renderer.$keepTextAreaAtCursor == null) {\n host.renderer.$keepTextAreaAtCursor = true;\n host.renderer.$moveTextAreaToCursor();\n }\n }, 0);\n }\n\n var onContextMenu = function(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function(e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n\n if (useragent.isIOS) {\n var typingResetTimeout = null;\n var typing = false;\n\n parentNode.addEventListener(\"keydown\", function (e) {\n if (typingResetTimeout) clearTimeout(typingResetTimeout);\n typing = true;\n });\n\n parentNode.addEventListener(\"keyup\", function (e) {\n typingResetTimeout = setTimeout(function () {\n typing = false;\n }, 100);\n });\n var detectArrowKeys = function(e) {\n if (document.activeElement !== text) return;\n if (typing) return;\n\n if (cut) {\n return setTimeout(function () {\n cut = false;\n }, 100);\n }\n var selectionStart = text.selectionStart;\n var selectionEnd = text.selectionEnd;\n text.setSelectionRange(4, 5);\n if (selectionStart == selectionEnd) {\n switch (selectionStart) {\n case 0: host.onCommandKey(null, 0, KEYS.up); break;\n case 1: host.onCommandKey(null, 0, KEYS.home); break;\n case 2: host.onCommandKey(null, MODS.option, KEYS.left); break;\n case 4: host.onCommandKey(null, 0, KEYS.left); break;\n case 5: host.onCommandKey(null, 0, KEYS.right); break;\n case 7: host.onCommandKey(null, MODS.option, KEYS.right); break;\n case 8: host.onCommandKey(null, 0, KEYS.end); break;\n case 9: host.onCommandKey(null, 0, KEYS.down); break;\n }\n } else {\n switch (selectionEnd) {\n case 6: host.onCommandKey(null, MODS.shift, KEYS.right); break;\n case 7: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.right); break;\n case 8: host.onCommandKey(null, MODS.shift, KEYS.end); break;\n case 9: host.onCommandKey(null, MODS.shift, KEYS.down); break;\n }\n switch (selectionStart) {\n case 0: host.onCommandKey(null, MODS.shift, KEYS.up); break;\n case 1: host.onCommandKey(null, MODS.shift, KEYS.home); break;\n case 2: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.left); break;\n case 3: host.onCommandKey(null, MODS.shift, KEYS.left); break;\n }\n }\n };\n document.addEventListener(\"selectionchange\", detectArrowKeys);\n host.on(\"destroy\", function() {\n document.removeEventListener(\"selectionchange\", detectArrowKeys);\n });\n }\n};\n\nexports.TextInput = TextInput;\n});\n\nace.define(\"ace/keyboard/textinput\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/keyboard/textinput_ios\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar BROKEN_SETDATA = useragent.isChrome < 18;\nvar USE_IE_MIME_TYPE = useragent.isIE;\n\nvar TextInputIOS = acequire(\"./textinput_ios\").TextInput;\nvar TextInput = function(parentNode, host) {\n if (useragent.isIOS)\n return TextInputIOS.call(this, parentNode, host);\n\n var text = dom.createElement(\"textarea\");\n text.className = \"ace_text-input\";\n\n text.setAttribute(\"wrap\", \"off\");\n text.setAttribute(\"autocorrect\", \"off\");\n text.setAttribute(\"autocapitalize\", \"off\");\n text.setAttribute(\"spellcheck\", false);\n\n text.style.opacity = \"0\";\n parentNode.insertBefore(text, parentNode.firstChild);\n\n var PLACEHOLDER = \"\\u2028\\u2028\";\n\n var copied = false;\n var pasted = false;\n var inComposition = false;\n var tempStyle = '';\n var isSelectionEmpty = true;\n try { var isFocused = document.activeElement === text; } catch(e) {}\n \n event.addListener(text, \"blur\", function(e) {\n host.onBlur(e);\n isFocused = false;\n });\n event.addListener(text, \"focus\", function(e) {\n isFocused = true;\n host.onFocus(e);\n resetSelection();\n });\n this.focus = function() {\n if (tempStyle) return text.focus();\n var top = text.style.top;\n text.style.position = \"fixed\";\n text.style.top = \"0px\";\n text.focus();\n setTimeout(function() {\n text.style.position = \"\";\n if (text.style.top == \"0px\")\n text.style.top = top;\n }, 0);\n };\n this.blur = function() {\n text.blur();\n };\n this.isFocused = function() {\n return isFocused;\n };\n var syncSelection = lang.delayedCall(function() {\n isFocused && resetSelection(isSelectionEmpty);\n });\n var syncValue = lang.delayedCall(function() {\n if (!inComposition) {\n text.value = PLACEHOLDER;\n isFocused && resetSelection();\n }\n });\n\n function resetSelection(isEmpty) {\n if (inComposition)\n return;\n inComposition = true;\n \n if (inputHandler) {\n var selectionStart = 0;\n var selectionEnd = isEmpty ? 0 : text.value.length - 1;\n } else {\n var selectionStart = isEmpty ? 2 : 1;\n var selectionEnd = 2;\n }\n try {\n text.setSelectionRange(selectionStart, selectionEnd);\n } catch(e){}\n \n inComposition = false;\n }\n\n function resetValue() {\n if (inComposition)\n return;\n text.value = PLACEHOLDER;\n if (useragent.isWebKit)\n syncValue.schedule();\n }\n\n useragent.isWebKit || host.addEventListener('changeSelection', function() {\n if (host.selection.isEmpty() != isSelectionEmpty) {\n isSelectionEmpty = !isSelectionEmpty;\n syncSelection.schedule();\n }\n });\n\n resetValue();\n if (isFocused)\n host.onFocus();\n\n\n var isAllSelected = function(text) {\n return text.selectionStart === 0 && text.selectionEnd === text.value.length;\n };\n\n var onSelect = function(e) {\n if (copied) {\n copied = false;\n } else if (isAllSelected(text)) {\n host.selectAll();\n resetSelection();\n } else if (inputHandler) {\n resetSelection(host.selection.isEmpty());\n }\n };\n\n var inputHandler = null;\n this.setInputHandler = function(cb) {inputHandler = cb;};\n this.getInputHandler = function() {return inputHandler;};\n var afterContextMenu = false;\n \n var sendText = function(data) {\n if (inputHandler) {\n data = inputHandler(data);\n inputHandler = null;\n }\n if (pasted) {\n resetSelection();\n if (data)\n host.onPaste(data);\n pasted = false;\n } else if (data == PLACEHOLDER.charAt(0)) {\n if (afterContextMenu)\n host.execCommand(\"del\", {source: \"ace\"});\n else // some versions of android do not fire keydown when pressing backspace\n host.execCommand(\"backspace\", {source: \"ace\"});\n } else {\n if (data.substring(0, 2) == PLACEHOLDER)\n data = data.substr(2);\n else if (data.charAt(0) == PLACEHOLDER.charAt(0))\n data = data.substr(1);\n else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))\n data = data.slice(0, -1);\n \n if (data)\n host.onTextInput(data);\n }\n if (afterContextMenu)\n afterContextMenu = false;\n };\n var onInput = function(e) {\n if (inComposition)\n return;\n var data = text.value;\n sendText(data);\n resetValue();\n };\n \n var handleClipboardData = function(e, data, forceIEMime) {\n var clipboardData = e.clipboardData || window.clipboardData;\n if (!clipboardData || BROKEN_SETDATA)\n return;\n var mime = USE_IE_MIME_TYPE || forceIEMime ? \"Text\" : \"text/plain\";\n try {\n if (data) {\n return clipboardData.setData(mime, data) !== false;\n } else {\n return clipboardData.getData(mime);\n }\n } catch(e) {\n if (!forceIEMime)\n return handleClipboardData(e, data, true);\n }\n };\n\n var doCopy = function(e, isCut) {\n var data = host.getCopyText();\n if (!data)\n return event.preventDefault(e);\n\n if (handleClipboardData(e, data)) {\n isCut ? host.onCut() : host.onCopy();\n event.preventDefault(e);\n } else {\n copied = true;\n text.value = data;\n text.select();\n setTimeout(function(){\n copied = false;\n resetValue();\n resetSelection();\n isCut ? host.onCut() : host.onCopy();\n });\n }\n };\n \n var onCut = function(e) {\n doCopy(e, true);\n };\n \n var onCopy = function(e) {\n doCopy(e, false);\n };\n \n var onPaste = function(e) {\n var data = handleClipboardData(e);\n if (typeof data == \"string\") {\n if (data)\n host.onPaste(data, e);\n if (useragent.isIE)\n setTimeout(resetSelection);\n event.preventDefault(e);\n }\n else {\n text.value = \"\";\n pasted = true;\n }\n };\n\n event.addCommandKeyListener(text, host.onCommandKey.bind(host));\n\n event.addListener(text, \"select\", onSelect);\n\n event.addListener(text, \"input\", onInput);\n\n event.addListener(text, \"cut\", onCut);\n event.addListener(text, \"copy\", onCopy);\n event.addListener(text, \"paste\", onPaste);\n if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) {\n event.addListener(parentNode, \"keydown\", function(e) {\n if ((useragent.isMac && !e.metaKey) || !e.ctrlKey)\n return;\n\n switch (e.keyCode) {\n case 67:\n onCopy(e);\n break;\n case 86:\n onPaste(e);\n break;\n case 88:\n onCut(e);\n break;\n }\n });\n }\n var onCompositionStart = function(e) {\n if (inComposition || !host.onCompositionStart || host.$readOnly) \n return;\n inComposition = {};\n inComposition.canUndo = host.session.$undoManager;\n host.onCompositionStart();\n setTimeout(onCompositionUpdate, 0);\n host.on(\"mousedown\", onCompositionEnd);\n if (inComposition.canUndo && !host.selection.isEmpty()) {\n host.insert(\"\");\n host.session.markUndoGroup();\n host.selection.clearSelection();\n }\n host.session.markUndoGroup();\n };\n\n var onCompositionUpdate = function() {\n if (!inComposition || !host.onCompositionUpdate || host.$readOnly)\n return;\n var val = text.value.replace(/\\u2028/g, \"\");\n if (inComposition.lastValue === val) return;\n \n host.onCompositionUpdate(val);\n if (inComposition.lastValue)\n host.undo();\n if (inComposition.canUndo)\n inComposition.lastValue = val;\n if (inComposition.lastValue) {\n var r = host.selection.getRange();\n host.insert(inComposition.lastValue);\n host.session.markUndoGroup();\n inComposition.range = host.selection.getRange();\n host.selection.setRange(r);\n host.selection.clearSelection();\n }\n };\n\n var onCompositionEnd = function(e) {\n if (!host.onCompositionEnd || host.$readOnly) return;\n var c = inComposition;\n inComposition = false;\n var timer = setTimeout(function() {\n timer = null;\n var str = text.value.replace(/\\u2028/g, \"\");\n if (inComposition)\n return;\n else if (str == c.lastValue)\n resetValue();\n else if (!c.lastValue && str) {\n resetValue();\n sendText(str);\n }\n });\n inputHandler = function compositionInputHandler(str) {\n if (timer)\n clearTimeout(timer);\n str = str.replace(/\\u2028/g, \"\");\n if (str == c.lastValue)\n return \"\";\n if (c.lastValue && timer)\n host.undo();\n return str;\n };\n host.onCompositionEnd();\n host.removeListener(\"mousedown\", onCompositionEnd);\n if (e.type == \"compositionend\" && c.range) {\n host.selection.setRange(c.range);\n }\n var needsOnInput =\n (!!useragent.isChrome && useragent.isChrome >= 53) ||\n (!!useragent.isWebKit && useragent.isWebKit >= 603);\n\n if (needsOnInput) {\n onInput();\n }\n };\n \n \n\n var syncComposition = lang.delayedCall(onCompositionUpdate, 50);\n\n event.addListener(text, \"compositionstart\", onCompositionStart);\n if (useragent.isGecko) {\n event.addListener(text, \"text\", function(){syncComposition.schedule();});\n } else {\n event.addListener(text, \"keyup\", function(){syncComposition.schedule();});\n event.addListener(text, \"keydown\", function(){syncComposition.schedule();});\n }\n event.addListener(text, \"compositionend\", onCompositionEnd);\n\n this.getElement = function() {\n return text;\n };\n\n this.setReadOnly = function(readOnly) {\n text.readOnly = readOnly;\n };\n\n this.onContextMenu = function(e) {\n afterContextMenu = true;\n resetSelection(host.selection.isEmpty());\n host._emit(\"nativecontextmenu\", {target: host, domEvent: e});\n this.moveToMouse(e, true);\n };\n \n this.moveToMouse = function(e, bringToFront) {\n if (!tempStyle)\n tempStyle = text.style.cssText;\n text.style.cssText = (bringToFront ? \"z-index:100000;\" : \"\")\n + \"height:\" + text.style.height + \";\"\n + (useragent.isIE ? \"opacity:0.1;\" : \"\");\n\n var rect = host.container.getBoundingClientRect();\n var style = dom.computedStyle(host.container);\n var top = rect.top + (parseInt(style.borderTopWidth) || 0);\n var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);\n var maxTop = rect.bottom - top - text.clientHeight -2;\n var move = function(e) {\n text.style.left = e.clientX - left - 2 + \"px\";\n text.style.top = Math.min(e.clientY - top - 2, maxTop) + \"px\";\n }; \n move(e);\n\n if (e.type != \"mousedown\")\n return;\n\n if (host.renderer.$keepTextAreaAtCursor)\n host.renderer.$keepTextAreaAtCursor = null;\n\n clearTimeout(closeTimeout);\n if (useragent.isWin)\n event.capture(host.container, move, onContextMenuClose);\n };\n\n this.onContextMenuClose = onContextMenuClose;\n var closeTimeout;\n function onContextMenuClose() {\n clearTimeout(closeTimeout);\n closeTimeout = setTimeout(function () {\n if (tempStyle) {\n text.style.cssText = tempStyle;\n tempStyle = '';\n }\n if (host.renderer.$keepTextAreaAtCursor == null) {\n host.renderer.$keepTextAreaAtCursor = true;\n host.renderer.$moveTextAreaToCursor();\n }\n }, 0);\n }\n\n var onContextMenu = function(e) {\n host.textInput.onContextMenu(e);\n onContextMenuClose();\n };\n event.addListener(text, \"mouseup\", onContextMenu);\n event.addListener(text, \"mousedown\", function(e) {\n e.preventDefault();\n onContextMenuClose();\n });\n event.addListener(host.renderer.scroller, \"contextmenu\", onContextMenu);\n event.addListener(text, \"contextmenu\", onContextMenu);\n};\n\nexports.TextInput = TextInput;\n});\n\nace.define(\"ace/mouse/default_handlers\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar DRAG_OFFSET = 0; // pixels\nvar SCROLL_COOLDOWN_T = 250; // milliseconds\n\nfunction DefaultHandlers(mouseHandler) {\n mouseHandler.$clickSelection = null;\n\n var editor = mouseHandler.editor;\n editor.setDefaultHandler(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n editor.setDefaultHandler(\"dblclick\", this.onDoubleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"tripleclick\", this.onTripleClick.bind(mouseHandler));\n editor.setDefaultHandler(\"quadclick\", this.onQuadClick.bind(mouseHandler));\n editor.setDefaultHandler(\"mousewheel\", this.onMouseWheel.bind(mouseHandler));\n editor.setDefaultHandler(\"touchmove\", this.onTouchMove.bind(mouseHandler));\n\n var exports = [\"select\", \"startSelect\", \"selectEnd\", \"selectAllEnd\", \"selectByWordsEnd\",\n \"selectByLinesEnd\", \"dragWait\", \"dragWaitEnd\", \"focusWait\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n\n mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, \"getLineRange\");\n mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, \"getWordRange\");\n}\n\n(function() {\n\n this.onMouseDown = function(ev) {\n var inSelection = ev.inSelection();\n var pos = ev.getDocumentPosition();\n this.mousedownEvent = ev;\n var editor = this.editor;\n\n var button = ev.getButton();\n if (button !== 0) {\n var selectionRange = editor.getSelectionRange();\n var selectionEmpty = selectionRange.isEmpty();\n editor.$blockScrolling++;\n if (selectionEmpty || button == 1)\n editor.selection.moveToPosition(pos);\n editor.$blockScrolling--;\n if (button == 2) {\n editor.textInput.onContextMenu(ev.domEvent);\n if (!useragent.isMozilla)\n ev.preventDefault();\n }\n return;\n }\n\n this.mousedownEvent.time = Date.now();\n if (inSelection && !editor.isFocused()) {\n editor.focus();\n if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {\n this.setState(\"focusWait\");\n this.captureMouse(ev);\n return;\n }\n }\n\n this.captureMouse(ev);\n this.startSelect(pos, ev.domEvent._clicks > 1);\n return ev.preventDefault();\n };\n\n this.startSelect = function(pos, waitForClickSelection) {\n pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);\n var editor = this.editor;\n editor.$blockScrolling++;\n if (this.mousedownEvent.getShiftKey())\n editor.selection.selectToPosition(pos);\n else if (!waitForClickSelection)\n editor.selection.moveToPosition(pos);\n if (!waitForClickSelection)\n this.select();\n if (editor.renderer.scroller.setCapture) {\n editor.renderer.scroller.setCapture();\n }\n editor.setStyle(\"ace_selecting\");\n this.setState(\"select\");\n editor.$blockScrolling--;\n };\n\n this.select = function() {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmp = this.$clickSelection.comparePoint(cursor);\n\n if (cmp == -1) {\n anchor = this.$clickSelection.end;\n } else if (cmp == 1) {\n anchor = this.$clickSelection.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.extendSelectionBy = function(unitName) {\n var anchor, editor = this.editor;\n var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);\n var range = editor.selection[unitName](cursor.row, cursor.column);\n editor.$blockScrolling++;\n if (this.$clickSelection) {\n var cmpStart = this.$clickSelection.comparePoint(range.start);\n var cmpEnd = this.$clickSelection.comparePoint(range.end);\n\n if (cmpStart == -1 && cmpEnd <= 0) {\n anchor = this.$clickSelection.end;\n if (range.end.row != cursor.row || range.end.column != cursor.column)\n cursor = range.start;\n } else if (cmpEnd == 1 && cmpStart >= 0) {\n anchor = this.$clickSelection.start;\n if (range.start.row != cursor.row || range.start.column != cursor.column)\n cursor = range.end;\n } else if (cmpStart == -1 && cmpEnd == 1) {\n cursor = range.end;\n anchor = range.start;\n } else {\n var orientedRange = calcRangeOrientation(this.$clickSelection, cursor);\n cursor = orientedRange.cursor;\n anchor = orientedRange.anchor;\n }\n editor.selection.setSelectionAnchor(anchor.row, anchor.column);\n }\n editor.selection.selectToPosition(cursor);\n editor.$blockScrolling--;\n editor.renderer.scrollCursorIntoView();\n };\n\n this.selectEnd =\n this.selectAllEnd =\n this.selectByWordsEnd =\n this.selectByLinesEnd = function() {\n this.$clickSelection = null;\n this.editor.unsetStyle(\"ace_selecting\");\n if (this.editor.renderer.scroller.releaseCapture) {\n this.editor.renderer.scroller.releaseCapture();\n }\n };\n\n this.focusWait = function() {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n var time = Date.now();\n\n if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n };\n\n this.onDoubleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n var session = editor.session;\n\n var range = session.getBracketRange(pos);\n if (range) {\n if (range.isEmpty()) {\n range.start.column--;\n range.end.column++;\n }\n this.setState(\"select\");\n } else {\n range = editor.selection.getWordRange(pos.row, pos.column);\n this.setState(\"selectByWords\");\n }\n this.$clickSelection = range;\n this.select();\n };\n\n this.onTripleClick = function(ev) {\n var pos = ev.getDocumentPosition();\n var editor = this.editor;\n\n this.setState(\"selectByLines\");\n var range = editor.getSelectionRange();\n if (range.isMultiLine() && range.contains(pos.row, pos.column)) {\n this.$clickSelection = editor.selection.getLineRange(range.start.row);\n this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;\n } else {\n this.$clickSelection = editor.selection.getLineRange(pos.row);\n }\n this.select();\n };\n\n this.onQuadClick = function(ev) {\n var editor = this.editor;\n\n editor.selectAll();\n this.$clickSelection = editor.getSelectionRange();\n this.setState(\"selectAll\");\n };\n\n this.onMouseWheel = function(ev) {\n if (ev.getAccelKey())\n return;\n if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {\n ev.wheelX = ev.wheelY;\n ev.wheelY = 0;\n }\n \n var editor = this.editor;\n\n if (!this.$lastScroll)\n this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 };\n\n var prevScroll = this.$lastScroll;\n var t = ev.domEvent.timeStamp;\n var dt = t - prevScroll.t;\n var vx = ev.wheelX / dt;\n var vy = ev.wheelY / dt;\n if (dt < SCROLL_COOLDOWN_T) {\n vx = (vx + prevScroll.vx) / 2;\n vy = (vy + prevScroll.vy) / 2;\n }\n\n var direction = Math.abs(vx / vy);\n\n var canScroll = false;\n if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0))\n canScroll = true;\n if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed))\n canScroll = true;\n\n if (canScroll) {\n prevScroll.allowed = t;\n } else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) {\n var isSlower = Math.abs(vx) <= 1.1 * Math.abs(prevScroll.vx)\n && Math.abs(vy) <= 1.1 * Math.abs(prevScroll.vy);\n if (isSlower) {\n canScroll = true;\n prevScroll.allowed = t;\n }\n else {\n prevScroll.allowed = 0;\n }\n }\n\n prevScroll.t = t;\n prevScroll.vx = vx;\n prevScroll.vy = vy;\n\n if (canScroll) {\n editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);\n return ev.stop();\n }\n };\n\n this.onTouchMove = function(ev) {\n this.editor._emit(\"mousewheel\", ev);\n };\n\n}).call(DefaultHandlers.prototype);\n\nexports.DefaultHandlers = DefaultHandlers;\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nfunction calcRangeOrientation(range, cursor) {\n if (range.start.row == range.end.row)\n var cmp = 2 * cursor.column - range.start.column - range.end.column;\n else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)\n var cmp = cursor.column - 4;\n else\n var cmp = 2 * cursor.row - range.start.row - range.end.row;\n\n if (cmp < 0)\n return {cursor: range.start, anchor: range.end};\n else\n return {cursor: range.end, anchor: range.start};\n}\n\n});\n\nace.define(\"ace/tooltip\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nfunction Tooltip (parentNode) {\n this.isOpen = false;\n this.$element = null;\n this.$parentNode = parentNode;\n}\n\n(function() {\n this.$init = function() {\n this.$element = dom.createElement(\"div\");\n this.$element.className = \"ace_tooltip\";\n this.$element.style.display = \"none\";\n this.$parentNode.appendChild(this.$element);\n return this.$element;\n };\n this.getElement = function() {\n return this.$element || this.$init();\n };\n this.setText = function(text) {\n dom.setInnerText(this.getElement(), text);\n };\n this.setHtml = function(html) {\n this.getElement().innerHTML = html;\n };\n this.setPosition = function(x, y) {\n this.getElement().style.left = x + \"px\";\n this.getElement().style.top = y + \"px\";\n };\n this.setClassName = function(className) {\n dom.addCssClass(this.getElement(), className);\n };\n this.show = function(text, x, y) {\n if (text != null)\n this.setText(text);\n if (x != null && y != null)\n this.setPosition(x, y);\n if (!this.isOpen) {\n this.getElement().style.display = \"block\";\n this.isOpen = true;\n }\n };\n\n this.hide = function() {\n if (this.isOpen) {\n this.getElement().style.display = \"none\";\n this.isOpen = false;\n }\n };\n this.getHeight = function() {\n return this.getElement().offsetHeight;\n };\n this.getWidth = function() {\n return this.getElement().offsetWidth;\n };\n\n this.destroy = function() {\n this.isOpen = false;\n if (this.$element && this.$element.parentNode) {\n this.$element.parentNode.removeChild(this.$element);\n }\n };\n\n}).call(Tooltip.prototype);\n\nexports.Tooltip = Tooltip;\n});\n\nace.define(\"ace/mouse/default_gutter_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/event\",\"ace/tooltip\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar event = acequire(\"../lib/event\");\nvar Tooltip = acequire(\"../tooltip\").Tooltip;\n\nfunction GutterHandler(mouseHandler) {\n var editor = mouseHandler.editor;\n var gutter = editor.renderer.$gutterLayer;\n var tooltip = new GutterTooltip(editor.container);\n\n mouseHandler.editor.setDefaultHandler(\"guttermousedown\", function(e) {\n if (!editor.isFocused() || e.getButton() != 0)\n return;\n var gutterRegion = gutter.getRegion(e);\n\n if (gutterRegion == \"foldWidgets\")\n return;\n\n var row = e.getDocumentPosition().row;\n var selection = editor.session.selection;\n\n if (e.getShiftKey())\n selection.selectTo(row, 0);\n else {\n if (e.domEvent.detail == 2) {\n editor.selectAll();\n return e.preventDefault();\n }\n mouseHandler.$clickSelection = editor.selection.getLineRange(row);\n }\n mouseHandler.setState(\"selectByLines\");\n mouseHandler.captureMouse(e);\n return e.preventDefault();\n });\n\n\n var tooltipTimeout, mouseEvent, tooltipAnnotation;\n\n function showTooltip() {\n var row = mouseEvent.getDocumentPosition().row;\n var annotation = gutter.$annotations[row];\n if (!annotation)\n return hideTooltip();\n\n var maxRow = editor.session.getLength();\n if (row == maxRow) {\n var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row;\n var pos = mouseEvent.$pos;\n if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column))\n return hideTooltip();\n }\n\n if (tooltipAnnotation == annotation)\n return;\n tooltipAnnotation = annotation.text.join(\"
    \");\n\n tooltip.setHtml(tooltipAnnotation);\n tooltip.show();\n editor._signal(\"showGutterTooltip\", tooltip);\n editor.on(\"mousewheel\", hideTooltip);\n\n if (mouseHandler.$tooltipFollowsMouse) {\n moveTooltip(mouseEvent);\n } else {\n var gutterElement = mouseEvent.domEvent.target;\n var rect = gutterElement.getBoundingClientRect();\n var style = tooltip.getElement().style;\n style.left = rect.right + \"px\";\n style.top = rect.bottom + \"px\";\n }\n }\n\n function hideTooltip() {\n if (tooltipTimeout)\n tooltipTimeout = clearTimeout(tooltipTimeout);\n if (tooltipAnnotation) {\n tooltip.hide();\n tooltipAnnotation = null;\n editor._signal(\"hideGutterTooltip\", tooltip);\n editor.removeEventListener(\"mousewheel\", hideTooltip);\n }\n }\n\n function moveTooltip(e) {\n tooltip.setPosition(e.x, e.y);\n }\n\n mouseHandler.editor.setDefaultHandler(\"guttermousemove\", function(e) {\n var target = e.domEvent.target || e.domEvent.srcElement;\n if (dom.hasCssClass(target, \"ace_fold-widget\"))\n return hideTooltip();\n\n if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse)\n moveTooltip(e);\n\n mouseEvent = e;\n if (tooltipTimeout)\n return;\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n if (mouseEvent && !mouseHandler.isMousePressed)\n showTooltip();\n else\n hideTooltip();\n }, 50);\n });\n\n event.addListener(editor.renderer.$gutter, \"mouseout\", function(e) {\n mouseEvent = null;\n if (!tooltipAnnotation || tooltipTimeout)\n return;\n\n tooltipTimeout = setTimeout(function() {\n tooltipTimeout = null;\n hideTooltip();\n }, 50);\n });\n \n editor.on(\"changeSession\", hideTooltip);\n}\n\nfunction GutterTooltip(parentNode) {\n Tooltip.call(this, parentNode);\n}\n\noop.inherits(GutterTooltip, Tooltip);\n\n(function(){\n this.setPosition = function(x, y) {\n var windowWidth = window.innerWidth || document.documentElement.clientWidth;\n var windowHeight = window.innerHeight || document.documentElement.clientHeight;\n var width = this.getWidth();\n var height = this.getHeight();\n x += 15;\n y += 15;\n if (x + width > windowWidth) {\n x -= (x + width) - windowWidth;\n }\n if (y + height > windowHeight) {\n y -= 20 + height;\n }\n Tooltip.prototype.setPosition.call(this, x, y);\n };\n\n}).call(GutterTooltip.prototype);\n\n\n\nexports.GutterHandler = GutterHandler;\n\n});\n\nace.define(\"ace/mouse/mouse_event\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nvar MouseEvent = exports.MouseEvent = function(domEvent, editor) {\n this.domEvent = domEvent;\n this.editor = editor;\n \n this.x = this.clientX = domEvent.clientX;\n this.y = this.clientY = domEvent.clientY;\n\n this.$pos = null;\n this.$inSelection = null;\n \n this.propagationStopped = false;\n this.defaultPrevented = false;\n};\n\n(function() { \n \n this.stopPropagation = function() {\n event.stopPropagation(this.domEvent);\n this.propagationStopped = true;\n };\n \n this.preventDefault = function() {\n event.preventDefault(this.domEvent);\n this.defaultPrevented = true;\n };\n \n this.stop = function() {\n this.stopPropagation();\n this.preventDefault();\n };\n this.getDocumentPosition = function() {\n if (this.$pos)\n return this.$pos;\n \n this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY);\n return this.$pos;\n };\n this.inSelection = function() {\n if (this.$inSelection !== null)\n return this.$inSelection;\n \n var editor = this.editor;\n \n\n var selectionRange = editor.getSelectionRange();\n if (selectionRange.isEmpty())\n this.$inSelection = false;\n else {\n var pos = this.getDocumentPosition();\n this.$inSelection = selectionRange.contains(pos.row, pos.column);\n }\n\n return this.$inSelection;\n };\n this.getButton = function() {\n return event.getButton(this.domEvent);\n };\n this.getShiftKey = function() {\n return this.domEvent.shiftKey;\n };\n \n this.getAccelKey = useragent.isMac\n ? function() { return this.domEvent.metaKey; }\n : function() { return this.domEvent.ctrlKey; };\n \n}).call(MouseEvent.prototype);\n\n});\n\nace.define(\"ace/mouse/dragdrop_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\n\nvar AUTOSCROLL_DELAY = 200;\nvar SCROLL_CURSOR_DELAY = 200;\nvar SCROLL_CURSOR_HYSTERESIS = 5;\n\nfunction DragdropHandler(mouseHandler) {\n\n var editor = mouseHandler.editor;\n\n var blankImage = dom.createElement(\"img\");\n blankImage.src = \"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\";\n if (useragent.isOpera)\n blankImage.style.cssText = \"width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;\";\n\n var exports = [\"dragWait\", \"dragWaitEnd\", \"startDrag\", \"dragReadyEnd\", \"onMouseDrag\"];\n\n exports.forEach(function(x) {\n mouseHandler[x] = this[x];\n }, this);\n editor.addEventListener(\"mousedown\", this.onMouseDown.bind(mouseHandler));\n\n\n var mouseTarget = editor.container;\n var dragSelectionMarker, x, y;\n var timerId, range;\n var dragCursor, counter = 0;\n var dragOperation;\n var isInternal;\n var autoScrollStartTime;\n var cursorMovedTime;\n var cursorPointOnCaretMoved;\n\n this.onDragStart = function(e) {\n if (this.cancelDrag || !mouseTarget.draggable) {\n var self = this;\n setTimeout(function(){\n self.startSelect();\n self.captureMouse(e);\n }, 0);\n return e.preventDefault();\n }\n range = editor.getSelectionRange();\n\n var dataTransfer = e.dataTransfer;\n dataTransfer.effectAllowed = editor.getReadOnly() ? \"copy\" : \"copyMove\";\n if (useragent.isOpera) {\n editor.container.appendChild(blankImage);\n blankImage.scrollTop = 0;\n }\n dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);\n if (useragent.isOpera) {\n editor.container.removeChild(blankImage);\n }\n dataTransfer.clearData();\n dataTransfer.setData(\"Text\", editor.session.getTextRange());\n\n isInternal = true;\n this.setState(\"drag\");\n };\n\n this.onDragEnd = function(e) {\n mouseTarget.draggable = false;\n isInternal = false;\n this.setState(null);\n if (!editor.getReadOnly()) {\n var dropEffect = e.dataTransfer.dropEffect;\n if (!dragOperation && dropEffect == \"move\")\n editor.session.remove(editor.getSelectionRange());\n editor.renderer.$cursorLayer.setBlinking(true);\n }\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n };\n\n this.onDragEnter = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker)\n addDragMarker();\n counter++;\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragOver = function(e) {\n if (editor.getReadOnly() || !canAccept(e.dataTransfer))\n return;\n x = e.clientX;\n y = e.clientY;\n if (!dragSelectionMarker) {\n addDragMarker();\n counter++;\n }\n if (onMouseMoveTimer !== null)\n onMouseMoveTimer = null;\n\n e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);\n return event.preventDefault(e);\n };\n\n this.onDragLeave = function(e) {\n counter--;\n if (counter <= 0 && dragSelectionMarker) {\n clearDragMarker();\n dragOperation = null;\n return event.preventDefault(e);\n }\n };\n\n this.onDrop = function(e) {\n if (!dragCursor)\n return;\n var dataTransfer = e.dataTransfer;\n if (isInternal) {\n switch (dragOperation) {\n case \"move\":\n if (range.contains(dragCursor.row, dragCursor.column)) {\n range = {\n start: dragCursor,\n end: dragCursor\n };\n } else {\n range = editor.moveText(range, dragCursor);\n }\n break;\n case \"copy\":\n range = editor.moveText(range, dragCursor, true);\n break;\n }\n } else {\n var dropData = dataTransfer.getData('Text');\n range = {\n start: dragCursor,\n end: editor.session.insert(dragCursor, dropData)\n };\n editor.focus();\n dragOperation = null;\n }\n clearDragMarker();\n return event.preventDefault(e);\n };\n\n event.addListener(mouseTarget, \"dragstart\", this.onDragStart.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragend\", this.onDragEnd.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragenter\", this.onDragEnter.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragover\", this.onDragOver.bind(mouseHandler));\n event.addListener(mouseTarget, \"dragleave\", this.onDragLeave.bind(mouseHandler));\n event.addListener(mouseTarget, \"drop\", this.onDrop.bind(mouseHandler));\n\n function scrollCursorIntoView(cursor, prevCursor) {\n var now = Date.now();\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n var hMovement = !prevCursor || cursor.column != prevCursor.column;\n if (!cursorMovedTime || vMovement || hMovement) {\n editor.$blockScrolling += 1;\n editor.moveCursorToPosition(cursor);\n editor.$blockScrolling -= 1;\n cursorMovedTime = now;\n cursorPointOnCaretMoved = {x: x, y: y};\n } else {\n var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);\n if (distance > SCROLL_CURSOR_HYSTERESIS) {\n cursorMovedTime = null;\n } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {\n editor.renderer.scrollCursorIntoView();\n cursorMovedTime = null;\n }\n }\n }\n\n function autoScroll(cursor, prevCursor) {\n var now = Date.now();\n var lineHeight = editor.renderer.layerConfig.lineHeight;\n var characterWidth = editor.renderer.layerConfig.characterWidth;\n var editorRect = editor.renderer.scroller.getBoundingClientRect();\n var offsets = {\n x: {\n left: x - editorRect.left,\n right: editorRect.right - x\n },\n y: {\n top: y - editorRect.top,\n bottom: editorRect.bottom - y\n }\n };\n var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);\n var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);\n var scrollCursor = {row: cursor.row, column: cursor.column};\n if (nearestXOffset / characterWidth <= 2) {\n scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);\n }\n if (nearestYOffset / lineHeight <= 1) {\n scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);\n }\n var vScroll = cursor.row != scrollCursor.row;\n var hScroll = cursor.column != scrollCursor.column;\n var vMovement = !prevCursor || cursor.row != prevCursor.row;\n if (vScroll || (hScroll && !vMovement)) {\n if (!autoScrollStartTime)\n autoScrollStartTime = now;\n else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)\n editor.renderer.scrollCursorIntoView(scrollCursor);\n } else {\n autoScrollStartTime = null;\n }\n }\n\n function onDragInterval() {\n var prevCursor = dragCursor;\n dragCursor = editor.renderer.screenToTextCoordinates(x, y);\n scrollCursorIntoView(dragCursor, prevCursor);\n autoScroll(dragCursor, prevCursor);\n }\n\n function addDragMarker() {\n range = editor.selection.toOrientedRange();\n dragSelectionMarker = editor.session.addMarker(range, \"ace_selection\", editor.getSelectionStyle());\n editor.clearSelection();\n if (editor.isFocused())\n editor.renderer.$cursorLayer.setBlinking(false);\n clearInterval(timerId);\n onDragInterval();\n timerId = setInterval(onDragInterval, 20);\n counter = 0;\n event.addListener(document, \"mousemove\", onMouseMove);\n }\n\n function clearDragMarker() {\n clearInterval(timerId);\n editor.session.removeMarker(dragSelectionMarker);\n dragSelectionMarker = null;\n editor.$blockScrolling += 1;\n editor.selection.fromOrientedRange(range);\n editor.$blockScrolling -= 1;\n if (editor.isFocused() && !isInternal)\n editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());\n range = null;\n dragCursor = null;\n counter = 0;\n autoScrollStartTime = null;\n cursorMovedTime = null;\n event.removeListener(document, \"mousemove\", onMouseMove);\n }\n var onMouseMoveTimer = null;\n function onMouseMove() {\n if (onMouseMoveTimer == null) {\n onMouseMoveTimer = setTimeout(function() {\n if (onMouseMoveTimer != null && dragSelectionMarker)\n clearDragMarker();\n }, 20);\n }\n }\n\n function canAccept(dataTransfer) {\n var types = dataTransfer.types;\n return !types || Array.prototype.some.call(types, function(type) {\n return type == 'text/plain' || type == 'Text';\n });\n }\n\n function getDropEffect(e) {\n var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];\n var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];\n\n var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;\n var effectAllowed = \"uninitialized\";\n try {\n effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();\n } catch (e) {}\n var dropEffect = \"none\";\n\n if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n else if (moveAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"move\";\n else if (copyAllowed.indexOf(effectAllowed) >= 0)\n dropEffect = \"copy\";\n\n return dropEffect;\n }\n}\n\n(function() {\n\n this.dragWait = function() {\n var interval = Date.now() - this.mousedownEvent.time;\n if (interval > this.editor.getDragDelay())\n this.startDrag();\n };\n\n this.dragWaitEnd = function() {\n var target = this.editor.container;\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n this.selectEnd();\n };\n\n this.dragReadyEnd = function(e) {\n this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());\n this.editor.unsetStyle(\"ace_dragging\");\n this.editor.renderer.setCursorStyle(\"\");\n this.dragWaitEnd();\n };\n\n this.startDrag = function(){\n this.cancelDrag = false;\n var editor = this.editor;\n var target = editor.container;\n target.draggable = true;\n editor.renderer.$cursorLayer.setBlinking(false);\n editor.setStyle(\"ace_dragging\");\n var cursorStyle = useragent.isWin ? \"default\" : \"move\";\n editor.renderer.setCursorStyle(cursorStyle);\n this.setState(\"dragReady\");\n };\n\n this.onMouseDrag = function(e) {\n var target = this.editor.container;\n if (useragent.isIE && this.state == \"dragReady\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 3)\n target.dragDrop();\n }\n if (this.state === \"dragWait\") {\n var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);\n if (distance > 0) {\n target.draggable = false;\n this.startSelect(this.mousedownEvent.getDocumentPosition());\n }\n }\n };\n\n this.onMouseDown = function(e) {\n if (!this.$dragEnabled)\n return;\n this.mousedownEvent = e;\n var editor = this.editor;\n\n var inSelection = e.inSelection();\n var button = e.getButton();\n var clickCount = e.domEvent.detail || 1;\n if (clickCount === 1 && button === 0 && inSelection) {\n if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))\n return;\n this.mousedownEvent.time = Date.now();\n var eventTarget = e.domEvent.target || e.domEvent.srcElement;\n if (\"unselectable\" in eventTarget)\n eventTarget.unselectable = \"on\";\n if (editor.getDragDelay()) {\n if (useragent.isWebKit) {\n this.cancelDrag = true;\n var mouseTarget = editor.container;\n mouseTarget.draggable = true;\n }\n this.setState(\"dragWait\");\n } else {\n this.startDrag();\n }\n this.captureMouse(e, this.onMouseDrag.bind(this));\n e.defaultPrevented = true;\n }\n };\n\n}).call(DragdropHandler.prototype);\n\n\nfunction calcDistance(ax, ay, bx, by) {\n return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));\n}\n\nexports.DragdropHandler = DragdropHandler;\n\n});\n\nace.define(\"ace/lib/net\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\nvar dom = acequire(\"./dom\");\n\nexports.get = function (url, callback) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', url, true);\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n callback(xhr.responseText);\n }\n };\n xhr.send(null);\n};\n\nexports.loadScript = function(path, callback) {\n var head = dom.getDocumentHead();\n var s = document.createElement('script');\n\n s.src = path;\n head.appendChild(s);\n\n s.onload = s.onreadystatechange = function(_, isAbort) {\n if (isAbort || !s.readyState || s.readyState == \"loaded\" || s.readyState == \"complete\") {\n s = s.onload = s.onreadystatechange = null;\n if (!isAbort)\n callback();\n }\n };\n};\nexports.qualifyURL = function(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n};\n\n});\n\nace.define(\"ace/lib/event_emitter\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar EventEmitter = {};\nvar stopPropagation = function() { this.propagationStopped = true; };\nvar preventDefault = function() { this.defaultPrevented = true; };\n\nEventEmitter._emit =\nEventEmitter._dispatchEvent = function(eventName, e) {\n this._eventRegistry || (this._eventRegistry = {});\n this._defaultHandlers || (this._defaultHandlers = {});\n\n var listeners = this._eventRegistry[eventName] || [];\n var defaultHandler = this._defaultHandlers[eventName];\n if (!listeners.length && !defaultHandler)\n return;\n\n if (typeof e != \"object\" || !e)\n e = {};\n\n if (!e.type)\n e.type = eventName;\n if (!e.stopPropagation)\n e.stopPropagation = stopPropagation;\n if (!e.preventDefault)\n e.preventDefault = preventDefault;\n\n listeners = listeners.slice();\n for (var i=0; i 1)\n base = parts[parts.length - 2];\n var path = options[component + \"Path\"];\n if (path == null) {\n path = options.basePath;\n } else if (sep == \"/\") {\n component = sep = \"\";\n }\n if (path && path.slice(-1) != \"/\")\n path += \"/\";\n return path + component + sep + base + this.get(\"suffix\");\n};\n\nexports.setModuleUrl = function(name, subst) {\n return options.$moduleUrls[name] = subst;\n};\n\nexports.$loading = {};\nexports.loadModule = function(moduleName, onLoad) {\n var module, moduleType;\n if (Array.isArray(moduleName)) {\n moduleType = moduleName[0];\n moduleName = moduleName[1];\n }\n\n try {\n module = acequire(moduleName);\n } catch (e) {}\n if (module && !exports.$loading[moduleName])\n return onLoad && onLoad(module);\n\n if (!exports.$loading[moduleName])\n exports.$loading[moduleName] = [];\n\n exports.$loading[moduleName].push(onLoad);\n\n if (exports.$loading[moduleName].length > 1)\n return;\n\n var afterLoad = function() {\n acequire([moduleName], function(module) {\n exports._emit(\"load.module\", {name: moduleName, module: module});\n var listeners = exports.$loading[moduleName];\n exports.$loading[moduleName] = null;\n listeners.forEach(function(onLoad) {\n onLoad && onLoad(module);\n });\n });\n };\n\n if (!exports.get(\"packaged\"))\n return afterLoad();\n net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);\n};\ninit(true);function init(packaged) {\n\n if (!global || !global.document)\n return;\n \n options.packaged = packaged || acequire.packaged || module.packaged || (global.define && __webpack_require__.amdD.packaged);\n\n var scriptOptions = {};\n var scriptUrl = \"\";\n var currentScript = (document.currentScript || document._currentScript ); // native or polyfill\n var currentDocument = currentScript && currentScript.ownerDocument || document;\n \n var scripts = currentDocument.getElementsByTagName(\"script\");\n for (var i=0; i 0){\n\t\t\tif (action == 0x10){\n\t\t\t\tfor(i = condPos; i < ix; i++){\n\t\t\t\t\tlevels[i] = 1;\n\t\t\t\t}\n\t\t\t\tcondPos = -1;\n\t\t\t} else {\n\t\t\t\tcondPos = -1;\n\t\t\t}\n\t\t}\n\t\tcond = impTab[newState][6];\n\t\tif (cond){\n\t\t\tif(condPos == -1){\n\t\t\t\tcondPos = ix;\n\t\t\t}\n\t\t}else{\n\t\t\tif (condPos > -1){\n\t\t\t\tfor(i = condPos; i < ix; i++){\n\t\t\t\t\tlevels[i] = newLevel;\n\t\t\t\t}\n\t\t\t\tcondPos = -1;\n\t\t\t}\n\t\t}\n\t\tif (charTypes[ix] == B){\n\t\t\tlevels[ix] = 0;\n\t\t}\n\t\thiLevel |= newLevel;\n\t}\n\tif (hasUBAT_S){\n\t\tfor(i = 0; i < len; i++){\n\t\t\tif(charTypes[i] == S){\n\t\t\t\tlevels[i] = dir;\n\t\t\t\tfor(var j = i - 1; j >= 0; j--){\n\t\t\t\t\tif(charTypes[j] == WS){\n\t\t\t\t\t\tlevels[j] = dir;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction _invertLevel(lev, levels, _array) {\n\tif (hiLevel < lev){\n\t\treturn;\n\t}\n\tif (lev == 1 && dir == RTL && !hasUBAT_B){\n\t\t_array.reverse();\n\t\treturn;\n\t}\n\tvar len = _array.length, start = 0, end, lo, hi, tmp;\n\twhile(start < len){\n\t\tif (levels[start] >= lev){\n\t\t\tend = start + 1;\n\t\twhile(end < len && levels[end] >= lev){\n\t\t\tend++;\n\t\t}\n\t\tfor(lo = start, hi = end - 1 ; lo < hi; lo++, hi--){\n\t\t\ttmp = _array[lo];\n\t\t\t_array[lo] = _array[hi];\n\t\t\t_array[hi] = tmp;\n\t\t}\n\t\tstart = end;\n\t}\n\tstart++;\n\t}\n}\n\nfunction _getCharClass(chars, types, classes, ix) {\n\tvar cType = types[ix], wType, nType, len, i;\n\tswitch(cType){\n\t\tcase L:\n\t\tcase R:\n\t\t\tlastArabic = false;\n\t\tcase ON:\n\t\tcase AN:\n\t\t\treturn cType;\n\t\tcase EN:\n\t\t\treturn lastArabic ? AN : EN;\n\t\tcase AL:\n\t\t\tlastArabic = true;\n\t\t\thasUBAT_AL = true;\n\t\t\treturn R;\n\t\tcase WS:\n\t\t\treturn ON;\n\t\tcase CS:\n\t\t\tif (ix < 1 || (ix + 1) >= types.length ||\n\t\t\t\t((wType = classes[ix - 1]) != EN && wType != AN) ||\n\t\t\t\t((nType = types[ix + 1]) != EN && nType != AN)){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\tif (lastArabic){nType = AN;}\n\t\t\treturn nType == wType ? nType : ON;\n\t\tcase ES:\n\t\t\twType = ix > 0 ? classes[ix - 1] : B;\n\t\t\tif (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\treturn ON;\n\t\tcase ET:\n\t\t\tif (ix > 0 && classes[ix - 1] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\tif (lastArabic){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\ti = ix + 1;\n\t\t\tlen = types.length;\n\t\t\twhile (i < len && types[i] == ET){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i < len && types[i] == EN){\n\t\t\t\treturn EN;\n\t\t\t}\n\t\t\treturn ON;\n\t\tcase NSM:\n\t\t\tlen = types.length;\n\t\t\ti = ix + 1;\n\t\t\twhile (i < len && types[i] == NSM){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (i < len){\n\t\t\t\tvar c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E;\n\n\t\t\t\twType = types[i];\n\t\t\t\tif (rtlCandidate && (wType == R || wType == AL)){\n\t\t\t\t\treturn R;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (ix < 1 || (wType = types[ix - 1]) == B){\n\t\t\t\treturn ON;\n\t\t\t}\n\t\t\treturn classes[ix - 1];\n\t\tcase B:\n\t\t\tlastArabic = false;\n\t\t\thasUBAT_B = true;\n\t\t\treturn dir;\n\t\tcase S:\n\t\t\thasUBAT_S = true;\n\t\t\treturn ON;\n\t\tcase LRE:\n\t\tcase RLE:\n\t\tcase LRO:\n\t\tcase RLO:\n\t\tcase PDF:\n\t\t\tlastArabic = false;\n\t\tcase BN:\n\t\t\treturn ON;\n\t}\n}\n\nfunction _getCharacterType( ch ) {\n\tvar uc = ch.charCodeAt(0), hi = uc >> 8;\n\n\tif (hi == 0) {\n\t\treturn ((uc > 0x00BF) ? L : UnicodeTBL00[uc]);\n\t} else if (hi == 5) {\n\t\treturn (/[\\u0591-\\u05f4]/.test(ch) ? R : L);\n\t} else if (hi == 6) {\n\t\tif (/[\\u0610-\\u061a\\u064b-\\u065f\\u06d6-\\u06e4\\u06e7-\\u06ed]/.test(ch))\n\t\t\treturn NSM;\n\t\telse if (/[\\u0660-\\u0669\\u066b-\\u066c]/.test(ch))\n\t\t\treturn AN;\n\t\telse if (uc == 0x066A)\n\t\t\treturn ET;\n\t\telse if (/[\\u06f0-\\u06f9]/.test(ch))\n\t\t\treturn EN;\n\t\telse\n\t\t\treturn AL;\n\t} else if (hi == 0x20 && uc <= 0x205F) {\n\t\treturn UnicodeTBL20[uc & 0xFF];\n\t} else if (hi == 0xFE) {\n\t\treturn (uc >= 0xFE70 ? AL : ON);\n\t}\n\treturn ON;\n}\n\nfunction _isArabicDiacritics( ch ) {\n\treturn (ch >= '\\u064b' && ch <= '\\u0655');\n}\nexports.L = L;\nexports.R = R;\nexports.EN = EN;\nexports.ON_R = 3;\nexports.AN = 4;\nexports.R_H = 5;\nexports.B = 6;\n\nexports.DOT = \"\\xB7\";\nexports.doBidiReorder = function(text, textCharTypes, isRtl) {\n\tif (text.length < 2)\n\t\treturn {};\n\n\tvar chars = text.split(\"\"), logicalFromVisual = new Array(chars.length),\n\t\tbidiLevels = new Array(chars.length), levels = [];\n\n\tdir = isRtl ? RTL : LTR;\n\n\t_computeLevels(chars, levels, chars.length, textCharTypes);\n\n\tfor (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++);\n\n\t_invertLevel(2, levels, logicalFromVisual);\n\t_invertLevel(1, levels, logicalFromVisual);\n\n\tfor (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width\n\t\tif (textCharTypes[i] === AN) {\n\t\t\tlevels[i] = exports.AN;\n\t\t} else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE)\n\t\t\t|| textCharTypes[i] === ON || textCharTypes[i] === BN)) {\n\t\t\tlevels[i] = exports.ON_R;\n\t\t} else if ((i > 0 && chars[i - 1] === '\\u0644') && /\\u0622|\\u0623|\\u0625|\\u0627/.test(chars[i])) {\n\t\t\tlevels[i - 1] = levels[i] = exports.R_H;\n\t\t\ti++;\n\t\t}\n\t}\n\tif (chars[chars.length - 1] === exports.DOT)\n\t\tlevels[chars.length - 1] = exports.B;\n\n\tfor (var i = 0; i < logicalFromVisual.length; i++) {\n\t\tbidiLevels[i] = levels[logicalFromVisual[i]];\n\t}\n\n\treturn {'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels};\n};\nexports.hasBidiCharacters = function(text, textCharTypes){\n\tvar ret = false;\n\tfor (var i = 0; i < text.length; i++){\n\t\ttextCharTypes[i] = _getCharacterType(text.charAt(i));\n\t\tif (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL))\n\t\t\tret = true;\n\t}\n\treturn ret;\n};\nexports.getVisualFromLogicalIdx = function(logIdx, rowMap) {\n\tfor (var i = 0; i < rowMap.logicalFromVisual.length; i++) {\n\t\tif (rowMap.logicalFromVisual[i] == logIdx)\n\t\t\treturn i;\n\t}\n\treturn 0;\n};\n\n});\n\nace.define(\"ace/bidihandler\",[\"require\",\"exports\",\"module\",\"ace/lib/bidiutil\",\"ace/lib/lang\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar bidiUtil = acequire(\"./lib/bidiutil\");\nvar lang = acequire(\"./lib/lang\");\nvar useragent = acequire(\"./lib/useragent\");\nvar bidiRE = /[\\u0590-\\u05f4\\u0600-\\u06ff\\u0700-\\u08ac]/;\nvar BidiHandler = function(session) {\n this.session = session;\n this.bidiMap = {};\n this.currentRow = null;\n this.bidiUtil = bidiUtil;\n this.charWidths = [];\n this.EOL = \"\\xAC\";\n this.showInvisibles = true;\n this.isRtlDir = false;\n this.line = \"\";\n this.wrapIndent = 0;\n this.isLastRow = false;\n this.EOF = \"\\xB6\";\n this.seenBidi = false;\n};\n\n(function() {\n this.isBidiRow = function(screenRow, docRow, splitIndex) {\n if (!this.seenBidi)\n return false;\n if (screenRow !== this.currentRow) {\n this.currentRow = screenRow;\n this.updateRowLine(docRow, splitIndex);\n this.updateBidiMap();\n }\n return this.bidiMap.bidiLevels;\n };\n\n this.onChange = function(delta) {\n if (!this.seenBidi) {\n if (delta.action == \"insert\" && bidiRE.test(delta.lines.join(\"\\n\"))) {\n this.seenBidi = true;\n this.currentRow = null;\n }\n }\n else {\n this.currentRow = null;\n }\n };\n\n this.getDocumentRow = function() {\n var docRow = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var index = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n if (index >= 0)\n docRow = this.session.$docRowCache[index];\n }\n\n return docRow;\n };\n\n this.getSplitIndex = function() {\n var splitIndex = 0;\n var rowCache = this.session.$screenRowCache;\n if (rowCache.length) {\n var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow);\n while (this.currentRow - splitIndex > 0) {\n currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1);\n if (currentIndex !== prevIndex)\n break;\n\n prevIndex = currentIndex;\n splitIndex++;\n }\n }\n\n return splitIndex;\n };\n\n this.updateRowLine = function(docRow, splitIndex) {\n if (docRow === undefined)\n docRow = this.getDocumentRow();\n\n this.wrapIndent = 0;\n this.isLastRow = (docRow === this.session.getLength() - 1);\n this.line = this.session.getLine(docRow);\n if (this.session.$useWrapMode) {\n var splits = this.session.$wrapData[docRow];\n if (splits) {\n if (splitIndex === undefined)\n splitIndex = this.getSplitIndex();\n\n if(splitIndex > 0 && splits.length) {\n this.wrapIndent = splits.indent;\n this.line = (splitIndex < splits.length) ?\n this.line.substring(splits[splitIndex - 1], splits[splits.length - 1]) :\n this.line.substring(splits[splits.length - 1]);\n } else {\n this.line = this.line.substring(0, splits[splitIndex]);\n }\n }\n }\n var session = this.session, shift = 0, size;\n this.line = this.line.replace(/\\t|[\\u1100-\\u2029, \\u202F-\\uFFE6]/g, function(ch, i){\n if (ch === '\\t' || session.isFullWidth(ch.charCodeAt(0))) {\n size = (ch === '\\t') ? session.getScreenTabSize(i + shift) : 2;\n shift += size - 1;\n return lang.stringRepeat(bidiUtil.DOT, size);\n }\n return ch;\n });\n };\n\n this.updateBidiMap = function() {\n var textCharTypes = [], endOfLine = this.isLastRow ? this.EOF : this.EOL;\n var line = this.line + (this.showInvisibles ? endOfLine : bidiUtil.DOT);\n if (bidiUtil.hasBidiCharacters(line, textCharTypes)) {\n this.bidiMap = bidiUtil.doBidiReorder(line, textCharTypes, this.isRtlDir);\n } else {\n this.bidiMap = {};\n }\n };\n this.markAsDirty = function() {\n this.currentRow = null;\n };\n this.updateCharacterWidths = function(fontMetrics) {\n if (!this.seenBidi)\n return;\n if (this.characterWidth === fontMetrics.$characterSize.width)\n return;\n\n var characterWidth = this.characterWidth = fontMetrics.$characterSize.width;\n var bidiCharWidth = fontMetrics.$measureCharWidth(\"\\u05d4\");\n\n this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth;\n this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth;\n this.charWidths[bidiUtil.R_H] = useragent.isChrome ? bidiCharWidth : bidiCharWidth * 0.45;\n this.charWidths[bidiUtil.B] = 0;\n\n this.currentRow = null;\n };\n\n this.getShowInvisibles = function() {\n return this.showInvisibles;\n };\n\n this.setShowInvisibles = function(showInvisibles) {\n this.showInvisibles = showInvisibles;\n this.currentRow = null;\n };\n\n this.setEolChar = function(eolChar) {\n this.EOL = eolChar;\n };\n\n this.setTextDir = function(isRtlDir) {\n this.isRtlDir = isRtlDir;\n };\n this.getPosLeft = function(col) {\n col -= this.wrapIndent;\n var visualIdx = bidiUtil.getVisualFromLogicalIdx(col > 0 ? col - 1 : 0, this.bidiMap),\n levels = this.bidiMap.bidiLevels, left = 0;\n\n if (col === 0 && levels[visualIdx] % 2 !== 0)\n visualIdx++;\n\n for (var i = 0; i < visualIdx; i++) {\n left += this.charWidths[levels[i]];\n }\n\n if (col !== 0 && levels[visualIdx] % 2 === 0)\n left += this.charWidths[levels[visualIdx]];\n\n if (this.wrapIndent)\n left += this.wrapIndent * this.charWidths[bidiUtil.L];\n\n return left;\n };\n this.getSelections = function(startCol, endCol) {\n var map = this.bidiMap, levels = map.bidiLevels, level, offset = this.wrapIndent * this.charWidths[bidiUtil.L], selections = [],\n selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent,\n isSelected = false, isSelectedPrev = false, selectionStart = 0;\n\n for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {\n logIdx = map.logicalFromVisual[visIdx];\n level = levels[visIdx];\n isSelected = (logIdx >= selColMin) && (logIdx < selColMax);\n if (isSelected && !isSelectedPrev) {\n selectionStart = offset;\n } else if (!isSelected && isSelectedPrev) {\n selections.push({left: selectionStart, width: offset - selectionStart});\n }\n offset += this.charWidths[level];\n isSelectedPrev = isSelected;\n }\n\n if (isSelected && (visIdx === levels.length)) {\n selections.push({left: selectionStart, width: offset - selectionStart});\n }\n\n return selections;\n };\n this.offsetToCol = function(posX) {\n var logicalIdx = 0, posX = Math.max(posX, 0),\n offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels,\n charWidth = this.charWidths[levels[visualIdx]];\n\n if (this.wrapIndent) {\n posX -= this.wrapIndent * this.charWidths[bidiUtil.L];\n }\n\n while(posX > offset + charWidth/2) {\n offset += charWidth;\n if(visualIdx === levels.length - 1) {\n charWidth = 0;\n break;\n }\n charWidth = this.charWidths[levels[++visualIdx]];\n }\n\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)){\n if(posX < offset)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n\n } else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)){\n logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx]\n : this.bidiMap.logicalFromVisual[visualIdx - 1]);\n\n } else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0))\n || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))){\n logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];\n } else {\n if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0)\n visualIdx--;\n logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];\n }\n\n return (logicalIdx + this.wrapIndent);\n };\n\n}).call(BidiHandler.prototype);\n\nexports.BidiHandler = BidiHandler;\n});\n\nace.define(\"ace/range\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\nvar Range = function(startRow, startColumn, endRow, endColumn) {\n this.start = {\n row: startRow,\n column: startColumn\n };\n\n this.end = {\n row: endRow,\n column: endColumn\n };\n};\n\n(function() {\n this.isEqual = function(range) {\n return this.start.row === range.start.row &&\n this.end.row === range.end.row &&\n this.start.column === range.start.column &&\n this.end.column === range.end.column;\n };\n this.toString = function() {\n return (\"Range: [\" + this.start.row + \"/\" + this.start.column +\n \"] -> [\" + this.end.row + \"/\" + this.end.column + \"]\");\n };\n\n this.contains = function(row, column) {\n return this.compare(row, column) == 0;\n };\n this.compareRange = function(range) {\n var cmp,\n end = range.end,\n start = range.start;\n\n cmp = this.compare(end.row, end.column);\n if (cmp == 1) {\n cmp = this.compare(start.row, start.column);\n if (cmp == 1) {\n return 2;\n } else if (cmp == 0) {\n return 1;\n } else {\n return 0;\n }\n } else if (cmp == -1) {\n return -2;\n } else {\n cmp = this.compare(start.row, start.column);\n if (cmp == -1) {\n return -1;\n } else if (cmp == 1) {\n return 42;\n } else {\n return 0;\n }\n }\n };\n this.comparePoint = function(p) {\n return this.compare(p.row, p.column);\n };\n this.containsRange = function(range) {\n return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;\n };\n this.intersects = function(range) {\n var cmp = this.compareRange(range);\n return (cmp == -1 || cmp == 0 || cmp == 1);\n };\n this.isEnd = function(row, column) {\n return this.end.row == row && this.end.column == column;\n };\n this.isStart = function(row, column) {\n return this.start.row == row && this.start.column == column;\n };\n this.setStart = function(row, column) {\n if (typeof row == \"object\") {\n this.start.column = row.column;\n this.start.row = row.row;\n } else {\n this.start.row = row;\n this.start.column = column;\n }\n };\n this.setEnd = function(row, column) {\n if (typeof row == \"object\") {\n this.end.column = row.column;\n this.end.row = row.row;\n } else {\n this.end.row = row;\n this.end.column = column;\n }\n };\n this.inside = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column) || this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideStart = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isEnd(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.insideEnd = function(row, column) {\n if (this.compare(row, column) == 0) {\n if (this.isStart(row, column)) {\n return false;\n } else {\n return true;\n }\n }\n return false;\n };\n this.compare = function(row, column) {\n if (!this.isMultiLine()) {\n if (row === this.start.row) {\n return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);\n }\n }\n\n if (row < this.start.row)\n return -1;\n\n if (row > this.end.row)\n return 1;\n\n if (this.start.row === row)\n return column >= this.start.column ? 0 : -1;\n\n if (this.end.row === row)\n return column <= this.end.column ? 0 : 1;\n\n return 0;\n };\n this.compareStart = function(row, column) {\n if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareEnd = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else {\n return this.compare(row, column);\n }\n };\n this.compareInside = function(row, column) {\n if (this.end.row == row && this.end.column == column) {\n return 1;\n } else if (this.start.row == row && this.start.column == column) {\n return -1;\n } else {\n return this.compare(row, column);\n }\n };\n this.clipRows = function(firstRow, lastRow) {\n if (this.end.row > lastRow)\n var end = {row: lastRow + 1, column: 0};\n else if (this.end.row < firstRow)\n var end = {row: firstRow, column: 0};\n\n if (this.start.row > lastRow)\n var start = {row: lastRow + 1, column: 0};\n else if (this.start.row < firstRow)\n var start = {row: firstRow, column: 0};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n this.extend = function(row, column) {\n var cmp = this.compare(row, column);\n\n if (cmp == 0)\n return this;\n else if (cmp == -1)\n var start = {row: row, column: column};\n else\n var end = {row: row, column: column};\n\n return Range.fromPoints(start || this.start, end || this.end);\n };\n\n this.isEmpty = function() {\n return (this.start.row === this.end.row && this.start.column === this.end.column);\n };\n this.isMultiLine = function() {\n return (this.start.row !== this.end.row);\n };\n this.clone = function() {\n return Range.fromPoints(this.start, this.end);\n };\n this.collapseRows = function() {\n if (this.end.column == 0)\n return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);\n else\n return new Range(this.start.row, 0, this.end.row, 0);\n };\n this.toScreenRange = function(session) {\n var screenPosStart = session.documentToScreenPosition(this.start);\n var screenPosEnd = session.documentToScreenPosition(this.end);\n\n return new Range(\n screenPosStart.row, screenPosStart.column,\n screenPosEnd.row, screenPosEnd.column\n );\n };\n this.moveBy = function(row, column) {\n this.start.row += row;\n this.start.column += column;\n this.end.row += row;\n this.end.column += column;\n };\n\n}).call(Range.prototype);\nRange.fromPoints = function(start, end) {\n return new Range(start.row, start.column, end.row, end.column);\n};\nRange.comparePoints = comparePoints;\n\nRange.comparePoints = function(p1, p2) {\n return p1.row - p2.row || p1.column - p2.column;\n};\n\n\nexports.Range = Range;\n});\n\nace.define(\"ace/selection\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Selection = function(session) {\n this.session = session;\n this.doc = session.getDocument();\n\n this.clearSelection();\n this.lead = this.selectionLead = this.doc.createAnchor(0, 0);\n this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0);\n\n var self = this;\n this.lead.on(\"change\", function(e) {\n self._emit(\"changeCursor\");\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column)\n self.$desiredColumn = null;\n });\n\n this.selectionAnchor.on(\"change\", function() {\n if (!self.$isEmpty)\n self._emit(\"changeSelection\");\n });\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.isEmpty = function() {\n return (this.$isEmpty || (\n this.anchor.row == this.lead.row &&\n this.anchor.column == this.lead.column\n ));\n };\n this.isMultiLine = function() {\n if (this.isEmpty()) {\n return false;\n }\n\n return this.getRange().isMultiLine();\n };\n this.getCursor = function() {\n return this.lead.getPosition();\n };\n this.setSelectionAnchor = function(row, column) {\n this.anchor.setPosition(row, column);\n\n if (this.$isEmpty) {\n this.$isEmpty = false;\n this._emit(\"changeSelection\");\n }\n };\n this.getSelectionAnchor = function() {\n if (this.$isEmpty)\n return this.getSelectionLead();\n else\n return this.anchor.getPosition();\n };\n this.getSelectionLead = function() {\n return this.lead.getPosition();\n };\n this.shiftSelection = function(columns) {\n if (this.$isEmpty) {\n this.moveCursorTo(this.lead.row, this.lead.column + columns);\n return;\n }\n\n var anchor = this.getSelectionAnchor();\n var lead = this.getSelectionLead();\n\n var isBackwards = this.isBackwards();\n\n if (!isBackwards || anchor.column !== 0)\n this.setSelectionAnchor(anchor.row, anchor.column + columns);\n\n if (isBackwards || lead.column !== 0) {\n this.$moveSelection(function() {\n this.moveCursorTo(lead.row, lead.column + columns);\n });\n }\n };\n this.isBackwards = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column));\n };\n this.getRange = function() {\n var anchor = this.anchor;\n var lead = this.lead;\n\n if (this.isEmpty())\n return Range.fromPoints(lead, lead);\n\n if (this.isBackwards()) {\n return Range.fromPoints(lead, anchor);\n }\n else {\n return Range.fromPoints(anchor, lead);\n }\n };\n this.clearSelection = function() {\n if (!this.$isEmpty) {\n this.$isEmpty = true;\n this._emit(\"changeSelection\");\n }\n };\n this.selectAll = function() {\n var lastRow = this.doc.getLength() - 1;\n this.setSelectionAnchor(0, 0);\n this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length);\n };\n this.setRange =\n this.setSelectionRange = function(range, reverse) {\n if (reverse) {\n this.setSelectionAnchor(range.end.row, range.end.column);\n this.selectTo(range.start.row, range.start.column);\n } else {\n this.setSelectionAnchor(range.start.row, range.start.column);\n this.selectTo(range.end.row, range.end.column);\n }\n if (this.getRange().isEmpty())\n this.$isEmpty = true;\n this.$desiredColumn = null;\n };\n\n this.$moveSelection = function(mover) {\n var lead = this.lead;\n if (this.$isEmpty)\n this.setSelectionAnchor(lead.row, lead.column);\n\n mover.call(this);\n };\n this.selectTo = function(row, column) {\n this.$moveSelection(function() {\n this.moveCursorTo(row, column);\n });\n };\n this.selectToPosition = function(pos) {\n this.$moveSelection(function() {\n this.moveCursorToPosition(pos);\n });\n };\n this.moveTo = function(row, column) {\n this.clearSelection();\n this.moveCursorTo(row, column);\n };\n this.moveToPosition = function(pos) {\n this.clearSelection();\n this.moveCursorToPosition(pos);\n };\n this.selectUp = function() {\n this.$moveSelection(this.moveCursorUp);\n };\n this.selectDown = function() {\n this.$moveSelection(this.moveCursorDown);\n };\n this.selectRight = function() {\n this.$moveSelection(this.moveCursorRight);\n };\n this.selectLeft = function() {\n this.$moveSelection(this.moveCursorLeft);\n };\n this.selectLineStart = function() {\n this.$moveSelection(this.moveCursorLineStart);\n };\n this.selectLineEnd = function() {\n this.$moveSelection(this.moveCursorLineEnd);\n };\n this.selectFileEnd = function() {\n this.$moveSelection(this.moveCursorFileEnd);\n };\n this.selectFileStart = function() {\n this.$moveSelection(this.moveCursorFileStart);\n };\n this.selectWordRight = function() {\n this.$moveSelection(this.moveCursorWordRight);\n };\n this.selectWordLeft = function() {\n this.$moveSelection(this.moveCursorWordLeft);\n };\n this.getWordRange = function(row, column) {\n if (typeof column == \"undefined\") {\n var cursor = row || this.lead;\n row = cursor.row;\n column = cursor.column;\n }\n return this.session.getWordRange(row, column);\n };\n this.selectWord = function() {\n this.setSelectionRange(this.getWordRange());\n };\n this.selectAWord = function() {\n var cursor = this.getCursor();\n var range = this.session.getAWordRange(cursor.row, cursor.column);\n this.setSelectionRange(range);\n };\n\n this.getLineRange = function(row, excludeLastChar) {\n var rowStart = typeof row == \"number\" ? row : this.lead.row;\n var rowEnd;\n\n var foldLine = this.session.getFoldLine(rowStart);\n if (foldLine) {\n rowStart = foldLine.start.row;\n rowEnd = foldLine.end.row;\n } else {\n rowEnd = rowStart;\n }\n if (excludeLastChar === true)\n return new Range(rowStart, 0, rowEnd, this.session.getLine(rowEnd).length);\n else\n return new Range(rowStart, 0, rowEnd + 1, 0);\n };\n this.selectLine = function() {\n this.setSelectionRange(this.getLineRange());\n };\n this.moveCursorUp = function() {\n this.moveCursorBy(-1, 0);\n };\n this.moveCursorDown = function() {\n this.moveCursorBy(1, 0);\n };\n this.wouldMoveIntoSoftTab = function(cursor, tabSize, direction) {\n var start = cursor.column;\n var end = cursor.column + tabSize;\n\n if (direction < 0) {\n start = cursor.column - tabSize;\n end = cursor.column;\n }\n return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(\" \").length-1 == tabSize;\n };\n this.moveCursorLeft = function() {\n var cursor = this.lead.getPosition(),\n fold;\n\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n } else if (cursor.column === 0) {\n if (cursor.row > 0) {\n this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, -tabSize);\n } else {\n this.moveCursorBy(0, -1);\n }\n }\n };\n this.moveCursorRight = function() {\n var cursor = this.lead.getPosition(),\n fold;\n if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n }\n else if (this.lead.column == this.doc.getLine(this.lead.row).length) {\n if (this.lead.row < this.doc.getLength() - 1) {\n this.moveCursorTo(this.lead.row + 1, 0);\n }\n }\n else {\n var tabSize = this.session.getTabSize();\n var cursor = this.lead;\n if (this.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) {\n this.moveCursorBy(0, tabSize);\n } else {\n this.moveCursorBy(0, 1);\n }\n }\n };\n this.moveCursorLineStart = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var screenRow = this.session.documentToScreenRow(row, column);\n var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0);\n var beforeCursor = this.session.getDisplayLine(\n row, null, firstColumnPosition.row,\n firstColumnPosition.column\n );\n\n var leadingSpace = beforeCursor.match(/^\\s*/);\n if (leadingSpace[0].length != column && !this.session.$useEmacsStyleLineStart)\n firstColumnPosition.column += leadingSpace[0].length;\n this.moveCursorToPosition(firstColumnPosition);\n };\n this.moveCursorLineEnd = function() {\n var lead = this.lead;\n var lineEnd = this.session.getDocumentLastRowColumnPosition(lead.row, lead.column);\n if (this.lead.column == lineEnd.column) {\n var line = this.session.getLine(lineEnd.row);\n if (lineEnd.column == line.length) {\n var textEnd = line.search(/\\s+$/);\n if (textEnd > 0)\n lineEnd.column = textEnd;\n }\n }\n\n this.moveCursorTo(lineEnd.row, lineEnd.column);\n };\n this.moveCursorFileEnd = function() {\n var row = this.doc.getLength() - 1;\n var column = this.doc.getLine(row).length;\n this.moveCursorTo(row, column);\n };\n this.moveCursorFileStart = function() {\n this.moveCursorTo(0, 0);\n };\n this.moveCursorLongWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n this.moveCursorTo(fold.end.row, fold.end.column);\n return;\n }\n if (match = this.session.nonTokenRe.exec(rightOfCursor)) {\n column += this.session.nonTokenRe.lastIndex;\n this.session.nonTokenRe.lastIndex = 0;\n rightOfCursor = line.substring(column);\n }\n if (column >= line.length) {\n this.moveCursorTo(row, line.length);\n this.moveCursorRight();\n if (row < this.doc.getLength() - 1)\n this.moveCursorWordRight();\n return;\n }\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n column += this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n this.moveCursorLongWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1)) {\n this.moveCursorTo(fold.start.row, fold.start.column);\n return;\n }\n\n var str = this.session.getFoldStringAt(row, column, -1);\n if (str == null) {\n str = this.doc.getLine(row).substring(0, column);\n }\n\n var leftOfCursor = lang.stringReverse(str);\n var match;\n this.session.nonTokenRe.lastIndex = 0;\n this.session.tokenRe.lastIndex = 0;\n if (match = this.session.nonTokenRe.exec(leftOfCursor)) {\n column -= this.session.nonTokenRe.lastIndex;\n leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex);\n this.session.nonTokenRe.lastIndex = 0;\n }\n if (column <= 0) {\n this.moveCursorTo(row, 0);\n this.moveCursorLeft();\n if (row > 0)\n this.moveCursorWordLeft();\n return;\n }\n if (match = this.session.tokenRe.exec(leftOfCursor)) {\n column -= this.session.tokenRe.lastIndex;\n this.session.tokenRe.lastIndex = 0;\n }\n\n this.moveCursorTo(row, column);\n };\n\n this.$shortWordEndIndex = function(rightOfCursor) {\n var match, index = 0, ch;\n var whitespaceRe = /\\s/;\n var tokenRe = this.session.tokenRe;\n\n tokenRe.lastIndex = 0;\n if (match = this.session.tokenRe.exec(rightOfCursor)) {\n index = this.session.tokenRe.lastIndex;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n\n if (index < 1) {\n tokenRe.lastIndex = 0;\n while ((ch = rightOfCursor[index]) && !tokenRe.test(ch)) {\n tokenRe.lastIndex = 0;\n index ++;\n if (whitespaceRe.test(ch)) {\n if (index > 2) {\n index--;\n break;\n } else {\n while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch))\n index ++;\n if (index > 2)\n break;\n }\n }\n }\n }\n }\n tokenRe.lastIndex = 0;\n\n return index;\n };\n\n this.moveCursorShortWordRight = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n var line = this.doc.getLine(row);\n var rightOfCursor = line.substring(column);\n\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold)\n return this.moveCursorTo(fold.end.row, fold.end.column);\n\n if (column == line.length) {\n var l = this.doc.getLength();\n do {\n row++;\n rightOfCursor = this.doc.getLine(row);\n } while (row < l && /^\\s*$/.test(rightOfCursor));\n\n if (!/^\\s+/.test(rightOfCursor))\n rightOfCursor = \"\";\n column = 0;\n }\n\n var index = this.$shortWordEndIndex(rightOfCursor);\n\n this.moveCursorTo(row, column + index);\n };\n\n this.moveCursorShortWordLeft = function() {\n var row = this.lead.row;\n var column = this.lead.column;\n\n var fold;\n if (fold = this.session.getFoldAt(row, column, -1))\n return this.moveCursorTo(fold.start.row, fold.start.column);\n\n var line = this.session.getLine(row).substring(0, column);\n if (column === 0) {\n do {\n row--;\n line = this.doc.getLine(row);\n } while (row > 0 && /^\\s*$/.test(line));\n\n column = line.length;\n if (!/\\s+$/.test(line))\n line = \"\";\n }\n\n var leftOfCursor = lang.stringReverse(line);\n var index = this.$shortWordEndIndex(leftOfCursor);\n\n return this.moveCursorTo(row, column - index);\n };\n\n this.moveCursorWordRight = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordRight();\n else\n this.moveCursorShortWordRight();\n };\n\n this.moveCursorWordLeft = function() {\n if (this.session.$selectLongWords)\n this.moveCursorLongWordLeft();\n else\n this.moveCursorShortWordLeft();\n };\n this.moveCursorBy = function(rows, chars) {\n var screenPos = this.session.documentToScreenPosition(\n this.lead.row,\n this.lead.column\n );\n\n var offsetX;\n\n if (chars === 0) {\n if (rows !== 0) {\n if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) {\n offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column);\n screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]);\n } else {\n offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];\n }\n }\n\n if (this.$desiredColumn)\n screenPos.column = this.$desiredColumn;\n else\n this.$desiredColumn = screenPos.column;\n }\n\n var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX);\n \n if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {\n if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {\n if (docPos.row > 0 || rows > 0)\n docPos.row++;\n }\n }\n this.moveCursorTo(docPos.row, docPos.column + chars, chars === 0);\n };\n this.moveCursorToPosition = function(position) {\n this.moveCursorTo(position.row, position.column);\n };\n this.moveCursorTo = function(row, column, keepDesiredColumn) {\n var fold = this.session.getFoldAt(row, column, 1);\n if (fold) {\n row = fold.start.row;\n column = fold.start.column;\n }\n\n this.$keepDesiredColumnOnChange = true;\n var line = this.session.getLine(row);\n if (/[\\uDC00-\\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) {\n if (this.lead.row == row && this.lead.column == column + 1)\n column = column - 1;\n else\n column = column + 1;\n }\n this.lead.setPosition(row, column);\n this.$keepDesiredColumnOnChange = false;\n\n if (!keepDesiredColumn)\n this.$desiredColumn = null;\n };\n this.moveCursorToScreen = function(row, column, keepDesiredColumn) {\n var pos = this.session.screenToDocumentPosition(row, column);\n this.moveCursorTo(pos.row, pos.column, keepDesiredColumn);\n };\n this.detach = function() {\n this.lead.detach();\n this.anchor.detach();\n this.session = this.doc = null;\n };\n\n this.fromOrientedRange = function(range) {\n this.setSelectionRange(range, range.cursor == range.start);\n this.$desiredColumn = range.desiredColumn || this.$desiredColumn;\n };\n\n this.toOrientedRange = function(range) {\n var r = this.getRange();\n if (range) {\n range.start.column = r.start.column;\n range.start.row = r.start.row;\n range.end.column = r.end.column;\n range.end.row = r.end.row;\n } else {\n range = r;\n }\n\n range.cursor = this.isBackwards() ? range.start : range.end;\n range.desiredColumn = this.$desiredColumn;\n return range;\n };\n this.getRangeOfMovements = function(func) {\n var start = this.getCursor();\n try {\n func(this);\n var end = this.getCursor();\n return Range.fromPoints(start,end);\n } catch(e) {\n return Range.fromPoints(start,start);\n } finally {\n this.moveCursorToPosition(start);\n }\n };\n\n this.toJSON = function() {\n if (this.rangeCount) {\n var data = this.ranges.map(function(r) {\n var r1 = r.clone();\n r1.isBackwards = r.cursor == r.start;\n return r1;\n });\n } else {\n var data = this.getRange();\n data.isBackwards = this.isBackwards();\n }\n return data;\n };\n\n this.fromJSON = function(data) {\n if (data.start == undefined) {\n if (this.rangeList) {\n this.toSingleRange(data[0]);\n for (var i = data.length; i--; ) {\n var r = Range.fromPoints(data[i].start, data[i].end);\n if (data[i].isBackwards)\n r.cursor = r.start;\n this.addRange(r, true);\n }\n return;\n } else\n data = data[0];\n }\n if (this.rangeList)\n this.toSingleRange(data);\n this.setSelectionRange(data, data.isBackwards);\n };\n\n this.isEqual = function(data) {\n if ((data.length || this.rangeCount) && data.length != this.rangeCount)\n return false;\n if (!data.length || !this.ranges)\n return this.getRange().isEqual(data);\n\n for (var i = this.ranges.length; i--; ) {\n if (!this.ranges[i].isEqual(data[i]))\n return false;\n }\n return true;\n };\n\n}).call(Selection.prototype);\n\nexports.Selection = Selection;\n});\n\nace.define(\"ace/tokenizer\",[\"require\",\"exports\",\"module\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar config = acequire(\"./config\");\nvar MAX_TOKEN_COUNT = 2000;\nvar Tokenizer = function(rules) {\n this.states = rules;\n\n this.regExps = {};\n this.matchMappings = {};\n for (var key in this.states) {\n var state = this.states[key];\n var ruleRegExps = [];\n var matchTotal = 0;\n var mapping = this.matchMappings[key] = {defaultToken: \"text\"};\n var flag = \"g\";\n\n var splitterRurles = [];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.defaultToken)\n mapping.defaultToken = rule.defaultToken;\n if (rule.caseInsensitive)\n flag = \"gi\";\n if (rule.regex == null)\n continue;\n\n if (rule.regex instanceof RegExp)\n rule.regex = rule.regex.toString().slice(1, -1);\n var adjustedregex = rule.regex;\n var matchcount = new RegExp(\"(?:(\" + adjustedregex + \")|(.))\").exec(\"a\").length - 2;\n if (Array.isArray(rule.token)) {\n if (rule.token.length == 1 || matchcount == 1) {\n rule.token = rule.token[0];\n } else if (matchcount - 1 != rule.token.length) {\n this.reportError(\"number of classes and regexp groups doesn't match\", { \n rule: rule,\n groupCount: matchcount - 1\n });\n rule.token = rule.token[0];\n } else {\n rule.tokenArray = rule.token;\n rule.token = null;\n rule.onMatch = this.$arrayTokens;\n }\n } else if (typeof rule.token == \"function\" && !rule.onMatch) {\n if (matchcount > 1)\n rule.onMatch = this.$applyToken;\n else\n rule.onMatch = rule.token;\n }\n\n if (matchcount > 1) {\n if (/\\\\\\d/.test(rule.regex)) {\n adjustedregex = rule.regex.replace(/\\\\([0-9]+)/g, function(match, digit) {\n return \"\\\\\" + (parseInt(digit, 10) + matchTotal + 1);\n });\n } else {\n matchcount = 1;\n adjustedregex = this.removeCapturingGroups(rule.regex);\n }\n if (!rule.splitRegex && typeof rule.token != \"string\")\n splitterRurles.push(rule); // flag will be known only at the very end\n }\n\n mapping[matchTotal] = i;\n matchTotal += matchcount;\n\n ruleRegExps.push(adjustedregex);\n if (!rule.onMatch)\n rule.onMatch = null;\n }\n \n if (!ruleRegExps.length) {\n mapping[0] = 0;\n ruleRegExps.push(\"$\");\n }\n \n splitterRurles.forEach(function(rule) {\n rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);\n }, this);\n\n this.regExps[key] = new RegExp(\"(\" + ruleRegExps.join(\")|(\") + \")|($)\", flag);\n }\n};\n\n(function() {\n this.$setMaxTokenCount = function(m) {\n MAX_TOKEN_COUNT = m | 0;\n };\n \n this.$applyToken = function(str) {\n var values = this.splitRegex.exec(str).slice(1);\n var types = this.token.apply(this, values);\n if (typeof types === \"string\")\n return [{type: types, value: str}];\n\n var tokens = [];\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i]\n };\n }\n return tokens;\n };\n\n this.$arrayTokens = function(str) {\n if (!str)\n return [];\n var values = this.splitRegex.exec(str);\n if (!values)\n return \"text\";\n var tokens = [];\n var types = this.tokenArray;\n for (var i = 0, l = types.length; i < l; i++) {\n if (values[i + 1])\n tokens[tokens.length] = {\n type: types[i],\n value: values[i + 1]\n };\n }\n return tokens;\n };\n\n this.removeCapturingGroups = function(src) {\n var r = src.replace(\n /\\[(?:\\\\.|[^\\]])*?\\]|\\\\.|\\(\\?[:=!]|(\\()/g,\n function(x, y) {return y ? \"(?:\" : x;}\n );\n return r;\n };\n\n this.createSplitterRegexp = function(src, flag) {\n if (src.indexOf(\"(?=\") != -1) {\n var stack = 0;\n var inChClass = false;\n var lastCapture = {};\n src.replace(/(\\\\.)|(\\((?:\\?[=!])?)|(\\))|([\\[\\]])/g, function(\n m, esc, parenOpen, parenClose, square, index\n ) {\n if (inChClass) {\n inChClass = square != \"]\";\n } else if (square) {\n inChClass = true;\n } else if (parenClose) {\n if (stack == lastCapture.stack) {\n lastCapture.end = index+1;\n lastCapture.stack = -1;\n }\n stack--;\n } else if (parenOpen) {\n stack++;\n if (parenOpen.length != 1) {\n lastCapture.stack = stack;\n lastCapture.start = index;\n }\n }\n return m;\n });\n\n if (lastCapture.end != null && /^\\)*$/.test(src.substr(lastCapture.end)))\n src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);\n }\n if (src.charAt(0) != \"^\") src = \"^\" + src;\n if (src.charAt(src.length - 1) != \"$\") src += \"$\";\n \n return new RegExp(src, (flag||\"\").replace(\"g\", \"\"));\n };\n this.getLineTokens = function(line, startState) {\n if (startState && typeof startState != \"string\") {\n var stack = startState.slice(0);\n startState = stack[0];\n if (startState === \"#tmp\") {\n stack.shift();\n startState = stack.shift();\n }\n } else\n var stack = [];\n\n var currentState = startState || \"start\";\n var state = this.states[currentState];\n if (!state) {\n currentState = \"start\";\n state = this.states[currentState];\n }\n var mapping = this.matchMappings[currentState];\n var re = this.regExps[currentState];\n re.lastIndex = 0;\n\n var match, tokens = [];\n var lastIndex = 0;\n var matchAttempts = 0;\n\n var token = {type: null, value: \"\"};\n\n while (match = re.exec(line)) {\n var type = mapping.defaultToken;\n var rule = null;\n var value = match[0];\n var index = re.lastIndex;\n\n if (index - value.length > lastIndex) {\n var skipped = line.substring(lastIndex, index - value.length);\n if (token.type == type) {\n token.value += skipped;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: skipped};\n }\n }\n\n for (var i = 0; i < match.length-2; i++) {\n if (match[i + 1] === undefined)\n continue;\n\n rule = state[mapping[i]];\n\n if (rule.onMatch)\n type = rule.onMatch(value, currentState, stack, line);\n else\n type = rule.token;\n\n if (rule.next) {\n if (typeof rule.next == \"string\") {\n currentState = rule.next;\n } else {\n currentState = rule.next(currentState, stack);\n }\n \n state = this.states[currentState];\n if (!state) {\n this.reportError(\"state doesn't exist\", currentState);\n currentState = \"start\";\n state = this.states[currentState];\n }\n mapping = this.matchMappings[currentState];\n lastIndex = index;\n re = this.regExps[currentState];\n re.lastIndex = index;\n }\n if (rule.consumeLineEnd)\n lastIndex = index;\n break;\n }\n\n if (value) {\n if (typeof type === \"string\") {\n if ((!rule || rule.merge !== false) && token.type === type) {\n token.value += value;\n } else {\n if (token.type)\n tokens.push(token);\n token = {type: type, value: value};\n }\n } else if (type) {\n if (token.type)\n tokens.push(token);\n token = {type: null, value: \"\"};\n for (var i = 0; i < type.length; i++)\n tokens.push(type[i]);\n }\n }\n\n if (lastIndex == line.length)\n break;\n\n lastIndex = index;\n\n if (matchAttempts++ > MAX_TOKEN_COUNT) {\n if (matchAttempts > 2 * line.length) {\n this.reportError(\"infinite loop with in ace tokenizer\", {\n startState: startState,\n line: line\n });\n }\n while (lastIndex < line.length) {\n if (token.type)\n tokens.push(token);\n token = {\n value: line.substring(lastIndex, lastIndex += 2000),\n type: \"overflow\"\n };\n }\n currentState = \"start\";\n stack = [];\n break;\n }\n }\n\n if (token.type)\n tokens.push(token);\n \n if (stack.length > 1) {\n if (stack[0] !== currentState)\n stack.unshift(\"#tmp\", currentState);\n }\n return {\n tokens : tokens,\n state : stack.length ? stack : currentState\n };\n };\n \n this.reportError = config.reportError;\n \n}).call(Tokenizer.prototype);\n\nexports.Tokenizer = Tokenizer;\n});\n\nace.define(\"ace/mode/text_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\n\nvar TextHighlightRules = function() {\n\n this.$rules = {\n \"start\" : [{\n token : \"empty_line\",\n regex : '^$'\n }, {\n defaultToken : \"text\"\n }]\n };\n};\n\n(function() {\n\n this.addRules = function(rules, prefix) {\n if (!prefix) {\n for (var key in rules)\n this.$rules[key] = rules[key];\n return;\n }\n for (var key in rules) {\n var state = rules[key];\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n if (rule.next || rule.onMatch) {\n if (typeof rule.next == \"string\") {\n if (rule.next.indexOf(prefix) !== 0)\n rule.next = prefix + rule.next;\n }\n if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)\n rule.nextState = prefix + rule.nextState;\n }\n }\n this.$rules[prefix + key] = state;\n }\n };\n\n this.getRules = function() {\n return this.$rules;\n };\n\n this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {\n var embedRules = typeof HighlightRules == \"function\"\n ? new HighlightRules().getRules()\n : HighlightRules;\n if (states) {\n for (var i = 0; i < states.length; i++)\n states[i] = prefix + states[i];\n } else {\n states = [];\n for (var key in embedRules)\n states.push(prefix + key);\n }\n\n this.addRules(embedRules, prefix);\n\n if (escapeRules) {\n var addRules = Array.prototype[append ? \"push\" : \"unshift\"];\n for (var i = 0; i < states.length; i++)\n addRules.apply(this.$rules[states[i]], lang.deepCopy(escapeRules));\n }\n\n if (!this.$embeds)\n this.$embeds = [];\n this.$embeds.push(prefix);\n };\n\n this.getEmbeds = function() {\n return this.$embeds;\n };\n\n var pushState = function(currentState, stack) {\n if (currentState != \"start\" || stack.length)\n stack.unshift(this.nextState, currentState);\n return this.nextState;\n };\n var popState = function(currentState, stack) {\n stack.shift();\n return stack.shift() || \"start\";\n };\n\n this.normalizeRules = function() {\n var id = 0;\n var rules = this.$rules;\n function processState(key) {\n var state = rules[key];\n state.processed = true;\n for (var i = 0; i < state.length; i++) {\n var rule = state[i];\n var toInsert = null;\n if (Array.isArray(rule)) {\n toInsert = rule;\n rule = {};\n }\n if (!rule.regex && rule.start) {\n rule.regex = rule.start;\n if (!rule.next)\n rule.next = [];\n rule.next.push({\n defaultToken: rule.token\n }, {\n token: rule.token + \".end\",\n regex: rule.end || rule.start,\n next: \"pop\"\n });\n rule.token = rule.token + \".start\";\n rule.push = true;\n }\n var next = rule.next || rule.push;\n if (next && Array.isArray(next)) {\n var stateName = rule.stateName;\n if (!stateName) {\n stateName = rule.token;\n if (typeof stateName != \"string\")\n stateName = stateName[0] || \"\";\n if (rules[stateName])\n stateName += id++;\n }\n rules[stateName] = next;\n rule.next = stateName;\n processState(stateName);\n } else if (next == \"pop\") {\n rule.next = popState;\n }\n\n if (rule.push) {\n rule.nextState = rule.next || rule.push;\n rule.next = pushState;\n delete rule.push;\n }\n\n if (rule.rules) {\n for (var r in rule.rules) {\n if (rules[r]) {\n if (rules[r].push)\n rules[r].push.apply(rules[r], rule.rules[r]);\n } else {\n rules[r] = rule.rules[r];\n }\n }\n }\n var includeName = typeof rule == \"string\" ? rule : rule.include;\n if (includeName) {\n if (Array.isArray(includeName))\n toInsert = includeName.map(function(x) { return rules[x]; });\n else\n toInsert = rules[includeName];\n }\n\n if (toInsert) {\n var args = [i, 1].concat(toInsert);\n if (rule.noEscape)\n args = args.filter(function(x) {return !x.next;});\n state.splice.apply(state, args);\n i--;\n }\n \n if (rule.keywordMap) {\n rule.token = this.createKeywordMapper(\n rule.keywordMap, rule.defaultToken || \"text\", rule.caseInsensitive\n );\n delete rule.defaultToken;\n }\n }\n }\n Object.keys(rules).forEach(processState, this);\n };\n\n this.createKeywordMapper = function(map, defaultToken, ignoreCase, splitChar) {\n var keywords = Object.create(null);\n Object.keys(map).forEach(function(className) {\n var a = map[className];\n if (ignoreCase)\n a = a.toLowerCase();\n var list = a.split(splitChar || \"|\");\n for (var i = list.length; i--; )\n keywords[list[i]] = className;\n });\n if (Object.getPrototypeOf(keywords)) {\n keywords.__proto__ = null;\n }\n this.$keywordList = Object.keys(keywords);\n map = null;\n return ignoreCase\n ? function(value) {return keywords[value.toLowerCase()] || defaultToken; }\n : function(value) {return keywords[value] || defaultToken; };\n };\n\n this.getKeywords = function() {\n return this.$keywords;\n };\n\n}).call(TextHighlightRules.prototype);\n\nexports.TextHighlightRules = TextHighlightRules;\n});\n\nace.define(\"ace/mode/behaviour\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Behaviour = function() {\n this.$behaviours = {};\n};\n\n(function () {\n\n this.add = function (name, action, callback) {\n switch (undefined) {\n case this.$behaviours:\n this.$behaviours = {};\n case this.$behaviours[name]:\n this.$behaviours[name] = {};\n }\n this.$behaviours[name][action] = callback;\n };\n \n this.addBehaviours = function (behaviours) {\n for (var key in behaviours) {\n for (var action in behaviours[key]) {\n this.add(key, action, behaviours[key][action]);\n }\n }\n };\n \n this.remove = function (name) {\n if (this.$behaviours && this.$behaviours[name]) {\n delete this.$behaviours[name];\n }\n };\n \n this.inherit = function (mode, filter) {\n if (typeof mode === \"function\") {\n var behaviours = new mode().getBehaviours(filter);\n } else {\n var behaviours = mode.getBehaviours(filter);\n }\n this.addBehaviours(behaviours);\n };\n \n this.getBehaviours = function (filter) {\n if (!filter) {\n return this.$behaviours;\n } else {\n var ret = {};\n for (var i = 0; i < filter.length; i++) {\n if (this.$behaviours[filter[i]]) {\n ret[filter[i]] = this.$behaviours[filter[i]];\n }\n }\n return ret;\n }\n };\n\n}).call(Behaviour.prototype);\n\nexports.Behaviour = Behaviour;\n});\n\nace.define(\"ace/token_iterator\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"./range\").Range;\nvar TokenIterator = function(session, initialRow, initialColumn) {\n this.$session = session;\n this.$row = initialRow;\n this.$rowTokens = session.getTokens(initialRow);\n\n var token = session.getTokenAt(initialRow, initialColumn);\n this.$tokenIndex = token ? token.index : -1;\n};\n\n(function() { \n this.stepBackward = function() {\n this.$tokenIndex -= 1;\n \n while (this.$tokenIndex < 0) {\n this.$row -= 1;\n if (this.$row < 0) {\n this.$row = 0;\n return null;\n }\n \n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = this.$rowTokens.length - 1;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.stepForward = function() {\n this.$tokenIndex += 1;\n var rowCount;\n while (this.$tokenIndex >= this.$rowTokens.length) {\n this.$row += 1;\n if (!rowCount)\n rowCount = this.$session.getLength();\n if (this.$row >= rowCount) {\n this.$row = rowCount - 1;\n return null;\n }\n\n this.$rowTokens = this.$session.getTokens(this.$row);\n this.$tokenIndex = 0;\n }\n \n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentToken = function () {\n return this.$rowTokens[this.$tokenIndex];\n }; \n this.getCurrentTokenRow = function () {\n return this.$row;\n }; \n this.getCurrentTokenColumn = function() {\n var rowTokens = this.$rowTokens;\n var tokenIndex = this.$tokenIndex;\n var column = rowTokens[tokenIndex].start;\n if (column !== undefined)\n return column;\n \n column = 0;\n while (tokenIndex > 0) {\n tokenIndex -= 1;\n column += rowTokens[tokenIndex].value.length;\n }\n \n return column; \n };\n this.getCurrentTokenPosition = function() {\n return {row: this.$row, column: this.getCurrentTokenColumn()};\n };\n this.getCurrentTokenRange = function() {\n var token = this.$rowTokens[this.$tokenIndex];\n var column = this.getCurrentTokenColumn();\n return new Range(this.$row, column, this.$row, column + token.value.length);\n };\n\n}).call(TokenIterator.prototype);\n\nexports.TokenIterator = TokenIterator;\n});\n\nace.define(\"ace/mode/behaviour/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\nvar lang = acequire(\"../../lib/lang\");\n\nvar SAFE_INSERT_IN_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\"];\nvar SAFE_INSERT_BEFORE_TOKENS =\n [\"text\", \"paren.rparen\", \"punctuation.operator\", \"comment\"];\n\nvar context;\nvar contextCache = {};\nvar defaultQuotes = {'\"' : '\"', \"'\" : \"'\"};\n\nvar initContext = function(editor) {\n var id = -1;\n if (editor.multiSelect) {\n id = editor.selection.index;\n if (contextCache.rangeCount != editor.multiSelect.rangeCount)\n contextCache = {rangeCount: editor.multiSelect.rangeCount};\n }\n if (contextCache[id])\n return context = contextCache[id];\n context = contextCache[id] = {\n autoInsertedBrackets: 0,\n autoInsertedRow: -1,\n autoInsertedLineEnd: \"\",\n maybeInsertedBrackets: 0,\n maybeInsertedRow: -1,\n maybeInsertedLineStart: \"\",\n maybeInsertedLineEnd: \"\"\n };\n};\n\nvar getWrapped = function(selection, selected, opening, closing) {\n var rowDiff = selection.end.row - selection.start.row;\n return {\n text: opening + selected + closing,\n selection: [\n 0,\n selection.start.column + 1,\n rowDiff,\n selection.end.column + (rowDiff ? 0 : 1)\n ]\n };\n};\n\nvar CstyleBehaviour = function(options) {\n this.add(\"braces\", \"insertion\", function(state, action, editor, session, text) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (text == '{') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && selected !== \"{\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '{', '}');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n if (/[\\]\\}\\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options && options.braces) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"}\");\n return {\n text: '{}',\n selection: [1, 1]\n };\n } else {\n CstyleBehaviour.recordMaybeInsert(editor, session, \"{\");\n return {\n text: '{',\n selection: [1, 1]\n };\n }\n }\n } else if (text == '}') {\n initContext(editor);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == '}') {\n var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n } else if (text == \"\\n\" || text == \"\\r\\n\") {\n initContext(editor);\n var closing = \"\";\n if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {\n closing = lang.stringRepeat(\"}\", context.maybeInsertedBrackets);\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === '}') {\n var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}');\n if (!openBracePos)\n return null;\n var next_indent = this.$getIndent(session.getLine(openBracePos.row));\n } else if (closing) {\n var next_indent = this.$getIndent(line);\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n return;\n }\n var indent = next_indent + session.getTabString();\n\n return {\n text: '\\n' + indent + '\\n' + next_indent + closing,\n selection: [1, indent.length, 1, indent.length]\n };\n } else {\n CstyleBehaviour.clearMaybeInsertedClosing();\n }\n });\n\n this.add(\"braces\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '{') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar == '}') {\n range.end.column++;\n return range;\n } else {\n context.maybeInsertedBrackets--;\n }\n }\n });\n\n this.add(\"parens\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '(') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '(', ')');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \")\");\n return {\n text: '()',\n selection: [1, 1]\n };\n }\n } else if (text == ')') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ')') {\n var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"parens\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '(') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ')') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"brackets\", \"insertion\", function(state, action, editor, session, text) {\n if (text == '[') {\n initContext(editor);\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, '[', ']');\n } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {\n CstyleBehaviour.recordAutoInsert(editor, session, \"]\");\n return {\n text: '[]',\n selection: [1, 1]\n };\n }\n } else if (text == ']') {\n initContext(editor);\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar == ']') {\n var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});\n if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {\n CstyleBehaviour.popAutoInsertedClosing();\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"brackets\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected == '[') {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == ']') {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"string_dquotes\", \"insertion\", function(state, action, editor, session, text) {\n var quotes = session.$mode.$quotes || defaultQuotes;\n if (text.length == 1 && quotes[text]) {\n if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1)\n return;\n initContext(editor);\n var quote = text;\n var selection = editor.getSelectionRange();\n var selected = session.doc.getTextRange(selection);\n if (selected !== \"\" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) {\n return getWrapped(selection, selected, quote, quote);\n } else if (!selected) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var leftChar = line.substring(cursor.column-1, cursor.column);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n\n var token = session.getTokenAt(cursor.row, cursor.column);\n var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);\n if (leftChar == \"\\\\\" && token && /escape/.test(token.type))\n return null;\n\n var stringBefore = token && /string|escape/.test(token.type);\n var stringAfter = !rightToken || /string|escape/.test(rightToken.type);\n\n var pair;\n if (rightChar == quote) {\n pair = stringBefore !== stringAfter;\n if (pair && /string\\.end/.test(rightToken.type))\n pair = false;\n } else {\n if (stringBefore && !stringAfter)\n return null; // wrap string with different quote\n if (stringBefore && stringAfter)\n return null; // do not pair quotes inside strings\n var wordRe = session.$mode.tokenRe;\n wordRe.lastIndex = 0;\n var isWordBefore = wordRe.test(leftChar);\n wordRe.lastIndex = 0;\n var isWordAfter = wordRe.test(leftChar);\n if (isWordBefore || isWordAfter)\n return null; // before or after alphanumeric\n if (rightChar && !/[\\s;,.})\\]\\\\]/.test(rightChar))\n return null; // there is rightChar and it isn't closing\n pair = true;\n }\n return {\n text: pair ? quote + quote : \"\",\n selection: [1,1]\n };\n }\n }\n });\n\n this.add(\"string_dquotes\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n initContext(editor);\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n\n};\n\n\nCstyleBehaviour.isSaneInsertion = function(editor, session) {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n if (!this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS)) {\n var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);\n if (!this.$matchTokenType(iterator2.getCurrentToken() || \"text\", SAFE_INSERT_IN_TOKENS))\n return false;\n }\n iterator.stepForward();\n return iterator.getCurrentTokenRow() !== cursor.row ||\n this.$matchTokenType(iterator.getCurrentToken() || \"text\", SAFE_INSERT_BEFORE_TOKENS);\n};\n\nCstyleBehaviour.$matchTokenType = function(token, types) {\n return types.indexOf(token.type || token) > -1;\n};\n\nCstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isAutoInsertedClosing(cursor, line, context.autoInsertedLineEnd[0]))\n context.autoInsertedBrackets = 0;\n context.autoInsertedRow = cursor.row;\n context.autoInsertedLineEnd = bracket + line.substr(cursor.column);\n context.autoInsertedBrackets++;\n};\n\nCstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n if (!this.isMaybeInsertedClosing(cursor, line))\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = cursor.row;\n context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;\n context.maybeInsertedLineEnd = line.substr(cursor.column);\n context.maybeInsertedBrackets++;\n};\n\nCstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {\n return context.autoInsertedBrackets > 0 &&\n cursor.row === context.autoInsertedRow &&\n bracket === context.autoInsertedLineEnd[0] &&\n line.substr(cursor.column) === context.autoInsertedLineEnd;\n};\n\nCstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {\n return context.maybeInsertedBrackets > 0 &&\n cursor.row === context.maybeInsertedRow &&\n line.substr(cursor.column) === context.maybeInsertedLineEnd &&\n line.substr(0, cursor.column) == context.maybeInsertedLineStart;\n};\n\nCstyleBehaviour.popAutoInsertedClosing = function() {\n context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);\n context.autoInsertedBrackets--;\n};\n\nCstyleBehaviour.clearMaybeInsertedClosing = function() {\n if (context) {\n context.maybeInsertedBrackets = 0;\n context.maybeInsertedRow = -1;\n }\n};\n\n\n\noop.inherits(CstyleBehaviour, Behaviour);\n\nexports.CstyleBehaviour = CstyleBehaviour;\n});\n\nace.define(\"ace/unicode\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nexports.packages = {};\n\naddUnicodePackage({\n 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\",\n 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\",\n 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\",\n Lt: \"01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC\",\n Lm: \"02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F\",\n 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\",\n 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\",\n 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\",\n 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\",\n Me: \"0488048906DE20DD-20E020E2-20E4A670-A672\",\n 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\",\n 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\",\n Nl: \"16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF\",\n No: \"00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835\",\n 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\",\n Pd: \"002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D\",\n Ps: \"0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62\",\n Pe: \"0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63\",\n Pi: \"00AB2018201B201C201F20392E022E042E092E0C2E1C2E20\",\n Pf: \"00BB2019201D203A2E032E052E0A2E0D2E1D2E21\",\n Pc: \"005F203F20402054FE33FE34FE4D-FE4FFF3F\",\n 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\",\n 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\",\n 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\",\n Sc: \"002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6\",\n Sk: \"005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3\",\n 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\",\n Z: \"002000A01680180E2000-200A20282029202F205F3000\",\n Zs: \"002000A01680180E2000-200A202F205F3000\",\n Zl: \"2028\",\n Zp: \"2029\",\n 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\",\n Cc: \"0000-001F007F-009F\",\n Cf: \"00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB\",\n Co: \"E000-F8FF\",\n Cs: \"D800-DFFF\",\n 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});\n\nfunction addUnicodePackage (pack) {\n var codePoint = /\\w{4}/g;\n for (var name in pack)\n exports.packages[name] = pack[name].replace(codePoint, \"\\\\u$&\");\n}\n\n});\n\nace.define(\"ace/mode/text\",[\"require\",\"exports\",\"module\",\"ace/tokenizer\",\"ace/mode/text_highlight_rules\",\"ace/mode/behaviour/cstyle\",\"ace/unicode\",\"ace/lib/lang\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Tokenizer = acequire(\"../tokenizer\").Tokenizer;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar unicode = acequire(\"../unicode\");\nvar lang = acequire(\"../lib/lang\");\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\nvar Mode = function() {\n this.HighlightRules = TextHighlightRules;\n};\n\n(function() {\n this.$defaultBehaviour = new CstyleBehaviour();\n\n this.tokenRe = new RegExp(\"^[\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]+\", \"g\"\n );\n\n this.nonTokenRe = new RegExp(\"^(?:[^\"\n + unicode.packages.L\n + unicode.packages.Mn + unicode.packages.Mc\n + unicode.packages.Nd\n + unicode.packages.Pc + \"\\\\$_]|\\\\s])+\", \"g\"\n );\n\n this.getTokenizer = function() {\n if (!this.$tokenizer) {\n this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);\n this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());\n }\n return this.$tokenizer;\n };\n\n this.lineCommentStart = \"\";\n this.blockComment = \"\";\n\n this.toggleCommentLines = function(state, session, startRow, endRow) {\n var doc = session.doc;\n\n var ignoreBlankLines = true;\n var shouldRemove = true;\n var minIndent = Infinity;\n var tabSize = session.getTabSize();\n var insertAtTabStop = false;\n\n if (!this.lineCommentStart) {\n if (!this.blockComment)\n return false;\n var lineCommentStart = this.blockComment.start;\n var lineCommentEnd = this.blockComment.end;\n var regexpStart = new RegExp(\"^(\\\\s*)(?:\" + lang.escapeRegExp(lineCommentStart) + \")\");\n var regexpEnd = new RegExp(\"(?:\" + lang.escapeRegExp(lineCommentEnd) + \")\\\\s*$\");\n\n var comment = function(line, i) {\n if (testRemove(line, i))\n return;\n if (!ignoreBlankLines || /\\S/.test(line)) {\n doc.insertInLine({row: i, column: line.length}, lineCommentEnd);\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n\n var uncomment = function(line, i) {\n var m;\n if (m = line.match(regexpEnd))\n doc.removeInLine(i, line.length - m[0].length, line.length);\n if (m = line.match(regexpStart))\n doc.removeInLine(i, m[1].length, m[0].length);\n };\n\n var testRemove = function(line, row) {\n if (regexpStart.test(line))\n return true;\n var tokens = session.getTokens(row);\n for (var i = 0; i < tokens.length; i++) {\n if (tokens[i].type === \"comment\")\n return true;\n }\n };\n } else {\n if (Array.isArray(this.lineCommentStart)) {\n var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join(\"|\");\n var lineCommentStart = this.lineCommentStart[0];\n } else {\n var regexpStart = lang.escapeRegExp(this.lineCommentStart);\n var lineCommentStart = this.lineCommentStart;\n }\n regexpStart = new RegExp(\"^(\\\\s*)(?:\" + regexpStart + \") ?\");\n \n insertAtTabStop = session.getUseSoftTabs();\n\n var uncomment = function(line, i) {\n var m = line.match(regexpStart);\n if (!m) return;\n var start = m[1].length, end = m[0].length;\n if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == \" \")\n end--;\n doc.removeInLine(i, start, end);\n };\n var commentWithSpace = lineCommentStart + \" \";\n var comment = function(line, i) {\n if (!ignoreBlankLines || /\\S/.test(line)) {\n if (shouldInsertSpace(line, minIndent, minIndent))\n doc.insertInLine({row: i, column: minIndent}, commentWithSpace);\n else\n doc.insertInLine({row: i, column: minIndent}, lineCommentStart);\n }\n };\n var testRemove = function(line, i) {\n return regexpStart.test(line);\n };\n \n var shouldInsertSpace = function(line, before, after) {\n var spaces = 0;\n while (before-- && line.charAt(before) == \" \")\n spaces++;\n if (spaces % tabSize != 0)\n return false;\n var spaces = 0;\n while (line.charAt(after++) == \" \")\n spaces++;\n if (tabSize > 2)\n return spaces % tabSize != tabSize - 1;\n else\n return spaces % tabSize == 0;\n return true;\n };\n }\n\n function iter(fun) {\n for (var i = startRow; i <= endRow; i++)\n fun(doc.getLine(i), i);\n }\n\n\n var minEmptyLength = Infinity;\n iter(function(line, i) {\n var indent = line.search(/\\S/);\n if (indent !== -1) {\n if (indent < minIndent)\n minIndent = indent;\n if (shouldRemove && !testRemove(line, i))\n shouldRemove = false;\n } else if (minEmptyLength > line.length) {\n minEmptyLength = line.length;\n }\n });\n\n if (minIndent == Infinity) {\n minIndent = minEmptyLength;\n ignoreBlankLines = false;\n shouldRemove = false;\n }\n\n if (insertAtTabStop && minIndent % tabSize != 0)\n minIndent = Math.floor(minIndent / tabSize) * tabSize;\n\n iter(shouldRemove ? uncomment : comment);\n };\n\n this.toggleBlockComment = function(state, session, range, cursor) {\n var comment = this.blockComment;\n if (!comment)\n return;\n if (!comment.start && comment[0])\n comment = comment[0];\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n var sel = session.selection;\n var initialRange = session.selection.toOrientedRange();\n var startRow, colDiff;\n\n if (token && /comment/.test(token.type)) {\n var startRange, endRange;\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.start);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n startRange = new Range(row, column, row, column + comment.start.length);\n break;\n }\n token = iterator.stepBackward();\n }\n\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n while (token && /comment/.test(token.type)) {\n var i = token.value.indexOf(comment.end);\n if (i != -1) {\n var row = iterator.getCurrentTokenRow();\n var column = iterator.getCurrentTokenColumn() + i;\n endRange = new Range(row, column, row, column + comment.end.length);\n break;\n }\n token = iterator.stepForward();\n }\n if (endRange)\n session.remove(endRange);\n if (startRange) {\n session.remove(startRange);\n startRow = startRange.start.row;\n colDiff = -comment.start.length;\n }\n } else {\n colDiff = comment.start.length;\n startRow = range.start.row;\n session.insert(range.end, comment.end);\n session.insert(range.start, comment.start);\n }\n if (initialRange.start.row == startRow)\n initialRange.start.column += colDiff;\n if (initialRange.end.row == startRow)\n initialRange.end.column += colDiff;\n session.selection.fromOrientedRange(initialRange);\n };\n\n this.getNextLineIndent = function(state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function(state, line, input) {\n return false;\n };\n\n this.autoOutdent = function(state, doc, row) {\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n this.createWorker = function(session) {\n return null;\n };\n\n this.createModeDelegates = function (mapping) {\n this.$embeds = [];\n this.$modes = {};\n for (var i in mapping) {\n if (mapping[i]) {\n this.$embeds.push(i);\n this.$modes[i] = new mapping[i]();\n }\n }\n\n var delegations = [\"toggleBlockComment\", \"toggleCommentLines\", \"getNextLineIndent\", \n \"checkOutdent\", \"autoOutdent\", \"transformAction\", \"getCompletions\"];\n\n for (var i = 0; i < delegations.length; i++) {\n (function(scope) {\n var functionName = delegations[i];\n var defaultHandler = scope[functionName];\n scope[delegations[i]] = function() {\n return this.$delegator(functionName, arguments, defaultHandler);\n };\n }(this));\n }\n };\n\n this.$delegator = function(method, args, defaultHandler) {\n var state = args[0];\n if (typeof state != \"string\")\n state = state[0];\n for (var i = 0; i < this.$embeds.length; i++) {\n if (!this.$modes[this.$embeds[i]]) continue;\n\n var split = state.split(this.$embeds[i]);\n if (!split[0] && split[1]) {\n args[0] = split[1];\n var mode = this.$modes[this.$embeds[i]];\n return mode[method].apply(mode, args);\n }\n }\n var ret = defaultHandler.apply(this, args);\n return defaultHandler ? ret : undefined;\n };\n\n this.transformAction = function(state, action, editor, session, param) {\n if (this.$behaviour) {\n var behaviours = this.$behaviour.getBehaviours();\n for (var key in behaviours) {\n if (behaviours[key][action]) {\n var ret = behaviours[key][action].apply(this, arguments);\n if (ret) {\n return ret;\n }\n }\n }\n }\n };\n \n this.getKeywords = function(append) {\n if (!this.completionKeywords) {\n var rules = this.$tokenizer.rules;\n var completionKeywords = [];\n for (var rule in rules) {\n var ruleItr = rules[rule];\n for (var r = 0, l = ruleItr.length; r < l; r++) {\n if (typeof ruleItr[r].token === \"string\") {\n if (/keyword|support|storage/.test(ruleItr[r].token))\n completionKeywords.push(ruleItr[r].regex);\n }\n else if (typeof ruleItr[r].token === \"object\") {\n for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) { \n if (/keyword|support|storage/.test(ruleItr[r].token[a])) {\n var rule = ruleItr[r].regex.match(/\\(.+?\\)/g)[a];\n completionKeywords.push(rule.substr(1, rule.length - 2));\n }\n }\n }\n }\n }\n this.completionKeywords = completionKeywords;\n }\n if (!append)\n return this.$keywordList;\n return completionKeywords.concat(this.$keywordList || []);\n };\n \n this.$createKeywordList = function() {\n if (!this.$highlightRules)\n this.getTokenizer();\n return this.$keywordList = this.$highlightRules.$keywordList || [];\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n var keywords = this.$keywordList || this.$createKeywordList();\n return keywords.map(function(word) {\n return {\n name: word,\n value: word,\n score: 0,\n meta: \"keyword\"\n };\n });\n };\n\n this.$id = \"ace/mode/text\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n\nace.define(\"ace/apply_delta\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nfunction throwDeltaError(delta, errorText){\n console.log(\"Invalid Delta:\", delta);\n throw \"Invalid Delta: \" + errorText;\n}\n\nfunction positionInDocument(docLines, position) {\n return position.row >= 0 && position.row < docLines.length &&\n position.column >= 0 && position.column <= docLines[position.row].length;\n}\n\nfunction validateDelta(docLines, delta) {\n if (delta.action != \"insert\" && delta.action != \"remove\")\n throwDeltaError(delta, \"delta.action must be 'insert' or 'remove'\");\n if (!(delta.lines instanceof Array))\n throwDeltaError(delta, \"delta.lines must be an Array\");\n if (!delta.start || !delta.end)\n throwDeltaError(delta, \"delta.start/end must be an present\");\n var start = delta.start;\n if (!positionInDocument(docLines, delta.start))\n throwDeltaError(delta, \"delta.start must be contained in document\");\n var end = delta.end;\n if (delta.action == \"remove\" && !positionInDocument(docLines, end))\n throwDeltaError(delta, \"delta.end must contained in document for 'remove' actions\");\n var numRangeRows = end.row - start.row;\n var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));\n if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)\n throwDeltaError(delta, \"delta.range must match delta lines\");\n}\n\nexports.applyDelta = function(docLines, delta, doNotValidate) {\n \n var row = delta.start.row;\n var startColumn = delta.start.column;\n var line = docLines[row] || \"\";\n switch (delta.action) {\n case \"insert\":\n var lines = delta.lines;\n if (lines.length === 1) {\n docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);\n } else {\n var args = [row, 1].concat(delta.lines);\n docLines.splice.apply(docLines, args);\n docLines[row] = line.substring(0, startColumn) + docLines[row];\n docLines[row + delta.lines.length - 1] += line.substring(startColumn);\n }\n break;\n case \"remove\":\n var endColumn = delta.end.column;\n var endRow = delta.end.row;\n if (row === endRow) {\n docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);\n } else {\n docLines.splice(\n row, endRow - row + 1,\n line.substring(0, startColumn) + docLines[endRow].substring(endColumn)\n );\n }\n break;\n }\n};\n});\n\nace.define(\"ace/anchor\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar Anchor = exports.Anchor = function(doc, row, column) {\n this.$onChange = this.onChange.bind(this);\n this.attach(doc);\n \n if (typeof column == \"undefined\")\n this.setPosition(row.row, row.column);\n else\n this.setPosition(row, column);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.getPosition = function() {\n return this.$clipPositionToDocument(this.row, this.column);\n };\n this.getDocument = function() {\n return this.document;\n };\n this.$insertRight = false;\n this.onChange = function(delta) {\n if (delta.start.row == delta.end.row && delta.start.row != this.row)\n return;\n\n if (delta.start.row > this.row)\n return;\n \n var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);\n this.setPosition(point.row, point.column, true);\n };\n \n function $pointsInOrder(point1, point2, equalPointsInOrder) {\n var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;\n return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);\n }\n \n function $getTransformedPoint(delta, point, moveIfEqual) {\n var deltaIsInsert = delta.action == \"insert\";\n var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);\n var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);\n var deltaStart = delta.start;\n var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.\n if ($pointsInOrder(point, deltaStart, moveIfEqual)) {\n return {\n row: point.row,\n column: point.column\n };\n }\n if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {\n return {\n row: point.row + deltaRowShift,\n column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)\n };\n }\n \n return {\n row: deltaStart.row,\n column: deltaStart.column\n };\n }\n this.setPosition = function(row, column, noClip) {\n var pos;\n if (noClip) {\n pos = {\n row: row,\n column: column\n };\n } else {\n pos = this.$clipPositionToDocument(row, column);\n }\n\n if (this.row == pos.row && this.column == pos.column)\n return;\n\n var old = {\n row: this.row,\n column: this.column\n };\n\n this.row = pos.row;\n this.column = pos.column;\n this._signal(\"change\", {\n old: old,\n value: pos\n });\n };\n this.detach = function() {\n this.document.removeEventListener(\"change\", this.$onChange);\n };\n this.attach = function(doc) {\n this.document = doc || this.document;\n this.document.on(\"change\", this.$onChange);\n };\n this.$clipPositionToDocument = function(row, column) {\n var pos = {};\n\n if (row >= this.document.getLength()) {\n pos.row = Math.max(0, this.document.getLength() - 1);\n pos.column = this.document.getLine(pos.row).length;\n }\n else if (row < 0) {\n pos.row = 0;\n pos.column = 0;\n }\n else {\n pos.row = row;\n pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));\n }\n\n if (column < 0)\n pos.column = 0;\n\n return pos;\n };\n\n}).call(Anchor.prototype);\n\n});\n\nace.define(\"ace/document\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/apply_delta\",\"ace/lib/event_emitter\",\"ace/range\",\"ace/anchor\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar applyDelta = acequire(\"./apply_delta\").applyDelta;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Range = acequire(\"./range\").Range;\nvar Anchor = acequire(\"./anchor\").Anchor;\n\nvar Document = function(textOrLines) {\n this.$lines = [\"\"];\n if (textOrLines.length === 0) {\n this.$lines = [\"\"];\n } else if (Array.isArray(textOrLines)) {\n this.insertMergedLines({row: 0, column: 0}, textOrLines);\n } else {\n this.insert({row: 0, column:0}, textOrLines);\n }\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setValue = function(text) {\n var len = this.getLength() - 1;\n this.remove(new Range(0, 0, len, this.getLine(len).length));\n this.insert({row: 0, column: 0}, text);\n };\n this.getValue = function() {\n return this.getAllLines().join(this.getNewLineCharacter());\n };\n this.createAnchor = function(row, column) {\n return new Anchor(this, row, column);\n };\n if (\"aaa\".split(/a/).length === 0) {\n this.$split = function(text) {\n return text.replace(/\\r\\n|\\r/g, \"\\n\").split(\"\\n\");\n };\n } else {\n this.$split = function(text) {\n return text.split(/\\r\\n|\\r|\\n/);\n };\n }\n\n\n this.$detectNewLine = function(text) {\n var match = text.match(/^.*?(\\r\\n|\\r|\\n)/m);\n this.$autoNewLine = match ? match[1] : \"\\n\";\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineCharacter = function() {\n switch (this.$newLineMode) {\n case \"windows\":\n return \"\\r\\n\";\n case \"unix\":\n return \"\\n\";\n default:\n return this.$autoNewLine || \"\\n\";\n }\n };\n\n this.$autoNewLine = \"\";\n this.$newLineMode = \"auto\";\n this.setNewLineMode = function(newLineMode) {\n if (this.$newLineMode === newLineMode)\n return;\n\n this.$newLineMode = newLineMode;\n this._signal(\"changeNewLineMode\");\n };\n this.getNewLineMode = function() {\n return this.$newLineMode;\n };\n this.isNewLine = function(text) {\n return (text == \"\\r\\n\" || text == \"\\r\" || text == \"\\n\");\n };\n this.getLine = function(row) {\n return this.$lines[row] || \"\";\n };\n this.getLines = function(firstRow, lastRow) {\n return this.$lines.slice(firstRow, lastRow + 1);\n };\n this.getAllLines = function() {\n return this.getLines(0, this.getLength());\n };\n this.getLength = function() {\n return this.$lines.length;\n };\n this.getTextRange = function(range) {\n return this.getLinesForRange(range).join(this.getNewLineCharacter());\n };\n this.getLinesForRange = function(range) {\n var lines;\n if (range.start.row === range.end.row) {\n lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];\n } else {\n lines = this.getLines(range.start.row, range.end.row);\n lines[0] = (lines[0] || \"\").substring(range.start.column);\n var l = lines.length - 1;\n if (range.end.row - range.start.row == l)\n lines[l] = lines[l].substring(0, range.end.column);\n }\n return lines;\n };\n this.insertLines = function(row, lines) {\n console.warn(\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\");\n return this.insertFullLines(row, lines);\n };\n this.removeLines = function(firstRow, lastRow) {\n console.warn(\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\");\n return this.removeFullLines(firstRow, lastRow);\n };\n this.insertNewLine = function(position) {\n console.warn(\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\");\n return this.insertMergedLines(position, [\"\", \"\"]);\n };\n this.insert = function(position, text) {\n if (this.getLength() <= 1)\n this.$detectNewLine(text);\n \n return this.insertMergedLines(position, this.$split(text));\n };\n this.insertInLine = function(position, text) {\n var start = this.clippedPos(position.row, position.column);\n var end = this.pos(position.row, position.column + text.length);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: [text]\n }, true);\n \n return this.clonePos(end);\n };\n \n this.clippedPos = function(row, column) {\n var length = this.getLength();\n if (row === undefined) {\n row = length;\n } else if (row < 0) {\n row = 0;\n } else if (row >= length) {\n row = length - 1;\n column = undefined;\n }\n var line = this.getLine(row);\n if (column == undefined)\n column = line.length;\n column = Math.min(Math.max(column, 0), line.length);\n return {row: row, column: column};\n };\n \n this.clonePos = function(pos) {\n return {row: pos.row, column: pos.column};\n };\n \n this.pos = function(row, column) {\n return {row: row, column: column};\n };\n \n this.$clipPosition = function(position) {\n var length = this.getLength();\n if (position.row >= length) {\n position.row = Math.max(0, length - 1);\n position.column = this.getLine(length - 1).length;\n } else {\n position.row = Math.max(0, position.row);\n position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);\n }\n return position;\n };\n this.insertFullLines = function(row, lines) {\n row = Math.min(Math.max(row, 0), this.getLength());\n var column = 0;\n if (row < this.getLength()) {\n lines = lines.concat([\"\"]);\n column = 0;\n } else {\n lines = [\"\"].concat(lines);\n row--;\n column = this.$lines[row].length;\n }\n this.insertMergedLines({row: row, column: column}, lines);\n }; \n this.insertMergedLines = function(position, lines) {\n var start = this.clippedPos(position.row, position.column);\n var end = {\n row: start.row + lines.length - 1,\n column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length\n };\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"insert\",\n lines: lines\n });\n \n return this.clonePos(end);\n };\n this.remove = function(range) {\n var start = this.clippedPos(range.start.row, range.start.column);\n var end = this.clippedPos(range.end.row, range.end.column);\n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n });\n return this.clonePos(start);\n };\n this.removeInLine = function(row, startColumn, endColumn) {\n var start = this.clippedPos(row, startColumn);\n var end = this.clippedPos(row, endColumn);\n \n this.applyDelta({\n start: start,\n end: end,\n action: \"remove\",\n lines: this.getLinesForRange({start: start, end: end})\n }, true);\n \n return this.clonePos(start);\n };\n this.removeFullLines = function(firstRow, lastRow) {\n firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);\n lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);\n var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;\n var deleteLastNewLine = lastRow < this.getLength() - 1;\n var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );\n var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );\n var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );\n var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); \n var range = new Range(startRow, startCol, endRow, endCol);\n var deletedLines = this.$lines.slice(firstRow, lastRow + 1);\n \n this.applyDelta({\n start: range.start,\n end: range.end,\n action: \"remove\",\n lines: this.getLinesForRange(range)\n });\n return deletedLines;\n };\n this.removeNewLine = function(row) {\n if (row < this.getLength() - 1 && row >= 0) {\n this.applyDelta({\n start: this.pos(row, this.getLine(row).length),\n end: this.pos(row + 1, 0),\n action: \"remove\",\n lines: [\"\", \"\"]\n });\n }\n };\n this.replace = function(range, text) {\n if (!(range instanceof Range))\n range = Range.fromPoints(range.start, range.end);\n if (text.length === 0 && range.isEmpty())\n return range.start;\n if (text == this.getTextRange(range))\n return range.end;\n\n this.remove(range);\n var end;\n if (text) {\n end = this.insert(range.start, text);\n }\n else {\n end = range.start;\n }\n \n return end;\n };\n this.applyDeltas = function(deltas) {\n for (var i=0; i=0; i--) {\n this.revertDelta(deltas[i]);\n }\n };\n this.applyDelta = function(delta, doNotValidate) {\n var isInsert = delta.action == \"insert\";\n if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]\n : !Range.comparePoints(delta.start, delta.end)) {\n return;\n }\n \n if (isInsert && delta.lines.length > 20000)\n this.$splitAndapplyLargeDelta(delta, 20000);\n applyDelta(this.$lines, delta, doNotValidate);\n this._signal(\"change\", delta);\n };\n \n this.$splitAndapplyLargeDelta = function(delta, MAX) {\n var lines = delta.lines;\n var l = lines.length;\n var row = delta.start.row; \n var column = delta.start.column;\n var from = 0, to = 0;\n do {\n from = to;\n to += MAX - 1;\n var chunk = lines.slice(from, to);\n if (to > l) {\n delta.lines = chunk;\n delta.start.row = row + from;\n delta.start.column = column;\n break;\n }\n chunk.push(\"\");\n this.applyDelta({\n start: this.pos(row + from, column),\n end: this.pos(row + to, column = 0),\n action: delta.action,\n lines: chunk\n }, true);\n } while(true);\n };\n this.revertDelta = function(delta) {\n this.applyDelta({\n start: this.clonePos(delta.start),\n end: this.clonePos(delta.end),\n action: (delta.action == \"insert\" ? \"remove\" : \"insert\"),\n lines: delta.lines.slice()\n });\n };\n this.indexToPosition = function(index, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n for (var i = startRow || 0, l = lines.length; i < l; i++) {\n index -= lines[i].length + newlineLength;\n if (index < 0)\n return {row: i, column: index + lines[i].length + newlineLength};\n }\n return {row: l-1, column: lines[l-1].length};\n };\n this.positionToIndex = function(pos, startRow) {\n var lines = this.$lines || this.getAllLines();\n var newlineLength = this.getNewLineCharacter().length;\n var index = 0;\n var row = Math.min(pos.row, lines.length);\n for (var i = startRow || 0; i < row; ++i)\n index += lines[i].length + newlineLength;\n\n return index + pos.column;\n };\n\n}).call(Document.prototype);\n\nexports.Document = Document;\n});\n\nace.define(\"ace/background_tokenizer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\n\nvar BackgroundTokenizer = function(tokenizer, editor) {\n this.running = false;\n this.lines = [];\n this.states = [];\n this.currentLine = 0;\n this.tokenizer = tokenizer;\n\n var self = this;\n\n this.$worker = function() {\n if (!self.running) { return; }\n\n var workerStart = new Date();\n var currentLine = self.currentLine;\n var endLine = -1;\n var doc = self.doc;\n\n var startLine = currentLine;\n while (self.lines[currentLine])\n currentLine++;\n \n var len = doc.getLength();\n var processedLines = 0;\n self.running = false;\n while (currentLine < len) {\n self.$tokenizeRow(currentLine);\n endLine = currentLine;\n do {\n currentLine++;\n } while (self.lines[currentLine]);\n processedLines ++;\n if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { \n self.running = setTimeout(self.$worker, 20);\n break;\n }\n }\n self.currentLine = currentLine;\n \n if (endLine == -1)\n endLine = currentLine;\n\n if (startLine <= endLine)\n self.fireUpdateEvent(startLine, endLine);\n };\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n this.setTokenizer = function(tokenizer) {\n this.tokenizer = tokenizer;\n this.lines = [];\n this.states = [];\n\n this.start(0);\n };\n this.setDocument = function(doc) {\n this.doc = doc;\n this.lines = [];\n this.states = [];\n\n this.stop();\n };\n this.fireUpdateEvent = function(firstRow, lastRow) {\n var data = {\n first: firstRow,\n last: lastRow\n };\n this._signal(\"update\", {data: data});\n };\n this.start = function(startRow) {\n this.currentLine = Math.min(startRow || 0, this.currentLine, this.doc.getLength());\n this.lines.splice(this.currentLine, this.lines.length);\n this.states.splice(this.currentLine, this.states.length);\n\n this.stop();\n this.running = setTimeout(this.$worker, 700);\n };\n \n this.scheduleStart = function() {\n if (!this.running)\n this.running = setTimeout(this.$worker, 700);\n };\n\n this.$updateOnChange = function(delta) {\n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n this.lines[startRow] = null;\n } else if (delta.action == \"remove\") {\n this.lines.splice(startRow, len + 1, null);\n this.states.splice(startRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(startRow, 1);\n this.lines.splice.apply(this.lines, args);\n this.states.splice.apply(this.states, args);\n }\n\n this.currentLine = Math.min(startRow, this.currentLine, this.doc.getLength());\n\n this.stop();\n };\n this.stop = function() {\n if (this.running)\n clearTimeout(this.running);\n this.running = false;\n };\n this.getTokens = function(row) {\n return this.lines[row] || this.$tokenizeRow(row);\n };\n this.getState = function(row) {\n if (this.currentLine == row)\n this.$tokenizeRow(row);\n return this.states[row] || \"start\";\n };\n\n this.$tokenizeRow = function(row) {\n var line = this.doc.getLine(row);\n var state = this.states[row - 1];\n\n var data = this.tokenizer.getLineTokens(line, state, row);\n\n if (this.states[row] + \"\" !== data.state + \"\") {\n this.states[row] = data.state;\n this.lines[row + 1] = null;\n if (this.currentLine > row + 1)\n this.currentLine = row + 1;\n } else if (this.currentLine == row) {\n this.currentLine = row + 1;\n }\n\n return this.lines[row] = data.tokens;\n };\n\n}).call(BackgroundTokenizer.prototype);\n\nexports.BackgroundTokenizer = BackgroundTokenizer;\n});\n\nace.define(\"ace/search_highlight\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar SearchHighlight = function(regExp, clazz, type) {\n this.setRegexp(regExp);\n this.clazz = clazz;\n this.type = type || \"text\";\n};\n\n(function() {\n this.MAX_RANGES = 500;\n \n this.setRegexp = function(regExp) {\n if (this.regExp+\"\" == regExp+\"\")\n return;\n this.regExp = regExp;\n this.cache = [];\n };\n\n this.update = function(html, markerLayer, session, config) {\n if (!this.regExp)\n return;\n var start = config.firstRow, end = config.lastRow;\n\n for (var i = start; i <= end; i++) {\n var ranges = this.cache[i];\n if (ranges == null) {\n ranges = lang.getMatchOffsets(session.getLine(i), this.regExp);\n if (ranges.length > this.MAX_RANGES)\n ranges = ranges.slice(0, this.MAX_RANGES);\n ranges = ranges.map(function(match) {\n return new Range(i, match.offset, i, match.offset + match.length);\n });\n this.cache[i] = ranges.length ? ranges : \"\";\n }\n\n for (var j = ranges.length; j --; ) {\n markerLayer.drawSingleLineMarker(\n html, ranges[j].toScreenRange(session), this.clazz, config);\n }\n }\n };\n\n}).call(SearchHighlight.prototype);\n\nexports.SearchHighlight = SearchHighlight;\n});\n\nace.define(\"ace/edit_session/fold_line\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nfunction FoldLine(foldData, folds) {\n this.foldData = foldData;\n if (Array.isArray(folds)) {\n this.folds = folds;\n } else {\n folds = this.folds = [ folds ];\n }\n\n var last = folds[folds.length - 1];\n this.range = new Range(folds[0].start.row, folds[0].start.column,\n last.end.row, last.end.column);\n this.start = this.range.start;\n this.end = this.range.end;\n\n this.folds.forEach(function(fold) {\n fold.setFoldLine(this);\n }, this);\n}\n\n(function() {\n this.shiftRow = function(shift) {\n this.start.row += shift;\n this.end.row += shift;\n this.folds.forEach(function(fold) {\n fold.start.row += shift;\n fold.end.row += shift;\n });\n };\n\n this.addFold = function(fold) {\n if (fold.sameRow) {\n if (fold.start.row < this.startRow || fold.endRow > this.endRow) {\n throw new Error(\"Can't add a fold to this FoldLine as it has no connection\");\n }\n this.folds.push(fold);\n this.folds.sort(function(a, b) {\n return -a.range.compareEnd(b.start.row, b.start.column);\n });\n if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) {\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) {\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n }\n } else if (fold.start.row == this.end.row) {\n this.folds.push(fold);\n this.end.row = fold.end.row;\n this.end.column = fold.end.column;\n } else if (fold.end.row == this.start.row) {\n this.folds.unshift(fold);\n this.start.row = fold.start.row;\n this.start.column = fold.start.column;\n } else {\n throw new Error(\"Trying to add fold to FoldRow that doesn't have a matching row\");\n }\n fold.foldLine = this;\n };\n\n this.containsRow = function(row) {\n return row >= this.start.row && row <= this.end.row;\n };\n\n this.walk = function(callback, endRow, endColumn) {\n var lastEnd = 0,\n folds = this.folds,\n fold,\n cmp, stop, isNewRow = true;\n\n if (endRow == null) {\n endRow = this.end.row;\n endColumn = this.end.column;\n }\n\n for (var i = 0; i < folds.length; i++) {\n fold = folds[i];\n\n cmp = fold.range.compareStart(endRow, endColumn);\n if (cmp == -1) {\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n return;\n }\n\n stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow);\n stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd);\n if (stop || cmp === 0) {\n return;\n }\n isNewRow = !fold.sameRow;\n lastEnd = fold.end.column;\n }\n callback(null, endRow, endColumn, lastEnd, isNewRow);\n };\n\n this.getNextFoldTo = function(row, column) {\n var fold, cmp;\n for (var i = 0; i < this.folds.length; i++) {\n fold = this.folds[i];\n cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n return {\n fold: fold,\n kind: \"after\"\n };\n } else if (cmp === 0) {\n return {\n fold: fold,\n kind: \"inside\"\n };\n }\n }\n return null;\n };\n\n this.addRemoveChars = function(row, column, len) {\n var ret = this.getNextFoldTo(row, column),\n fold, folds;\n if (ret) {\n fold = ret.fold;\n if (ret.kind == \"inside\"\n && fold.start.column != column\n && fold.start.row != row)\n {\n window.console && window.console.log(row, column, fold);\n } else if (fold.start.row == row) {\n folds = this.folds;\n var i = folds.indexOf(fold);\n if (i === 0) {\n this.start.column += len;\n }\n for (i; i < folds.length; i++) {\n fold = folds[i];\n fold.start.column += len;\n if (!fold.sameRow) {\n return;\n }\n fold.end.column += len;\n }\n this.end.column += len;\n }\n }\n };\n\n this.split = function(row, column) {\n var pos = this.getNextFoldTo(row, column);\n \n if (!pos || pos.kind == \"inside\")\n return null;\n \n var fold = pos.fold;\n var folds = this.folds;\n var foldData = this.foldData;\n \n var i = folds.indexOf(fold);\n var foldBefore = folds[i - 1];\n this.end.row = foldBefore.end.row;\n this.end.column = foldBefore.end.column;\n folds = folds.splice(i, folds.length - i);\n\n var newFoldLine = new FoldLine(foldData, folds);\n foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine);\n return newFoldLine;\n };\n\n this.merge = function(foldLineNext) {\n var folds = foldLineNext.folds;\n for (var i = 0; i < folds.length; i++) {\n this.addFold(folds[i]);\n }\n var foldData = this.foldData;\n foldData.splice(foldData.indexOf(foldLineNext), 1);\n };\n\n this.toString = function() {\n var ret = [this.range.toString() + \": [\" ];\n\n this.folds.forEach(function(fold) {\n ret.push(\" \" + fold.toString());\n });\n ret.push(\"]\");\n return ret.join(\"\\n\");\n };\n\n this.idxToPosition = function(idx) {\n var lastFoldEndColumn = 0;\n\n for (var i = 0; i < this.folds.length; i++) {\n var fold = this.folds[i];\n\n idx -= fold.start.column - lastFoldEndColumn;\n if (idx < 0) {\n return {\n row: fold.start.row,\n column: fold.start.column + idx\n };\n }\n\n idx -= fold.placeholder.length;\n if (idx < 0) {\n return fold.start;\n }\n\n lastFoldEndColumn = fold.end.column;\n }\n\n return {\n row: this.end.row,\n column: this.end.column + idx\n };\n };\n}).call(FoldLine.prototype);\n\nexports.FoldLine = FoldLine;\n});\n\nace.define(\"ace/range_list\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar Range = acequire(\"./range\").Range;\nvar comparePoints = Range.comparePoints;\n\nvar RangeList = function() {\n this.ranges = [];\n};\n\n(function() {\n this.comparePoints = comparePoints;\n\n this.pointIndex = function(pos, excludeEdges, startIndex) {\n var list = this.ranges;\n\n for (var i = startIndex || 0; i < list.length; i++) {\n var range = list[i];\n var cmpEnd = comparePoints(pos, range.end);\n if (cmpEnd > 0)\n continue;\n var cmpStart = comparePoints(pos, range.start);\n if (cmpEnd === 0)\n return excludeEdges && cmpStart !== 0 ? -i-2 : i;\n if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))\n return i;\n\n return -i-1;\n }\n return -i - 1;\n };\n\n this.add = function(range) {\n var excludeEdges = !range.isEmpty();\n var startIndex = this.pointIndex(range.start, excludeEdges);\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n\n var endIndex = this.pointIndex(range.end, excludeEdges, startIndex);\n\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n else\n endIndex++;\n return this.ranges.splice(startIndex, endIndex - startIndex, range);\n };\n\n this.addList = function(list) {\n var removed = [];\n for (var i = list.length; i--; ) {\n removed.push.apply(removed, this.add(list[i]));\n }\n return removed;\n };\n\n this.substractPoint = function(pos) {\n var i = this.pointIndex(pos);\n\n if (i >= 0)\n return this.ranges.splice(i, 1);\n };\n this.merge = function() {\n var removed = [];\n var list = this.ranges;\n \n list = list.sort(function(a, b) {\n return comparePoints(a.start, b.start);\n });\n \n var next = list[0], range;\n for (var i = 1; i < list.length; i++) {\n range = next;\n next = list[i];\n var cmp = comparePoints(range.end, next.start);\n if (cmp < 0)\n continue;\n\n if (cmp == 0 && !range.isEmpty() && !next.isEmpty())\n continue;\n\n if (comparePoints(range.end, next.end) < 0) {\n range.end.row = next.end.row;\n range.end.column = next.end.column;\n }\n\n list.splice(i, 1);\n removed.push(next);\n next = range;\n i--;\n }\n \n this.ranges = list;\n\n return removed;\n };\n\n this.contains = function(row, column) {\n return this.pointIndex({row: row, column: column}) >= 0;\n };\n\n this.containsPoint = function(pos) {\n return this.pointIndex(pos) >= 0;\n };\n\n this.rangeAtPoint = function(pos) {\n var i = this.pointIndex(pos);\n if (i >= 0)\n return this.ranges[i];\n };\n\n\n this.clipRows = function(startRow, endRow) {\n var list = this.ranges;\n if (list[0].start.row > endRow || list[list.length - 1].start.row < startRow)\n return [];\n\n var startIndex = this.pointIndex({row: startRow, column: 0});\n if (startIndex < 0)\n startIndex = -startIndex - 1;\n var endIndex = this.pointIndex({row: endRow, column: 0}, startIndex);\n if (endIndex < 0)\n endIndex = -endIndex - 1;\n\n var clipped = [];\n for (var i = startIndex; i < endIndex; i++) {\n clipped.push(list[i]);\n }\n return clipped;\n };\n\n this.removeAll = function() {\n return this.ranges.splice(0, this.ranges.length);\n };\n\n this.attach = function(session) {\n if (this.session)\n this.detach();\n\n this.session = session;\n this.onChange = this.$onChange.bind(this);\n\n this.session.on('change', this.onChange);\n };\n\n this.detach = function() {\n if (!this.session)\n return;\n this.session.removeListener('change', this.onChange);\n this.session = null;\n };\n\n this.$onChange = function(delta) {\n if (delta.action == \"insert\"){\n var start = delta.start;\n var end = delta.end;\n } else {\n var end = delta.start;\n var start = delta.end;\n }\n var startRow = start.row;\n var endRow = end.row;\n var lineDif = endRow - startRow;\n\n var colDiff = -start.column + end.column;\n var ranges = this.ranges;\n\n for (var i = 0, n = ranges.length; i < n; i++) {\n var r = ranges[i];\n if (r.end.row < startRow)\n continue;\n if (r.start.row > startRow)\n break;\n\n if (r.start.row == startRow && r.start.column >= start.column ) {\n if (r.start.column == start.column && this.$insertRight) {\n } else {\n r.start.column += colDiff;\n r.start.row += lineDif;\n }\n }\n if (r.end.row == startRow && r.end.column >= start.column) {\n if (r.end.column == start.column && this.$insertRight) {\n continue;\n }\n if (r.end.column == start.column && colDiff > 0 && i < n - 1) { \n if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)\n r.end.column -= colDiff;\n }\n r.end.column += colDiff;\n r.end.row += lineDif;\n }\n }\n\n if (lineDif != 0 && i < n) {\n for (; i < n; i++) {\n var r = ranges[i];\n r.start.row += lineDif;\n r.end.row += lineDif;\n }\n }\n };\n\n}).call(RangeList.prototype);\n\nexports.RangeList = RangeList;\n});\n\nace.define(\"ace/edit_session/fold\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/range_list\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar RangeList = acequire(\"../range_list\").RangeList;\nvar oop = acequire(\"../lib/oop\");\nvar Fold = exports.Fold = function(range, placeholder) {\n this.foldLine = null;\n this.placeholder = placeholder;\n this.range = range;\n this.start = range.start;\n this.end = range.end;\n\n this.sameRow = range.start.row == range.end.row;\n this.subFolds = this.ranges = [];\n};\n\noop.inherits(Fold, RangeList);\n\n(function() {\n\n this.toString = function() {\n return '\"' + this.placeholder + '\" ' + this.range.toString();\n };\n\n this.setFoldLine = function(foldLine) {\n this.foldLine = foldLine;\n this.subFolds.forEach(function(fold) {\n fold.setFoldLine(foldLine);\n });\n };\n\n this.clone = function() {\n var range = this.range.clone();\n var fold = new Fold(range, this.placeholder);\n this.subFolds.forEach(function(subFold) {\n fold.subFolds.push(subFold.clone());\n });\n fold.collapseChildren = this.collapseChildren;\n return fold;\n };\n\n this.addSubFold = function(fold) {\n if (this.range.isEqual(fold))\n return;\n\n if (!this.range.containsRange(fold))\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n consumeRange(fold, this.start);\n\n var row = fold.start.row, column = fold.start.column;\n for (var i = 0, cmp = -1; i < this.subFolds.length; i++) {\n cmp = this.subFolds[i].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterStart = this.subFolds[i];\n\n if (cmp == 0)\n return afterStart.addSubFold(fold);\n var row = fold.range.end.row, column = fold.range.end.column;\n for (var j = i, cmp = -1; j < this.subFolds.length; j++) {\n cmp = this.subFolds[j].range.compare(row, column);\n if (cmp != 1)\n break;\n }\n var afterEnd = this.subFolds[j];\n\n if (cmp == 0)\n throw new Error(\"A fold can't intersect already existing fold\" + fold.range + this.range);\n\n var consumedFolds = this.subFolds.splice(i, j - i, fold);\n fold.setFoldLine(this.foldLine);\n\n return fold;\n };\n \n this.restoreRange = function(range) {\n return restoreRange(range, this.start);\n };\n\n}).call(Fold.prototype);\n\nfunction consumePoint(point, anchor) {\n point.row -= anchor.row;\n if (point.row == 0)\n point.column -= anchor.column;\n}\nfunction consumeRange(range, anchor) {\n consumePoint(range.start, anchor);\n consumePoint(range.end, anchor);\n}\nfunction restorePoint(point, anchor) {\n if (point.row == 0)\n point.column += anchor.column;\n point.row += anchor.row;\n}\nfunction restoreRange(range, anchor) {\n restorePoint(range.start, anchor);\n restorePoint(range.end, anchor);\n}\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar FoldLine = acequire(\"./fold_line\").FoldLine;\nvar Fold = acequire(\"./fold\").Fold;\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\n\nfunction Folding() {\n this.getFoldAt = function(row, column, side) {\n var foldLine = this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var folds = foldLine.folds;\n for (var i = 0; i < folds.length; i++) {\n var fold = folds[i];\n if (fold.range.contains(row, column)) {\n if (side == 1 && fold.range.isEnd(row, column)) {\n continue;\n } else if (side == -1 && fold.range.isStart(row, column)) {\n continue;\n }\n return fold;\n }\n }\n };\n this.getFoldsInRange = function(range) {\n var start = range.start;\n var end = range.end;\n var foldLines = this.$foldData;\n var foundFolds = [];\n\n start.column += 1;\n end.column -= 1;\n\n for (var i = 0; i < foldLines.length; i++) {\n var cmp = foldLines[i].range.compareRange(range);\n if (cmp == 2) {\n continue;\n }\n else if (cmp == -2) {\n break;\n }\n\n var folds = foldLines[i].folds;\n for (var j = 0; j < folds.length; j++) {\n var fold = folds[j];\n cmp = fold.range.compareRange(range);\n if (cmp == -2) {\n break;\n } else if (cmp == 2) {\n continue;\n } else\n if (cmp == 42) {\n break;\n }\n foundFolds.push(fold);\n }\n }\n start.column -= 1;\n end.column += 1;\n\n return foundFolds;\n };\n\n this.getFoldsInRangeList = function(ranges) {\n if (Array.isArray(ranges)) {\n var folds = [];\n ranges.forEach(function(range) {\n folds = folds.concat(this.getFoldsInRange(range));\n }, this);\n } else {\n var folds = this.getFoldsInRange(ranges);\n }\n return folds;\n };\n this.getAllFolds = function() {\n var folds = [];\n var foldLines = this.$foldData;\n \n for (var i = 0; i < foldLines.length; i++)\n for (var j = 0; j < foldLines[i].folds.length; j++)\n folds.push(foldLines[i].folds[j]);\n\n return folds;\n };\n this.getFoldStringAt = function(row, column, trim, foldLine) {\n foldLine = foldLine || this.getFoldLine(row);\n if (!foldLine)\n return null;\n\n var lastFold = {\n end: { column: 0 }\n };\n var str, fold;\n for (var i = 0; i < foldLine.folds.length; i++) {\n fold = foldLine.folds[i];\n var cmp = fold.range.compareEnd(row, column);\n if (cmp == -1) {\n str = this\n .getLine(fold.start.row)\n .substring(lastFold.end.column, fold.start.column);\n break;\n }\n else if (cmp === 0) {\n return null;\n }\n lastFold = fold;\n }\n if (!str)\n str = this.getLine(fold.start.row).substring(lastFold.end.column);\n\n if (trim == -1)\n return str.substring(0, column - lastFold.end.column);\n else if (trim == 1)\n return str.substring(column - lastFold.end.column);\n else\n return str;\n };\n\n this.getFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) {\n return foldLine;\n } else if (foldLine.end.row > docRow) {\n return null;\n }\n }\n return null;\n };\n this.getNextFoldLine = function(docRow, startFoldLine) {\n var foldData = this.$foldData;\n var i = 0;\n if (startFoldLine)\n i = foldData.indexOf(startFoldLine);\n if (i == -1)\n i = 0;\n for (i; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (foldLine.end.row >= docRow) {\n return foldLine;\n }\n }\n return null;\n };\n\n this.getFoldedRowCount = function(first, last) {\n var foldData = this.$foldData, rowCount = last-first+1;\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i],\n end = foldLine.end.row,\n start = foldLine.start.row;\n if (end >= last) {\n if (start < last) {\n if (start >= first)\n rowCount -= last-start;\n else\n rowCount = 0; // in one fold\n }\n break;\n } else if (end >= first){\n if (start >= first) // fold inside range\n rowCount -= end-start;\n else\n rowCount -= end-first+1;\n }\n }\n return rowCount;\n };\n\n this.$addFoldLine = function(foldLine) {\n this.$foldData.push(foldLine);\n this.$foldData.sort(function(a, b) {\n return a.start.row - b.start.row;\n });\n return foldLine;\n };\n this.addFold = function(placeholder, range) {\n var foldData = this.$foldData;\n var added = false;\n var fold;\n \n if (placeholder instanceof Fold)\n fold = placeholder;\n else {\n fold = new Fold(range, placeholder);\n fold.collapseChildren = range.collapseChildren;\n }\n this.$clipRangeToDocument(fold.range);\n\n var startRow = fold.start.row;\n var startColumn = fold.start.column;\n var endRow = fold.end.row;\n var endColumn = fold.end.column;\n if (!(startRow < endRow || \n startRow == endRow && startColumn <= endColumn - 2))\n throw new Error(\"The range has to be at least 2 characters width\");\n\n var startFold = this.getFoldAt(startRow, startColumn, 1);\n var endFold = this.getFoldAt(endRow, endColumn, -1);\n if (startFold && endFold == startFold)\n return startFold.addSubFold(fold);\n\n if (startFold && !startFold.range.isStart(startRow, startColumn))\n this.removeFold(startFold);\n \n if (endFold && !endFold.range.isEnd(endRow, endColumn))\n this.removeFold(endFold);\n var folds = this.getFoldsInRange(fold.range);\n if (folds.length > 0) {\n this.removeFolds(folds);\n folds.forEach(function(subFold) {\n fold.addSubFold(subFold);\n });\n }\n\n for (var i = 0; i < foldData.length; i++) {\n var foldLine = foldData[i];\n if (endRow == foldLine.start.row) {\n foldLine.addFold(fold);\n added = true;\n break;\n } else if (startRow == foldLine.end.row) {\n foldLine.addFold(fold);\n added = true;\n if (!fold.sameRow) {\n var foldLineNext = foldData[i + 1];\n if (foldLineNext && foldLineNext.start.row == endRow) {\n foldLine.merge(foldLineNext);\n break;\n }\n }\n break;\n } else if (endRow <= foldLine.start.row) {\n break;\n }\n }\n\n if (!added)\n foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold));\n\n if (this.$useWrapMode)\n this.$updateWrapData(foldLine.start.row, foldLine.start.row);\n else\n this.$updateRowLengthCache(foldLine.start.row, foldLine.start.row);\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"add\" });\n\n return fold;\n };\n\n this.addFolds = function(folds) {\n folds.forEach(function(fold) {\n this.addFold(fold);\n }, this);\n };\n\n this.removeFold = function(fold) {\n var foldLine = fold.foldLine;\n var startRow = foldLine.start.row;\n var endRow = foldLine.end.row;\n\n var foldLines = this.$foldData;\n var folds = foldLine.folds;\n if (folds.length == 1) {\n foldLines.splice(foldLines.indexOf(foldLine), 1);\n } else\n if (foldLine.range.isEnd(fold.end.row, fold.end.column)) {\n folds.pop();\n foldLine.end.row = folds[folds.length - 1].end.row;\n foldLine.end.column = folds[folds.length - 1].end.column;\n } else\n if (foldLine.range.isStart(fold.start.row, fold.start.column)) {\n folds.shift();\n foldLine.start.row = folds[0].start.row;\n foldLine.start.column = folds[0].start.column;\n } else\n if (fold.sameRow) {\n folds.splice(folds.indexOf(fold), 1);\n } else\n {\n var newFoldLine = foldLine.split(fold.start.row, fold.start.column);\n folds = newFoldLine.folds;\n folds.shift();\n newFoldLine.start.row = folds[0].start.row;\n newFoldLine.start.column = folds[0].start.column;\n }\n\n if (!this.$updating) {\n if (this.$useWrapMode)\n this.$updateWrapData(startRow, endRow);\n else\n this.$updateRowLengthCache(startRow, endRow);\n }\n this.$modified = true;\n this._signal(\"changeFold\", { data: fold, action: \"remove\" });\n };\n\n this.removeFolds = function(folds) {\n var cloneFolds = [];\n for (var i = 0; i < folds.length; i++) {\n cloneFolds.push(folds[i]);\n }\n\n cloneFolds.forEach(function(fold) {\n this.removeFold(fold);\n }, this);\n this.$modified = true;\n };\n\n this.expandFold = function(fold) {\n this.removeFold(fold);\n fold.subFolds.forEach(function(subFold) {\n fold.restoreRange(subFold);\n this.addFold(subFold);\n }, this);\n if (fold.collapseChildren > 0) {\n this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1);\n }\n fold.subFolds = [];\n };\n\n this.expandFolds = function(folds) {\n folds.forEach(function(fold) {\n this.expandFold(fold);\n }, this);\n };\n\n this.unfold = function(location, expandInner) {\n var range, folds;\n if (location == null) {\n range = new Range(0, 0, this.getLength(), 0);\n expandInner = true;\n } else if (typeof location == \"number\")\n range = new Range(location, 0, location, this.getLine(location).length);\n else if (\"row\" in location)\n range = Range.fromPoints(location, location);\n else\n range = location;\n \n folds = this.getFoldsInRangeList(range);\n if (expandInner) {\n this.removeFolds(folds);\n } else {\n var subFolds = folds;\n while (subFolds.length) {\n this.expandFolds(subFolds);\n subFolds = this.getFoldsInRangeList(range);\n }\n }\n if (folds.length)\n return folds;\n };\n this.isRowFolded = function(docRow, startFoldRow) {\n return !!this.getFoldLine(docRow, startFoldRow);\n };\n\n this.getRowFoldEnd = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.end.row : docRow;\n };\n\n this.getRowFoldStart = function(docRow, startFoldRow) {\n var foldLine = this.getFoldLine(docRow, startFoldRow);\n return foldLine ? foldLine.start.row : docRow;\n };\n\n this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {\n if (startRow == null)\n startRow = foldLine.start.row;\n if (startColumn == null)\n startColumn = 0;\n if (endRow == null)\n endRow = foldLine.end.row;\n if (endColumn == null)\n endColumn = this.getLine(endRow).length;\n var doc = this.doc;\n var textLine = \"\";\n\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n if (row < startRow)\n return;\n if (row == startRow) {\n if (column < startColumn)\n return;\n lastColumn = Math.max(startColumn, lastColumn);\n }\n\n if (placeholder != null) {\n textLine += placeholder;\n } else {\n textLine += doc.getLine(row).substring(lastColumn, column);\n }\n }, endRow, endColumn);\n return textLine;\n };\n\n this.getDisplayLine = function(row, endColumn, startRow, startColumn) {\n var foldLine = this.getFoldLine(row);\n\n if (!foldLine) {\n var line;\n line = this.doc.getLine(row);\n return line.substring(startColumn || 0, endColumn || line.length);\n } else {\n return this.getFoldDisplayLine(\n foldLine, row, endColumn, startRow, startColumn);\n }\n };\n\n this.$cloneFoldData = function() {\n var fd = [];\n fd = this.$foldData.map(function(foldLine) {\n var folds = foldLine.folds.map(function(fold) {\n return fold.clone();\n });\n return new FoldLine(fd, folds);\n });\n\n return fd;\n };\n\n this.toggleFold = function(tryToUnfold) {\n var selection = this.selection;\n var range = selection.getRange();\n var fold;\n var bracketPos;\n\n if (range.isEmpty()) {\n var cursor = range.start;\n fold = this.getFoldAt(cursor.row, cursor.column);\n\n if (fold) {\n this.expandFold(fold);\n return;\n } else if (bracketPos = this.findMatchingBracket(cursor)) {\n if (range.comparePoint(bracketPos) == 1) {\n range.end = bracketPos;\n } else {\n range.start = bracketPos;\n range.start.column++;\n range.end.column--;\n }\n } else if (bracketPos = this.findMatchingBracket({row: cursor.row, column: cursor.column + 1})) {\n if (range.comparePoint(bracketPos) == 1)\n range.end = bracketPos;\n else\n range.start = bracketPos;\n\n range.start.column++;\n } else {\n range = this.getCommentFoldRange(cursor.row, cursor.column) || range;\n }\n } else {\n var folds = this.getFoldsInRange(range);\n if (tryToUnfold && folds.length) {\n this.expandFolds(folds);\n return;\n } else if (folds.length == 1 ) {\n fold = folds[0];\n }\n }\n\n if (!fold)\n fold = this.getFoldAt(range.start.row, range.start.column);\n\n if (fold && fold.range.toString() == range.toString()) {\n this.expandFold(fold);\n return;\n }\n\n var placeholder = \"...\";\n if (!range.isMultiLine()) {\n placeholder = this.getTextRange(range);\n if (placeholder.length < 4)\n return;\n placeholder = placeholder.trim().substring(0, 2) + \"..\";\n }\n\n this.addFold(placeholder, range);\n };\n\n this.getCommentFoldRange = function(row, column, dir) {\n var iterator = new TokenIterator(this, row, column);\n var token = iterator.getCurrentToken();\n var type = token.type;\n if (token && /^comment|string/.test(type)) {\n type = type.match(/comment|string/)[0];\n if (type == \"comment\")\n type += \"|doc-start\";\n var re = new RegExp(type);\n var range = new Range();\n if (dir != 1) {\n do {\n token = iterator.stepBackward();\n } while (token && re.test(token.type));\n iterator.stepForward();\n }\n \n range.start.row = iterator.getCurrentTokenRow();\n range.start.column = iterator.getCurrentTokenColumn() + 2;\n\n iterator = new TokenIterator(this, row, column);\n \n if (dir != -1) {\n var lastRow = -1;\n do {\n token = iterator.stepForward();\n if (lastRow == -1) {\n var state = this.getState(iterator.$row);\n if (!re.test(state))\n lastRow = iterator.$row;\n } else if (iterator.$row > lastRow) {\n break;\n }\n } while (token && re.test(token.type));\n token = iterator.stepBackward();\n } else\n token = iterator.getCurrentToken();\n\n range.end.row = iterator.getCurrentTokenRow();\n range.end.column = iterator.getCurrentTokenColumn() + token.value.length - 2;\n return range;\n }\n };\n\n this.foldAll = function(startRow, endRow, depth) {\n if (depth == undefined)\n depth = 100000; // JSON.stringify doesn't hanle Infinity\n var foldWidgets = this.foldWidgets;\n if (!foldWidgets)\n return; // mode doesn't support folding\n endRow = endRow || this.getLength();\n startRow = startRow || 0;\n for (var row = startRow; row < endRow; row++) {\n if (foldWidgets[row] == null)\n foldWidgets[row] = this.getFoldWidget(row);\n if (foldWidgets[row] != \"start\")\n continue;\n\n var range = this.getFoldWidgetRange(row);\n if (range && range.isMultiLine()\n && range.end.row <= endRow\n && range.start.row >= startRow\n ) {\n row = range.end.row;\n try {\n var fold = this.addFold(\"...\", range);\n if (fold)\n fold.collapseChildren = depth;\n } catch(e) {}\n }\n }\n };\n this.$foldStyles = {\n \"manual\": 1,\n \"markbegin\": 1,\n \"markbeginend\": 1\n };\n this.$foldStyle = \"markbegin\";\n this.setFoldStyle = function(style) {\n if (!this.$foldStyles[style])\n throw new Error(\"invalid fold style: \" + style + \"[\" + Object.keys(this.$foldStyles).join(\", \") + \"]\");\n \n if (this.$foldStyle == style)\n return;\n\n this.$foldStyle = style;\n \n if (style == \"manual\")\n this.unfold();\n var mode = this.$foldMode;\n this.$setFolding(null);\n this.$setFolding(mode);\n };\n\n this.$setFolding = function(foldMode) {\n if (this.$foldMode == foldMode)\n return;\n \n this.$foldMode = foldMode;\n \n this.off('change', this.$updateFoldWidgets);\n this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n this._signal(\"changeAnnotation\");\n \n if (!foldMode || this.$foldStyle == \"manual\") {\n this.foldWidgets = null;\n return;\n }\n \n this.foldWidgets = [];\n this.getFoldWidget = foldMode.getFoldWidget.bind(foldMode, this, this.$foldStyle);\n this.getFoldWidgetRange = foldMode.getFoldWidgetRange.bind(foldMode, this, this.$foldStyle);\n \n this.$updateFoldWidgets = this.updateFoldWidgets.bind(this);\n this.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);\n this.on('change', this.$updateFoldWidgets);\n this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);\n };\n\n this.getParentFoldRangeData = function (row, ignoreCurrent) {\n var fw = this.foldWidgets;\n if (!fw || (ignoreCurrent && fw[row]))\n return {};\n\n var i = row - 1, firstRange;\n while (i >= 0) {\n var c = fw[i];\n if (c == null)\n c = fw[i] = this.getFoldWidget(i);\n\n if (c == \"start\") {\n var range = this.getFoldWidgetRange(i);\n if (!firstRange)\n firstRange = range;\n if (range && range.end.row >= row)\n break;\n }\n i--;\n }\n\n return {\n range: i !== -1 && range,\n firstRange: firstRange\n };\n };\n\n this.onFoldWidgetClick = function(row, e) {\n e = e.domEvent;\n var options = {\n children: e.shiftKey,\n all: e.ctrlKey || e.metaKey,\n siblings: e.altKey\n };\n \n var range = this.$toggleFoldWidget(row, options);\n if (!range) {\n var el = (e.target || e.srcElement);\n if (el && /ace_fold-widget/.test(el.className))\n el.className += \" ace_invalid\";\n }\n };\n \n this.$toggleFoldWidget = function(row, options) {\n if (!this.getFoldWidget)\n return;\n var type = this.getFoldWidget(row);\n var line = this.getLine(row);\n\n var dir = type === \"end\" ? -1 : 1;\n var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);\n\n if (fold) {\n if (options.children || options.all)\n this.removeFold(fold);\n else\n this.expandFold(fold);\n return fold;\n }\n\n var range = this.getFoldWidgetRange(row, true);\n if (range && !range.isMultiLine()) {\n fold = this.getFoldAt(range.start.row, range.start.column, 1);\n if (fold && range.isEqual(fold.range)) {\n this.removeFold(fold);\n return fold;\n }\n }\n \n if (options.siblings) {\n var data = this.getParentFoldRangeData(row);\n if (data.range) {\n var startRow = data.range.start.row + 1;\n var endRow = data.range.end.row;\n }\n this.foldAll(startRow, endRow, options.all ? 10000 : 0);\n } else if (options.children) {\n endRow = range ? range.end.row : this.getLength();\n this.foldAll(row + 1, endRow, options.all ? 10000 : 0);\n } else if (range) {\n if (options.all) \n range.collapseChildren = 10000;\n this.addFold(\"...\", range);\n }\n \n return range;\n };\n \n \n \n this.toggleFoldWidget = function(toggleParent) {\n var row = this.selection.getCursor().row;\n row = this.getRowFoldStart(row);\n var range = this.$toggleFoldWidget(row, {});\n \n if (range)\n return;\n var data = this.getParentFoldRangeData(row, true);\n range = data.range || data.firstRange;\n \n if (range) {\n row = range.start.row;\n var fold = this.getFoldAt(row, this.getLine(row).length, 1);\n\n if (fold) {\n this.removeFold(fold);\n } else {\n this.addFold(\"...\", range);\n }\n }\n };\n\n this.updateFoldWidgets = function(delta) {\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n\n if (len === 0) {\n this.foldWidgets[firstRow] = null;\n } else if (delta.action == 'remove') {\n this.foldWidgets.splice(firstRow, len + 1, null);\n } else {\n var args = Array(len + 1);\n args.unshift(firstRow, 1);\n this.foldWidgets.splice.apply(this.foldWidgets, args);\n }\n };\n this.tokenizerUpdateFoldWidgets = function(e) {\n var rows = e.data;\n if (rows.first != rows.last) {\n if (this.foldWidgets.length > rows.first)\n this.foldWidgets.splice(rows.first, this.foldWidgets.length);\n }\n };\n}\n\nexports.Folding = Folding;\n\n});\n\nace.define(\"ace/edit_session/bracket_match\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\nvar Range = acequire(\"../range\").Range;\n\n\nfunction BracketMatch() {\n\n this.findMatchingBracket = function(position, chr) {\n if (position.column == 0) return null;\n\n var charBeforeCursor = chr || this.getLine(position.row).charAt(position.column-1);\n if (charBeforeCursor == \"\") return null;\n\n var match = charBeforeCursor.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match)\n return null;\n\n if (match[1])\n return this.$findClosingBracket(match[1], position);\n else\n return this.$findOpeningBracket(match[2], position);\n };\n \n this.getBracketRange = function(pos) {\n var line = this.getLine(pos.row);\n var before = true, range;\n\n var chr = line.charAt(pos.column-1);\n var match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n if (!match) {\n chr = line.charAt(pos.column);\n pos = {row: pos.row, column: pos.column + 1};\n match = chr && chr.match(/([\\(\\[\\{])|([\\)\\]\\}])/);\n before = false;\n }\n if (!match)\n return null;\n\n if (match[1]) {\n var bracketPos = this.$findClosingBracket(match[1], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(pos, bracketPos);\n if (!before) {\n range.end.column++;\n range.start.column--;\n }\n range.cursor = range.end;\n } else {\n var bracketPos = this.$findOpeningBracket(match[2], pos);\n if (!bracketPos)\n return null;\n range = Range.fromPoints(bracketPos, pos);\n if (!before) {\n range.start.column++;\n range.end.column--;\n }\n range.cursor = range.start;\n }\n \n return range;\n };\n\n this.$brackets = {\n \")\": \"(\",\n \"(\": \")\",\n \"]\": \"[\",\n \"[\": \"]\",\n \"{\": \"}\",\n \"}\": \"{\"\n };\n\n this.$findOpeningBracket = function(bracket, position, typeRe) {\n var openBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n \n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"rparen\", \".paren\")\n .replace(/\\b(?:end)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn() - 2;\n var value = token.value;\n \n while (true) {\n \n while (valueIndex >= 0) {\n var chr = value.charAt(valueIndex);\n if (chr == openBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex -= 1;\n }\n do {\n token = iterator.stepBackward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n \n value = token.value;\n valueIndex = value.length - 1;\n }\n \n return null;\n };\n\n this.$findClosingBracket = function(bracket, position, typeRe) {\n var closingBracket = this.$brackets[bracket];\n var depth = 1;\n\n var iterator = new TokenIterator(this, position.row, position.column);\n var token = iterator.getCurrentToken();\n if (!token)\n token = iterator.stepForward();\n if (!token)\n return;\n\n if (!typeRe){\n typeRe = new RegExp(\n \"(\\\\.?\" +\n token.type.replace(\".\", \"\\\\.\").replace(\"lparen\", \".paren\")\n .replace(/\\b(?:start|begin)\\b/, \"(?:start|begin|end)\")\n + \")+\"\n );\n }\n var valueIndex = position.column - iterator.getCurrentTokenColumn();\n\n while (true) {\n\n var value = token.value;\n var valueLength = value.length;\n while (valueIndex < valueLength) {\n var chr = value.charAt(valueIndex);\n if (chr == closingBracket) {\n depth -= 1;\n if (depth == 0) {\n return {row: iterator.getCurrentTokenRow(),\n column: valueIndex + iterator.getCurrentTokenColumn()};\n }\n }\n else if (chr == bracket) {\n depth += 1;\n }\n valueIndex += 1;\n }\n do {\n token = iterator.stepForward();\n } while (token && !typeRe.test(token.type));\n\n if (token == null)\n break;\n\n valueIndex = 0;\n }\n \n return null;\n };\n}\nexports.BracketMatch = BracketMatch;\n\n});\n\nace.define(\"ace/edit_session\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/bidihandler\",\"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, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar lang = acequire(\"./lib/lang\");\nvar BidiHandler = acequire(\"./bidihandler\").BidiHandler;\nvar config = acequire(\"./config\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar Selection = acequire(\"./selection\").Selection;\nvar TextMode = acequire(\"./mode/text\").Mode;\nvar Range = acequire(\"./range\").Range;\nvar Document = acequire(\"./document\").Document;\nvar BackgroundTokenizer = acequire(\"./background_tokenizer\").BackgroundTokenizer;\nvar SearchHighlight = acequire(\"./search_highlight\").SearchHighlight;\n\nvar EditSession = function(text, mode) {\n this.$breakpoints = [];\n this.$decorations = [];\n this.$frontMarkers = {};\n this.$backMarkers = {};\n this.$markerId = 1;\n this.$undoSelect = true;\n\n this.$foldData = [];\n this.id = \"session\" + (++EditSession.$uid);\n this.$foldData.toString = function() {\n return this.join(\"\\n\");\n };\n this.on(\"changeFold\", this.onChangeFold.bind(this));\n this.$onChange = this.onChange.bind(this);\n\n if (typeof text != \"object\" || !text.getLine)\n text = new Document(text);\n\n this.$bidiHandler = new BidiHandler(this);\n this.setDocument(text);\n this.selection = new Selection(this);\n\n config.resetOptions(this);\n this.setMode(mode);\n config._signal(\"session\", this);\n};\n\n\nEditSession.$uid = 0;\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setDocument = function(doc) {\n if (this.doc)\n this.doc.removeListener(\"change\", this.$onChange);\n\n this.doc = doc;\n doc.on(\"change\", this.$onChange);\n\n if (this.bgTokenizer)\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.resetCaches();\n };\n this.getDocument = function() {\n return this.doc;\n };\n this.$resetRowCache = function(docRow) {\n if (!docRow) {\n this.$docRowCache = [];\n this.$screenRowCache = [];\n return;\n }\n var l = this.$docRowCache.length;\n var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;\n if (l > i) {\n this.$docRowCache.splice(i, l);\n this.$screenRowCache.splice(i, l);\n }\n };\n\n this.$getRowCacheIndex = function(cacheArray, val) {\n var low = 0;\n var hi = cacheArray.length - 1;\n\n while (low <= hi) {\n var mid = (low + hi) >> 1;\n var c = cacheArray[mid];\n\n if (val > c)\n low = mid + 1;\n else if (val < c)\n hi = mid - 1;\n else\n return mid;\n }\n\n return low -1;\n };\n\n this.resetCaches = function() {\n this.$modified = true;\n this.$wrapData = [];\n this.$rowLengthCache = [];\n this.$resetRowCache(0);\n if (this.bgTokenizer)\n this.bgTokenizer.start(0);\n };\n\n this.onChangeFold = function(e) {\n var fold = e.data;\n this.$resetRowCache(fold.start.row);\n };\n\n this.onChange = function(delta) {\n this.$modified = true;\n this.$bidiHandler.onChange(delta);\n this.$resetRowCache(delta.start.row);\n\n var removedFolds = this.$updateInternalDataOnChange(delta);\n if (!this.$fromUndo && this.$undoManager && !delta.ignore) {\n this.$deltasDoc.push(delta);\n if (removedFolds && removedFolds.length != 0) {\n this.$deltasFold.push({\n action: \"removeFolds\",\n folds: removedFolds\n });\n }\n\n this.$informUndoManager.schedule();\n }\n\n this.bgTokenizer && this.bgTokenizer.$updateOnChange(delta);\n this._signal(\"change\", delta);\n };\n this.setValue = function(text) {\n this.doc.setValue(text);\n this.selection.moveTo(0, 0);\n\n this.$resetRowCache(0);\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n this.setUndoManager(this.$undoManager);\n this.getUndoManager().reset();\n };\n this.getValue =\n this.toString = function() {\n return this.doc.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.getState = function(row) {\n return this.bgTokenizer.getState(row);\n };\n this.getTokens = function(row) {\n return this.bgTokenizer.getTokens(row);\n };\n this.getTokenAt = function(row, column) {\n var tokens = this.bgTokenizer.getTokens(row);\n var token, c = 0;\n if (column == null) {\n var i = tokens.length - 1;\n c = this.getLine(row).length;\n } else {\n for (var i = 0; i < tokens.length; i++) {\n c += tokens[i].value.length;\n if (c >= column)\n break;\n }\n }\n token = tokens[i];\n if (!token)\n return null;\n token.index = i;\n token.start = c - token.value.length;\n return token;\n };\n this.setUndoManager = function(undoManager) {\n this.$undoManager = undoManager;\n this.$deltas = [];\n this.$deltasDoc = [];\n this.$deltasFold = [];\n\n if (this.$informUndoManager)\n this.$informUndoManager.cancel();\n\n if (undoManager) {\n var self = this;\n\n this.$syncInformUndoManager = function() {\n self.$informUndoManager.cancel();\n\n if (self.$deltasFold.length) {\n self.$deltas.push({\n group: \"fold\",\n deltas: self.$deltasFold\n });\n self.$deltasFold = [];\n }\n\n if (self.$deltasDoc.length) {\n self.$deltas.push({\n group: \"doc\",\n deltas: self.$deltasDoc\n });\n self.$deltasDoc = [];\n }\n\n if (self.$deltas.length > 0) {\n undoManager.execute({\n action: \"aceupdate\",\n args: [self.$deltas, self],\n merge: self.mergeUndoDeltas\n });\n }\n self.mergeUndoDeltas = false;\n self.$deltas = [];\n };\n this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);\n }\n };\n this.markUndoGroup = function() {\n if (this.$syncInformUndoManager)\n this.$syncInformUndoManager();\n };\n \n this.$defaultUndoManager = {\n undo: function() {},\n redo: function() {},\n reset: function() {}\n };\n this.getUndoManager = function() {\n return this.$undoManager || this.$defaultUndoManager;\n };\n this.getTabString = function() {\n if (this.getUseSoftTabs()) {\n return lang.stringRepeat(\" \", this.getTabSize());\n } else {\n return \"\\t\";\n }\n };\n this.setUseSoftTabs = function(val) {\n this.setOption(\"useSoftTabs\", val);\n };\n this.getUseSoftTabs = function() {\n return this.$useSoftTabs && !this.$mode.$indentWithTabs;\n };\n this.setTabSize = function(tabSize) {\n this.setOption(\"tabSize\", tabSize);\n };\n this.getTabSize = function() {\n return this.$tabSize;\n };\n this.isTabStop = function(position) {\n return this.$useSoftTabs && (position.column % this.$tabSize === 0);\n };\n this.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) {\n this.setOption(\"navigateWithinSoftTabs\", navigateWithinSoftTabs);\n };\n this.getNavigateWithinSoftTabs = function() {\n return this.$navigateWithinSoftTabs;\n };\n\n this.$overwrite = false;\n this.setOverwrite = function(overwrite) {\n this.setOption(\"overwrite\", overwrite);\n };\n this.getOverwrite = function() {\n return this.$overwrite;\n };\n this.toggleOverwrite = function() {\n this.setOverwrite(!this.$overwrite);\n };\n this.addGutterDecoration = function(row, className) {\n if (!this.$decorations[row])\n this.$decorations[row] = \"\";\n this.$decorations[row] += \" \" + className;\n this._signal(\"changeBreakpoint\", {});\n };\n this.removeGutterDecoration = function(row, className) {\n this.$decorations[row] = (this.$decorations[row] || \"\").replace(\" \" + className, \"\");\n this._signal(\"changeBreakpoint\", {});\n };\n this.getBreakpoints = function() {\n return this.$breakpoints;\n };\n this.setBreakpoints = function(rows) {\n this.$breakpoints = [];\n for (var i=0; i 0)\n inToken = !!line.charAt(column - 1).match(this.tokenRe);\n\n if (!inToken)\n inToken = !!line.charAt(column).match(this.tokenRe);\n\n if (inToken)\n var re = this.tokenRe;\n else if (/^\\s+$/.test(line.slice(column-1, column+1)))\n var re = /\\s/;\n else\n var re = this.nonTokenRe;\n\n var start = column;\n if (start > 0) {\n do {\n start--;\n }\n while (start >= 0 && line.charAt(start).match(re));\n start++;\n }\n\n var end = column;\n while (end < line.length && line.charAt(end).match(re)) {\n end++;\n }\n\n return new Range(row, start, row, end);\n };\n this.getAWordRange = function(row, column) {\n var wordRange = this.getWordRange(row, column);\n var line = this.getLine(wordRange.end.row);\n\n while (line.charAt(wordRange.end.column).match(/[ \\t]/)) {\n wordRange.end.column += 1;\n }\n return wordRange;\n };\n this.setNewLineMode = function(newLineMode) {\n this.doc.setNewLineMode(newLineMode);\n };\n this.getNewLineMode = function() {\n return this.doc.getNewLineMode();\n };\n this.setUseWorker = function(useWorker) { this.setOption(\"useWorker\", useWorker); };\n this.getUseWorker = function() { return this.$useWorker; };\n this.onReloadTokenizer = function(e) {\n var rows = e.data;\n this.bgTokenizer.start(rows.first);\n this._signal(\"tokenizerUpdate\", e);\n };\n\n this.$modes = {};\n this.$mode = null;\n this.$modeId = null;\n this.setMode = function(mode, cb) {\n if (mode && typeof mode === \"object\") {\n if (mode.getTokenizer)\n return this.$onChangeMode(mode);\n var options = mode;\n var path = options.path;\n } else {\n path = mode || \"ace/mode/text\";\n }\n if (!this.$modes[\"ace/mode/text\"])\n this.$modes[\"ace/mode/text\"] = new TextMode();\n\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n cb && cb();\n return;\n }\n this.$modeId = path;\n config.loadModule([\"mode\", path], function(m) {\n if (this.$modeId !== path)\n return cb && cb();\n if (this.$modes[path] && !options) {\n this.$onChangeMode(this.$modes[path]);\n } else if (m && m.Mode) {\n m = new m.Mode(options);\n if (!options) {\n this.$modes[path] = m;\n m.$id = path;\n }\n this.$onChangeMode(m);\n }\n cb && cb();\n }.bind(this));\n if (!this.$mode)\n this.$onChangeMode(this.$modes[\"ace/mode/text\"], true);\n };\n\n this.$onChangeMode = function(mode, $isPlaceholder) {\n if (!$isPlaceholder)\n this.$modeId = mode.$id;\n if (this.$mode === mode) \n return;\n\n this.$mode = mode;\n\n this.$stopWorker();\n\n if (this.$useWorker)\n this.$startWorker();\n\n var tokenizer = mode.getTokenizer();\n\n if(tokenizer.addEventListener !== undefined) {\n var onReloadTokenizer = this.onReloadTokenizer.bind(this);\n tokenizer.addEventListener(\"update\", onReloadTokenizer);\n }\n\n if (!this.bgTokenizer) {\n this.bgTokenizer = new BackgroundTokenizer(tokenizer);\n var _self = this;\n this.bgTokenizer.addEventListener(\"update\", function(e) {\n _self._signal(\"tokenizerUpdate\", e);\n });\n } else {\n this.bgTokenizer.setTokenizer(tokenizer);\n }\n\n this.bgTokenizer.setDocument(this.getDocument());\n\n this.tokenRe = mode.tokenRe;\n this.nonTokenRe = mode.nonTokenRe;\n\n \n if (!$isPlaceholder) {\n if (mode.attachToSession)\n mode.attachToSession(this);\n this.$options.wrapMethod.set.call(this, this.$wrapMethod);\n this.$setFolding(mode.foldingRules);\n this.bgTokenizer.start(0);\n this._emit(\"changeMode\");\n }\n };\n\n this.$stopWorker = function() {\n if (this.$worker) {\n this.$worker.terminate();\n this.$worker = null;\n }\n };\n\n this.$startWorker = function() {\n try {\n this.$worker = this.$mode.createWorker(this);\n } catch (e) {\n config.warn(\"Could not load worker\", e);\n this.$worker = null;\n }\n };\n this.getMode = function() {\n return this.$mode;\n };\n\n this.$scrollTop = 0;\n this.setScrollTop = function(scrollTop) {\n if (this.$scrollTop === scrollTop || isNaN(scrollTop))\n return;\n\n this.$scrollTop = scrollTop;\n this._signal(\"changeScrollTop\", scrollTop);\n };\n this.getScrollTop = function() {\n return this.$scrollTop;\n };\n\n this.$scrollLeft = 0;\n this.setScrollLeft = function(scrollLeft) {\n if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))\n return;\n\n this.$scrollLeft = scrollLeft;\n this._signal(\"changeScrollLeft\", scrollLeft);\n };\n this.getScrollLeft = function() {\n return this.$scrollLeft;\n };\n this.getScreenWidth = function() {\n this.$computeWidth();\n if (this.lineWidgets) \n return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);\n return this.screenWidth;\n };\n \n this.getLineWidgetMaxWidth = function() {\n if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;\n var width = 0;\n this.lineWidgets.forEach(function(w) {\n if (w && w.screenWidth > width)\n width = w.screenWidth;\n });\n return this.lineWidgetWidth = width;\n };\n\n this.$computeWidth = function(force) {\n if (this.$modified || force) {\n this.$modified = false;\n\n if (this.$useWrapMode)\n return this.screenWidth = this.$wrapLimit;\n\n var lines = this.doc.getAllLines();\n var cache = this.$rowLengthCache;\n var longestScreenLine = 0;\n var foldIndex = 0;\n var foldLine = this.$foldData[foldIndex];\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n var len = lines.length;\n\n for (var i = 0; i < len; i++) {\n if (i > foldStart) {\n i = foldLine.end.row + 1;\n if (i >= len)\n break;\n foldLine = this.$foldData[foldIndex++];\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n\n if (cache[i] == null)\n cache[i] = this.$getStringScreenWidth(lines[i])[0];\n\n if (cache[i] > longestScreenLine)\n longestScreenLine = cache[i];\n }\n this.screenWidth = longestScreenLine;\n }\n };\n this.getLine = function(row) {\n return this.doc.getLine(row);\n };\n this.getLines = function(firstRow, lastRow) {\n return this.doc.getLines(firstRow, lastRow);\n };\n this.getLength = function() {\n return this.doc.getLength();\n };\n this.getTextRange = function(range) {\n return this.doc.getTextRange(range || this.selection.getRange());\n };\n this.insert = function(position, text) {\n return this.doc.insert(position, text);\n };\n this.remove = function(range) {\n return this.doc.remove(range);\n };\n this.removeFullLines = function(firstRow, lastRow){\n return this.doc.removeFullLines(firstRow, lastRow);\n };\n this.undoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = deltas.length - 1; i != -1; i--) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.revertDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, true, lastUndoRange);\n } else {\n delta.deltas.forEach(function(foldDelta) {\n this.addFolds(foldDelta.folds);\n }, this);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.redoChanges = function(deltas, dontSelect) {\n if (!deltas.length)\n return;\n\n this.$fromUndo = true;\n var lastUndoRange = null;\n for (var i = 0; i < deltas.length; i++) {\n var delta = deltas[i];\n if (delta.group == \"doc\") {\n this.doc.applyDeltas(delta.deltas);\n lastUndoRange =\n this.$getUndoSelection(delta.deltas, false, lastUndoRange);\n }\n }\n this.$fromUndo = false;\n lastUndoRange &&\n this.$undoSelect &&\n !dontSelect &&\n this.selection.setSelectionRange(lastUndoRange);\n return lastUndoRange;\n };\n this.setUndoSelect = function(enable) {\n this.$undoSelect = enable;\n };\n\n this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) {\n function isInsert(delta) {\n return isUndo ? delta.action !== \"insert\" : delta.action === \"insert\";\n }\n\n var delta = deltas[0];\n var range, point;\n var lastDeltaIsInsert = false;\n if (isInsert(delta)) {\n range = Range.fromPoints(delta.start, delta.end);\n lastDeltaIsInsert = true;\n } else {\n range = Range.fromPoints(delta.start, delta.start);\n lastDeltaIsInsert = false;\n }\n\n for (var i = 1; i < deltas.length; i++) {\n delta = deltas[i];\n if (isInsert(delta)) {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range.setStart(point);\n }\n point = delta.end;\n if (range.compare(point.row, point.column) == 1) {\n range.setEnd(point);\n }\n lastDeltaIsInsert = true;\n } else {\n point = delta.start;\n if (range.compare(point.row, point.column) == -1) {\n range = Range.fromPoints(delta.start, delta.start);\n }\n lastDeltaIsInsert = false;\n }\n }\n if (lastUndoRange != null) {\n if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {\n lastUndoRange.start.column += range.end.column - range.start.column;\n lastUndoRange.end.column += range.end.column - range.start.column;\n }\n\n var cmp = lastUndoRange.compareRange(range);\n if (cmp == 1) {\n range.setStart(lastUndoRange.start);\n } else if (cmp == -1) {\n range.setEnd(lastUndoRange.end);\n }\n }\n\n return range;\n };\n this.replace = function(range, text) {\n return this.doc.replace(range, text);\n };\n this.moveText = function(fromRange, toPosition, copy) {\n var text = this.getTextRange(fromRange);\n var folds = this.getFoldsInRange(fromRange);\n\n var toRange = Range.fromPoints(toPosition, toPosition);\n if (!copy) {\n this.remove(fromRange);\n var rowDiff = fromRange.start.row - fromRange.end.row;\n var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;\n if (collDiff) {\n if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)\n toRange.start.column += collDiff;\n if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)\n toRange.end.column += collDiff;\n }\n if (rowDiff && toRange.start.row >= fromRange.end.row) {\n toRange.start.row += rowDiff;\n toRange.end.row += rowDiff;\n }\n }\n\n toRange.end = this.insert(toRange.start, text);\n if (folds.length) {\n var oldStart = fromRange.start;\n var newStart = toRange.start;\n var rowDiff = newStart.row - oldStart.row;\n var collDiff = newStart.column - oldStart.column;\n this.addFolds(folds.map(function(x) {\n x = x.clone();\n if (x.start.row == oldStart.row)\n x.start.column += collDiff;\n if (x.end.row == oldStart.row)\n x.end.column += collDiff;\n x.start.row += rowDiff;\n x.end.row += rowDiff;\n return x;\n }));\n }\n\n return toRange;\n };\n this.indentRows = function(startRow, endRow, indentString) {\n indentString = indentString.replace(/\\t/g, this.getTabString());\n for (var row=startRow; row<=endRow; row++)\n this.doc.insertInLine({row: row, column: 0}, indentString);\n };\n this.outdentRows = function (range) {\n var rowRange = range.collapseRows();\n var deleteRange = new Range(0, 0, 0, 0);\n var size = this.getTabSize();\n\n for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) {\n var line = this.getLine(i);\n\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n for (var j = 0; j < size; ++j)\n if (line.charAt(j) != ' ')\n break;\n if (j < size && line.charAt(j) == '\\t') {\n deleteRange.start.column = j;\n deleteRange.end.column = j + 1;\n } else {\n deleteRange.start.column = 0;\n deleteRange.end.column = j;\n }\n this.remove(deleteRange);\n }\n };\n\n this.$moveLines = function(firstRow, lastRow, dir) {\n firstRow = this.getRowFoldStart(firstRow);\n lastRow = this.getRowFoldEnd(lastRow);\n if (dir < 0) {\n var row = this.getRowFoldStart(firstRow + dir);\n if (row < 0) return 0;\n var diff = row-firstRow;\n } else if (dir > 0) {\n var row = this.getRowFoldEnd(lastRow + dir);\n if (row > this.doc.getLength()-1) return 0;\n var diff = row-lastRow;\n } else {\n firstRow = this.$clipRowToDocument(firstRow);\n lastRow = this.$clipRowToDocument(lastRow);\n var diff = lastRow - firstRow + 1;\n }\n\n var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);\n var folds = this.getFoldsInRange(range).map(function(x){\n x = x.clone();\n x.start.row += diff;\n x.end.row += diff;\n return x;\n });\n \n var lines = dir == 0\n ? this.doc.getLines(firstRow, lastRow)\n : this.doc.removeFullLines(firstRow, lastRow);\n this.doc.insertFullLines(firstRow+diff, lines);\n folds.length && this.addFolds(folds);\n return diff;\n };\n this.moveLinesUp = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, -1);\n };\n this.moveLinesDown = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 1);\n };\n this.duplicateLines = function(firstRow, lastRow) {\n return this.$moveLines(firstRow, lastRow, 0);\n };\n\n\n this.$clipRowToDocument = function(row) {\n return Math.max(0, Math.min(row, this.doc.getLength()-1));\n };\n\n this.$clipColumnToRow = function(row, column) {\n if (column < 0)\n return 0;\n return Math.min(this.doc.getLine(row).length, column);\n };\n\n\n this.$clipPositionToDocument = function(row, column) {\n column = Math.max(0, column);\n\n if (row < 0) {\n row = 0;\n column = 0;\n } else {\n var len = this.doc.getLength();\n if (row >= len) {\n row = len - 1;\n column = this.doc.getLine(len-1).length;\n } else {\n column = Math.min(this.doc.getLine(row).length, column);\n }\n }\n\n return {\n row: row,\n column: column\n };\n };\n\n this.$clipRangeToDocument = function(range) {\n if (range.start.row < 0) {\n range.start.row = 0;\n range.start.column = 0;\n } else {\n range.start.column = this.$clipColumnToRow(\n range.start.row,\n range.start.column\n );\n }\n\n var len = this.doc.getLength() - 1;\n if (range.end.row > len) {\n range.end.row = len;\n range.end.column = this.doc.getLine(len).length;\n } else {\n range.end.column = this.$clipColumnToRow(\n range.end.row,\n range.end.column\n );\n }\n return range;\n };\n this.$wrapLimit = 80;\n this.$useWrapMode = false;\n this.$wrapLimitRange = {\n min : null,\n max : null\n };\n this.setUseWrapMode = function(useWrapMode) {\n if (useWrapMode != this.$useWrapMode) {\n this.$useWrapMode = useWrapMode;\n this.$modified = true;\n this.$resetRowCache(0);\n if (useWrapMode) {\n var len = this.getLength();\n this.$wrapData = Array(len);\n this.$updateWrapData(0, len - 1);\n }\n\n this._signal(\"changeWrapMode\");\n }\n };\n this.getUseWrapMode = function() {\n return this.$useWrapMode;\n };\n this.setWrapLimitRange = function(min, max) {\n if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) {\n this.$wrapLimitRange = { min: min, max: max };\n this.$modified = true;\n this.$bidiHandler.markAsDirty();\n if (this.$useWrapMode)\n this._signal(\"changeWrapMode\");\n }\n };\n this.adjustWrapLimit = function(desiredLimit, $printMargin) {\n var limits = this.$wrapLimitRange;\n if (limits.max < 0)\n limits = {min: $printMargin, max: $printMargin};\n var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);\n if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {\n this.$wrapLimit = wrapLimit;\n this.$modified = true;\n if (this.$useWrapMode) {\n this.$updateWrapData(0, this.getLength() - 1);\n this.$resetRowCache(0);\n this._signal(\"changeWrapLimit\");\n }\n return true;\n }\n return false;\n };\n\n this.$constrainWrapLimit = function(wrapLimit, min, max) {\n if (min)\n wrapLimit = Math.max(min, wrapLimit);\n\n if (max)\n wrapLimit = Math.min(max, wrapLimit);\n\n return wrapLimit;\n };\n this.getWrapLimit = function() {\n return this.$wrapLimit;\n };\n this.setWrapLimit = function (limit) {\n this.setWrapLimitRange(limit, limit);\n };\n this.getWrapLimitRange = function() {\n return {\n min : this.$wrapLimitRange.min,\n max : this.$wrapLimitRange.max\n };\n };\n\n this.$updateInternalDataOnChange = function(delta) {\n var useWrapMode = this.$useWrapMode;\n var action = delta.action;\n var start = delta.start;\n var end = delta.end;\n var firstRow = start.row;\n var lastRow = end.row;\n var len = lastRow - firstRow;\n var removedFolds = null;\n \n this.$updating = true;\n if (len != 0) {\n if (action === \"remove\") {\n this[useWrapMode ? \"$wrapData\" : \"$rowLengthCache\"].splice(firstRow, len);\n\n var foldLines = this.$foldData;\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n var foldLine = this.getFoldLine(end.row);\n var idx = 0;\n if (foldLine) {\n foldLine.addRemoveChars(end.row, end.column, start.column - end.column);\n foldLine.shiftRow(-len);\n\n var foldLineBefore = this.getFoldLine(firstRow);\n if (foldLineBefore && foldLineBefore !== foldLine) {\n foldLineBefore.merge(foldLine);\n foldLine = foldLineBefore;\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= end.row) {\n foldLine.shiftRow(-len);\n }\n }\n\n lastRow = firstRow;\n } else {\n var args = Array(len);\n args.unshift(firstRow, 0);\n var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache;\n arr.splice.apply(arr, args);\n var foldLines = this.$foldData;\n var foldLine = this.getFoldLine(firstRow);\n var idx = 0;\n if (foldLine) {\n var cmp = foldLine.range.compareInside(start.row, start.column);\n if (cmp == 0) {\n foldLine = foldLine.split(start.row, start.column);\n if (foldLine) {\n foldLine.shiftRow(len);\n foldLine.addRemoveChars(lastRow, 0, end.column - start.column);\n }\n } else\n if (cmp == -1) {\n foldLine.addRemoveChars(firstRow, 0, end.column - start.column);\n foldLine.shiftRow(len);\n }\n idx = foldLines.indexOf(foldLine) + 1;\n }\n\n for (idx; idx < foldLines.length; idx++) {\n var foldLine = foldLines[idx];\n if (foldLine.start.row >= firstRow) {\n foldLine.shiftRow(len);\n }\n }\n }\n } else {\n len = Math.abs(delta.start.column - delta.end.column);\n if (action === \"remove\") {\n removedFolds = this.getFoldsInRange(delta);\n this.removeFolds(removedFolds);\n\n len = -len;\n }\n var foldLine = this.getFoldLine(firstRow);\n if (foldLine) {\n foldLine.addRemoveChars(firstRow, start.column, len);\n }\n }\n\n if (useWrapMode && this.$wrapData.length != this.doc.getLength()) {\n console.error(\"doc.getLength() and $wrapData.length have to be the same!\");\n }\n this.$updating = false;\n\n if (useWrapMode)\n this.$updateWrapData(firstRow, lastRow);\n else\n this.$updateRowLengthCache(firstRow, lastRow);\n\n return removedFolds;\n };\n\n this.$updateRowLengthCache = function(firstRow, lastRow, b) {\n this.$rowLengthCache[firstRow] = null;\n this.$rowLengthCache[lastRow] = null;\n };\n\n this.$updateWrapData = function(firstRow, lastRow) {\n var lines = this.doc.getAllLines();\n var tabSize = this.getTabSize();\n var wrapData = this.$wrapData;\n var wrapLimit = this.$wrapLimit;\n var tokens;\n var foldLine;\n\n var row = firstRow;\n lastRow = Math.min(lastRow, lines.length - 1);\n while (row <= lastRow) {\n foldLine = this.getFoldLine(row, foldLine);\n if (!foldLine) {\n tokens = this.$getDisplayTokens(lines[row]);\n wrapData[row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row ++;\n } else {\n tokens = [];\n foldLine.walk(function(placeholder, row, column, lastColumn) {\n var walkTokens;\n if (placeholder != null) {\n walkTokens = this.$getDisplayTokens(\n placeholder, tokens.length);\n walkTokens[0] = PLACEHOLDER_START;\n for (var i = 1; i < walkTokens.length; i++) {\n walkTokens[i] = PLACEHOLDER_BODY;\n }\n } else {\n walkTokens = this.$getDisplayTokens(\n lines[row].substring(lastColumn, column),\n tokens.length);\n }\n tokens = tokens.concat(walkTokens);\n }.bind(this),\n foldLine.end.row,\n lines[foldLine.end.row].length + 1\n );\n\n wrapData[foldLine.start.row] = this.$computeWrapSplits(tokens, wrapLimit, tabSize);\n row = foldLine.end.row + 1;\n }\n }\n };\n var CHAR = 1,\n CHAR_EXT = 2,\n PLACEHOLDER_START = 3,\n PLACEHOLDER_BODY = 4,\n PUNCTUATION = 9,\n SPACE = 10,\n TAB = 11,\n TAB_SPACE = 12;\n\n\n this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) {\n if (tokens.length == 0) {\n return [];\n }\n\n var splits = [];\n var displayLength = tokens.length;\n var lastSplit = 0, lastDocSplit = 0;\n\n var isCode = this.$wrapAsCode;\n\n var indentedSoftWrap = this.$indentedSoftWrap;\n var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)\n || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);\n\n function getWrapIndent() {\n var indentation = 0;\n if (maxIndent === 0)\n return indentation;\n if (indentedSoftWrap) {\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n if (token == SPACE)\n indentation += 1;\n else if (token == TAB)\n indentation += tabSize;\n else if (token == TAB_SPACE)\n continue;\n else\n break;\n }\n }\n if (isCode && indentedSoftWrap !== false)\n indentation += tabSize;\n return Math.min(indentation, maxIndent);\n }\n function addSplit(screenPos) {\n var displayed = tokens.slice(lastSplit, screenPos);\n var len = displayed.length;\n displayed.join(\"\")\n .replace(/12/g, function() {\n len -= 1;\n })\n .replace(/2/g, function() {\n len -= 1;\n });\n\n if (!splits.length) {\n indent = getWrapIndent();\n splits.indent = indent;\n }\n lastDocSplit += len;\n splits.push(lastDocSplit);\n lastSplit = screenPos;\n }\n var indent = 0;\n while (displayLength - lastSplit > wrapLimit - indent) {\n var split = lastSplit + wrapLimit - indent;\n if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {\n addSplit(split);\n continue;\n }\n if (tokens[split] == PLACEHOLDER_START || tokens[split] == PLACEHOLDER_BODY) {\n for (split; split != lastSplit - 1; split--) {\n if (tokens[split] == PLACEHOLDER_START) {\n break;\n }\n }\n if (split > lastSplit) {\n addSplit(split);\n continue;\n }\n split = lastSplit + wrapLimit;\n for (split; split < tokens.length; split++) {\n if (tokens[split] != PLACEHOLDER_BODY) {\n break;\n }\n }\n if (split == tokens.length) {\n break; // Breaks the while-loop.\n }\n addSplit(split);\n continue;\n }\n var minSplit = Math.max(split - (wrapLimit -(wrapLimit>>2)), lastSplit - 1);\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n if (isCode) {\n while (split > minSplit && tokens[split] < PLACEHOLDER_START) {\n split --;\n }\n while (split > minSplit && tokens[split] == PUNCTUATION) {\n split --;\n }\n } else {\n while (split > minSplit && tokens[split] < SPACE) {\n split --;\n }\n }\n if (split > minSplit) {\n addSplit(++split);\n continue;\n }\n split = lastSplit + wrapLimit;\n if (tokens[split] == CHAR_EXT)\n split--;\n addSplit(split - indent);\n }\n return splits;\n };\n this.$getDisplayTokens = function(str, offset) {\n var arr = [];\n var tabSize;\n offset = offset || 0;\n\n for (var i = 0; i < str.length; i++) {\n var c = str.charCodeAt(i);\n if (c == 9) {\n tabSize = this.getScreenTabSize(arr.length + offset);\n arr.push(TAB);\n for (var n = 1; n < tabSize; n++) {\n arr.push(TAB_SPACE);\n }\n }\n else if (c == 32) {\n arr.push(SPACE);\n } else if((c > 39 && c < 48) || (c > 57 && c < 64)) {\n arr.push(PUNCTUATION);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n arr.push(CHAR, CHAR_EXT);\n } else {\n arr.push(CHAR);\n }\n }\n return arr;\n };\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn == 0)\n return [0, 0];\n if (maxScreenColumn == null)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n\n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charCodeAt(column);\n if (c == 9) {\n screenColumn += this.getScreenTabSize(screenColumn);\n }\n else if (c >= 0x1100 && isFullWidth(c)) {\n screenColumn += 2;\n } else {\n screenColumn += 1;\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n\n return [screenColumn, column];\n };\n\n this.lineWidgets = null;\n this.getRowLength = function(row) {\n if (this.lineWidgets)\n var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0;\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n this.getRowLineCount = function(row) {\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1;\n } else {\n return this.$wrapData[row].length + 1;\n }\n };\n\n this.getRowWrapIndent = function(screenRow) {\n if (this.$useWrapMode) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n var splits = this.$wrapData[pos.row];\n return splits.length && splits[0] < pos.column ? splits.indent : 0;\n } else {\n return 0;\n }\n };\n this.getScreenLastRowColumn = function(screenRow) {\n var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);\n return this.documentToScreenColumn(pos.row, pos.column);\n };\n this.getDocumentLastRowColumn = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.getScreenLastRowColumn(screenRow);\n };\n this.getDocumentLastRowColumnPosition = function(docRow, docColumn) {\n var screenRow = this.documentToScreenRow(docRow, docColumn);\n return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10);\n };\n this.getRowSplitData = function(row) {\n if (!this.$useWrapMode) {\n return undefined;\n } else {\n return this.$wrapData[row];\n }\n };\n this.getScreenTabSize = function(screenColumn) {\n return this.$tabSize - screenColumn % this.$tabSize;\n };\n\n\n this.screenToDocumentRow = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).row;\n };\n\n\n this.screenToDocumentColumn = function(screenRow, screenColumn) {\n return this.screenToDocumentPosition(screenRow, screenColumn).column;\n };\n this.screenToDocumentPosition = function(screenRow, screenColumn, offsetX) {\n if (screenRow < 0)\n return {row: 0, column: 0};\n\n var line;\n var docRow = 0;\n var docColumn = 0;\n var column;\n var row = 0;\n var rowLength = 0;\n\n var rowCache = this.$screenRowCache;\n var i = this.$getRowCacheIndex(rowCache, screenRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var docRow = this.$docRowCache[i];\n var doCache = screenRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var maxRow = this.getLength() - 1;\n var foldLine = this.getNextFoldLine(docRow);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (row <= screenRow) {\n rowLength = this.getRowLength(docRow);\n if (row + rowLength > screenRow || docRow >= maxRow) {\n break;\n } else {\n row += rowLength;\n docRow++;\n if (docRow > foldStart) {\n docRow = foldLine.end.row+1;\n foldLine = this.getNextFoldLine(docRow, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n }\n\n if (doCache) {\n this.$docRowCache.push(docRow);\n this.$screenRowCache.push(row);\n }\n }\n\n if (foldLine && foldLine.start.row <= docRow) {\n line = this.getFoldDisplayLine(foldLine);\n docRow = foldLine.start.row;\n } else if (row + rowLength <= screenRow || docRow > maxRow) {\n return {\n row: maxRow,\n column: this.getLine(maxRow).length\n };\n } else {\n line = this.getLine(docRow);\n foldLine = null;\n }\n var wrapIndent = 0, splitIndex = Math.floor(screenRow - row);\n if (this.$useWrapMode) {\n var splits = this.$wrapData[docRow];\n if (splits) {\n column = splits[splitIndex];\n if(splitIndex > 0 && splits.length) {\n wrapIndent = splits.indent;\n docColumn = splits[splitIndex - 1] || splits[splits.length - 1];\n line = line.substring(docColumn);\n }\n }\n }\n\n if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex))\n screenColumn = this.$bidiHandler.offsetToCol(offsetX);\n\n docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1];\n if (this.$useWrapMode && docColumn >= column)\n docColumn = column - 1;\n\n if (foldLine)\n return foldLine.idxToPosition(docColumn);\n\n return {row: docRow, column: docColumn};\n };\n this.documentToScreenPosition = function(docRow, docColumn) {\n if (typeof docColumn === \"undefined\")\n var pos = this.$clipPositionToDocument(docRow.row, docRow.column);\n else\n pos = this.$clipPositionToDocument(docRow, docColumn);\n\n docRow = pos.row;\n docColumn = pos.column;\n\n var screenRow = 0;\n var foldStartRow = null;\n var fold = null;\n fold = this.getFoldAt(docRow, docColumn, 1);\n if (fold) {\n docRow = fold.start.row;\n docColumn = fold.start.column;\n }\n\n var rowEnd, row = 0;\n\n\n var rowCache = this.$docRowCache;\n var i = this.$getRowCacheIndex(rowCache, docRow);\n var l = rowCache.length;\n if (l && i >= 0) {\n var row = rowCache[i];\n var screenRow = this.$screenRowCache[i];\n var doCache = docRow > rowCache[l - 1];\n } else {\n var doCache = !l;\n }\n\n var foldLine = this.getNextFoldLine(row);\n var foldStart = foldLine ?foldLine.start.row :Infinity;\n\n while (row < docRow) {\n if (row >= foldStart) {\n rowEnd = foldLine.end.row + 1;\n if (rowEnd > docRow)\n break;\n foldLine = this.getNextFoldLine(rowEnd, foldLine);\n foldStart = foldLine ?foldLine.start.row :Infinity;\n }\n else {\n rowEnd = row + 1;\n }\n\n screenRow += this.getRowLength(row);\n row = rowEnd;\n\n if (doCache) {\n this.$docRowCache.push(row);\n this.$screenRowCache.push(screenRow);\n }\n }\n var textLine = \"\";\n if (foldLine && row >= foldStart) {\n textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn);\n foldStartRow = foldLine.start.row;\n } else {\n textLine = this.getLine(docRow).substring(0, docColumn);\n foldStartRow = docRow;\n }\n var wrapIndent = 0;\n if (this.$useWrapMode) {\n var wrapRow = this.$wrapData[foldStartRow];\n if (wrapRow) {\n var screenRowOffset = 0;\n while (textLine.length >= wrapRow[screenRowOffset]) {\n screenRow ++;\n screenRowOffset++;\n }\n textLine = textLine.substring(\n wrapRow[screenRowOffset - 1] || 0, textLine.length\n );\n wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;\n }\n }\n\n return {\n row: screenRow,\n column: wrapIndent + this.$getStringScreenWidth(textLine)[0]\n };\n };\n this.documentToScreenColumn = function(row, docColumn) {\n return this.documentToScreenPosition(row, docColumn).column;\n };\n this.documentToScreenRow = function(docRow, docColumn) {\n return this.documentToScreenPosition(docRow, docColumn).row;\n };\n this.getScreenLength = function() {\n var screenRows = 0;\n var fold = null;\n if (!this.$useWrapMode) {\n screenRows = this.getLength();\n var foldData = this.$foldData;\n for (var i = 0; i < foldData.length; i++) {\n fold = foldData[i];\n screenRows -= fold.end.row - fold.start.row;\n }\n } else {\n var lastRow = this.$wrapData.length;\n var row = 0, i = 0;\n var fold = this.$foldData[i++];\n var foldStart = fold ? fold.start.row :Infinity;\n\n while (row < lastRow) {\n var splits = this.$wrapData[row];\n screenRows += splits ? splits.length + 1 : 1;\n row ++;\n if (row > foldStart) {\n row = fold.end.row+1;\n fold = this.$foldData[i++];\n foldStart = fold ?fold.start.row :Infinity;\n }\n }\n }\n if (this.lineWidgets)\n screenRows += this.$getWidgetScreenLength();\n\n return screenRows;\n };\n this.$setFontMetrics = function(fm) {\n if (!this.$enableVarChar) return;\n this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {\n if (maxScreenColumn === 0)\n return [0, 0];\n if (!maxScreenColumn)\n maxScreenColumn = Infinity;\n screenColumn = screenColumn || 0;\n \n var c, column;\n for (column = 0; column < str.length; column++) {\n c = str.charAt(column);\n if (c === \"\\t\") {\n screenColumn += this.getScreenTabSize(screenColumn);\n } else {\n screenColumn += fm.getCharacterWidth(c);\n }\n if (screenColumn > maxScreenColumn) {\n break;\n }\n }\n \n return [screenColumn, column];\n };\n };\n \n this.destroy = function() {\n if (this.bgTokenizer) {\n this.bgTokenizer.setDocument(null);\n this.bgTokenizer = null;\n }\n this.$stopWorker();\n };\n\n this.isFullWidth = isFullWidth;\n function isFullWidth(c) {\n if (c < 0x1100)\n return false;\n return c >= 0x1100 && c <= 0x115F ||\n c >= 0x11A3 && c <= 0x11A7 ||\n c >= 0x11FA && c <= 0x11FF ||\n c >= 0x2329 && c <= 0x232A ||\n c >= 0x2E80 && c <= 0x2E99 ||\n c >= 0x2E9B && c <= 0x2EF3 ||\n c >= 0x2F00 && c <= 0x2FD5 ||\n c >= 0x2FF0 && c <= 0x2FFB ||\n c >= 0x3000 && c <= 0x303E ||\n c >= 0x3041 && c <= 0x3096 ||\n c >= 0x3099 && c <= 0x30FF ||\n c >= 0x3105 && c <= 0x312D ||\n c >= 0x3131 && c <= 0x318E ||\n c >= 0x3190 && c <= 0x31BA ||\n c >= 0x31C0 && c <= 0x31E3 ||\n c >= 0x31F0 && c <= 0x321E ||\n c >= 0x3220 && c <= 0x3247 ||\n c >= 0x3250 && c <= 0x32FE ||\n c >= 0x3300 && c <= 0x4DBF ||\n c >= 0x4E00 && c <= 0xA48C ||\n c >= 0xA490 && c <= 0xA4C6 ||\n c >= 0xA960 && c <= 0xA97C ||\n c >= 0xAC00 && c <= 0xD7A3 ||\n c >= 0xD7B0 && c <= 0xD7C6 ||\n c >= 0xD7CB && c <= 0xD7FB ||\n c >= 0xF900 && c <= 0xFAFF ||\n c >= 0xFE10 && c <= 0xFE19 ||\n c >= 0xFE30 && c <= 0xFE52 ||\n c >= 0xFE54 && c <= 0xFE66 ||\n c >= 0xFE68 && c <= 0xFE6B ||\n c >= 0xFF01 && c <= 0xFF60 ||\n c >= 0xFFE0 && c <= 0xFFE6;\n }\n\n}).call(EditSession.prototype);\n\nacequire(\"./edit_session/folding\").Folding.call(EditSession.prototype);\nacequire(\"./edit_session/bracket_match\").BracketMatch.call(EditSession.prototype);\n\n\nconfig.defineOptions(EditSession.prototype, \"session\", {\n wrap: {\n set: function(value) {\n if (!value || value == \"off\")\n value = false;\n else if (value == \"free\")\n value = true;\n else if (value == \"printMargin\")\n value = -1;\n else if (typeof value == \"string\")\n value = parseInt(value, 10) || false;\n\n if (this.$wrap == value)\n return;\n this.$wrap = value;\n if (!value) {\n this.setUseWrapMode(false);\n } else {\n var col = typeof value == \"number\" ? value : null;\n this.setWrapLimitRange(col, col);\n this.setUseWrapMode(true);\n }\n },\n get: function() {\n if (this.getUseWrapMode()) {\n if (this.$wrap == -1)\n return \"printMargin\";\n if (!this.getWrapLimitRange().min)\n return \"free\";\n return this.$wrap;\n }\n return \"off\";\n },\n handlesSet: true\n }, \n wrapMethod: {\n set: function(val) {\n val = val == \"auto\"\n ? this.$mode.type != \"text\"\n : val != \"text\";\n if (val != this.$wrapAsCode) {\n this.$wrapAsCode = val;\n if (this.$useWrapMode) {\n this.$modified = true;\n this.$resetRowCache(0);\n this.$updateWrapData(0, this.getLength() - 1);\n }\n }\n },\n initialValue: \"auto\"\n },\n indentedSoftWrap: { initialValue: true },\n firstLineNumber: {\n set: function() {this._signal(\"changeBreakpoint\");},\n initialValue: 1\n },\n useWorker: {\n set: function(useWorker) {\n this.$useWorker = useWorker;\n\n this.$stopWorker();\n if (useWorker)\n this.$startWorker();\n },\n initialValue: true\n },\n useSoftTabs: {initialValue: true},\n tabSize: {\n set: function(tabSize) {\n if (isNaN(tabSize) || this.$tabSize === tabSize) return;\n\n this.$modified = true;\n this.$rowLengthCache = [];\n this.$tabSize = tabSize;\n this._signal(\"changeTabSize\");\n },\n initialValue: 4,\n handlesSet: true\n },\n navigateWithinSoftTabs: {initialValue: false},\n overwrite: {\n set: function(val) {this._signal(\"changeOverwrite\");},\n initialValue: false\n },\n newLineMode: {\n set: function(val) {this.doc.setNewLineMode(val);},\n get: function() {return this.doc.getNewLineMode();},\n handlesSet: true\n },\n mode: {\n set: function(val) { this.setMode(val); },\n get: function() { return this.$modeId; }\n }\n});\n\nexports.EditSession = EditSession;\n});\n\nace.define(\"ace/search\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/lib/oop\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"./lib/lang\");\nvar oop = acequire(\"./lib/oop\");\nvar Range = acequire(\"./range\").Range;\n\nvar Search = function() {\n this.$options = {};\n};\n\n(function() {\n this.set = function(options) {\n oop.mixin(this.$options, options);\n return this;\n };\n this.getOptions = function() {\n return lang.copyObject(this.$options);\n };\n this.setOptions = function(options) {\n this.$options = options;\n };\n this.find = function(session) {\n var options = this.$options;\n var iterator = this.$matchIterator(session, options);\n if (!iterator)\n return false;\n\n var firstRange = null;\n iterator.forEach(function(sr, sc, er, ec) {\n firstRange = new Range(sr, sc, er, ec);\n if (sc == ec && options.start && options.start.start\n && options.skipCurrent != false && firstRange.isEqual(options.start)\n ) {\n firstRange = null;\n return false;\n }\n\n return true;\n });\n\n return firstRange;\n };\n this.findAll = function(session) {\n var options = this.$options;\n if (!options.needle)\n return [];\n this.$assembleRegExp(options);\n\n var range = options.range;\n var lines = range\n ? session.getLines(range.start.row, range.end.row)\n : session.doc.getAllLines();\n\n var ranges = [];\n var re = options.re;\n if (options.$isMultiLine) {\n var len = re.length;\n var maxRow = lines.length - len;\n var prevRange;\n outer: for (var row = re.offset || 0; row <= maxRow; row++) {\n for (var j = 0; j < len; j++)\n if (lines[row + j].search(re[j]) == -1)\n continue outer;\n \n var startLine = lines[row];\n var line = lines[row + len - 1];\n var startIndex = startLine.length - startLine.match(re[0])[0].length;\n var endIndex = line.match(re[len - 1])[0].length;\n \n if (prevRange && prevRange.end.row === row &&\n prevRange.end.column > startIndex\n ) {\n continue;\n }\n ranges.push(prevRange = new Range(\n row, startIndex, row + len - 1, endIndex\n ));\n if (len > 2)\n row = row + len - 2;\n }\n } else {\n for (var i = 0; i < lines.length; i++) {\n var matches = lang.getMatchOffsets(lines[i], re);\n for (var j = 0; j < matches.length; j++) {\n var match = matches[j];\n ranges.push(new Range(i, match.offset, i, match.offset + match.length));\n }\n }\n }\n\n if (range) {\n var startColumn = range.start.column;\n var endColumn = range.start.column;\n var i = 0, j = ranges.length - 1;\n while (i < j && ranges[i].start.column < startColumn && ranges[i].start.row == range.start.row)\n i++;\n\n while (i < j && ranges[j].end.column > endColumn && ranges[j].end.row == range.end.row)\n j--;\n \n ranges = ranges.slice(i, j + 1);\n for (i = 0, j = ranges.length; i < j; i++) {\n ranges[i].start.row += range.start.row;\n ranges[i].end.row += range.start.row;\n }\n }\n\n return ranges;\n };\n this.replace = function(input, replacement) {\n var options = this.$options;\n\n var re = this.$assembleRegExp(options);\n if (options.$isMultiLine)\n return replacement;\n\n if (!re)\n return;\n\n var match = re.exec(input);\n if (!match || match[0].length != input.length)\n return null;\n \n replacement = input.replace(re, replacement);\n if (options.preserveCase) {\n replacement = replacement.split(\"\");\n for (var i = Math.min(input.length, input.length); i--; ) {\n var ch = input[i];\n if (ch && ch.toLowerCase() != ch)\n replacement[i] = replacement[i].toUpperCase();\n else\n replacement[i] = replacement[i].toLowerCase();\n }\n replacement = replacement.join(\"\");\n }\n \n return replacement;\n };\n\n this.$assembleRegExp = function(options, $disableFakeMultiline) {\n if (options.needle instanceof RegExp)\n return options.re = options.needle;\n\n var needle = options.needle;\n\n if (!options.needle)\n return options.re = false;\n\n if (!options.regExp)\n needle = lang.escapeRegExp(needle);\n\n if (options.wholeWord)\n needle = addWordBoundary(needle, options);\n\n var modifier = options.caseSensitive ? \"gm\" : \"gmi\";\n\n options.$isMultiLine = !$disableFakeMultiline && /[\\n\\r]/.test(needle);\n if (options.$isMultiLine)\n return options.re = this.$assembleMultilineRegExp(needle, modifier);\n\n try {\n var re = new RegExp(needle, modifier);\n } catch(e) {\n re = false;\n }\n return options.re = re;\n };\n\n this.$assembleMultilineRegExp = function(needle, modifier) {\n var parts = needle.replace(/\\r\\n|\\r|\\n/g, \"$\\n^\").split(\"\\n\");\n var re = [];\n for (var i = 0; i < parts.length; i++) try {\n re.push(new RegExp(parts[i], modifier));\n } catch(e) {\n return false;\n }\n return re;\n };\n\n this.$matchIterator = function(session, options) {\n var re = this.$assembleRegExp(options);\n if (!re)\n return false;\n var backwards = options.backwards == true;\n var skipCurrent = options.skipCurrent != false;\n\n var range = options.range;\n var start = options.start;\n if (!start)\n start = range ? range[backwards ? \"end\" : \"start\"] : session.selection.getRange();\n \n if (start.start)\n start = start[skipCurrent != backwards ? \"end\" : \"start\"];\n\n var firstRow = range ? range.start.row : 0;\n var lastRow = range ? range.end.row : session.getLength() - 1;\n\n if (backwards) {\n var forEach = function(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row--; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = lastRow, firstRow = start.row; row >= firstRow; row--)\n if (forEachInLine(row, Number.MAX_VALUE, callback))\n return;\n };\n }\n else {\n var forEach = function(callback) {\n var row = start.row;\n if (forEachInLine(row, start.column, callback))\n return;\n for (row = row + 1; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n if (options.wrap == false)\n return;\n for (row = firstRow, lastRow = start.row; row <= lastRow; row++)\n if (forEachInLine(row, 0, callback))\n return;\n };\n }\n \n if (options.$isMultiLine) {\n var len = re.length;\n var forEachInLine = function(row, offset, callback) {\n var startRow = backwards ? row - len + 1 : row;\n if (startRow < 0) return;\n var line = session.getLine(startRow);\n var startIndex = line.search(re[0]);\n if (!backwards && startIndex < offset || startIndex === -1) return;\n for (var i = 1; i < len; i++) {\n line = session.getLine(startRow + i);\n if (line.search(re[i]) == -1)\n return;\n }\n var endIndex = line.match(re[len - 1])[0].length;\n if (backwards && endIndex > offset) return;\n if (callback(startRow, startIndex, startRow + len - 1, endIndex))\n return true;\n };\n }\n else if (backwards) {\n var forEachInLine = function(row, endIndex, callback) {\n var line = session.getLine(row);\n var matches = [];\n var m, last = 0;\n re.lastIndex = 0;\n while((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (!length) {\n if (last >= line.length) break;\n re.lastIndex = last += 1;\n }\n if (m.index + length > endIndex)\n break;\n matches.push(m.index, length);\n }\n for (var i = matches.length - 1; i >= 0; i -= 2) {\n var column = matches[i - 1];\n var length = matches[i];\n if (callback(row, column, row, column + length))\n return true;\n }\n };\n }\n else {\n var forEachInLine = function(row, startIndex, callback) {\n var line = session.getLine(row);\n var m;\n var last = startIndex;\n re.lastIndex = startIndex;\n while((m = re.exec(line))) {\n var length = m[0].length;\n last = m.index;\n if (callback(row, last, row,last + length))\n return true;\n if (!length) {\n re.lastIndex = last += 1;\n if (last >= line.length) return false;\n }\n }\n };\n }\n return {forEach: forEach};\n };\n\n}).call(Search.prototype);\n\nfunction addWordBoundary(needle, options) {\n function wordBoundary(c) {\n if (/\\w/.test(c) || options.regExp) return \"\\\\b\";\n return \"\";\n }\n return wordBoundary(needle[0]) + needle\n + wordBoundary(needle[needle.length - 1]);\n}\n\nexports.Search = Search;\n});\n\nace.define(\"ace/keyboard/hash_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/keys\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar keyUtil = acequire(\"../lib/keys\");\nvar useragent = acequire(\"../lib/useragent\");\nvar KEY_MODS = keyUtil.KEY_MODS;\n\nfunction HashHandler(config, platform) {\n this.platform = platform || (useragent.isMac ? \"mac\" : \"win\");\n this.commands = {};\n this.commandKeyBinding = {};\n this.addCommands(config);\n this.$singleCommand = true;\n}\n\nfunction MultiHashHandler(config, platform) {\n HashHandler.call(this, config, platform);\n this.$singleCommand = false;\n}\n\nMultiHashHandler.prototype = HashHandler.prototype;\n\n(function() {\n \n\n this.addCommand = function(command) {\n if (this.commands[command.name])\n this.removeCommand(command);\n\n this.commands[command.name] = command;\n\n if (command.bindKey)\n this._buildKeyHash(command);\n };\n\n this.removeCommand = function(command, keepCommand) {\n var name = command && (typeof command === 'string' ? command : command.name);\n command = this.commands[name];\n if (!keepCommand)\n delete this.commands[name];\n var ckb = this.commandKeyBinding;\n for (var keyId in ckb) {\n var cmdGroup = ckb[keyId];\n if (cmdGroup == command) {\n delete ckb[keyId];\n } else if (Array.isArray(cmdGroup)) {\n var i = cmdGroup.indexOf(command);\n if (i != -1) {\n cmdGroup.splice(i, 1);\n if (cmdGroup.length == 1)\n ckb[keyId] = cmdGroup[0];\n }\n }\n }\n };\n\n this.bindKey = function(key, command, position) {\n if (typeof key == \"object\" && key) {\n if (position == undefined)\n position = key.position;\n key = key[this.platform];\n }\n if (!key)\n return;\n if (typeof command == \"function\")\n return this.addCommand({exec: command, bindKey: key, name: command.name || key});\n \n key.split(\"|\").forEach(function(keyPart) {\n var chain = \"\";\n if (keyPart.indexOf(\" \") != -1) {\n var parts = keyPart.split(/\\s+/);\n keyPart = parts.pop();\n parts.forEach(function(keyPart) {\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n chain += (chain ? \" \" : \"\") + id;\n this._addCommandToBinding(chain, \"chainKeys\");\n }, this);\n chain += \" \";\n }\n var binding = this.parseKeys(keyPart);\n var id = KEY_MODS[binding.hashId] + binding.key;\n this._addCommandToBinding(chain + id, command, position);\n }, this);\n };\n \n function getPosition(command) {\n return typeof command == \"object\" && command.bindKey\n && command.bindKey.position\n || (command.isDefault ? -100 : 0);\n }\n this._addCommandToBinding = function(keyId, command, position) {\n var ckb = this.commandKeyBinding, i;\n if (!command) {\n delete ckb[keyId];\n } else if (!ckb[keyId] || this.$singleCommand) {\n ckb[keyId] = command;\n } else {\n if (!Array.isArray(ckb[keyId])) {\n ckb[keyId] = [ckb[keyId]];\n } else if ((i = ckb[keyId].indexOf(command)) != -1) {\n ckb[keyId].splice(i, 1);\n }\n\n if (typeof position != \"number\") {\n position = getPosition(command);\n }\n\n var commands = ckb[keyId];\n for (i = 0; i < commands.length; i++) {\n var other = commands[i];\n var otherPos = getPosition(other);\n if (otherPos > position)\n break;\n }\n commands.splice(i, 0, command);\n }\n };\n\n this.addCommands = function(commands) {\n commands && Object.keys(commands).forEach(function(name) {\n var command = commands[name];\n if (!command)\n return;\n \n if (typeof command === \"string\")\n return this.bindKey(command, name);\n\n if (typeof command === \"function\")\n command = { exec: command };\n\n if (typeof command !== \"object\")\n return;\n\n if (!command.name)\n command.name = name;\n\n this.addCommand(command);\n }, this);\n };\n\n this.removeCommands = function(commands) {\n Object.keys(commands).forEach(function(name) {\n this.removeCommand(commands[name]);\n }, this);\n };\n\n this.bindKeys = function(keyList) {\n Object.keys(keyList).forEach(function(key) {\n this.bindKey(key, keyList[key]);\n }, this);\n };\n\n this._buildKeyHash = function(command) {\n this.bindKey(command.bindKey, command);\n };\n this.parseKeys = function(keys) {\n var parts = keys.toLowerCase().split(/[\\-\\+]([\\-\\+])?/).filter(function(x){return x;});\n var key = parts.pop();\n\n var keyCode = keyUtil[key];\n if (keyUtil.FUNCTION_KEYS[keyCode])\n key = keyUtil.FUNCTION_KEYS[keyCode].toLowerCase();\n else if (!parts.length)\n return {key: key, hashId: -1};\n else if (parts.length == 1 && parts[0] == \"shift\")\n return {key: key.toUpperCase(), hashId: -1};\n\n var hashId = 0;\n for (var i = parts.length; i--;) {\n var modifier = keyUtil.KEY_MODS[parts[i]];\n if (modifier == null) {\n if (typeof console != \"undefined\")\n console.error(\"invalid modifier \" + parts[i] + \" in \" + keys);\n return false;\n }\n hashId |= modifier;\n }\n return {key: key, hashId: hashId};\n };\n\n this.findKeyCommand = function findKeyCommand(hashId, keyString) {\n var key = KEY_MODS[hashId] + keyString;\n return this.commandKeyBinding[key];\n };\n\n this.handleKeyboard = function(data, hashId, keyString, keyCode) {\n if (keyCode < 0) return;\n var key = KEY_MODS[hashId] + keyString;\n var command = this.commandKeyBinding[key];\n if (data.$keyChain) {\n data.$keyChain += \" \" + key;\n command = this.commandKeyBinding[data.$keyChain] || command;\n }\n \n if (command) {\n if (command == \"chainKeys\" || command[command.length - 1] == \"chainKeys\") {\n data.$keyChain = data.$keyChain || key;\n return {command: \"null\"};\n }\n }\n \n if (data.$keyChain) {\n if ((!hashId || hashId == 4) && keyString.length == 1)\n data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input\n else if (hashId == -1 || keyCode > 0)\n data.$keyChain = \"\"; // reset keyChain\n }\n return {command: command};\n };\n \n this.getStatusText = function(editor, data) {\n return data.$keyChain || \"\";\n };\n\n}).call(HashHandler.prototype);\n\nexports.HashHandler = HashHandler;\nexports.MultiHashHandler = MultiHashHandler;\n});\n\nace.define(\"ace/commands/command_manager\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/keyboard/hash_handler\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar MultiHashHandler = acequire(\"../keyboard/hash_handler\").MultiHashHandler;\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CommandManager = function(platform, commands) {\n MultiHashHandler.call(this, commands, platform);\n this.byName = this.commands;\n this.setDefaultHandler(\"exec\", function(e) {\n return e.command.exec(e.editor, e.args || {});\n });\n};\n\noop.inherits(CommandManager, MultiHashHandler);\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.exec = function(command, editor, args) {\n if (Array.isArray(command)) {\n for (var i = command.length; i--; ) {\n if (this.exec(command[i], editor, args)) return true;\n }\n return false;\n }\n\n if (typeof command === \"string\")\n command = this.commands[command];\n\n if (!command)\n return false;\n\n if (editor && editor.$readOnly && !command.readOnly)\n return false;\n\n if (command.isAvailable && !command.isAvailable(editor))\n return false;\n\n var e = {editor: editor, command: command, args: args};\n e.returnValue = this._emit(\"exec\", e);\n this._signal(\"afterExec\", e);\n\n return e.returnValue === false ? false : true;\n };\n\n this.toggleRecording = function(editor) {\n if (this.$inReplay)\n return;\n\n editor && editor._emit(\"changeStatus\");\n if (this.recording) {\n this.macro.pop();\n this.removeEventListener(\"exec\", this.$addCommandToMacro);\n\n if (!this.macro.length)\n this.macro = this.oldMacro;\n\n return this.recording = false;\n }\n if (!this.$addCommandToMacro) {\n this.$addCommandToMacro = function(e) {\n this.macro.push([e.command, e.args]);\n }.bind(this);\n }\n\n this.oldMacro = this.macro;\n this.macro = [];\n this.on(\"exec\", this.$addCommandToMacro);\n return this.recording = true;\n };\n\n this.replay = function(editor) {\n if (this.$inReplay || !this.macro)\n return;\n\n if (this.recording)\n return this.toggleRecording(editor);\n\n try {\n this.$inReplay = true;\n this.macro.forEach(function(x) {\n if (typeof x == \"string\")\n this.exec(x, editor);\n else\n this.exec(x[0], editor, x[1]);\n }, this);\n } finally {\n this.$inReplay = false;\n }\n };\n\n this.trimMacro = function(m) {\n return m.map(function(x){\n if (typeof x[0] != \"string\")\n x[0] = x[0].name;\n if (!x[1])\n x = x[0];\n return x;\n });\n };\n\n}).call(CommandManager.prototype);\n\nexports.CommandManager = CommandManager;\n\n});\n\nace.define(\"ace/commands/default_commands\",[\"require\",\"exports\",\"module\",\"ace/lib/lang\",\"ace/config\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar lang = acequire(\"../lib/lang\");\nvar config = acequire(\"../config\");\nvar Range = acequire(\"../range\").Range;\n\nfunction bindKey(win, mac) {\n return {win: win, mac: mac};\n}\nexports.commands = [{\n name: \"showSettingsMenu\",\n bindKey: bindKey(\"Ctrl-,\", \"Command-,\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/settings_menu\", function(module) {\n module.init(editor);\n editor.showSettingsMenu();\n });\n },\n readOnly: true\n}, {\n name: \"goToNextError\",\n bindKey: bindKey(\"Alt-E\", \"F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, 1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"goToPreviousError\",\n bindKey: bindKey(\"Alt-Shift-E\", \"Shift-F4\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/error_marker\", function(module) {\n module.showErrorMarker(editor, -1);\n });\n },\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selectall\",\n bindKey: bindKey(\"Ctrl-A\", \"Command-A\"),\n exec: function(editor) { editor.selectAll(); },\n readOnly: true\n}, {\n name: \"centerselection\",\n bindKey: bindKey(null, \"Ctrl-L\"),\n exec: function(editor) { editor.centerSelection(); },\n readOnly: true\n}, {\n name: \"gotoline\",\n bindKey: bindKey(\"Ctrl-L\", \"Command-L\"),\n exec: function(editor) {\n var line = parseInt(prompt(\"Enter line number:\"), 10);\n if (!isNaN(line)) {\n editor.gotoLine(line);\n }\n },\n readOnly: true\n}, {\n name: \"fold\",\n bindKey: bindKey(\"Alt-L|Ctrl-F1\", \"Command-Alt-L|Command-F1\"),\n exec: function(editor) { editor.session.toggleFold(false); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfold\",\n bindKey: bindKey(\"Alt-Shift-L|Ctrl-Shift-F1\", \"Command-Alt-Shift-L|Command-Shift-F1\"),\n exec: function(editor) { editor.session.toggleFold(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleFoldWidget\",\n bindKey: bindKey(\"F2\", \"F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"toggleParentFoldWidget\",\n bindKey: bindKey(\"Alt-F2\", \"Alt-F2\"),\n exec: function(editor) { editor.session.toggleFoldWidget(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldall\",\n bindKey: bindKey(null, \"Ctrl-Command-Option-0\"),\n exec: function(editor) { editor.session.foldAll(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"foldOther\",\n bindKey: bindKey(\"Alt-0\", \"Command-Option-0\"),\n exec: function(editor) { \n editor.session.foldAll();\n editor.session.unfold(editor.selection.getAllRanges());\n },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"unfoldall\",\n bindKey: bindKey(\"Alt-Shift-0\", \"Command-Option-Shift-0\"),\n exec: function(editor) { editor.session.unfold(); },\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findnext\",\n bindKey: bindKey(\"Ctrl-K\", \"Command-G\"),\n exec: function(editor) { editor.findNext(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"findprevious\",\n bindKey: bindKey(\"Ctrl-Shift-K\", \"Command-Shift-G\"),\n exec: function(editor) { editor.findPrevious(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"center\",\n readOnly: true\n}, {\n name: \"selectOrFindNext\",\n bindKey: bindKey(\"Alt-K\", \"Ctrl-G\"),\n exec: function(editor) {\n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findNext(); \n },\n readOnly: true\n}, {\n name: \"selectOrFindPrevious\",\n bindKey: bindKey(\"Alt-Shift-K\", \"Ctrl-Shift-G\"),\n exec: function(editor) { \n if (editor.selection.isEmpty())\n editor.selection.selectWord();\n else\n editor.findPrevious();\n },\n readOnly: true\n}, {\n name: \"find\",\n bindKey: bindKey(\"Ctrl-F\", \"Command-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor);});\n },\n readOnly: true\n}, {\n name: \"overwrite\",\n bindKey: \"Insert\",\n exec: function(editor) { editor.toggleOverwrite(); },\n readOnly: true\n}, {\n name: \"selecttostart\",\n bindKey: bindKey(\"Ctrl-Shift-Home\", \"Command-Shift-Home|Command-Shift-Up\"),\n exec: function(editor) { editor.getSelection().selectFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotostart\",\n bindKey: bindKey(\"Ctrl-Home\", \"Command-Home|Command-Up\"),\n exec: function(editor) { editor.navigateFileStart(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectup\",\n bindKey: bindKey(\"Shift-Up\", \"Shift-Up|Ctrl-Shift-P\"),\n exec: function(editor) { editor.getSelection().selectUp(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golineup\",\n bindKey: bindKey(\"Up\", \"Up|Ctrl-P\"),\n exec: function(editor, args) { editor.navigateUp(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttoend\",\n bindKey: bindKey(\"Ctrl-Shift-End\", \"Command-Shift-End|Command-Shift-Down\"),\n exec: function(editor) { editor.getSelection().selectFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"gotoend\",\n bindKey: bindKey(\"Ctrl-End\", \"Command-End|Command-Down\"),\n exec: function(editor) { editor.navigateFileEnd(); },\n multiSelectAction: \"forEach\",\n readOnly: true,\n scrollIntoView: \"animate\",\n aceCommandGroup: \"fileJump\"\n}, {\n name: \"selectdown\",\n bindKey: bindKey(\"Shift-Down\", \"Shift-Down|Ctrl-Shift-N\"),\n exec: function(editor) { editor.getSelection().selectDown(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"golinedown\",\n bindKey: bindKey(\"Down\", \"Down|Ctrl-N\"),\n exec: function(editor, args) { editor.navigateDown(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordleft\",\n bindKey: bindKey(\"Ctrl-Shift-Left\", \"Option-Shift-Left\"),\n exec: function(editor) { editor.getSelection().selectWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordleft\",\n bindKey: bindKey(\"Ctrl-Left\", \"Option-Left\"),\n exec: function(editor) { editor.navigateWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolinestart\",\n bindKey: bindKey(\"Alt-Shift-Left\", \"Command-Shift-Left|Ctrl-Shift-A\"),\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolinestart\",\n bindKey: bindKey(\"Alt-Left|Home\", \"Command-Left|Home|Ctrl-A\"),\n exec: function(editor) { editor.navigateLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectleft\",\n bindKey: bindKey(\"Shift-Left\", \"Shift-Left|Ctrl-Shift-B\"),\n exec: function(editor) { editor.getSelection().selectLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoleft\",\n bindKey: bindKey(\"Left\", \"Left|Ctrl-B\"),\n exec: function(editor, args) { editor.navigateLeft(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectwordright\",\n bindKey: bindKey(\"Ctrl-Shift-Right\", \"Option-Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotowordright\",\n bindKey: bindKey(\"Ctrl-Right\", \"Option-Right\"),\n exec: function(editor) { editor.navigateWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selecttolineend\",\n bindKey: bindKey(\"Alt-Shift-Right\", \"Command-Shift-Right|Shift-End|Ctrl-Shift-E\"),\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotolineend\",\n bindKey: bindKey(\"Alt-Right|End\", \"Command-Right|End|Ctrl-E\"),\n exec: function(editor) { editor.navigateLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectright\",\n bindKey: bindKey(\"Shift-Right\", \"Shift-Right\"),\n exec: function(editor) { editor.getSelection().selectRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"gotoright\",\n bindKey: bindKey(\"Right\", \"Right|Ctrl-F\"),\n exec: function(editor, args) { editor.navigateRight(args.times); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectpagedown\",\n bindKey: \"Shift-PageDown\",\n exec: function(editor) { editor.selectPageDown(); },\n readOnly: true\n}, {\n name: \"pagedown\",\n bindKey: bindKey(null, \"Option-PageDown\"),\n exec: function(editor) { editor.scrollPageDown(); },\n readOnly: true\n}, {\n name: \"gotopagedown\",\n bindKey: bindKey(\"PageDown\", \"PageDown|Ctrl-V\"),\n exec: function(editor) { editor.gotoPageDown(); },\n readOnly: true\n}, {\n name: \"selectpageup\",\n bindKey: \"Shift-PageUp\",\n exec: function(editor) { editor.selectPageUp(); },\n readOnly: true\n}, {\n name: \"pageup\",\n bindKey: bindKey(null, \"Option-PageUp\"),\n exec: function(editor) { editor.scrollPageUp(); },\n readOnly: true\n}, {\n name: \"gotopageup\",\n bindKey: \"PageUp\",\n exec: function(editor) { editor.gotoPageUp(); },\n readOnly: true\n}, {\n name: \"scrollup\",\n bindKey: bindKey(\"Ctrl-Up\", null),\n exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"scrolldown\",\n bindKey: bindKey(\"Ctrl-Down\", null),\n exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); },\n readOnly: true\n}, {\n name: \"selectlinestart\",\n bindKey: \"Shift-Home\",\n exec: function(editor) { editor.getSelection().selectLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectlineend\",\n bindKey: \"Shift-End\",\n exec: function(editor) { editor.getSelection().selectLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"togglerecording\",\n bindKey: bindKey(\"Ctrl-Alt-E\", \"Command-Option-E\"),\n exec: function(editor) { editor.commands.toggleRecording(editor); },\n readOnly: true\n}, {\n name: \"replaymacro\",\n bindKey: bindKey(\"Ctrl-Shift-E\", \"Command-Shift-E\"),\n exec: function(editor) { editor.commands.replay(editor); },\n readOnly: true\n}, {\n name: \"jumptomatching\",\n bindKey: bindKey(\"Ctrl-P\", \"Ctrl-P\"),\n exec: function(editor) { editor.jumpToMatching(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"selecttomatching\",\n bindKey: bindKey(\"Ctrl-Shift-P\", \"Ctrl-Shift-P\"),\n exec: function(editor) { editor.jumpToMatching(true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"expandToMatching\",\n bindKey: bindKey(\"Ctrl-Shift-M\", \"Ctrl-Shift-M\"),\n exec: function(editor) { editor.jumpToMatching(true, true); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"animate\",\n readOnly: true\n}, {\n name: \"passKeysToBrowser\",\n bindKey: bindKey(null, null),\n exec: function() {},\n passEvent: true,\n readOnly: true\n}, {\n name: \"copy\",\n exec: function(editor) {\n },\n readOnly: true\n},\n{\n name: \"cut\",\n exec: function(editor) {\n var range = editor.getSelectionRange();\n editor._emit(\"cut\", range);\n\n if (!editor.selection.isEmpty()) {\n editor.session.remove(range);\n editor.clearSelection();\n }\n },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"paste\",\n exec: function(editor, args) {\n editor.$handlePaste(args);\n },\n scrollIntoView: \"cursor\"\n}, {\n name: \"removeline\",\n bindKey: bindKey(\"Ctrl-D\", \"Command-D\"),\n exec: function(editor) { editor.removeLines(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"duplicateSelection\",\n bindKey: bindKey(\"Ctrl-Shift-D\", \"Command-Shift-D\"),\n exec: function(editor) { editor.duplicateSelection(); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"sortlines\",\n bindKey: bindKey(\"Ctrl-Alt-S\", \"Command-Alt-S\"),\n exec: function(editor) { editor.sortLines(); },\n scrollIntoView: \"selection\",\n multiSelectAction: \"forEachLine\"\n}, {\n name: \"togglecomment\",\n bindKey: bindKey(\"Ctrl-/\", \"Command-/\"),\n exec: function(editor) { editor.toggleCommentLines(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"toggleBlockComment\",\n bindKey: bindKey(\"Ctrl-Shift-/\", \"Command-Shift-/\"),\n exec: function(editor) { editor.toggleBlockComment(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"modifyNumberUp\",\n bindKey: bindKey(\"Ctrl-Shift-Up\", \"Alt-Shift-Up\"),\n exec: function(editor) { editor.modifyNumber(1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"modifyNumberDown\",\n bindKey: bindKey(\"Ctrl-Shift-Down\", \"Alt-Shift-Down\"),\n exec: function(editor) { editor.modifyNumber(-1); },\n scrollIntoView: \"cursor\",\n multiSelectAction: \"forEach\"\n}, {\n name: \"replace\",\n bindKey: bindKey(\"Ctrl-H\", \"Command-Option-F\"),\n exec: function(editor) {\n config.loadModule(\"ace/ext/searchbox\", function(e) {e.Search(editor, true);});\n }\n}, {\n name: \"undo\",\n bindKey: bindKey(\"Ctrl-Z\", \"Command-Z\"),\n exec: function(editor) { editor.undo(); }\n}, {\n name: \"redo\",\n bindKey: bindKey(\"Ctrl-Shift-Z|Ctrl-Y\", \"Command-Shift-Z|Command-Y\"),\n exec: function(editor) { editor.redo(); }\n}, {\n name: \"copylinesup\",\n bindKey: bindKey(\"Alt-Shift-Up\", \"Command-Option-Up\"),\n exec: function(editor) { editor.copyLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesup\",\n bindKey: bindKey(\"Alt-Up\", \"Option-Up\"),\n exec: function(editor) { editor.moveLinesUp(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"copylinesdown\",\n bindKey: bindKey(\"Alt-Shift-Down\", \"Command-Option-Down\"),\n exec: function(editor) { editor.copyLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"movelinesdown\",\n bindKey: bindKey(\"Alt-Down\", \"Option-Down\"),\n exec: function(editor) { editor.moveLinesDown(); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"del\",\n bindKey: bindKey(\"Delete\", \"Delete|Ctrl-D|Shift-Delete\"),\n exec: function(editor) { editor.remove(\"right\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"backspace\",\n bindKey: bindKey(\n \"Shift-Backspace|Backspace\",\n \"Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H\"\n ),\n exec: function(editor) { editor.remove(\"left\"); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"cut_or_delete\",\n bindKey: bindKey(\"Shift-Delete\", null),\n exec: function(editor) { \n if (editor.selection.isEmpty()) {\n editor.remove(\"left\");\n } else {\n return false;\n }\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolinestart\",\n bindKey: bindKey(\"Alt-Backspace\", \"Command-Backspace\"),\n exec: function(editor) { editor.removeToLineStart(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolineend\",\n bindKey: bindKey(\"Alt-Delete\", \"Ctrl-K|Command-Delete\"),\n exec: function(editor) { editor.removeToLineEnd(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolinestarthard\",\n bindKey: bindKey(\"Ctrl-Shift-Backspace\", null),\n exec: function(editor) {\n var range = editor.selection.getRange();\n range.start.column = 0;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removetolineendhard\",\n bindKey: bindKey(\"Ctrl-Shift-Delete\", null),\n exec: function(editor) {\n var range = editor.selection.getRange();\n range.end.column = Number.MAX_VALUE;\n editor.session.remove(range);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordleft\",\n bindKey: bindKey(\"Ctrl-Backspace\", \"Alt-Backspace|Ctrl-Alt-Backspace\"),\n exec: function(editor) { editor.removeWordLeft(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"removewordright\",\n bindKey: bindKey(\"Ctrl-Delete\", \"Alt-Delete\"),\n exec: function(editor) { editor.removeWordRight(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"outdent\",\n bindKey: bindKey(\"Shift-Tab\", \"Shift-Tab\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"indent\",\n bindKey: bindKey(\"Tab\", \"Tab\"),\n exec: function(editor) { editor.indent(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockoutdent\",\n bindKey: bindKey(\"Ctrl-[\", \"Ctrl-[\"),\n exec: function(editor) { editor.blockOutdent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"blockindent\",\n bindKey: bindKey(\"Ctrl-]\", \"Ctrl-]\"),\n exec: function(editor) { editor.blockIndent(); },\n multiSelectAction: \"forEachLine\",\n scrollIntoView: \"selectionPart\"\n}, {\n name: \"insertstring\",\n exec: function(editor, str) { editor.insert(str); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"inserttext\",\n exec: function(editor, args) {\n editor.insert(lang.stringRepeat(args.text || \"\", args.times || 1));\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"splitline\",\n bindKey: bindKey(null, \"Ctrl-O\"),\n exec: function(editor) { editor.splitLine(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"transposeletters\",\n bindKey: bindKey(\"Alt-Shift-X\", \"Ctrl-T\"),\n exec: function(editor) { editor.transposeLetters(); },\n multiSelectAction: function(editor) {editor.transposeSelections(1); },\n scrollIntoView: \"cursor\"\n}, {\n name: \"touppercase\",\n bindKey: bindKey(\"Ctrl-U\", \"Ctrl-U\"),\n exec: function(editor) { editor.toUpperCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"tolowercase\",\n bindKey: bindKey(\"Ctrl-Shift-U\", \"Ctrl-Shift-U\"),\n exec: function(editor) { editor.toLowerCase(); },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\"\n}, {\n name: \"expandtoline\",\n bindKey: bindKey(\"Ctrl-Shift-L\", \"Command-Shift-L\"),\n exec: function(editor) {\n var range = editor.selection.getRange();\n\n range.start.column = range.end.column = 0;\n range.end.row++;\n editor.selection.setRange(range, false);\n },\n multiSelectAction: \"forEach\",\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"joinlines\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var isBackwards = editor.selection.isBackwards();\n var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();\n var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();\n var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;\n var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());\n var selectedCount = selectedText.replace(/\\n\\s*/, \" \").length;\n var insertLine = editor.session.doc.getLine(selectionStart.row);\n\n for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {\n var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));\n if (curLine.length !== 0) {\n curLine = \" \" + curLine;\n }\n insertLine += curLine;\n }\n\n if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {\n insertLine += editor.session.doc.getNewLineCharacter();\n }\n\n editor.clearSelection();\n editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);\n\n if (selectedCount > 0) {\n editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);\n editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);\n } else {\n firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;\n editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);\n }\n },\n multiSelectAction: \"forEach\",\n readOnly: true\n}, {\n name: \"invertSelection\",\n bindKey: bindKey(null, null),\n exec: function(editor) {\n var endRow = editor.session.doc.getLength() - 1;\n var endCol = editor.session.doc.getLine(endRow).length;\n var ranges = editor.selection.rangeList.ranges;\n var newRanges = [];\n if (ranges.length < 1) {\n ranges = [editor.selection.getRange()];\n }\n\n for (var i = 0; i < ranges.length; i++) {\n if (i == (ranges.length - 1)) {\n if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {\n newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));\n }\n }\n\n if (i === 0) {\n if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {\n newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));\n }\n } else {\n newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column));\n }\n }\n\n editor.exitMultiSelectMode();\n editor.clearSelection();\n\n for(var i = 0; i < newRanges.length; i++) {\n editor.selection.addRange(newRanges[i], false);\n }\n },\n readOnly: true,\n scrollIntoView: \"none\"\n}];\n\n});\n\nace.define(\"ace/editor\",[\"require\",\"exports\",\"module\",\"ace/lib/fixoldbrowsers\",\"ace/lib/oop\",\"ace/lib/dom\",\"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\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar lang = acequire(\"./lib/lang\");\nvar useragent = acequire(\"./lib/useragent\");\nvar TextInput = acequire(\"./keyboard/textinput\").TextInput;\nvar MouseHandler = acequire(\"./mouse/mouse_handler\").MouseHandler;\nvar FoldHandler = acequire(\"./mouse/fold_handler\").FoldHandler;\nvar KeyBinding = acequire(\"./keyboard/keybinding\").KeyBinding;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar Search = acequire(\"./search\").Search;\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar CommandManager = acequire(\"./commands/command_manager\").CommandManager;\nvar defaultCommands = acequire(\"./commands/default_commands\").commands;\nvar config = acequire(\"./config\");\nvar TokenIterator = acequire(\"./token_iterator\").TokenIterator;\nvar Editor = function(renderer, session) {\n var container = renderer.getContainerElement();\n this.container = container;\n this.renderer = renderer;\n this.id = \"editor\" + (++Editor.$uid);\n\n this.commands = new CommandManager(useragent.isMac ? \"mac\" : \"win\", defaultCommands);\n if (typeof document == \"object\") {\n this.textInput = new TextInput(renderer.getTextAreaContainer(), this);\n this.renderer.textarea = this.textInput.getElement();\n this.$mouseHandler = new MouseHandler(this);\n new FoldHandler(this);\n }\n\n this.keyBinding = new KeyBinding(this);\n\n this.$blockScrolling = 0;\n this.$search = new Search().set({\n wrap: true\n });\n\n this.$historyTracker = this.$historyTracker.bind(this);\n this.commands.on(\"exec\", this.$historyTracker);\n\n this.$initOperationListeners();\n \n this._$emitInputEvent = lang.delayedCall(function() {\n this._signal(\"input\", {});\n if (this.session && this.session.bgTokenizer)\n this.session.bgTokenizer.scheduleStart();\n }.bind(this));\n \n this.on(\"change\", function(_, _self) {\n _self._$emitInputEvent.schedule(31);\n });\n\n this.setSession(session || new EditSession(\"\"));\n config.resetOptions(this);\n config._signal(\"editor\", this);\n};\n\nEditor.$uid = 0;\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.$initOperationListeners = function() {\n function last(a) {return a[a.length - 1];}\n\n this.selections = [];\n this.commands.on(\"exec\", this.startOperation.bind(this), true);\n this.commands.on(\"afterExec\", this.endOperation.bind(this), true);\n\n this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));\n\n this.on(\"change\", function() {\n this.curOp || this.startOperation();\n this.curOp.docChanged = true;\n }.bind(this), true);\n\n this.on(\"changeSelection\", function() {\n this.curOp || this.startOperation();\n this.curOp.selectionChanged = true;\n }.bind(this), true);\n };\n\n this.curOp = null;\n this.prevOp = {};\n this.startOperation = function(commadEvent) {\n if (this.curOp) {\n if (!commadEvent || this.curOp.command)\n return;\n this.prevOp = this.curOp;\n }\n if (!commadEvent) {\n this.previousCommand = null;\n commadEvent = {};\n }\n\n this.$opResetTimer.schedule();\n this.curOp = {\n command: commadEvent.command || {},\n args: commadEvent.args,\n scrollTop: this.renderer.scrollTop\n };\n if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)\n this.$blockScrolling++;\n };\n\n this.endOperation = function(e) {\n if (this.curOp) {\n if (e && e.returnValue === false)\n return this.curOp = null;\n this._signal(\"beforeEndOperation\");\n var command = this.curOp.command;\n if (command.name && this.$blockScrolling > 0)\n this.$blockScrolling--;\n var scrollIntoView = command && command.scrollIntoView;\n if (scrollIntoView) {\n switch (scrollIntoView) {\n case \"center-animate\":\n scrollIntoView = \"animate\";\n case \"center\":\n this.renderer.scrollCursorIntoView(null, 0.5);\n break;\n case \"animate\":\n case \"cursor\":\n this.renderer.scrollCursorIntoView();\n break;\n case \"selectionPart\":\n var range = this.selection.getRange();\n var config = this.renderer.layerConfig;\n if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {\n this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);\n }\n break;\n default:\n break;\n }\n if (scrollIntoView == \"animate\")\n this.renderer.animateScrolling(this.curOp.scrollTop);\n }\n \n this.prevOp = this.curOp;\n this.curOp = null;\n }\n };\n this.$mergeableCommands = [\"backspace\", \"del\", \"insertstring\"];\n this.$historyTracker = function(e) {\n if (!this.$mergeUndoDeltas)\n return;\n\n var prev = this.prevOp;\n var mergeableCommands = this.$mergeableCommands;\n var shouldMerge = prev.command && (e.command.name == prev.command.name);\n if (e.command.name == \"insertstring\") {\n var text = e.args;\n if (this.mergeNextCommand === undefined)\n this.mergeNextCommand = true;\n\n shouldMerge = shouldMerge\n && this.mergeNextCommand // previous command allows to coalesce with\n && (!/\\s/.test(text) || /\\s/.test(prev.args)); // previous insertion was of same type\n\n this.mergeNextCommand = true;\n } else {\n shouldMerge = shouldMerge\n && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable\n }\n\n if (\n this.$mergeUndoDeltas != \"always\"\n && Date.now() - this.sequenceStartTime > 2000\n ) {\n shouldMerge = false; // the sequence is too long\n }\n\n if (shouldMerge)\n this.session.mergeUndoDeltas = true;\n else if (mergeableCommands.indexOf(e.command.name) !== -1)\n this.sequenceStartTime = Date.now();\n };\n this.setKeyboardHandler = function(keyboardHandler, cb) {\n if (keyboardHandler && typeof keyboardHandler === \"string\") {\n this.$keybindingId = keyboardHandler;\n var _self = this;\n config.loadModule([\"keybinding\", keyboardHandler], function(module) {\n if (_self.$keybindingId == keyboardHandler)\n _self.keyBinding.setKeyboardHandler(module && module.handler);\n cb && cb();\n });\n } else {\n this.$keybindingId = null;\n this.keyBinding.setKeyboardHandler(keyboardHandler);\n cb && cb();\n }\n };\n this.getKeyboardHandler = function() {\n return this.keyBinding.getKeyboardHandler();\n };\n this.setSession = function(session) {\n if (this.session == session)\n return;\n if (this.curOp) this.endOperation();\n this.curOp = {};\n\n var oldSession = this.session;\n if (oldSession) {\n this.session.off(\"change\", this.$onDocumentChange);\n this.session.off(\"changeMode\", this.$onChangeMode);\n this.session.off(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n this.session.off(\"changeTabSize\", this.$onChangeTabSize);\n this.session.off(\"changeWrapLimit\", this.$onChangeWrapLimit);\n this.session.off(\"changeWrapMode\", this.$onChangeWrapMode);\n this.session.off(\"changeFold\", this.$onChangeFold);\n this.session.off(\"changeFrontMarker\", this.$onChangeFrontMarker);\n this.session.off(\"changeBackMarker\", this.$onChangeBackMarker);\n this.session.off(\"changeBreakpoint\", this.$onChangeBreakpoint);\n this.session.off(\"changeAnnotation\", this.$onChangeAnnotation);\n this.session.off(\"changeOverwrite\", this.$onCursorChange);\n this.session.off(\"changeScrollTop\", this.$onScrollTopChange);\n this.session.off(\"changeScrollLeft\", this.$onScrollLeftChange);\n\n var selection = this.session.getSelection();\n selection.off(\"changeCursor\", this.$onCursorChange);\n selection.off(\"changeSelection\", this.$onSelectionChange);\n }\n\n this.session = session;\n if (session) {\n this.$onDocumentChange = this.onDocumentChange.bind(this);\n session.on(\"change\", this.$onDocumentChange);\n this.renderer.setSession(session);\n \n this.$onChangeMode = this.onChangeMode.bind(this);\n session.on(\"changeMode\", this.$onChangeMode);\n \n this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);\n session.on(\"tokenizerUpdate\", this.$onTokenizerUpdate);\n \n this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);\n session.on(\"changeTabSize\", this.$onChangeTabSize);\n \n this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);\n session.on(\"changeWrapLimit\", this.$onChangeWrapLimit);\n \n this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);\n session.on(\"changeWrapMode\", this.$onChangeWrapMode);\n \n this.$onChangeFold = this.onChangeFold.bind(this);\n session.on(\"changeFold\", this.$onChangeFold);\n \n this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);\n this.session.on(\"changeFrontMarker\", this.$onChangeFrontMarker);\n \n this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);\n this.session.on(\"changeBackMarker\", this.$onChangeBackMarker);\n \n this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);\n this.session.on(\"changeBreakpoint\", this.$onChangeBreakpoint);\n \n this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);\n this.session.on(\"changeAnnotation\", this.$onChangeAnnotation);\n \n this.$onCursorChange = this.onCursorChange.bind(this);\n this.session.on(\"changeOverwrite\", this.$onCursorChange);\n \n this.$onScrollTopChange = this.onScrollTopChange.bind(this);\n this.session.on(\"changeScrollTop\", this.$onScrollTopChange);\n \n this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);\n this.session.on(\"changeScrollLeft\", this.$onScrollLeftChange);\n \n this.selection = session.getSelection();\n this.selection.on(\"changeCursor\", this.$onCursorChange);\n \n this.$onSelectionChange = this.onSelectionChange.bind(this);\n this.selection.on(\"changeSelection\", this.$onSelectionChange);\n \n this.onChangeMode();\n \n this.$blockScrolling += 1;\n this.onCursorChange();\n this.$blockScrolling -= 1;\n \n this.onScrollTopChange();\n this.onScrollLeftChange();\n this.onSelectionChange();\n this.onChangeFrontMarker();\n this.onChangeBackMarker();\n this.onChangeBreakpoint();\n this.onChangeAnnotation();\n this.session.getUseWrapMode() && this.renderer.adjustWrapLimit();\n this.renderer.updateFull();\n } else {\n this.selection = null;\n this.renderer.setSession(session);\n }\n\n this._signal(\"changeSession\", {\n session: session,\n oldSession: oldSession\n });\n \n this.curOp = null;\n \n oldSession && oldSession._signal(\"changeEditor\", {oldEditor: this});\n session && session._signal(\"changeEditor\", {editor: this});\n\n if (session && session.bgTokenizer)\n session.bgTokenizer.scheduleStart();\n };\n this.getSession = function() {\n return this.session;\n };\n this.setValue = function(val, cursorPos) {\n this.session.doc.setValue(val);\n\n if (!cursorPos)\n this.selectAll();\n else if (cursorPos == 1)\n this.navigateFileEnd();\n else if (cursorPos == -1)\n this.navigateFileStart();\n\n return val;\n };\n this.getValue = function() {\n return this.session.getValue();\n };\n this.getSelection = function() {\n return this.selection;\n };\n this.resize = function(force) {\n this.renderer.onResize(force);\n };\n this.setTheme = function(theme, cb) {\n this.renderer.setTheme(theme, cb);\n };\n this.getTheme = function() {\n return this.renderer.getTheme();\n };\n this.setStyle = function(style) {\n this.renderer.setStyle(style);\n };\n this.unsetStyle = function(style) {\n this.renderer.unsetStyle(style);\n };\n this.getFontSize = function () {\n return this.getOption(\"fontSize\") ||\n dom.computedStyle(this.container, \"fontSize\");\n };\n this.setFontSize = function(size) {\n this.setOption(\"fontSize\", size);\n };\n\n this.$highlightBrackets = function() {\n if (this.session.$bracketHighlight) {\n this.session.removeMarker(this.session.$bracketHighlight);\n this.session.$bracketHighlight = null;\n }\n\n if (this.$highlightPending) {\n return;\n }\n var self = this;\n this.$highlightPending = true;\n setTimeout(function() {\n self.$highlightPending = false;\n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n var pos = session.findMatchingBracket(self.getCursorPosition());\n if (pos) {\n var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);\n } else if (session.$mode.getMatching) {\n var range = session.$mode.getMatching(self.session);\n }\n if (range)\n session.$bracketHighlight = session.addMarker(range, \"ace_bracket\", \"text\");\n }, 50);\n };\n this.$highlightTags = function() {\n if (this.$highlightTagPending)\n return;\n var self = this;\n this.$highlightTagPending = true;\n setTimeout(function() {\n self.$highlightTagPending = false;\n \n var session = self.session;\n if (!session || !session.bgTokenizer) return;\n \n var pos = self.getCursorPosition();\n var iterator = new TokenIterator(self.session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n \n if (!token || !/\\b(?:tag-open|tag-name)/.test(token.type)) {\n session.removeMarker(session.$tagHighlight);\n session.$tagHighlight = null;\n return;\n }\n \n if (token.type.indexOf(\"tag-open\") != -1) {\n token = iterator.stepForward();\n if (!token)\n return;\n }\n \n var tag = token.value;\n var depth = 0;\n var prevToken = iterator.stepBackward();\n \n if (prevToken.value == '<'){\n do {\n prevToken = token;\n token = iterator.stepForward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<'){\n depth++;\n } else if (prevToken.value === '= 0);\n } else {\n do {\n token = prevToken;\n prevToken = iterator.stepBackward();\n \n if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {\n if (prevToken.value === '<') {\n depth++;\n } else if (prevToken.value === ' 1))\n highlight = false;\n }\n\n if (session.$highlightLineMarker && !highlight) {\n session.removeMarker(session.$highlightLineMarker.id);\n session.$highlightLineMarker = null;\n } else if (!session.$highlightLineMarker && highlight) {\n var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);\n range.id = session.addMarker(range, \"ace_active-line\", \"screenLine\");\n session.$highlightLineMarker = range;\n } else if (highlight) {\n session.$highlightLineMarker.start.row = highlight.row;\n session.$highlightLineMarker.end.row = highlight.row;\n session.$highlightLineMarker.start.column = highlight.column;\n session._signal(\"changeBackMarker\");\n }\n };\n\n this.onSelectionChange = function(e) {\n var session = this.session;\n\n if (session.$selectionMarker) {\n session.removeMarker(session.$selectionMarker);\n }\n session.$selectionMarker = null;\n\n if (!this.selection.isEmpty()) {\n var range = this.selection.getRange();\n var style = this.getSelectionStyle();\n session.$selectionMarker = session.addMarker(range, \"ace_selection\", style);\n } else {\n this.$updateHighlightActiveLine();\n }\n\n var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp();\n this.session.highlight(re);\n\n this._signal(\"changeSelection\");\n };\n\n this.$getSelectionHighLightRegexp = function() {\n var session = this.session;\n\n var selection = this.getSelectionRange();\n if (selection.isEmpty() || selection.isMultiLine())\n return;\n\n var startOuter = selection.start.column - 1;\n var endOuter = selection.end.column + 1;\n var line = session.getLine(selection.start.row);\n var lineCols = line.length;\n var needle = line.substring(Math.max(startOuter, 0),\n Math.min(endOuter, lineCols));\n if ((startOuter >= 0 && /^[\\w\\d]/.test(needle)) ||\n (endOuter <= lineCols && /[\\w\\d]$/.test(needle)))\n return;\n\n needle = line.substring(selection.start.column, selection.end.column);\n if (!/^[\\w\\d]+$/.test(needle))\n return;\n\n var re = this.$search.$assembleRegExp({\n wholeWord: true,\n caseSensitive: true,\n needle: needle\n });\n\n return re;\n };\n\n\n this.onChangeFrontMarker = function() {\n this.renderer.updateFrontMarkers();\n };\n\n this.onChangeBackMarker = function() {\n this.renderer.updateBackMarkers();\n };\n\n\n this.onChangeBreakpoint = function() {\n this.renderer.updateBreakpoints();\n };\n\n this.onChangeAnnotation = function() {\n this.renderer.setAnnotations(this.session.getAnnotations());\n };\n\n\n this.onChangeMode = function(e) {\n this.renderer.updateText();\n this._emit(\"changeMode\", e);\n };\n\n\n this.onChangeWrapLimit = function() {\n this.renderer.updateFull();\n };\n\n this.onChangeWrapMode = function() {\n this.renderer.onResize(true);\n };\n\n\n this.onChangeFold = function() {\n this.$updateHighlightActiveLine();\n this.renderer.updateFull();\n };\n this.getSelectedText = function() {\n return this.session.getTextRange(this.getSelectionRange());\n };\n this.getCopyText = function() {\n var text = this.getSelectedText();\n this._signal(\"copy\", text);\n return text;\n };\n this.onCopy = function() {\n this.commands.exec(\"copy\", this);\n };\n this.onCut = function() {\n this.commands.exec(\"cut\", this);\n };\n this.onPaste = function(text, event) {\n var e = {text: text, event: event};\n this.commands.exec(\"paste\", this, e);\n };\n \n this.$handlePaste = function(e) {\n if (typeof e == \"string\") \n e = {text: e};\n this._signal(\"paste\", e);\n var text = e.text;\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {\n this.insert(text);\n } else {\n var lines = text.split(/\\r\\n|\\r|\\n/);\n var ranges = this.selection.rangeList.ranges;\n \n if (lines.length > ranges.length || lines.length < 2 || !lines[1])\n return this.commands.exec(\"insertstring\", this, text);\n \n for (var i = ranges.length; i--;) {\n var range = ranges[i];\n if (!range.isEmpty())\n this.session.remove(range);\n \n this.session.insert(range.start, lines[i]);\n }\n }\n };\n\n this.execCommand = function(command, args) {\n return this.commands.exec(command, this, args);\n };\n this.insert = function(text, pasted) {\n var session = this.session;\n var mode = session.getMode();\n var cursor = this.getCursorPosition();\n\n if (this.getBehavioursEnabled() && !pasted) {\n var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);\n if (transform) {\n if (text !== transform.text) {\n this.session.mergeUndoDeltas = false;\n this.$mergeNextCommand = false;\n }\n text = transform.text;\n\n }\n }\n \n if (text == \"\\t\")\n text = this.session.getTabString();\n if (!this.selection.isEmpty()) {\n var range = this.getSelectionRange();\n cursor = this.session.remove(range);\n this.clearSelection();\n }\n else if (this.session.getOverwrite() && text.indexOf(\"\\n\") == -1) {\n var range = new Range.fromPoints(cursor, cursor);\n range.end.column += text.length;\n this.session.remove(range);\n }\n\n if (text == \"\\n\" || text == \"\\r\\n\") {\n var line = session.getLine(cursor.row);\n if (cursor.column > line.search(/\\S|$/)) {\n var d = line.substr(cursor.column).search(/\\S|$/);\n session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);\n }\n }\n this.clearSelection();\n\n var start = cursor.column;\n var lineState = session.getState(cursor.row);\n var line = session.getLine(cursor.row);\n var shouldOutdent = mode.checkOutdent(lineState, line, text);\n var end = session.insert(cursor, text);\n\n if (transform && transform.selection) {\n if (transform.selection.length == 2) { // Transform relative to the current column\n this.selection.setSelectionRange(\n new Range(cursor.row, start + transform.selection[0],\n cursor.row, start + transform.selection[1]));\n } else { // Transform relative to the current row.\n this.selection.setSelectionRange(\n new Range(cursor.row + transform.selection[0],\n transform.selection[1],\n cursor.row + transform.selection[2],\n transform.selection[3]));\n }\n }\n\n if (session.getDocument().isNewLine(text)) {\n var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString());\n\n session.insert({row: cursor.row+1, column: 0}, lineIndent);\n }\n if (shouldOutdent)\n mode.autoOutdent(lineState, session, cursor.row);\n };\n\n this.onTextInput = function(text) {\n this.keyBinding.onTextInput(text);\n };\n\n this.onCommandKey = function(e, hashId, keyCode) {\n this.keyBinding.onCommandKey(e, hashId, keyCode);\n };\n this.setOverwrite = function(overwrite) {\n this.session.setOverwrite(overwrite);\n };\n this.getOverwrite = function() {\n return this.session.getOverwrite();\n };\n this.toggleOverwrite = function() {\n this.session.toggleOverwrite();\n };\n this.setScrollSpeed = function(speed) {\n this.setOption(\"scrollSpeed\", speed);\n };\n this.getScrollSpeed = function() {\n return this.getOption(\"scrollSpeed\");\n };\n this.setDragDelay = function(dragDelay) {\n this.setOption(\"dragDelay\", dragDelay);\n };\n this.getDragDelay = function() {\n return this.getOption(\"dragDelay\");\n };\n this.setSelectionStyle = function(val) {\n this.setOption(\"selectionStyle\", val);\n };\n this.getSelectionStyle = function() {\n return this.getOption(\"selectionStyle\");\n };\n this.setHighlightActiveLine = function(shouldHighlight) {\n this.setOption(\"highlightActiveLine\", shouldHighlight);\n };\n this.getHighlightActiveLine = function() {\n return this.getOption(\"highlightActiveLine\");\n };\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n this.setHighlightSelectedWord = function(shouldHighlight) {\n this.setOption(\"highlightSelectedWord\", shouldHighlight);\n };\n this.getHighlightSelectedWord = function() {\n return this.$highlightSelectedWord;\n };\n\n this.setAnimatedScroll = function(shouldAnimate){\n this.renderer.setAnimatedScroll(shouldAnimate);\n };\n\n this.getAnimatedScroll = function(){\n return this.renderer.getAnimatedScroll();\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.renderer.setShowInvisibles(showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.renderer.getShowInvisibles();\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.renderer.setDisplayIndentGuides(display);\n };\n\n this.getDisplayIndentGuides = function() {\n return this.renderer.getDisplayIndentGuides();\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.renderer.setShowPrintMargin(showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.renderer.getShowPrintMargin();\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.renderer.setPrintMarginColumn(showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.renderer.getPrintMarginColumn();\n };\n this.setReadOnly = function(readOnly) {\n this.setOption(\"readOnly\", readOnly);\n };\n this.getReadOnly = function() {\n return this.getOption(\"readOnly\");\n };\n this.setBehavioursEnabled = function (enabled) {\n this.setOption(\"behavioursEnabled\", enabled);\n };\n this.getBehavioursEnabled = function () {\n return this.getOption(\"behavioursEnabled\");\n };\n this.setWrapBehavioursEnabled = function (enabled) {\n this.setOption(\"wrapBehavioursEnabled\", enabled);\n };\n this.getWrapBehavioursEnabled = function () {\n return this.getOption(\"wrapBehavioursEnabled\");\n };\n this.setShowFoldWidgets = function(show) {\n this.setOption(\"showFoldWidgets\", show);\n\n };\n this.getShowFoldWidgets = function() {\n return this.getOption(\"showFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function(fade) {\n this.setOption(\"fadeFoldWidgets\", fade);\n };\n\n this.getFadeFoldWidgets = function() {\n return this.getOption(\"fadeFoldWidgets\");\n };\n this.remove = function(dir) {\n if (this.selection.isEmpty()){\n if (dir == \"left\")\n this.selection.selectLeft();\n else\n this.selection.selectRight();\n }\n\n var range = this.getSelectionRange();\n if (this.getBehavioursEnabled()) {\n var session = this.session;\n var state = session.getState(range.start.row);\n var new_range = session.getMode().transformAction(state, 'deletion', this, session, range);\n\n if (range.end.column === 0) {\n var text = session.getTextRange(range);\n if (text[text.length - 1] == \"\\n\") {\n var line = session.getLine(range.end.row);\n if (/^\\s+$/.test(line)) {\n range.end.column = line.length;\n }\n }\n }\n if (new_range)\n range = new_range;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.removeWordRight = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordRight();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeWordLeft = function() {\n if (this.selection.isEmpty())\n this.selection.selectWordLeft();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineStart = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineStart();\n\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n };\n this.removeToLineEnd = function() {\n if (this.selection.isEmpty())\n this.selection.selectLineEnd();\n\n var range = this.getSelectionRange();\n if (range.start.column == range.end.column && range.start.row == range.end.row) {\n range.end.column = 0;\n range.end.row++;\n }\n\n this.session.remove(range);\n this.clearSelection();\n };\n this.splitLine = function() {\n if (!this.selection.isEmpty()) {\n this.session.remove(this.getSelectionRange());\n this.clearSelection();\n }\n\n var cursor = this.getCursorPosition();\n this.insert(\"\\n\");\n this.moveCursorToPosition(cursor);\n };\n this.transposeLetters = function() {\n if (!this.selection.isEmpty()) {\n return;\n }\n\n var cursor = this.getCursorPosition();\n var column = cursor.column;\n if (column === 0)\n return;\n\n var line = this.session.getLine(cursor.row);\n var swap, range;\n if (column < line.length) {\n swap = line.charAt(column) + line.charAt(column-1);\n range = new Range(cursor.row, column-1, cursor.row, column+1);\n }\n else {\n swap = line.charAt(column-1) + line.charAt(column-2);\n range = new Range(cursor.row, column-2, cursor.row, column);\n }\n this.session.replace(range, swap);\n this.session.selection.moveToPosition(range.end);\n };\n this.toLowerCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toLowerCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.toUpperCase = function() {\n var originalRange = this.getSelectionRange();\n if (this.selection.isEmpty()) {\n this.selection.selectWord();\n }\n\n var range = this.getSelectionRange();\n var text = this.session.getTextRange(range);\n this.session.replace(range, text.toUpperCase());\n this.selection.setSelectionRange(originalRange);\n };\n this.indent = function() {\n var session = this.session;\n var range = this.getSelectionRange();\n\n if (range.start.row < range.end.row) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n } else if (range.start.column < range.end.column) {\n var text = session.getTextRange(range);\n if (!/^\\s+$/.test(text)) {\n var rows = this.$getSelectedRows();\n session.indentRows(rows.first, rows.last, \"\\t\");\n return;\n }\n }\n \n var line = session.getLine(range.start.row);\n var position = range.start;\n var size = session.getTabSize();\n var column = session.documentToScreenColumn(position.row, position.column);\n\n if (this.session.getUseSoftTabs()) {\n var count = (size - column % size);\n var indentString = lang.stringRepeat(\" \", count);\n } else {\n var count = column % size;\n while (line[range.start.column - 1] == \" \" && count) {\n range.start.column--;\n count--;\n }\n this.selection.setSelectionRange(range);\n indentString = \"\\t\";\n }\n return this.insert(indentString);\n };\n this.blockIndent = function() {\n var rows = this.$getSelectedRows();\n this.session.indentRows(rows.first, rows.last, \"\\t\");\n };\n this.blockOutdent = function() {\n var selection = this.session.getSelection();\n this.session.outdentRows(selection.getRange());\n };\n this.sortLines = function() {\n var rows = this.$getSelectedRows();\n var session = this.session;\n\n var lines = [];\n for (var i = rows.first; i <= rows.last; i++)\n lines.push(session.getLine(i));\n\n lines.sort(function(a, b) {\n if (a.toLowerCase() < b.toLowerCase()) return -1;\n if (a.toLowerCase() > b.toLowerCase()) return 1;\n return 0;\n });\n\n var deleteRange = new Range(0, 0, 0, 0);\n for (var i = rows.first; i <= rows.last; i++) {\n var line = session.getLine(i);\n deleteRange.start.row = i;\n deleteRange.end.row = i;\n deleteRange.end.column = line.length;\n session.replace(deleteRange, lines[i-rows.first]);\n }\n };\n this.toggleCommentLines = function() {\n var state = this.session.getState(this.getCursorPosition().row);\n var rows = this.$getSelectedRows();\n this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last);\n };\n\n this.toggleBlockComment = function() {\n var cursor = this.getCursorPosition();\n var state = this.session.getState(cursor.row);\n var range = this.getSelectionRange();\n this.session.getMode().toggleBlockComment(state, this.session, range, cursor);\n };\n this.getNumberAt = function(row, column) {\n var _numberRx = /[\\-]?[0-9]+(?:\\.[0-9]+)?/g;\n _numberRx.lastIndex = 0;\n\n var s = this.session.getLine(row);\n while (_numberRx.lastIndex < column) {\n var m = _numberRx.exec(s);\n if(m.index <= column && m.index+m[0].length >= column){\n var number = {\n value: m[0],\n start: m.index,\n end: m.index+m[0].length\n };\n return number;\n }\n }\n return null;\n };\n this.modifyNumber = function(amount) {\n var row = this.selection.getCursor().row;\n var column = this.selection.getCursor().column;\n var charRange = new Range(row, column-1, row, column);\n\n var c = this.session.getTextRange(charRange);\n if (!isNaN(parseFloat(c)) && isFinite(c)) {\n var nr = this.getNumberAt(row, column);\n if (nr) {\n var fp = nr.value.indexOf(\".\") >= 0 ? nr.start + nr.value.indexOf(\".\") + 1 : nr.end;\n var decimals = nr.start + nr.value.length - fp;\n\n var t = parseFloat(nr.value);\n t *= Math.pow(10, decimals);\n\n\n if(fp !== nr.end && column < fp){\n amount *= Math.pow(10, nr.end - column - 1);\n } else {\n amount *= Math.pow(10, nr.end - column);\n }\n\n t += amount;\n t /= Math.pow(10, decimals);\n var nnr = t.toFixed(decimals);\n var replaceRange = new Range(row, nr.start, row, nr.end);\n this.session.replace(replaceRange, nnr);\n this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length));\n\n }\n }\n };\n this.removeLines = function() {\n var rows = this.$getSelectedRows();\n this.session.removeFullLines(rows.first, rows.last);\n this.clearSelection();\n };\n\n this.duplicateSelection = function() {\n var sel = this.selection;\n var doc = this.session;\n var range = sel.getRange();\n var reverse = sel.isBackwards();\n if (range.isEmpty()) {\n var row = range.start.row;\n doc.duplicateLines(row, row);\n } else {\n var point = reverse ? range.start : range.end;\n var endPoint = doc.insert(point, doc.getTextRange(range), false);\n range.start = point;\n range.end = endPoint;\n\n sel.setSelectionRange(range, reverse);\n }\n };\n this.moveLinesDown = function() {\n this.$moveLines(1, false);\n };\n this.moveLinesUp = function() {\n this.$moveLines(-1, false);\n };\n this.moveText = function(range, toPosition, copy) {\n return this.session.moveText(range, toPosition, copy);\n };\n this.copyLinesUp = function() {\n this.$moveLines(-1, true);\n };\n this.copyLinesDown = function() {\n this.$moveLines(1, true);\n };\n this.$moveLines = function(dir, copy) {\n var rows, moved;\n var selection = this.selection;\n if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {\n var range = selection.toOrientedRange();\n rows = this.$getSelectedRows(range);\n moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);\n if (copy && dir == -1) moved = 0;\n range.moveBy(moved, 0);\n selection.fromOrientedRange(range);\n } else {\n var ranges = selection.rangeList.ranges;\n selection.rangeList.detach(this.session);\n this.inVirtualSelectionMode = true;\n \n var diff = 0;\n var totalDiff = 0;\n var l = ranges.length;\n for (var i = 0; i < l; i++) {\n var rangeIndex = i;\n ranges[i].moveBy(diff, 0);\n rows = this.$getSelectedRows(ranges[i]);\n var first = rows.first;\n var last = rows.last;\n while (++i < l) {\n if (totalDiff) ranges[i].moveBy(totalDiff, 0);\n var subRows = this.$getSelectedRows(ranges[i]);\n if (copy && subRows.first != last)\n break;\n else if (!copy && subRows.first > last + 1)\n break;\n last = subRows.last;\n }\n i--;\n diff = this.session.$moveLines(first, last, copy ? 0 : dir);\n if (copy && dir == -1) rangeIndex = i + 1;\n while (rangeIndex <= i) {\n ranges[rangeIndex].moveBy(diff, 0);\n rangeIndex++;\n }\n if (!copy) diff = 0;\n totalDiff += diff;\n }\n \n selection.fromOrientedRange(selection.ranges[0]);\n selection.rangeList.attach(this.session);\n this.inVirtualSelectionMode = false;\n }\n };\n this.$getSelectedRows = function(range) {\n range = (range || this.getSelectionRange()).collapseRows();\n\n return {\n first: this.session.getRowFoldStart(range.start.row),\n last: this.session.getRowFoldEnd(range.end.row)\n };\n };\n\n this.onCompositionStart = function(text) {\n this.renderer.showComposition(this.getCursorPosition());\n };\n\n this.onCompositionUpdate = function(text) {\n this.renderer.setCompositionText(text);\n };\n\n this.onCompositionEnd = function() {\n this.renderer.hideComposition();\n };\n this.getFirstVisibleRow = function() {\n return this.renderer.getFirstVisibleRow();\n };\n this.getLastVisibleRow = function() {\n return this.renderer.getLastVisibleRow();\n };\n this.isRowVisible = function(row) {\n return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow());\n };\n this.isRowFullyVisible = function(row) {\n return (row >= this.renderer.getFirstFullyVisibleRow() && row <= this.renderer.getLastFullyVisibleRow());\n };\n this.$getVisibleRowCount = function() {\n return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1;\n };\n\n this.$moveByPage = function(dir, select) {\n var renderer = this.renderer;\n var config = this.renderer.layerConfig;\n var rows = dir * Math.floor(config.height / config.lineHeight);\n\n this.$blockScrolling++;\n if (select === true) {\n this.selection.$moveSelection(function(){\n this.moveCursorBy(rows, 0);\n });\n } else if (select === false) {\n this.selection.moveCursorBy(rows, 0);\n this.selection.clearSelection();\n }\n this.$blockScrolling--;\n\n var scrollTop = renderer.scrollTop;\n\n renderer.scrollBy(0, rows * config.lineHeight);\n if (select != null)\n renderer.scrollCursorIntoView(null, 0.5);\n\n renderer.animateScrolling(scrollTop);\n };\n this.selectPageDown = function() {\n this.$moveByPage(1, true);\n };\n this.selectPageUp = function() {\n this.$moveByPage(-1, true);\n };\n this.gotoPageDown = function() {\n this.$moveByPage(1, false);\n };\n this.gotoPageUp = function() {\n this.$moveByPage(-1, false);\n };\n this.scrollPageDown = function() {\n this.$moveByPage(1);\n };\n this.scrollPageUp = function() {\n this.$moveByPage(-1);\n };\n this.scrollToRow = function(row) {\n this.renderer.scrollToRow(row);\n };\n this.scrollToLine = function(line, center, animate, callback) {\n this.renderer.scrollToLine(line, center, animate, callback);\n };\n this.centerSelection = function() {\n var range = this.getSelectionRange();\n var pos = {\n row: Math.floor(range.start.row + (range.end.row - range.start.row) / 2),\n column: Math.floor(range.start.column + (range.end.column - range.start.column) / 2)\n };\n this.renderer.alignCursor(pos, 0.5);\n };\n this.getCursorPosition = function() {\n return this.selection.getCursor();\n };\n this.getCursorPositionScreen = function() {\n return this.session.documentToScreenPosition(this.getCursorPosition());\n };\n this.getSelectionRange = function() {\n return this.selection.getRange();\n };\n this.selectAll = function() {\n this.$blockScrolling += 1;\n this.selection.selectAll();\n this.$blockScrolling -= 1;\n };\n this.clearSelection = function() {\n this.selection.clearSelection();\n };\n this.moveCursorTo = function(row, column) {\n this.selection.moveCursorTo(row, column);\n };\n this.moveCursorToPosition = function(pos) {\n this.selection.moveCursorToPosition(pos);\n };\n this.jumpToMatching = function(select, expand) {\n var cursor = this.getCursorPosition();\n var iterator = new TokenIterator(this.session, cursor.row, cursor.column);\n var prevToken = iterator.getCurrentToken();\n var token = prevToken || iterator.stepForward();\n\n if (!token) return;\n var matchType;\n var found = false;\n var depth = {};\n var i = cursor.column - token.start;\n var bracketType;\n var brackets = {\n \")\": \"(\",\n \"(\": \"(\",\n \"]\": \"[\",\n \"[\": \"[\",\n \"{\": \"{\",\n \"}\": \"{\"\n };\n \n do {\n if (token.value.match(/[{}()\\[\\]]/g)) {\n for (; i < token.value.length && !found; i++) {\n if (!brackets[token.value[i]]) {\n continue;\n }\n\n bracketType = brackets[token.value[i]] + '.' + token.type.replace(\"rparen\", \"lparen\");\n\n if (isNaN(depth[bracketType])) {\n depth[bracketType] = 0;\n }\n\n switch (token.value[i]) {\n case '(':\n case '[':\n case '{':\n depth[bracketType]++;\n break;\n case ')':\n case ']':\n case '}':\n depth[bracketType]--;\n\n if (depth[bracketType] === -1) {\n matchType = 'bracket';\n found = true;\n }\n break;\n }\n }\n }\n else if (token && token.type.indexOf('tag-name') !== -1) {\n if (isNaN(depth[token.value])) {\n depth[token.value] = 0;\n }\n \n if (prevToken.value === '<') {\n depth[token.value]++;\n }\n else if (prevToken.value === '= 0; --i) {\n if(this.$tryReplace(ranges[i], replacement)) {\n replaced++;\n }\n }\n\n this.selection.setSelectionRange(selection);\n this.$blockScrolling -= 1;\n\n return replaced;\n };\n\n this.$tryReplace = function(range, replacement) {\n var input = this.session.getTextRange(range);\n replacement = this.$search.replace(input, replacement);\n if (replacement !== null) {\n range.end = this.session.replace(range, replacement);\n return range;\n } else {\n return null;\n }\n };\n this.getLastSearchOptions = function() {\n return this.$search.getOptions();\n };\n this.find = function(needle, options, animate) {\n if (!options)\n options = {};\n\n if (typeof needle == \"string\" || needle instanceof RegExp)\n options.needle = needle;\n else if (typeof needle == \"object\")\n oop.mixin(options, needle);\n\n var range = this.selection.getRange();\n if (options.needle == null) {\n needle = this.session.getTextRange(range)\n || this.$search.$options.needle;\n if (!needle) {\n range = this.session.getWordRange(range.start.row, range.start.column);\n needle = this.session.getTextRange(range);\n }\n this.$search.set({needle: needle});\n }\n\n this.$search.set(options);\n if (!options.start)\n this.$search.set({start: range});\n\n var newRange = this.$search.find(this.session);\n if (options.preventScroll)\n return newRange;\n if (newRange) {\n this.revealRange(newRange, animate);\n return newRange;\n }\n if (options.backwards)\n range.start = range.end;\n else\n range.end = range.start;\n this.selection.setRange(range);\n };\n this.findNext = function(options, animate) {\n this.find({skipCurrent: true, backwards: false}, options, animate);\n };\n this.findPrevious = function(options, animate) {\n this.find(options, {skipCurrent: true, backwards: true}, animate);\n };\n\n this.revealRange = function(range, animate) {\n this.$blockScrolling += 1;\n this.session.unfold(range);\n this.selection.setSelectionRange(range);\n this.$blockScrolling -= 1;\n\n var scrollTop = this.renderer.scrollTop;\n this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5);\n if (animate !== false)\n this.renderer.animateScrolling(scrollTop);\n };\n this.undo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().undo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.redo = function() {\n this.$blockScrolling++;\n this.session.getUndoManager().redo();\n this.$blockScrolling--;\n this.renderer.scrollCursorIntoView(null, 0.5);\n };\n this.destroy = function() {\n this.renderer.destroy();\n this._signal(\"destroy\", this);\n if (this.session) {\n this.session.destroy();\n }\n };\n this.setAutoScrollEditorIntoView = function(enable) {\n if (!enable)\n return;\n var rect;\n var self = this;\n var shouldScroll = false;\n if (!this.$scrollAnchor)\n this.$scrollAnchor = document.createElement(\"div\");\n var scrollAnchor = this.$scrollAnchor;\n scrollAnchor.style.cssText = \"position:absolute\";\n this.container.insertBefore(scrollAnchor, this.container.firstChild);\n var onChangeSelection = this.on(\"changeSelection\", function() {\n shouldScroll = true;\n });\n var onBeforeRender = this.renderer.on(\"beforeRender\", function() {\n if (shouldScroll)\n rect = self.renderer.container.getBoundingClientRect();\n });\n var onAfterRender = this.renderer.on(\"afterRender\", function() {\n if (shouldScroll && rect && (self.isFocused()\n || self.searchBox && self.searchBox.isFocused())\n ) {\n var renderer = self.renderer;\n var pos = renderer.$cursorLayer.$pixelPos;\n var config = renderer.layerConfig;\n var top = pos.top - config.offset;\n if (pos.top >= 0 && top + rect.top < 0) {\n shouldScroll = true;\n } else if (pos.top < config.height &&\n pos.top + rect.top + config.lineHeight > window.innerHeight) {\n shouldScroll = false;\n } else {\n shouldScroll = null;\n }\n if (shouldScroll != null) {\n scrollAnchor.style.top = top + \"px\";\n scrollAnchor.style.left = pos.left + \"px\";\n scrollAnchor.style.height = config.lineHeight + \"px\";\n scrollAnchor.scrollIntoView(shouldScroll);\n }\n shouldScroll = rect = null;\n }\n });\n this.setAutoScrollEditorIntoView = function(enable) {\n if (enable)\n return;\n delete this.setAutoScrollEditorIntoView;\n this.off(\"changeSelection\", onChangeSelection);\n this.renderer.off(\"afterRender\", onAfterRender);\n this.renderer.off(\"beforeRender\", onBeforeRender);\n };\n };\n\n\n this.$resetCursorStyle = function() {\n var style = this.$cursorStyle || \"ace\";\n var cursorLayer = this.renderer.$cursorLayer;\n if (!cursorLayer)\n return;\n cursorLayer.setSmoothBlinking(/smooth/.test(style));\n cursorLayer.isBlinking = !this.$readOnly && style != \"wide\";\n dom.setCssClass(cursorLayer.element, \"ace_slim-cursors\", /slim/.test(style));\n };\n\n}).call(Editor.prototype);\n\n\n\nconfig.defineOptions(Editor.prototype, \"editor\", {\n selectionStyle: {\n set: function(style) {\n this.onSelectionChange();\n this._signal(\"changeSelectionStyle\", {data: style});\n },\n initialValue: \"line\"\n },\n highlightActiveLine: {\n set: function() {this.$updateHighlightActiveLine();},\n initialValue: true\n },\n highlightSelectedWord: {\n set: function(shouldHighlight) {this.$onSelectionChange();},\n initialValue: true\n },\n readOnly: {\n set: function(readOnly) {\n this.$resetCursorStyle(); \n },\n initialValue: false\n },\n cursorStyle: {\n set: function(val) { this.$resetCursorStyle(); },\n values: [\"ace\", \"slim\", \"smooth\", \"wide\"],\n initialValue: \"ace\"\n },\n mergeUndoDeltas: {\n values: [false, true, \"always\"],\n initialValue: true\n },\n behavioursEnabled: {initialValue: true},\n wrapBehavioursEnabled: {initialValue: true},\n autoScrollEditorIntoView: {\n set: function(val) {this.setAutoScrollEditorIntoView(val);}\n },\n keyboardHandler: {\n set: function(val) { this.setKeyboardHandler(val); },\n get: function() { return this.keybindingId; },\n handlesSet: true\n },\n\n hScrollBarAlwaysVisible: \"renderer\",\n vScrollBarAlwaysVisible: \"renderer\",\n highlightGutterLine: \"renderer\",\n animatedScroll: \"renderer\",\n showInvisibles: \"renderer\",\n showPrintMargin: \"renderer\",\n printMarginColumn: \"renderer\",\n printMargin: \"renderer\",\n fadeFoldWidgets: \"renderer\",\n showFoldWidgets: \"renderer\",\n showLineNumbers: \"renderer\",\n showGutter: \"renderer\",\n displayIndentGuides: \"renderer\",\n fontSize: \"renderer\",\n fontFamily: \"renderer\",\n maxLines: \"renderer\",\n minLines: \"renderer\",\n scrollPastEnd: \"renderer\",\n fixedWidthGutter: \"renderer\",\n theme: \"renderer\",\n\n scrollSpeed: \"$mouseHandler\",\n dragDelay: \"$mouseHandler\",\n dragEnabled: \"$mouseHandler\",\n focusTimout: \"$mouseHandler\",\n tooltipFollowsMouse: \"$mouseHandler\",\n\n firstLineNumber: \"session\",\n overwrite: \"session\",\n newLineMode: \"session\",\n useWorker: \"session\",\n useSoftTabs: \"session\",\n tabSize: \"session\",\n wrap: \"session\",\n indentedSoftWrap: \"session\",\n foldStyle: \"session\",\n mode: \"session\"\n});\n\nexports.Editor = Editor;\n});\n\nace.define(\"ace/undomanager\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\nvar UndoManager = function() {\n this.reset();\n};\n\n(function() {\n this.execute = function(options) {\n var deltaSets = options.args[0];\n this.$doc = options.args[1];\n if (options.merge && this.hasUndo()){\n this.dirtyCounter--;\n deltaSets = this.$undoStack.pop().concat(deltaSets);\n }\n this.$undoStack.push(deltaSets);\n this.$redoStack = [];\n if (this.dirtyCounter < 0) {\n this.dirtyCounter = NaN;\n }\n this.dirtyCounter++;\n };\n this.undo = function(dontSelect) {\n var deltaSets = this.$undoStack.pop();\n var undoSelectionRange = null;\n if (deltaSets) {\n undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect);\n this.$redoStack.push(deltaSets);\n this.dirtyCounter--;\n }\n\n return undoSelectionRange;\n };\n this.redo = function(dontSelect) {\n var deltaSets = this.$redoStack.pop();\n var redoSelectionRange = null;\n if (deltaSets) {\n redoSelectionRange =\n this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect);\n this.$undoStack.push(deltaSets);\n this.dirtyCounter++;\n }\n return redoSelectionRange;\n };\n this.reset = function() {\n this.$undoStack = [];\n this.$redoStack = [];\n this.dirtyCounter = 0;\n };\n this.hasUndo = function() {\n return this.$undoStack.length > 0;\n };\n this.hasRedo = function() {\n return this.$redoStack.length > 0;\n };\n this.markClean = function() {\n this.dirtyCounter = 0;\n };\n this.isClean = function() {\n return this.dirtyCounter === 0;\n };\n this.$serializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $serializeDelta);\n };\n this.$deserializeDeltas = function(deltaSets) {\n return cloneDeltaSetsObj(deltaSets, $deserializeDelta);\n };\n \n function $serializeDelta(delta){\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines.length == 1 ? null : delta.lines,\n text: delta.lines.length == 1 ? delta.lines[0] : null\n };\n }\n \n function $deserializeDelta(delta) {\n return {\n action: delta.action,\n start: delta.start,\n end: delta.end,\n lines: delta.lines || [delta.text]\n };\n }\n \n function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) {\n var deltaSets_new = new Array(deltaSets_old.length);\n for (var i = 0; i < deltaSets_old.length; i++) {\n var deltaSet_old = deltaSets_old[i];\n var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)};\n \n for (var j = 0; j < deltaSet_old.deltas.length; j++) {\n var delta_old = deltaSet_old.deltas[j];\n deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old);\n }\n \n deltaSets_new[i] = deltaSet_new;\n }\n return deltaSets_new;\n }\n \n}).call(UndoManager.prototype);\n\nexports.UndoManager = UndoManager;\n});\n\nace.define(\"ace/layer/gutter\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Gutter = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_gutter-layer\";\n parentEl.appendChild(this.element);\n this.setShowFoldWidgets(this.$showFoldWidgets);\n \n this.gutterWidth = 0;\n\n this.$annotations = [];\n this.$updateAnnotations = this.$updateAnnotations.bind(this);\n\n this.$cells = [];\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.setSession = function(session) {\n if (this.session)\n this.session.removeEventListener(\"change\", this.$updateAnnotations);\n this.session = session;\n if (session)\n session.on(\"change\", this.$updateAnnotations);\n };\n\n this.addGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.addGutterDecoration\");\n this.session.addGutterDecoration(row, className);\n };\n\n this.removeGutterDecoration = function(row, className){\n if (window.console)\n console.warn && console.warn(\"deprecated use session.removeGutterDecoration\");\n this.session.removeGutterDecoration(row, className);\n };\n\n this.setAnnotations = function(annotations) {\n this.$annotations = [];\n for (var i = 0; i < annotations.length; i++) {\n var annotation = annotations[i];\n var row = annotation.row;\n var rowInfo = this.$annotations[row];\n if (!rowInfo)\n rowInfo = this.$annotations[row] = {text: []};\n \n var annoText = annotation.text;\n annoText = annoText ? lang.escapeHTML(annoText) : annotation.html || \"\";\n\n if (rowInfo.text.indexOf(annoText) === -1)\n rowInfo.text.push(annoText);\n\n var type = annotation.type;\n if (type == \"error\")\n rowInfo.className = \" ace_error\";\n else if (type == \"warning\" && rowInfo.className != \" ace_error\")\n rowInfo.className = \" ace_warning\";\n else if (type == \"info\" && (!rowInfo.className))\n rowInfo.className = \" ace_info\";\n }\n };\n\n this.$updateAnnotations = function (delta) {\n if (!this.$annotations.length)\n return;\n var firstRow = delta.start.row;\n var len = delta.end.row - firstRow;\n if (len === 0) {\n } else if (delta.action == 'remove') {\n this.$annotations.splice(firstRow, len + 1, null);\n } else {\n var args = new Array(len + 1);\n args.unshift(firstRow, 1);\n this.$annotations.splice.apply(this.$annotations, args);\n }\n };\n\n this.update = function(config) {\n var session = this.session;\n var firstRow = config.firstRow;\n var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar\n session.getLength() - 1);\n var fold = session.getNextFoldLine(firstRow);\n var foldStart = fold ? fold.start.row : Infinity;\n var foldWidgets = this.$showFoldWidgets && session.foldWidgets;\n var breakpoints = session.$breakpoints;\n var decorations = session.$decorations;\n var firstLineNumber = session.$firstLineNumber;\n var lastLineNumber = 0;\n \n var gutterRenderer = session.gutterRenderer || this.$renderer;\n\n var cell = null;\n var index = -1;\n var row = firstRow;\n while (true) {\n if (row > foldStart) {\n row = fold.end.row + 1;\n fold = session.getNextFoldLine(row, fold);\n foldStart = fold ? fold.start.row : Infinity;\n }\n if (row > lastRow) {\n while (this.$cells.length > index + 1) {\n cell = this.$cells.pop();\n this.element.removeChild(cell.element);\n }\n break;\n }\n\n cell = this.$cells[++index];\n if (!cell) {\n cell = {element: null, textNode: null, foldWidget: null};\n cell.element = dom.createElement(\"div\");\n cell.textNode = document.createTextNode('');\n cell.element.appendChild(cell.textNode);\n this.element.appendChild(cell.element);\n this.$cells[index] = cell;\n }\n\n var className = \"ace_gutter-cell \";\n if (breakpoints[row])\n className += breakpoints[row];\n if (decorations[row])\n className += decorations[row];\n if (this.$annotations[row])\n className += this.$annotations[row].className;\n if (cell.element.className != className)\n cell.element.className = className;\n\n var height = session.getRowLength(row) * config.lineHeight + \"px\";\n if (height != cell.element.style.height)\n cell.element.style.height = height;\n\n if (foldWidgets) {\n var c = foldWidgets[row];\n if (c == null)\n c = foldWidgets[row] = session.getFoldWidget(row);\n }\n\n if (c) {\n if (!cell.foldWidget) {\n cell.foldWidget = dom.createElement(\"span\");\n cell.element.appendChild(cell.foldWidget);\n }\n var className = \"ace_fold-widget ace_\" + c;\n if (c == \"start\" && row == foldStart && row < fold.end.row)\n className += \" ace_closed\";\n else\n className += \" ace_open\";\n if (cell.foldWidget.className != className)\n cell.foldWidget.className = className;\n\n var height = config.lineHeight + \"px\";\n if (cell.foldWidget.style.height != height)\n cell.foldWidget.style.height = height;\n } else {\n if (cell.foldWidget) {\n cell.element.removeChild(cell.foldWidget);\n cell.foldWidget = null;\n }\n }\n \n var text = lastLineNumber = gutterRenderer\n ? gutterRenderer.getText(session, row)\n : row + firstLineNumber;\n if (text !== cell.textNode.data)\n cell.textNode.data = text;\n\n row++;\n }\n\n this.element.style.height = config.minHeight + \"px\";\n\n if (this.$fixedWidth || session.$useWrapMode)\n lastLineNumber = session.getLength() + firstLineNumber;\n\n var gutterWidth = gutterRenderer \n ? gutterRenderer.getWidth(session, lastLineNumber, config)\n : lastLineNumber.toString().length * config.characterWidth;\n \n var padding = this.$padding || this.$computePadding();\n gutterWidth += padding.left + padding.right;\n if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {\n this.gutterWidth = gutterWidth;\n this.element.style.width = Math.ceil(this.gutterWidth) + \"px\";\n this._emit(\"changeGutterWidth\", gutterWidth);\n }\n };\n\n this.$fixedWidth = false;\n \n this.$showLineNumbers = true;\n this.$renderer = \"\";\n this.setShowLineNumbers = function(show) {\n this.$renderer = !show && {\n getWidth: function() {return \"\";},\n getText: function() {return \"\";}\n };\n };\n \n this.getShowLineNumbers = function() {\n return this.$showLineNumbers;\n };\n \n this.$showFoldWidgets = true;\n this.setShowFoldWidgets = function(show) {\n if (show)\n dom.addCssClass(this.element, \"ace_folding-enabled\");\n else\n dom.removeCssClass(this.element, \"ace_folding-enabled\");\n\n this.$showFoldWidgets = show;\n this.$padding = null;\n };\n \n this.getShowFoldWidgets = function() {\n return this.$showFoldWidgets;\n };\n\n this.$computePadding = function() {\n if (!this.element.firstChild)\n return {left: 0, right: 0};\n var style = dom.computedStyle(this.element.firstChild);\n this.$padding = {};\n this.$padding.left = parseInt(style.paddingLeft) + 1 || 0;\n this.$padding.right = parseInt(style.paddingRight) || 0;\n return this.$padding;\n };\n\n this.getRegion = function(point) {\n var padding = this.$padding || this.$computePadding();\n var rect = this.element.getBoundingClientRect();\n if (point.x < padding.left + rect.left)\n return \"markers\";\n if (this.$showFoldWidgets && point.x > rect.right - padding.right)\n return \"foldWidgets\";\n };\n\n}).call(Gutter.prototype);\n\nexports.Gutter = Gutter;\n\n});\n\nace.define(\"ace/layer/marker\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\nvar dom = acequire(\"../lib/dom\");\n\nvar Marker = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_marker-layer\";\n parentEl.appendChild(this.element);\n};\n\n(function() {\n\n this.$padding = 0;\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n this.setSession = function(session) {\n this.session = session;\n };\n \n this.setMarkers = function(markers) {\n this.markers = markers;\n };\n\n this.update = function(config) {\n if (!config) return;\n\n this.config = config;\n\n\n var html = [];\n for (var key in this.markers) {\n var marker = this.markers[key];\n\n if (!marker.range) {\n marker.update(html, this, this.session, config);\n continue;\n }\n\n var range = marker.range.clipRows(config.firstRow, config.lastRow);\n if (range.isEmpty()) continue;\n\n range = range.toScreenRange(this.session);\n if (marker.renderer) {\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + (this.session.$bidiHandler.isBidiRow(range.start.row)\n ? this.session.$bidiHandler.getPosLeft(range.start.column)\n : range.start.column * config.characterWidth);\n marker.renderer(html, range, left, top, config);\n } else if (marker.type == \"fullLine\") {\n this.drawFullLineMarker(html, range, marker.clazz, config);\n } else if (marker.type == \"screenLine\") {\n this.drawScreenLineMarker(html, range, marker.clazz, config);\n } else if (range.isMultiLine()) {\n if (marker.type == \"text\")\n this.drawTextMarker(html, range, marker.clazz, config);\n else\n this.drawMultiLineMarker(html, range, marker.clazz, config);\n } else {\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n this.drawBidiSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n } else {\n this.drawSingleLineMarker(html, range, marker.clazz + \" ace_start\" + \" ace_br15\", config);\n }\n }\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$getTop = function(row, layerConfig) {\n return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;\n };\n\n function getBorderClass(tl, tr, br, bl) {\n return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);\n }\n this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {\n var session = this.session;\n var start = range.start.row;\n var end = range.end.row;\n var row = start;\n var prev = 0; \n var curr = 0;\n var next = session.getScreenLastRowColumn(row);\n var clazzModified = null;\n var lineRange = new Range(row, range.start.column, row, curr);\n for (; row <= end; row++) {\n lineRange.start.row = lineRange.end.row = row;\n lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);\n lineRange.end.column = next;\n prev = curr;\n curr = next;\n next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;\n clazzModified = clazz + (row == start ? \" ace_start\" : \"\") + \" ace_br\"\n + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end);\n\n if (this.session.$bidiHandler.isBidiRow(row)) {\n this.drawBidiSingleLineMarker(stringBuilder, lineRange, clazzModified,\n layerConfig, row == end ? 0 : 1, extraStyle);\n } else {\n this.drawSingleLineMarker(stringBuilder, lineRange, clazzModified,\n layerConfig, row == end ? 0 : 1, extraStyle);\n }\n }\n };\n this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var padding = this.$padding;\n var height, top, left;\n extraStyle = extraStyle || \"\";\n if (this.session.$bidiHandler.isBidiRow(range.start.row)) {\n var range1 = range.clone();\n range1.end.row = range1.start.row;\n range1.end.column = this.session.getLine(range1.start.row).length;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br1 ace_start\", config, null, extraStyle);\n } else {\n height = config.lineHeight;\n top = this.$getTop(range.start.row, config);\n left = padding + range.start.column * config.characterWidth;\n stringBuilder.push(\n \"
    \"\n );\n }\n if (this.session.$bidiHandler.isBidiRow(range.end.row)) {\n var range1 = range.clone();\n range1.start.row = range1.end.row;\n range1.start.column = 0;\n this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + \" ace_br12\", config, null, extraStyle);\n } else {\n var width = range.end.column * config.characterWidth;\n height = config.lineHeight;\n top = this.$getTop(range.end.row, config);\n stringBuilder.push(\n \"
    \"\n );\n }\n height = (range.end.row - range.start.row - 1) * config.lineHeight;\n if (height <= 0)\n return;\n top = this.$getTop(range.start.row + 1, config);\n \n var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);\n\n stringBuilder.push(\n \"
    \"\n );\n };\n this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight;\n var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth;\n\n var top = this.$getTop(range.start.row, config);\n var left = this.$padding + range.start.column * config.characterWidth;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n this.drawBidiSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {\n var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding;\n var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column);\n\n selections.forEach(function(selection) {\n stringBuilder.push(\n \"
    \"\n );\n });\n };\n\n this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n if (range.start.row != range.end.row)\n height += this.$getTop(range.end.row, config) - top;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n \n this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {\n var top = this.$getTop(range.start.row, config);\n var height = config.lineHeight;\n\n stringBuilder.push(\n \"
    \"\n );\n };\n\n}).call(Marker.prototype);\n\nexports.Marker = Marker;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar Text = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_text-layer\";\n parentEl.appendChild(this.element);\n this.$updateEolChar = this.$updateEolChar.bind(this);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n\n this.EOF_CHAR = \"\\xB6\";\n this.EOL_CHAR_LF = \"\\xAC\";\n this.EOL_CHAR_CRLF = \"\\xa4\";\n this.EOL_CHAR = this.EOL_CHAR_LF;\n this.TAB_CHAR = \"\\u2014\"; //\"\\u21E5\";\n this.SPACE_CHAR = \"\\xB7\";\n this.$padding = 0;\n\n this.$updateEolChar = function() {\n var EOL_CHAR = this.session.doc.getNewLineCharacter() == \"\\n\"\n ? this.EOL_CHAR_LF\n : this.EOL_CHAR_CRLF;\n if (this.EOL_CHAR != EOL_CHAR) {\n this.EOL_CHAR = EOL_CHAR;\n return true;\n }\n };\n\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.element.style.padding = \"0 \" + padding + \"px\";\n };\n\n this.getLineHeight = function() {\n return this.$fontMetrics.$characterSize.height || 0;\n };\n\n this.getCharacterWidth = function() {\n return this.$fontMetrics.$characterSize.width || 0;\n };\n \n this.$setFontMetrics = function(measure) {\n this.$fontMetrics = measure;\n this.$fontMetrics.on(\"changeCharacterSize\", function(e) {\n this._signal(\"changeCharacterSize\", e);\n }.bind(this));\n this.$pollSizeChanges();\n };\n\n this.checkForSizeChanges = function() {\n this.$fontMetrics.checkForSizeChanges();\n };\n this.$pollSizeChanges = function() {\n return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();\n };\n this.setSession = function(session) {\n this.session = session;\n if (session)\n this.$computeTabString();\n };\n\n this.showInvisibles = false;\n this.setShowInvisibles = function(showInvisibles) {\n if (this.showInvisibles == showInvisibles)\n return false;\n\n this.showInvisibles = showInvisibles;\n this.$computeTabString();\n return true;\n };\n\n this.displayIndentGuides = true;\n this.setDisplayIndentGuides = function(display) {\n if (this.displayIndentGuides == display)\n return false;\n\n this.displayIndentGuides = display;\n this.$computeTabString();\n return true;\n };\n\n this.$tabStrings = [];\n this.onChangeTabSize =\n this.$computeTabString = function() {\n var tabSize = this.session.getTabSize();\n this.tabSize = tabSize;\n var tabStr = this.$tabStrings = [0];\n for (var i = 1; i < tabSize + 1; i++) {\n if (this.showInvisibles) {\n tabStr.push(\"\"\n + lang.stringRepeat(this.TAB_CHAR, i)\n + \"\");\n } else {\n tabStr.push(lang.stringRepeat(\" \", i));\n }\n }\n if (this.displayIndentGuides) {\n this.$indentGuideRe = /\\s\\S| \\t|\\t |\\s$/;\n var className = \"ace_indent-guide\";\n var spaceClass = \"\";\n var tabClass = \"\";\n if (this.showInvisibles) {\n className += \" ace_invisible\";\n spaceClass = \" ace_invisible_space\";\n tabClass = \" ace_invisible_tab\";\n var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);\n var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize);\n } else{\n var spaceContent = lang.stringRepeat(\" \", this.tabSize);\n var tabContent = spaceContent;\n }\n\n this.$tabStrings[\" \"] = \"\" + spaceContent + \"\";\n this.$tabStrings[\"\\t\"] = \"\" + tabContent + \"\";\n }\n };\n\n this.updateLines = function(config, firstRow, lastRow) {\n if (this.config.lastRow != config.lastRow ||\n this.config.firstRow != config.firstRow) {\n this.scrollLines(config);\n }\n this.config = config;\n\n var first = Math.max(firstRow, config.firstRow);\n var last = Math.min(lastRow, config.lastRow);\n\n var lineElements = this.element.childNodes;\n var lineElementsIdx = 0;\n\n for (var row = config.firstRow; row < first; row++) {\n var foldLine = this.session.getFoldLine(row);\n if (foldLine) {\n if (foldLine.containsRow(first)) {\n first = foldLine.start.row;\n break;\n } else {\n row = foldLine.end.row;\n }\n }\n lineElementsIdx ++;\n }\n\n var row = first;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > last)\n break;\n\n var lineElement = lineElements[lineElementsIdx++];\n if (lineElement) {\n var html = [];\n this.$renderLine(\n html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false\n );\n lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n lineElement.innerHTML = html.join(\"\");\n }\n row++;\n }\n };\n\n this.scrollLines = function(config) {\n var oldConfig = this.config;\n this.config = config;\n\n if (!oldConfig || oldConfig.lastRow < config.firstRow)\n return this.update(config);\n\n if (config.lastRow < oldConfig.firstRow)\n return this.update(config);\n\n var el = this.element;\n if (oldConfig.firstRow < config.firstRow)\n for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--)\n el.removeChild(el.firstChild);\n\n if (oldConfig.lastRow > config.lastRow)\n for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--)\n el.removeChild(el.lastChild);\n\n if (config.firstRow < oldConfig.firstRow) {\n var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1);\n if (el.firstChild)\n el.insertBefore(fragment, el.firstChild);\n else\n el.appendChild(fragment);\n }\n\n if (config.lastRow > oldConfig.lastRow) {\n var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow);\n el.appendChild(fragment);\n }\n };\n\n this.$renderLinesFragment = function(config, firstRow, lastRow) {\n var fragment = this.element.ownerDocument.createDocumentFragment();\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row : Infinity;\n }\n if (row > lastRow)\n break;\n\n var container = dom.createElement(\"div\");\n\n var html = [];\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n container.innerHTML = html.join(\"\");\n if (this.$useLineGroups()) {\n container.className = 'ace_line_group';\n fragment.appendChild(container);\n container.style.height = config.lineHeight * this.session.getRowLength(row) + \"px\";\n\n } else {\n while(container.firstChild)\n fragment.appendChild(container.firstChild);\n }\n\n row++;\n }\n return fragment;\n };\n\n this.update = function(config) {\n this.config = config;\n\n var html = [];\n var firstRow = config.firstRow, lastRow = config.lastRow;\n\n var row = firstRow;\n var foldLine = this.session.getNextFoldLine(row);\n var foldStart = foldLine ? foldLine.start.row : Infinity;\n\n while (true) {\n if (row > foldStart) {\n row = foldLine.end.row+1;\n foldLine = this.session.getNextFoldLine(row, foldLine);\n foldStart = foldLine ? foldLine.start.row :Infinity;\n }\n if (row > lastRow)\n break;\n\n if (this.$useLineGroups())\n html.push(\"
    \");\n\n this.$renderLine(html, row, false, row == foldStart ? foldLine : false);\n\n if (this.$useLineGroups())\n html.push(\"
    \"); // end the line group\n\n row++;\n }\n this.element.innerHTML = html.join(\"\");\n };\n\n this.$textToken = {\n \"text\": true,\n \"rparen\": true,\n \"lparen\": true\n };\n\n this.$renderToken = function(stringBuilder, screenColumn, token, value) {\n var self = this;\n var replaceReg = /\\t|&|<|>|( +)|([\\x00-\\x1f\\x80-\\xa0\\xad\\u1680\\u180E\\u2000-\\u200f\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\\uFFF9-\\uFFFC])|[\\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]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n var replaceFunc = function(c, a, b, tabIdx, idx4) {\n if (a) {\n return self.showInvisibles\n ? \"\" + lang.stringRepeat(self.SPACE_CHAR, c.length) + \"\"\n : c;\n } else if (c == \"&\") {\n return \"&\";\n } else if (c == \"<\") {\n return \"<\";\n } else if (c == \">\") {\n return \">\";\n } else if (c == \"\\t\") {\n var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx);\n screenColumn += tabSize - 1;\n return self.$tabStrings[tabSize];\n } else if (c == \"\\u3000\") {\n var classToUse = self.showInvisibles ? \"ace_cjk ace_invisible ace_invisible_space\" : \"ace_cjk\";\n var space = self.showInvisibles ? self.SPACE_CHAR : \"\";\n screenColumn += 1;\n return \"\" + space + \"\";\n } else if (b) {\n return \"\" + self.SPACE_CHAR + \"\";\n } else {\n screenColumn += 1;\n return \"\" + c + \"\";\n }\n };\n\n var output = value.replace(replaceReg, replaceFunc);\n\n if (!this.$textToken[token.type]) {\n var classes = \"ace_\" + token.type.replace(/\\./g, \" ace_\");\n var style = \"\";\n if (token.type == \"fold\")\n style = \" style='width:\" + (token.value.length * this.config.characterWidth) + \"px;' \";\n stringBuilder.push(\"\", output, \"\");\n }\n else {\n stringBuilder.push(output);\n }\n return screenColumn + value.length;\n };\n\n this.renderIndentGuide = function(stringBuilder, value, max) {\n var cols = value.search(this.$indentGuideRe);\n if (cols <= 0 || cols >= max)\n return value;\n if (value[0] == \" \") {\n cols -= cols % this.tabSize;\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\" \"], cols/this.tabSize));\n return value.substr(cols);\n } else if (value[0] == \"\\t\") {\n stringBuilder.push(lang.stringRepeat(this.$tabStrings[\"\\t\"], cols));\n return value.substr(cols);\n }\n return value;\n };\n\n this.$renderWrappedLine = function(stringBuilder, tokens, splits, onlyContents) {\n var chars = 0;\n var split = 0;\n var splitChars = splits[0];\n var screenColumn = 0;\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n var value = token.value;\n if (i == 0 && this.displayIndentGuides) {\n chars = value.length;\n value = this.renderIndentGuide(stringBuilder, value, splitChars);\n if (!value)\n continue;\n chars -= value.length;\n }\n\n if (chars + value.length < splitChars) {\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n chars += value.length;\n } else {\n while (chars + value.length >= splitChars) {\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn,\n token, value.substring(0, splitChars - chars)\n );\n value = value.substring(splitChars - chars);\n chars = splitChars;\n\n if (!onlyContents) {\n stringBuilder.push(\"
    \",\n \"
    \"\n );\n }\n\n stringBuilder.push(lang.stringRepeat(\"\\xa0\", splits.indent));\n\n split ++;\n screenColumn = 0;\n splitChars = splits[split] || Number.MAX_VALUE;\n }\n if (value.length != 0) {\n chars += value.length;\n screenColumn = this.$renderToken(\n stringBuilder, screenColumn, token, value\n );\n }\n }\n }\n };\n\n this.$renderSimpleLine = function(stringBuilder, tokens) {\n var screenColumn = 0;\n var token = tokens[0];\n var value = token.value;\n if (this.displayIndentGuides)\n value = this.renderIndentGuide(stringBuilder, value);\n if (value)\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n for (var i = 1; i < tokens.length; i++) {\n token = tokens[i];\n value = token.value;\n screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value);\n }\n };\n this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) {\n if (!foldLine && foldLine != false)\n foldLine = this.session.getFoldLine(row);\n\n if (foldLine)\n var tokens = this.$getFoldLineTokens(row, foldLine);\n else\n var tokens = this.session.getTokens(row);\n\n\n if (!onlyContents) {\n stringBuilder.push(\n \"
    \"\n );\n }\n\n if (tokens.length) {\n var splits = this.session.getRowSplitData(row);\n if (splits && splits.length)\n this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents);\n else\n this.$renderSimpleLine(stringBuilder, tokens);\n }\n\n if (this.showInvisibles) {\n if (foldLine)\n row = foldLine.end.row;\n\n stringBuilder.push(\n \"\",\n row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR,\n \"\"\n );\n }\n if (!onlyContents)\n stringBuilder.push(\"
    \");\n };\n\n this.$getFoldLineTokens = function(row, foldLine) {\n var session = this.session;\n var renderTokens = [];\n\n function addTokens(tokens, from, to) {\n var idx = 0, col = 0;\n while ((col + tokens[idx].value.length) < from) {\n col += tokens[idx].value.length;\n idx++;\n\n if (idx == tokens.length)\n return;\n }\n if (col != from) {\n var value = tokens[idx].value.substring(from - col);\n if (value.length > (to - from))\n value = value.substring(0, to - from);\n\n renderTokens.push({\n type: tokens[idx].type,\n value: value\n });\n\n col = from + value.length;\n idx += 1;\n }\n\n while (col < to && idx < tokens.length) {\n var value = tokens[idx].value;\n if (value.length + col > to) {\n renderTokens.push({\n type: tokens[idx].type,\n value: value.substring(0, to - col)\n });\n } else\n renderTokens.push(tokens[idx]);\n col += value.length;\n idx += 1;\n }\n }\n\n var tokens = session.getTokens(row);\n foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) {\n if (placeholder != null) {\n renderTokens.push({\n type: \"fold\",\n value: placeholder\n });\n } else {\n if (isNewRow)\n tokens = session.getTokens(row);\n\n if (tokens.length)\n addTokens(tokens, lastColumn, column);\n }\n }, foldLine.end.row, this.session.getLine(foldLine.end.row).length);\n\n return renderTokens;\n };\n\n this.$useLineGroups = function() {\n return this.session.getUseWrapMode();\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.$measureNode)\n this.$measureNode.parentNode.removeChild(this.$measureNode);\n delete this.$measureNode;\n };\n\n}).call(Text.prototype);\n\nexports.Text = Text;\n\n});\n\nace.define(\"ace/layer/cursor\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar dom = acequire(\"../lib/dom\");\nvar isIE8;\n\nvar Cursor = function(parentEl) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_layer ace_cursor-layer\";\n parentEl.appendChild(this.element);\n \n if (isIE8 === undefined)\n isIE8 = !(\"opacity\" in this.element.style);\n\n this.isVisible = false;\n this.isBlinking = true;\n this.blinkInterval = 1000;\n this.smoothBlinking = false;\n\n this.cursors = [];\n this.cursor = this.addCursor();\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.$updateCursors = (isIE8\n ? this.$updateVisibility\n : this.$updateOpacity).bind(this);\n};\n\n(function() {\n \n this.$updateVisibility = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.visibility = val ? \"\" : \"hidden\";\n };\n this.$updateOpacity = function(val) {\n var cursors = this.cursors;\n for (var i = cursors.length; i--; )\n cursors[i].style.opacity = val ? \"\" : \"0\";\n };\n \n\n this.$padding = 0;\n this.setPadding = function(padding) {\n this.$padding = padding;\n };\n\n this.setSession = function(session) {\n this.session = session;\n };\n\n this.setBlinking = function(blinking) {\n if (blinking != this.isBlinking){\n this.isBlinking = blinking;\n this.restartTimer();\n }\n };\n\n this.setBlinkInterval = function(blinkInterval) {\n if (blinkInterval != this.blinkInterval){\n this.blinkInterval = blinkInterval;\n this.restartTimer();\n }\n };\n\n this.setSmoothBlinking = function(smoothBlinking) {\n if (smoothBlinking != this.smoothBlinking && !isIE8) {\n this.smoothBlinking = smoothBlinking;\n dom.setCssClass(this.element, \"ace_smooth-blinking\", smoothBlinking);\n this.$updateCursors(true);\n this.$updateCursors = (this.$updateOpacity).bind(this);\n this.restartTimer();\n }\n };\n\n this.addCursor = function() {\n var el = dom.createElement(\"div\");\n el.className = \"ace_cursor\";\n this.element.appendChild(el);\n this.cursors.push(el);\n return el;\n };\n\n this.removeCursor = function() {\n if (this.cursors.length > 1) {\n var el = this.cursors.pop();\n el.parentNode.removeChild(el);\n return el;\n }\n };\n\n this.hideCursor = function() {\n this.isVisible = false;\n dom.addCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.showCursor = function() {\n this.isVisible = true;\n dom.removeCssClass(this.element, \"ace_hidden-cursors\");\n this.restartTimer();\n };\n\n this.restartTimer = function() {\n var update = this.$updateCursors;\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n if (this.smoothBlinking) {\n dom.removeCssClass(this.element, \"ace_smooth-blinking\");\n }\n \n update(true);\n\n if (!this.isBlinking || !this.blinkInterval || !this.isVisible)\n return;\n\n if (this.smoothBlinking) {\n setTimeout(function(){\n dom.addCssClass(this.element, \"ace_smooth-blinking\");\n }.bind(this));\n }\n \n var blink = function(){\n this.timeoutId = setTimeout(function() {\n update(false);\n }, 0.6 * this.blinkInterval);\n }.bind(this);\n\n this.intervalId = setInterval(function() {\n update(true);\n blink();\n }, this.blinkInterval);\n\n blink();\n };\n\n this.getPixelPosition = function(position, onScreen) {\n if (!this.config || !this.session)\n return {left : 0, top : 0};\n\n if (!position)\n position = this.session.selection.getCursor();\n var pos = this.session.documentToScreenPosition(position);\n var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : pos.column * this.config.characterWidth);\n\n var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) *\n this.config.lineHeight;\n\n return {left : cursorLeft, top : cursorTop};\n };\n\n this.update = function(config) {\n this.config = config;\n\n var selections = this.session.$selectionMarkers;\n var i = 0, cursorIndex = 0;\n\n if (selections === undefined || selections.length === 0){\n selections = [{cursor: null}];\n }\n\n for (var i = 0, n = selections.length; i < n; i++) {\n var pixelPos = this.getPixelPosition(selections[i].cursor, true);\n if ((pixelPos.top > config.height + config.offset ||\n pixelPos.top < 0) && i > 1) {\n continue;\n }\n\n var style = (this.cursors[cursorIndex++] || this.addCursor()).style;\n \n if (!this.drawCursor) {\n style.left = pixelPos.left + \"px\";\n style.top = pixelPos.top + \"px\";\n style.width = config.characterWidth + \"px\";\n style.height = config.lineHeight + \"px\";\n } else {\n this.drawCursor(style, pixelPos, config, selections[i], this.session);\n }\n }\n while (this.cursors.length > cursorIndex)\n this.removeCursor();\n\n var overwrite = this.session.getOverwrite();\n this.$setOverwrite(overwrite);\n this.$pixelPos = pixelPos;\n this.restartTimer();\n };\n \n this.drawCursor = null;\n\n this.$setOverwrite = function(overwrite) {\n if (overwrite != this.overwrite) {\n this.overwrite = overwrite;\n if (overwrite)\n dom.addCssClass(this.element, \"ace_overwrite-cursors\");\n else\n dom.removeCssClass(this.element, \"ace_overwrite-cursors\");\n }\n };\n\n this.destroy = function() {\n clearInterval(this.intervalId);\n clearTimeout(this.timeoutId);\n };\n\n}).call(Cursor.prototype);\n\nexports.Cursor = Cursor;\n\n});\n\nace.define(\"ace/scrollbar\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/event\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar MAX_SCROLL_H = 0x8000;\nvar ScrollBar = function(parent) {\n this.element = dom.createElement(\"div\");\n this.element.className = \"ace_scrollbar ace_scrollbar\" + this.classSuffix;\n\n this.inner = dom.createElement(\"div\");\n this.inner.className = \"ace_scrollbar-inner\";\n this.element.appendChild(this.inner);\n\n parent.appendChild(this.element);\n\n this.setVisible(false);\n this.skipEvent = false;\n\n event.addListener(this.element, \"scroll\", this.onScroll.bind(this));\n event.addListener(this.element, \"mousedown\", event.preventDefault);\n};\n\n(function() {\n oop.implement(this, EventEmitter);\n\n this.setVisible = function(isVisible) {\n this.element.style.display = isVisible ? \"\" : \"none\";\n this.isVisible = isVisible;\n this.coeff = 1;\n };\n}).call(ScrollBar.prototype);\nvar VScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollTop = 0;\n this.scrollHeight = 0;\n renderer.$scrollbarWidth = \n this.width = dom.scrollbarWidth(parent.ownerDocument);\n this.inner.style.width =\n this.element.style.width = (this.width || 15) + 5 + \"px\";\n this.$minWidth = 0;\n};\n\noop.inherits(VScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-v';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollTop = this.element.scrollTop;\n if (this.coeff != 1) {\n var h = this.element.clientHeight / this.scrollHeight;\n this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);\n }\n this._emit(\"scroll\", {data: this.scrollTop});\n }\n this.skipEvent = false;\n };\n this.getWidth = function() {\n return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);\n };\n this.setHeight = function(height) {\n this.element.style.height = height + \"px\";\n };\n this.setInnerHeight =\n this.setScrollHeight = function(height) {\n this.scrollHeight = height;\n if (height > MAX_SCROLL_H) {\n this.coeff = MAX_SCROLL_H / height;\n height = MAX_SCROLL_H;\n } else if (this.coeff != 1) {\n this.coeff = 1;\n }\n this.inner.style.height = height + \"px\";\n };\n this.setScrollTop = function(scrollTop) {\n if (this.scrollTop != scrollTop) {\n this.skipEvent = true;\n this.scrollTop = scrollTop;\n this.element.scrollTop = scrollTop * this.coeff;\n }\n };\n\n}).call(VScrollBar.prototype);\nvar HScrollBar = function(parent, renderer) {\n ScrollBar.call(this, parent);\n this.scrollLeft = 0;\n this.height = renderer.$scrollbarWidth;\n this.inner.style.height =\n this.element.style.height = (this.height || 15) + 5 + \"px\";\n};\n\noop.inherits(HScrollBar, ScrollBar);\n\n(function() {\n\n this.classSuffix = '-h';\n this.onScroll = function() {\n if (!this.skipEvent) {\n this.scrollLeft = this.element.scrollLeft;\n this._emit(\"scroll\", {data: this.scrollLeft});\n }\n this.skipEvent = false;\n };\n this.getHeight = function() {\n return this.isVisible ? this.height : 0;\n };\n this.setWidth = function(width) {\n this.element.style.width = width + \"px\";\n };\n this.setInnerWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollWidth = function(width) {\n this.inner.style.width = width + \"px\";\n };\n this.setScrollLeft = function(scrollLeft) {\n if (this.scrollLeft != scrollLeft) {\n this.skipEvent = true;\n this.scrollLeft = this.element.scrollLeft = scrollLeft;\n }\n };\n\n}).call(HScrollBar.prototype);\n\n\nexports.ScrollBar = VScrollBar; // backward compatibility\nexports.ScrollBarV = VScrollBar; // backward compatibility\nexports.ScrollBarH = HScrollBar; // backward compatibility\n\nexports.VScrollBar = VScrollBar;\nexports.HScrollBar = HScrollBar;\n});\n\nace.define(\"ace/renderloop\",[\"require\",\"exports\",\"module\",\"ace/lib/event\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar event = acequire(\"./lib/event\");\n\n\nvar RenderLoop = function(onRender, win) {\n this.onRender = onRender;\n this.pending = false;\n this.changes = 0;\n this.window = win || window;\n};\n\n(function() {\n\n\n this.schedule = function(change) {\n this.changes = this.changes | change;\n if (!this.pending && this.changes) {\n this.pending = true;\n var _self = this;\n event.nextFrame(function() {\n _self.pending = false;\n var changes;\n while (changes = _self.changes) {\n _self.changes = 0;\n _self.onRender(changes);\n }\n }, this.window);\n }\n };\n\n}).call(RenderLoop.prototype);\n\nexports.RenderLoop = RenderLoop;\n});\n\nace.define(\"ace/layer/font_metrics\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/lib/lang\",\"ace/lib/useragent\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\nvar oop = acequire(\"../lib/oop\");\nvar dom = acequire(\"../lib/dom\");\nvar lang = acequire(\"../lib/lang\");\nvar useragent = acequire(\"../lib/useragent\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\n\nvar CHAR_COUNT = 0;\n\nvar FontMetrics = exports.FontMetrics = function(parentEl) {\n this.el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.el.style, true);\n \n this.$main = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$main.style);\n \n this.$measureNode = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(this.$measureNode.style);\n \n \n this.el.appendChild(this.$main);\n this.el.appendChild(this.$measureNode);\n parentEl.appendChild(this.el);\n \n if (!CHAR_COUNT)\n this.$testFractionalRect();\n this.$measureNode.innerHTML = lang.stringRepeat(\"X\", CHAR_COUNT);\n \n this.$characterSize = {width: 0, height: 0};\n this.checkForSizeChanges();\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n \n this.$characterSize = {width: 0, height: 0};\n \n this.$testFractionalRect = function() {\n var el = dom.createElement(\"div\");\n this.$setMeasureNodeStyles(el.style);\n el.style.width = \"0.2px\";\n document.documentElement.appendChild(el);\n var w = el.getBoundingClientRect().width;\n if (w > 0 && w < 1)\n CHAR_COUNT = 50;\n else\n CHAR_COUNT = 100;\n el.parentNode.removeChild(el);\n };\n \n this.$setMeasureNodeStyles = function(style, isRoot) {\n style.width = style.height = \"auto\";\n style.left = style.top = \"0px\";\n style.visibility = \"hidden\";\n style.position = \"absolute\";\n style.whiteSpace = \"pre\";\n\n if (useragent.isIE < 8) {\n style[\"font-family\"] = \"inherit\";\n } else {\n style.font = \"inherit\";\n }\n style.overflow = isRoot ? \"hidden\" : \"visible\";\n };\n\n this.checkForSizeChanges = function() {\n var size = this.$measureSizes();\n if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) {\n this.$measureNode.style.fontWeight = \"bold\";\n var boldSize = this.$measureSizes();\n this.$measureNode.style.fontWeight = \"\";\n this.$characterSize = size;\n this.charSizes = Object.create(null);\n this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;\n this._emit(\"changeCharacterSize\", {data: size});\n }\n };\n\n this.$pollSizeChanges = function() {\n if (this.$pollSizeChangesTimer)\n return this.$pollSizeChangesTimer;\n var self = this;\n return this.$pollSizeChangesTimer = setInterval(function() {\n self.checkForSizeChanges();\n }, 500);\n };\n \n this.setPolling = function(val) {\n if (val) {\n this.$pollSizeChanges();\n } else if (this.$pollSizeChangesTimer) {\n clearInterval(this.$pollSizeChangesTimer);\n this.$pollSizeChangesTimer = 0;\n }\n };\n\n this.$measureSizes = function() {\n if (CHAR_COUNT === 50) {\n var rect = null;\n try { \n rect = this.$measureNode.getBoundingClientRect();\n } catch(e) {\n rect = {width: 0, height:0 };\n }\n var size = {\n height: rect.height,\n width: rect.width / CHAR_COUNT\n };\n } else {\n var size = {\n height: this.$measureNode.clientHeight,\n width: this.$measureNode.clientWidth / CHAR_COUNT\n };\n }\n if (size.width === 0 || size.height === 0)\n return null;\n return size;\n };\n\n this.$measureCharWidth = function(ch) {\n this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);\n var rect = this.$main.getBoundingClientRect();\n return rect.width / CHAR_COUNT;\n };\n \n this.getCharacterWidth = function(ch) {\n var w = this.charSizes[ch];\n if (w === undefined) {\n w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;\n }\n return w;\n };\n\n this.destroy = function() {\n clearInterval(this.$pollSizeChangesTimer);\n if (this.el && this.el.parentNode)\n this.el.parentNode.removeChild(this.el);\n };\n\n}).call(FontMetrics.prototype);\n\n});\n\nace.define(\"ace/virtual_renderer\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/config\",\"ace/lib/useragent\",\"ace/layer/gutter\",\"ace/layer/marker\",\"ace/layer/text\",\"ace/layer/cursor\",\"ace/scrollbar\",\"ace/scrollbar\",\"ace/renderloop\",\"ace/layer/font_metrics\",\"ace/lib/event_emitter\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar config = acequire(\"./config\");\nvar useragent = acequire(\"./lib/useragent\");\nvar GutterLayer = acequire(\"./layer/gutter\").Gutter;\nvar MarkerLayer = acequire(\"./layer/marker\").Marker;\nvar TextLayer = acequire(\"./layer/text\").Text;\nvar CursorLayer = acequire(\"./layer/cursor\").Cursor;\nvar HScrollBar = acequire(\"./scrollbar\").HScrollBar;\nvar VScrollBar = acequire(\"./scrollbar\").VScrollBar;\nvar RenderLoop = acequire(\"./renderloop\").RenderLoop;\nvar FontMetrics = acequire(\"./layer/font_metrics\").FontMetrics;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar editorCss = \".ace_editor {\\\nposition: relative;\\\noverflow: hidden;\\\nfont: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\\\ndirection: ltr;\\\ntext-align: left;\\\n-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\\n}\\\n.ace_scroller {\\\nposition: absolute;\\\noverflow: hidden;\\\ntop: 0;\\\nbottom: 0;\\\nbackground-color: inherit;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\ncursor: text;\\\n}\\\n.ace_content {\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmin-width: 100%;\\\n}\\\n.ace_dragging .ace_scroller:before{\\\nposition: absolute;\\\ntop: 0;\\\nleft: 0;\\\nright: 0;\\\nbottom: 0;\\\ncontent: '';\\\nbackground: rgba(250, 250, 250, 0.01);\\\nz-index: 1000;\\\n}\\\n.ace_dragging.ace_dark .ace_scroller:before{\\\nbackground: rgba(0, 0, 0, 0.01);\\\n}\\\n.ace_selecting, .ace_selecting * {\\\ncursor: text !important;\\\n}\\\n.ace_gutter {\\\nposition: absolute;\\\noverflow : hidden;\\\nwidth: auto;\\\ntop: 0;\\\nbottom: 0;\\\nleft: 0;\\\ncursor: default;\\\nz-index: 4;\\\n-ms-user-select: none;\\\n-moz-user-select: none;\\\n-webkit-user-select: none;\\\nuser-select: none;\\\n}\\\n.ace_gutter-active-line {\\\nposition: absolute;\\\nleft: 0;\\\nright: 0;\\\n}\\\n.ace_scroller.ace_scroll-left {\\\nbox-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\\\n}\\\n.ace_gutter-cell {\\\npadding-left: 19px;\\\npadding-right: 6px;\\\nbackground-repeat: no-repeat;\\\n}\\\n.ace_gutter-cell.ace_error {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_warning {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\\\");\\\nbackground-position: 2px center;\\\n}\\\n.ace_dark .ace_gutter-cell.ace_info {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_scrollbar {\\\nposition: absolute;\\\nright: 0;\\\nbottom: 0;\\\nz-index: 6;\\\n}\\\n.ace_scrollbar-inner {\\\nposition: absolute;\\\ncursor: text;\\\nleft: 0;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-v{\\\noverflow-x: hidden;\\\noverflow-y: scroll;\\\ntop: 0;\\\n}\\\n.ace_scrollbar-h {\\\noverflow-x: scroll;\\\noverflow-y: hidden;\\\nleft: 0;\\\n}\\\n.ace_print-margin {\\\nposition: absolute;\\\nheight: 100%;\\\n}\\\n.ace_text-input {\\\nposition: absolute;\\\nz-index: 0;\\\nwidth: 0.5em;\\\nheight: 1em;\\\nopacity: 0;\\\nbackground: transparent;\\\n-moz-appearance: none;\\\nappearance: none;\\\nborder: none;\\\nresize: none;\\\noutline: none;\\\noverflow: hidden;\\\nfont: inherit;\\\npadding: 0 1px;\\\nmargin: 0 -1px;\\\ntext-indent: -1em;\\\n-ms-user-select: text;\\\n-moz-user-select: text;\\\n-webkit-user-select: text;\\\nuser-select: text;\\\nwhite-space: pre!important;\\\n}\\\n.ace_text-input.ace_composition {\\\nbackground: inherit;\\\ncolor: inherit;\\\nz-index: 1000;\\\nopacity: 1;\\\ntext-indent: 0;\\\n}\\\n.ace_layer {\\\nz-index: 1;\\\nposition: absolute;\\\noverflow: hidden;\\\nword-wrap: normal;\\\nwhite-space: pre;\\\nheight: 100%;\\\nwidth: 100%;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\npointer-events: none;\\\n}\\\n.ace_gutter-layer {\\\nposition: relative;\\\nwidth: auto;\\\ntext-align: right;\\\npointer-events: auto;\\\n}\\\n.ace_text-layer {\\\nfont: inherit !important;\\\n}\\\n.ace_cjk {\\\ndisplay: inline-block;\\\ntext-align: center;\\\n}\\\n.ace_cursor-layer {\\\nz-index: 4;\\\n}\\\n.ace_cursor {\\\nz-index: 4;\\\nposition: absolute;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nborder-left: 2px solid;\\\ntransform: translatez(0);\\\n}\\\n.ace_multiselect .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_slim-cursors .ace_cursor {\\\nborder-left-width: 1px;\\\n}\\\n.ace_overwrite-cursors .ace_cursor {\\\nborder-left-width: 0;\\\nborder-bottom: 1px solid;\\\n}\\\n.ace_hidden-cursors .ace_cursor {\\\nopacity: 0.2;\\\n}\\\n.ace_smooth-blinking .ace_cursor {\\\n-webkit-transition: opacity 0.18s;\\\ntransition: opacity 0.18s;\\\n}\\\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\\\nposition: absolute;\\\nz-index: 3;\\\n}\\\n.ace_marker-layer .ace_selection {\\\nposition: absolute;\\\nz-index: 5;\\\n}\\\n.ace_marker-layer .ace_bracket {\\\nposition: absolute;\\\nz-index: 6;\\\n}\\\n.ace_marker-layer .ace_active-line {\\\nposition: absolute;\\\nz-index: 2;\\\n}\\\n.ace_marker-layer .ace_selected-word {\\\nposition: absolute;\\\nz-index: 4;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\n}\\\n.ace_line .ace_fold {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ndisplay: inline-block;\\\nheight: 11px;\\\nmargin-top: -2px;\\\nvertical-align: middle;\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\\\");\\\nbackground-repeat: no-repeat, repeat-x;\\\nbackground-position: center center, top left;\\\ncolor: transparent;\\\nborder: 1px solid black;\\\nborder-radius: 2px;\\\ncursor: pointer;\\\npointer-events: auto;\\\n}\\\n.ace_dark .ace_fold {\\\n}\\\n.ace_fold:hover{\\\nbackground-image:\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\\\"),\\\nurl(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_tooltip {\\\nbackground-color: #FFF;\\\nbackground-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\\\nbackground-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\\\nborder: 1px solid gray;\\\nborder-radius: 1px;\\\nbox-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\\\ncolor: black;\\\nmax-width: 100%;\\\npadding: 3px 4px;\\\nposition: fixed;\\\nz-index: 999999;\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\ncursor: default;\\\nwhite-space: pre;\\\nword-wrap: break-word;\\\nline-height: normal;\\\nfont-style: normal;\\\nfont-weight: normal;\\\nletter-spacing: normal;\\\npointer-events: none;\\\n}\\\n.ace_folding-enabled > .ace_gutter-cell {\\\npadding-right: 13px;\\\n}\\\n.ace_fold-widget {\\\n-moz-box-sizing: border-box;\\\n-webkit-box-sizing: border-box;\\\nbox-sizing: border-box;\\\nmargin: 0 -12px 0 1px;\\\ndisplay: none;\\\nwidth: 11px;\\\nvertical-align: top;\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\\\");\\\nbackground-repeat: no-repeat;\\\nbackground-position: center;\\\nborder-radius: 3px;\\\nborder: 1px solid transparent;\\\ncursor: pointer;\\\n}\\\n.ace_folding-enabled .ace_fold-widget {\\\ndisplay: inline-block; \\\n}\\\n.ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\\\");\\\n}\\\n.ace_fold-widget:hover {\\\nborder: 1px solid rgba(0, 0, 0, 0.3);\\\nbackground-color: rgba(255, 255, 255, 0.2);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\\\n}\\\n.ace_fold-widget:active {\\\nborder: 1px solid rgba(0, 0, 0, 0.4);\\\nbackground-color: rgba(0, 0, 0, 0.05);\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\\\n}\\\n.ace_dark .ace_fold-widget {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_end {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget.ace_closed {\\\nbackground-image: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==\\\");\\\n}\\\n.ace_dark .ace_fold-widget:hover {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\nbackground-color: rgba(255, 255, 255, 0.1);\\\n}\\\n.ace_dark .ace_fold-widget:active {\\\nbox-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\\\n}\\\n.ace_fold-widget.ace_invalid {\\\nbackground-color: #FFB4B4;\\\nborder-color: #DE5555;\\\n}\\\n.ace_fade-fold-widgets .ace_fold-widget {\\\n-webkit-transition: opacity 0.4s ease 0.05s;\\\ntransition: opacity 0.4s ease 0.05s;\\\nopacity: 0;\\\n}\\\n.ace_fade-fold-widgets:hover .ace_fold-widget {\\\n-webkit-transition: opacity 0.05s ease 0.05s;\\\ntransition: opacity 0.05s ease 0.05s;\\\nopacity:1;\\\n}\\\n.ace_underline {\\\ntext-decoration: underline;\\\n}\\\n.ace_bold {\\\nfont-weight: bold;\\\n}\\\n.ace_nobold .ace_bold {\\\nfont-weight: normal;\\\n}\\\n.ace_italic {\\\nfont-style: italic;\\\n}\\\n.ace_error-marker {\\\nbackground-color: rgba(255, 0, 0,0.2);\\\nposition: absolute;\\\nz-index: 9;\\\n}\\\n.ace_highlight-marker {\\\nbackground-color: rgba(255, 255, 0,0.2);\\\nposition: absolute;\\\nz-index: 8;\\\n}\\\n.ace_br1 {border-top-left-radius : 3px;}\\\n.ace_br2 {border-top-right-radius : 3px;}\\\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\\\n.ace_br4 {border-bottom-right-radius: 3px;}\\\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\\\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\\\n.ace_br8 {border-bottom-left-radius : 3px;}\\\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\\\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\\\n.ace_text-input-ios {\\\nposition: absolute !important;\\\ntop: -100000px !important;\\\nleft: -100000px !important;\\\n}\\\n\";\n\ndom.importCssString(editorCss, \"ace_editor.css\");\n\nvar VirtualRenderer = function(container, theme) {\n var _self = this;\n\n this.container = container || dom.createElement(\"div\");\n this.$keepTextAreaAtCursor = !useragent.isOldIE;\n\n dom.addCssClass(this.container, \"ace_editor\");\n\n this.setTheme(theme);\n\n this.$gutter = dom.createElement(\"div\");\n this.$gutter.className = \"ace_gutter\";\n this.container.appendChild(this.$gutter);\n this.$gutter.setAttribute(\"aria-hidden\", true);\n\n this.scroller = dom.createElement(\"div\");\n this.scroller.className = \"ace_scroller\";\n this.container.appendChild(this.scroller);\n\n this.content = dom.createElement(\"div\");\n this.content.className = \"ace_content\";\n this.scroller.appendChild(this.content);\n\n this.$gutterLayer = new GutterLayer(this.$gutter);\n this.$gutterLayer.on(\"changeGutterWidth\", this.onGutterResize.bind(this));\n\n this.$markerBack = new MarkerLayer(this.content);\n\n var textLayer = this.$textLayer = new TextLayer(this.content);\n this.canvas = textLayer.element;\n\n this.$markerFront = new MarkerLayer(this.content);\n\n this.$cursorLayer = new CursorLayer(this.content);\n this.$horizScroll = false;\n this.$vScroll = false;\n\n this.scrollBar = \n this.scrollBarV = new VScrollBar(this.container, this);\n this.scrollBarH = new HScrollBar(this.container, this);\n this.scrollBarV.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollTop(e.data - _self.scrollMargin.top);\n });\n this.scrollBarH.addEventListener(\"scroll\", function(e) {\n if (!_self.$scrollAnimation)\n _self.session.setScrollLeft(e.data - _self.scrollMargin.left);\n });\n\n this.scrollTop = 0;\n this.scrollLeft = 0;\n\n this.cursorPos = {\n row : 0,\n column : 0\n };\n\n this.$fontMetrics = new FontMetrics(this.container);\n this.$textLayer.$setFontMetrics(this.$fontMetrics);\n this.$textLayer.addEventListener(\"changeCharacterSize\", function(e) {\n _self.updateCharacterSize();\n _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);\n _self._signal(\"changeCharacterSize\", e);\n });\n\n this.$size = {\n width: 0,\n height: 0,\n scrollerHeight: 0,\n scrollerWidth: 0,\n $dirty: true\n };\n\n this.layerConfig = {\n width : 1,\n padding : 0,\n firstRow : 0,\n firstRowScreen: 0,\n lastRow : 0,\n lineHeight : 0,\n characterWidth : 0,\n minHeight : 1,\n maxHeight : 1,\n offset : 0,\n height : 1,\n gutterOffset: 1\n };\n \n this.scrollMargin = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n v: 0,\n h: 0\n };\n\n this.$loop = new RenderLoop(\n this.$renderChanges.bind(this),\n this.container.ownerDocument.defaultView\n );\n this.$loop.schedule(this.CHANGE_FULL);\n\n this.updateCharacterSize();\n this.setPadding(4);\n config.resetOptions(this);\n config._emit(\"renderer\", this);\n};\n\n(function() {\n\n this.CHANGE_CURSOR = 1;\n this.CHANGE_MARKER = 2;\n this.CHANGE_GUTTER = 4;\n this.CHANGE_SCROLL = 8;\n this.CHANGE_LINES = 16;\n this.CHANGE_TEXT = 32;\n this.CHANGE_SIZE = 64;\n this.CHANGE_MARKER_BACK = 128;\n this.CHANGE_MARKER_FRONT = 256;\n this.CHANGE_FULL = 512;\n this.CHANGE_H_SCROLL = 1024;\n\n oop.implement(this, EventEmitter);\n\n this.updateCharacterSize = function() {\n if (this.$textLayer.allowBoldFonts != this.$allowBoldFonts) {\n this.$allowBoldFonts = this.$textLayer.allowBoldFonts;\n this.setStyle(\"ace_nobold\", !this.$allowBoldFonts);\n }\n\n this.layerConfig.characterWidth =\n this.characterWidth = this.$textLayer.getCharacterWidth();\n this.layerConfig.lineHeight =\n this.lineHeight = this.$textLayer.getLineHeight();\n this.$updatePrintMargin();\n };\n this.setSession = function(session) {\n if (this.session)\n this.session.doc.off(\"changeNewLineMode\", this.onChangeNewLineMode);\n \n this.session = session;\n if (session && this.scrollMargin.top && session.getScrollTop() <= 0)\n session.setScrollTop(-this.scrollMargin.top);\n\n this.$cursorLayer.setSession(session);\n this.$markerBack.setSession(session);\n this.$markerFront.setSession(session);\n this.$gutterLayer.setSession(session);\n this.$textLayer.setSession(session);\n if (!session)\n return;\n \n this.$loop.schedule(this.CHANGE_FULL);\n this.session.$setFontMetrics(this.$fontMetrics);\n this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;\n \n this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);\n this.onChangeNewLineMode();\n this.session.doc.on(\"changeNewLineMode\", this.onChangeNewLineMode);\n };\n this.updateLines = function(firstRow, lastRow, force) {\n if (lastRow === undefined)\n lastRow = Infinity;\n\n if (!this.$changedLines) {\n this.$changedLines = {\n firstRow: firstRow,\n lastRow: lastRow\n };\n }\n else {\n if (this.$changedLines.firstRow > firstRow)\n this.$changedLines.firstRow = firstRow;\n\n if (this.$changedLines.lastRow < lastRow)\n this.$changedLines.lastRow = lastRow;\n }\n if (this.$changedLines.lastRow < this.layerConfig.firstRow) {\n if (force)\n this.$changedLines.lastRow = this.layerConfig.lastRow;\n else\n return;\n }\n if (this.$changedLines.firstRow > this.layerConfig.lastRow)\n return;\n this.$loop.schedule(this.CHANGE_LINES);\n };\n\n this.onChangeNewLineMode = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n this.$textLayer.$updateEolChar();\n this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);\n };\n \n this.onChangeTabSize = function() {\n this.$loop.schedule(this.CHANGE_TEXT | this.CHANGE_MARKER);\n this.$textLayer.onChangeTabSize();\n };\n this.updateText = function() {\n this.$loop.schedule(this.CHANGE_TEXT);\n };\n this.updateFull = function(force) {\n if (force)\n this.$renderChanges(this.CHANGE_FULL, true);\n else\n this.$loop.schedule(this.CHANGE_FULL);\n };\n this.updateFontSize = function() {\n this.$textLayer.checkForSizeChanges();\n };\n\n this.$changes = 0;\n this.$updateSizeAsync = function() {\n if (this.$loop.pending)\n this.$size.$dirty = true;\n else\n this.onResize();\n };\n this.onResize = function(force, gutterWidth, width, height) {\n if (this.resizing > 2)\n return;\n else if (this.resizing > 0)\n this.resizing++;\n else\n this.resizing = force ? 1 : 0;\n var el = this.container;\n if (!height)\n height = el.clientHeight || el.scrollHeight;\n if (!width)\n width = el.clientWidth || el.scrollWidth;\n var changes = this.$updateCachedSize(force, gutterWidth, width, height);\n\n \n if (!this.$size.scrollerHeight || (!width && !height))\n return this.resizing = 0;\n\n if (force)\n this.$gutterLayer.$padding = null;\n\n if (force)\n this.$renderChanges(changes | this.$changes, true);\n else\n this.$loop.schedule(changes | this.$changes);\n\n if (this.resizing)\n this.resizing = 0;\n this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;\n };\n \n this.$updateCachedSize = function(force, gutterWidth, width, height) {\n height -= (this.$extraHeight || 0);\n var changes = 0;\n var size = this.$size;\n var oldSize = {\n width: size.width,\n height: size.height,\n scrollerHeight: size.scrollerHeight,\n scrollerWidth: size.scrollerWidth\n };\n if (height && (force || size.height != height)) {\n size.height = height;\n changes |= this.CHANGE_SIZE;\n\n size.scrollerHeight = size.height;\n if (this.$horizScroll)\n size.scrollerHeight -= this.scrollBarH.getHeight();\n this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n changes = changes | this.CHANGE_SCROLL;\n }\n\n if (width && (force || size.width != width)) {\n changes |= this.CHANGE_SIZE;\n size.width = width;\n \n if (gutterWidth == null)\n gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n \n this.gutterWidth = gutterWidth;\n \n this.scrollBarH.element.style.left = \n this.scroller.style.left = gutterWidth + \"px\";\n size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); \n \n this.scrollBarH.element.style.right = \n this.scroller.style.right = this.scrollBarV.getWidth() + \"px\";\n this.scroller.style.bottom = this.scrollBarH.getHeight() + \"px\";\n\n if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)\n changes |= this.CHANGE_FULL;\n }\n \n size.$dirty = !width || !height;\n\n if (changes)\n this._signal(\"resize\", oldSize);\n\n return changes;\n };\n\n this.onGutterResize = function() {\n var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;\n if (gutterWidth != this.gutterWidth)\n this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);\n\n if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else if (this.$size.$dirty) {\n this.$loop.schedule(this.CHANGE_FULL);\n } else {\n this.$computeLayerConfig();\n this.$loop.schedule(this.CHANGE_MARKER);\n }\n };\n this.adjustWrapLimit = function() {\n var availableWidth = this.$size.scrollerWidth - this.$padding * 2;\n var limit = Math.floor(availableWidth / this.characterWidth);\n return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);\n };\n this.setAnimatedScroll = function(shouldAnimate){\n this.setOption(\"animatedScroll\", shouldAnimate);\n };\n this.getAnimatedScroll = function() {\n return this.$animatedScroll;\n };\n this.setShowInvisibles = function(showInvisibles) {\n this.setOption(\"showInvisibles\", showInvisibles);\n this.session.$bidiHandler.setShowInvisibles(showInvisibles);\n };\n this.getShowInvisibles = function() {\n return this.getOption(\"showInvisibles\");\n };\n this.getDisplayIndentGuides = function() {\n return this.getOption(\"displayIndentGuides\");\n };\n\n this.setDisplayIndentGuides = function(display) {\n this.setOption(\"displayIndentGuides\", display);\n };\n this.setShowPrintMargin = function(showPrintMargin) {\n this.setOption(\"showPrintMargin\", showPrintMargin);\n };\n this.getShowPrintMargin = function() {\n return this.getOption(\"showPrintMargin\");\n };\n this.setPrintMarginColumn = function(showPrintMargin) {\n this.setOption(\"printMarginColumn\", showPrintMargin);\n };\n this.getPrintMarginColumn = function() {\n return this.getOption(\"printMarginColumn\");\n };\n this.getShowGutter = function(){\n return this.getOption(\"showGutter\");\n };\n this.setShowGutter = function(show){\n return this.setOption(\"showGutter\", show);\n };\n\n this.getFadeFoldWidgets = function(){\n return this.getOption(\"fadeFoldWidgets\");\n };\n\n this.setFadeFoldWidgets = function(show) {\n this.setOption(\"fadeFoldWidgets\", show);\n };\n\n this.setHighlightGutterLine = function(shouldHighlight) {\n this.setOption(\"highlightGutterLine\", shouldHighlight);\n };\n\n this.getHighlightGutterLine = function() {\n return this.getOption(\"highlightGutterLine\");\n };\n\n this.$updateGutterLineHighlight = function() {\n var pos = this.$cursorLayer.$pixelPos;\n var height = this.layerConfig.lineHeight;\n if (this.session.getUseWrapMode()) {\n var cursor = this.session.selection.getCursor();\n cursor.column = 0;\n pos = this.$cursorLayer.getPixelPosition(cursor, true);\n height *= this.session.getRowLength(cursor.row);\n }\n this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + \"px\";\n this.$gutterLineHighlight.style.height = height + \"px\";\n };\n\n this.$updatePrintMargin = function() {\n if (!this.$showPrintMargin && !this.$printMarginEl)\n return;\n\n if (!this.$printMarginEl) {\n var containerEl = dom.createElement(\"div\");\n containerEl.className = \"ace_layer ace_print-margin-layer\";\n this.$printMarginEl = dom.createElement(\"div\");\n this.$printMarginEl.className = \"ace_print-margin\";\n containerEl.appendChild(this.$printMarginEl);\n this.content.insertBefore(containerEl, this.content.firstChild);\n }\n\n var style = this.$printMarginEl.style;\n style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + \"px\";\n style.visibility = this.$showPrintMargin ? \"visible\" : \"hidden\";\n \n if (this.session && this.session.$wrap == -1)\n this.adjustWrapLimit();\n };\n this.getContainerElement = function() {\n return this.container;\n };\n this.getMouseEventTarget = function() {\n return this.scroller;\n };\n this.getTextAreaContainer = function() {\n return this.container;\n };\n this.$moveTextAreaToCursor = function() {\n if (!this.$keepTextAreaAtCursor)\n return;\n var config = this.layerConfig;\n var posTop = this.$cursorLayer.$pixelPos.top;\n var posLeft = this.$cursorLayer.$pixelPos.left;\n posTop -= config.offset;\n\n var style = this.textarea.style;\n var h = this.lineHeight;\n if (posTop < 0 || posTop > config.height - h) {\n style.top = style.left = \"0\";\n return;\n }\n\n var w = this.characterWidth;\n if (this.$composition) {\n var val = this.textarea.value.replace(/^\\x01+/, \"\");\n w *= (this.session.$getStringScreenWidth(val)[0]+2);\n h += 2;\n }\n posLeft -= this.scrollLeft;\n if (posLeft > this.$size.scrollerWidth - w)\n posLeft = this.$size.scrollerWidth - w;\n\n posLeft += this.gutterWidth;\n style.height = h + \"px\";\n style.width = w + \"px\";\n style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + \"px\";\n style.top = Math.min(posTop, this.$size.height - h) + \"px\";\n };\n this.getFirstVisibleRow = function() {\n return this.layerConfig.firstRow;\n };\n this.getFirstFullyVisibleRow = function() {\n return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1);\n };\n this.getLastFullyVisibleRow = function() {\n var config = this.layerConfig;\n var lastRow = config.lastRow;\n var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;\n if (top - this.session.getScrollTop() > config.height - config.lineHeight)\n return lastRow - 1;\n return lastRow;\n };\n this.getLastVisibleRow = function() {\n return this.layerConfig.lastRow;\n };\n\n this.$padding = null;\n this.setPadding = function(padding) {\n this.$padding = padding;\n this.$textLayer.setPadding(padding);\n this.$cursorLayer.setPadding(padding);\n this.$markerFront.setPadding(padding);\n this.$markerBack.setPadding(padding);\n this.$loop.schedule(this.CHANGE_FULL);\n this.$updatePrintMargin();\n };\n \n this.setScrollMargin = function(top, bottom, left, right) {\n var sm = this.scrollMargin;\n sm.top = top|0;\n sm.bottom = bottom|0;\n sm.right = right|0;\n sm.left = left|0;\n sm.v = sm.top + sm.bottom;\n sm.h = sm.left + sm.right;\n if (sm.top && this.scrollTop <= 0 && this.session)\n this.session.setScrollTop(-sm.top);\n this.updateFull();\n };\n this.getHScrollBarAlwaysVisible = function() {\n return this.$hScrollBarAlwaysVisible;\n };\n this.setHScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"hScrollBarAlwaysVisible\", alwaysVisible);\n };\n this.getVScrollBarAlwaysVisible = function() {\n return this.$vScrollBarAlwaysVisible;\n };\n this.setVScrollBarAlwaysVisible = function(alwaysVisible) {\n this.setOption(\"vScrollBarAlwaysVisible\", alwaysVisible);\n };\n\n this.$updateScrollBarV = function() {\n var scrollHeight = this.layerConfig.maxHeight;\n var scrollerHeight = this.$size.scrollerHeight;\n if (!this.$maxLines && this.$scrollPastEnd) {\n scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;\n if (this.scrollTop > scrollHeight - scrollerHeight) {\n scrollHeight = this.scrollTop + scrollerHeight;\n this.scrollBarV.scrollTop = null;\n }\n }\n this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);\n this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);\n };\n this.$updateScrollBarH = function() {\n this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);\n this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);\n };\n \n this.$frozen = false;\n this.freeze = function() {\n this.$frozen = true;\n };\n \n this.unfreeze = function() {\n this.$frozen = false;\n };\n\n this.$renderChanges = function(changes, force) {\n if (this.$changes) {\n changes |= this.$changes;\n this.$changes = 0;\n }\n if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {\n this.$changes |= changes;\n return; \n } \n if (this.$size.$dirty) {\n this.$changes |= changes;\n return this.onResize(true);\n }\n if (!this.lineHeight) {\n this.$textLayer.checkForSizeChanges();\n }\n \n this._signal(\"beforeRender\");\n\n if (this.session && this.session.$bidiHandler)\n this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);\n\n var config = this.layerConfig;\n if (changes & this.CHANGE_FULL ||\n changes & this.CHANGE_SIZE ||\n changes & this.CHANGE_TEXT ||\n changes & this.CHANGE_LINES ||\n changes & this.CHANGE_SCROLL ||\n changes & this.CHANGE_H_SCROLL\n ) {\n changes |= this.$computeLayerConfig();\n if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {\n var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;\n if (st > 0) {\n this.scrollTop = st;\n changes = changes | this.CHANGE_SCROLL;\n changes |= this.$computeLayerConfig();\n }\n }\n config = this.layerConfig;\n this.$updateScrollBarV();\n if (changes & this.CHANGE_H_SCROLL)\n this.$updateScrollBarH();\n this.$gutterLayer.element.style.marginTop = (-config.offset) + \"px\";\n this.content.style.marginTop = (-config.offset) + \"px\";\n this.content.style.width = config.width + 2 * this.$padding + \"px\";\n this.content.style.height = config.minHeight + \"px\";\n }\n if (changes & this.CHANGE_H_SCROLL) {\n this.content.style.marginLeft = -this.scrollLeft + \"px\";\n this.scroller.className = this.scrollLeft <= 0 ? \"ace_scroller\" : \"ace_scroller ace_scroll-left\";\n }\n if (changes & this.CHANGE_FULL) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this._signal(\"afterRender\");\n return;\n }\n if (changes & this.CHANGE_SCROLL) {\n if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)\n this.$textLayer.update(config);\n else\n this.$textLayer.scrollLines(config);\n\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n this.$markerBack.update(config);\n this.$markerFront.update(config);\n this.$cursorLayer.update(config);\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n this.$moveTextAreaToCursor();\n this._signal(\"afterRender\");\n return;\n }\n\n if (changes & this.CHANGE_TEXT) {\n this.$textLayer.update(config);\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_LINES) {\n if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)\n this.$gutterLayer.update(config);\n }\n else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {\n if (this.$showGutter)\n this.$gutterLayer.update(config);\n }\n\n if (changes & this.CHANGE_CURSOR) {\n this.$cursorLayer.update(config);\n this.$moveTextAreaToCursor();\n this.$highlightGutterLine && this.$updateGutterLineHighlight();\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {\n this.$markerFront.update(config);\n }\n\n if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {\n this.$markerBack.update(config);\n }\n\n this._signal(\"afterRender\");\n };\n\n \n this.$autosize = function() {\n var height = this.session.getScreenLength() * this.lineHeight;\n var maxHeight = this.$maxLines * this.lineHeight;\n var desiredHeight = Math.min(maxHeight,\n Math.max((this.$minLines || 1) * this.lineHeight, height)\n ) + this.scrollMargin.v + (this.$extraHeight || 0);\n if (this.$horizScroll)\n desiredHeight += this.scrollBarH.getHeight();\n if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)\n desiredHeight = this.$maxPixelHeight;\n var vScroll = height > maxHeight;\n \n if (desiredHeight != this.desiredHeight ||\n this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {\n if (vScroll != this.$vScroll) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n \n var w = this.container.clientWidth;\n this.container.style.height = desiredHeight + \"px\";\n this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);\n this.desiredHeight = desiredHeight;\n \n this._signal(\"autosize\");\n }\n };\n \n this.$computeLayerConfig = function() {\n var session = this.session;\n var size = this.$size;\n \n var hideScrollbars = size.height <= 2 * this.lineHeight;\n var screenLines = this.session.getScreenLength();\n var maxHeight = screenLines * this.lineHeight;\n\n var longestLine = this.$getLongestLine();\n \n var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||\n size.scrollerWidth - longestLine - 2 * this.$padding < 0);\n\n var hScrollChanged = this.$horizScroll !== horizScroll;\n if (hScrollChanged) {\n this.$horizScroll = horizScroll;\n this.scrollBarH.setVisible(horizScroll);\n }\n var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine\n if (this.$maxLines && this.lineHeight > 1)\n this.$autosize();\n\n var offset = this.scrollTop % this.lineHeight;\n var minHeight = size.scrollerHeight + this.lineHeight;\n \n var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd\n ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd\n : 0;\n maxHeight += scrollPastEnd;\n \n var sm = this.scrollMargin;\n this.session.setScrollTop(Math.max(-sm.top,\n Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));\n\n this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft, \n longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));\n \n var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||\n size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);\n var vScrollChanged = vScrollBefore !== vScroll;\n if (vScrollChanged) {\n this.$vScroll = vScroll;\n this.scrollBarV.setVisible(vScroll);\n }\n\n var lineCount = Math.ceil(minHeight / this.lineHeight) - 1;\n var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight));\n var lastRow = firstRow + lineCount;\n var firstRowScreen, firstRowHeight;\n var lineHeight = this.lineHeight;\n firstRow = session.screenToDocumentRow(firstRow, 0);\n var foldLine = session.getFoldLine(firstRow);\n if (foldLine) {\n firstRow = foldLine.start.row;\n }\n\n firstRowScreen = session.documentToScreenRow(firstRow, 0);\n firstRowHeight = session.getRowLength(firstRow) * lineHeight;\n\n lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1);\n minHeight = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +\n firstRowHeight;\n\n offset = this.scrollTop - firstRowScreen * lineHeight;\n\n var changes = 0;\n if (this.layerConfig.width != longestLine) \n changes = this.CHANGE_H_SCROLL;\n if (hScrollChanged || vScrollChanged) {\n changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);\n this._signal(\"scrollbarVisibilityChanged\");\n if (vScrollChanged)\n longestLine = this.$getLongestLine();\n }\n \n this.layerConfig = {\n width : longestLine,\n padding : this.$padding,\n firstRow : firstRow,\n firstRowScreen: firstRowScreen,\n lastRow : lastRow,\n lineHeight : lineHeight,\n characterWidth : this.characterWidth,\n minHeight : minHeight,\n maxHeight : maxHeight,\n offset : offset,\n gutterOffset : lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,\n height : this.$size.scrollerHeight\n };\n\n return changes;\n };\n\n this.$updateLines = function() {\n if (!this.$changedLines) return;\n var firstRow = this.$changedLines.firstRow;\n var lastRow = this.$changedLines.lastRow;\n this.$changedLines = null;\n\n var layerConfig = this.layerConfig;\n\n if (firstRow > layerConfig.lastRow + 1) { return; }\n if (lastRow < layerConfig.firstRow) { return; }\n if (lastRow === Infinity) {\n if (this.$showGutter)\n this.$gutterLayer.update(layerConfig);\n this.$textLayer.update(layerConfig);\n return;\n }\n this.$textLayer.updateLines(layerConfig, firstRow, lastRow);\n return true;\n };\n\n this.$getLongestLine = function() {\n var charCount = this.session.getScreenWidth();\n if (this.showInvisibles && !this.session.$useWrapMode)\n charCount += 1;\n\n return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth));\n };\n this.updateFrontMarkers = function() {\n this.$markerFront.setMarkers(this.session.getMarkers(true));\n this.$loop.schedule(this.CHANGE_MARKER_FRONT);\n };\n this.updateBackMarkers = function() {\n this.$markerBack.setMarkers(this.session.getMarkers());\n this.$loop.schedule(this.CHANGE_MARKER_BACK);\n };\n this.addGutterDecoration = function(row, className){\n this.$gutterLayer.addGutterDecoration(row, className);\n };\n this.removeGutterDecoration = function(row, className){\n this.$gutterLayer.removeGutterDecoration(row, className);\n };\n this.updateBreakpoints = function(rows) {\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.setAnnotations = function(annotations) {\n this.$gutterLayer.setAnnotations(annotations);\n this.$loop.schedule(this.CHANGE_GUTTER);\n };\n this.updateCursor = function() {\n this.$loop.schedule(this.CHANGE_CURSOR);\n };\n this.hideCursor = function() {\n this.$cursorLayer.hideCursor();\n };\n this.showCursor = function() {\n this.$cursorLayer.showCursor();\n };\n\n this.scrollSelectionIntoView = function(anchor, lead, offset) {\n this.scrollCursorIntoView(anchor, offset);\n this.scrollCursorIntoView(lead, offset);\n };\n this.scrollCursorIntoView = function(cursor, offset, $viewMargin) {\n if (this.$size.scrollerHeight === 0)\n return;\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n\n var left = pos.left;\n var top = pos.top;\n \n var topMargin = $viewMargin && $viewMargin.top || 0;\n var bottomMargin = $viewMargin && $viewMargin.bottom || 0;\n \n var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;\n \n if (scrollTop + topMargin > top) {\n if (offset && scrollTop + topMargin > top + this.lineHeight)\n top -= offset * this.$size.scrollerHeight;\n if (top === 0)\n top = -this.scrollMargin.top;\n this.session.setScrollTop(top);\n } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {\n if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight)\n top += offset * this.$size.scrollerHeight;\n this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight);\n }\n\n var scrollLeft = this.scrollLeft;\n\n if (scrollLeft > left) {\n if (left < this.$padding + 2 * this.layerConfig.characterWidth)\n left = -this.scrollMargin.left;\n this.session.setScrollLeft(left);\n } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {\n this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));\n } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {\n this.session.setScrollLeft(0);\n }\n };\n this.getScrollTop = function() {\n return this.session.getScrollTop();\n };\n this.getScrollLeft = function() {\n return this.session.getScrollLeft();\n };\n this.getScrollTopRow = function() {\n return this.scrollTop / this.lineHeight;\n };\n this.getScrollBottomRow = function() {\n return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1);\n };\n this.scrollToRow = function(row) {\n this.session.setScrollTop(row * this.lineHeight);\n };\n\n this.alignCursor = function(cursor, alignment) {\n if (typeof cursor == \"number\")\n cursor = {row: cursor, column: 0};\n\n var pos = this.$cursorLayer.getPixelPosition(cursor);\n var h = this.$size.scrollerHeight - this.lineHeight;\n var offset = pos.top - h * (alignment || 0);\n\n this.session.setScrollTop(offset);\n return offset;\n };\n\n this.STEPS = 8;\n this.$calcSteps = function(fromValue, toValue){\n var i = 0;\n var l = this.STEPS;\n var steps = [];\n\n var func = function(t, x_min, dx) {\n return dx * (Math.pow(t - 1, 3) + 1) + x_min;\n };\n\n for (i = 0; i < l; ++i)\n steps.push(func(i / this.STEPS, fromValue, toValue - fromValue));\n\n return steps;\n };\n this.scrollToLine = function(line, center, animate, callback) {\n var pos = this.$cursorLayer.getPixelPosition({row: line, column: 0});\n var offset = pos.top;\n if (center)\n offset -= this.$size.scrollerHeight / 2;\n\n var initialScroll = this.scrollTop;\n this.session.setScrollTop(offset);\n if (animate !== false)\n this.animateScrolling(initialScroll, callback);\n };\n\n this.animateScrolling = function(fromValue, callback) {\n var toValue = this.scrollTop;\n if (!this.$animatedScroll)\n return;\n var _self = this;\n \n if (fromValue == toValue)\n return;\n \n if (this.$scrollAnimation) {\n var oldSteps = this.$scrollAnimation.steps;\n if (oldSteps.length) {\n fromValue = oldSteps[0];\n if (fromValue == toValue)\n return;\n }\n }\n \n var steps = _self.$calcSteps(fromValue, toValue);\n this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};\n\n clearInterval(this.$timer);\n\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n this.$timer = setInterval(function() {\n if (steps.length) {\n _self.session.setScrollTop(steps.shift());\n _self.session.$scrollTop = toValue;\n } else if (toValue != null) {\n _self.session.$scrollTop = -1;\n _self.session.setScrollTop(toValue);\n toValue = null;\n } else {\n _self.$timer = clearInterval(_self.$timer);\n _self.$scrollAnimation = null;\n callback && callback();\n }\n }, 10);\n };\n this.scrollToY = function(scrollTop) {\n if (this.scrollTop !== scrollTop) {\n this.$loop.schedule(this.CHANGE_SCROLL);\n this.scrollTop = scrollTop;\n }\n };\n this.scrollToX = function(scrollLeft) {\n if (this.scrollLeft !== scrollLeft)\n this.scrollLeft = scrollLeft;\n this.$loop.schedule(this.CHANGE_H_SCROLL);\n };\n this.scrollTo = function(x, y) {\n this.session.setScrollTop(y);\n this.session.setScrollLeft(y);\n };\n this.scrollBy = function(deltaX, deltaY) {\n deltaY && this.session.setScrollTop(this.session.getScrollTop() + deltaY);\n deltaX && this.session.setScrollLeft(this.session.getScrollLeft() + deltaX);\n };\n this.isScrollableBy = function(deltaX, deltaY) {\n if (deltaY < 0 && this.session.getScrollTop() >= 1 - this.scrollMargin.top)\n return true;\n if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight\n - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)\n return true;\n if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)\n return true;\n if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth\n - this.layerConfig.width < -1 + this.scrollMargin.right)\n return true;\n };\n\n this.pixelToScreenCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n var offset = offsetX / this.characterWidth;\n var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight);\n var col = Math.round(offset);\n\n return {row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX};\n };\n\n this.screenToTextCoordinates = function(x, y) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;\n\n var col = Math.round(offsetX / this.characterWidth);\n\n var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;\n\n return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);\n };\n this.textToScreenCoordinates = function(row, column) {\n var canvasPos = this.scroller.getBoundingClientRect();\n var pos = this.session.documentToScreenPosition(row, column);\n\n var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row)\n ? this.session.$bidiHandler.getPosLeft(pos.column)\n : Math.round(pos.column * this.characterWidth));\n\n var y = pos.row * this.lineHeight;\n\n return {\n pageX: canvasPos.left + x - this.scrollLeft,\n pageY: canvasPos.top + y - this.scrollTop\n };\n };\n this.visualizeFocus = function() {\n dom.addCssClass(this.container, \"ace_focus\");\n };\n this.visualizeBlur = function() {\n dom.removeCssClass(this.container, \"ace_focus\");\n };\n this.showComposition = function(position) {\n if (!this.$composition)\n this.$composition = {\n keepTextAreaAtCursor: this.$keepTextAreaAtCursor,\n cssText: this.textarea.style.cssText\n };\n\n this.$keepTextAreaAtCursor = true;\n dom.addCssClass(this.textarea, \"ace_composition\");\n this.textarea.style.cssText = \"\";\n this.$moveTextAreaToCursor();\n };\n this.setCompositionText = function(text) {\n this.$moveTextAreaToCursor();\n };\n this.hideComposition = function() {\n if (!this.$composition)\n return;\n\n dom.removeCssClass(this.textarea, \"ace_composition\");\n this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor;\n this.textarea.style.cssText = this.$composition.cssText;\n this.$composition = null;\n };\n this.setTheme = function(theme, cb) {\n var _self = this;\n this.$themeId = theme;\n _self._dispatchEvent('themeChange',{theme:theme});\n\n if (!theme || typeof theme == \"string\") {\n var moduleName = theme || this.$options.theme.initialValue;\n config.loadModule([\"theme\", moduleName], afterLoad);\n } else {\n afterLoad(theme);\n }\n\n function afterLoad(module) {\n if (_self.$themeId != theme)\n return cb && cb();\n if (!module || !module.cssClass)\n throw new Error(\"couldn't load module \" + theme + \" or it didn't call define\");\n dom.importCssString(\n module.cssText,\n module.cssClass,\n _self.container.ownerDocument\n );\n\n if (_self.theme)\n dom.removeCssClass(_self.container, _self.theme.cssClass);\n\n var padding = \"padding\" in module ? module.padding \n : \"padding\" in (_self.theme || {}) ? 4 : _self.$padding;\n if (_self.$padding && padding != _self.$padding)\n _self.setPadding(padding);\n _self.$theme = module.cssClass;\n\n _self.theme = module;\n dom.addCssClass(_self.container, module.cssClass);\n dom.setCssClass(_self.container, \"ace_dark\", module.isDark);\n if (_self.$size) {\n _self.$size.width = 0;\n _self.$updateSizeAsync();\n }\n\n _self._dispatchEvent('themeLoaded', {theme:module});\n cb && cb();\n }\n };\n this.getTheme = function() {\n return this.$themeId;\n };\n this.setStyle = function(style, include) {\n dom.setCssClass(this.container, style, include !== false);\n };\n this.unsetStyle = function(style) {\n dom.removeCssClass(this.container, style);\n };\n \n this.setCursorStyle = function(style) {\n if (this.scroller.style.cursor != style)\n this.scroller.style.cursor = style;\n };\n this.setMouseCursor = function(cursorStyle) {\n this.scroller.style.cursor = cursorStyle;\n };\n this.destroy = function() {\n this.$textLayer.destroy();\n this.$cursorLayer.destroy();\n };\n\n}).call(VirtualRenderer.prototype);\n\n\nconfig.defineOptions(VirtualRenderer.prototype, \"renderer\", {\n animatedScroll: {initialValue: false},\n showInvisibles: {\n set: function(value) {\n if (this.$textLayer.setShowInvisibles(value))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: false\n },\n showPrintMargin: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: true\n },\n printMarginColumn: {\n set: function() { this.$updatePrintMargin(); },\n initialValue: 80\n },\n printMargin: {\n set: function(val) {\n if (typeof val == \"number\")\n this.$printMarginColumn = val;\n this.$showPrintMargin = !!val;\n this.$updatePrintMargin();\n },\n get: function() {\n return this.$showPrintMargin && this.$printMarginColumn; \n }\n },\n showGutter: {\n set: function(show){\n this.$gutter.style.display = show ? \"block\" : \"none\";\n this.$loop.schedule(this.CHANGE_FULL);\n this.onGutterResize();\n },\n initialValue: true\n },\n fadeFoldWidgets: {\n set: function(show) {\n dom.setCssClass(this.$gutter, \"ace_fade-fold-widgets\", show);\n },\n initialValue: false\n },\n showFoldWidgets: {\n set: function(show) {this.$gutterLayer.setShowFoldWidgets(show);},\n initialValue: true\n },\n showLineNumbers: {\n set: function(show) {\n this.$gutterLayer.setShowLineNumbers(show);\n this.$loop.schedule(this.CHANGE_GUTTER);\n },\n initialValue: true\n },\n displayIndentGuides: {\n set: function(show) {\n if (this.$textLayer.setDisplayIndentGuides(show))\n this.$loop.schedule(this.CHANGE_TEXT);\n },\n initialValue: true\n },\n highlightGutterLine: {\n set: function(shouldHighlight) {\n if (!this.$gutterLineHighlight) {\n this.$gutterLineHighlight = dom.createElement(\"div\");\n this.$gutterLineHighlight.className = \"ace_gutter-active-line\";\n this.$gutter.appendChild(this.$gutterLineHighlight);\n return;\n }\n\n this.$gutterLineHighlight.style.display = shouldHighlight ? \"\" : \"none\";\n if (this.$cursorLayer.$pixelPos)\n this.$updateGutterLineHighlight();\n },\n initialValue: false,\n value: true\n },\n hScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n vScrollBarAlwaysVisible: {\n set: function(val) {\n if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: false\n },\n fontSize: {\n set: function(size) {\n if (typeof size == \"number\")\n size = size + \"px\";\n this.container.style.fontSize = size;\n this.updateFontSize();\n },\n initialValue: 12\n },\n fontFamily: {\n set: function(name) {\n this.container.style.fontFamily = name;\n this.updateFontSize();\n }\n },\n maxLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n minLines: {\n set: function(val) {\n this.updateFull();\n }\n },\n maxPixelHeight: {\n set: function(val) {\n this.updateFull();\n },\n initialValue: 0\n },\n scrollPastEnd: {\n set: function(val) {\n val = +val || 0;\n if (this.$scrollPastEnd == val)\n return;\n this.$scrollPastEnd = val;\n this.$loop.schedule(this.CHANGE_SCROLL);\n },\n initialValue: 0,\n handlesSet: true\n },\n fixedWidthGutter: {\n set: function(val) {\n this.$gutterLayer.$fixedWidth = !!val;\n this.$loop.schedule(this.CHANGE_GUTTER);\n }\n },\n theme: {\n set: function(val) { this.setTheme(val); },\n get: function() { return this.$themeId || this.theme; },\n initialValue: \"./theme/textmate\",\n handlesSet: true\n }\n});\n\nexports.VirtualRenderer = VirtualRenderer;\n});\n\nace.define(\"ace/worker/worker_client\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/net\",\"ace/lib/event_emitter\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar net = acequire(\"../lib/net\");\nvar EventEmitter = acequire(\"../lib/event_emitter\").EventEmitter;\nvar config = acequire(\"../config\");\n\nfunction $workerBlob(workerUrl, mod) {\n var script = mod.src;\"importScripts('\" + net.qualifyURL(workerUrl) + \"');\";\n try {\n return new Blob([script], {\"type\": \"application/javascript\"});\n } catch (e) { // Backwards-compatibility\n var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;\n var blobBuilder = new BlobBuilder();\n blobBuilder.append(script);\n return blobBuilder.getBlob(\"application/javascript\");\n }\n}\n\nfunction createWorker(workerUrl, mod) {\n var blob = $workerBlob(workerUrl, mod);\n var URL = window.URL || window.webkitURL;\n var blobURL = URL.createObjectURL(blob);\n return new Worker(blobURL);\n}\n\nvar WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.onMessage = this.onMessage.bind(this);\n if (acequire.nameToUrl && !acequire.toUrl)\n acequire.toUrl = acequire.nameToUrl;\n \n if (config.get(\"packaged\") || !acequire.toUrl) {\n workerUrl = workerUrl || config.moduleUrl(mod.id, \"worker\");\n } else {\n var normalizePath = this.$normalizePath;\n workerUrl = workerUrl || normalizePath(acequire.toUrl(\"ace/worker/worker.js\", null, \"_\"));\n\n var tlns = {};\n topLevelNamespaces.forEach(function(ns) {\n tlns[ns] = normalizePath(acequire.toUrl(ns, null, \"_\").replace(/(\\.js)?(\\?.*)?$/, \"\"));\n });\n }\n\n this.$worker = createWorker(workerUrl, mod);\n if (importScripts) {\n this.send(\"importScripts\", importScripts);\n }\n this.$worker.postMessage({\n init : true,\n tlns : tlns,\n module : mod.id,\n classname : classname\n });\n\n this.callbackId = 1;\n this.callbacks = {};\n\n this.$worker.onmessage = this.onMessage;\n};\n\n(function(){\n\n oop.implement(this, EventEmitter);\n\n this.onMessage = function(e) {\n var msg = e.data;\n switch (msg.type) {\n case \"event\":\n this._signal(msg.name, {data: msg.data});\n break;\n case \"call\":\n var callback = this.callbacks[msg.id];\n if (callback) {\n callback(msg.data);\n delete this.callbacks[msg.id];\n }\n break;\n case \"error\":\n this.reportError(msg.data);\n break;\n case \"log\":\n window.console && console.log && console.log.apply(console, msg.data);\n break;\n }\n };\n \n this.reportError = function(err) {\n window.console && console.error && console.error(err);\n };\n\n this.$normalizePath = function(path) {\n return net.qualifyURL(path);\n };\n\n this.terminate = function() {\n this._signal(\"terminate\", {});\n this.deltaQueue = null;\n this.$worker.terminate();\n this.$worker = null;\n if (this.$doc)\n this.$doc.off(\"change\", this.changeListener);\n this.$doc = null;\n };\n\n this.send = function(cmd, args) {\n this.$worker.postMessage({command: cmd, args: args});\n };\n\n this.call = function(cmd, args, callback) {\n if (callback) {\n var id = this.callbackId++;\n this.callbacks[id] = callback;\n args.push(id);\n }\n this.send(cmd, args);\n };\n\n this.emit = function(event, data) {\n try {\n this.$worker.postMessage({event: event, data: {data: data.data}});\n }\n catch(ex) {\n console.error(ex.stack);\n }\n };\n\n this.attachToDocument = function(doc) {\n if (this.$doc)\n this.terminate();\n\n this.$doc = doc;\n this.call(\"setValue\", [doc.getValue()]);\n doc.on(\"change\", this.changeListener);\n };\n\n this.changeListener = function(delta) {\n if (!this.deltaQueue) {\n this.deltaQueue = [];\n setTimeout(this.$sendDeltaQueue, 0);\n }\n if (delta.action == \"insert\")\n this.deltaQueue.push(delta.start, delta.lines);\n else\n this.deltaQueue.push(delta.start, delta.end);\n };\n\n this.$sendDeltaQueue = function() {\n var q = this.deltaQueue;\n if (!q) return;\n this.deltaQueue = null;\n if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {\n this.call(\"setValue\", [this.$doc.getValue()]);\n } else\n this.emit(\"change\", {data: q});\n };\n\n}).call(WorkerClient.prototype);\n\n\nvar UIWorkerClient = function(topLevelNamespaces, mod, classname) {\n this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);\n this.changeListener = this.changeListener.bind(this);\n this.callbackId = 1;\n this.callbacks = {};\n this.messageBuffer = [];\n\n var main = null;\n var emitSync = false;\n var sender = Object.create(EventEmitter);\n var _self = this;\n\n this.$worker = {};\n this.$worker.terminate = function() {};\n this.$worker.postMessage = function(e) {\n _self.messageBuffer.push(e);\n if (main) {\n if (emitSync)\n setTimeout(processNext);\n else\n processNext();\n }\n };\n this.setEmitSync = function(val) { emitSync = val; };\n\n var processNext = function() {\n var msg = _self.messageBuffer.shift();\n if (msg.command)\n main[msg.command].apply(main, msg.args);\n else if (msg.event)\n sender._signal(msg.event, msg.data);\n };\n\n sender.postMessage = function(msg) {\n _self.onMessage({data: msg});\n };\n sender.callback = function(data, callbackId) {\n this.postMessage({type: \"call\", id: callbackId, data: data});\n };\n sender.emit = function(name, data) {\n this.postMessage({type: \"event\", name: name, data: data});\n };\n\n config.loadModule([\"worker\", mod], function(Main) {\n main = new Main[classname](sender);\n while (_self.messageBuffer.length)\n processNext();\n });\n};\n\nUIWorkerClient.prototype = WorkerClient.prototype;\n\nexports.UIWorkerClient = UIWorkerClient;\nexports.WorkerClient = WorkerClient;\nexports.createWorker = createWorker;\n\n\n});\n\nace.define(\"ace/placeholder\",[\"require\",\"exports\",\"module\",\"ace/range\",\"ace/lib/event_emitter\",\"ace/lib/oop\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"./range\").Range;\nvar EventEmitter = acequire(\"./lib/event_emitter\").EventEmitter;\nvar oop = acequire(\"./lib/oop\");\n\nvar PlaceHolder = function(session, length, pos, others, mainClass, othersClass) {\n var _self = this;\n this.length = length;\n this.session = session;\n this.doc = session.getDocument();\n this.mainClass = mainClass;\n this.othersClass = othersClass;\n this.$onUpdate = this.onUpdate.bind(this);\n this.doc.on(\"change\", this.$onUpdate);\n this.$others = others;\n \n this.$onCursorChange = function() {\n setTimeout(function() {\n _self.onCursorChange();\n });\n };\n \n this.$pos = pos;\n var undoStack = session.getUndoManager().$undoStack || session.getUndoManager().$undostack || {length: -1};\n this.$undoStackDepth = undoStack.length;\n this.setup();\n\n session.selection.on(\"changeCursor\", this.$onCursorChange);\n};\n\n(function() {\n\n oop.implement(this, EventEmitter);\n this.setup = function() {\n var _self = this;\n var doc = this.doc;\n var session = this.session;\n \n this.selectionBefore = session.selection.toJSON();\n if (session.selection.inMultiSelectMode)\n session.selection.toSingleRange();\n\n this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);\n var pos = this.pos;\n pos.$insertRight = true;\n pos.detach();\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);\n this.others = [];\n this.$others.forEach(function(other) {\n var anchor = doc.createAnchor(other.row, other.column);\n anchor.$insertRight = true;\n anchor.detach();\n _self.others.push(anchor);\n });\n session.setUndoSelect(false);\n };\n this.showOtherMarkers = function() {\n if (this.othersActive) return;\n var session = this.session;\n var _self = this;\n this.othersActive = true;\n this.others.forEach(function(anchor) {\n anchor.markerId = session.addMarker(new Range(anchor.row, anchor.column, anchor.row, anchor.column+_self.length), _self.othersClass, null, false);\n });\n };\n this.hideOtherMarkers = function() {\n if (!this.othersActive) return;\n this.othersActive = false;\n for (var i = 0; i < this.others.length; i++) {\n this.session.removeMarker(this.others[i].markerId);\n }\n };\n this.onUpdate = function(delta) {\n if (this.$updating)\n return this.updateAnchors(delta);\n \n var range = delta;\n if (range.start.row !== range.end.row) return;\n if (range.start.row !== this.pos.row) return;\n this.$updating = true;\n var lengthDiff = delta.action === \"insert\" ? range.end.column - range.start.column : range.start.column - range.end.column;\n var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;\n var distanceFromStart = range.start.column - this.pos.column;\n \n this.updateAnchors(delta);\n \n if (inMainRange)\n this.length += lengthDiff;\n\n if (inMainRange && !this.session.$fromUndo) {\n if (delta.action === 'insert') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.insertMergedLines(newPos, delta.lines);\n }\n } else if (delta.action === 'remove') {\n for (var i = this.others.length - 1; i >= 0; i--) {\n var otherPos = this.others[i];\n var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};\n this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));\n }\n }\n }\n \n this.$updating = false;\n this.updateMarkers();\n };\n \n this.updateAnchors = function(delta) {\n this.pos.onChange(delta);\n for (var i = this.others.length; i--;)\n this.others[i].onChange(delta);\n this.updateMarkers();\n };\n \n this.updateMarkers = function() {\n if (this.$updating)\n return;\n var _self = this;\n var session = this.session;\n var updateMarker = function(pos, className) {\n session.removeMarker(pos.markerId);\n pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false);\n };\n updateMarker(this.pos, this.mainClass);\n for (var i = this.others.length; i--;)\n updateMarker(this.others[i], this.othersClass);\n };\n\n this.onCursorChange = function(event) {\n if (this.$updating || !this.session) return;\n var pos = this.session.selection.getCursor();\n if (pos.row === this.pos.row && pos.column >= this.pos.column && pos.column <= this.pos.column + this.length) {\n this.showOtherMarkers();\n this._emit(\"cursorEnter\", event);\n } else {\n this.hideOtherMarkers();\n this._emit(\"cursorLeave\", event);\n }\n }; \n this.detach = function() {\n this.session.removeMarker(this.pos && this.pos.markerId);\n this.hideOtherMarkers();\n this.doc.removeEventListener(\"change\", this.$onUpdate);\n this.session.selection.removeEventListener(\"changeCursor\", this.$onCursorChange);\n this.session.setUndoSelect(true);\n this.session = null;\n };\n this.cancel = function() {\n if (this.$undoStackDepth === -1)\n return;\n var undoManager = this.session.getUndoManager();\n var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;\n for (var i = 0; i < undosRequired; i++) {\n undoManager.undo(true);\n }\n if (this.selectionBefore)\n this.session.selection.fromJSON(this.selectionBefore);\n };\n}).call(PlaceHolder.prototype);\n\n\nexports.PlaceHolder = PlaceHolder;\n});\n\nace.define(\"ace/mouse/multi_select_handler\",[\"require\",\"exports\",\"module\",\"ace/lib/event\",\"ace/lib/useragent\"], function(acequire, exports, module) {\n\nvar event = acequire(\"../lib/event\");\nvar useragent = acequire(\"../lib/useragent\");\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\n\nfunction onMouseDown(e) {\n var ev = e.domEvent;\n var alt = ev.altKey;\n var shift = ev.shiftKey;\n var ctrl = ev.ctrlKey;\n var accel = e.getAccelKey();\n var button = e.getButton();\n \n if (ctrl && useragent.isMac)\n button = ev.button;\n\n if (e.editor.inMultiSelectMode && button == 2) {\n e.editor.textInput.onContextMenu(e.domEvent);\n return;\n }\n \n if (!ctrl && !alt && !accel) {\n if (button === 0 && e.editor.inMultiSelectMode)\n e.editor.exitMultiSelectMode();\n return;\n }\n \n if (button !== 0)\n return;\n\n var editor = e.editor;\n var selection = editor.selection;\n var isMultiSelect = editor.inMultiSelectMode;\n var pos = e.getDocumentPosition();\n var cursor = selection.getCursor();\n var inSelection = e.inSelection() || (selection.isEmpty() && isSamePoint(pos, cursor));\n\n var mouseX = e.x, mouseY = e.y;\n var onMouseSelection = function(e) {\n mouseX = e.clientX;\n mouseY = e.clientY;\n };\n \n var session = editor.session;\n var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var screenCursor = screenAnchor;\n \n var selectionMode;\n if (editor.$mouseHandler.$enableJumpToDef) {\n if (ctrl && alt || accel && alt)\n selectionMode = shift ? \"block\" : \"add\";\n else if (alt && editor.$blockSelectEnabled)\n selectionMode = \"block\";\n } else {\n if (accel && !alt) {\n selectionMode = \"add\";\n if (!isMultiSelect && shift)\n return;\n } else if (alt && editor.$blockSelectEnabled) {\n selectionMode = \"block\";\n }\n }\n \n if (selectionMode && useragent.isMac && ev.ctrlKey) {\n editor.$mouseHandler.cancelContextMenu();\n }\n\n if (selectionMode == \"add\") {\n if (!isMultiSelect && inSelection)\n return; // dragging\n\n if (!isMultiSelect) {\n var range = selection.toOrientedRange();\n editor.addSelectionMarker(range);\n }\n\n var oldRange = selection.rangeList.rangeAtPoint(pos);\n \n \n editor.$blockScrolling++;\n editor.inVirtualSelectionMode = true;\n \n if (shift) {\n oldRange = null;\n range = selection.ranges[0] || range;\n editor.removeSelectionMarker(range);\n }\n editor.once(\"mouseup\", function() {\n var tmpSel = selection.toOrientedRange();\n\n if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))\n selection.substractPoint(tmpSel.cursor);\n else {\n if (shift) {\n selection.substractPoint(range.cursor);\n } else if (range) {\n editor.removeSelectionMarker(range);\n selection.addRange(range);\n }\n selection.addRange(tmpSel);\n }\n editor.$blockScrolling--;\n editor.inVirtualSelectionMode = false;\n });\n\n } else if (selectionMode == \"block\") {\n e.stop();\n editor.inVirtualSelectionMode = true; \n var initialRange;\n var rectSel = [];\n var blockSelect = function() {\n var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);\n var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX);\n\n if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))\n return;\n screenCursor = newCursor;\n \n editor.$blockScrolling++;\n editor.selection.moveToPosition(cursor);\n editor.renderer.scrollCursorIntoView();\n\n editor.removeSelectionMarkers(rectSel);\n rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);\n if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())\n rectSel[0] = editor.$mouseHandler.$clickSelection.clone();\n rectSel.forEach(editor.addSelectionMarker, editor);\n editor.updateSelectionMarkers();\n editor.$blockScrolling--;\n };\n editor.$blockScrolling++;\n if (isMultiSelect && !accel) {\n selection.toSingleRange();\n } else if (!isMultiSelect && accel) {\n initialRange = selection.toOrientedRange();\n editor.addSelectionMarker(initialRange);\n }\n \n if (shift)\n screenAnchor = session.documentToScreenPosition(selection.lead); \n else\n selection.moveToPosition(pos);\n editor.$blockScrolling--;\n \n screenCursor = {row: -1, column: -1};\n\n var onMouseSelectionEnd = function(e) {\n clearInterval(timerId);\n editor.removeSelectionMarkers(rectSel);\n if (!rectSel.length)\n rectSel = [selection.toOrientedRange()];\n editor.$blockScrolling++;\n if (initialRange) {\n editor.removeSelectionMarker(initialRange);\n selection.toSingleRange(initialRange);\n }\n for (var i = 0; i < rectSel.length; i++)\n selection.addRange(rectSel[i]);\n editor.inVirtualSelectionMode = false;\n editor.$mouseHandler.$clickSelection = null;\n editor.$blockScrolling--;\n };\n\n var onSelectionInterval = blockSelect;\n\n event.capture(editor.container, onMouseSelection, onMouseSelectionEnd);\n var timerId = setInterval(function() {onSelectionInterval();}, 20);\n\n return e.preventDefault();\n }\n}\n\n\nexports.onMouseDown = onMouseDown;\n\n});\n\nace.define(\"ace/commands/multi_select_commands\",[\"require\",\"exports\",\"module\",\"ace/keyboard/hash_handler\"], function(acequire, exports, module) {\nexports.defaultCommands = [{\n name: \"addCursorAbove\",\n exec: function(editor) { editor.selectMoreLines(-1); },\n bindKey: {win: \"Ctrl-Alt-Up\", mac: \"Ctrl-Alt-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelow\",\n exec: function(editor) { editor.selectMoreLines(1); },\n bindKey: {win: \"Ctrl-Alt-Down\", mac: \"Ctrl-Alt-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorAboveSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Up\", mac: \"Ctrl-Alt-Shift-Up\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"addCursorBelowSkipCurrent\",\n exec: function(editor) { editor.selectMoreLines(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Down\", mac: \"Ctrl-Alt-Shift-Down\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreBefore\",\n exec: function(editor) { editor.selectMore(-1); },\n bindKey: {win: \"Ctrl-Alt-Left\", mac: \"Ctrl-Alt-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectMoreAfter\",\n exec: function(editor) { editor.selectMore(1); },\n bindKey: {win: \"Ctrl-Alt-Right\", mac: \"Ctrl-Alt-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextBefore\",\n exec: function(editor) { editor.selectMore(-1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Left\", mac: \"Ctrl-Alt-Shift-Left\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"selectNextAfter\",\n exec: function(editor) { editor.selectMore(1, true); },\n bindKey: {win: \"Ctrl-Alt-Shift-Right\", mac: \"Ctrl-Alt-Shift-Right\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}, {\n name: \"splitIntoLines\",\n exec: function(editor) { editor.multiSelect.splitIntoLines(); },\n bindKey: {win: \"Ctrl-Alt-L\", mac: \"Ctrl-Alt-L\"},\n readOnly: true\n}, {\n name: \"alignCursors\",\n exec: function(editor) { editor.alignCursors(); },\n bindKey: {win: \"Ctrl-Alt-A\", mac: \"Ctrl-Alt-A\"},\n scrollIntoView: \"cursor\"\n}, {\n name: \"findAll\",\n exec: function(editor) { editor.findAll(); },\n bindKey: {win: \"Ctrl-Alt-K\", mac: \"Ctrl-Alt-G\"},\n scrollIntoView: \"cursor\",\n readOnly: true\n}];\nexports.multiSelectCommands = [{\n name: \"singleSelection\",\n bindKey: \"esc\",\n exec: function(editor) { editor.exitMultiSelectMode(); },\n scrollIntoView: \"cursor\",\n readOnly: true,\n isAvailable: function(editor) {return editor && editor.inMultiSelectMode;}\n}];\n\nvar HashHandler = acequire(\"../keyboard/hash_handler\").HashHandler;\nexports.keyboardHandler = new HashHandler(exports.multiSelectCommands);\n\n});\n\nace.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\",\"ace/config\"], function(acequire, exports, module) {\n\nvar RangeList = acequire(\"./range_list\").RangeList;\nvar Range = acequire(\"./range\").Range;\nvar Selection = acequire(\"./selection\").Selection;\nvar onMouseDown = acequire(\"./mouse/multi_select_handler\").onMouseDown;\nvar event = acequire(\"./lib/event\");\nvar lang = acequire(\"./lib/lang\");\nvar commands = acequire(\"./commands/multi_select_commands\");\nexports.commands = commands.defaultCommands.concat(commands.multiSelectCommands);\nvar Search = acequire(\"./search\").Search;\nvar search = new Search();\n\nfunction find(session, needle, dir) {\n search.$options.wrap = true;\n search.$options.needle = needle;\n search.$options.backwards = dir == -1;\n return search.find(session);\n}\nvar EditSession = acequire(\"./edit_session\").EditSession;\n(function() {\n this.getSelectionMarkers = function() {\n return this.$selectionMarkers;\n };\n}).call(EditSession.prototype);\n(function() {\n this.ranges = null;\n this.rangeList = null;\n this.addRange = function(range, $blockChangeEvents) {\n if (!range)\n return;\n\n if (!this.inMultiSelectMode && this.rangeCount === 0) {\n var oldRange = this.toOrientedRange();\n this.rangeList.add(oldRange);\n this.rangeList.add(range);\n if (this.rangeList.ranges.length != 2) {\n this.rangeList.removeAll();\n return $blockChangeEvents || this.fromOrientedRange(range);\n }\n this.rangeList.removeAll();\n this.rangeList.add(oldRange);\n this.$onAddRange(oldRange);\n }\n\n if (!range.cursor)\n range.cursor = range.end;\n\n var removed = this.rangeList.add(range);\n\n this.$onAddRange(range);\n\n if (removed.length)\n this.$onRemoveRange(removed);\n\n if (this.rangeCount > 1 && !this.inMultiSelectMode) {\n this._signal(\"multiSelect\");\n this.inMultiSelectMode = true;\n this.session.$undoSelect = false;\n this.rangeList.attach(this.session);\n }\n\n return $blockChangeEvents || this.fromOrientedRange(range);\n };\n\n this.toSingleRange = function(range) {\n range = range || this.ranges[0];\n var removed = this.rangeList.removeAll();\n if (removed.length)\n this.$onRemoveRange(removed);\n\n range && this.fromOrientedRange(range);\n };\n this.substractPoint = function(pos) {\n var removed = this.rangeList.substractPoint(pos);\n if (removed) {\n this.$onRemoveRange(removed);\n return removed[0];\n }\n };\n this.mergeOverlappingRanges = function() {\n var removed = this.rangeList.merge();\n if (removed.length)\n this.$onRemoveRange(removed);\n else if(this.ranges[0])\n this.fromOrientedRange(this.ranges[0]);\n };\n\n this.$onAddRange = function(range) {\n this.rangeCount = this.rangeList.ranges.length;\n this.ranges.unshift(range);\n this._signal(\"addRange\", {range: range});\n };\n\n this.$onRemoveRange = function(removed) {\n this.rangeCount = this.rangeList.ranges.length;\n if (this.rangeCount == 1 && this.inMultiSelectMode) {\n var lastRange = this.rangeList.ranges.pop();\n removed.push(lastRange);\n this.rangeCount = 0;\n }\n\n for (var i = removed.length; i--; ) {\n var index = this.ranges.indexOf(removed[i]);\n this.ranges.splice(index, 1);\n }\n\n this._signal(\"removeRange\", {ranges: removed});\n\n if (this.rangeCount === 0 && this.inMultiSelectMode) {\n this.inMultiSelectMode = false;\n this._signal(\"singleSelect\");\n this.session.$undoSelect = true;\n this.rangeList.detach(this.session);\n }\n\n lastRange = lastRange || this.ranges[0];\n if (lastRange && !lastRange.isEqual(this.getRange()))\n this.fromOrientedRange(lastRange);\n };\n this.$initRangeList = function() {\n if (this.rangeList)\n return;\n\n this.rangeList = new RangeList();\n this.ranges = [];\n this.rangeCount = 0;\n };\n this.getAllRanges = function() {\n return this.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];\n };\n\n this.splitIntoLines = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var range = this.getRange();\n var isBackwards = this.isBackwards();\n var startRow = range.start.row;\n var endRow = range.end.row;\n if (startRow == endRow) {\n if (isBackwards)\n var start = range.end, end = range.start;\n else\n var start = range.start, end = range.end;\n \n this.addRange(Range.fromPoints(end, end));\n this.addRange(Range.fromPoints(start, start));\n return;\n }\n\n var rectSel = [];\n var r = this.getLineRange(startRow, true);\n r.start.column = range.start.column;\n rectSel.push(r);\n\n for (var i = startRow + 1; i < endRow; i++)\n rectSel.push(this.getLineRange(i, true));\n\n r = this.getLineRange(endRow, true);\n r.end.column = range.end.column;\n rectSel.push(r);\n\n rectSel.forEach(this.addRange, this);\n }\n };\n this.toggleBlockSelection = function () {\n if (this.rangeCount > 1) {\n var ranges = this.rangeList.ranges;\n var lastRange = ranges[ranges.length - 1];\n var range = Range.fromPoints(ranges[0].start, lastRange.end);\n\n this.toSingleRange();\n this.setSelectionRange(range, lastRange.cursor == lastRange.start);\n } else {\n var cursor = this.session.documentToScreenPosition(this.selectionLead);\n var anchor = this.session.documentToScreenPosition(this.selectionAnchor);\n\n var rectSel = this.rectangularRangeBlock(cursor, anchor);\n rectSel.forEach(this.addRange, this);\n }\n };\n this.rectangularRangeBlock = function(screenCursor, screenAnchor, includeEmptyLines) {\n var rectSel = [];\n\n var xBackwards = screenCursor.column < screenAnchor.column;\n if (xBackwards) {\n var startColumn = screenCursor.column;\n var endColumn = screenAnchor.column;\n var startOffsetX = screenCursor.offsetX;\n var endOffsetX = screenAnchor.offsetX;\n } else {\n var startColumn = screenAnchor.column;\n var endColumn = screenCursor.column;\n var startOffsetX = screenAnchor.offsetX;\n var endOffsetX = screenCursor.offsetX;\n }\n\n var yBackwards = screenCursor.row < screenAnchor.row;\n if (yBackwards) {\n var startRow = screenCursor.row;\n var endRow = screenAnchor.row;\n } else {\n var startRow = screenAnchor.row;\n var endRow = screenCursor.row;\n }\n\n if (startColumn < 0)\n startColumn = 0;\n if (startRow < 0)\n startRow = 0;\n\n if (startRow == endRow)\n includeEmptyLines = true;\n\n for (var row = startRow; row <= endRow; row++) {\n var range = Range.fromPoints(\n this.session.screenToDocumentPosition(row, startColumn, startOffsetX),\n this.session.screenToDocumentPosition(row, endColumn, endOffsetX)\n );\n if (range.isEmpty()) {\n if (docEnd && isSamePoint(range.end, docEnd))\n break;\n var docEnd = range.end;\n }\n range.cursor = xBackwards ? range.start : range.end;\n rectSel.push(range);\n }\n\n if (yBackwards)\n rectSel.reverse();\n\n if (!includeEmptyLines) {\n var end = rectSel.length - 1;\n while (rectSel[end].isEmpty() && end > 0)\n end--;\n if (end > 0) {\n var start = 0;\n while (rectSel[start].isEmpty())\n start++;\n }\n for (var i = end; i >= start; i--) {\n if (rectSel[i].isEmpty())\n rectSel.splice(i, 1);\n }\n }\n\n return rectSel;\n };\n}).call(Selection.prototype);\nvar Editor = acequire(\"./editor\").Editor;\n(function() {\n this.updateSelectionMarkers = function() {\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n this.addSelectionMarker = function(orientedRange) {\n if (!orientedRange.cursor)\n orientedRange.cursor = orientedRange.end;\n\n var style = this.getSelectionStyle();\n orientedRange.marker = this.session.addMarker(orientedRange, \"ace_selection\", style);\n\n this.session.$selectionMarkers.push(orientedRange);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n return orientedRange;\n };\n this.removeSelectionMarker = function(range) {\n if (!range.marker)\n return;\n this.session.removeMarker(range.marker);\n var index = this.session.$selectionMarkers.indexOf(range);\n if (index != -1)\n this.session.$selectionMarkers.splice(index, 1);\n this.session.selectionMarkerCount = this.session.$selectionMarkers.length;\n };\n\n this.removeSelectionMarkers = function(ranges) {\n var markerList = this.session.$selectionMarkers;\n for (var i = ranges.length; i--; ) {\n var range = ranges[i];\n if (!range.marker)\n continue;\n this.session.removeMarker(range.marker);\n var index = markerList.indexOf(range);\n if (index != -1)\n markerList.splice(index, 1);\n }\n this.session.selectionMarkerCount = markerList.length;\n };\n\n this.$onAddRange = function(e) {\n this.addSelectionMarker(e.range);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onRemoveRange = function(e) {\n this.removeSelectionMarkers(e.ranges);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onMultiSelect = function(e) {\n if (this.inMultiSelectMode)\n return;\n this.inMultiSelectMode = true;\n\n this.setStyle(\"ace_multiselect\");\n this.keyBinding.addKeyboardHandler(commands.keyboardHandler);\n this.commands.setDefaultHandler(\"exec\", this.$onMultiSelectExec);\n\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n };\n\n this.$onSingleSelect = function(e) {\n if (this.session.multiSelect.inVirtualMode)\n return;\n this.inMultiSelectMode = false;\n\n this.unsetStyle(\"ace_multiselect\");\n this.keyBinding.removeKeyboardHandler(commands.keyboardHandler);\n\n this.commands.removeDefaultHandler(\"exec\", this.$onMultiSelectExec);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n this._emit(\"changeSelection\");\n };\n\n this.$onMultiSelectExec = function(e) {\n var command = e.command;\n var editor = e.editor;\n if (!editor.multiSelect)\n return;\n if (!command.multiSelectAction) {\n var result = command.exec(editor, e.args || {});\n editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());\n editor.multiSelect.mergeOverlappingRanges();\n } else if (command.multiSelectAction == \"forEach\") {\n result = editor.forEachSelection(command, e.args);\n } else if (command.multiSelectAction == \"forEachLine\") {\n result = editor.forEachSelection(command, e.args, true);\n } else if (command.multiSelectAction == \"single\") {\n editor.exitMultiSelectMode();\n result = command.exec(editor, e.args || {});\n } else {\n result = command.multiSelectAction(editor, e.args || {});\n }\n return result;\n }; \n this.forEachSelection = function(cmd, args, options) {\n if (this.inVirtualSelectionMode)\n return;\n var keepOrder = options && options.keepOrder;\n var $byLines = options == true || options && options.$byLines;\n var session = this.session;\n var selection = this.selection;\n var rangeList = selection.rangeList;\n var ranges = (keepOrder ? selection : rangeList).ranges;\n var result;\n \n if (!ranges.length)\n return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n \n var reg = selection._eventRegistry;\n selection._eventRegistry = {};\n\n var tmpSel = new Selection(session);\n this.inVirtualSelectionMode = true;\n for (var i = ranges.length; i--;) {\n if ($byLines) {\n while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)\n i--;\n }\n tmpSel.fromOrientedRange(ranges[i]);\n tmpSel.index = i;\n this.selection = session.selection = tmpSel;\n var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});\n if (!result && cmdResult !== undefined)\n result = cmdResult;\n tmpSel.toOrientedRange(ranges[i]);\n }\n tmpSel.detach();\n\n this.selection = session.selection = selection;\n this.inVirtualSelectionMode = false;\n selection._eventRegistry = reg;\n selection.mergeOverlappingRanges();\n \n var anim = this.renderer.$scrollAnimation;\n this.onCursorChange();\n this.onSelectionChange();\n if (anim && anim.from == anim.to)\n this.renderer.animateScrolling(anim.from);\n \n return result;\n };\n this.exitMultiSelectMode = function() {\n if (!this.inMultiSelectMode || this.inVirtualSelectionMode)\n return;\n this.multiSelect.toSingleRange();\n };\n\n this.getSelectedText = function() {\n var text = \"\";\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var ranges = this.multiSelect.rangeList.ranges;\n var buf = [];\n for (var i = 0; i < ranges.length; i++) {\n buf.push(this.session.getTextRange(ranges[i]));\n }\n var nl = this.session.getDocument().getNewLineCharacter();\n text = buf.join(nl);\n if (text.length == (buf.length - 1) * nl.length)\n text = \"\";\n } else if (!this.selection.isEmpty()) {\n text = this.session.getTextRange(this.getSelectionRange());\n }\n return text;\n };\n \n this.$checkMultiselectChange = function(e, anchor) {\n if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {\n var range = this.multiSelect.ranges[0];\n if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)\n return;\n var pos = anchor == this.multiSelect.anchor\n ? range.cursor == range.start ? range.end : range.start\n : range.cursor;\n if (pos.row != anchor.row \n || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)\n this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());\n }\n };\n this.findAll = function(needle, options, additive) {\n options = options || {};\n options.needle = needle || options.needle;\n if (options.needle == undefined) {\n var range = this.selection.isEmpty()\n ? this.selection.getWordRange()\n : this.selection.getRange();\n options.needle = this.session.getTextRange(range);\n } \n this.$search.set(options);\n \n var ranges = this.$search.findAll(this.session);\n if (!ranges.length)\n return 0;\n\n this.$blockScrolling += 1;\n var selection = this.multiSelect;\n\n if (!additive)\n selection.toSingleRange(ranges[0]);\n\n for (var i = ranges.length; i--; )\n selection.addRange(ranges[i], true);\n if (range && selection.rangeList.rangeAtPoint(range.start))\n selection.addRange(range, true);\n \n this.$blockScrolling -= 1;\n\n return ranges.length;\n };\n this.selectMoreLines = function(dir, skip) {\n var range = this.selection.toOrientedRange();\n var isBackwards = range.cursor == range.end;\n\n var screenLead = this.session.documentToScreenPosition(range.cursor);\n if (this.selection.$desiredColumn)\n screenLead.column = this.selection.$desiredColumn;\n\n var lead = this.session.screenToDocumentPosition(screenLead.row + dir, screenLead.column);\n\n if (!range.isEmpty()) {\n var screenAnchor = this.session.documentToScreenPosition(isBackwards ? range.end : range.start);\n var anchor = this.session.screenToDocumentPosition(screenAnchor.row + dir, screenAnchor.column);\n } else {\n var anchor = lead;\n }\n\n if (isBackwards) {\n var newRange = Range.fromPoints(lead, anchor);\n newRange.cursor = newRange.start;\n } else {\n var newRange = Range.fromPoints(anchor, lead);\n newRange.cursor = newRange.end;\n }\n\n newRange.desiredColumn = screenLead.column;\n if (!this.selection.inMultiSelectMode) {\n this.selection.addRange(range);\n } else {\n if (skip)\n var toRemove = range.cursor;\n }\n\n this.selection.addRange(newRange);\n if (toRemove)\n this.selection.substractPoint(toRemove);\n };\n this.transposeSelections = function(dir) {\n var session = this.session;\n var sel = session.multiSelect;\n var all = sel.ranges;\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n if (range.isEmpty()) {\n var tmp = session.getWordRange(range.start.row, range.start.column);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n range.end.row = tmp.end.row;\n range.end.column = tmp.end.column;\n }\n }\n sel.mergeOverlappingRanges();\n\n var words = [];\n for (var i = all.length; i--; ) {\n var range = all[i];\n words.unshift(session.getTextRange(range));\n }\n\n if (dir < 0)\n words.unshift(words.pop());\n else\n words.push(words.shift());\n\n for (var i = all.length; i--; ) {\n var range = all[i];\n var tmp = range.clone();\n session.replace(range, words[i]);\n range.start.row = tmp.start.row;\n range.start.column = tmp.start.column;\n }\n };\n this.selectMore = function(dir, skip, stopAtFirst) {\n var session = this.session;\n var sel = session.multiSelect;\n\n var range = sel.toOrientedRange();\n if (range.isEmpty()) {\n range = session.getWordRange(range.start.row, range.start.column);\n range.cursor = dir == -1 ? range.start : range.end;\n this.multiSelect.addRange(range);\n if (stopAtFirst)\n return;\n }\n var needle = session.getTextRange(range);\n\n var newRange = find(session, needle, dir);\n if (newRange) {\n newRange.cursor = dir == -1 ? newRange.start : newRange.end;\n this.$blockScrolling += 1;\n this.session.unfold(newRange);\n this.multiSelect.addRange(newRange);\n this.$blockScrolling -= 1;\n this.renderer.scrollCursorIntoView(null, 0.5);\n }\n if (skip)\n this.multiSelect.substractPoint(range.cursor);\n };\n this.alignCursors = function() {\n var session = this.session;\n var sel = session.multiSelect;\n var ranges = sel.ranges;\n var row = -1;\n var sameRowRanges = ranges.filter(function(r) {\n if (r.cursor.row == row)\n return true;\n row = r.cursor.row;\n });\n \n if (!ranges.length || sameRowRanges.length == ranges.length - 1) {\n var range = this.selection.getRange();\n var fr = range.start.row, lr = range.end.row;\n var guessRange = fr == lr;\n if (guessRange) {\n var max = this.session.getLength();\n var line;\n do {\n line = this.session.getLine(lr);\n } while (/[=:]/.test(line) && ++lr < max);\n do {\n line = this.session.getLine(fr);\n } while (/[=:]/.test(line) && --fr > 0);\n \n if (fr < 0) fr = 0;\n if (lr >= max) lr = max - 1;\n }\n var lines = this.session.removeFullLines(fr, lr);\n lines = this.$reAlignText(lines, guessRange);\n this.session.insert({row: fr, column: 0}, lines.join(\"\\n\") + \"\\n\");\n if (!guessRange) {\n range.start.column = 0;\n range.end.column = lines[lines.length - 1].length;\n }\n this.selection.setRange(range);\n } else {\n sameRowRanges.forEach(function(r) {\n sel.substractPoint(r.cursor);\n });\n\n var maxCol = 0;\n var minSpace = Infinity;\n var spaceOffsets = ranges.map(function(r) {\n var p = r.cursor;\n var line = session.getLine(p.row);\n var spaceOffset = line.substr(p.column).search(/\\S/g);\n if (spaceOffset == -1)\n spaceOffset = 0;\n\n if (p.column > maxCol)\n maxCol = p.column;\n if (spaceOffset < minSpace)\n minSpace = spaceOffset;\n return spaceOffset;\n });\n ranges.forEach(function(r, i) {\n var p = r.cursor;\n var l = maxCol - p.column;\n var d = spaceOffsets[i] - minSpace;\n if (l > d)\n session.insert(p, lang.stringRepeat(\" \", l - d));\n else\n session.remove(new Range(p.row, p.column, p.row, p.column - l + d));\n\n r.start.column = r.end.column = maxCol;\n r.start.row = r.end.row = p.row;\n r.cursor = r.end;\n });\n sel.fromOrientedRange(ranges[0]);\n this.renderer.updateCursor();\n this.renderer.updateBackMarkers();\n }\n };\n\n this.$reAlignText = function(lines, forceLeft) {\n var isLeftAligned = true, isRightAligned = true;\n var startW, textW, endW;\n\n return lines.map(function(line) {\n var m = line.match(/(\\s*)(.*?)(\\s*)([=:].*)/);\n if (!m)\n return [line];\n\n if (startW == null) {\n startW = m[1].length;\n textW = m[2].length;\n endW = m[3].length;\n return m;\n }\n\n if (startW + textW + endW != m[1].length + m[2].length + m[3].length)\n isRightAligned = false;\n if (startW != m[1].length)\n isLeftAligned = false;\n\n if (startW > m[1].length)\n startW = m[1].length;\n if (textW < m[2].length)\n textW = m[2].length;\n if (endW > m[3].length)\n endW = m[3].length;\n\n return m;\n }).map(forceLeft ? alignLeft :\n isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);\n\n function spaces(n) {\n return lang.stringRepeat(\" \", n);\n }\n\n function alignLeft(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(textW - m[2].length + endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function alignRight(m) {\n return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]\n + spaces(endW, \" \")\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n function unAlign(m) {\n return !m[2] ? m[0] : spaces(startW) + m[2]\n + spaces(endW)\n + m[4].replace(/^([=:])\\s+/, \"$1 \");\n }\n };\n}).call(Editor.prototype);\n\n\nfunction isSamePoint(p1, p2) {\n return p1.row == p2.row && p1.column == p2.column;\n}\nexports.onSessionChange = function(e) {\n var session = e.session;\n if (session && !session.multiSelect) {\n session.$selectionMarkers = [];\n session.selection.$initRangeList();\n session.multiSelect = session.selection;\n }\n this.multiSelect = session && session.multiSelect;\n\n var oldSession = e.oldSession;\n if (oldSession) {\n oldSession.multiSelect.off(\"addRange\", this.$onAddRange);\n oldSession.multiSelect.off(\"removeRange\", this.$onRemoveRange);\n oldSession.multiSelect.off(\"multiSelect\", this.$onMultiSelect);\n oldSession.multiSelect.off(\"singleSelect\", this.$onSingleSelect);\n oldSession.multiSelect.lead.off(\"change\", this.$checkMultiselectChange);\n oldSession.multiSelect.anchor.off(\"change\", this.$checkMultiselectChange);\n }\n\n if (session) {\n session.multiSelect.on(\"addRange\", this.$onAddRange);\n session.multiSelect.on(\"removeRange\", this.$onRemoveRange);\n session.multiSelect.on(\"multiSelect\", this.$onMultiSelect);\n session.multiSelect.on(\"singleSelect\", this.$onSingleSelect);\n session.multiSelect.lead.on(\"change\", this.$checkMultiselectChange);\n session.multiSelect.anchor.on(\"change\", this.$checkMultiselectChange);\n }\n\n if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {\n if (session.selection.inMultiSelectMode)\n this.$onMultiSelect();\n else\n this.$onSingleSelect();\n }\n};\nfunction MultiSelect(editor) {\n if (editor.$multiselectOnSessionChange)\n return;\n editor.$onAddRange = editor.$onAddRange.bind(editor);\n editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);\n editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);\n editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);\n editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);\n editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);\n\n editor.$multiselectOnSessionChange(editor);\n editor.on(\"changeSession\", editor.$multiselectOnSessionChange);\n\n editor.on(\"mousedown\", onMouseDown);\n editor.commands.addCommands(commands.defaultCommands);\n\n addAltCursorListeners(editor);\n}\n\nfunction addAltCursorListeners(editor){\n var el = editor.textInput.getElement();\n var altCursor = false;\n event.addListener(el, \"keydown\", function(e) {\n var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);\n if (editor.$blockSelectEnabled && altDown) {\n if (!altCursor) {\n editor.renderer.setMouseCursor(\"crosshair\");\n altCursor = true;\n }\n } else if (altCursor) {\n reset();\n }\n });\n\n event.addListener(el, \"keyup\", reset);\n event.addListener(el, \"blur\", reset);\n function reset(e) {\n if (altCursor) {\n editor.renderer.setMouseCursor(\"\");\n altCursor = false;\n }\n }\n}\n\nexports.MultiSelect = MultiSelect;\n\n\nacequire(\"./config\").defineOptions(Editor.prototype, \"editor\", {\n enableMultiselect: {\n set: function(val) {\n MultiSelect(this);\n if (val) {\n this.on(\"changeSession\", this.$multiselectOnSessionChange);\n this.on(\"mousedown\", onMouseDown);\n } else {\n this.off(\"changeSession\", this.$multiselectOnSessionChange);\n this.off(\"mousedown\", onMouseDown);\n }\n },\n value: true\n },\n enableBlockSelect: {\n set: function(val) {\n this.$blockSelectEnabled = val;\n },\n value: true\n }\n});\n\n\n\n});\n\nace.define(\"ace/mode/folding/fold_mode\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../../range\").Range;\n\nvar FoldMode = exports.FoldMode = function() {};\n\n(function() {\n\n this.foldingStartMarker = null;\n this.foldingStopMarker = null;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n if (this.foldingStartMarker.test(line))\n return \"start\";\n if (foldStyle == \"markbeginend\"\n && this.foldingStopMarker\n && this.foldingStopMarker.test(line))\n return \"end\";\n return \"\";\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row) {\n return null;\n };\n\n this.indentationBlock = function(session, row, column) {\n var re = /\\S/;\n var line = session.getLine(row);\n var startLevel = line.search(re);\n if (startLevel == -1)\n return;\n\n var startColumn = column || line.length;\n var maxRow = session.getLength();\n var startRow = row;\n var endRow = row;\n\n while (++row < maxRow) {\n var level = session.getLine(row).search(re);\n\n if (level == -1)\n continue;\n\n if (level <= startLevel)\n break;\n\n endRow = row;\n }\n\n if (endRow > startRow) {\n var endColumn = session.getLine(endRow).length;\n return new Range(startRow, startColumn, endRow, endColumn);\n }\n };\n\n this.openingBracketBlock = function(session, bracket, row, column, typeRe) {\n var start = {row: row, column: column + 1};\n var end = session.$findClosingBracket(bracket, start, typeRe);\n if (!end)\n return;\n\n var fw = session.foldWidgets[end.row];\n if (fw == null)\n fw = session.getFoldWidget(end.row);\n\n if (fw == \"start\" && end.row > start.row) {\n end.row --;\n end.column = session.getLine(end.row).length;\n }\n return Range.fromPoints(start, end);\n };\n\n this.closingBracketBlock = function(session, bracket, row, column, typeRe) {\n var end = {row: row, column: column};\n var start = session.$findOpeningBracket(bracket, end);\n\n if (!start)\n return;\n\n start.column++;\n end.column--;\n\n return Range.fromPoints(start, end);\n };\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/theme/textmate\",[\"require\",\"exports\",\"module\",\"ace/lib/dom\"], function(acequire, exports, module) {\n\"use strict\";\n\nexports.isDark = false;\nexports.cssClass = \"ace-tm\";\nexports.cssText = \".ace-tm .ace_gutter {\\\nbackground: #f0f0f0;\\\ncolor: #333;\\\n}\\\n.ace-tm .ace_print-margin {\\\nwidth: 1px;\\\nbackground: #e8e8e8;\\\n}\\\n.ace-tm .ace_fold {\\\nbackground-color: #6B72E6;\\\n}\\\n.ace-tm {\\\nbackground-color: #FFFFFF;\\\ncolor: black;\\\n}\\\n.ace-tm .ace_cursor {\\\ncolor: black;\\\n}\\\n.ace-tm .ace_invisible {\\\ncolor: rgb(191, 191, 191);\\\n}\\\n.ace-tm .ace_storage,\\\n.ace-tm .ace_keyword {\\\ncolor: blue;\\\n}\\\n.ace-tm .ace_constant {\\\ncolor: rgb(197, 6, 11);\\\n}\\\n.ace-tm .ace_constant.ace_buildin {\\\ncolor: rgb(88, 72, 246);\\\n}\\\n.ace-tm .ace_constant.ace_language {\\\ncolor: rgb(88, 92, 246);\\\n}\\\n.ace-tm .ace_constant.ace_library {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_invalid {\\\nbackground-color: rgba(255, 0, 0, 0.1);\\\ncolor: red;\\\n}\\\n.ace-tm .ace_support.ace_function {\\\ncolor: rgb(60, 76, 114);\\\n}\\\n.ace-tm .ace_support.ace_constant {\\\ncolor: rgb(6, 150, 14);\\\n}\\\n.ace-tm .ace_support.ace_type,\\\n.ace-tm .ace_support.ace_class {\\\ncolor: rgb(109, 121, 222);\\\n}\\\n.ace-tm .ace_keyword.ace_operator {\\\ncolor: rgb(104, 118, 135);\\\n}\\\n.ace-tm .ace_string {\\\ncolor: rgb(3, 106, 7);\\\n}\\\n.ace-tm .ace_comment {\\\ncolor: rgb(76, 136, 107);\\\n}\\\n.ace-tm .ace_comment.ace_doc {\\\ncolor: rgb(0, 102, 255);\\\n}\\\n.ace-tm .ace_comment.ace_doc.ace_tag {\\\ncolor: rgb(128, 159, 191);\\\n}\\\n.ace-tm .ace_constant.ace_numeric {\\\ncolor: rgb(0, 0, 205);\\\n}\\\n.ace-tm .ace_variable {\\\ncolor: rgb(49, 132, 149);\\\n}\\\n.ace-tm .ace_xml-pe {\\\ncolor: rgb(104, 104, 91);\\\n}\\\n.ace-tm .ace_entity.ace_name.ace_function {\\\ncolor: #0000A2;\\\n}\\\n.ace-tm .ace_heading {\\\ncolor: rgb(12, 7, 255);\\\n}\\\n.ace-tm .ace_list {\\\ncolor:rgb(185, 6, 144);\\\n}\\\n.ace-tm .ace_meta.ace_tag {\\\ncolor:rgb(0, 22, 142);\\\n}\\\n.ace-tm .ace_string.ace_regex {\\\ncolor: rgb(255, 0, 0)\\\n}\\\n.ace-tm .ace_marker-layer .ace_selection {\\\nbackground: rgb(181, 213, 255);\\\n}\\\n.ace-tm.ace_multiselect .ace_selection.ace_start {\\\nbox-shadow: 0 0 3px 0px white;\\\n}\\\n.ace-tm .ace_marker-layer .ace_step {\\\nbackground: rgb(252, 255, 0);\\\n}\\\n.ace-tm .ace_marker-layer .ace_stack {\\\nbackground: rgb(164, 229, 101);\\\n}\\\n.ace-tm .ace_marker-layer .ace_bracket {\\\nmargin: -1px 0 0 -1px;\\\nborder: 1px solid rgb(192, 192, 192);\\\n}\\\n.ace-tm .ace_marker-layer .ace_active-line {\\\nbackground: rgba(0, 0, 0, 0.07);\\\n}\\\n.ace-tm .ace_gutter-active-line {\\\nbackground-color : #dcdcdc;\\\n}\\\n.ace-tm .ace_marker-layer .ace_selected-word {\\\nbackground: rgb(250, 250, 255);\\\nborder: 1px solid rgb(200, 200, 250);\\\n}\\\n.ace-tm .ace_indent-guide {\\\nbackground: url(\\\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\\\") right repeat-y;\\\n}\\\n\";\n\nvar dom = acequire(\"../lib/dom\");\ndom.importCssString(exports.cssText, exports.cssClass);\n});\n\nace.define(\"ace/line_widgets\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"./lib/oop\");\nvar dom = acequire(\"./lib/dom\");\nvar Range = acequire(\"./range\").Range;\n\n\nfunction LineWidgets(session) {\n this.session = session;\n this.session.widgetManager = this;\n this.session.getRowLength = this.getRowLength;\n this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;\n this.updateOnChange = this.updateOnChange.bind(this);\n this.renderWidgets = this.renderWidgets.bind(this);\n this.measureWidgets = this.measureWidgets.bind(this);\n this.session._changedWidgets = [];\n this.$onChangeEditor = this.$onChangeEditor.bind(this);\n \n this.session.on(\"change\", this.updateOnChange);\n this.session.on(\"changeFold\", this.updateOnFold);\n this.session.on(\"changeEditor\", this.$onChangeEditor);\n}\n\n(function() {\n this.getRowLength = function(row) {\n var h;\n if (this.lineWidgets)\n h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;\n else \n h = 0;\n if (!this.$useWrapMode || !this.$wrapData[row]) {\n return 1 + h;\n } else {\n return this.$wrapData[row].length + 1 + h;\n }\n };\n\n this.$getWidgetScreenLength = function() {\n var screenRows = 0;\n this.lineWidgets.forEach(function(w){\n if (w && w.rowCount && !w.hidden)\n screenRows += w.rowCount;\n });\n return screenRows;\n }; \n \n this.$onChangeEditor = function(e) {\n this.attach(e.editor);\n };\n \n this.attach = function(editor) {\n if (editor && editor.widgetManager && editor.widgetManager != this)\n editor.widgetManager.detach();\n\n if (this.editor == editor)\n return;\n\n this.detach();\n this.editor = editor;\n \n if (editor) {\n editor.widgetManager = this;\n editor.renderer.on(\"beforeRender\", this.measureWidgets);\n editor.renderer.on(\"afterRender\", this.renderWidgets);\n }\n };\n this.detach = function(e) {\n var editor = this.editor;\n if (!editor)\n return;\n \n this.editor = null;\n editor.widgetManager = null;\n \n editor.renderer.off(\"beforeRender\", this.measureWidgets);\n editor.renderer.off(\"afterRender\", this.renderWidgets);\n var lineWidgets = this.session.lineWidgets;\n lineWidgets && lineWidgets.forEach(function(w) {\n if (w && w.el && w.el.parentNode) {\n w._inDocument = false;\n w.el.parentNode.removeChild(w.el);\n }\n });\n };\n\n this.updateOnFold = function(e, session) {\n var lineWidgets = session.lineWidgets;\n if (!lineWidgets || !e.action)\n return;\n var fold = e.data;\n var start = fold.start.row;\n var end = fold.end.row;\n var hide = e.action == \"add\";\n for (var i = start + 1; i < end; i++) {\n if (lineWidgets[i])\n lineWidgets[i].hidden = hide;\n }\n if (lineWidgets[end]) {\n if (hide) {\n if (!lineWidgets[start])\n lineWidgets[start] = lineWidgets[end];\n else\n lineWidgets[end].hidden = hide;\n } else {\n if (lineWidgets[start] == lineWidgets[end])\n lineWidgets[start] = undefined;\n lineWidgets[end].hidden = hide;\n }\n }\n };\n \n this.updateOnChange = function(delta) {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n \n var startRow = delta.start.row;\n var len = delta.end.row - startRow;\n\n if (len === 0) {\n } else if (delta.action == 'remove') {\n var removed = lineWidgets.splice(startRow + 1, len);\n removed.forEach(function(w) {\n w && this.removeLineWidget(w);\n }, this);\n this.$updateRows();\n } else {\n var args = new Array(len);\n args.unshift(startRow, 0);\n lineWidgets.splice.apply(lineWidgets, args);\n this.$updateRows();\n }\n };\n \n this.$updateRows = function() {\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets) return;\n var noWidgets = true;\n lineWidgets.forEach(function(w, i) {\n if (w) {\n noWidgets = false;\n w.row = i;\n while (w.$oldWidget) {\n w.$oldWidget.row = i;\n w = w.$oldWidget;\n }\n }\n });\n if (noWidgets)\n this.session.lineWidgets = null;\n };\n\n this.addLineWidget = function(w) {\n if (!this.session.lineWidgets)\n this.session.lineWidgets = new Array(this.session.getLength());\n \n var old = this.session.lineWidgets[w.row];\n if (old) {\n w.$oldWidget = old;\n if (old.el && old.el.parentNode) {\n old.el.parentNode.removeChild(old.el);\n old._inDocument = false;\n }\n }\n \n this.session.lineWidgets[w.row] = w;\n \n w.session = this.session;\n \n var renderer = this.editor.renderer;\n if (w.html && !w.el) {\n w.el = dom.createElement(\"div\");\n w.el.innerHTML = w.html;\n }\n if (w.el) {\n dom.addCssClass(w.el, \"ace_lineWidgetContainer\");\n w.el.style.position = \"absolute\";\n w.el.style.zIndex = 5;\n renderer.container.appendChild(w.el);\n w._inDocument = true;\n }\n \n if (!w.coverGutter) {\n w.el.style.zIndex = 3;\n }\n if (w.pixelHeight == null) {\n w.pixelHeight = w.el.offsetHeight;\n }\n if (w.rowCount == null) {\n w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;\n }\n \n var fold = this.session.getFoldAt(w.row, 0);\n w.$fold = fold;\n if (fold) {\n var lineWidgets = this.session.lineWidgets;\n if (w.row == fold.end.row && !lineWidgets[fold.start.row])\n lineWidgets[fold.start.row] = w;\n else\n w.hidden = true;\n }\n \n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n \n this.$updateRows();\n this.renderWidgets(null, renderer);\n this.onWidgetChanged(w);\n return w;\n };\n \n this.removeLineWidget = function(w) {\n w._inDocument = false;\n w.session = null;\n if (w.el && w.el.parentNode)\n w.el.parentNode.removeChild(w.el);\n if (w.editor && w.editor.destroy) try {\n w.editor.destroy();\n } catch(e){}\n if (this.session.lineWidgets) {\n var w1 = this.session.lineWidgets[w.row];\n if (w1 == w) {\n this.session.lineWidgets[w.row] = w.$oldWidget;\n if (w.$oldWidget)\n this.onWidgetChanged(w.$oldWidget);\n } else {\n while (w1) {\n if (w1.$oldWidget == w) {\n w1.$oldWidget = w.$oldWidget;\n break;\n }\n w1 = w1.$oldWidget;\n }\n }\n }\n this.session._emit(\"changeFold\", {data:{start:{row: w.row}}});\n this.$updateRows();\n };\n \n this.getWidgetsAtRow = function(row) {\n var lineWidgets = this.session.lineWidgets;\n var w = lineWidgets && lineWidgets[row];\n var list = [];\n while (w) {\n list.push(w);\n w = w.$oldWidget;\n }\n return list;\n };\n \n this.onWidgetChanged = function(w) {\n this.session._changedWidgets.push(w);\n this.editor && this.editor.renderer.updateFull();\n };\n \n this.measureWidgets = function(e, renderer) {\n var changedWidgets = this.session._changedWidgets;\n var config = renderer.layerConfig;\n \n if (!changedWidgets || !changedWidgets.length) return;\n var min = Infinity;\n for (var i = 0; i < changedWidgets.length; i++) {\n var w = changedWidgets[i];\n if (!w || !w.el) continue;\n if (w.session != this.session) continue;\n if (!w._inDocument) {\n if (this.session.lineWidgets[w.row] != w)\n continue;\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n \n w.h = w.el.offsetHeight;\n \n if (!w.fixedWidth) {\n w.w = w.el.offsetWidth;\n w.screenWidth = Math.ceil(w.w / config.characterWidth);\n }\n \n var rowCount = w.h / config.lineHeight;\n if (w.coverLine) {\n rowCount -= this.session.getRowLineCount(w.row);\n if (rowCount < 0)\n rowCount = 0;\n }\n if (w.rowCount != rowCount) {\n w.rowCount = rowCount;\n if (w.row < min)\n min = w.row;\n }\n }\n if (min != Infinity) {\n this.session._emit(\"changeFold\", {data:{start:{row: min}}});\n this.session.lineWidgetWidth = null;\n }\n this.session._changedWidgets = [];\n };\n \n this.renderWidgets = function(e, renderer) {\n var config = renderer.layerConfig;\n var lineWidgets = this.session.lineWidgets;\n if (!lineWidgets)\n return;\n var first = Math.min(this.firstRow, config.firstRow);\n var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);\n \n while (first > 0 && !lineWidgets[first])\n first--;\n \n this.firstRow = config.firstRow;\n this.lastRow = config.lastRow;\n\n renderer.$cursorLayer.config = config;\n for (var i = first; i <= last; i++) {\n var w = lineWidgets[i];\n if (!w || !w.el) continue;\n if (w.hidden) {\n w.el.style.top = -100 - (w.pixelHeight || 0) + \"px\";\n continue;\n }\n if (!w._inDocument) {\n w._inDocument = true;\n renderer.container.appendChild(w.el);\n }\n var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top;\n if (!w.coverLine)\n top += config.lineHeight * this.session.getRowLineCount(w.row);\n w.el.style.top = top - config.offset + \"px\";\n \n var left = w.coverGutter ? 0 : renderer.gutterWidth;\n if (!w.fixedWidth)\n left -= renderer.scrollLeft;\n w.el.style.left = left + \"px\";\n \n if (w.fullWidth && w.screenWidth) {\n w.el.style.minWidth = config.width + 2 * config.padding + \"px\";\n }\n \n if (w.fixedWidth) {\n w.el.style.right = renderer.scrollBar.getWidth() + \"px\";\n } else {\n w.el.style.right = \"\";\n }\n }\n };\n \n}).call(LineWidgets.prototype);\n\n\nexports.LineWidgets = LineWidgets;\n\n});\n\nace.define(\"ace/ext/error_marker\",[\"require\",\"exports\",\"module\",\"ace/line_widgets\",\"ace/lib/dom\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\nvar LineWidgets = acequire(\"../line_widgets\").LineWidgets;\nvar dom = acequire(\"../lib/dom\");\nvar Range = acequire(\"../range\").Range;\n\nfunction binarySearch(array, needle, comparator) {\n var first = 0;\n var last = array.length - 1;\n\n while (first <= last) {\n var mid = (first + last) >> 1;\n var c = comparator(needle, array[mid]);\n if (c > 0)\n first = mid + 1;\n else if (c < 0)\n last = mid - 1;\n else\n return mid;\n }\n return -(first + 1);\n}\n\nfunction findAnnotations(session, row, dir) {\n var annotations = session.getAnnotations().sort(Range.comparePoints);\n if (!annotations.length)\n return;\n \n var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints);\n if (i < 0)\n i = -i - 1;\n \n if (i >= annotations.length)\n i = dir > 0 ? 0 : annotations.length - 1;\n else if (i === 0 && dir < 0)\n i = annotations.length - 1;\n \n var annotation = annotations[i];\n if (!annotation || !dir)\n return;\n\n if (annotation.row === row) {\n do {\n annotation = annotations[i += dir];\n } while (annotation && annotation.row === row);\n if (!annotation)\n return annotations.slice();\n }\n \n \n var matched = [];\n row = annotation.row;\n do {\n matched[dir < 0 ? \"unshift\" : \"push\"](annotation);\n annotation = annotations[i += dir];\n } while (annotation && annotation.row == row);\n return matched.length && matched;\n}\n\nexports.showErrorMarker = function(editor, dir) {\n var session = editor.session;\n if (!session.widgetManager) {\n session.widgetManager = new LineWidgets(session);\n session.widgetManager.attach(editor);\n }\n \n var pos = editor.getCursorPosition();\n var row = pos.row;\n var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) {\n return w.type == \"errorMarker\";\n })[0];\n if (oldWidget) {\n oldWidget.destroy();\n } else {\n row -= dir;\n }\n var annotations = findAnnotations(session, row, dir);\n var gutterAnno;\n if (annotations) {\n var annotation = annotations[0];\n pos.column = (annotation.pos && typeof annotation.column != \"number\"\n ? annotation.pos.sc\n : annotation.column) || 0;\n pos.row = annotation.row;\n gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];\n } else if (oldWidget) {\n return;\n } else {\n gutterAnno = {\n text: [\"Looks good!\"],\n className: \"ace_ok\"\n };\n }\n editor.session.unfold(pos.row);\n editor.selection.moveToPosition(pos);\n \n var w = {\n row: pos.row, \n fixedWidth: true,\n coverGutter: true,\n el: dom.createElement(\"div\"),\n type: \"errorMarker\"\n };\n var el = w.el.appendChild(dom.createElement(\"div\"));\n var arrow = w.el.appendChild(dom.createElement(\"div\"));\n arrow.className = \"error_widget_arrow \" + gutterAnno.className;\n \n var left = editor.renderer.$cursorLayer\n .getPixelPosition(pos).left;\n arrow.style.left = left + editor.renderer.gutterWidth - 5 + \"px\";\n \n w.el.className = \"error_widget_wrapper\";\n el.className = \"error_widget \" + gutterAnno.className;\n el.innerHTML = gutterAnno.text.join(\"
    \");\n \n el.appendChild(dom.createElement(\"div\"));\n \n var kb = function(_, hashId, keyString) {\n if (hashId === 0 && (keyString === \"esc\" || keyString === \"return\")) {\n w.destroy();\n return {command: \"null\"};\n }\n };\n \n w.destroy = function() {\n if (editor.$mouseHandler.isMousePressed)\n return;\n editor.keyBinding.removeKeyboardHandler(kb);\n session.widgetManager.removeLineWidget(w);\n editor.off(\"changeSelection\", w.destroy);\n editor.off(\"changeSession\", w.destroy);\n editor.off(\"mouseup\", w.destroy);\n editor.off(\"change\", w.destroy);\n };\n \n editor.keyBinding.addKeyboardHandler(kb);\n editor.on(\"changeSelection\", w.destroy);\n editor.on(\"changeSession\", w.destroy);\n editor.on(\"mouseup\", w.destroy);\n editor.on(\"change\", w.destroy);\n \n editor.session.widgetManager.addLineWidget(w);\n \n w.el.onmousedown = editor.focus.bind(editor);\n \n editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight});\n};\n\n\ndom.importCssString(\"\\\n .error_widget_wrapper {\\\n background: inherit;\\\n color: inherit;\\\n border:none\\\n }\\\n .error_widget {\\\n border-top: solid 2px;\\\n border-bottom: solid 2px;\\\n margin: 5px 0;\\\n padding: 10px 40px;\\\n white-space: pre-wrap;\\\n }\\\n .error_widget.ace_error, .error_widget_arrow.ace_error{\\\n border-color: #ff5a5a\\\n }\\\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\\\n border-color: #F1D817\\\n }\\\n .error_widget.ace_info, .error_widget_arrow.ace_info{\\\n border-color: #5a5a5a\\\n }\\\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\\\n border-color: #5aaa5a\\\n }\\\n .error_widget_arrow {\\\n position: absolute;\\\n border: solid 5px;\\\n border-top-color: transparent!important;\\\n border-right-color: transparent!important;\\\n border-left-color: transparent!important;\\\n top: -5px;\\\n }\\\n\", \"\");\n\n});\n\nace.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/worker/worker_client\",\"ace/keyboard/hash_handler\",\"ace/placeholder\",\"ace/multi_select\",\"ace/mode/folding/fold_mode\",\"ace/theme/textmate\",\"ace/ext/error_marker\",\"ace/config\"], function(acequire, exports, module) {\n\"use strict\";\n\nacequire(\"./lib/fixoldbrowsers\");\n\nvar dom = acequire(\"./lib/dom\");\nvar event = acequire(\"./lib/event\");\n\nvar Editor = acequire(\"./editor\").Editor;\nvar EditSession = acequire(\"./edit_session\").EditSession;\nvar UndoManager = acequire(\"./undomanager\").UndoManager;\nvar Renderer = acequire(\"./virtual_renderer\").VirtualRenderer;\nacequire(\"./worker/worker_client\");\nacequire(\"./keyboard/hash_handler\");\nacequire(\"./placeholder\");\nacequire(\"./multi_select\");\nacequire(\"./mode/folding/fold_mode\");\nacequire(\"./theme/textmate\");\nacequire(\"./ext/error_marker\");\n\nexports.config = acequire(\"./config\");\nexports.acequire = acequire;\n\nif (true)\n exports.define = __webpack_require__.amdD;\nexports.edit = function(el) {\n if (typeof el == \"string\") {\n var _id = el;\n el = document.getElementById(_id);\n if (!el)\n throw new Error(\"ace.edit can't find div #\" + _id);\n }\n\n if (el && el.env && el.env.editor instanceof Editor)\n return el.env.editor;\n\n var value = \"\";\n if (el && /input|textarea/i.test(el.tagName)) {\n var oldNode = el;\n value = oldNode.value;\n el = dom.createElement(\"pre\");\n oldNode.parentNode.replaceChild(el, oldNode);\n } else if (el) {\n value = dom.getInnerText(el);\n el.innerHTML = \"\";\n }\n\n var doc = exports.createEditSession(value);\n\n var editor = new Editor(new Renderer(el));\n editor.setSession(doc);\n\n var env = {\n document: doc,\n editor: editor,\n onResize: editor.resize.bind(editor, null)\n };\n if (oldNode) env.textarea = oldNode;\n event.addListener(window, \"resize\", env.onResize);\n editor.on(\"destroy\", function() {\n event.removeListener(window, \"resize\", env.onResize);\n env.editor.container.env = null; // prevent memory leak on old ie\n });\n editor.container.env = editor.env = env;\n return editor;\n};\nexports.createEditSession = function(text, mode) {\n var doc = new EditSession(text, mode);\n doc.setUndoManager(new UndoManager());\n return doc;\n};\nexports.EditSession = EditSession;\nexports.UndoManager = UndoManager;\nexports.version = \"1.2.9\";\n});\n (function() {\n ace.acequire([\"ace/ace\"], function(a) {\n if (a) {\n a.config.init(true);\n a.define = ace.define;\n }\n if (!window.ace)\n window.ace = a;\n for (var key in a) if (a.hasOwnProperty(key))\n window.ace[key] = a[key];\n });\n })();\n \nmodule.exports = window.ace.acequire(\"ace/ace\");//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYnJhY2VAMC4xMS4xL25vZGVfbW9kdWxlcy9icmFjZS9pbmRleC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0Esa0NBQWtDO0FBQ2xDO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQSwyQkFBMkIsY0FBYztBQUN6Qyw4REFBOEQ7OztBQUc5RDtBQUNBOzs7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E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aWYgKHBheWxvYWQgIT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBjYWxsYmFjayAmJiBjYWxsYmFjaygpO1xuICAgICAgICAgICAgcmV0dXJuIHBheWxvYWQ7XG4gICAgICAgIH1cbiAgICB9IGVsc2UgaWYgKE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChtb2R1bGUpID09PSBcIltvYmplY3QgQXJyYXldXCIpIHtcbiAgICAgICAgdmFyIHBhcmFtcyA9IFtdO1xuICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IG1vZHVsZS5sZW5ndGg7IGkgPCBsOyArK2kpIHtcbiAgICAgICAgICAgIHZhciBkZXAgPSBsb29rdXAocGFyZW50SWQsIG1vZHVsZVtpXSk7XG4gICAgICAgICAgICBpZiAoZGVwID09IHVuZGVmaW5lZCAmJiBhY2VxdWlyZS5vcmlnaW5hbClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBwYXJhbXMucHVzaChkZXApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjYWxsYmFjayAmJiBjYWxsYmFjay5hcHBseShudWxsLCBwYXJhbXMpIHx8IHRydWU7XG4gICAgfVxufTtcblxudmFyIGFjZXF1aXJlID0gZnVuY3Rpb24obW9kdWxlLCBjYWxsYmFjaykge1xuICAgIHZhciBwYWNrYWdlZE1vZHVsZSA9IF9hY2VxdWlyZShcIlwiLCBtb2R1bGUsIGNhbGxiYWNrKTtcbiAgICBpZiAocGFja2FnZWRNb2R1bGUgPT0gdW5kZWZpbmVkICYmIGFjZXF1aXJlLm9yaWdpbmFsKVxuICAgICAgICByZXR1cm4gYWNlcXVpcmUub3JpZ2luYWwuYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICByZXR1cm4gcGFja2FnZWRNb2R1bGU7XG59O1xuXG52YXIgbm9ybWFsaXplTW9kdWxlID0gZnVuY3Rpb24ocGFyZW50SWQsIG1vZHVsZU5hbWUpIHtcbiAgICAvLyBub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W5jdGlvbihwYXJlbnRJZCwgbW9kdWxlTmFtZSkge1xuICAgIG1vZHVsZU5hbWUgPSBub3JtYWxpemVNb2R1bGUocGFyZW50SWQsIG1vZHVsZU5hbWUpO1xuXG4gICAgdmFyIG1vZHVsZSA9IGRlZmluZS5tb2R1bGVzW21vZHVsZU5hbWVdO1xuICAgIGlmICghbW9kdWxlKSB7XG4gICAgICAgIG1vZHVsZSA9IGRlZmluZS5wYXlsb2Fkc1ttb2R1bGVOYW1lXTtcbiAgICAgICAgaWYgKHR5cGVvZiBtb2R1bGUgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHZhciBleHBvcnRzID0ge307XG4gICAgICAgICAgICB2YXIgbW9kID0ge1xuICAgICAgICAgICAgICAgIGlkOiBtb2R1bGVOYW1lLFxuICAgICAgICAgICAgICAgIHVyaTogJycsXG4gICAgICAgICAgICAgICAgZXhwb3J0czogZXhwb3J0cyxcbiAgICAgICAgICAgICAgICBwYWNrYWdlZDogdHJ1ZVxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdmFyIHJlcSA9IGZ1bmN0aW9uKG1vZHVsZSwgY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX2FjZXF1aXJlKG1vZHVsZU5hbWUsIG1vZHVsZSwgY2FsbGJhY2spO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgdmFyIHJldHVyblZhbHVlID0gbW9kdWxlKHJlcSwgZXhwb3J0cywgbW9kKTtcbiAgICAgICAgICAgIGV4cG9ydHMgPSByZXR1cm5WYWx1ZSB8fCBtb2QuZXhwb3J0cztcbiAgICAgICAgICAgIGRlZmluZS5tb2R1bGVzW21vZHVsZU5hbWVdID0gZXhwb3J0cztcbiAgICAgICAgICAgIGRlbGV0ZSBkZWZpbmUucGF5bG9hZHNbbW9kdWxlTmFtZV07XG4gICAgICAgIH1cbiAgICAgICAgbW9kdWxlID0gZGVmaW5lLm1vZHVsZXNbbW9kdWxlTmFtZ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cGUudGVzdCxcbiAgICAgICAgICAgIG1hdGNoOiBTdHJpbmcucHJvdG90eXBlLm1hdGNoLFxuICAgICAgICAgICAgcmVwbGFjZTogU3RyaW5nLnByb3RvdHlwZS5yZXBsYWNlLFxuICAgICAgICAgICAgc3BsaXQ6IFN0cmluZy5wcm90b3R5cGUuc3BsaXRcbiAgICAgICAgfSxcbiAgICAgICAgY29tcGxpYW50RXhlY05wY2cgPSByZWFsLmV4ZWMuY2FsbCgvKCk/Py8sIFwiXCIpWzFdID09PSB1bmRlZmluZWQsIC8vIGNoZWNrIGBleGVjYCBoYW5kbGluZyBvZiBub25wYXJ0aWNpcGF0aW5nIGNhcHR1cmluZyBncm91cHNcbiAgICAgICAgY29tcGxpYW50TGFzdEluZGV4SW5jcmVtZW50ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIHggPSAvXi9nO1xuICAgICAgICAgICAgcmVhbC50ZXN0LmNhbGwoeCwgXCJcIik7XG4gICAgICAgICAgICByZXR1cm4gIXgubGFzdEluZGV4O1xuICAgICAgICB9KCk7XG5cbiAgICBpZiAoY29tcGxpYW50TGFzdEluZGV4SW5jcmVtZW50ICYmIGNvbXBsaWFudEV4ZWNOcGNnKVxuICAgICAgICByZXR1cm47XG4gICAgUmVnRXhwLnByb3RvdHlwZS5leGVjID0gZnVuY3Rpb24gKHN0cikge1xuICAgICAgICB2YXIgbWF0Y2ggPSByZWFsLmV4ZWMuYXBwbHkodGhpcywgYXJndW1lbnRzKSxcbiAgICAgICAgICAgIG5hbWUsIHIyO1xuICAgICAgICBpZiAoIHR5cGVvZihzdHIpID09ICdzdHJpbmcnICYmIG1hdGNoKSB7XG4gICAgICAgICAgICBpZiAoIWNvbXBsaWFudEV4ZWNOcGNnICYmIG1hdGNoLmxlbmd0aCA+IDEgJiYgaW5kZXhPZihtYXRjaCwgXCJcIikgPiAtMSkge1xuICAgICAgICAgICAgICAgIHIyID0gUmVnRXhwKHRoaXMuc291cmNlLCByZWFsLnJlcGxhY2UuY2FsbChnZXROYXRpdmVGbGFncyh0aGlzKSwgXCJnXCIsIFwiXCIpKTtcbiAgICAgICAgICAgICAgICByZWFsLnJlcGxhY2UuY2FsbChzdHIuc2xpY2UobWF0Y2guaW5kZXgpLCByMiwgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IGFyZ3VtZW50cy5sZW5ndGggLSAyOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcmd1bWVudHNbaV0gPT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRjaFtpXSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRoaXMuX3hyZWdleHAgJiYgdGhpcy5feHJlZ2V4cC5jYXB0dXJlTmFtZXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IG1hdGNoLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIG5hbWUgPSB0aGlzLl94cmVnZXhwLmNhcHR1cmVOYW1lc1tpIC0gMV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChuYW1lKVxuICAgICAgICAgICAgICAgICAgICAgICBtYXRjaFtuYW1lXSA9IG1hdGNoW2ldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghY29tcGxpYW50TGFzdEluZGV4SW5jcmVtZW50ICYmIHRoaXMuZ2xvYmFsICYmICFtYXRjaFswXS5sZW5ndGggJiYgKHRoaXMubGFzdEluZGV4ID4gbWF0Y2guaW5kZXgpKVxuICAgICAgICAgICAgICAgIHRoaXMubGFzdEluZGV4LS07XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1hdGNoO1xuICAgIH07XG4gICAgaWYgKCFjb21w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bWVudHMpKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKE9iamVjdChyZXN1bHQpID09PSByZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG5cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhcmdldC5hcHBseShcbiAgICAgICAgICAgICAgICAgICAgdGhhdCxcbiAgICAgICAgICAgICAgICAgICAgYXJncy5jb25jYXQoc2xpY2UuY2FsbChhcmd1bWVudHMpKVxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgIH1cblxuICAgICAgICB9O1xuICAgICAgICBpZih0YXJnZXQucHJvdG90eXBlKSB7XG4gICAgICAgICAgICBFbXB0eS5wcm90b3R5cGUgPSB0YXJnZXQucHJvdG90eXBlO1xuICAgICAgICAgICAgYm91bmQucHJvdG90eXBlID0gbmV3IEVtcHR5KCk7XG4gICAgICAgICAgICBFbXB0eS5wcm90b3R5cGUgPSBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBib3VuZDtcbiAgICB9O1xufVxudmFyIGNhbGwgPSBGdW5jdGlvbi5wcm90b3R5cGUuY2FsbDtcbnZhciBwcm90b3R5cGVPZkFycmF5ID0gQXJyYXkucHJvdG90eXBlO1xudmFyIHByb3RvdHlwZU9mT2JqZWN0ID0gT2JqZWN0LnByb3RvdHlwZTtcbnZhciBzbGljZSA9IHByb3RvdHlwZU9mQXJyYXkuc2xpY2U7XG52YXIgX3RvU3RyaW5nID0gY2FsbC5iaW5kKHByb3RvdHlwZU9mT2JqZWN0LnRvU3RyaW5nKTtcbnZhciBvd25zID0gY2FsbC5iaW5kKHByb3RvdHlwZU9mT2JqZWN0Lmhhc093blByb3BlcnR5KTtcbnZhciBkZWZpbmVHZXR0ZXI7XG52YXIgZGVmaW5lU2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BsZW5ndGggPSB0aGlzLmxlbmd0aDtcbiAgICAgICAgICAgIGlmIChwb3MgPiAwKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBvcyA+IGxlbmd0aClcbiAgICAgICAgICAgICAgICAgICAgcG9zID0gbGVuZ3RoO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChwb3MgPT0gdm9pZCAwKSB7XG4gICAgICAgICAgICAgICAgcG9zID0gMDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocG9zIDwgMCkge1xuICAgICAgICAgICAgICAgIHBvcyA9IE1hdGgubWF4KGxlbmd0aCArIHBvcywgMCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghKHBvcytyZW1vdmVDb3VudCA8IGxlbmd0aCkpXG4gICAgICAgICAgICAgICAgcmVtb3ZlQ291bnQgPSBsZW5ndGggLSBwb3M7XG5cbiAgICAgICAgICAgIHZhciByZW1vdmVkID0gdGhpcy5zbGljZShwb3MsIHBvcytyZW1vdmVDb3VudCk7XG4gICAgICAgICAgICB2YXIgaW5zZXJ0ID0gc2xpY2UuY2FsbChhcmd1bWVudHMsIDIpO1xuICAgICAgICAgICAgdmFyIGFkZCA9IGluc2VydC5sZW5ndGg7ICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocG9zID09PSBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAoYWRkKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHVzaC5hcHBseSh0aGlzLCBpbnNlcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIHJlbW92ZSA9IE1hdGgubWluKHJlbW92ZUNvdW50LCBsZW5ndGggLSBwb3MpO1xuICAgICAgICAgICAgICAgIHZhciB0YWlsT2xkUG9zID0gcG9zICsgcmVtb3ZlO1xuICAgICAgICAgICAgICAgIHZhciB0YWlsTmV3UG9zID0gdGFpbE9sZFBvcyArIGFkZCAtIHJlbW92ZTtcbiAgICAgICAgICAgICAgICB2YXIgdGFpbENvdW50ID0gbGVuZ3RoIC0gdGFpbE9sZFBvcztcbiAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoQWZ0ZXJSZW1vdmUgPSBsZW5ndGggLSByZW1vdmU7XG5cbiAgICAgICAgICAgICAgICBpZiAodGFpbE5ld1BvcyA8IHRhaWxPbGRQb3MpIHsgLy8gY2FzZSBBXG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGFpbENvdW50OyArK2kpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbdGFpbE5ld1BvcytpXSA9IHRoaXNbdGFpbE9sZFBvcytpXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGFpbE5ld1BvcyA+IHRhaWxPbGRQb3MpIHsgLy8gY2FzZSBCXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IHRhaWxDb3VudDsgaS0tOyApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbdGFpbE5ld1BvcytpXSA9IHRoaXNbdGFpbE9sZFBvcytpXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gLy8gZWxzZSwgYWRkID09IHJlbW92ZSAobm90aGluZyB0byBkbylcblxuICAgICAgICAgICAgICAgIGlmIChhZGQgJiYgcG9zID09PSBsZW5ndGhBZnRlclJlbW92ZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxlbmd0aCA9IGxlbmd0aEFmdGVyUmVtb3ZlOyAvLyB0cnVuY2F0ZSBhcnJheVxuICAgICAgICAgICAgICAgICAgICB0aGlzLnB1c2guYXBwbHkodGhpcywgaW5zZXJ0KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxlbmd0aCA9IGxlbmd0aEFmdGVyUmVtb3ZlICsgYWRkOyAvLyByZXNlcnZlcyBzcGFjZVxuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgYWRkOyArK2kpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbcG9zK2ldID0gaW5zZXJ0W2ldO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJlbW92ZWQ7XG4gICAgICAgIH07XG4gICAgfVxufVxuaWYgKCFBcnJheS5pc0FycmF5KSB7XG4gICAgQXJyYXkuaXNBcnJheSA9IGZ1bmN0aW9uIGlzQXJyYXkob2JqKSB7XG4gICAgICAgIHJldHVybiBfdG9TdHJpbmcob2JqKSA9PSBcIltvYmplY3QgQXJyYXldXCI7XG4gICAgfTtcbn1cbnZhciBib3hlZFN0cmluZyA9IE9iamVjdChcImFcIiksXG4gICAgc3BsaXRTdHJpbmcgPSBib3hlZFN0cmluZ1swXSAhPSBcImFcIiB8fCAhKDAgaW4gYm94ZWRTdHJpbmcpO1xuXG5pZiAoIUFycmF5LnByb3RvdHlwZS5mb3JFYWNoKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLmZvckVhY2ggPSBmdW5jdGlvbiBmb3JFYWNoKGZ1biAvKiwgdGhpc3AqLykge1xuICAgICAgICB2YXIgb2JqZWN0ID0gdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBzZWxmID0gc3BsaXRTdHJpbmcgJiYgX3RvU3RyaW5nKHRoaXMpID09IFwiW29iamVjdCBTdHJpbmddXCIgP1xuICAgICAgICAgICAgICAgIHRoaXMuc3BsaXQoXCJcIikgOlxuICAgICAgICAgICAgICAgIG9iamVjdCxcbiAgICAgICAgICAgIHRoaXNwID0gYXJndW1lbnRzWzFdLFxuICAgICAgICAgICAgaSA9IC0xLFxuICAgICAgICAgICAgbGVuZ3RoID0gc2VsZi5sZW5ndGggPj4+IDA7XG4gICAgICAgIGlmIChfdG9TdHJpbmcoZnVuKSAhPSBcIltvYmplY3QgRnVuY3Rpb25dXCIpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoKTsgLy8gVE9ETyBtZXNzYWdlXG4gICAgICAgIH1cblxuICAgICAgICB3aGlsZSAoKytpIDwgbGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgZnVuLmNhbGwodGhpc3AsIHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xufVxuaWYgKCFBcnJheS5wcm90b3R5cGUubWFwKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLm1hcCA9IGZ1bmN0aW9uIG1hcChmdW4gLyosIHRoaXNwKi8pIHtcbiAgICAgICAgdmFyIG9iamVjdCA9IHRvT2JqZWN0KHRoaXMpLFxuICAgICAgICAgICAgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICBvYmplY3QsXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMCxcbiAgICAgICAgICAgIHJlc3VsdCA9IEFycmF5KGxlbmd0aCksXG4gICAgICAgICAgICB0aGlzcCA9IGFyZ3VtZW50c1sxXTtcbiAgICAgICAgaWYgKF90b1N0cmluZyhmdW4pICE9IFwiW29iamVjdCBGdW5jdGlvbl1cIikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihmdW4gKyBcIiBpcyBub3QgYSBmdW5jdGlvblwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmIChpIGluIHNlbGYpXG4gICAgICAgICAgICAgICAgcmVzdWx0W2ldID0gZnVuLmNhbGwodGhpc3AsIHNlbGZbaV0sIGksIG9iamVjdCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9O1xufVxuaWYgKCFBcnJheS5wcm90b3R5cGUuZmlsdGVyKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLmZpbHRlciA9IGZ1bmN0aW9uIGZpbHRlcihmdW4gLyosIHRoaXNwICovKSB7XG4gICAgICAgIHZhciBvYmplY3QgPSB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgICAgIG9iamVjdCxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwLFxuICAgICAgICAgICAgcmVzdWx0ID0gW10sXG4gICAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICAgIHRoaXNwID0gYXJndW1lbnRzWzFdO1xuICAgICAgICBpZiAoX3RvU3RyaW5nKGZ1bikgIT0gXCJbb2JqZWN0IEZ1bmN0aW9uXVwiKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGZ1biArIFwiIGlzIG5vdCBhIGZ1bmN0aW9uXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgaW4gc2VsZikge1xuICAgICAgICAgICAgICAgIHZhbHVlID0gc2VsZltpXTtcbiAgICAgICAgICAgICAgICBpZiAoZnVuLmNhbGwodGhpc3AsIHZhbHVlLCBpLCBvYmplY3QpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHJlc3VsdDtcbiAgICB9O1xufVxuaWYgKCFBcnJheS5wcm90b3R5cGUuZXZlcnkpIHtcbiAgICBBcnJheS5wcm90b3R5cGUuZXZlcnkgPSBmdW5jdGlvbiBldmVyeShmdW4gLyosIHRoaXNwICovKSB7XG4gICAgICAgIHZhciBvYmplY3QgPSB0b09iamVjdCh0aGlzKSxcbiAgICAgICAgICAgIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgb2JqZWN0LFxuICAgICAgICAgICAgbGVuZ3RoID0gc2VsZi5sZW5ndGggPj4+IDAsXG4gICAgICAgICAgICB0aGlzcCA9IGFyZ3VtZW50c1sxXTtcbiAgICAgICAgaWYgKF90b1N0cmluZyhmdW4pICE9IFwiW29iamVjdCBGdW5jdGlvbl1cIikge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihmdW4gKyBcIiBpcyBub3QgYSBmdW5jdGlvblwiKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmIChpIGluIHNlbGYgJiYgIWZ1bi5jYWxsKHRoaXNwLCBzZWxmW2ldLCBpLCBvYmplY3QpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgIH07XG59XG5pZiAoIUFycmF5LnByb3RvdHlwZS5zb21lKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLnNvbWUgPSBmdW5jdGlvbiBzb21lKGZ1biAvKiwgdGhpc3AgKi8pIHtcbiAgICAgICAgdmFyIG9iamVjdCA9IHRvT2JqZWN0KHRoaXMpLFxuICAgICAgICAgICAgc2VsZiA9IHNwbGl0U3RyaW5nICYmIF90b1N0cmluZyh0aGlzKSA9PSBcIltvYmplY3QgU3RyaW5nXVwiID9cbiAgICAgICAgICAgICAgICB0aGlzLnNwbGl0KFwiXCIpIDpcbiAgICAgICAgICAgICAgICBvYmplY3QsXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMCxcbiAgICAgICAgICAgIHRoaXNwID0gYXJndW1lbnRzWzFdO1xuICAgICAgICBpZiAoX3RvU3RyaW5nKGZ1bikgIT0gXCJbb2JqZWN0IEZ1bmN0aW9uXVwiKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGZ1biArIFwiIGlzIG5vdCBhIGZ1bmN0aW9uXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgaW4gc2VsZiAmJiBmdW4uY2FsbCh0aGlzcCwgc2VsZltpXSwgaSwgb2JqZWN0KSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xufVxuaWYgKCFBcnJheS5wcm90b3R5cGUucmVkdWNlKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLnJlZHVjZSA9IGZ1bmN0aW9uIHJlZHVjZShmdW4gLyosIGluaXRpYWwqLykge1xuICAgICAgICB2YXIgb2JqZWN0ID0gdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBzZWxmID0gc3BsaXRTdHJpbmcgJiYgX3RvU3RyaW5nKHRoaXMpID09IFwiW29iamVjdCBTdHJpbmddXCIgP1xuICAgICAgICAgICAgICAgIHRoaXMuc3BsaXQoXCJcIikgOlxuICAgICAgICAgICAgICAgIG9iamVjdCxcbiAgICAgICAgICAgIGxlbmd0aCA9IHNlbGYubGVuZ3RoID4+PiAwO1xuICAgICAgICBpZiAoX3RvU3RyaW5nKGZ1bikgIT0gXCJbb2JqZWN0IEZ1bmN0aW9uXVwiKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKGZ1biArIFwiIGlzIG5vdCBhIGZ1bmN0aW9uXCIpO1xuICAgICAgICB9XG4gICAgICAgIGlmICghbGVuZ3RoICYmIGFyZ3VtZW50cy5sZW5ndGggPT0gMSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcInJlZHVjZSBvZiBlbXB0eSBhcnJheSB3aXRoIG5vIGluaXRpYWwgdmFsdWVcIik7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgaSA9IDA7XG4gICAgICAgIHZhciByZXN1bHQ7XG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID49IDIpIHtcbiAgICAgICAgICAgIHJlc3VsdCA9IGFyZ3VtZW50c1sxXTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBpZiAoaSBpbiBzZWxmKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHNlbGZbaSsrXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgrK2kgPj0gbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXCJyZWR1Y2Ugb2YgZW1wdHkgYXJyYXkgd2l0aCBubyBpbml0aWFsIHZhbHVlXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yICg7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgaWYgKGkgaW4gc2VsZikge1xuICAgICA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bWVudHNbMV07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgaWYgKGkgaW4gc2VsZikge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBzZWxmW2ktLV07XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoLS1pIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFwicmVkdWNlUmlnaHQgb2YgZW1wdHkgYXJyYXkgd2l0aCBubyBpbml0aWFsIHZhbHVlXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgZG8ge1xuICAgICAgICAgICAgaWYgKGkgaW4gdGhpcykge1xuICAgICAgICAgICAgICAgIHJlc3VsdCA9IGZ1bi5jYWxsKHZvaWQgMCwgcmVzdWx0LCBzZWxmW2ldLCBpLCBvYmplY3QpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IHdoaWxlIChpLS0pO1xuXG4gICAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfTtcbn1cbmlmICghQXJyYXkucHJvdG90eXBlLmluZGV4T2YgfHwgKFswLCAxXS5pbmRleE9mKDEsIDIpICE9IC0xKSkge1xuICAgIEFycmF5LnByb3RvdHlwZS5pbmRleE9mID0gZnVuY3Rpb24gaW5kZXhPZihzb3VnaHQgLyosIGZyb21JbmRleCAqLyApIHtcbiAgICAgICAgdmFyIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMDtcblxuICAgICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGkgPSAwO1xuICAgICAgICBpZiAoYXJndW1lbnRzLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgIGkgPSB0b0ludGVnZXIoYXJndW1lbnRzWzFdKTtcbiAgICAgICAgfVxuICAgICAgICBpID0gaSA+PSAwID8gaSA6IE1hdGgubWF4KDAsIGxlbmd0aCArIGkpO1xuICAgICAgICBmb3IgKDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBpZiAoaSBpbiBzZWxmICYmIHNlbGZbaV0gPT09IHNvdWdodCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9O1xufVxuaWYgKCFBcnJheS5wcm90b3R5cGUubGFzdEluZGV4T2YgfHwgKFswLCAxXS5sYXN0SW5kZXhPZigwLCAtMykgIT0gLTEpKSB7XG4gICAgQXJyYXkucHJvdG90eXBlLmxhc3RJbmRleE9mID0gZnVuY3Rpb24gbGFzdEluZGV4T2Yoc291Z2h0IC8qLCBmcm9tSW5kZXggKi8pIHtcbiAgICAgICAgdmFyIHNlbGYgPSBzcGxpdFN0cmluZyAmJiBfdG9TdHJpbmcodGhpcykgPT0gXCJbb2JqZWN0IFN0cmluZ11cIiA/XG4gICAgICAgICAgICAgICAgdGhpcy5zcGxpdChcIlwiKSA6XG4gICAgICAgICAgICAgICAgdG9PYmplY3QodGhpcyksXG4gICAgICAgICAgICBsZW5ndGggPSBzZWxmLmxlbmd0aCA+Pj4gMDtcblxuICAgICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICB9XG4gICAgICAgIHZhciBpID0gbGVuZ3RoIC0gMTtcbiAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICBpID0gTWF0aC5taW4oaSwgdG9JbnRlZ2VyKGFyZ3VtZW50c1sxXSkpO1xuICAgICAgICB9XG4gICAgICAgIGkgPSBpID49IDAgPyBpIDogbGVuZ3RoIC0gTWF0aC5hYnMoaSk7XG4gICAgICAgIGZvciAoOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgaWYgKGkgaW4gc2VsZiAmJiBzb3VnaHQgPT09IHNlbGZbaV0pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gaTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gLTE7XG4gICAgfTtcbn1cbmlmICghT2JqZWN0LmdldFByb3RvdHlwZU9mKSB7XG4gICAgT2JqZWN0LmdldFByb3RvdHlwZU9mID0gZnVuY3Rpb24gZ2V0UHJvdG90eXBlT2Yob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiBvYmplY3QuX19wcm90b19fIHx8IChcbiAgICAgICAgICAgIG9iamVjdC5jb25zdHJ1Y3RvciA/XG4gICAgICAgICAgICBvYmplY3QuY29uc3RydWN0b3IucHJvdG90eXBlIDpcbiAgICAgICAgICAgIHByb3RvdHlwZU9mT2JqZWN0XG4gICAgICAgICk7XG4gICAgfTtcbn1cbmlmICghT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvcikge1xuICAgIHZhciBFUlJfTk9OX09CSkVDVCA9IFwiT2JqZWN0LmdldE93blByb3BlcnR5RGVzY3JpcHRvciBjYWxsZWQgb24gYSBcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgXCJub24tb2JqZWN0OiBcIjtcbiAgICBPYmplY3QuZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yID0gZnVuY3Rpb24gZ2V0T3duUHJvcGVydHlEZXNjcmlwdG9yKG9iamVjdCwgcHJvcGVydHkpIHtcbiAgICAgICAgaWYgKCh0eXBlb2Ygb2JqZWN0ICE9IFwib2JqZWN0XCIgJiYgdHlwZW9mIG9iamVjdCAhPSBcImZ1bmN0aW9uXCIpIHx8IG9iamVjdCA9PT0gbnVsbClcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRVJSX05PTl9PQkpFQ1QgKyBvYmplY3QpO1xuICAgICAgICBpZiAoIW93bnMob2JqZWN0LCBwcm9wZXJ0eSkpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIGRlc2NyaXB0b3IsIGdldHRlciwgc2V0dGVyO1xuICAgICAgICBkZXNjcmlwdG9yID0gIHsgZW51bWVyYWJsZTogdHJ1ZSwgY29uZmlndXJhYmxlOiB0cnVlIH07XG4gICAgICAgIGlmIChzdXBwb3J0c0FjY2Vzc29ycykge1xuICAgICAgICAgICAgdmFyIHByb3RvdHlwZSA9IG9iamVjdC5fX3Byb3RvX187XG4gICAgICAgICAgICBvYmplY3QuX19wcm90b19fID0gcHJvdG90eXBlT2ZPYmplY3Q7XG5cbiAgICAgICAgICAgIHZhciBnZXR0ZXIgPSBsb29rdXBHZXR0ZXIob2JqZWN0LCBwcm9wZXJ0eSk7XG4gICAgICAgICAgICB2YXIgc2V0dGVyID0gbG9va3VwU2V0dGVyKG9iamVjdCwgcHJvcGVydHkpO1xuICAgICAgICAgICAgb2JqZWN0Ll9fcHJvdG9fXyA9IHByb3RvdHlwZTtcblxuICAgICAgICAgICAgaWYgKGdldHRlciB8fCBzZXR0ZXIpIHtcbiAgICAgICAgICAgICAgICBpZiAoZ2V0dGVyKSBkZXNjcmlwdG9yLmdldCA9IGdldHRlcjtcbiAgICAgICAgICAgICAgICBpZiAoc2V0dGVyKSBkZXNjcmlwdG9yLnNldCA9IHNldHRlcjtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVzY3JpcHRvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBkZXNjcmlwdG9yLnZhbHVlID0gb2JqZWN0W3Byb3BlcnR5XTtcbiAgICAgICAgcmV0dXJuIGRlc2NyaXB0b3I7XG4gICAgfTtcbn1cbmlmICghT2JqZWN0LmdldE93blByb3BlcnR5TmFtZXMpIHtcbiAgICBPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyA9IGZ1bmN0aW9uIGdldE93blByb3BlcnR5TmFtZXMob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiBPYmplY3Qua2V5cyhvYmplY3QpO1xuICAgIH07XG59XG5pZiAoIU9iamVjdC5jcmVhdGUpIHtcbiAgICB2YXIgY3JlYXRlRW1wdHk7XG4gICAgaWYgKE9iamVjdC5wcm90b3R5cGUuX19wcm90b19fID09PSBudWxsKSB7XG4gICAgICAgIGNyZWF0ZUVtcHR5ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgcmV0dXJuIHsgXCJfX3Byb3RvX19cIjogbnVsbCB9O1xuICAgICAgICB9O1xuICAgIH0gZWxzZSB7XG4gICAgICAgIGNyZWF0ZUVtcHR5ID0gZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgdmFyIGVtcHR5ID0ge307XG4gICAgICAgICAgICBmb3IgKHZhciBpIGluIGVtcHR5KVxuICAgICAgICAgICAgICAgIGVtcHR5W2ldID0gbnVsbDtcbiAgICAgICAgICAgIGVtcHR5LmNvbnN0cnVjdG9yID1cbiAgICAgICAgICAgIGVtcHR5Lmhhc093blByb3BlcnR5ID1cbiAgICAgICAgICAgIGVtcHR5LnByb3BlcnR5SXNFbnVtZXJhYmxlID1cbiAgICAgICAgICAgIGVtcHR5LmlzUHJvdG90eXBlT2YgPVxuICAgICAgICAgICAgZW1wdHkudG9Mb2NhbGVTdHJpbmcgPVxuICAgICAgICAgICAgZW1wdHkudG9TdHJpbmcgPVxuICAgICAgICAgICAgZW1wdHkudmFsdWVPZiA9XG4gICAgICAgICAgICBlbXB0eS5fX3Byb3RvX18gPSBudWxsO1xuICAgICAgICAgICAgcmV0dXJuIGVtcHR5O1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgT2JqZWN0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qZWN0ICE9IFwib2JqZWN0XCIgJiYgdHlwZW9mIG9iamVjdCAhPSBcImZ1bmN0aW9uXCIpIHx8IG9iamVjdCA9PT0gbnVsbClcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRVJSX05PTl9PQkpFQ1RfVEFSR0VUICsgb2JqZWN0KTtcbiAgICAgICAgaWYgKCh0eXBlb2YgZGVzY3JpcHRvciAhPSBcIm9iamVjdFwiICYmIHR5cGVvZiBkZXNjcmlwdG9yICE9IFwiZnVuY3Rpb25cIikgfHwgZGVzY3JpcHRvciA9PT0gbnVsbClcbiAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoRVJSX05PTl9PQkpFQ1RfREVTQ1JJUFRPUiArIGRlc2NyaXB0b3IpO1xuICAgICAgICBpZiAoZGVmaW5lUHJvcGVydHlGYWxsYmFjaykge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmaW5lUHJvcGVydHlGYWxsYmFjay5jYWxsKE9iamVjdCwgb2JqZWN0LCBwcm9wZXJ0eSwgZGVzY3JpcHRvcik7XG4gICAgICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAob3ducyhkZXNjcmlwdG9yLCBcInZhbHVlXCIpKSB7XG5cbiAgICAgICAgICAgIGlmIChzdXBwb3J0c0FjY2Vzc29ycyAmJiAobG9va3VwR2V0dGVyKG9iamVjdCwgcHJvcGVydHkpIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvb2t1cFNldHRlcihvYmplY3QsIHByb3BlcnR5KSkpXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdmFyIHByb3RvdHlwZSA9IG9iamVjdC5fX3Byb3RvX187XG4gICAgICAgICAgICAgICAgb2JqZWN0Ll9fcHJvdG9fXyA9IHByb3RvdHlwZU9mT2JqZWN0O1xuICAgICAgICAgICAgICAgIGRlbGV0ZSBvYmplY3RbcHJvcGVydHldO1xuICAgICAgICAgICAgICAgIG9iamVjdFtwcm9wZXJ0eV0gPSBkZXNjcmlwdG9yLnZhbHVlO1xuICAgICAgICAgICAgICAgIG9iamVjdC5fX3Byb3RvX18gPSBwcm90b3R5cGU7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG9iamVjdFtwcm9wZXJ0eV0gPSBkZXNjcmlwdG9yLnZhbHVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKCFzdXBwb3J0c0FjY2Vzc29ycylcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKEVSUl9BQ0NFU1NPUlNfTk9UX1NVUFBPUlRFRCk7XG4gICAgICAgICAgICBpZiAob3ducyhkZXNjcmlwdG9yLCBcImdldFwiKSlcbiAgICAgICAgICAgICAgICBkZWZpbmVHZXR0ZXIob2JqZWN0LCBwcm9wZXJ0eSwgZGVzY3JpcHRvci5nZXQpO1xuICAgICAgICAgICAgaWYgKG93bnMoZGVzY3JpcHRvciwgXCJzZXRcIikpXG4gICAgICAgICAgICAgICAgZGVmaW5lU2V0dGVyKG9iamVjdCwgcHJvcGVydHksIGRlc2NyaXB0b3Iuc2V0KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfTtcbn1cbmlmICghT2JqZWN0LmRlZmluZVByb3BlcnRpZXMpIHtcbiAgICBPYmplY3QuZGVmaW5lUHJvcGVydGllcyA9IGZ1bmN0aW9uIGRlZmluZVByb3BlcnRpZXMob2JqZWN0LCBwcm9wZXJ0aWVzKSB7XG4gICAgICAgIGZvciAodmFyIHByb3BlcnR5IGluIHByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgIGlmIChvd25zKHByb3BlcnRpZXMsIHByb3BlcnR5KSlcbiAgICAgICAgICAgICAgICBPYmplY3QuZGVmaW5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mlzU2VhbGVkID0gZnVuY3Rpb24gaXNTZWFsZWQob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xufVxuaWYgKCFPYmplY3QuaXNGcm96ZW4pIHtcbiAgICBPYmplY3QuaXNGcm96ZW4gPSBmdW5jdGlvbiBpc0Zyb3plbihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH07XG59XG5pZiAoIU9iamVjdC5pc0V4dGVuc2libGUpIHtcbiAgICBPYmplY3QuaXNFeHRlbnNpYmxlID0gZnVuY3Rpb24gaXNFeHRlbnNpYmxlKG9iamVjdCkge1xuICAgICAgICBpZiAoT2JqZWN0KG9iamVjdCkgPT09IG9iamVjdCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcigpOyAvLyBUT0RPIG1lc3NhZ2VcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmFtZSA9ICcnO1xuICAgICAgICB3aGlsZSAob3ducyhvYmplY3QsIG5hbWUpKSB7XG4gICAgICAgICAgICBuYW1lICs9ICc/JztcbiAgICAgICAgfVxuICAgICAgICBvYmplY3RbbmFtZV0gPSB0cnVlO1xuICAgICAgICB2YXIgcmV0dXJuVmFsdWUgPSBvd25zKG9iamVjdCwgbmFtZSk7XG4gICAgICAgIGRlbGV0ZSBvYmplY3RbbmFtZV07XG4gICAgICAgIHJldHVybiByZXR1cm5WYWx1ZTtcbiAgICB9O1xufVxuaWYgKCFPYmplY3Qua2V5cykge1xuICAgIHZhciBoYXNEb250RW51bUJ1ZyA9IHRydWUsXG4gICAgICAgIGRvbnRFbnVtcyA9IFtcbiAgICAgICAgICAgIFwidG9TdHJpbmdcIixcbiAgICAgICAgICAgIFwidG9Mb2NhbGVTdHJpbmdcIixcbiAgICAgICAgICAgIFwidmFsdWVPZlwiLFxuICAgICAgICAgICAgXCJoYXNPd25Qcm9wZXJ0eVwiLFxuICAgICAgICAgICAgXCJpc1Byb3RvdHlwZU9mXCIsXG4gICAgICAgICAgICBcInByb3BlcnR5SXNFbnVtZXJhYmxlXCIsXG4gICAgICAgICAgICBcImNvbnN0cnVjdG9yXCJcbiAgICAgICAgXSxcbiAgICAgICAgZG9udEVudW1zTGVuZ3RoID0gZG9udEVudW1zLmxlbmd0aDtcblxuICAgIGZvciAodmFyIGtleSBpbiB7XCJ0b1N0cmluZ1wiOiBudWxsfSkge1xuICAgICAgICBoYXNEb250RW51bUJ1ZyA9IGZhbHNlO1xuICAgIH1cblxuICAgIE9iamVjdC5rZXlzID0gZnVuY3Rpb24ga2V5cyhvYmplY3QpIHtcblxuICAgICAgICBpZiAoXG4gICAgICAgICAgICAodHlwZW9mIG9iamVjdCAhPSBcIm9iamVjdFwiICYmIHR5cGVvZiBvYmplY3QgIT0gXCJmdW5jdGlvblwiKSB8fFxuICAgICAgICAgICAgb2JqZWN0ID09PSBudWxsXG4gICAgICAgICkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJvcihcIk9iamVjdC5rZXlzIGNhbGxlZCBvbiBhIG5vbi1vYmplY3RcIik7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIga2V5cyA9IFtdO1xuICAgICAgICBmb3IgKHZhciBuYW1lIGluIG9iamVjdCkge1xuICAgICAgICAgICAgaWYgKG93bnMob2JqZWN0LCBuYW1lKSkge1xuICAgICAgICAgICAgICAgIGtleXMucHVzaChuYW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChoYXNEb250RW51bUJ1Zykge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDAsIGlpID0gZG9udEVudW1zTGVuZ3RoOyBpIDwgaWk7IGkrKykge1xuICAgICAgICAgICAgICAgIHZhciBkb250RW51bSA9IGRvbnRFbnVtc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAob3ducyhvYmplY3QsIGRvbnRFbnVtKSkge1xuICAgICAgICAgICAgICAgICAgICBrZXlzLnB1c2goZG9udEVudW0p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gOiBcIlJldHVyblwiLFxuICAgICAgICAgICAgMTkgOiBcIlBhdXNlXCIsXG4gICAgICAgICAgICAyNyA6IFwiRXNjXCIsXG4gICAgICAgICAgICAzMiA6IFwiU3BhY2VcIixcbiAgICAgICAgICAgIDMzIDogXCJQYWdlVXBcIixcbiAgICAgICAgICAgIDM0IDogXCJQYWdlRG93blwiLFxuICAgICAgICAgICAgMzUgOiBcIkVuZFwiLFxuICAgICAgICAgICAgMzYgOiBcIkhvbWVcIixcbiAgICAgICAgICAgIDM3IDogXCJMZWZ0XCIsXG4gICAgICAgICAgICAzOCA6IFwiVXBcIixcbiAgICAgICAgICAgIDM5IDogXCJSaWdodFwiLFxuICAgICAgICAgICAgNDAgOiBcIkRvd25cIixcbiAgICAgICAgICAgIDQ0IDogXCJQcmludFwiLFxuICAgICAgICAgICAgNDUgOiBcIkluc2VydFwiLFxuICAgICAgICAgICAgNDYgOiBcIkRlbGV0ZVwiLFxuICAgICAgICAgICAgOTYgOiBcIk51bXBhZDBcIixcbiAgICAgICAgICAgIDk3IDogXCJOdW1wYWQxXCIsXG4gICAgICAgICAgICA5OCA6IFwiTnVtcGFkMlwiLFxuICAgICAgICAgICAgOTkgOiBcIk51bXBhZDNcIixcbiAgICAgICAgICAgIDEwMDogXCJOdW1wYWQ0XCIsXG4gICAgICAgICAgICAxMDE6IFwiTnVtcGFkNVwiLFxuICAgICAgICAgICAgMTAyOiBcIk51bXBhZDZcIixcbiAgICAgICAgICAgIDEwMzogXCJOdW1wYWQ3XCIsXG4gICAgICAgICAgICAxMDQ6IFwiTnVtcGFkOFwiLFxuICAgICAgICAgICAgMTA1OiBcIk51bXBhZDlcIixcbiAgICAgICAgICAgICctMTMnOiBcIk51bXBhZEVudGVyXCIsXG4gICAgICAgICAgICAxMTI6IFwiRjFcIixcbiAgICAgICAgICAgIDExMzogXCJGMlwiLFxuICAgICAgICAgICAgMTE0OiBcIkYzXCIsXG4gICAgICAgICAgICAxMTU6IFwiRjRcIixcbiAgICAgICAgICAgIDExNjogXCJGNVwiLFxuICAgICAgICAgICAgMTE3OiBcIkY2XCIsXG4gICAgICAgICAgICAxMTg6IFwiRjdcIixcbiAgICAgICAgICAgIDExOTogXCJGOFwiLFxuICAgICAgICAgICAgMTIwOiBcIkY5XCIsXG4gICAgICAgICAgICAxMjE6IFwiRjEwXCIsXG4gICAgICAgICAgICAxMjI6IFwiRjExXCIsXG4gICAgICAgICAgICAxMjM6IFwiRjEyXCIsXG4gICAgICAgICAgICAxNDQ6IFwiTnVtbG9ja1wiLFxuICAgICAgICAgICAgMTQ1OiBcIlNjcm9sbGxvY2tcIlxuICAgICAgICB9LFxuXG4gICAgICAgIFBSSU5UQUJMRV9LRVlTOiB7XG4gICAgICAgICAgIDMyOiAnICcsICA0ODogJzAnLCAgNDk6ICcxJywgIDUwOiAnMicsICA1MTogJzMnLCAgNTI6ICc0JywgNTM6ICAnNScsXG4gICAgICAgICAgIDU0OiAnNicsICA1NTogJzcnLCAgNTY6ICc4JywgIDU3OiAnOScsICA1OTogJzsnLCAgNjE6ICc9JywgNjU6ICAnYScsXG4gICAgICAgICAgIDY2OiAnYicsICA2NzogJ2MnLCAgNjg6ICdkJywgIDY5OiAnZScsICA3MDogJ2YnLCAgNzE6ICdnJywgNzI6ICAnaCcsXG4gICAgICAgICAgIDczOiAnaScsICA3NDogJ2onLCAgNzU6ICdrJywgIDc2OiAnbCcsICA3NzogJ20nLCAgNzg6ICduJywgNzk6ICAnbycsXG4gICAgICAgICAgIDgwOiAncCcsICA4MTogJ3EnLCAgODI6ICdyJywgIDgzOiAncycsICA4NDogJ3QnLCAgODU6ICd1JywgODY6ICAndicsXG4gICAgICAgICAgIDg3OiAndycsICA4ODogJ3gnLCAgODk6ICd5JywgIDkwOiAneicsIDEwNzogJysnLCAxMDk6ICctJywgMTEwOiAnLicsXG4gICAgICAgICAgMTg2OiAnOycsIDE4NzogJz0nLCAxODg6ICcsJywgMTg5OiAnLScsIDE5MDogJy4nLCAxOTE6ICcvJyw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mouY2xpZW50WDtcbiAgICAgICAgc3RhcnR5ID0gdG91Y2hPYmouY2xpZW50WTtcbiAgICB9KTtcbiAgICBleHBvcnRzLmFkZExpc3RlbmVyKGVsLCBcInRvdWNobW92ZVwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICB2YXIgdG91Y2hlcyA9IGUudG91Y2hlcztcbiAgICAgICAgaWYgKHRvdWNoZXMubGVuZ3RoID4gMSkgcmV0dXJuO1xuXG4gICAgICAgIHZhciB0b3VjaE9iaiA9IHRvdWNoZXNbMF07XG5cbiAgICAgICAgZS53aGVlbFggPSBzdGFydHggLSB0b3VjaE9iai5jbGllbnRYO1xuICAgICAgICBlLndoZWVsWSA9IHN0YXJ0eSAtIHRvdWNoT2JqLmNsaWVudFk7XG5cbiAgICAgICAgc3RhcnR4ID0gdG91Y2hPYmouY2xpZW50WDtcbiAgICAgICAgc3RhcnR5ID0gdG91Y2hPYmouY2xpZW50WTtcblxuICAgICAgICBjYWxsYmFjayhlKTtcbiAgICB9KTtcbn07XG5cbmV4cG9ydHMuYWRkTW91c2VXaGVlbExpc3RlbmVyID0gZnVuY3Rpb24oZWwsIGNhbGxiYWNrKSB7XG4gICAgaWYgKFwib25tb3VzZXdoZWVsXCIgaW4gZWwpIHtcbiAgICAgICAgZXhwb3J0cy5hZGRMaXN0ZW5lcihlbCwgXCJtb3VzZXdoZWVsXCIsIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIHZhciBmYWN0b3IgPSA4O1xuICAgICAgICAgICAgaWYgKGUud2hlZWxEZWx0YVggIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGUud2hlZWxYID0gLWUud2hlZWxEZWx0YVggLyBmYWN0b3I7XG4gICAgICAgICAgICAgICAgZS53aGVlbFkgPSAtZS53aGVlbERlbHRhWSAvIGZhY3RvcjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZS53aGVlbFggPSAwO1xuICAgICAgICAgICAgICAgIGUud2hlZWxZID0gLWUud2hlZWxEZWx0YSAvIGZhY3RvcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhbGxiYWNrKGUpO1xuICAgICAgICB9KTtcbiAgICB9IGVsc2UgaWYgKFwib253aGVlbFwiIGluIGVsKSB7XG4gICAgICAgIGV4cG9ydHMuYWRkTGlzdGVuZXIoZWwsIFwid2hlZWxcIiwgIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIHZhciBmYWN0b3IgPSAwLjM1O1xuICAgICAgICAgICAgc3dpdGNoIChlLmRlbHRhTW9kZSkge1xuICAgICAgICAgICAgICAgIGNhc2UgZS5ET01fREVMVEFfUElYRUw6XG4gICAgICAgICAgICAgICAgICAgIGUud2hlZWxYID0gZS5kZWx0YVggKiBmYWN0b3IgfHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZS53aGVlbFkgPSBlLmRlbHRhWSAqIGZhY3RvciB8fCAwO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIGUuRE9NX0RFTFRBX0xJTkU6XG4gICAgICAgICAgICAgICAgY2FzZSBlLkRPTV9ERUxUQV9QQUdFOlxuICAgICAgICAgICAgICAgICAgICBlLndoZWVsWCA9IChlLmRlbHRhWCB8fCAwKSAqIDU7XG4gICAgICAgICAgICAgICAgICAgIGUud2hlZWxZID0gKGUuZGVsdGFZIHx8IDApICogNTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGNhbGxiYWNrKGUpO1xuICAgICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgICBleHBvcnRzLmFkZExpc3RlbmVyKGVsLCBcIkRPTU1vdXNlU2Nyb2xsXCIsIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIGlmIChlLmF4aXMgJiYgZS5heGlzID09IGUuSE9SSVpPTlRBTF9BWElTKSB7XG4gICAgICAgICAgICAgICAgZS53aGVlbFggPSAoZS5kZXRhaWwgfHwgMCkgKiA1O1xuICAgICAgICAgICAgICAgIGUud2hlZWxZID0gMDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZS53aGVlbFggPSAwO1xuICAgICAgICAgICAgICAgIGUud2hlZWxZID0gKGUuZGV0YWlsIHx8IDApICogNTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhbGxiYWNrKGUpO1xuICAgICAgICB9KTtcbiAgICB9XG59O1xuXG5leHBvcnRzLmFkZE11bHRpTW91c2VEb3duTGlzdGVuZXIgPSBmdW5jdGlvbihlbGVtZW50cywgdGltZW91dHMsIGV2ZW50SGFuZGxlciwgY2FsbGJhY2tOYW1lKSB7XG4gICAgdmFyIGNsaWNrcyA9IDA7XG4gICAgdmFyIHN0YXJ0WCwgc3RhcnRZLCB0aW1lcjsgXG4gICAgdmFyIGV2ZW50TmFtZXMgPSB7XG4gICAgICAgIDI6IFwiZGJsY2xpY2tcIixcbiAgICAgICAgMzogXCJ0cmlwbGVjbGlja1wiLFxuICAgICAgICA0OiBcInF1YWRjbGlja1wiXG4gICAgfTtcblxuICAgIGZ1bmN0aW9uIG9uTW91c2Vkb3duKGUpIHtcbiAgICAgICAgaWYgKGV4cG9ydHMuZ2V0QnV0dG9uKGUpICE9PSAwKSB7XG4gICAgICAgICAgICBjbGlja3MgPSAwO1xuICAgICAgICB9IGVsc2UgaWYgKGUuZGV0YWlsID4gMSkge1xuICAgICAgICAgICAgY2xpY2tzKys7XG4gICAgICAgICAgICBpZiAoY2xpY2tzID4gNClcbiAgICAgICAgICAgICAgICBjbGlja3MgPSAxO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY2xpY2tzID0gMTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodXNlcmFnZW50LmlzSUUpIHtcbiAgICAgICAgICAgIHZhciBpc05ld0NsaWNrID0gTWF0aC5hYnMoZS5jbGllbnRYIC0gc3RhcnRYKSA+IDUgfHwgTWF0aC5hYnMoZS5jbGllbnRZIC0gc3RhcnRZKSA+IDU7XG4gICAgICAgICAgICBpZiAoIXRpbWVyIHx8IGlzTmV3Q2xpY2spXG4gICAgICAgICAgICAgICAgY2xpY2tzID0gMTtcbiAgICAgICAgICAgIGlmICh0aW1lcilcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpO1xuICAgICAgICAgICAgdGltZXIgPSBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge3RpbWVyID0gbnVsbDt9LCB0aW1lb3V0c1tjbGlja3MgLSAxXSB8fCA2MDApO1xuXG4gICAgICAgICAgICBpZiAoY2xpY2tzID09IDEpIHtcbiAgICAgICAgICAgICAgICBzdGFydFggPSBlLmNsaWVudFg7XG4gICAgICAgICAgICAgICAgc3RhcnRZID0gZS5jbGllbnRZO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBlLl9jbGlja3MgPSBjbGlja3M7XG5cbiAgICAgICAgZXZlbnRIYW5kbGVyW2NhbGxiYWNrTmFtZV0oXCJtb3VzZWRvd25cIiwgZSk7XG5cbiAgICAgICAgaWYgKGNsaWNrcyA+IDQpXG4gICAgICAgICAgICBjbGlja3MgPSAwO1xuICAgICAgICBlbHNlIGlmIChjbGlja3MgPiAxKVxuICAgICAgICAgICAgcmV0dXJuIGV2ZW50SGFuZGxlcltjYWxsYmFja05hbWVdKGV2ZW50TmFtZXNbY2xpY2tzXSwgZSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIG9uRGJsY2xpY2soZSkge1xuICAgICAgICBjbGlja3MgPSAyO1xuICAgICAgICBpZiAodGltZXIpXG4gICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpO1xuICAgICAgICB0aW1lciA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7dGltZXIgPSBudWxsO30sIHRpbWVvdXRzW2NsaWNrcyAtIDFdIHx8IDYwMCk7XG4gICAg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mllckhhc2goZSldO1xufTtcblxuZnVuY3Rpb24gbm9ybWFsaXplQ29tbWFuZEtleXMoY2FsbGJhY2ssIGUsIGtleUNvZGUpIHtcbiAgICB2YXIgaGFzaElkID0gZ2V0TW9kaWZpZXJIYXNoKGUpO1xuXG4gICAgaWYgKCF1c2VyYWdlbnQuaXNNYWMgJiYgcHJlc3NlZEtleXMpIHtcbiAgICAgICAgaWYgKGUuZ2V0TW9kaWZpZXJTdGF0ZSAmJiAoZS5nZXRNb2RpZmllclN0YXRlKFwiT1NcIikgfHwgZS5nZXRNb2RpZmllclN0YXRlKFwiV2luXCIpKSlcbiAgICAgICAgICAgIGhhc2hJZCB8PSA4O1xuICAgICAgICBpZiAocHJlc3NlZEtleXMuYWx0R3IpIHtcbiAgICAgICAgICAgIGlmICgoMyAmIGhhc2hJZCkgIT0gMylcbiAgICAgICAgICAgICAgICBwcmVzc2VkS2V5cy5hbHRHciA9IDA7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmIChrZXlDb2RlID09PSAxOCB8fCBrZXlDb2RlID09PSAxNykge1xuICAgICAgICAgICAgdmFyIGxvY2F0aW9uID0gXCJsb2NhdGlvblwiIGluIGUgPyBlLmxvY2F0aW9uIDogZS5rZXlMb2NhdGlvbjtcbiAgICAgICAgICAgIGlmIChrZXlDb2RlID09PSAxNyAmJiBsb2NhdGlvbiA9PT0gMSkge1xuICAgICAgICAgICAgICAgIGlmIChwcmVzc2VkS2V5c1trZXlDb2RlXSA9PSAxKVxuICAgICAgICAgICAgICAgICAgICB0cyA9IGUudGltZVN0YW1wO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChrZXlDb2RlID09PSAxOCAmJiBoYXNoSWQgPT09IDMgJiYgbG9jYXRpb24gPT09IDIpIHtcbiAgICAgICAgICAgICAgICB2YXIgZHQgPSBlLnRpbWVTdGFtcCAtIHRzO1xuICAgICAgICAgICAgICAgIGlmIChkdCA8IDUwKVxuICAgICAgICAgICAgICAgICAgICBwcmVzc2VkS2V5cy5hbHRHciA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgXG4gICAgaWYgKGtleUNvZGUgaW4ga2V5cy5NT0RJRklFUl9LRVlTKSB7XG4gICAgICAgIGtleUNvZGUgPSAtMTtcbiAgICB9XG4gICAgaWYgKGhhc2hJZCAmIDggJiYgKGtleUNvZGUgPj0gOTEgJiYga2V5Q29kZSA8PSA5MykpIHtcbiAgICAgICAga2V5Q29kZSA9IC0xO1xuICAgIH1cbiAgICBcbiAgICBpZiAoIWhhc2hJZCAmJiBrZXlDb2RlID09PSAxMykge1xuICAgICAgICB2YXIgbG9jYXRpb24gPSBcImxvY2F0aW9uXCIgaW4gZSA/IGUubG9jYXRpb24gOiBlLmtleUxvY2F0aW9uO1xuICAgICAgICBpZiAobG9jYXRpb24gPT09IDMpIHtcbiAgICAgICAgICAgIGNhbGxiYWNrKGUsIGhhc2hJZCwgLWtleUNvZGUpO1xuICAgICAgICAgICAgaWYgKGUuZGVmYXVsdFByZXZlbnRlZClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICB9XG4gICAgXG4gICAgaWYgKHVzZXJhZ2VudC5pc0Nocm9tZU9TICYmIGhhc2hJZCAmIDgpIHtcbiAgICAgICAgY2FsbGJhY2soZSwgaGFzaElkLCBrZXlDb2RlKTtcbiAgICAgICAgaWYgKGUuZGVmYXVsdFByZXZlbnRlZClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgaGFzaElkICY9IH44O1xuICAgIH1cbiAgICBpZiAoIWhhc2hJZCAmJiAhKGtleUNvZGUgaW4ga2V5cy5GVU5DVElPTl9LRVlTKSAmJiAhKGtleUNvZGUgaW4ga2V5cy5QUklOVEFCTEVfS0VZUykpIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cbiAgICBcb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wgJycpO1xufTtcblxuZXhwb3J0cy5jb3B5T2JqZWN0ID0gZnVuY3Rpb24ob2JqKSB7XG4gICAgdmFyIGNvcHkgPSB7fTtcbiAgICBmb3IgKHZhciBrZXkgaW4gb2JqKSB7XG4gICAgICAgIGNvcHlba2V5XSA9IG9ialtrZXldO1xuICAgIH1cbiAgICByZXR1cm4gY29weTtcbn07XG5cbmV4cG9ydHMuY29weUFycmF5ID0gZnVuY3Rpb24oYXJyYXkpe1xuICAgIHZhciBjb3B5ID0gW107XG4gICAgZm9yICh2YXIgaT0wLCBsPWFycmF5Lmxlbmd0aDsgaTxsOyBpKyspIHtcbiAgICAgICAgaWYgKGFycmF5W2ldICYmIHR5cGVvZiBhcnJheVtpXSA9PSBcIm9iamVjdFwiKVxuICAgICAgICAgICAgY29weVtpXSA9IHRoaXMuY29weU9iamVjdChhcnJheVtpXSk7XG4gICAgICAgIGVsc2UgXG4gICAgICAgICAgICBjb3B5W2ldID0gYXJyYXlbaV07XG4gICAgfVxuICAgIHJldHVybiBjb3B5O1xufTtcblxuZXhwb3J0cy5kZWVwQ29weSA9IGZ1bmN0aW9uIGRlZXBDb3B5KG9iaikge1xuICAgIGlmICh0eXBlb2Ygb2JqICE9PSBcIm9iamVjdFwiIHx8ICFvYmopXG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgdmFyIGNvcHk7XG4gICAgaWYgKEFycmF5LmlzQXJyYXkob2JqKSkge1xuICAgICAgICBjb3B5ID0gW107XG4gICAgICAgIGZvciAodmFyIGtleSA9IDA7IGtleSA8IG9iai5sZW5ndGg7IGtleSsrKSB7XG4gICAgICAgICAgICBjb3B5W2tleV0gPSBkZWVwQ29weShvYmpba2V5XSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGNvcHk7XG4gICAgfVxuICAgIGlmIChPYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwob2JqKSAhPT0gXCJbb2JqZWN0IE9iamVjdF1cIilcbiAgICAgICAgcmV0dXJ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T0xERVIuc3Vic3RyKDAsIDQpKVxuICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnN1YnN0cig0LCBkYXRhLmxlbmd0aCAtIFBMQUNFSE9MREVSLmxlbmd0aCArIDEpO1xuICAgICAgICAgICAgZWxzZSBpZiAoZGF0YS5jaGFyQXQoZGF0YS5sZW5ndGggLSAxKSA9PSBQTEFDRUhPTERFUi5jaGFyQXQoMCkpXG4gICAgICAgICAgICAgICAgZGF0YSA9IGRhdGEuc2xpY2UoMCwgLTEpO1xuICAgICAgICAgICAgaWYgKGRhdGEgPT0gUExBQ0VIT0xERVIuY2hhckF0KDApKSB7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGRhdGEuY2hhckF0KGRhdGEubGVuZ3RoIC0gMSkgPT0gUExBQ0VIT0xERVIuY2hhckF0KDApKVxuICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLnNsaWNlKDAsIC0xKTtcblxuICAgICAgICAgICAgaWYgKGRhdGEpXG4gICAgICAgICAgICAgICAgaG9zdC5vblRleHRJbnB1dChkYXRhKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoY29waWVkKSB7XG4gICAgICAgICAgY29waWVkID0gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGFmdGVyQ29udGV4dE1lbnUpXG4gICAgICAgICAgICBhZnRlckNvbnRleHRNZW51ID0gZmFsc2U7XG4gICAgfTtcbiAgICB2YXIgb25JbnB1dCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKGluQ29tcG9zaXRpb24pXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIHZhciBkYXRhID0gdGV4dC52YWx1ZTtcbiAgICAgICAgc2VuZFRleHQoZGF0YSk7XG4gICAgICAgIHJlc2V0VmFsdWUoKTtcbiAgICB9O1xuXG4gICAgdmFyIGhhbmRsZUNsaXBib2FyZERhdGEgPSBmdW5jdGlvbihlLCBkYXRhLCBmb3JjZUlFTWltZSkge1xuICAgICAg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BkYXRhICsgXCJhIGFcXG5cIjtcbiAgICAgICAgICAgICAgICB0ZXh0LnNldFNlbGVjdGlvblJhbmdlKDQsIDQgKyBkYXRhLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgY29waWVkID0ge1xuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogZGF0YVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpc0N1dCA/IGhvc3Qub25DdXQoKSA6IGhvc3Qub25Db3B5KCk7XG4gICAgICAgICAgICBpZiAoIXVzZXJhZ2VudC5pc0lPUykgZXZlbnQucHJldmVudERlZmF1bHQoZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb3BpZWQgPSB0cnVlO1xuICAgICAgICAgICAgdGV4dC52YWx1ZSA9IGRhdGE7XG4gICAgICAgICAgICB0ZXh0LnNlbGVjdCgpO1xuICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpe1xuICAgICAgICAgICAgICAgIGNvcGllZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHJlc2V0VmFsdWUoKTtcbiAgICAgICAgICAgICAgICByZXNldFNlbGVjdGlvbigpO1xuICAgICAgICAgICAgICAgIGlzQ3V0ID8gaG9zdC5vbkN1dCgpIDogaG9zdC5vbkNvcHkoKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBvbkN1dCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgZG9Db3B5KGUsIHRydWUpO1xuICAgIH07XG5cbiAgICB2YXIgb25Db3B5ID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBkb0NvcHkoZSwgZmFsc2UpO1xuICAgIH07XG5cbiAgICB2YXIgb25QYXN0ZSA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgdmFyIGRhdGEgPSBoYW5kbGVDbGlwYm9hcmREYXRhKGUpO1xuICAgICAgICBpZiAodHlwZW9mIGRhdGE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G4gICAgICAgICAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgIHNlbmRUZXh0KHN0cik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBpbnB1dEhhbmRsZXIgPSBmdW5jdGlvbiBjb21wb3NpdGlvbklucHV0SGFuZGxlcihzdHIpIHtcbiAgICAgICAgICAgIGlmICh0aW1lcilcbiAgICAgICAgICAgICAgICBjbGVhclRpbWVvdXQodGltZXIpO1xuICAgICAgICAgICAgc3RyID0gc3RyLnJlcGxhY2UoL1xceDAxL2csIFwiXCIpO1xuICAgICAgICAgICAgaWYgKHN0ciA9PSBjLmxhc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgICAgIGlmIChjLmxhc3RWYWx1ZSAmJiB0aW1lcilcbiAgICAgICAgICAgICAgICBob3N0LnVuZG8oKTtcbiAgICAgICAgICAgIHJldHVybiBzdHI7XG4gICAgICAgIH07XG4gICAgICAgIGhvc3Qub25Db21wb3NpdGlvbkVuZCgpO1xuICAgICAgICBob3N0LnJlbW92ZUxpc3RlbmVyKFwibW91c2Vkb3duXCIsIG9uQ29tcG9zaXRpb25FbmQpO1xuICAgICAgICBpZiAoZS50eXBlID09IFwiY29tcG9zaXRpb25lbmRcIiAmJiBjLnJhbmdlKSB7XG4gICAgICAgICAgICBob3N0LnNlbGVjdGlvbi5zZXRSYW5nZShjLnJhbmdlKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmVlZHNPbklucHV0ID1cbiAgICAgICAgICAgICghIXVzZXJhZ2VudC5pc0Nocm9tZSAmJiB1c2VyYWdlbnQuaXNDaHJvbWUgPj0gNTMpIHx8XG4gICAgICAgICAgICAoISF1c2VyYWdlbnQuaXNXZWJLaXQgJiYgdXNlcmFnZW50LmlzV2ViS2l0ID49IDYwMyk7XG5cbiAgICAgICAgaWYgKG5lZWRzT25JbnB1dCkge1xuICAgICAgICAgIG9uSW5wdX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Jlc2V0VGltZW91dCk7XG4gICAgICAgICAgICB0eXBpbmcgPSB0cnVlO1xuICAgICAgICB9KTtcblxuICAgICAgICBwYXJlbnROb2RlLmFkZEV2ZW50TGlzdGVuZXIoXCJrZXl1cFwiLCBmdW5jdGlvbiAoZSkge1xuICAgICAgICAgICAgdHlwaW5nUmVzZXRUaW1lb3V0ID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgdHlwaW5nID0gZmFsc2U7XG4gICAgICAgICAgICB9LCAxMDApO1xuICAgICAgICB9KTtcbiAgICAgICAgdmFyIGRldGVjdEFycm93S2V5cyA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIGlmIChkb2N1bWVudC5hY3RpdmVFbGVtZW50ICE9PSB0ZXh0KSByZXR1cm47XG4gICAgICAgICAgICBpZiAodHlwaW5nKSByZXR1cm47XG5cbiAgICAgICAgICAgIGlmIChjdXQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1dCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIH0sIDEwMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgc2VsZWN0aW9uU3RhcnQgPSB0ZXh0LnNlbGVjdGlvblN0YXJ0O1xuICAgICAgICAgICAgdmFyIHNlbGVjdGlvbkVuZCA9IHRleHQuc2VsZWN0aW9uRW5kO1xuICAgICAgICAgICAgdGV4dC5zZXRTZWxlY3Rpb25SYW5nZSg0LCA1KTtcbiAgICAgICAgICAgIGlmIChzZWxlY3Rpb25TdGFydCA9PSBzZWxlY3Rpb25FbmQpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHNlbGVjdGlvblN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMDogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgMCwgS0VZUy51cCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDE6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMuaG9tZSk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDI6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIE1PRFMub3B0aW9uLCBLRVlTLmxlZnQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA0OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCAwLCBLRVlTLmxlZnQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA1OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCAwLCBLRVlTLnJpZ2h0KTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNzogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgTU9EUy5vcHRpb24sIEtFWVMucmlnaHQpOyBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA4OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCAwLCBLRVlTLmVuZCk7IGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIDk6IGhvc3Qub25Db21tYW5kS2V5KG51bGwsIDAsIEtFWVMuZG93bik7IGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3dpdGNoIChzZWxlY3Rpb25FbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA2OiBob3N0Lm9uQ29tbWFuZEtleShudWxsLCBNT0RTLnNoaWZ0LCBLRVlTLnJpZ2h0KTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgNzogaG9zdC5vbkNvbW1hbmRLZXkobnVsbCwgTU9EUy5zaGlmdCB8IE1PRFMub3B0aW9uLCBLRVlTLnJpZ2h0KTsgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgODogaG9zdC5vbkNvbW1hb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ICAgICAgICB0cnkge1xuICAgICAgICAgICAgaWYgKGRhdGEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY2xpcGJvYXJkRGF0YS5zZXREYXRhKG1pbWUsIGRhdGEpICE9PSBmYWxzZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNsaXBib2FyZERhdGEuZ2V0RGF0YShtaW1lKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaChlKSB7XG4gICAgICAgICAgICBpZiAoIWZvcmNlSUVNaW1lKVxuICAgICAgICAgICAgICAgIHJldHVybiBoYW5kbGVDbGlwYm9hcmREYXRhKGUsIGRhdGEsIHRydWUpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBkb0NvcHkgPSBmdW5jdGlvbihlLCBpc0N1dCkge1xuICAgICAgICB2YXIgZGF0YSA9IGhvc3QuZ2V0Q29weVRleHQoKTtcbiAgICAgICAgaWYgKCFkYXRhKVxuICAgICAgICAgICAgcmV0dXJuIGV2ZW50LnByZXZlbnREZWZhdWx0KGUpO1xuXG4gICAgICAgIGlmIChoYW5kbGVDbGlwYm9hcmREYXRhKGUsIGRhdGEpKSB7XG4gICAgICAgICAgICBpc0N1dCA/IGhvc3Qub25DdXQoKSA6IGhvc3Qub25Db3B5KCk7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvcGllZCA9IHRydWU7XG4gICAgICAgICAgICB0ZXh0LnZhbHVlID0gZGF0YTtcbiAgICAgICAgICAgIHRleHQuc2VsZWN0KCk7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7XG4gICAgICAgICAgICAgICAgY29waWVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgICAgICAgICAgICAgIHJlc2V0U2VsZWN0aW9uKCk7XG4gICAgICAgICAgICAgICAgaXNDdXQgPyBob3N0Lm9uQ3V0KCkgOiBob3N0Lm9uQ29weSgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHZhciBvbkN1dCA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgZG9Db3B5KGUsIHRydWUpO1xuICAgIH07XG4gICAgXG4gICAgdmFyIG9uQ29weSA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgZG9Db3B5KGUsIGZhbHNlKTtcbiAgICB9O1xuICAgIFxuICAgIHZhciBvblBhc3RlID0gZnVuY3Rpb24oZSkge1xuICAgICAgICB2YXIgZGF0YSA9IGhhbmRsZUNsaXBib2FyZERhdGEoZSk7XG4gICAgICAgIGlmICh0eXBlb2YgZGF0YSA9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICBpZiAoZGF0YSlcbiAgICAgICAgICAgICAgICBob3N0Lm9uUGFzdGUoZGF0YSwgZSk7XG4gICAgICAgICAgICBpZiAodXNlcmFnZW50LmlzSUUpXG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChyZXNldFNlbGVjdGlvbik7XG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHRleHQudmFsdWUgPSBcIlwiO1xuICAgICAgICAgICAgcGFzdGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICBldmVudC5hZGRDb21tYW5kS2V5TGlzdGVuZXIodGV4dCwgaG9zdC5vbkNvbW1hbmRLZXkuYmluZChob3N0KSk7XG5cbiAgICBldmVudC5hZGRMaXN0ZW5lcih0ZXh0LCBcInNlbGVjdFwiLCBvblNlbGVjdCk7XG5cbiAgICBldmVudC5hZGRMaXN0ZW5lcih0ZXh0LCBcImlucHV0XCIsIG9uSW5wdXQpO1xuXG4gICAgZXZlbnQuYWRkTGlzdGVuZXIodGV4dCwgXCJjdXRcIiwgb25DdXQpO1xuICAgIGV2ZW50LmFkZExpc3RlbmVyKHRleHQsIFwiY29weVwiLCBvbkNvcHkpO1xuICAgIGV2ZW50LmFkZExpc3RlbmVyKHRleHQsIFwicGFzdGVcIiwgb25QYXN0ZSk7XG4gICAgaWYgKCEoJ29uY3V0JyBpbiB0ZXh0KSB8fCAhKCdvbmNvcHknIGluIHRleHQpIHx8ICEoJ29ucGFzdGUnIGluIHRleHQpKSB7XG4gICAgICAgIGV2ZW50LmFkZExpc3RlbmVyKHBhcmVudE5vZGUsIFwia2V5ZG93blwiLCBmdW5jdGlvbihlKSB7XG4gICAgICAgICAgICBpZiAoKHVzZXJhZ2VudC5pc01hYyAmJiAhZS5tZXRhS2V5KSB8fCAhZS5jdHJsS2V5KVxuICAgICAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICAgICAgc3dpdGNoIChlLmtleUNvZGUpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDY3OlxuICAgICAgICAgICAgICAgICAgICBvbkNvcHkoZSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgODY6XG4gICAgICAgICAgICAgICAgICAgIG9uUGFzdGUoZSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgODg6XG4gICAgICAgICAgICAgICAgICAgIG9uQ3V0KGUpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuICAgIHZhciBvbkNvbXBvc2l0aW9uU3RhcnQgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGlmIChpbkNvbXBvc2l0aW9uIHx8ICFob3N0Lm9uQ29tcG9zaXRpb25TdGFydCB8fCBob3N0LiRyZWFkT25seSkgXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGluQ29tcG9zaXRpb24gPSB7fTtcbiAgICAgICAgaW5Db21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KVxuICAgICAgICAgICAgaW5Db21wb3NpdGlvbi5sYXN0VmFsdWUgPSB2YWw7XG4gICAgICAgIGlmIChpbkNvbXBvc2l0aW9uLmxhc3RWYWx1ZSkge1xuICAgICAgICAgICAgdmFyIHIgPSBob3N0LnNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgaG9zdC5pbnNlcnQoaW5Db21wb3NpdGlvbi5sYXN0VmFsdWUpO1xuICAgICAgICAgICAgaG9zdC5zZXNzaW9uLm1hcmtVbmRvR3JvdXAoKTtcbiAgICAgICAgICAgIGluQ29tcG9zaXRpb24ucmFuZ2UgPSBob3N0LnNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgaG9zdC5zZWxlY3Rpb24uc2V0UmFuZ2Uocik7XG4gICAgICAgICAgICBob3N0LnNlbGVjdGlvbi5jbGVhclNlbGVjdGlvbigpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHZhciBvbkNvbXBvc2l0aW9uRW5kID0gZnVuY3Rpb24oZSkge1xuICAgICAgICBpZiAoIWhvc3Qub25Db21wb3NpdGlvbkVuZCB8fCBob3N0LiRyZWFkT25seSkgcmV0dXJuO1xuICAgICAgICB2YXIgYyA9IGluQ29tcG9zaXRpb247XG4gICAgICAgIGluQ29tcG9zaXRpb24gPSBmYWxzZTtcbiAgICAgICAgdmFyIHRpbWVyID0gc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIHRpbWVyID0gbnVsbDtcbiAgICAgICAgICAgIHZhciBzdHIgPSB0ZXh0LnZhbHVlLnJlcGxhY2UoL1xcdTIwMjgvZywgXCJcIik7XG4gICAgICAgICAgICBpZiAoaW5Db21wb3NpdGlvbilcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBlbHNlIGlmIChzdHIgPT0gYy5sYXN0VmFsdWUpXG4gICAgICAgICAgICAgICAgcmVzZXRWYWx1ZSgpO1xuICAgICAgICAgICAgZWxzZSBpZiAoIWMubGFzdFZhbHVlICYmIHN0cikge1xuICAgICAgICAgICAgICAgIHJlc2V0VmFsdWUoKTtcbiAgICAgICAgICAgICAgICBzZW5kVGV4dChzdHIpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaW5wdXRIYW5kbGVyID0gZnVuY3Rpb24gY29tcG9zaXRpb25JbnB1dEhhbmRsZXIoc3RyKSB7XG4gICAgICAgICAgICBpZiAodGltZXIpXG4gICAgICAgICAgICAgICAgY2xlYXJUaW1lb3V0KHRpbWVyKTtcbiAgICAgICAgICAgIHN0ciA9IHN0ci5yZXBsYWNlKC9cXHUyMDI4L2csIFwiXCIpO1xuICAgICAgICAgICAgaWYgKHN0ciA9PSBjLmxhc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgICAgIGlmIChjLmxhc3RWYWx1ZSAmJiB0aW1lcilcbiAgICAgICAgICAgICAgICBob3N0LnVuZG8oKTtcbiAgICAgICAgICAgIHJldHVybiBzdHI7XG4gICAgICAgIH07XG4gICAgICAgIGhvc3Qub25Db21wb3NpdGlvbkVuZCgpO1xuICAgICAgICBob3N0LnJlbW92ZUxpc3RlbmVyKFwibW91c2Vkb3duXCIsIG9uQ29tcG9zaXRpb25FbmQpO1xuICAgICAgICBpZiAoZS50eXBlID09IFwiY29tcG9zaXRpb25lbmRcIiAmJiBjLnJhbmdlKSB7XG4gICAgICAgICAgICBob3N0LnNlbGVjdGlvbi5zZXRSYW5nZShjLnJhbmdlKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgbmVlZHNPbklucHV0ID1cbiAgICAgICAgICAgICghIXVzZXJhZ2VudC5pc0Nocm9tZSAmJiB1c2VyYWdlbnQuaXNDaHJvbWUgPj0gNTMpIHx8XG4gICAgICAgICAgICAoISF1c2VyYWdlbnQuaXNXZWJLaXQgJiYgdXNlcmFnZW50LmlzV2ViS2l0ID49IDYwMyk7XG5cbiAgICAgICAgaWYgKG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HRvbigpO1xuICAgICAgICBpZiAoYnV0dG9uICE9PSAwKSB7XG4gICAgICAgICAgICB2YXIgc2VsZWN0aW9uUmFuZ2UgPSBlZGl0b3IuZ2V0U2VsZWN0aW9uUmFuZ2UoKTtcbiAgICAgICAgICAgIHZhciBzZWxlY3Rpb25FbXB0eSA9IHNlbGVjdGlvblJhbmdlLmlzRW1wdHkoKTtcbiAgICAgICAgICAgIGVkaXRvci4kYmxvY2tTY3JvbGxpbmcrKztcbiAgICAgICAgICAgIGlmIChzZWxlY3Rpb25FbXB0eSB8fCBidXR0b24gPT0gMSlcbiAgICAgICAgICAgICAgICBlZGl0b3Iuc2VsZWN0aW9uLm1vdmVUb1Bvc2l0aW9uKHBvcyk7XG4gICAgICAgICAgICBlZGl0b3IuJGJsb2NrU2Nyb2xsaW5nLS07XG4gICAgICAgICAgICBpZiAoYnV0dG9uID09IDIpIHtcbiAgICAgICAgICAgICAgICBlZGl0b3IudGV4dElucHV0Lm9uQ29udGV4dE1lbnUoZXYuZG9tRXZlbnQpO1xuICAgICAgICAgICAgICAgIGlmICghdXNlcmFnZW50LmlzTW96aWxsYSlcbiAgICAgICAgICAgICAgICAgICAgZXYucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMubW91c2Vkb3duRXZlbnQudGltZSA9IERhdGUubm93KCk7XG4gICAgICAgIGlmIChpblNlbGVjdGlvbiAmJiAhZWRpdG9yLmlzRm9jdXNlZCgpKSB7XG4gICAgICAgICAgICBlZGl0b3IuZm9jdXMoKTtcbiAgICAgICAgICAgIGlmICh0aGlzLiRmb2N1c1RpbW91dCAmJiAhdGhpcy4kY2xpY2tTZWxlY3Rpb24gJiYgIWVkaXRvci5pbk11bHRpU2VsZWN0TW9kZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoXCJmb2N1c1dhaXRcIik7XG4gICAgICAgICAgICAg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gIT0gY3Vyc29yLmNvbHVtbilcbiAgICAgICAgICAgICAgICAgICAgY3Vyc29yID0gcmFuZ2Uuc3RhcnQ7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNtcEVuZCA9PSAxICYmIGNtcFN0YXJ0ID49IDApIHtcbiAgICAgICAgICAgICAgICBhbmNob3IgPSB0aGlzLiRjbGlja1NlbGVjdGlvbi5zdGFydDtcbiAgICAgICAgICAgICAgICBpZiAocmFuZ2Uuc3RhcnQucm93ICE9IGN1cnNvci5yb3cgfHwgcmFuZ2Uuc3RhcnQuY29sdW1uICE9IGN1cnNvci5jb2x1bW4pXG4gICAgICAgICAgICAgICAgICAgIGN1cnNvciA9IHJhbmdlLmVuZDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY21wU3RhcnQgPT0gLTEgJiYgY21wRW5kID09IDEpIHtcbiAgICAgICAgICAgICAgICBjdXJzb3IgPSByYW5nZS5lbmQ7XG4gICAgICAgICAgICAgICAgYW5jaG9yID0gcmFuZ2Uuc3RhcnQ7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBvcmllbnRlZFJhbmdlID0gY2FsY1JhbmdlT3JpZW50YXRpb24odGhpcy4kY2xpY2tTZWxlY3Rpb24sIGN1cnNvcik7XG4gICAgICAgICAgICAgICAgY3Vyc29yID0gb3JpZW50ZWRSYW5nZS5jdXJzb3I7XG4gICAgICAgICAgICAgICAgYW5jaG9yID0gb3JpZW50ZWRSYW5nZS5hbmNob3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlZGl0b3Iuc2VsZWN0aW9uLnNldFNlbGVjdGlvbkFuY2hvcihhbmNob3Iucm93LCBhbmNob3IuY29sdW1uKTtcbiAgICAgICAgfVxuICAgICAgICBlZGl0b3Iuc2VsZWN0aW9uLnNlbGVjdFRvUG9zaXRpb24oY3Vyc29yKTtcbiAgICAgICAgZWRpdG9yLiRibG9ja1Njcm9sbGluZy0tO1xuICAgICAgICBlZG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G9vbHRpcC5zaG93KCk7XG4gICAgICAgIGVkaXRvci5fc2lnbmFsKFwic2hvd0d1dHRlclRvb2x0aXBcIiwgdG9vbHRpcCk7XG4gICAgICAgIGVkaXRvci5vbihcIm1vdXNld2hlZWxcIiwgaGlkZVRvb2x0aXApO1xuXG4gICAgICAgIGlmIChtb3VzZUhhbmRsZXIuJHRvb2x0aXBGb2xsb3dzTW91c2UpIHtcbiAgICAgICAgICAgIG1vdmVUb29sdGlwKG1vdXNlRXZlbnQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGd1dHRlckVsZW1lbnQgPSBtb3VzZUV2ZW50LmRvbUV2ZW50LnRhcmdldDtcbiAgICAgICAgICAgIHZhciByZWN0ID0gZ3V0dGVyRWxlbWVudC5nZXRCb3VuZGluZ0NsaWVudFJlY3QoKTtcbiAgICAgICAgICAgIHZhciBzdHlsZSA9IHRvb2x0aXAuZ2V0RWxlbWVudCgpLnN0eWxlO1xuICAgICAgICAgICAgc3R5bGUubGVmdCA9IHJlY3QucmlnaHQgKyBcInB4XCI7XG4gICAgICAgICAgICBzdHlsZS50b3AgPSByZWN0LmJvdHRvbSArIFwicHhcIjtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGhpZGVUb29sdGlwKCkge1xuICAgICAgICBpZiAodG9vbHRpcFRpbWVvdXQpXG4gICAgICAgICAgICB0b29sdGlwVGltZW91dCA9IGNsZWFyVGltZW91dCh0b29sdGlwVGltZW91dCk7XG4gICAgICAgIGlmICh0b29sdGlwQW5ub3RhdGlvbikge1xuICAgICAgICAgICAgdG9vbHRpcC5oaWRlKCk7XG4gICAgICAgICAgICB0b29sdGlwQW5ub3RhdGlvbiA9IG51bGw7XG4gICAgICAgICAgICBlZGl0b3IuX3NpZ25hbChcImhpZGVHdXR0ZXJUb29sdGlwXCIsIHRvb2x0aXApO1xuICAgICAgICAgICAgZWRpdG9yLnJlbW92ZUV2ZW50TGlzdGVuZXIoXCJt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ZW50LnByZXZlbnREZWZhdWx0KGUpO1xuICAgIH07XG5cbiAgICB0aGlzLm9uRHJhZ092ZXIgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGlmIChlZGl0b3IuZ2V0UmVhZE9ubHkoKSB8fCAhY2FuQWNjZXB0KGUuZGF0YVRyYW5zZmVyKSlcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgeCA9IGUuY2xpZW50WDtcbiAgICAgICAgeSA9IGUuY2xpZW50WTtcbiAgICAgICAgaWYgKCFkcmFnU2VsZWN0aW9uTWFya2VyKSB7XG4gICAgICAgICAgICBhZGREcmFnTWFya2VyKCk7XG4gICAgICAgICAgICBjb3VudGVyKys7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG9uTW91c2VNb3ZlVGltZXIgIT09IG51bGwpXG4gICAgICAgICAgICBvbk1vdXNlTW92ZVRpbWVyID0gbnVsbDtcblxuICAgICAgICBlLmRhdGFUcmFuc2Zlci5kcm9wRWZmZWN0ID0gZHJhZ09wZXJhdGlvbiA9IGdldERyb3BFZmZlY3QoZSk7XG4gICAgICAgIHJldHVybiBldmVudC5wcmV2ZW50RGVmYXVsdChlKTtcbiAgICB9O1xuXG4gICAgdGhpcy5vbkRyYWdMZWF2ZSA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgY291bnRlci0tO1xuICAgICAgICBpZiAoY291bnRlciA8PSAwICYmIGRyYWdTZWxlY3Rpb25NYXJrZXIpIHtcbiAgICAgICAgICAgIGNsZWFyRHJhZ01hcmtlcigpO1xuICAgICAgICAgICAgZHJhZ09wZXJhdGlvbiA9IG51bGw7XG4gICAgICAgICAgICByZXR1cm4gZXZlbnQucHJldmVudERlZmF1bHQoZSk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy5vbkRyb3AgPSBmdW5jdGlvbihlKSB7XG4gICAgICAgIGlmICghZHJhZ0N1cnNvcilcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdmFyIGRhdGFUcmFuc2ZlciA9IGUuZGF0YVRyYW5zZmVyO1xuICAgICAgICBpZiAoaXNJbnRlcm5hbCkge1xuICAgICAgICAgICAgc3dpdGNoIChkcmFnT3BlcmF0aW9uKSB7XG4gICAgICAgICAgICAgICAgY2FzZSBcIm1vdmVcIjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJhbmdlLmNvbnRhaW5zKGRyYWdDdXJzb3Iucm93LCBkcmFnQ3Vyc29yLmNvbHVtbikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0OiBkcmFnQ3Vyc29yLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZDogZHJhZ0N1cnNvclxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlID0gZWRpdG9yLm1vdmVUZXh0KHJhbmdlLCBkcmFnQ3Vyc29yKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlIFwiY29weVwiOlxuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IGVkaXRvci5tb3ZlVGV4dChyYW5nZSwgZHJhZ0N1cnNvciwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGRyb3BEYXRhID0gZGF0YVRyYW5zZmVyLmdldERhdGEoJ1RleHQnKTtcbiAgICAgICAgICAgIHJhbmdlID0ge1xuICAgICAgICAgICAgICAgIHN0YXJ0OiBkcmFnQ3Vyc29yLFxuICAgICAgICAgICAgICAgIGVuZDogZWRpdG9yLnNlc3Npb24uaW5zZXJ0KGRyYWdDdXJzb3IsIGRyb3BEYXRhKVxuICAgICAgICAgICA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JldkN1cnNvci5yb3c7XG4gICAgICAgIHZhciBoTW92ZW1lbnQgPSAhcHJldkN1cnNvciB8fCBjdXJzb3IuY29sdW1uICE9IHByZXZDdXJzb3IuY29sdW1uO1xuICAgICAgICBpZiAoIWN1cnNvck1vdmVkVGltZSB8fCB2TW92ZW1lbnQgfHwgaE1vdmVtZW50KSB7XG4gICAgICAgICAgICBlZGl0b3IuJGJsb2NrU2Nyb2xsaW5nICs9IDE7XG4gICAgICAgICAgICBlZGl0b3IubW92ZUN1cnNvclRvUG9zaXRpb24oY3Vyc29yKTtcbiAgICAgICAgICAgIGVkaXRvci4kYmxvY2tTY3JvbGxpbmcgLT0gMTtcbiAgICAgICAgICAgIGN1cnNvck1vdmVkVGltZSA9IG5vdztcbiAgICAgICAgICAgIGN1cnNvclBvaW50T25DYXJldE1vdmVkID0ge3g6IHgsIHk6IHl9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGRpc3RhbmNlID0gY2FsY0Rpc3RhbmNlKGN1cnNvclBvaW50T25DYXJldE1vdmVkLngsIGN1cnNvclBvaW50T25DYXJldE1vdmVkLnksIHgsIHkpO1xuICAgICAgICAgICAgaWYgKGRpc3RhbmNlID4gU0NST0xMX0NVUlNPUl9IWVNURVJFU0lTKSB7XG4gICAgICAgICAgICAgICAgY3Vyc29yTW92ZWRUaW1lID0gbnVsbDtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobm93IC0gY3Vyc29yTW92ZWRUaW1lID49IFNDUk9MTF9DVVJTT1JfREVMQVkpIHtcbiAgICAgICAgICAgICAgICBlZGl0b3IucmVuZGVyZXIuc2Nyb2xsQ3Vyc29ySW50b1ZpZXcoKTtcbiAgICAgICAgICAgICAgICBjdXJzb3JNb3ZlZFRpbWUgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gYXV0b1Njcm9sbChjdXJzb3IsIHByZXZDdXJzb3IpIHtcbiAgICA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ICAgICAgfVxuICAgICAgICBpZiAodGhpcy5zdGF0ZSA9PT0gXCJkcmFnV2FpdFwiKSB7XG4gICAgICAgICAgICB2YXIgZGlzdGFuY2UgPSBjYWxjRGlzdGFuY2UodGhpcy5tb3VzZWRvd25FdmVudC54LCB0aGlzLm1vdXNlZG93bkV2ZW50LnksIHRoaXMueCwgdGhpcy55KTtcbiAgICAgICAgICAgIGlmIChkaXN0YW5jZSA+IDApIHtcbiAgICAgICAgICAgICAgICB0YXJnZXQuZHJhZ2dhYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFydFNlbGVjdCh0aGlzLm1vdXNlZG93bkV2ZW50LmdldERvY3VtZW50UG9zaXRpb24oKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy5vbk1vdXNlRG93biA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKCF0aGlzLiRkcmFnRW5hYmxlZClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdGhpcy5tb3VzZWRvd25FdmVudCA9IGU7XG4gICAgICAgIHZhciBlZGl0b3IgPSB0aGlzLmVkaXRvcjtcblxuICAgICAgICB2YXIgaW5TZWxlY3Rpb24gPSBlLmluU2VsZWN0aW9uKCk7XG4gICAgICAgIHZhciBidXR0b24gPSBlLmdldEJ1dHRvbigpO1xuICAgICAgICB2YXIgY2xpY2tDb3VudCA9IGUuZG9tRXZlbnQuZGV0YWlsIHx8IDE7XG4gICAgICAgIGlmIChjbGlja0NvdW50ID09PSAxICYmIGJ1dHRvbiA9PT0gMCAmJiBpblNlbGVjdGlvbikge1xuICAgICAgICAgICAgaWYgKGUuZWRpdG9yLmluTXVsdGlTZWxlY3RNb2RlICYmIChlLmdldEFjY2VsS2V5KCkgfHwgZS5nZXRTaGlmdEtleSgpKSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB0aGlzLm1vdXNlZG93bkV2ZW50LnRpbWUgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgdmFyIGV2ZW50VGFyZ2V0ID0gZS5kb21FdmVudC50YXJnZXQgfHwgZS5kb21FdmVudC5zcmNFbGVtZW50O1xuICAgICAgICAgICAgaWYgKFwidW5zZWxlY3RhYmxlXCIgaW4gZXZlbnRUYXJnZXQpXG4gICAgICAgICAgICAgICAgZXZlbnRUYXJnZXQudW5zZWxlY3RhYmxlID0gXCJvblwiO1xuICAgICAgICAgICAgaWYgKGVkaXRvci5nZXREcmFnRGVsYXkoKSkge1xuICAgICAgICAgICAgICAgIGlmICh1c2VyYWdlbnQuaXNXZWJLaXQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jYW5jZWxEcmFnID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG1vdXNlVGFyZ2V0ID0gZWRpdG9yLmNvbnRhaW5lcjtcbiAgICAgICAgICAgICAgICAgICAgbW91c2VUYXJnZXQuZHJhZ2dhYmxlID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZShcImRyYWdXYWl0XCIpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnN0YXJ0RHJhZygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5jYXB0dXJlTW91c2UoZSwgdGhpcy5vbk1vdXNlRHJhZy5iaW5kKHRoaXMpKTtcbiAgICAgICAgICAgIGUuZGVmYXVsdFByZXZlbnRlZCA9IHRydWU7XG4gICAgICAgIH1cbiAgICB9O1xuXG59KS5jYWxsKERyYWdkcm9wSGFuZGxlci5wcm90b3R5cGUpO1xuXG5cbmZ1bmN0aW9uIGNhbGNEaXN0YW5jZShheCwgYXksIGJ4LCBieSkge1xuICAgIHJldHVybiBNYXRoLnNxcnQoTWF0aC5wb3coYnggLSBheCwgMikgKyBNYXRoLnBvdyhieSAtIGF5LCAyKSk7XG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SZWdpb24gPSBlZGl0b3IucmVuZGVyZXIuJGd1dHRlckxheWVyLmdldFJlZ2lvbihlKTtcblxuICAgICAgICBpZiAoZ3V0dGVyUmVnaW9uID09IFwiZm9sZFdpZGdldHNcIikge1xuICAgICAgICAgICAgdmFyIHJvdyA9IGUuZ2V0RG9jdW1lbnRQb3NpdGlvbigpLnJvdztcbiAgICAgICAgICAgIHZhciBzZXNzaW9uID0gZWRpdG9yLnNlc3Npb247XG4gICAgICAgICAgICB2YXIgZGF0YSA9IHNlc3Npb24uZ2V0UGFyZW50Rm9sZFJhbmdlRGF0YShyb3csIHRydWUpO1xuICAgICAgICAgICAgdmFyIHJhbmdlID0gZGF0YS5yYW5nZSB8fCBkYXRhLmZpcnN0UmFuZ2U7XG5cbiAgICAgICAgICAgIGlmIChyYW5nZSkge1xuICAgICAgICAgICAgICAgIHJvdyA9IHJhbmdlLnN0YXJ0LnJvdztcbiAgICAgICAgICAgICAgICB2YXIgZm9sZCA9IHNlc3Npb24uZ2V0Rm9sZEF0KHJvdywgc2Vzc2lvbi5nZXRMaW5lKHJvdykubGVuZ3RoLCAxKTtcblxuICAgICAgICAgICAgICAgIGlmIChmb2xkKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb24ucmVtb3ZlRm9sZChmb2xkKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzZXNzaW9uLmFkZEZvbGQoXCIuLi5cIiwgcmFuZ2UpO1xuICAgICAgICAgICAgICAgICAgICBlZGl0b3IucmVuZGVyZXIuc2Nyb2xsQ3Vyc29ySW50b1ZpZXcoe3JvdzogcmFuZ2Uuc3RhcnQucm93LCBjb2x1bW46IDB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlLnN0b3AoKTtcbiAgICAgICAgfVxuICAgIH0pO1xufVxuXG5leHBvcnRzLkZvbGRIYW5kbGVyID0gRm9sZEhhbmRsZXI7XG5cbn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mN1cnJlbnRSb3cpO1xuICAgICAgICAgICAgaWYgKGluZGV4ID49IDApXG4gICAgICAgICAgICAgICAgZG9jUm93ID0gdGhpcy5zZXNzaW9uLiRkb2NSb3dDYWNoZVtpbmRleF07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZG9jUm93O1xuICAgIH07XG5cbiAgICB0aGlzLmdldFNwbGl0SW5kZXggPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdmFyIHNwbGl0SW5kZXggPSAwO1xuICAgICAgICB2YXIgcm93Q2FjaGUgPSB0aGlzLnNlc3Npb24uJHNjcmVlblJvd0NhY2hlO1xuICAgICAgICBpZiAocm93Q2FjaGUubGVuZ3RoKSB7XG4gICAgICAgICAgICB2YXIgY3VycmVudEluZGV4LCBwcmV2SW5kZXggPSB0aGlzLnNlc3Npb24uJGdldFJvd0NhY2hlSW5kZXgocm93Q2FjaGUsIHRoaXMuY3VycmVudFJvdyk7XG4gICAgICAgICAgICB3aGlsZSAodGhpcy5jdXJyZW50Um93IC0gc3BsaXRJbmRleCA+IDApIHtcbiAgICAgICAgICAgICAgICBjdXJyZW50SW5kZXggPSB0aGlzLnNlc3Npb24uJGdldFJvd0NhY2hlSW5kZXgocm93Q2FjaGUsIHRoaXMuY3VycmVudFJvdyAtIHNwbGl0SW5kZXggLSAxKTtcbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudEluZGV4ICE9PSBwcmV2SW5kZXgpXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgcHJldkluZGV4ID0gY3VycmVudEluZGV4O1xuICAgICAgICAgICAgICAgIHNwbGl0SW5kZXgrKztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBzcGxpdEluZGV4O1xuICAgIH07XG5cbiAgICB0aGlzLnVwZGF0ZVJvd0xpbmUgPSBmdW5jdGlvbihkb2NSb3csIHNwbGl0SW5kZXgpIHtcbiAgICAgICAgaWYgKGRvY1JvdyA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgZG9jUm93ID0gdGhpcy5nZXREb2N1bWVudFJvdygpO1xuXG4gICAgICAgIHRoaXMud3JhcEluZGVudCA9IDA7XG4gICAgICAgIHRoaXMuaXNMYXN0Um93ID0gKGRvY1JvdyA9PT0gdGhpcy5zZXNzaW9uLmdldExlbmd0aCgpIC0gMSk7XG4gICAgICAgIHRoaXMubGluZSA9IHRoaXMuc2Vzc2lvbi5nZXRMaW5lKGRvY1Jvdyk7XG4gICAgICAgIGlmICh0aGlzLnNlc3Npb24uJHVzZVdyYXBNb2RlKSB7XG4gICAgICAgICAgICB2YXIgc3BsaXRzID0gdGhpcy5zZXNzaW9uLiR3cmFwRGF0YVtkb2NSb3ddO1xuICAgICAgICAgICAgaWYgKHNwbGl0cykge1xuICAgICAgICAgICAgICAgIGlmIChzcGxpdEluZGV4ID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgICAgIHNwbGl0SW5kZXggPSB0aGlzLmdldFNwbGl0SW5kZXgoKTtcblxuICAgICAgICAgICAgICAgIGlmKHNwbGl0SW5kZXggPiAwICYmIHNwbGl0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy53cmFwSW5kZW50ID0gc3BsaXRzLmluZGVudDtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5saW5lID0gKHNwbGl0SW5kZXggPCBzcGxpdHMubGVuZ3RoKSA/XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbmUuc3Vic3RyaW5nKHNwbGl0c1tzcGxpdEluZGV4IC0gMV0sIHNwbGl0c1tzcGxpdHMubGVuZ3RoIC0gMV0pIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxpbmUuc3Vic3RyaW5nKHNwbGl0c1tzcGxpdHMubGVuZ3RoIC0gMV0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXM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ArIHRoaXMuc3RhcnQuY29sdW1uICtcbiAgICAgICAgICAgIFwiXSAtPiBbXCIgKyB0aGlzLmVuZC5yb3cgKyBcIi9cIiArIHRoaXMuZW5kLmNvbHVtbiArIFwiXVwiKTtcbiAgICB9O1xuXG4gICAgdGhpcy5jb250YWlucyA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmNvbXBhcmUocm93LCBjb2x1bW4pID09IDA7XG4gICAgfTtcbiAgICB0aGlzLmNvbXBhcmVSYW5nZSA9IGZ1bmN0aW9uKHJhbmdlKSB7XG4gICAgICAgIHZhciBjbXAsXG4gICAgICAgICAgICBlbmQgPSByYW5nZS5lbmQsXG4gICAgICAgICAgICBzdGFydCA9IHJhbmdlLnN0YXJ0O1xuXG4gICAgICAgIGNtcCA9IHRoaXMuY29tcGFyZShlbmQucm93LCBlbmQuY29sdW1uKTtcbiAgICAgICAgaWYgKGNtcCA9PSAxKSB7XG4gICAgICAgICAgICBjbXAgPSB0aGlzLmNvbXBhcmUoc3RhcnQucm93LCBzdGFydC5jb2x1bW4pO1xuICAgICAgICAgICAgaWYgKGNtcCA9PSAxKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNtcCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKGNtcCA9PSAtMSkge1xuICAgICAgICAgICAgcmV0dXJuIC0yO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY21wID0gdGhpcy5jb21wYXJlKHN0YXJ0LnJvdywgc3RhcnQuY29sdW1uKTtcbiAgICAgICAgICAgIGlmIChjbXAgPT0gLTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB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IpIHtcbiAgICAgICAgICAgIHRoaXMuc3RhcnQuY29sdW1uID0gcm93LmNvbHVtbjtcbiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93LnJvdztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc3RhcnQucm93ID0gcm93O1xuICAgICAgICAgICAgdGhpcy5zdGFydC5jb2x1bW4gPSBjb2x1bW47XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuc2V0RW5kID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHR5cGVvZiByb3cgPT0gXCJvYmplY3RcIikge1xuICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uID0gcm93LmNvbHVtbjtcbiAgICAgICAgICAgIHRoaXMuZW5kLnJvdyA9IHJvdy5yb3c7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmVuZC5yb3cgPSByb3c7XG4gICAgICAgICAgICB0aGlzLmVuZC5jb2x1bW4gPSBjb2x1bW47XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuaW5zaWRlID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuaXNFbmQocm93LCBjb2x1bW4pIHx8IHRoaXMuaXNTdGFydChyb3csIGNvbHVtbikpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xuICAgIHRoaXMuaW5zaWRlU3RhcnQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICBpZiAodGhpcy5jb21wYXJlKHJvdywgY29sdW1uKSA9PSAwKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5pc0VuZChyb3csIGNvbHVtbikpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xuICAgIHRoaXMuaW5zaWRlRW5kID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHRoaXMuY29tcGFyZShyb3csIGNvbHVtbikgPT0gMCkge1xuICAgICAgICAgICAgaWYgKHRoaXMuaXNTdGFydChyb3csIGNvbHVtbikpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9O1xuICAgIHRoaXMuY29tcGFyZSA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIGlmICghdGhpcy5pc011bHRpTGluZSgpKSB7XG4gICAgICAgICAgICBpZiAocm93ID09PSB0aGlzLnN0YXJ0LnJvdykge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPCB0aGlzLnN0YXJ0LmNvbHVtbiA/IC0xIDogKGNvbHVtbiA+IHRoaXMuZW5kLmNvbHVtbiA/IDEgOiAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyb3cgPCB0aGlzLnN0YXJ0LnJvdylcbiAgICAgICAgICAgIHJldHVybiAtMTtcblxuICAgICAgICBpZiAocm93ID4gdGhpcy5lbmQucm93KVxuICAgICAgICAgICAgcmV0dXJuIDE7XG5cbiAgICAgICAgaWYgKHRoaXMuc3RhcnQucm93ID09PSByb3cpXG4gICAgICAgICAgICByZXR1cm4gY29sdW1uID49IHRoaXMuc3RhcnQuY29sdW1uID8gMCA6IC0xO1xuXG4gICAgICAgIGlmICh0aGlzLmVuZC5yb3cgPT09IHJvdylcbiAgICAgICAgICAgIHJldHVybiBjb2x1bW4gPD0gdGhpcy5lbmQuY29sdW1uID8gMCA6IDE7XG5cbiAgICAgICAgcmV0dXJuIDA7XG4gICAgfTtcbiAgICB0aGlzLmNvbXBhcmVTdGFydCA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIGlmICh0aGlzLnN0YXJ0LnJvdyA9PSByb3cgJiYgdGhpcy5zdGFydC5jb2x1bW4gPT0gY29sdW1uKSB7XG4gICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5jb21wYXJlRW5kID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PSByb3cgJiYgdGhpcy5lbmQuY29sdW1uID09IGNvbHVtbikge1xuICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jb21wYXJlKHJvdywgY29sdW1uKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5jb21wYXJlSW5zaWRlID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgaWYgKHRoaXMuZW5kLnJvdyA9PSByb3cgJiYgdGhpcy5lbmQuY29sdW1uID09IGNvbHVtbikge1xuICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgIH0gZWxzZSBpZiAodGhpcy5zdGFydC5yb3cgPT0gcm93ICYmIHRoaXMuc3RhcnQuY29sdW1uID09IGNvbHVtbikge1xuICAgICAgICAgICA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biAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB2YXIgdGFiU2l6ZSA9IHRoaXMuc2Vzc2lvbi5nZXRUYWJTaXplKCk7XG4gICAgICAgICAgICBpZiAodGhpcy53b3VsZE1vdmVJbnRvU29mdFRhYihjdXJzb3IsIHRhYlNpemUsIC0xKSAmJiAhdGhpcy5zZXNzaW9uLmdldE5hdmlnYXRlV2l0aGluU29mdFRhYnMoKSkge1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUN1cnNvckJ5KDAsIC10YWJTaXplKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5tb3ZlQ3Vyc29yQnkoMCwgLTEpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLm1vdmVDdXJzb3JSaWdodCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgY3Vyc29yID0gdGhpcy5sZWFkLmdldFBvc2l0aW9uKCksXG4gICAgICAgICAgICBmb2xkO1xuICAgICAgICBpZiAoZm9sZCA9IHRoaXMuc2Vzc2lvbi5nZXRGb2xkQXQoY3Vyc29yLnJvdywgY3Vyc29yLmNvbHVtbiwgMSkpIHtcbiAgICAgICAgICAgIHRoaXMubW92ZUN1cnNvclRvKGZvbGQuZW5kLnJvdywgZm9sZC5lbmQuY29sdW1uKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0aGlzLmxlYWQuY29sdW1uID09IHRoaXMuZG9jLmdldExpbmUodGhpcy5sZWFkLnJvdykubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5sZWFkLnJvdyA8IHRoaXMuZG9jLmdldExlbmd0aCgpIC0gMSkge1xuICAgICAgICAgICAgICAgIHRoaXMubW92ZUN1cnNvclRvKHRoaXMubGVhZC5yb3cgKyAxLCAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHZhciB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cbiAgICAgICAgICAgICAgICB0aGlzLm1vdmVDdXJzb3JXb3JkTGVmdCgpO1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtYXRjaCA9IHRoaXMuc2Vzc2lvbi50b2tlblJlLmV4ZWMobGVmdE9mQ3Vyc29yKSkge1xuICAgICAgICAgICAgY29sdW1uIC09IHRoaXMuc2Vzc2lvbi50b2tlblJlLmxhc3RJbmRleDtcbiAgICAgICAgICAgIHRoaXMuc2Vzc2lvbi50b2tlblJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm1vdmVDdXJzb3JUbyhyb3csIGNvbHVtbik7XG4gICAgfTtcblxuICAgIHRoaXMuJHNob3J0V29yZEVuZEluZGV4ID0gZnVuY3Rpb24ocmlnaHRPZkN1cnNvcikge1xuICAgICAgICB2YXIgbWF0Y2gsIGluZGV4ID0gMCwgY2g7XG4gICAgICAgIHZhciB3aGl0ZXNwYWNlUmUgPSAvXFxzLztcbiAgICAgICAgdmFyIHRva2VuUmUgPSB0aGlzLnNlc3Npb24udG9rZW5SZTtcblxuICAgICAgICB0b2tlblJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgIGlmIChtYXRjaCA9IHRoaXMuc2Vzc2lvbi50b2tlblJlLmV4ZWMocmlnaHRPZkN1cnNvcikpIHtcbiAgICAgICAgICAgIGluZGV4ID0gdGhpcy5zZXNzaW9uLnRva2VuUmUubGFzdEluZGV4O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgd2hpbGUgKChjaCA9IHJpZ2h0T2ZDdXJzb3JbaW5kZXhdKSAmJiB3aGl0ZXNwYWNlUmUudGVzdChjaCkpXG4gICAgICAgICAgICAgICAgaW5kZXggKys7XG5cbiAgICAgICAgICAgIGlmIChpbmRleCA8IDEpIHtcbiAgICAgICAgICAgICAgICB0b2tlblJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgIHdoaWxlICgoY2ggPSByaWdodE9mQ3Vyc29yW2luZGV4XSkgJiYgIXRva2VuUmUudGVzdChjaCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW5SZS5sYXN0SW5kZXggPSAwO1xuICAgICAgICAgICAgICAgICAgICBpbmRleCArKztcbiAgICAgICAgICAgICAgICAgICAgaWYgKHdoaXRlc3BhY2VSZS50ZXN0KGNoKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4LS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgoY2ggPSByaWdodE9mQ3Vyc29yW2luZGV4XSkgJiYgd2hpdGVzcGFjZVJlLnRlc3QoY2gpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleCArKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPiAyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICB0b2tlblJlLmxhc3RJbmRleCA9IDA7XG5cbiAgICAgICAgcmV0dXJuIGluZGV4O1xuICAgIH07XG5cbiAgICB0aGlzLm1vdmVDdXJzb3JTaG9ydFdvcmRSaWdodCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICB2YXIgcm93ID0gdGhpcy5sZWFkLnJvdztcbiAgICAgICAgdmFyIGNvbHVtbiA9IHRoaXMubGVhZC5jb2x1bW47XG4gICAgICAgIHZhciBsaW5lID0gdGhpcy5kb2MuZ2V0TGluZShyb3cpO1xuICAgICAgICB2YXIgcmlnaHRPZk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ICAgICAgICAgICAgICAgcmV0dXJuIHIxO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZGF0YSA9IHRoaXMuZ2V0UmFuZ2UoKTtcbiAgICAgICAgICAgIGRhdGEuaXNCYWNrd2FyZHMgPSB0aGlzLmlzQmFja3dhcmRzKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGRhdGE7XG4gICAgfTtcblxuICAgIHRoaXMuZnJvbUpTT04gPSBmdW5jdGlvbihkYXRhKSB7XG4gICAgICAgIGlmIChkYXRhLnN0YXJ0ID09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKHRoaXMucmFuZ2VMaXN0KSB7XG4gICAgICAgICAgICAgICAgdGhpcy50b1NpbmdsZVJhbmdlKGRhdGFbMF0pO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSBkYXRhLmxlbmd0aDsgaS0tOyApIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHIgPSBSYW5nZS5mcm9tUG9pbnRzKGRhdGFbaV0uc3RhcnQsIGRhdGFbaV0uZW5kKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGFbaV0uaXNCYWNrd2FyZHMpXG4gICAgICAgICAgICAgICAgICAgICAgICByLmN1cnNvciA9IHIuc3RhcnQ7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkUmFuZ2UociwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhWzBdO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLnJhbmdlTGlzdClcbiAgICAgICAgICAgIHRoaXMudG9TaW5nbGVSYW5nZShkYXRhKTtcbiAgICAgICAgdGhpcy5zZXRTZWxlY3Rpb25SYW5nZShkYXRhLCBkYXRhLmlzQmFja3dhcmRzKT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307XG4gICAgZm9yICh2YXIga2V5IGluIHRoaXMuc3RhdGVzKSB7XG4gICAgICAgIHZhciBzdGF0ZSA9IHRoaXMuc3RhdGVzW2tleV07XG4gICAgICAgIHZhciBydWxlUmVnRXhwcyA9IFtdO1xuICAgICAgICB2YXIgbWF0Y2hUb3RhbCA9IDA7XG4gICAgICAgIHZhciBtYXBwaW5nID0gdGhpcy5tYXRjaE1hcHBpbmdzW2tleV0gPSB7ZGVmYXVsdFRva2VuOiBcInRleHRcIn07XG4gICAgICAgIHZhciBmbGFnID0gXCJnXCI7XG5cbiAgICAgICAgdmFyIHNwbGl0dGVyUnVybGVzID0gW107XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgc3RhdGUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBydWxlID0gc3RhdGVbaV07XG4gICAgICAgICAgICBpZiAocnVsZS5kZWZhdWx0VG9rZW4pXG4gICAgICAgICAgICAgICAgbWFwcGluZy5kZWZhdWx0VG9rZW4gPSBydWxlLmRlZmF1bHRUb2tlbjtcbiAgICAgICAgICAgIGlmIChydWxlLmNhc2VJbnNlbnNpdGl2ZSlcbiAgICAgICAgICAgICAgICBmbGFnID0gXCJnaVwiO1xuICAgICAgICAgICAgaWYgKHJ1bGUucmVnZXggPT0gbnVsbClcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcblxuICAgICAgICAgICAgaWYgKHJ1bGUucmVnZXggaW5zdGFuY2VvZiBSZWdFeHApXG4gICAgICAgICAgICAgICAgcnVsZS5yZWdleCA9IHJ1bGUucmVnZXgudG9TdHJpbmcoKS5zbGljZSgxLCAtMSk7XG4gICAgICAgICAgICB2YXIgYWRqdXN0ZWRyZWdleCA9IHJ1bGUucmVnZXg7XG4gICAgICAgICAgICB2YXIgbWF0Y2hjb3VudCA9IG5ldyBSZWdFeHAoXCIoPzooXCIgKyBhZGp1c3RlZHJlZ2V4ICsgXCIpfCguKSlcIikuZXhlYyhcImFcIikubGVuZ3RoIC0gMjtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHJ1bGUudG9rZW4pKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUudG9rZW4ubGVuZ3RoID09IDEgfHwgbWF0Y2hjb3VudCA9PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUudG9rZW4gPSBydWxlLnRva2VuWzBdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWF0Y2hjb3VudCAtIDEgIT0gcnVsZS50b2tlbi5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXBvcnRFcnJvcihcIm51bWJlciBvZiBjbGFzc2VzIGFuZCByZWdleHAgZ3JvdXBzIGRvZXNuJ3QgbWF0Y2hcIiwgeyBcbiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGU6IHJ1bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBncm91cENvdW50OiBtYXRjaGNvdW50IC0gMVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS50b2tlbiA9IHJ1bGUudG9rZW5bMF07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS50b2tlbkFycmF5ID0gcnVsZS50b2tlbjtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS50b2tlbiA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUub25NYXRjaCA9IHRoaXMuJGFycmF5VG9rZW5zO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHJ1bGUudG9rZW4gPT0gXCJmdW5jdGlvblwiICYmICFydWxlLm9uTWF0Y2gpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hjb3VudCA+IDEpXG4gICAgICAgICAgICAgICAgICAgIHJ1bGUub25NYXRjaCA9IHRoaXMuJGFwcGx5VG9rZW47XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBydWxlLm9uTWF0Y2ggPSBydWxlLnRva2VuO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAobWF0Y2hjb3VudCA+IDEpIHtcbiAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXGQvLnRlc3QocnVsZS5yZWdleCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYWRqdXN0ZWRyZWdleCA9IHJ1bGUucmVnZXgucmVwbGFjZSgvXFxcXChbMC05XSspL2csIGZ1bmN0aW9uKG1hdGNoLCBkaWdpdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwiXFxcXFwiICsgKHBhcnNlSW50KGRpZ2l0LCAxMCkgKyBtYXRjaFRvdGFsICsgMSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoY291bnQgPSAxO1xuICAgICAgICAgICAgICAgICAgICBhZGp1c3RlZHJlZ2V4ID0gdGhpcy5yZW1vdmVDYXB0dXJpbmdHcm91cHMocnVsZS5yZWdleCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghcnVsZS5zcGxpdFJlZ2V4ICYmIHR5cGVvZiBydWxlLnRva2VuICE9IFwic3RyaW5nXCIpXG4gICAgICAgICAgICAgICAgICAgIHNwbGl0dGVyUnVybGVzLnB1c2gocnVsZSk7IC8vIGZsYWcgd2lsbCBiZSBrbm93biBvbmx5IGF0IHRoZSB2ZXJ5IGVuZFxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBtYXBwaW5nW21hdGNoVG90YWxdID0gaTtcbiAgICAgICAgICAgIG1hdGNoVG90YWwgKz0gbWF0Y2hjb3VudDtcblxuICAgICAgICAgICAgcnVsZVJlZ0V4cHMucHVzaChhZGp1c3RlZHJlZ2V4KTtcbiAgICAgICAgICAgIGlmICghcnVsZS5vbk1h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hciBpID0gMCwgbCA9IHR5cGVzLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgaWYgKHZhbHVlc1tpXSlcbiAgICAgICAgICAgICAgICB0b2tlbnNbdG9rZW5zLmxlbmd0aF0gPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IHR5cGVzW2ldLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsdWVzW2ldXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdG9rZW5zO1xuICAgIH07XG5cbiAgICB0aGlzLiRhcnJheVRva2VucyA9IGZ1bmN0aW9uKHN0cikge1xuICAgICAgICBpZiAoIXN0cilcbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgdmFyIHZhbHVlcyA9IHRoaXMuc3BsaXRSZWdleC5leGVjKHN0cik7XG4gICAgICAgIGlmICghdmFsdWVzKVxuICAgICAgICAgICAgcmV0dXJuIFwidGV4dFwiO1xuICAgICAgICB2YXIgdG9rZW5zID0gW107XG4gICAgICAgIHZhciB0eXBlcyA9IHRoaXMudG9rZW5BcnJheTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDAsIGwgPSB0eXBlcy5sZW5ndGg7IGkgPCBsOyBpKyspIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZXNbaSArIDFdKVxuICAgICAgICAgICAgICAgIHRva2Vuc1t0b2tlbnMubGVuZ3RoXSA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogdHlwZXNbaV0sXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZXNbaSArIDFdXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdG9rZW5zO1xuICAgIH07XG5cbiAgICB0aGlzLnJlbW92ZUNhcHR1cmluZ0dyb3VwcyA9IGZ1bmN0aW9uKHNyYykge1xuICAgICAgICB2YXIgciA9IHNyYy5yZXBsYWNlKFxuICAgICAgICAgICAgL1xcWyg/OlxcXFwufFteXFxdXSkqP1xcXXxcXFxcLnxcXChcXD9bOj0hXXwoXFwoKS9nLFxuICAgICAgICAgICAgZnVuY3Rpb24oeCwgeSkge3JldHVybiB5ID8gXCIoPzpcIiA6IHg7fVxuICAgICAgICApO1xuICAgICAgICByZXR1cm4gcjtcbiAgICB9O1xuXG4gICAgdGhpcy5jcmVhdGVTcGxpdHRlclJlZ2V4cCA9IGZ1bmN0aW9uKHNyYywgZmxhZykge1xuICAgICAgICBpZiAoc3JjLmluZGV4T2YoXCIoPz1cIikgIT0gLTEpIHtcbiAgICAgICAgICAgIHZhciBzdGFjayA9IDA7XG4gICAgICAgICAgICB2YXIgaW5DaENsYXNzID0gZmFsc2U7XG4gICAgICAgICAgICB2YXIgbGFzdENhcHR1cmUgPSB7fTtcbiAgICAgICAgICAgIHNyYy5yZXBsYWNlKC8oXFxcXC4pfChcXCgoPzpcXD9bPSFdKT8pfChcXCkpfChbXFxbXFxdXSkvZywgZnVuY3Rpb24oXG4gICAgICAgICAgICAgICAgbSwgZXNjLCBwYXJlbk9wZW4sIHBhcmVuQ2xvc2UsIHNxdWFyZSwgaW5kZXhcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIGlmIChpbkNoQ2xhc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgaW5DaENsYXNzID0gc3F1YXJlICE9IFwiXVwiO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3F1YXJlKSB7XG4gICAgICAgICAgICAgICAgICAgIGluQ2hDbGFzcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwYXJlbkNsb3NlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGFjayA9PSBsYXN0Q2FwdHVyZS5zdGFjaykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENhcHR1cmUuZW5kID0gaW5kZXgrMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RDYXB0dXJlLnN0YWNrID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc3RhY2stLTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHBhcmVuT3Blbikge1xuICAgICAgICAgICAgICAgICAgICBzdGFjaysrO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFyZW5PcGVuLmxlbmd0aCAhPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsYXN0Q2FwdHVyZS5zdGFjayA9IHN0YWNrO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdENhcHR1cmUuc3RhcnQgPSBpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbTtcbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICBpZiAobGFzdENhcHR1cmUuZW5kICE9IG51bGwgJiYgL15cXCkqJC8udGVzdChzcmMuc3Vic3RyKGxhc3RDYXB0dXJlLmVuZCkpKVxuICAgICAgICAgICAgICAgIHNyYyA9IHNyYy5zdWJzdHJpbmcoMCwgbGFzdENhcHR1cmUuc3RhcnQpICsgc3JjLnN1YnN0cihsYXN0Q2FwdHVyZS5lbmQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzcmMuY2hhckF0KDApICE9IFwiXlwiKSBzcmMgPSBcIl5cIiArIHNyYztcbiAgICAgICAgaWYgKHNyYy5jaGFyQXQoc3JjLmxlbmd0aCAtIDEpICE9IFwiJFwiKSBzcmMgKz0gXCIkXCI7XG4gICAgICAgIFxuICAgICAgICByZXR1cm4gbmV3IFJlZ0V4cChzcmMsIChmbGFnfHxcIlwiKS5yZXBsYWNlKFwiZ1wiLCBcIlwiKSk7XG4gICAgfTtcbiAgICB0aGlzLmdldExpbmVUb2tlbnMgPSBmdW5jdGlvbihsaW5lLCBzdGFydFN0YXRlKSB7XG4gICAgICAgIGlmIChzdGFydFN0YXRlICYmIHR5cGVvZiBzdGFydFN0YXRlICE9IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICAgIHZhciBzdGFjayA9IHN0YXJ0U3RhdGUuc2xpY2UoMCk7XG4gICAgICAgICAgICBzdGFydFN0YXRlID0gc3RhY2tbMF07XG4gICAgICAgICAgICBpZiAoc3RhcnRTdGF0ZSA9PT0gXCIjdG1wXCIpIHtcbiAgICAgICAgICAgICAgICBzdGFjay5zaGlmdCgpO1xuICAgICAgICAgICAgICAgIHN0YXJ0U3RhdGUgPSBzdGFjay5zaGlmdCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgIHZhciBzdGFjayA9IFtdO1xuXG4gICAgICAgIHZhciBjdXJyZW50U3RhdGUgPSBzdGFydFN0YXRlIHx8IFwic3RhcnRcIjtcbiAgICAgICAgdmFyIHN0YXRlID0gdGhpcy5zdGF0ZXNbY3VycmVudFN0YXRlXTtcbiAgICAgICAgaWYgKCFzdGF0ZSkge1xuICAgICAgICAgICAgY3VycmVudFN0YXRlID0gXCJzdGFydFwiO1xuICAgICAgICAgICAgc3RhdGUgPSB0aGlzLnN0YXRlc1tjdXJyZW50U3RhdGVdO1xuICAgICAgICB9XG4gICAgICAgIHZhciBtYXBwaW5nID0gdGhpcy5tYXRjaE1hcHBpbmdzW2N1cnJlbnRTdGF0ZV07XG4gICAgICAgIHZhciByZSA9IHRoaXMucmVnRXhwc1tjdXJyZW50U3RhdGVdO1xuICAgICAgICByZS5sYXN0SW5kZXggPSAwO1xuXG4gICAgICAgIHZhciBtYXRjaCwgdG9rZW5zID0gW107XG4gICAgICAgIHZhciBsYXN0SW5kZXggPSAwO1xuICAgICAgICB2YXIgbWF0Y2hBdHRlbXB0cyA9IDA7XG5cbiAgICAgICAgdmFyIHRva2VuID0ge3R5cGU6IG51bGwsIHZhbHVlOiBcIlwifTtcblxuICAgICAgICB3aGlsZSAobWF0Y2ggPSByZS5leGVjKGxpbmUpKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IG1hcHBpbmcuZGVmYXVsdFRva2VuO1xuICAgICAgICAgICAgdmFyIHJ1bGUgPSBudWxsO1xuICAgICAgICAgICAgdmFyIHZhbHVlID0gbWF0Y2hbMF07XG4gICAgICAgICAgICB2YXIgaW5kZXggPSByZS5sYXN0SW5kZXg7XG5cbiAgICAgICAgICAgIGlmIChpbmRleCAtIHZhbHVlLmxlbmd0aCA+IGxhc3RJbmRleCkge1xuICAgICAgICAgICAgICAgIHZhciBza2lwcGVkID0gbGluZS5zdWJzdHJpbmcobGFzdEluZGV4LCBpbmRleCAtIHZhbHVlLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUgPT0gdHlwZSkge1xuICAgICAgICAgICAgICAgICAgICB0b2tlbi52YWx1ZSArPSBza2lwcGVkO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbi50eXBlKVxuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2godG9rZW4pO1xuICAgICAgICAgICAgICAgICAgICB0b2tlbiA9IHt0eXBlOiB0eXBlLCB2YWx1ZTogc2tpcHBlZH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG1hdGNoLmxlbmd0aC0yOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hbaSArIDFdID09PSB1bmRlZmluZWQpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICAgICAgcnVsZSA9IHN0YXRlW21hcHBpbmdbaV1dO1xuXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUub25NYXRjaClcbiAgICAgICAgICAgICAgICAgICAgdHlwZSA9IHJ1bGUub25NYXRjaCh2YWx1ZSwgY3VycmVudFN0YXRlLCBzdGFjaywgbGluZSk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICB0eXBlID0gcnVsZS50b2tlbjtcblxuICAgICAgICAgICAgICAgIGlmIChydWxlLm5leHQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBydWxlLm5leHQgPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFN0YXRlID0gcnVsZS5uZXh0O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFN0YXRlID0gcnVsZS5uZXh0KGN1cnJlbnRTdGF0ZSwgc3RhY2spO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBzdGF0ZSA9IHRoaXMuc3RhdGVzW2N1cnJlbnRTdGF0ZV07XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucmVwb3J0RXJyb3IoXCJzdGF0ZSBkb2Vzbid0IGV4aXN0XCIsIGN1cnJlbnRTdGF0ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50U3RhdGUgPSBcInN0YXJ0XCI7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZSA9IHRoaXMuc3RhdGVzW2N1cnJlbnRTdGF0ZV07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWFwcGluZyA9IHRoaXMubWF0Y2hNYXBwaW5nc1tjdXJyZW50U3RhdGVdO1xuICAgICAgICAgICAgICAgICAgICBsYXN0SW5kZXggPSBpbmRleDtcbiAgICAgICAgICAgICAgICAgICAgcmUgPSB0aGlzLnJlZ0V4cHNbY3VycmVudFN0YXRlXTtcbiAgICAgICAgICAgICAgICAgICAgcmUubGFzdEluZGV4ID0gaW5kZXg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChydWxlLmNvbnN1bWVMaW5lRW5kKVxuICAgICAgICAgICAgICAgICAgICBsYXN0SW5kZXggPSBpbmRleDtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0eXBlID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoIXJ1bGUgfHwgcnVsZS5tZXJnZSAhPT0gZmFsc2UpICYmIHRva2VuLnR5cGUgPT09IHR5cGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2VuLnZhbHVlICs9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zLnB1c2godG9rZW4pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSB7dHlwZTogdHlwZSwgdmFsdWU6IHZhbHVlfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udHlwZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKHRva2VuKTtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSB7dHlwZTogbnVsbCwgdmFsdWU6IFwiXCJ9O1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHR5cGUubGVuZ3RoOyBpKyspXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh0eXBlW2ldKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChsYXN0SW5kZXggPT0gbGluZS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGxhc3RJbmRleCA9IGluZGV4O1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hBdHRlbXB0cysrID4gTUFYX1RPS0VOX0NPVU5UKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoQXR0ZW1wdHMgPiAyICogbGluZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXBvcnRFcnJvcihcImluZmluaXRlIGxvb3Agd2l0aCBpbiBhY2UgdG9rZW5pemVyXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0U3RhdGU6IHN0YXJ0U3RhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBsaW5lOiBsaW5lXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB3aGlsZSAobGFzdEluZGV4IDwgbGluZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuLnR5cGUpXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IGxpbmUuc3Vic3RyaW5nKGxhc3RJbmRleCwgbGFzdEluZGV4ICs9IDIwMDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJvdmVyZmxvd1wiXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGN1cnJlbnRTdGF0ZSA9IFwic3RhcnRcIjtcbiAgICAgICAgICAgICAgICBzdGFjayA9IFtdO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHRva2VuLnR5cGUpXG4gICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7XG4gICAg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kge1xuXG4gICAgdGhpcy5hZGRSdWxlcyA9IGZ1bmN0aW9uKHJ1bGVzLCBwcmVmaXgpIHtcbiAgICAgICAgaWYgKCFwcmVmaXgpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGtleSBpbiBydWxlcylcbiAgICAgICAgICAgICAgICB0aGlzLiRydWxlc1trZXldID0gcnVsZXNba2V5XTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKHZhciBrZXkgaW4gcnVsZXMpIHtcbiAgICAgICAgICAgIHZhciBzdGF0ZSA9IHJ1bGVzW2tleV07XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0YXRlLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJ1bGUgPSBzdGF0ZVtpXTtcbiAgICAgICAgICAgICAgICBpZiAocnVsZS5uZXh0IHx8IHJ1bGUub25NYXRjaCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJ1bGUubmV4dCA9PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocnVsZS5uZXh0LmluZGV4T2YocHJlZml4KSAhPT0gMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlLm5leHQgPSBwcmVmaXggKyBydWxlLm5leHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bGUubmV4dFN0YXRlICYmIHJ1bGUubmV4dFN0YXRlLmluZGV4T2YocHJlZml4KSAhPT0gMClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dFN0YXRlID0gcHJlZml4ICsgcnVsZS5uZXh0U3RhdGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy4kcnVsZXNbcHJlZml4ICsga2V5XSA9IHN0YXRlO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRo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HJ1bGUgPSBzdGF0ZVtpXTtcbiAgICAgICAgICAgICAgICB2YXIgdG9JbnNlcnQgPSBudWxsO1xuICAgICAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHJ1bGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvSW5zZXJ0ID0gcnVsZTtcbiAgICAgICAgICAgICAgICAgICAgcnVsZSA9IHt9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIXJ1bGUucmVnZXggJiYgcnVsZS5zdGFydCkge1xuICAgICAgICAgICAgICAgICAgICBydWxlLnJlZ2V4ID0gcnVsZS5zdGFydDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFydWxlLm5leHQpXG4gICAgICAgICAgICAgICAgICAgICAgICBydWxlLm5leHQgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5uZXh0LnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBydWxlLnRva2VuXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRva2VuOiBydWxlLnRva2VuICsgXCIuZW5kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICByZWdleDogcnVsZS5lbmQgfHwgcnVsZS5zdGFydCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQ6IFwicG9wXCJcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUudG9rZW4gPSBydWxlLnRva2VuICsgXCIuc3RhcnRcIjtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5wdXNoID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFyIG5leHQgPSBydWxlLm5leHQgfHwgcnVsZS5wdXNoO1xuICAgICAgICAgICAgICAgIGlmIChuZXh0ICYmIEFycmF5LmlzQXJyYXkobmV4dCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXRlTmFtZSA9IHJ1bGUuc3RhdGVOYW1lO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YXRlTmFtZSkgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlTmFtZSA9IHJ1bGUudG9rZW47XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHN0YXRlTmFtZSAhPSBcInN0cmluZ1wiKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlTmFtZSA9IHN0YXRlTmFtZVswXSB8fCBcIlwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJ1bGVzW3N0YXRlTmFtZV0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVOYW1lICs9IGlkKys7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbc3RhdGVOYW1lXSA9IG5leHQ7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dCA9IHN0YXRlTmFtZTtcbiAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc1N0YXRlKHN0YXRlTmFtZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChuZXh0ID09IFwicG9wXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgcnVsZS5uZXh0ID0gcG9wU3RhdGU7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUucHVzaCkge1xuICAgICAgICAgICAgICAgICAgICBydWxlLm5leHRTdGF0ZSA9IHJ1bGUubmV4dCB8fCBydWxlLnB1c2g7XG4gICAgICAgICAgICAgICAgICAgIHJ1bGUubmV4dCA9IHB1c2hTdGF0ZTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGUucHVzaDtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAocnVsZS5ydWxlcykge1xuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciByIGluIHJ1bGUucnVsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChydWxlc1tyXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChydWxlc1tyXS5wdXNoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBydWxlc1tyXS5wdXNoLmFwcGx5KHJ1bGVzW3JdLCBydWxlLnJ1bGVzW3JdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVsZXNbcl0gPSBydWxlLnJ1bGVzW3JdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHZhciBpbmNsdWRlTmFtZSA9IHR5cGVvZiBydWxlID09IFwic3RyaW5nXCIgPyBydWxlIDogcnVsZS5pbmNsdWRlO1xuICAgICAgICAgICAgICAgIGlmIChpbmNsdWRlTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShpbmNsdWRlTmFtZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICB0b0luc2VydCA9IGluY2x1ZGVOYW1lLm1hcChmdW5jdGlvbih4KSB7IHJldHVybiBydWxlc1t4XTsgfSk7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvSW5zZXJ0ID0gcnVsZXNbaW5jbHVkZU5hbWVdO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICh0b0luc2VydCkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgYXJncyA9IFtpLCAxXS5jb25jYXQodG9JbnNlcnQpO1xuICAgICAgICAgICAgICAgICAgICBpZiAocnVsZS5ub0VzY2FwZSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3MgPSBhcmdzLmZpbHRlcihmdW5jdGlvbih4KSB7cmV0dXJuICF4Lm5leHQ7fSk7XG4gICAgICAgICAgICAgICAgICAgIHN0YXRlLnNwbGljZS5hcHBseShzdGF0ZSwgYXJncyk7XG4gICAgICAgICAgICAgICAgICAgIGktLTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKHJ1bGUua2V5d29yZE1hcCkge1xuICAgICAgICAgICAgICAgICAgICBydWxlLnRva2VuID0gdGhpcy5jcmVhdGVLZXl3b3JkTWFwcGVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgcnVsZS5rZXl3b3JkTWFwLCBydWxlLmRlZmF1bHRUb2tlbiB8fCBcInRleHRcIiwgcnVsZS5jYXNlSW5zZW5zaXRpdmVcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGUuZGVmYXVsdFRva2VuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBPYmplY3Qua2V5cyhydWxlcykuZm9yRWFjaChwcm9jZXNzU3RhdGUsIHRoaXMpO1xuICAgIH07XG5cbiAgICB0aGlzLmNyZWF0ZUtleXdvcmRNYXBwZXIgPSBmdW5jdGlvbihtYXAsIGRlZmF1bHRUb2tlbiwgaWdub3JlQ2FzZSwgc3BsaXRDaGFyKSB7XG4gICAgICAgIHZhciBrZXl3b3JkcyA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG4gICAgICAgIE9iamVjdC5rZXlzKG1hcCkuZm9yRWFjaChmdW5jdGlvbihjbGFzc05hbWUpIHtcbiAgICAgICAgICAgIHZhciBhID0gbWFwW2NsYXNzTmFtZV07XG4gICAgICAgICAgICBpZiAoaWdub3JlQ2FzZSlcbiAgICAgICAgICAgICAgICBhID0gYS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgdmFyIGxpc3QgPSBhLnNwbGl0KHNwbGl0Q2hhciB8fCBcIn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pZiAoL1tcXF1cXH1cXCldLy50ZXN0KGxpbmVbY3Vyc29yLmNvbHVtbl0pIHx8IGVkaXRvci5pbk11bHRpU2VsZWN0TW9kZSB8fCBvcHRpb25zICYmIG9wdGlvbnMuYnJhY2VzKSB7XG4gICAgICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5yZWNvcmRBdXRvSW5zZXJ0KGVkaXRvciwgc2Vzc2lvbiwgXCJ9XCIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJ3t9JyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLnJlY29yZE1heWJlSW5zZXJ0KGVkaXRvciwgc2Vzc2lvbiwgXCJ7XCIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJ3snLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwgMV1cbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAodGV4dCA9PSAnfScpIHtcbiAgICAgICAgICAgIGluaXRDb250ZXh0KGVkaXRvcik7XG4gICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbiwgY3Vyc29yLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PSAnfScpIHtcbiAgICAgICAgICAgICAgICB2YXIgbWF0Y2hpbmcgPSBzZXNzaW9uLiRmaW5kT3BlbmluZ0JyYWNrZXQoJ30nLCB7Y29sdW1uOiBjdXJzb3IuY29sdW1uICsgMSwgcm93OiBjdXJzb3Iucm93fSk7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoaW5nICE9PSBudWxsICYmIENzdHlsZUJlaGF2aW91ci5pc0F1dG9JbnNlcnRlZENsb3NpbmcoY3Vyc29yLCBsaW5lLCB0ZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICBDc3R5bGVCZWhhdmlvdXIucG9wQXV0b0luc2VydGVkQ2xvc2luZygpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJycsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICh0ZXh0ID09IFwiXFxuXCIgfHwgdGV4dCA9PSBcIlxcclxcblwiKSB7XG4gICAgICAgICAgICBpbml0Q29udGV4dChlZGl0b3IpO1xuICAgICAgICAgICAgdmFyIGNsb3NpbmcgPSBcIlwiO1xuICAgICAgICAgICAgaWYgKENzdHlsZUJlaGF2aW91ci5pc01heWJlSW5zZXJ0ZWRDbG9zaW5nKGN1cnNvciwgbGluZSkpIHtcbiAgICAgICAgICAgICAgICBjbG9zaW5nID0gbGFuZy5zdHJpbmdSZXBlYXQoXCJ9XCIsIGNvbnRleHQubWF5YmVJbnNlcnRlZEJyYWNrZXRzKTtcbiAgICAgICAgICAgICAgICBDc3R5bGVCZWhhdmlvdXIuY2xlYXJNYXliZUluc2VydGVkQ2xvc2luZygpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHJpZ2h0Q2hhciA9IGxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4sIGN1cnNvci5jb2x1bW4gKyAxKTtcbiAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT09ICd9Jykge1xuICAgICAgICAgICAgICAgIHZhciBvcGVuQnJhY2VQb3MgPSBzZXNzaW9uLmZpbmRNYXRjaGluZ0JyYWNrZXQoe3JvdzogY3Vyc29yLnJvdywgY29sdW1uOiBjdXJzb3IuY29sdW1uKzF9LCAnfScpO1xuICAgICAgICAgICAgICAgIGlmICghb3BlbkJyYWNlUG9zKVxuICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgdmFyIG5leHRfaW5kZW50ID0gdGhpcy4kZ2V0SW5kZW50KHNlc3Npb24uZ2V0TGluZShvcGVuQnJhY2VQb3Mucm93KSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNsb3NpbmcpIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV4dF9pbmRlbnQgPSB0aGlzLiRnZXRJbmRlbnQobGluZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5jbGVhck1heWJlSW5zZXJ0ZWRDbG9zaW5nKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIGluZGVudCA9IG5leHRfaW5kZW50ICsgc2Vzc2lvbi5nZXRUYWJTdHJpbmcoKTtcblxuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICB0ZXh0OiAnXFxuJyArIGluZGVudCArICdcXG4nICsgbmV4dF9pbmRlbnQgKyBjbG9zaW5nLFxuICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIGluZGVudC5sZW5ndGgsIDEsIGluZGVudC5sZW5ndGhdXG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgQ3N0eWxlQmVoYXZpb3VyLmNsZWFyTWF5YmVJbnNlcnRlZENsb3NpbmcoKTtcbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJicmFjZXNcIiwgXCJkZWxldGlvblwiLCBmdW5jdGlvbih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Y3RlZCAhPT0gXCJcIiAmJiBlZGl0b3IuZ2V0V3JhcEJlaGF2aW91cnNFbmFibGVkKCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZ2V0V3JhcHBlZChzZWxlY3Rpb24sIHNlbGVjdGVkLCAnKCcsICcpJyk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKENzdHlsZUJlaGF2aW91ci5pc1NhbmVJbnNlcnRpb24oZWRpdG9yLCBzZXNzaW9uKSkge1xuICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5yZWNvcmRBdXRvSW5zZXJ0KGVkaXRvciwgc2Vzc2lvbiwgXCIpXCIpO1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6ICcoKScsXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmICh0ZXh0ID09ICcpJykge1xuICAgICAgICAgICAgaW5pdENvbnRleHQoZWRpdG9yKTtcbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09ICcpJykge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGluZyA9IHNlc3Npb24uJGZpbmRPcGVuaW5nQnJhY2tldCgnKScsIHtjb2x1bW46IGN1cnNvci5jb2x1bW4gKyAxLCByb3c6IGN1cnNvci5yb3d9KTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hpbmcgIT09IG51bGwgJiYgQ3N0eWxlQmVoYXZpb3VyLmlzQXV0b0luc2VydGVkQ2xvc2luZyhjdXJzb3IsIGxpbmUsIHRleHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5wb3BBdXRvSW5zZXJ0ZWRDbG9zaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcInBhcmVuc1wiLCBcImRlbGV0aW9uXCIsIGZ1bmN0aW9uKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgcmFuZ2UpIHtcbiAgICAgICAgdmFyIHNlbGVjdGVkID0gc2Vzc2lvbi5kb2MuZ2V0VGV4dFJhbmdlKHJhbmdlKTtcbiAgICAgICAgaWYgKCFyYW5nZS5pc011bHRpTGluZSgpICYmIHNlbGVjdGVkID09ICcoJykge1xuICAgICAgICAgICAgaW5pdENvbnRleHQoZWRpdG9yKTtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShyYW5nZS5zdGFydC5yb3cpO1xuICAgICAgICAgICAgdmFyIHJpZ2h0Q2hhciA9IGxpbmUuc3Vic3RyaW5nKHJhbmdlLnN0YXJ0LmNvbHVtbiArIDEsIHJhbmdlLnN0YXJ0LmNvbHVtbiArIDIpO1xuICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PSAnKScpIHtcbiAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uKys7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7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IHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09ICddJykge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGluZyA9IHNlc3Npb24uJGZpbmRPcGVuaW5nQnJhY2tldCgnXScsIHtjb2x1bW46IGN1cnNvci5jb2x1bW4gKyAxLCByb3c6IGN1cnNvci5yb3d9KTtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hpbmcgIT09IG51bGwgJiYgQ3N0eWxlQmVoYXZpb3VyLmlzQXV0b0luc2VydGVkQ2xvc2luZyhjdXJzb3IsIGxpbmUsIHRleHQpKSB7XG4gICAgICAgICAgICAgICAgICAgIENzdHlsZUJlaGF2aW91ci5wb3BBdXRvSW5zZXJ0ZWRDbG9zaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcImJyYWNrZXRzXCIsIFwiZGVsZXRpb25cIiwgZnVuY3Rpb24oc3RhdGUsIGFjdGlvbiwgZWRpdG9yLCBzZXNzaW9uLCByYW5nZSkge1xuICAgICAgICB2YXIgc2VsZWN0ZWQgPSBzZXNzaW9uLmRvYy5nZXRUZXh0UmFuZ2UocmFuZ2UpO1xuICAgICAgICBpZiAoIXJhbmdlLmlzTXVsdGlMaW5lKCkgJiYgc2VsZWN0ZWQgPT0gJ1snKSB7XG4gICAgICAgICAgICBpbml0Q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y50ZXN0KHRva2VuLnR5cGUpO1xuICAgICAgICAgICAgICAgIHZhciBzdHJpbmdBZnRlciA9ICFyaWdodFRva2VuIHx8IC9zdHJpbmd8ZXNjYXBlLy50ZXN0KHJpZ2h0VG9rZW4udHlwZSk7XG5cbiAgICAgICAgICAgICAgICB2YXIgcGFpcjtcbiAgICAgICAgICAgICAgICBpZiAocmlnaHRDaGFyID09IHF1b3RlKSB7XG4gICAgICAgICAgICAgICAgICAgIHBhaXIgPSBzdHJpbmdCZWZvcmUgIT09IHN0cmluZ0FmdGVyO1xuICAgICAgICAgICAgICAgICAgICBpZiAocGFpciAmJiAvc3RyaW5nXFwuZW5kLy50ZXN0KHJpZ2h0VG9rZW4udHlwZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWlyID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0cmluZ0JlZm9yZSAmJiAhc3RyaW5nQWZ0ZXIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsgLy8gd3JhcCBzdHJpbmcgd2l0aCBkaWZmZXJlbnQgcXVvdGVcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0cmluZ0JlZm9yZSAmJiBzdHJpbmdBZnRlcilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyBkbyBub3QgcGFpciBxdW90ZXMgaW5zaWRlIHN0cmluZ3NcbiAgICAgICAgICAgICAgICAgICAgdmFyIHdvcmRSZSA9IHNlc3Npb24uJG1vZGUudG9rZW5SZTtcbiAgICAgICAgICAgICAgICAgICAgd29yZFJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpc1dvcmRCZWZvcmUgPSB3b3JkUmUudGVzdChsZWZ0Q2hhcik7XG4gICAgICAgICAgICAgICAgICAgIHdvcmRSZS5sYXN0SW5kZXggPSAwO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaXNXb3JkQWZ0ZXIgPSB3b3JkUmUudGVzdChsZWZ0Q2hhcik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc1dvcmRCZWZvcmUgfHwgaXNXb3JkQWZ0ZXIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDsgLy8gYmVmb3JlIG9yIGFmdGVyIGFscGhhbnVtZXJpY1xuICAgICAgICAgICAgICAgICAgICBpZiAocmlnaHRDaGFyICYmICEvW1xcczssLn0pXFxdXFxcXF0vLnRlc3QocmlnaHRDaGFyKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsOyAvLyB0aGVyZSBpcyByaWdodENoYXIgYW5kIGl0IGlzbid0IGNsb3NpbmdcbiAgICAgICAgICAgICAgICAgICAgcGFpciA9IHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIHRleHQ6IHBhaXIgPyBxdW90ZSArIHF1b3RlIDogXCJcIixcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0aW9uOiBbMSwxXVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHRoaXMuYWRkKFwic3RyaW5nX2RxdW90ZXNcIiwgXCJkZWxldGlvblwiLCBmdW5jdGlvbihzdGF0ZSwgYWN0aW9uLCBlZGl0b3IsIHNlc3Npb24sIHJhbmdlKSB7XG4gICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShyYW5nZSk7XG4gICAgICAgIGlmICghcmFuZ2UuaXNNdWx0aUxpbmUoKSAmJiAoc2VsZWN0ZWQgPT0gJ1wiJyB8fCBzZWxlY3RlZCA9PSBcIidcIikpIHtcbiAgICAgICAgICAgIGluaXRDb250ZXh0KGVkaXRvcik7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZG9j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gbGluZUNvbW1lbnRTdGFydCA9IHRoaXMuYmxvY2tDb21tZW50LnN0YXJ0O1xuICAgICAgICAgICAgdmFyIGxpbmVDb21tZW50RW5kID0gdGhpcy5ibG9ja0NvbW1lbnQuZW5kO1xuICAgICAgICAgICAgdmFyIHJlZ2V4cFN0YXJ0ID0gbmV3IFJlZ0V4cChcIl4oXFxcXHMqKSg/OlwiICsgbGFuZy5lc2NhcGVSZWdFeHAobGluZUNvbW1lbnRTdGFydCkgKyBcIilcIik7XG4gICAgICAgICAgICB2YXIgcmVnZXhwRW5kID0gbmV3IFJlZ0V4cChcIig/OlwiICsgbGFuZy5lc2NhcGVSZWdFeHAobGluZUNvbW1lbnRFbmQpICsgXCIpXFxcXHMqJFwiKTtcblxuICAgICAgICAgICAgdmFyIGNvbW1lbnQgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRlc3RSZW1vdmUobGluZSwgaSkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBpZiAoIWlnbm9yZUJsYW5rTGluZXMgfHwgL1xcUy8udGVzdChsaW5lKSkge1xuICAgICAgICAgICAgICAgICAgICBkb2MuaW5zZXJ0SW5MaW5lKHtyb3c6IGksIGNvbHVtbjogbGluZS5sZW5ndGh9LCBsaW5lQ29tbWVudEVuZCk7XG4gICAgICAgICAgICAgICAgICAgIGRvYy5pbnNlcnRJbkxpbmUoe3JvdzogaSwgY29sdW1uOiBtaW5JbmRlbnR9LCBsaW5lQ29tbWVudFN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB2YXIgdW5jb21tZW50ID0gZnVuY3Rpb24obGluZSwgaSkge1xuICAgICAgICAgICAgICAgIHZhciBtO1xuICAgICAgICAgICAgICAgIGlmIChtID0gbGluZS5tYXRjaChyZWdleHBFbmQpKVxuICAgICAgICAgICAgICAgICAgICBkb2MucmVtb3ZlSW5MaW5lKGksIGxpbmUubGVuZ3RoIC0gbVswXS5sZW5ndGgsIGxpbmUubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBpZiAobSA9IGxpbmUubWF0Y2gocmVnZXhwU3RhcnQpKVxuICAgICAgICAgICAgICAgICAgICBkb2MucmVtb3ZlSW5MaW5lKGksIG1bMV0ubGVuZ3RoLCBtWzBdLmxlbmd0aCk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB2YXIgdGVzdFJlbW92ZSA9IGZ1bmN0aW9uKGxpbmUsIHJvdykge1xuICAgICAgICAgICAgICAgIGlmIChyZWdleHBTdGFydC50ZXN0KGxpbmUpKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB2YXIgdG9rZW5zID0gc2Vzc2lvbi5nZXRUb2tlbnMocm93KTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW5zW2ldLnR5cGUgPT09IFwiY29tbWVudFwiKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmIChBcnJheS5pc0FycmF5KHRoaXMubGluZUNvbW1lbnRTdGFydCkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVnZXhwU3RhcnQgPSB0aGlzLmxpbmVDb21tZW50U3RhcnQubWFwKGxhbmcuZXNjYXBlUmVnRXhwKS5qb2luKFwifFwiKTtcbiAgICAgICAgICAgICAgICB2YXIgbGluZUNvbW1lbnRTdGFydCA9IHRoaXMubGluZUNvbW1lbnRTdGFydFswXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIHJlZ2V4cFN0YXJ0ID0gbGFuZy5lc2NhcGVSZWdFeHAodGhpcy5saW5lQ29tbWVudFN0YXJ0KTtcbiAgICAgICAgICAgICAgICB2YXIgbGluZUNvbW1lbnRTdGFydCA9IHRoaXMubGluZUNvbW1lbnRTdGFydDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlZ2V4cFN0YXJ0ID0gbmV3IFJlZ0V4cChcIl4oXFxcXHMqKSg/OlwiICsgcmVnZXhwU3RhcnQgKyBcIikgP1wiKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaW5zZXJ0QXRUYWJTdG9wID0gc2Vzc2lvbi5nZXRVc2VTb2Z0VGFicygpO1xuXG4gICAgICAgICAgICB2YXIgdW5jb21tZW50ID0gZnVuY3Rpb24obGluZSwgaSkge1xuICAgICAgICAgICAgICAgIHZhciBtID0gbGluZS5tYXRjaChyZWdleHBTdGFydCk7XG4gICAgICAgICAgICAgICAgaWYgKCFtKSByZXR1cm47XG4gICAgICAgICAgICAgICAgdmFyIHN0YXJ0ID0gbVsxXS5sZW5ndGgsIGVuZCA9IG1bMF0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGlmICghc2hvdWxkSW5zZXJ0U3BhY2UobGluZSwgc3RhcnQsIGVuZCkgJiYgbVswXVtlbmQgLSAxXSA9PSBcIiBcIilcbiAgICAgICAgICAgICAgICAgICAgZW5kLS07XG4gICAgICAgICAgICAgICAgZG9jLnJlbW92ZUluTGluZShpLCBzdGFydCwgZW5kKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICB2YXIgY29tbWVudFdpdGhTcGFjZSA9IGxpbmVDb21tZW50U3RhcnQgKyBcIiBcIjtcbiAgICAgICAgICAgIHZhciBjb21tZW50ID0gZnVuY3Rpb24obGluZSwgaSkge1xuICAgICAgICAgICAgICAgIGlmICghaWdub3JlQmxhbmtMaW5lcyB8fCAvXFxTLy50ZXN0KGxpbmUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzaG91bGRJbnNlcnRTcGFjZShsaW5lLCBtaW5JbmRlbnQsIG1pbkluZGVudCkpXG4gICAgICAgICAgICAgICAgICAgICAgICBkb2MuaW5zZXJ0SW5MaW5lKHtyb3c6IGksIGNvbHVtbjogbWluSW5kZW50fSwgY29tbWVudFdpdGhTcGFjZSk7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvYy5pbnNlcnRJbkxpbmUoe3JvdzogaSwgY29sdW1uOiBtaW5JbmRlbnR9LCBsaW5lQ29tbWVudFN0YXJ0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdmFyIHRlc3RSZW1vdmUgPSBmdW5jdGlvbihsaW5lLCBpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlZ2V4cFN0YXJ0LnRlc3QobGluZSk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgc2hvdWxkSW5zZXJ0U3BhY2UgPSBmdW5jdGlvbihsaW5lLCBiZWZvcmUsIGFmdGVyKSB7XG4gICAgICAgICAgICAgICAgdmFyIHNwYWNlcyA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGJlZm9yZS0tICYmIGxpbmUuY2hhckF0KGJlZm9yZSkgPT0gXCIgXCIpXG4gICAgICAgICAgICAgICAgICAgIHNwYWNlcysrO1xuICAgICAgICAgICAgICAgIGlmIChzcGFjZXMgJSB0YWJTaXplICE9IDApXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB2YXIgc3BhY2VzID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAobGluZS5jaGFyQXQoYWZ0ZXIrKykgPT0gXCIgXCIpXG4gICAgICAgICAgICAgICAgICAgIHNwYWNlcysrO1xuICAgICAgICAgICAgICAgIGlmICh0YWJTaXplID4gMilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNwYWNlcyAlIHRhYlNpemUgIT0gdGFiU2l6ZSAtIDE7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3BhY2VzICUgdGFiU2l6ZSA9PSAwO1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGl0ZXIoZnVuKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gc3RhcnRSb3c7IGkgPD0gZW5kUm93OyBpKyspXG4gICAgICAgICAgICAgICAgZnVuKGRvYy5nZXRMaW5lKGkpLCBpKTtcbiAgICAgICAgfVxuXG5cbiAgICAgICAgdmFyIG1pbkVtcHR5TGVuZ3RoID0gSW5maW5pdHk7XG4gICAgICAgIGl0ZXIoZnVuY3Rpb24obGluZSwgaSkge1xuICAgICAgICAgICAgdmFyIGluZGVudCA9IGxpbmUuc2VhcmNoKC9cXFMvKTtcbiAgICAgICAgICAgIGlmIChpbmRlbnQgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluZGVudCA8IG1pbkluZGVudClcbiAgICAgICAgICAgICAgICAgICAgbWluSW5kZW50ID0gaW5kZW50O1xuICAgICAgICAgICAgICAgIGlmIChzaG91bGRSZW1vdmUgJiYgIXRlc3RSZW1vdmUobGluZSwgaSkpXG4gICAgICAgICAgICAgICAgICAgIHNob3VsZFJlbW92ZSA9IGZhbHNlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChtaW5FbXB0eUxlbmd0aCA+IGxpbmUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgbWluRW1wdHlMZW5ndGggPSBsaW5lLmxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKG1pbkluZGVudCA9PSBJbmZpbml0eSkge1xuICAgICAgICAgICAgbWluSW5kZW50ID0gbWluRW1wdHlMZW5ndGg7XG4gICAgICAgICAgICBpZ25vcmVCbGFua0xpbm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W5kUmFuZ2U7XG4gICAgICAgICAgICB3aGlsZSAodG9rZW4gJiYgL2NvbW1lbnQvLnRlc3QodG9rZW4udHlwZSkpIHtcbiAgICAgICAgICAgICAgICB2YXIgaSA9IHRva2VuLnZhbHVlLmluZGV4T2YoY29tbWVudC5zdGFydCk7XG4gICAgICAgICAgICAgICAgaWYgKGkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyBpO1xuICAgICAgICAgICAgICAgICAgICBzdGFydFJhbmdlID0gbmV3IFJhbmdlKHJvdywgY29sdW1uLCByb3csIGNvbHVtbiArIGNvbW1lbnQuc3RhcnQubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHNlc3Npb24sIGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgICAgICB3aGlsZSAodG9rZW4gJiYgL2NvbW1lbnQvLnRlc3QodG9rZW4udHlwZSkpIHtcbiAgICAgICAgICAgICAgICB2YXIgaSA9IHRva2VuLnZhbHVlLmluZGV4T2YoY29tbWVudC5lbmQpO1xuICAgICAgICAgICAgICAgIGlmIChpICE9IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciByb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgaTtcbiAgICAgICAgICAgICAgICAgICAgZW5kUmFuZ2UgPSBuZXcgUmFuZ2Uocm93LCBjb2x1bW4sIHJvdywgY29sdW1uICsgY29tbWVudC5lbmQubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChlbmRSYW5nZSlcbiAgICAgICAgICAgICAgICBzZXNzaW9uLnJlbW92ZShlbmRSYW5nZSk7XG4gICAgICAgICAgICBpZiAoc3RhcnRSYW5nZSkge1xuICAgICAgICAgICAgICAgIHNlc3Npb24ucmVtb3ZlKHN0YXJ0UmFuZ2UpO1xuICAgICAgICAgICAgICAgIHN0YXJ0Um93ID0gc3RhcnRSYW5nZS5zdGFydC5yb3c7XG4gICAgICAgICAgICAgICAgY29sRGlmZiA9IC1jb21tZW50LnN0YXJ0Lmxlbmd0aDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbERpZmYgPSBjb21tZW50LnN0YXJ0Lmxlbmd0aDtcbiAgICAgICAgICAgIHN0YXJ0Um93ID0gcmFuZ2Uuc3RhcnQucm93O1xuICAgICAgICAgICAgc2Vzc2lvbi5pbnNlcnQocmFuZ2UuZW5kLCBjb21tZW50LmVuZCk7XG4gICAgICAgICAgICBzZXNzaW9uLmluc2VydChyYW5nZS5zdGFydCwgY29tbWVudC5zdGFydCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGluaXRpYWxSYW5nZS5zdGFydC5yb3cgPT0gc3RhcnRSb3cpXG4gICAgICAgICAgICBpbml0aWFsUmFuZ2Uuc3RhcnQuY29sdW1uICs9IGNvbERpZmY7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AgICAgICAgICBpZiAocmV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldEtleXdvcmRzID0gZnVuY3Rpb24oYXBwZW5kKSB7XG4gICAgICAgIGlmICghdGhpcy5jb21wbGV0aW9uS2V5d29yZHMpIHtcbiAgICAgICAgICAgIHZhciBydWxlcyA9IHRoaXMuJHRva2VuaXplci5ydWxlcztcbiAgICAgICAgICAgIHZhciBjb21wbGV0aW9uS2V5d29yZHMgPSBbXTtcbiAgICAgICAgICAgIGZvciAodmFyIHJ1bGUgaW4gcnVsZXMpIHtcbiAgICAgICAgICAgICAgICB2YXIgcnVsZUl0ciA9IHJ1bGVzW3J1bGVdO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIHIgPSAwLCBsID0gcnVsZUl0ci5sZW5ndGg7IHIgPCBsOyByKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBydWxlSXRyW3JdLnRva2VuID09PSBcInN0cmluZ1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2tleXdvcmR8c3VwcG9ydHxzdG9yYWdlLy50ZXN0KHJ1bGVJdHJbcl0udG9rZW4pKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBsZXRpb25LZXl3b3Jkcy5wdXNoKHJ1bGVJdHJbcl0ucmVnZXgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiBydWxlSXRyW3JdLnRva2VuID09PSBcIm9iamVjdFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBhID0gMCwgYUxlbmd0aCA9IHJ1bGVJdHJbcl0udG9rZW4ubGVuZ3RoOyBhIDwgYUxlbmd0aDsgYSsrKSB7ICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgva2V5d29yZHxzdXBwb3J0fHN0b3JhZ2UvLnRlc3QocnVsZUl0cltyXS50b2tlblthXSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJ1bGUgPSBydWxlSXRyW3JdLnJlZ2V4Lm1hdGNoKC9cXCguKz9cXCkvZylbYV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBsZXRpb25LZXl3b3Jkcy5wdXNoKHJ1bGUuc3Vic3RyKDEsIHJ1bGUubGVuZ3RoIC0gMikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuY29tcGxldGlvbktleXdvcmRzID0gY29tcGxldGlvbktleXdvcmRzO1xuICAgICAgICB9XG4gICAgICAgIGlmICghYXBwZW5kKVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuJGtleXdvcmRMaXN0O1xuICAgICAgICByZXR1cm4gY29tcGxldGlvbktleXdvcmRzLmNvbmNhdCh0aGlzLiRrZXl3b3JkTGlzdCB8fCBbXSk7XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLiRjcmVhdGVLZXl3b3JkTGlzdCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAoIXRoaXMuJGhpZ2hsaWdodFJ1bGVzKVxuICAgICAgICAgICAgdGhpcy5nZXRUb2tlbml6ZXIoKTtcbiAgICAgICAgcmV0dXJuIHRoaXMuJGtleXdvcmRMaXN0ID0gdGhpcy4kaGlnaGxpZ2h0UnVsZXMuJGtleXdvcmRMaXN0IHx8IFtdO1xuICAgIH07XG5cbiAgICB0aGlzLmdldENvbXBsZXRpb25zID0gZnVuY3Rpb24oc3RhdGUsIHNlc3Npb24sIHBv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NvbmNhdChkZWx0YS5saW5lcyk7XG4gICAgICAgICAgICAgICAgZG9jTGluZXMuc3BsaWNlLmFwcGx5KGRvY0xpbmVzLCBhcmdzKTtcbiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3ddID0gbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbcm93XTtcbiAgICAgICAgICAgICAgICBkb2NMaW5lc1tyb3cgKyBkZWx0YS5saW5lcy5sZW5ndGggLSAxXSArPSBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSBcInJlbW92ZVwiOlxuICAgICAgICAgICAgdmFyIGVuZENvbHVtbiA9IGRlbHRhLmVuZC5jb2x1bW47XG4gICAgICAgICAgICB2YXIgZW5kUm93ID0gZGVsdGEuZW5kLnJvdztcbiAgICAgICAgICAgIGlmIChyb3cgPT09IGVuZFJvdykge1xuICAgICAgICAgICAgICAgIGRvY0xpbmVzW3Jvd10gPSBsaW5lLnN1YnN0cmluZygwLCBzdGFydENvbHVtbikgKyBsaW5lLnN1YnN0cmluZyhlbmRDb2x1bW4pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkb2NMaW5lcy5zcGxpY2UoXG4gICAgICAgICAgICAgICAgICAgIHJvdywgZW5kUm93IC0gcm93ICsgMSxcbiAgICAgICAgICAgICAgICAgICAgbGluZS5zdWJzdHJpbmcoMCwgc3RhcnRDb2x1bW4pICsgZG9jTGluZXNbZW5kUm93XS5zdWJzdHJpbmcoZW5kQ29sdW1uKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICB9XG59O1xufSk7XG5cbmFjZS5kZWZpbmUoXCJhY2UvYW5jaG9yXCIsW1wicmVxdWlyZVwiLFwiZXhwb3J0c1wiLFwibW9kdWxlXCIsXCJhY2UvbGliL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LnJvdyk7XG4gICAgICAgIHZhciBkZWx0YUNvbFNoaWZ0ID0gKGRlbHRhSXNJbnNlcnQgPyAxIDogLTEpICogKGRlbHRhLmVuZC5jb2x1bW4gLSBkZWx0YS5zdGFydC5jb2x1bW4pO1xuICAgICAgICB2YXIgZGVsdGFTdGFydCA9IGRlbHRhLnN0YXJ0O1xuICAgICAgICB2YXIgZGVsdGFFbmQgPSBkZWx0YUlzSW5zZXJ0ID8gZGVsdGFTdGFydCA6IGRlbHRhLmVuZDsgLy8gQ29sbGFwc2UgaW5zZXJ0IHJhbmdlLlxuICAgICAgICBpZiAoJHBvaW50c0luT3JkZXIocG9pbnQsIGRlbHRhU3RhcnQsIG1vdmVJZkVxdWFsKSkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICByb3c6IHBvaW50LnJvdyxcbiAgICAgICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtblxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoJHBvaW50c0luT3JkZXIoZGVsdGFFbmQsIHBvaW50LCAhbW92ZUlmRXF1YWwpKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHJvdzogcG9pbnQucm93ICsgZGVsdGFSb3dTaGlmdCxcbiAgICAgICAgICAgICAgICBjb2x1bW46IHBvaW50LmNvbHVtbiArIChwb2ludC5yb3cgPT0gZGVsdGFFbmQucm93ID8gZGVsdGFDb2xTaGlmdCA6IDApXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcm93OiBkZWx0YVN0YXJ0LnJvdyxcbiAgICAgICAgICAgIGNvbHVtbjogZGVsdGFTdGFydC5jb2x1bW5cbiAgICAgICAgfTtcbiAgICB9XG4gICAgdGhpcy5zZXRQb3NpdGlvbiA9IGZ1bmN0aW9uKHJvdywgY29sdW1uLCBub0NsaXApIHtcbiAgICAgICAgdmFyIHBvcztcbiAgICAgICAgaWYgKG5vQ2xpcCkge1xuICAgICAgICAgICAgcG9zID0ge1xuICAgICAgICAgICAgICAgIHJvdzogcm93LFxuICAgICAgICAgICAgICAgIGNvbHVtbjogY29sdW1uXG4gICAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcG9zID0gdGhpcy4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudChyb3csIGNvbHVtbik7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodGhpcy5yb3cgPT0gcG9zLnJvdyAmJiB0aGlzLmNvbHVtbiA9PSBwb3MuY29sdW1uKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIHZhciBvbGQgPSB7XG4gICAgICAgICAgICByb3c6IHRoaXMucm93LFxuICAgICAgICAgICAgY29sdW1uOiB0aGlzLmNvbHVtblxuICAgICAgICB9O1xuXG4gICAgICAgIHRoaXMucm93ID0gcG9zLnJvdztcbiAgICAgICAgdGhpcy5jb2x1bW4gPSBwb3MuY29sdW1uO1xuICAgICAgICB0aGlzLl9zaWduYWwoXCJjaGFuZ2VcIiwge1xuICAgICAgICAgICAgb2xkOiBvbGQsXG4gICAgICAgICAgICB2YWx1ZTogcG9zXG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgdGhpcy5kZXRhY2ggPSBmdW5jdGlvbigpIHtcbiAgICAgICAgdGhpcy5kb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKFwiY2hhbmdlXCIsIHRoaXMuJG9uQ2hhbmdlKTtcbiAgICB9O1xuICAgIHRoaXMuYXR0YWNoID0gZnVuY3Rpb24oZG9jKSB7XG4gICAgICAgIHRoaXMuZG9jdW1lbnQgPSBkb2MgfHwgdGhpcy5kb2N1bWVudDtcbiAgICAgICAgdGhpcy5kb2N1bWVudC5vbihcImNoYW5nZVwiLCB0aGlzLiRvbkNoYW5nZSk7XG4gICAgfTtcbiAgICB0aGlzLiRjbGlwUG9zaXRpb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0Q29sID0gKCBkZWxldGVGaXJzdE5ld0xpbmUgPyB0aGlzLmdldExpbmUoc3RhcnRSb3cpLmxlbmd0aCA6IDAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICB2YXIgZW5kUm93ICAgPSAoIGRlbGV0ZUxhc3ROZXdMaW5lICA/IGxhc3RSb3cgKyAxICAgICAgICAgICAgICAgICAgIDogbGFzdFJvdyAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgIHZhciBlbmRDb2wgICA9ICggZGVsZXRlTGFzdE5ld0xpbmUgID8gMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB0aGlzLmdldExpbmUoZW5kUm93KS5sZW5ndGggKTsgXG4gICAgICAgIHZhciByYW5nZSA9IG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2wsIGVuZFJvdywgZW5kQ29sKTtcbiAgICAgICAgdmFyIGRlbGV0ZWRMaW5lcyA9IHRoaXMuJGxpbmVzLnNsaWNlKGZpcnN0Um93LCBsYXN0Um93ICsgMSk7XG4gICAgICAgIFxuICAgICAgICB0aGlzLmFwcGx5RGVsdGEoe1xuICAgICAgICAgICAgc3RhcnQ6IHJhbmdlLnN0YXJ0LFxuICAgICAgICAgICAgZW5kOiByYW5nZS5lbmQsXG4gICAgICAgICAgICBhY3Rpb246IFwicmVtb3ZlXCIsXG4gICAgICAgICAgICBsaW5lczogdGhpcy5nZXRMaW5lc0ZvclJhbmdlKHJhbmdlKVxuICAgICAgICB9KTtcbiAgICAgICAgcmV0dXJuIGRlbGV0ZWRMaW5lcztcbiAgICB9O1xuICAgIHRoaXMucmVtb3ZlTmV3TGluZSA9IGZ1bmN0aW9uKHJvdykge1xuICAgICAgICBpZiAocm93IDwgdGhpcy5nZXRMZW5ndGgoKSAtIDEgJiYgcm93ID49IDApIHtcbiAgICAgICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7XG4gICAgICAgICAgICAgICAgc3RhcnQ6IHRoaXMucG9zKHJvdywgdG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vdyA9IGRlbHRhLnN0YXJ0LnJvdzsgXG4gICAgICAgIHZhciBjb2x1bW4gPSBkZWx0YS5zdGFydC5jb2x1bW47XG4gICAgICAgIHZhciBmcm9tID0gMCwgdG8gPSAwO1xuICAgICAgICBkbyB7XG4gICAgICAgICAgICBmcm9tID0gdG87XG4gICAgICAgICAgICB0byArPSBNQVggLSAxO1xuICAgICAgICAgICAgdmFyIGNodW5rID0gbGluZXMuc2xpY2UoZnJvbSwgdG8pO1xuICAgICAgICAgICAgaWYgKHRvID4gbCkge1xuICAgICAgICAgICAgICAgIGRlbHRhLmxpbmVzID0gY2h1bms7XG4gICAgICAgICAgICAgICAgZGVsdGEuc3RhcnQucm93ID0gcm93ICsgZnJvbTtcbiAgICAgICAgICAgICAgICBkZWx0YS5zdGFydC5jb2x1bW4gPSBjb2x1bW47XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjaHVuay5wdXNoKFwiXCIpO1xuICAgICAgICAgICAgdGhpcy5hcHBseURlbHRhKHtcbiAgICAgICAgICAgICAgICBzdGFydDogdGhpcy5wb3Mocm93ICsgZnJvbSwgY29sdW1uKSxcbiAgICAgICAgICAgICAgICBlbmQ6IHRoaXMucG9zKHJvdyArIHRvLCBjb2x1bW4gPSAwKSxcbiAgICAgICAgICAgICAgICBhY3Rpb246IGRlbHRhLmFjdGlvbixcbiAgICAgICAgICAgICAgICBsaW5lczogY2h1bmtcbiAgICAgICAgICAgIH0sIHRydWUpO1xuICAgICAgICB9IHdoaWxlKHRydWUpO1xuICAgIH07XG4gICAgdGhpcy5yZXZlcnREZWx0YSA9IGZ1bmN0aW9uKGRlbHRhKSB7XG4gICAgICAgIHRoaXMuYXBwbHlEZWx0YSh7XG4gICAgICAgICAgICBzdGFydDogdGhpcy5jbG9uZVBvcyhkZWx0YS5zdGFydCksXG4gICAgICAgICAgICBlbmQ6IHRoaXMuY2xvbmVQb3MoZGVsdGEuZW5kKSxcbiAgICAg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47IH1cblxuICAgICAgICB2YXIgd29ya2VyU3RhcnQgPSBuZXcgRGF0ZSgpO1xuICAgICAgICB2YXIgY3VycmVudExpbmUgPSBzZWxmLmN1cnJlbnRMaW5lO1xuICAgICAgICB2YXIgZW5kTGluZSA9IC0xO1xuICAgICAgICB2YXIgZG9jID0gc2VsZi5kb2M7XG5cbiAgICAgICAgdmFyIHN0YXJ0TGluZSA9IGN1cnJlbnRMaW5lO1xuICAgICAgICB3aGlsZSAoc2VsZi5saW5lc1tjdXJyZW50TGluZV0pXG4gICAgICAgICAgICBjdXJyZW50TGluZSsrO1xuICAgICAgICBcbiAgICAgICAgdmFyIGxlbiA9IGRvYy5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHByb2Nlc3NlZExpbmVzID0gMDtcbiAgICAgICAgc2VsZi5ydW5uaW5nID0gZmFsc2U7XG4gICAgICAgIHdoaWxlIChjdXJyZW50TGluZSA8IGxlbikge1xuICAgICAgICAgICAgc2VsZi4kdG9rZW5pemVSb3coY3VycmVudExpbmUpO1xuICAgICAgICAgICAgZW5kTGluZSA9IGN1cnJlbnRMaW5lO1xuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGN1cnJlbnRMaW5lKys7XG4gICAgICAgICAgICB9IHdoaWxlIChzZWxmLmxpbmVzW2N1cnJlbnRMaW5lXSk7XG4gICAgICAgICAgICBwcm9jZXNzZWRMaW5lcyArKztcbiAgICAgICAgICAgIGlmICgocHJvY2Vzc2VkTGluZXMgJSA1ID09PSAwKSAmJiAobmV3IERhdGUoKSAtIHdvcmtlclN0YXJ0KSA+IDIwKSB7ICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHNlbGYucnVubmluZyA9IHNldFRpbWVvdXQoc2VsZi4kd29ya2VyLCAyMCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgc2VsZi5jdXJyZW50TGluZSA9IGN1cnJlbnRMaW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xkLCBjbXA7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5mb2xkcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgZm9sZCA9IHRoaXMuZm9sZHNbaV07XG4gICAgICAgICAgICBjbXAgPSBmb2xkLnJhbmdlLmNvbXBhcmVFbmQocm93LCBjb2x1bW4pO1xuICAgICAgICAgICAgaWYgKGNtcCA9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGZvbGQ6IGZvbGQsXG4gICAgICAgICAgICAgICAgICAgIGtpbmQ6IFwiYWZ0ZXJcIlxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGNtcCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGZvbGQ6IGZvbGQsXG4gICAgICAgICAgICAgICAgICAgIGtpbmQ6IFwiaW5zaWRlXCJcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG5cbiAgICB0aGlzLmFkZFJlbW92ZUNoYXJzID0gZnVuY3Rpb24ocm93LCBjb2x1bW4sIGxlbikge1xuICAgICAgICB2YXIgcmV0ID0gdGhpcy5nZXROZXh0Rm9sZFRvKHJvdywgY29sdW1uKSxcbiAgICAgICAgICAgIGZvbGQsIGZvbGRzO1xuICAgICAgICBpZiAocmV0KSB7XG4gICAgICAgICAgICBmb2xkID0gcmV0LmZvbGQ7XG4gICAgICAgICAgICBpZiAocmV0LmtpbmQgPT0gXCJpbnNpZGVcIlxuICAgICAgICAgICAgICAgICYmIGZvbGQuc3RhcnQuY29sdW1uICE9IGNvbHVtblxuICAgICAgICAgICAgICAgICYmIGZvbGQuc3RhcnQucm93ICE9IHJvdylcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB3aW5kb3cuY29uc29sZSAmJiB3aW5kb3cuY29uc29sZS5sb2cocm93LCBjb2x1bW4sIGZvbGQpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChmb2xkLnN0YXJ0LnJvdyA9PSByb3cpIHtcbiAgICAgICAgICAgICAgICBmb2xkcyA9IHRoaXMuZm9sZHM7XG4gICAgICAgICAgICAgICAgdmFyIGkgPSBmb2xkcy5pbmRleE9mKGZvbGQpO1xuICAgICAgICAgICAgICAgIGlmIChpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RhcnQuY29sdW1uICs9IGxlbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yIChpOyBpIDwgZm9sZHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgZm9sZCA9IGZvbGRzW2ldO1xuICAgICAgICAgICAgICAgICAgICBmb2xkLnN0YXJ0LmNvbHVtbiArPSBsZW47XG4gICAgICAgICAgICAgICAgICAgIGlmICghZm9sZC5zYW1lUm93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZm9sZC5lbmQuY29sdW1uICs9IGxlbjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5lbmQuY29sdW1uICs9IGxlbjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLnNwbGl0ID0gZnVuY3Rpb24ocm93LCBjb2x1bW4pIHtcbiAgICAgICAgdmFyIHBvcyA9IHRoaXMuZ2V0TmV4dEZvbGRUbyhyb3csIGNvbHVtbik7XG4gICAgICAgIFxuICAgICAgICBpZiAoIXBvcyB8fCBwb3Mua2luZCA9PSBcImluc2lkZVwiKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICBcbiAgICAgICAgdmFyIGZvbGQgPSBwb3MuZm9sZDtcbiAgICA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W5nKCkgKyBcIjogW1wiIF07XG5cbiAgICAgICAgdGhpcy5mb2xkcy5mb3JFYWNoKGZ1bmN0aW9uKGZvbGQpIHtcbiAgICAgICAgICAgIHJldC5wdXNoKFwiICBcIiArIGZvbGQudG9TdHJpbmcoKSk7XG4gICAgICAgIH0pO1xuICAgICAgICByZXQucHVzaChcIl1cIik7XG4gICAgICAgIHJldHVybiByZXQuam9pbihcIlxcblwiKTtcbiAgICB9O1xuXG4gICAgdGhpcy5pZHhUb1Bvc2l0aW9uID0gZnVuY3Rpb24oaWR4KSB7XG4gICAgICAgIHZhciBsYXN0Rm9sZEVuZENvbHVtbiA9IDA7XG5cbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmZvbGRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgZm9sZCA9IHRoaXMuZm9sZHNbaV07XG5cbiAgICAgICAgICAgIGlkeCAtPSBmb2xkLnN0YXJ0LmNvbHVtbiAtIGxhc3RGb2xkRW5kQ29sdW1uO1xuICAgICAgICAgICAgaWYgKGlkeCA8IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICByb3c6IGZvbGQuc3RhcnQucm93LFxuICAgICAgICAgICAgICAgICAgICBjb2x1bW46IGZvbGQuc3RhcnQuY29sdW1uICsgaWR4XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWR4IC09IGZvbGQucGxhY2Vob2xkZXIubGVuZ3RoO1xuICAgICAgICAgICAgaWYgKGlkeCA8IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZm9sZC5zdGFydDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGFzdEZvbGRFbmRDb2x1bW4gPSBmb2xkLmVuZC5jb2x1bW47XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcm93OiB0aGlzLmVuZC5yb3csXG4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kgJiYgIW5leHQuaXNFbXB0eSgpKVxuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuXG4gICAgICAgICAgICBpZiAoY29tcGFyZVBvaW50cyhyYW5nZS5lbmQsIG5leHQuZW5kKSA8IDApIHtcbiAgICAgICAgICAgICAgICByYW5nZS5lbmQucm93ID0gbmV4dC5lbmQucm93O1xuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5jb2x1bW4gPSBuZXh0LmVuZC5jb2x1bW47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGxpc3Quc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgcmVtb3ZlZC5wdXNoKG5leHQpO1xuICAgICAgICAgICAgbmV4dCA9IHJhbmdlO1xuICAgICAgICAgICAgaS0tO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB0aGlzLnJhbmdlcyA9IGxpc3Q7XG5cbiAgICAgICAgcmV0dXJuIHJlbW92ZWQ7XG4gICAgfTtcblxuICAgIHRoaXMuY29udGFpbnMgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICByZXR1cm4gdGhpcy5wb2ludEluZGV4KHtyb3c6IHJvdywgY29sdW1uOiBjb2x1bW59KSA+PSAwO1xuICAgIH07XG5cbiAgICB0aGlzLmNvbnRhaW5zUG9pbnQgPSBmdW5jdGlvbihwb3MpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucG9pbnRJbmRleChwb3MpID49IDA7XG4gICAgfTtcblxuICAgIHRoaXMucmFuZ2VBdFBvaW50ID0gZnVuY3Rpb24ocG9zKSB7XG4gICAgICAgIHZhciBpID0gdGhpcy5wb2ludEluZGV4KHBvcyk7XG4gICAgICAgIGlmIChpID49IDApXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5yYW5nZXNbaV07XG4gICAgfTtcblxuXG4gICAgdGhpcy5jbGlwUm93cyA9IGZ1bmN0aW9uKHN0YXJ0Um93LCBlbmRSb3cpIHtcbiAgICAgICAgdmFyIGxpc3QgPSB0aGlzLnJhbmdlcztcbiAgICAgICAgaWYgKGxpc3RbMF0uc3RhcnQucm93ID4gZW5kUm93IHx8IGxpc3RbbGlzdC5sZW5ndGggLSAxXS5zdGFydC5yb3cgPCBzdGFydFJvdylcbiAgICAgICAgICAgIHJldHVybiBbXTtcblxuICAgICAgICB2YXIgc3RhcnRJbmRleCA9IHRoaXMucG9pbnRJbmRleCh7cm93OiBzdGFydFJvdywgY29sdW1uOiAwfSk7XG4gICAgICAgIGlmIChzdGFydEluZGV4IDwgMClcbiAgICAgICAgICAgIHN0YXJ0SW5kZXggPSAtc3RhcnRJbmRleCAtIDE7XG4gICAgICAgIHZhciBlbmRJbmRleCA9IHRoaXMucG9pbnRJbmRleCh7cm93OiBlbmRSb3csIGNvbHVtbjogMH0sIHN0YXJ0SW5kZXgpO1xuICAgICAgICBpZiAoZW5kSW5kZXggPCAwKVxuICAgICAgICAgICAgZW5kSW5kZXggPSAtZW5kSW5kZXggLSAxO1xuXG4gICAgICAgIHZhciBjbGlwcGVkID0gW107XG4gICAgICAgIGZvciAodmFyIGkgPSBzdGFydEluZGV4OyBpIDwgZW5kSW5kZXg7IGkrKykge1xuICAgICAgICAgICAgY2xpcHBlZC5wdXNoKGxpc3RbaV0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjbGlwcGVkO1xuICAgIH07XG5cbiAgICB0aGlzLnJlbW92ZUFsbCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5yYW5nZXMuc3BsaWNlKDAsIHRoaXMucmFuZ2VzLmxlbmd0aCk7XG4gICAgfTtcblxuICAgIHRoaXMuYXR0YWNoID0gZnVuY3Rpb24oc2Vzc2lvbikge1xuICAgICAgICBpZiAodGhpcy5zZXNzaW9uKVxuICAgICAgICAgICAgdGhpcy5kZXRhY2goKTtcblxuICAgICAgICB0aGlzLnNlc3Npb24gPSBzZXNzaW9uO1xuICAgICAgICB0aGlzLm9uQ2hhbmdlID0gdGhpcy4k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Qucm93IDwgc3RhcnRSb3cpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICBpZiAoci5zdGFydC5yb3cgPiBzdGFydFJvdylcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgaWYgKHIuc3RhcnQucm93ID09IHN0YXJ0Um93ICYmIHIuc3RhcnQuY29sdW1uID49IHN0YXJ0LmNvbHVtbiApIHtcbiAgICAgICAgICAgICAgICBpZiAoci5zdGFydC5jb2x1bW4gPT0gc3RhcnQuY29sdW1uICYmIHRoaXMuJGluc2VydFJpZ2h0KSB7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgci5zdGFydC5jb2x1bW4gKz0gY29sRGlmZjtcbiAgICAgICAgICAgICAgICAgICAgci5zdGFydC5yb3cgKz0gbGluZURpZjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoci5lbmQucm93ID09IHN0YXJ0Um93ICYmIHIuZW5kLmNvbHVtbiA+PSBzdGFydC5jb2x1bW4pIHtcbiAgICAgICAgICAgICAgICBpZiAoci5lbmQuY29sdW1uID09IHN0YXJ0LmNvbHVtbiAmJiB0aGlzLiRpbnNlcnRSaWdodCkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHIuZW5kLmNvbHVtbiA9PSBzdGFydC5jb2x1bW4gJiYgY29sRGlmZiA+IDAgJiYgaSA8IG4gLSAxKSB7ICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICBpZiAoci5lbmQuY29sdW1uID4gci5zdGFydC5jb2x1bW4gJiYgci5lbmQuY29sdW1uID09IHJhbmdlc1tpKzFdLnN0YXJ0LmNvbHVtbilcbiAgICAgICAgICAgICAgICAgICAgICAgIHIuZW5kLmNvbHVtbiAtPSBjb2xEaWZmO1xuICAgICAgICAgICAgICAgIH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5jdGlvbihyb3csIGNvbHVtbiwgc2lkZSkge1xuICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLmdldEZvbGRMaW5lKHJvdyk7XG4gICAgICAgIGlmICghZm9sZExpbmUpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICB2YXIgZm9sZHMgPSBmb2xkTGluZS5mb2xkcztcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBmb2xkcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGZvbGQgPSBmb2xkc1tpXTtcbiAgICAgICAgICAgIGlmIChmb2xkLnJhbmdlLmNvbnRhaW5zKHJvdywgY29sdW1uKSkge1xuICAgICAgICAgICAgICAgIGlmIChzaWRlID09IDEgJiYgZm9sZC5yYW5nZS5pc0VuZChyb3csIGNvbHVtbikpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzaWRlID09IC0xICYmIGZvbGQucmFuZ2UuaXNTdGFydChyb3csIGNvbHVtbikpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmb2xkO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmdldEZvbGRzSW5SYW5nZSA9IGZ1bmN0aW9uKHJhbmdlKSB7XG4gICAgICAgIHZhciBzdGFydCA9IHJhbmdlLnN0YXJ0O1xuICAgICAgICB2YXIgZW5kID0gcmFuZ2UuZW5kO1xuICAgICAgICB2YXIgZm9sZExpbmVzID0gdGhpcy4kZm9sZERhdGE7XG4gICAgICAgIHZhciBmb3VuZEZvbGRzID0gW107XG5cbiAgICAgICAgc3RhcnQuY29sdW1uICs9IDE7XG4gICAgICAgIGVuZC5jb2x1bW4gLT0gMTtcblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZvbGRMaW5lcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGNtcCA9IGZvbGRMaW5lc1tpXS5yYW5nZS5jb21wYXJlUmFuZ2UocmFuZ2UpO1xuICAgICAgICAgICAgaWYgKGNtcCA9PSAyKSB7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjbXAgPT0gLTIpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGZvbGRzID0gZm9sZExpbmVzW2ldLmZvbGRzO1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBmb2xkcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBmb2xkID0gZm9sZHNbal07XG4gICAgICAgICAgICAgICAgY21wID0gZm9sZC5yYW5nZS5jb21wYXJlUmFuZ2UocmFuZ2UpO1xuICAgICAgICAgICAgICAgIGlmIChjbXAgPT0gLTIpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChjbXAgPT0gMikge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICBpZiAoY21wID09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmb3VuZEZvbGRzLnB1c2goZm9sZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgc3RhcnQuY29sdW1uIC09IDE7XG4gICAgICAgIGVuZC5jb2x1bW4gKz0gMTtcblxuICAgICAgICByZXR1cm4gZm91bmRGb2xkcztcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRGb2xkc0luUmFuZ2VMaXN0ID0gZnVuY3Rpb24ocmFuZ2VzKSB7XG4gICAgICAgIGlmIChBcnJheS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jogMCB9XG4gICAgICAgIH07XG4gICAgICAgIHZhciBzdHIsIGZvbGQ7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZm9sZExpbmUuZm9sZHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGZvbGQgPSBmb2xkTGluZS5mb2xkc1tpXTtcbiAgICAgICAgICAgIHZhciBjbXAgPSBmb2xkLnJhbmdlLmNvbXBhcmVFbmQocm93LCBjb2x1bW4pO1xuICAgICAgICAgICAgaWYgKGNtcCA9PSAtMSkge1xuICAgICAgICAgICAgICAgIHN0ciA9IHRoaXNcbiAgICAgICAgICAgICAgICAgICAgLmdldExpbmUoZm9sZC5zdGFydC5yb3cpXG4gICAgICAgICAgICAgICAgICAgIC5zdWJzdHJpbmcobGFzdEZvbGQuZW5kLmNvbHVtbiwgZm9sZC5zdGFydC5jb2x1bW4pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoY21wID09PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsYXN0Rm9sZCA9IGZvbGQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFzdHIpXG4gICAgICAgICAgICBzdHIgPSB0aGlzLmdldExpbmUoZm9sZC5zdGFydC5yb3cpLnN1YnN0cmluZyhsYXN0Rm9sZC5lbmQuY29sdW1uKTtcblxuICAgICAgICBpZiAodHJpbSA9PSAtMSlcbiAgICAgICAgICAgIHJldHVybiBzdHIuc3Vic3RyaW5nKDAsIGNvbHVtbiAtIGxhc3RGb2xkLmVuZC5jb2x1bW4pO1xuICAgICAgICBlbHNlIGlmICh0cmltID09IDEpXG4gICAgICAgICAgICByZXR1cm4gc3RyLnN1YnN0cmluZyhjb2x1bW4gLSBsYXN0Rm9sZC5lbmQuY29sdW1uKTtcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgcmV0dXJuIHN0cjtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRGb2xkTGluZSA9IGZ1bmN0aW9uKGRvY1Jvdywgc3RhcnRGb2xkTGluZSkge1xuICAgICAgICB2YXIgZm9sZERhdGEgPSB0aGlzLiRmb2xkRGF0YTtcbiAgICAgICAgdmFyIGkgPSAwO1xuICAgICAgICBpZiAoc3RhcnRGb2xkTGluZSlcbiAgICAgICAgICAgIGkgPSBmb2xkRGF0YS5pbmRleE9mKHN0YXJ0Rm9sZExpbmUpO1xuICAgICAgICBpZiAoaSA9PSAtMSlcbiAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICBmb3IgKGk7IGkgPCBmb2xkRGF0YS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gZm9sZERhdGFbaV07XG4gICAgICAgICAgICBpZiAoZm9sZExpbmUuc3RhcnQucm93IDw9IGRvY1JvdyAmJiBmb2xkTGluZS5lbmQucm93ID49IGRvY1Jvdykge1xuICAgICAgICAgICAgICAgIHJldHVybiBmb2xkTGluZTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZExpbmUuZW5kLnJvdyA+IGRvY1Jvdykge1xuICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG4gICAgdGhpcy5nZXROZXh0Rm9sZExpbmUgPSBmdW5jdGlvbihkb2NSb3csIHN0YXJ0Rm9sZExpbmUpIHtcbiAgICAgICAgdmFyIGZvbGREYXRhID0gdGhpcy4kZm9sZERhdGE7XG4gICAgICAgIHZhciBpID0gMDtcbiAgICAgICAgaWYgKHN0YXJ0Rm9sZExpbmUpXG4gICAgICAgICAgICBpID0gZm9sZERhdGEuaW5kZXhPZihzdGFydEZvbGRMaW5lKTtcbiAgICAgICAgaWYgKGkgPT0gLTEpXG4gICAgICAgICAgICBpID0gMDtcbiAgICAgICAgZm9yIChpOyBpIDwgZm9sZERhdGEubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IGZvbGREYXRhW2ldO1xuICAgICAgICAgICAgaWYgKGZvbGRMaW5lLmVuZC5yb3cgPj0gZG9jUm93KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZvbGRMaW5lO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG5cbiAgICB0aGlzLmdldEZvbGRlZFJvd0NvdW50ID0gZnVuY3Rpb24oZmlyc3QsIGxhc3QpIHtcbiAgICAgICAgdmFyIGZvbGREYXRhID0gdGhpcy4kZm9sZERhdGEsIHJvd0NvdW50ID0gbGFzdC1maXJzdCsxO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZvbGREYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSBmb2xkRGF0YVtpXSxcbiAgICAgICAgICAgICAgICBlbmQgPSBmb2xkTGluZS5lbmQucm93LFxuICAgICAgICAgICAgICAgIHN0YXJ0ID0gZm9sZExpbmUuc3RhcnQucm93O1xuICAgICAgICAgICAgaWYgKGVuZCA+PSBsYXN0KSB7XG4gICAgICAgICAgICAgICAgaWYgKHN0YXJ0IDwgbGFzdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhcnQgPj0gZmlyc3QpXG4gICAgICAgICAgICAgICAgICAgICAgICByb3dDb3VudCAtPSBsYXN0LXN0YXJ0O1xuICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICByb3dDb3VudCA9IDA7IC8vIGluIG9uZSBmb2xkXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChlbmQgPj0gZmlyc3Qpe1xuICAgICAgICAgICAgICAgIGlmIChzdGFydCA+PSBmaXJzdCkgLy8gZm9sZCBpbnNpZGUgcmFuZ2VcbiAgICAgICAgICAgICAgICAgICAgcm93Q291bnQgLT0gIGVuZC1zdGFydDtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHJvd0NvdW50IC09ICBlbmQtZmlyc3QrMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcm93Q291bnQ7XG4gICAgfTtcblxuICAgIHRoaXMuJGFkZEZvbGRMaW5lID0gZnVuY3Rpb24oZm9sZExpbmUpIHtcbiAgICAgICAgdGhpcy4kZm9sZERhdGEucHVzaChmb2xkTGluZSk7XG4gICAgICAgIHRoaXMuJGZvbGREYXRhLnNvcnQoZnVuY3Rpb24oYSwgYikge1xuICAgICAgICAgICAgcmV0dXJuIGEuc3RhcnQucm93IC0gYi5zdGFydC5yb3c7XG4gICAgICAgIH0pO1xuICAgICAgICByZXR1cm4gZm9sZExpbmU7XG4gICAgfTtcbiAgICB0aGlzLmFkZEZvbGQgPSBmdW5jdGlvbihwbGFjZWhvbGRlciwgcmFuZ2UpIHtcbiAgICAgICAgdmFyIGZvbGREYXRhID0gdGhpcy4kZm9sZERhdGE7XG4gICAgICAgIHZhciBhZGRlZCA9IGZhbHNlO1xuICAgICAgICB2YXIgZm9sZDtcbiAgICAgICAgXG4gICAgICAgIGlmIChwbGFjZWhvbGRlciBpbnN0YW5jZW9mIEZvbGQpXG4gICAgICAgICAgICBmb2xkID0gcGxhY2Vob2xkZXI7XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9sZCA9IG5ldyBGb2xkKHJhbmdlLCBwbGFjZWhvbGRlcik7XG4gICAgICAgICAgICBmb2xkLmNvbGxhcHNlQ2hpbGRyZW4gPSByYW5nZS5jb2xsYXBzZUNoaWxkcmVuO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuJGNsaXBSYW5nZVRvRG9jdW1lbnQoZm9sZC5yYW5nZSk7XG5cbiAgICAgICAgdmFyIHN0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ZvbGRzSW5SYW5nZShmb2xkLnJhbmdlKTtcbiAgICAgICAgaWYgKGZvbGRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHRoaXMucmVtb3ZlRm9sZHMoZm9sZHMpO1xuICAgICAgICAgICAgZm9sZHMuZm9yRWFjaChmdW5jdGlvbihzdWJGb2xkKSB7XG4gICAgICAgICAgICAgICAgZm9sZC5hZGRTdWJGb2xkKHN1YkZvbGQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGZvbGREYXRhLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSBmb2xkRGF0YVtpXTtcbiAgICAgICAgICAgIGlmIChlbmRSb3cgPT0gZm9sZExpbmUuc3RhcnQucm93KSB7XG4gICAgICAgICAgICAgICAgZm9sZExpbmUuYWRkRm9sZChmb2xkKTtcbiAgICAgICAgICAgICAgICBhZGRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXJ0Um93ID09IGZvbGRMaW5lLmVuZC5yb3cpIHtcbiAgICAgICAgICAgICAgICBmb2xkTGluZS5hZGRGb2xkKGZvbGQpO1xuICAgICAgICAgICAgICAgIGFkZGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBpZiAoIWZvbGQuc2FtZVJvdykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZExpbmVOZXh0ID0gZm9sZERhdGFbaSArIDFdO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmVOZXh0ICYmIGZvbGRMaW5lTmV4dC5zdGFydC5yb3cgPT0gZW5kUm93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5tZXJnZShmb2xkTGluZU5leHQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1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kTGluZS53YWxrKGZ1bmN0aW9uKHBsYWNlaG9sZGVyLCByb3csIGNvbHVtbiwgbGFzdENvbHVtbikge1xuICAgICAgICAgICAgaWYgKHJvdyA8IHN0YXJ0Um93KVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIGlmIChyb3cgPT0gc3RhcnRSb3cpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29sdW1uIDwgc3RhcnRDb2x1bW4pXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBsYXN0Q29sdW1uID0gTWF0aC5tYXgoc3RhcnRDb2x1bW4sIGxhc3RDb2x1bW4pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAocGxhY2Vob2xkZXIgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHRleHRMaW5lICs9IHBsYWNlaG9sZGVyO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0ZXh0TGluZSArPSBkb2MuZ2V0TGluZShyb3cpLnN1YnN0cmluZyhsYXN0Q29sdW1uLCBjb2x1bW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LCBlbmRSb3csIGVuZENvbHVtbik7XG4gICAgICAgIHJldHVybiB0ZXh0TGluZTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXREaXNwbGF5TGluZSA9IGZ1bmN0aW9uKHJvdywgZW5kQ29sdW1uLCBzdGFydFJvdywgc3RhcnRDb2x1bW4pIHtcbiAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5nZXRGb2xkTGluZShyb3cpO1xuXG4gICAgICAgIGlmICghZm9sZExpbmUpIHtcbiAgICAgICAgICAgIHZhciBsaW5lO1xuICAgICAgICAgICAgbGluZSA9IHRoaXMuZG9jLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHJldHVybiBsaW5lLnN1YnN0cmluZyhzdGFydENvbHVtbiB8fCAwLCBlbmRDb2x1bW4gfHwgbGluZ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lzLmV4cGFuZEZvbGQoZm9sZCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChicmFja2V0UG9zID0gdGhpcy5maW5kTWF0Y2hpbmdCcmFja2V0KGN1cnNvcikpIHtcbiAgICAgICAgICAgICAgICBpZiAocmFuZ2UuY29tcGFyZVBvaW50KGJyYWNrZXRQb3MpID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UuZW5kID0gYnJhY2tldFBvcztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByYW5nZS5zdGFydCA9IGJyYWNrZXRQb3M7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0LmNvbHVtbisrO1xuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uLS07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChicmFja2V0UG9zID0gdGhpcy5maW5kTWF0Y2hpbmdCcmFja2V0KHtyb3c6IGN1cnNvci5yb3csIGNvbHVtbjogY3Vyc29yLmNvbHVtbiArIDF9KSkge1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZS5jb21wYXJlUG9pbnQoYnJhY2tldFBvcykgPT0gMSlcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UuZW5kID0gYnJhY2tldFBvcztcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0ID0gYnJhY2tldFBvcztcblxuICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0LmNvbHVtbisrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByYW5nZSA9IHRoaXMuZ2V0Q29tbWVudEZvbGRSYW5nZShjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKSB8fCByYW5nZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciBmb2xkcyA9IHRoaXMuZ2V0Rm9sZHNJblJhbmdlKHJhbmdlKTtcbiAgICAgICAgICAgIGlmICh0cnlUb1VuZm9sZCAmJiBmb2xkcy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmV4cGFuZEZvbGRzKGZvbGRzKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGZvbGRzLmxlbmd0aCA9PSAxICkge1xuICAgICAgICAgICAgICAgIGZvbGQgPSBmb2xkc1swXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghZm9sZClcbiAgICAgICAgICAgIGZvbGQgPSB0aGlzLmdldEZvbGRBdChyYW5nZS5zdGFydC5yb3csIHJhbmdlLnN0YXJ0LmNvbHVtbik7XG5cbiAgICAgICAgaWYgKGZvbGQgJiYgZm9sZC5yYW5nZS50b1N0cmluZygpID09IHJhbmdlLnRvU3RyaW5nKCkpIHtcbiAgICAgICAgICAgIHRoaXMuZXhwYW5kRm9sZChmb2xkKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBwbGFjZWhvbGRlciA9IFwiLi4uXCI7XG4gICAgICAgIGlmICghcmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgcGxhY2Vob2xkZXIgPSB0aGlzLmdldFRleHRSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICBpZiAocGxhY2Vob2xkZXIubGVuZ3RoIDwgNClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBwbGFjZWhvbGRlciA9IHBsYWNlaG9sZGVyLnRyaW0oKS5zdWJzdHJpbmcoMCwgMikgKyBcIi4uXCI7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmFkZEZvbGQocGxhY2Vob2xkZXIsIHJhbmdlKTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRDb21tZW50Rm9sZFJhbmdlID0gZnVuY3Rpb24ocm93LCBjb2x1bW4sIGRpcikge1xuICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcih0aGlzLCByb3csIGNvbHVtbik7XG4gICAgICAgIHZhciB0b2tlbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbigpO1xuICAgICAgICB2YXIgdHlwZSA9IHRva2VuLnR5cGU7XG4gICAgICAgIGlmICh0b2tlbiAmJiAvXmNvbW1lbnR8c3RyaW5nLy50ZXN0KHR5cGUpKSB7XG4gICAgICAgICAgICB0eXBlID0gdHlwZS5tYXRjaCgvY29tbWVudHxzdHJpbmcvKVswXTtcbiAgICAgICAgICAgIGlmICh0eXBlID09IFwiY29tbWVudFwiKVxuICAgICAgICAgICAgICAgIHR5cGUgKz0gXCJ8ZG9jLXN0YXJ0XCI7XG4gICAgICAgICAgICB2YXIgcmUgPSBuZXcgUmVnRXhwKHR5cGUpO1xuICAgICAgICAgICAgdmFyIHJhbmdlID0gbmV3IFJhbmdlKCk7XG4gICAgICAgICAgICBpZiAoZGlyICE9IDEpIHtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgcmUudGVzdCh0b2tlbi50eXBlKSk7XG4gICAgICAgICAgICAgICAgaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmFuZ2Uuc3RhcnQucm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIDI7XG5cbiAgICAgICAgICAgIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3IodGhpcywgcm93LCBjb2x1bW4pO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoZGlyICE9IC0xKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxhc3RSb3cgPSAtMTtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxhc3RSb3cgPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBzdGF0ZSA9IHRoaXMuZ2V0U3RhdGUoaXRlcmF0b3IuJHJvdyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXJlLnRlc3Qoc3RhdGUpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RSb3cgPSBpdGVyYXRvci4kcm93O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZXJhdG9yLiRyb3cgPiBsYXN0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHRva2VuICYmIHJlLnRlc3QodG9rZW4udHlwZSkpO1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbigpO1xuXG4gICAgICAgICAgICByYW5nZS5lbmQucm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyB0b2tlbi52YWx1ZS5sZW5ndGggLSAyO1xuICAgICAgICAgICAgcmV0dXJuI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RhdGVGb2xkV2lkZ2V0cyA9IHRoaXMudXBkYXRlRm9sZFdpZGdldHMuYmluZCh0aGlzKTtcbiAgICAgICAgdGhpcy4kdG9rZW5pemVyVXBkYXRlRm9sZFdpZGdldHMgPSB0aGlzLnRva2VuaXplclVwZGF0ZUZvbGRXaWRnZXRzLmJpbmQodGhpcyk7XG4gICAgICAgIHRoaXMub24oJ2NoYW5nZScsIHRoaXMuJHVwZGF0ZUZvbGRXaWRnZXRzKTtcbiAgICAgICAgdGhpcy5vbigndG9rZW5pemVyVXBkYXRlJywgdGhpcy4kdG9rZW5pemVyVXBkYXRlRm9sZFdpZGdldHMpO1xuICAgIH07XG5cbiAgICB0aGlzLmdldFBhcmVudEZvbGRSYW5nZURhdGEgPSBmdW5jdGlvbiAocm93LCBpZ25vcmVDdXJyZW50KSB7XG4gICAgICAgIHZhciBmdyA9IHRoaXMuZm9sZFdpZGdldHM7XG4gICAgICAgIGlmICghZncgfHwgKGlnbm9yZUN1cnJlbnQgJiYgZndbcm93XSkpXG4gICAgICAgICAgICByZXR1cm4ge307XG5cbiAgICAgICAgdmFyIGkgPSByb3cgLSAxLCBmaXJzdFJhbmdlO1xuICAgICAgICB3aGlsZSAoaSA+PSAwKSB7XG4gICAgICAgICAgICB2YXIgYyA9IGZ3W2ldO1xuICAgICAgICAgICAgaWYgKGMgPT0gbnVsbClcbiAgICAgICAgICAgICAgICBjID0gZndbaV0gPSB0aGlzLmdldEZvbGRXaWRnZXQoaSk7XG5cbiAgICAgICAgICAgIGlmIChjID09IFwic3RhcnRcIikge1xuICAgICAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMuZ2V0Rm9sZFdpZGdldFJhbmdlKGkpO1xuICAgICAgICAgICAgICAgIGlmICghZmlyc3RSYW5nZSlcbiAgICAgICAgICAgICAgICAgICAgZmlyc3RSYW5nZSA9IHJhbmdlO1xuICAgICAgICAgICAgICAgIGlmIChyYW5nZSAmJiByYW5nZS5lbmQucm93ID49IHJvdylcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpLS07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcmFuZ2U6IGkgIT09IC0xICYmIHJhbmdlLFxuICAgICAgICAgICAgZmlyc3RSYW5nZTogZmlyc3RSYW5nZVxuICAgICAgICB9O1xuICAgIH07XG5cbiAgICB0aGlzLm9uRm9sZFdpZGdldENsaWNrID0gZnVuY3Rpb24ocm93LCBlKSB7XG4gICAgICAgIGUgPSBlLmRvbUV2ZW50O1xuICAgICAgICB2YXIgb3B0aW9ucyA9IHtcbiAgICAgICAgICAgIGNoaWxkcmVuOiBlLnNoaWZ0S2V5LFxuICAgICAgICAgICAgYWxsOiBlLmN0cmxLZXkgfHwgZS5tZXRhS2V5LFxuICAgICAgICAgICAgc2libGluZ3M6IGUuYWx0S2V5XG4gICAgICAgIH07XG4gICAgICAgIFxuICAgICAgICB2YXIgcmFuZ2UgPSB0aGlzLiR0b2dnbGVGb2xkV2lkZ2V0KHJvdywgb3B0aW9ucyk7XG4gICAgICAgIGlmICghcmFuZ2UpIHtcbiAgICAgICAgICAgIHZhciBlbCA9IChlLnRhcmdldCB8fCBlLnNyY0VsZW1lbnQpO1xuICAgICAgICAgICAgaWYgKGVsICYmIC9hY2VfZm9sZC13aWRnZXQvLnRlc3QoZWwuY2xhc3NOYW1lKSlcbiAgICAgICAgICAgICAgICBlbC5jbGFzc05hbWUgKz0gXCIgYWNlX2ludmFsaWRcIjtcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy4kdG9nZ2xlRm9sZFdpZGdldCA9IGZ1bmN0aW9uKHJvdywgb3B0aW9ucykge1xuICAgICAgICBpZiAoIXRoaXMuZ2V0Rm9sZFdpZGdldClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdmFyIHR5cGUgPSB0aGlzLmdldEZvbGRXaWRnZXQocm93KTtcbiAgICAgICAgdmFyI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0gY2hyICYmIGNoci5tYXRjaCgvKFtcXChcXFtcXHtdKXwoW1xcKVxcXVxcfV0pLyk7XG4gICAgICAgICAgICBiZWZvcmUgPSBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIW1hdGNoKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG5cbiAgICAgICAgaWYgKG1hdGNoWzFdKSB7XG4gICAgICAgICAgICB2YXIgYnJhY2tldFBvcyA9IHRoaXMuJGZpbmRDbG9zaW5nQnJhY2tldChtYXRjaFsxXSwgcG9zKTtcbiAgICAgICAgICAgIGlmICghYnJhY2tldFBvcylcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhwb3MsIGJyYWNrZXRQb3MpO1xuICAgICAgICAgICAgaWYgKCFiZWZvcmUpIHtcbiAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uKys7XG4gICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQuY29sdW1uLS07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByYW5nZS5jdXJzb3IgPSByYW5nZS5lbmQ7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgYnJhY2tldFBvcyA9IHRoaXMuJGZpbmRPcGVuaW5nQnJhY2tldChtYXRjaFsyXSwgcG9zKTtcbiAgICAgICAgICAgIGlmICghYnJhY2tldFBvcylcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIHJhbmdlID0gUmFuZ2UuZnJvbVBvaW50cyhicmFja2V0UG9zLCBwb3MpO1xuICAgICAgICAgICAgaWYgKCFiZWZvcmUpIHtcbiAgICAgICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4rKztcbiAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uLS07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByYW5nZS5jdXJzb3IgPSByYW5nZS5zdGFydDtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgIH07XG5cbiAgICB0aGlzLiRicmFja2V0cyA9IHtcbiAgICAgICAgXCIpXCI6IFwiKFwiLFxuICAgICAgICBcIihcIjogXCIpXCIsXG4gICAgICAgIFwiXVwiOiBcIltcIixcbiAgICAgICAgXCJbXCI6IFwiXVwiLFxuICAgICAgICBcIntcIjogXCJ9XCIsXG4gICAgICAgIFwifVwiOiBcIntcIlxuICAgIH07XG5cbiAgICB0aGlzLiRmaW5kT3BlbmluZ0JyYWNrZXQgPSBmdW5jdGlvbihicmFja2V0LCBwb3NpdGlvbiwgdHlwZVJlKSB7XG4gICAgICAgIHZhciBvcGVuQnJhY2tldCA9IHRoaXMuJGJyYWNrZXRzW2JyYWNrZXRdO1xuICAgICAgICB2YXIgZGVwdGggPSAxO1xuXG4gICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHRoaXMsIHBvc2l0aW9uLnJvdywgcG9zaXRpb24uY29sdW1uKTtcbiAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBGb3J3YXJkKCk7XG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIFxuICAgICAgICAgaWYgKCF0eXBlUmUpe1xuICAgICAgICAgICAgdHlwZVJlID0gbmV3IFJlZ0V4cChcbiAgICAgICAgICAgICAgICBcIihcXFxcLj9cIiArXG4gICAgICAgICAgICAgICAgdG9rZW4udHlwZS5yZXBsYWNlKFwiLlwiLCBcIlxcXFwuXCIpLnJlcGxhY2UoXCJycGFyZW5cIiwgXCIucGFyZW5cIilcbiAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoL1xcYig/OmVuZClcXGIvLCBcIig/OnN0YXJ0fGJlZ2lufGVuZClcIilcbiAgICAgICAgICAgICAgICArIFwiKStcIlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgdmFsdWVJbmRleCA9IHBvc2l0aW9uLmNvbHVtbiAtIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpIC0gMjtcbiAgICAgICAgdmFyIHZhbHVlID0gdG9rZW4udmFsdWU7XG4gICAgICAgIFxuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICBcbiAgICAgICAgICAgIHdoaWxlICh2YWx1ZUluZGV4ID49IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgY2hyID0gdmFsdWUuY2hhckF0KHZhbHVlSW5kZXgpO1xuICAgICAgICAgICAgICAgIGlmIChjaHIgPT0gb3BlbkJyYWNrZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGggLT0gMTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRoID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7cm93OiBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHZhbHVlSW5kZXggKyBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKX07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoY2hyID09IGJyYWNrZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGggKz0gMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFsdWVJbmRleCAtPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICB9IHdoaWxlICh0b2tlbiAmJiAhdHlwZVJlLnRlc3QodG9rZW4udHlwZSkpO1xuXG4gICAgICAgICAgICBpZiAodG9rZW4gPT0gbnVsbClcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhbHVlID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICB2YWx1ZUluZGV4ID0gdmFsdWUubGVuZ3RoIC0gMTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcblxuICAgIHRoaXMuJGZpbmRDbG9zaW5nQnJhY2tldCA9IGZ1bmN0aW9uKGJyYWNrZXQsIHBvc2l0aW9uLCB0eXBlUmUpIHtcbiAgICAgICAgdmFyIGNsb3NpbmdCcmFja2V0ID0gdGhpcy4kYnJhY2tldHNbYnJhY2tldF07XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG5cbiAgICAgICAgdmFyIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3IodGhpcywgcG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4pO1xuICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICBpZiAoIXR5cGVSZSl7XG4gICAgICAgICAgICB0eXBlUmUgPSBuZXcgUmVnRXhwKFxuICAgICAgICAgICAgICAgIFwiKFxcXFwuP1wiICtcbiAgICAgICAgICAgICAgICB0b2tlbi50eXBlLnJlcGxhY2UoXCIuXCIsIFwiXFxcXC5cIikucmVwbGFjZShcImxwYXJlblwiLCBcIi5wYXJlblwiKVxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvXFxiKD86c3RhcnR8YmVnaW4pXFxiLywgXCIoPzpzdGFydHxiZWdpbnxlbmQpXCIpXG4gICAgICAgICAgICAgICAgKyBcIikrXCJcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHZhbHVlSW5kZXggPSBwb3NpdGlvbi5jb2x1bW4gLSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKTtcblxuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuXG4gICAgICAgICAgICB2YXIgdmFsdWUgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgIHZhciB2YWx1ZUxlbmd0aCA9IHZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgIHdoaWxlICh2YWx1ZUluZGV4IDwgdmFsdWVMZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgY2hyID0gdmFsdWUuY2hhckF0KHZhbHVlSW5kZXgpO1xuICAgICAgICAgICAgICAgIGlmIChjaHIgPT0gY2xvc2luZ0JyYWNrZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGggLT0gMTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRlcHRoID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7cm93OiBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHZhbHVlSW5kZXggKyBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKX07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoY2hyID09IGJyYWNrZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVwdGggKz0gMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdmFsdWVJbmRleCArPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgI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ci5zZXREb2N1bWVudCh0aGlzLmdldERvY3VtZW50KCkpO1xuXG4gICAgICAgIHRoaXMucmVzZXRDYWNoZXMoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0RG9jdW1lbnQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZG9jO1xuICAgIH07XG4gICAgdGhpcy4kcmVzZXRSb3dDYWNoZSA9IGZ1bmN0aW9uKGRvY1Jvdykge1xuICAgICAgICBpZiAoIWRvY1Jvdykge1xuICAgICAgICAgICAgdGhpcy4kZG9jUm93Q2FjaGUgPSBbXTtcbiAgICAgICAgICAgIHRoaXMuJHNjcmVlblJvd0NhY2hlID0gW107XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGwgPSB0aGlzLiRkb2NSb3dDYWNoZS5sZW5ndGg7XG4gICAgICAgIHZhciBpID0gdGhpcy4kZ2V0Um93Q2FjaGVJbmRleCh0aGlzLiRkb2NSb3dDYWNoZSwgZG9jUm93KSArIDE7XG4gICAgICAgIGlmIChsID4gaSkge1xuICAgICAgICAgICAgdGhpcy4kZG9jUm93Q2FjaGUuc3BsaWNlKGksIGwpO1xuICAgICAgICAgICAgdGhpcy4kc2NyZWVuUm93Q2FjaGUuc3BsaWNlKGksIGwpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJGdldFJvd0NhY2hlSW5kZXggPSBmdW5jdGlvbihjYWNoZUFycmF5LCB2YWwpIHtcbiAgICAgICAgdmFyIGxvdyA9IDA7XG4gICAgICAgIHZhciBoaSA9IGNhY2hlQXJyYXkubGVuZ3RoIC0gMTtcblxuICAgICAgICB3aGlsZSAobG93IDw9IGhpKSB7XG4gICAgICAgICAgICB2YXIgbWlkID0gKGxvdyArIGhpKSA+PiAxO1xuICAgICAgICAgICAgdmFyIGMgPSBjYWNoZUFycmF5W21pZF07XG5cbiAgICAgICAgICAgIGlmICh2YWwgPiBjKVxuICAgICAgICAgICAg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ByZXR1cm4gbnVsbDtcbiAgICAgICAgdG9rZW4uaW5kZXggPSBpO1xuICAgICAgICB0b2tlbi5zdGFydCA9IGMgLSB0b2tlbi52YWx1ZS5sZW5ndGg7XG4gICAgICAgIHJldHVybiB0b2tlbjtcbiAgICB9O1xuICAgIHRoaXMuc2V0VW5kb01hbmFnZXIgPSBmdW5jdGlvbih1bmRvTWFuYWdlcikge1xuICAgICAgICB0aGlzLiR1bmRvTWFuYWdlciA9IHVuZG9NYW5hZ2VyO1xuICAgICAgICB0aGlzLiRkZWx0YXMgPSBbXTtcbiAgICAgICAgdGhpcy4kZGVsdGFzRG9jID0gW107XG4gICAgICAgIHRoaXMuJGRlbHRhc0ZvbGQgPSBbXTtcblxuICAgICAgICBpZiAodGhpcy4kaW5mb3JtVW5kb01hbmFnZXIpXG4gICAgICAgICAgICB0aGlzLiRpbmZvcm1VbmRvTWFuYWdlci5jYW5jZWwoKTtcblxuICAgICAgICBpZiAodW5kb01hbmFnZXIpIHtcbiAgICAgICAgICAgIHZhciBzZWxmID0gdGhpcztcblxuICAgICAgICAgICAgdGhpcy4kc3luY0luZm9ybVVuZG9NYW5hZ2VyID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgc2VsZi4kaW5mb3JtVW5kb01hbmFnZXIuY2FuY2VsKCk7XG5cbiAgICAgICAgICAgICAgICBpZiAoc2VsZi4kZGVsdGFzRm9sZC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi4kZGVsdGFzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXA6IFwiZm9sZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVsdGFzOiBzZWxmLiRkZWx0YXNGb2xkXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBzZWxmLiRkZWx0YXNGb2xkID0gW107XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuJGRlbHRhc0RvYy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi4kZGVsdGFzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgZ3JvdXA6IFwiZG9jXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWx0YXM6IHNlbGYuJGRlbHRhc0RvY1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZi4kZGVsdGFzRG9jID0gW107XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHNlbGYuJGRlbHRhcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHVuZG9NYW5hZ2VyLmV4ZWN1dGUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgYWN0aW9uOiBcImFjZXVwZGF0ZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXJnczogW3NlbGYuJGRlbHRhcywgc2VsZl0sXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXJnZTogc2VsZi5tZXJnZVVuZG9EZWx0YXNcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHNlbGYubWVyZ2VVbmRvRGVsdGFzID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgc2VsZi4kZGVsdGFzID0gW107XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgdGhpcy4kaW5mb3JtVW5kb01hbmFnZXIgPSBsYW5nLmRlbGF5ZWRDYWxsKHRoaXMuJHN5bmNJbmZvcm1VbmRvTWFuYWdlcik7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMubWFya1VuZG9Hcm91cCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAodGhpcy4kc3luY0luZm9ybVVuZG9NYW5hZ2VyKVxuICAgICAgICAgICAgdGhpcy4kc3luY0luZm9ybVVuZG9NYW5hZ2VyKCk7XG4gICAgfTtcb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yZWFrcG9pbnRcIiwge30pO1xuICAgIH07XG4gICAgdGhpcy5zZXRCcmVha3BvaW50ID0gZnVuY3Rpb24ocm93LCBjbGFzc05hbWUpIHtcbiAgICAgICAgaWYgKGNsYXNzTmFtZSA9PT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgY2xhc3NOYW1lID0gXCJhY2VfYnJlYWtwb2ludFwiO1xuICAgICAgICBpZiAoY2xhc3NOYW1lKVxuICAgICAgICAgICAgdGhpcy4kYnJlYWtwb2ludHNbcm93XSA9IGNsYXNzTmFtZTtcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgZGVsZXRlIHRoaXMuJGJyZWFrcG9pbnRzW3Jvd107XG4gICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZUJyZWFrcG9pbnRcIiwge30pO1xuICAgIH07XG4gICAgdGhpcy5jbGVhckJyZWFrcG9pbnQgPSBmdW5jdGlvbihyb3cpIHtcbiAgICAgICAgZGVsZXRlIHRoaXMuJGJyZWFrcG9pbnRzW3Jvd107XG4gICAgICAgIHRoaXMuX3NpZ25hbChcImNoYW5nZUJyZWFrcG9pbnRcIiwge30pO1xuICAgIH07XG4gICAgdGhpcy5hZGRNYXJrZXIgPSBmdW5jdGlvbihyYW5nZSwgY2xhenosIHR5cGUsIGluRnJvbnQpIHtcbiAgICAgICAgdmFyIGlkID0gdGhpcy4kbWFya2VySWQrKztcblxuICAgICAgICB2YXIgbWFya2VyID0ge1xuICAgICAgICAgICAgcmFuZ2UgOiByYW5nZSxcbiAgICAgICAgICAgIHR5cGUgOiB0eXBlIHx8IFwibGluZVwiLFxuICAgICAgICAgICAgcmVuZGVyZXI6IHR5cGVvZiB0eXBlID09IFwiZnVuY3Rpb25cIiA/IHR5cGUgOiBudWxsLFxuICAgICAgICAgICAgY2xhenogOiBjbGF6eixcbiAgICAgICAgICAgIGluRnJvbnQ6ICEhaW5Gcm9udCxcbiAgICAgICAgICAgIGlkOiBpZFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChpbkZyb250KSB7XG4gICAgICAgICAgICB0aGlzLiRmcm9udE1hcmtlcnNbaWRdID0gbWFya2VyO1xuICAgICAgICAgICAgdGhpcy5fc2lnbmFsKFwiY2hhbmdlRnJvbnRNYXJrZXJcIik7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLiRiYWNrTWFya2Vyc1tpZF0gPSBtYXJrZXI7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwoXCJjaGFuZ2VCYWNrTWFya2VyXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGlkO1xuICAgIH07XG4gICAgdGhpcy5hZGREeW5hbWljTWFya2VyID0gZnVuY3Rpb24obWFya2VyLCBpbkZyb250KSB7XG4gICAgICAgIGlmICghbWFya2VyLnVwZGF0ZSlcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdmFyIGlkID0gdGhpcy4kbWFya2VySWQrKztcbiAgICAgICAgbWFya2VyLmlkID0gaWQ7XG4gICAgICAgIG1hcmtlci5pbkZyb250ID0gISFpbkZyb250O1xuXG4gICAgICAgIGlmIChpbkZyb250KSB7XG4gICAgICAgICAgICB0aGlzLiRmcm9udE1hcmtlcnNbaWRdID0gbWFya2VyO1xuICAgICAgICAgICAgdGhpcy5fc2lnbmFsKFwiY2hhbmdlRnJvbnRNYXJrZXJcIik7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLiRiYWNrTWFya2Vyc1tpZF0gPSBtYXJrZXI7XG4gICAgICAgICAgICB0aGlzLl9zaWduYWwoXCJjaGFuZ2VCYWNrTWFya2VyXCIpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG1hcmtlcjtcbiAgICB9O1xuICAgIHRoaXMucmVtb3ZlTWFya2VyID0gZnVuY3Rpb24obWFya2VySWQpIHtcbiAgICAgICAgdmFyIG1hcmtlciA9IHRoaXMuJGZyb250TWFya2Vyc1ttYXJrZXJJZF0gfHwgdG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dGhpcy4kYXV0b05ld0xpbmUgPSBcIlxcblwiO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmdldFdvcmRSYW5nZSA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIHZhciBsaW5lID0gdGhpcy5nZXRMaW5lKHJvdyk7XG5cbiAgICAgICAgdmFyIGluVG9rZW4gPSBmYWxzZTtcbiAgICAgICAgaWYgKGNvbHVtbiA+IDApXG4gICAgICAgICAgICBpblRva2VuID0gISFsaW5lLmNoYXJBdChjb2x1bW4gLSAxKS5tYXRjaCh0aGlzLnRva2VuUmUpO1xuXG4gICAgICAgIGlmICghaW5Ub2tlbilcbiAgICAgICAgICAgIGluVG9rZW4gPSAhIWxpbmUuY2hhckF0KGNvbHVtbikubWF0Y2godGhpcy50b2tlblJlKTtcblxuICAgICAgICBpZiAoaW5Ub2tlbilcbiAgICAgICAgICAgIHZhciByZSA9IHRoaXMudG9rZW5SZTtcbiAgICAgICAgZWxzZSBpZiAoL15cXHMrJC8udGVzdChsaW5lLnNsaWNlKGNvbHVtbi0xLCBjb2x1bW4rMSkpKVxuICAgICAgICAgICAgdmFyIHJlID0gL1xccy87XG4gICAgICAgIGVsc2VcbiAgICAgICAgICAgIHZhciByZSA9IHRoaXMubm9uVG9rZW5SZTtcblxuICAgICAgICB2YXIgc3RhcnQgPSBjb2x1bW47XG4gICAgICAgIGlmIChzdGFydCA+IDApIHtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBzdGFydC0tO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKHN0YXJ0ID49IDAgJiYgbGluZS5jaGFyQXQoc3RhcnQpLm1hdGNoKHJlKSk7XG4gICAgICAgICAgICBzdGFydCsrO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGVuZCA9IGNvbHVtbjtcbiAgICAgICAgd2hpbGUgKGVuZCA8IGxpbmUubGVuZ3RoICYmIGxpbmUuY2hhckF0KGV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1bGUoW1wibW9kZVwiLCBwYXRoXSwgZnVuY3Rpb24obSkge1xuICAgICAgICAgICAgaWYgKHRoaXMuJG1vZGVJZCAhPT0gcGF0aClcbiAgICAgICAgICAgICAgICByZXR1cm4gY2IgJiYgY2IoKTtcbiAgICAgICAgICAgIGlmICh0aGlzLiRtb2Rlc1twYXRoXSAmJiAhb3B0aW9ucykge1xuICAgICAgICAgICAgICAgIHRoaXMuJG9uQ2hhbmdlTW9kZSh0aGlzLiRtb2Rlc1twYXRoXSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG0gJiYgbS5Nb2RlKSB7XG4gICAgICAgICAgICAgICAgbSA9IG5ldyBtLk1vZGUob3B0aW9ucyk7XG4gICAgICAgICAgICAgICAgaWYgKCFvcHRpb25zKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuJG1vZGVzW3BhdGhdID0gbTtcbiAgICAgICAgICAgICAgICAgICAgbS4kaWQgPSBwYXRoO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLiRvbkNoYW5nZU1vZGUobSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYiAmJiBjYigpO1xuICAgICAgICB9LmJpbmQodGhpcykpO1xuICAgICAgICBpZiAoIXRoaXMuJG1vZGUpXG4gICAgICAgICAgICB0aGlzLiRvbkNoYW5nZU1vZGUodGhpcy4kbW9kZXNbXCJhY2UvbW9kZS90ZXh0XCJdLCB0cnVlKTtcbiAgICB9O1xuXG4gICAgdGhpcy4kb25DaGFuZ2VNb2RlID0gZnVuY3Rpb24obW9kZSwgJGlzUGxhY2Vob2xkZXIpIHtcbiAgICAgICAgaWYgKCEkaXNQbGFjZWhvbGRlcilcbiAgICAgICAgICAgIHRoaXMuJG1vZGVJZCA9IG1vZGUuJGlkO1xuICAgICAgICBpZiAodGhpcy4kbW9kZSA9PT0gbW9kZSkgXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdGhpcy4kbW9kZSA9IG1vZGU7XG5cbiAgICAgICAgdGhpcy4kc3RvcFdvcmtlcigpO1xuXG4gICAgICAgIGlmICh0aGlzLiR1c2VXb3JrZXIpXG4gICAgICAgICAgICB0aGlzLiRzdGFydFdvcmtlcigpO1xuXG4gICAgICAgIHZhciB0b2tlbml6ZXIgPSBtb2RlLmdldFRva2VuaXplcigpO1xuXG4gICAgICAgIGlmKHRva2VuaXplci5hZGRFdmVudExpc3RlbmVyICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHZhciBvblJlbG9hZFRva2VuaXplciA9IHRoaXMub25SZWxvYWRUb2tlbml6ZXIuYmluZCh0aGlzKTtcbiAgICAgICAgICAgIHRva2VuaXplci5hZGRFdmVudExpc3RlbmVyKFwidXBkYXRlXCIsIG9uUmVsb2FkVG9rZW5pemVyKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghdGhpcy5iZ1Rva2VuaXplcikge1xuICAgICAgICAgICAgdGhpcy5iZ1Rva2VuaXplciA9IG5ldyBCYWNrZ3JvdW5kVG9rZW5pemVyKHRva2VuaXplcik7XG4gICAgICAgICAgICB2YXIgX3NlbGYgPSB0aGlzO1xuICAgICAgICAgICAgdGhpcy5iZ1Rva2VuaXplci5hZGRFdmVudExpc3RlbmVyKFwidXBkYXRlXCIsIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBfc2VsZi5fc2lnbmFsKFwidG9rZW5pemVyVXBkYXRlXCIsIGUpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB0aGlzLmJnVG9rZW5pemVyLnNldFRva2VuaXplcih0b2tlbml6ZXIpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5iZ1Rva2VuaXplci5zZXREb2N1bWVudCh0aGlzLmdldERvY3VtZW50KCkpO1xuXG4gICAgICAgIHRoaXMudG9rZW5SZSA9IG1vZGUudG9rZW5SZTtcbiAgICAgICAgdGhpcy5ub25Ub2tlblJlID0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FyIGZvbGRJbmRleCA9IDA7XG4gICAgICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLiRmb2xkRGF0YVtmb2xkSW5kZXhdO1xuICAgICAgICAgICAgdmFyIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG4gICAgICAgICAgICB2YXIgbGVuID0gbGluZXMubGVuZ3RoO1xuXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGkgPiBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGZvbGRMaW5lLmVuZC5yb3cgKyAxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaSA+PSBsZW4pXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUgPSB0aGlzLiRmb2xkRGF0YVtmb2xkSW5kZXgrK107XG4gICAgICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGNhY2hlW2ldID09IG51bGwpXG4gICAgICAgICAgICAgICAgICAgIGNhY2hlW2ldID0gdGhpcy4kZ2V0U3RyaW5nU2NyZWVuV2lkdGgobGluZXNbaV0pWzBdO1xuXG4gICAgICAgICAgICAgICAgaWYgKGNhY2hlW2ldID4gbG9uZ2VzdFNjcmVlbkxpbmUpXG4gICAgICAgICAgICAgICAgICAgIGxvbmdlc3RTY3JlZW5MaW5lID0gY2FjaGVbaV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnNjcmVlbldpZHRoID0gbG9uZ2VzdFNjcmVlbkxpbmU7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuZ2V0TGluZSA9IGZ1bmN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sb25lKCk7XG4gICAgICAgICAgICAgICAgaWYgKHguc3RhcnQucm93ID09IG9sZFN0YXJ0LnJvdylcbiAgICAgICAgICAgICAgICAgICAgeC5zdGFydC5jb2x1bW4gKz0gY29sbERpZmY7XG4gICAgICAgICAgICAgICAgaWYgKHguZW5kLnJvdyA9PSBvbGRTdGFydC5yb3cpXG4gICAgICAgICAgICAgICAgICAgIHguZW5kLmNvbHVtbiArPSBjb2xsRGlmZjtcbiAgICAgICAgICAgICAgICB4LnN0YXJ0LnJvdyArPSByb3dEaWZmO1xuICAgICAgICAgICAgICAgIHguZW5kLnJvdyArPSByb3dEaWZmO1xuICAgICAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICAgICAgfSkpO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIHRvUmFuZ2U7XG4gICAgfTtcbiAgICB0aGlzLmluZGVudFJvd3MgPSBmdW5jdGlvbihzdGFydFJvdywgZW5kUm93LCBpbmRlbnRTdHJpbmcpIHtcbiAgICAgICAgaW5kZW50U3RyaW5nID0gaW5kZW50U3RyaW5nLnJlcGxhY2UoL1xcdC9nLCB0aGlzLmdldFRhYlN0cmluZygpKTtcbiAgICAgICAgZm9yICh2YXIgcm93PXN0YXJ0Um93OyByb3c8PWVuZFJvdzsgcm93KyspXG4gICAgICAgICAgICB0aGlzLmRvYy5pbnNlcnRJbkxpbmUoe3Jvdzogcm93LCBjb2x1bW46IDB9LCBpbmRlbnRTdHJpbmcpO1xuICAgIH07XG4gICAgdGhpcy5vdXRkZW50Um93cyA9IGZ1bmN0aW9uIChyYW5nZSkge1xuICAgICAgICB2YXIgcm93UmFuZ2UgPSByYW5nZS5jb2xsYXBzZVJvd3MoKTtcbiAgICAgICAgdmFyIGRlbGV0ZVJhbmdlID0gbmV3IFJhbmdlKDAsIDAsIDAsIDApO1xuICAgICAgICB2YXIgc2l6ZSA9IHRoaXMuZ2V0VGFiU2l6ZSgpO1xuXG4gICAgICAgIGZvciAodmFyIGkgPSByb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9sZFN0YXJ0KGZpcnN0Um93ICsgZGlyKTtcbiAgICAgICAgICAgIGlmIChyb3cgPCAwKSByZXR1cm4gMDtcbiAgICAgICAgICAgIHZhciBkaWZmID0gcm93LWZpcnN0Um93O1xuICAgICAgICB9IGVsc2UgaWYgKGRpciA+IDApIHtcbiAgICAgICAgICAgIHZhciByb3cgPSB0aGlzLmdldFJvd0ZvbGRFbmQobGFzdFJvdyArIGRpcik7XG4gICAgICAgICAgICBpZiAocm93ID4gdGhpcy5kb2MuZ2V0TGVuZ3RoKCktMSkgcmV0dXJuIDA7XG4gICAgICAgICAgICB2YXIgZGlmZiA9IHJvdy1sYXN0Um93O1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZmlyc3RSb3cgPSB0aGlzLiRjbGlwUm93VG9Eb2N1bWVudChmaXJzdFJvdyk7XG4gICAgICAgICAgICBsYXN0Um93ID0gdGhpcy4kY2xpcFJvd1RvRG9jdW1lbnQobGFzdFJvdyk7XG4gICAgICAgICAgICB2YXIgZGlmZiA9IGxhc3RSb3cgLSBmaXJzdFJvdyArIDE7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcmFuZ2UgPSBuZXcgUmFuZ2UoZmlyc3RSb3csIDAsIGxhc3RSb3csIE51bWJlci5NQVhfVkFMVUUpO1xuICAgICAgICB2YXIgZm9sZHMgPSB0aGlzLmdldEZvbGRzSW5SYW5nZShyYW5nZSkubWFwKGZ1bmN0aW9uKHgpe1xuICAgICAgICAgICAgeCA9IHguY2xvbmUoKTtcbiAgICAgICAgICAgIHguc3RhcnQucm93ICs9IGRpZmY7XG4gICAgICAgICAgICB4LmVuZC5yb3cgKz0gZGlmZjtcbiAgICAgICAgICAgIHJldHVybiB4O1xuICAgICAgICB9KTtcbiAgICAgICAgXG4gICAgICAgIHZhciBsaW5lcyA9IGRpciA9PSAwXG4gICAgICAgICAgICA/IHRoaXMuZG9jLmdldExpbmVzKGZpcnN0Um93LCBsYXN0Um93KVxuICAgICAgICAgICA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4gICAgfTtcblxuXG4gICAgdGhpcy4kY2xpcFBvc2l0aW9uVG9Eb2N1bWVudCA9IGZ1bmN0aW9uKHJvdywgY29sdW1uKSB7XG4gICAgICAgIGNvbHVtbiA9IE1hdGgubWF4KDAsIGNvbHVtbik7XG5cbiAgICAgICAgaWYgKHJvdyA8IDApIHtcbiAgICAgICAgICAgIHJvdyA9IDA7XG4gICAgICAgICAgICBjb2x1bW4gPSAwO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGxlbiA9IHRoaXMuZG9jLmdldExlbmd0aCgpO1xuICAgICAgICAgICAgaWYgKHJvdyA+PSBsZW4pIHtcbiAgICAgICAgICAgICAgICByb3cgPSBsZW4gLSAxO1xuICAgICAgICAgICAgICAgIGNvbHVtbiA9IHRoaXMuZG9jLmdldExpbmUobGVuLTEpLmxlbmd0aDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29sdW1uID0gTWF0aC5taW4odGhpcy5kb2MuZ2V0TGluZShyb3cpLmxlbmd0aCwgY29sdW1uKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByb3c6IHJvdyxcbiAgICAgICAgICAgIGNvbHVtbjogY29sdW1uXG4gICAgICAgIH07XG4gICAgfTtcblxuICAgIHRoaXMuJGNsaXBSYW5nZVRvRG9jdW1lbnQgPSBmdW5jdGlvbihyYW5nZSkge1xuICAgICAgICBpZiAocmFuZ2Uuc3RhcnQucm93IDwgMCkge1xuICAgICAgICAgICAgcmFuZ2Uuc3RhcnQucm93ID0gMDtcbiAgICAgICAgICAgIHJhbmdlLnN0YXJ0LmNvbHVtbiA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByYW5nZS5zdGFydC5jb2x1bW4gPSB0aGlzLiRjbGlwQ29sdW1uVG9Sb3coXG4gICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQucm93LFxuICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0LmNvbHVtblxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBsZW4gPSB0aGlzLmRvYy5nZXRMZW5ndGgoKSAtIDE7XG4gICAgICAgIGlmIChyYW5nZS5lbmQucm93ID4gbGVuKSB7XG4gICAgICAgICAgICByYW5nZS5lbmQucm93ID0gbGVuO1xuICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbiA9IHRoaXMuZG9jLmdldExpbmUobGVuKS5sZW5ndGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uID0gdGhpcy4kY2xpcENvbHVtblRvUm93KFxuICAgICAgICAgICAgICAgIHJhbmdlLmVuZC5yb3csXG4gICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtblxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgfTtcbiAgICB0aGlzLiR3cmFwTGltaXQgPSA4MDtcbiAgICB0aGlzLiR1c2VXcmFwTW9kZSA9IGZhbHNlO1xuICAgIHRoaXMuJHdyYXBMaW1pdFJhbmdlID0ge1xuICAgICAgICBtaW4gOiBudWxsLFxuICAgICAgICBtYXggOiBudWxsXG4gICAgfTtcbiAgICB0aGlzLnNldFVzZVdyYXBNb2RlID0gZnVuY3Rpb24odXNlV3JhcE1vZGUpIHtcbiAgICAgICAgaWYgKHVzZVdyYXBNb2RlICE9IHRoaXMuJHVzZVdyYXBNb2RlKSB7XG4gICAgICAgICAgICB0aGlzLiR1c2VXcmFwTW9kZSA9IHVzZVdyYXBNb2RlO1xuICAgICAgICAgICAgdGhpcy4kbW9kaWZpZWQgPSB0cnVlO1xuICAgICAgICAgICAgdGhpcy4kcmVzZXRSb3dDYWNoZSgwKTtcbiAgICAgICAgICAgIGlmICh1c2VXcmFwTW9kZSkge1xuICAgICAgICAgICAgICAgIHZhciBsZW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yc3RSb3csIGxlbik7XG5cbiAgICAgICAgICAgICAgICB2YXIgZm9sZExpbmVzID0gdGhpcy4kZm9sZERhdGE7XG4gICAgICAgICAgICAgICAgcmVtb3ZlZEZvbGRzID0gdGhpcy5nZXRGb2xkc0luUmFuZ2UoZGVsdGEpO1xuICAgICAgICAgICAgICAgIHRoaXMucmVtb3ZlRm9sZHMocmVtb3ZlZEZvbGRzKTtcblxuICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuZ2V0Rm9sZExpbmUoZW5kLnJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIGlkeCA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKGZvbGRMaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLmFkZFJlbW92ZUNoYXJzKGVuZC5yb3csIGVuZC5jb2x1bW4sIHN0YXJ0LmNvbHVtbiAtIGVuZC5jb2x1bW4pO1xuICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5zaGlmdFJvdygtbGVuKTtcblxuICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZExpbmVCZWZvcmUgPSB0aGlzLmdldEZvbGRMaW5lKGZpcnN0Um93KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvbGRMaW5lQmVmb3JlICYmIGZvbGRMaW5lQmVmb3JlICE9PSBmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmVCZWZvcmUubWVyZ2UoZm9sZExpbmUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUgPSBmb2xkTGluZUJlZm9yZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZHggPSBmb2xkTGluZXMuaW5kZXhPZihmb2xkTGluZSkgKyAxO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZvciAoaWR4OyBpZHggPCBmb2xkTGluZXMubGVuZ3RoOyBpZHgrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZExpbmUgPSBmb2xkTGluZXNbaWR4XTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvbGRMaW5lLnN0YXJ0LnJvdyA+PSBlbmQucm93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5zaGlmdFJvdygtbGVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGxhc3RSb3cgPSBmaXJzdFJvdztcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdmFyIGFyZ3MgPSBBcnJheShsZW4pO1xuICAgICAgICAgICAgICAgIGFyZ3MudW5zaGlmdChmaXJzdFJvdywgMCk7XG4gICAgICAgICAgICAgICAgdmFyIGFyciA9IHVzZVdyYXBNb2RlID8gdGhpcy4kd3JhcERhdGEgOiB0aGlzLiRyb3dMZW5ndGhDYWNoZTtcbiAgICAgICAgICAgICAgICBhcnIuc3BsaWNlLmFwcGx5KGFyciwgYXJncyk7XG4gICAgICAgICAgICAgICAgdmFyIGZvbGRMaW5lcyA9IHRoaXMuJGZvbGREYXRhO1xuICAgICAgICAgICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuZ2V0Rm9sZExpbmUoZmlyc3RSb3cpO1xuICAgICAgICAgICAgICAgIHZhciBpZHggPSAwO1xuICAgICAgICAgICAgICAgIGlmIChmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY21wID0gZm9sZExpbmUucmFuZ2UuY29tcGFyZUluc2lkZShzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjbXAgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUgPSBmb2xkTGluZS5zcGxpdChzdGFydC5yb3csIHN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5zaGlmdFJvdyhsZW4pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbGRMaW5lLmFkZFJlbW92ZUNoYXJzKGxhc3RSb3csIDAsIGVuZC5jb2x1bW4gLSBzdGFydC5jb2x1bW4pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNtcCA9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUuYWRkUmVtb3ZlQ2hhcnMoZmlyc3RSb3csIDAsIGVuZC5jb2x1bW4gLSBzdGFydC5jb2x1bW4pO1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUuc2hpZnRSb3cobGVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZHggPSBmb2xkTGluZXMuaW5kZXhPZihmb2xkTGluZSkgKyAxO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGZvciAoaWR4OyBpZHggPCBmb2xkTGluZXMubGVuZ3RoOyBpZHgrKykge1xuICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZExpbmUgPSBmb2xkTGluZXNbaWR4XTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvbGRMaW5lLnN0YXJ0LnJvdyA+PSBmaXJzdFJvdykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sZExpbmUuc2hpZnRSb3cobGVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGxlbiA9IE1hdGguYWJzKGRlbHRhLnN0YXJ0LmNvbHVtbiAtIGRlbHRhLmVuZC5jb2x1bW4pO1xuICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0g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gICAgdGhpcy4kcm93TGVuZ3RoQ2FjaGVbZmlyc3RSb3ddID0gbnVsbDtcbiAgICAgICAgdGhpcy4kcm93TGVuZ3RoQ2FjaGVbbGFzdFJvd10gPSBudWxsO1xuICAgIH07XG5cbiAgICB0aGlzLiR1cGRhdGVXcmFwRGF0YSA9IGZ1bmN0aW9uKGZpcnN0Um93LCBsYXN0Um93KSB7XG4gICAgICAgIHZhciBsaW5lcyA9IHRoaXMuZG9jLmdldEFsbExpbmVzKCk7XG4gICAgICAgIHZhciB0YWJTaXplID0gdGhpcy5nZXRUYWJTaXplKCk7XG4gICAgICAgIHZhciB3cmFwRGF0YSA9IHRoaXMuJHdyYXBEYXRhO1xuICAgICAgICB2YXIgd3JhcExpbWl0ID0gdGhpcy4kd3JhcExpbWl0O1xuICAgICAgICB2YXIgdG9rZW5zO1xuICAgICAgICB2YXIgZm9sZExpbmU7XG5cbiAgICAgICAgdmFyIHJvdyA9IGZpcnN0Um93O1xuICAgICAgICBsYXN0Um93ID0gTWF0aC5taW4obGFzdFJvdywgbGluZXMubGVuZ3RoIC0gMSk7XG4gICAgICAgIHdoaWxlIChyb3cgPD0gbGFzdFJvdykge1xuICAgICAgICAgICAgZm9sZExpbmUgPSB0aGlzLmdldEZvbGRMaW5lKHJvdywgZm9sZExpbmUpO1xuICAgICAgICAgICAgaWYgKCFmb2xkTGluZSkge1xuICAgICAgICAgICAgICAgIHRva2VucyA9IHRoaXMuJGdldERpc3BsYXlUb2tlbnMobGluZXNbcm93XSk7XG4gICAgICAgICAgICAgICAgd3JhcERhdGFbcm93XSA9IHRoaXMuJGNvbXB1dGVXcmFwU3BsaXRzKHRva2Vucywgd3JhcExpbWl0LCB0YWJTaXplKTtcbiAgICAgICAgICAgICAgICByb3cgKys7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRva2VucyA9IFtdO1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lLndhbGsoZnVuY3Rpb24ocGxhY2Vob2xkZXIsIHJvdywgY29sdW1uLCBsYXN0Q29sdW1uKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgd2Fsa1Rva2VucztcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwbGFjZWhvbGRlciAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2Fsa1Rva2VucyA9IHRoaXMuJGdldERpc3BsYXlUb2tlbnMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyLCB0b2tlbnMubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YWxrVG9rZW5zWzBdID0gUExBQ0VIT0xERVJfU1RBUlQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDE7IGkgPCB3YWxrVG9rZW5zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhbGtUb2tlbnNbaV0gPSBQTEFDRUhPTERFUl9CT0RZO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2Fsa1Rva2VucyA9IHRoaXMuJGdldERpc3BsYXlUb2tlbnMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVzW3Jvd10uc3Vic3RyaW5nKGxhc3RDb2x1bW4sIGNvbHVtbiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdG9rZW5zID0gdG9rZW5zLmNvbmNhdCh3YWxrVG9rZW5zKTtcbiAgICAgICAgICAgICAgICAgICAgfS5iaW5kKHRoaXMpLFxuICAgICAgICAgICAgICAgICAgICBmb2xkTGluZS5lbmQucm93L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A9IHdyYXBMaW1pdCA8PSBNYXRoLm1heCgyICogdGFiU2l6ZSwgOClcbiAgICAgICAgICAgIHx8IGluZGVudGVkU29mdFdyYXAgPT09IGZhbHNlID8gMCA6IE1hdGguZmxvb3Iod3JhcExpbWl0IC8gMik7XG5cbiAgICAgICAgZnVuY3Rpb24gZ2V0V3JhcEluZGVudCgpIHtcbiAgICAgICAgICAgIHZhciBpbmRlbnRhdGlvbiA9IDA7XG4gICAgICAgICAgICBpZiAobWF4SW5kZW50ID09PSAwKVxuICAgICAgICAgICAgICAgIHJldHVybiBpbmRlbnRhdGlvbjtcbiAgICAgICAgICAgIGlmIChpbmRlbnRlZFNvZnRXcmFwKSB7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0b2tlbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRva2VuID0gdG9rZW5zW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4gPT0gU1BBQ0UpXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRlbnRhdGlvbiArPSAxO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0b2tlbiA9PSBUQUIpXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRlbnRhdGlvbiArPSB0YWJTaXplO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh0b2tlbiA9PSBUQUJfU1BBQ0UpXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlzQ29kZSAmJiBpbmRlbnRlZFNvZnRXcmFwICE9PSBmYWxzZSlcbiAgICAgICAgICAgICAgICBpbmRlbnRhdGlvbiArPSB0YWJTaXplO1xuICAgICAgICAgICAgcmV0dXJuIE1hdGgubWluKGluZGVudGF0aW9uLCBtYXhJbmRlbnQpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIGFkZFNwbGl0KHNjcmVlblBvcykge1xuICAgICAgICAgICAgdmFyIGRpc3BsYXllZCA9IHRva2Vucy5zbGljZShsYXN0U3BsaXQsIHNjcmVlblBvcyk7XG4gICAgICAgICAgICB2YXIgbGVuID0gZGlzcGxheWVkLmxlbmd0aDtcbiAgICAgICAgICAgIGRpc3BsYXllZC5qb2luKFwiXCIpXG4gICAgICAgICAgICAgICAgLnJlcGxhY2UoLzEyL2csIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICBsZW4gLT0gMTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKC8yL2csIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICBsZW4gLT0gMTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgaWYgKCFzcGxpdHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgaW5kZW50ID0gZ2V0V3JhcEluZGVudCgpO1xuICAgICAgICAgICAgICAgIHNwbGl0cy5pbmRlbnQgPSBpbmRlbnQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsYXN0RG9jU3BsaXQgKz0gbGVuO1xuICAgICAgICAgICAgc3BsaXRzLnB1c2gobGFzdERvY1NwbGl0KTtcbiAgICAgICAgICAgIGxhc3RTcGxpdCA9IHNjcmVlblBvcztcbiAgICAgICAgfVxuICAgICAgICB2YXIgaW5kZW50ID0gMDtcbiAgICAgICAgd2hpbGUgKGRpc3BsYXlMZW5ndGggLSBsYXN0U3BsaXQgPiB3cmFwTGltaXQgLSBpbmRlbnQpIHtcbiAgICAgICAgICAgIHZhciBzcGxpdCA9IGxhc3RTcGxpdCArIHdyYXBMaW1pdCAtIGluZGVudDtcbiAgICAgICAgICAgIGlmICh0b2tlbnNbc3BsaXQgLSAxXSA+PSBTUEFDRSAmJiB0b2tlbnNbc3BsaXRdID49IFNQQUNFKSB7XG4gICAgICAgICAgICAgICAgYWRkU3BsaXQoc3BsaXQpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRva2Vuc1tzcGxpdF0gPT0gUExBQ0VIT0xERVJfU1RBUlQgfHwgdG9rZW5zW3NwbGl0XSA9PSBQTEFDRUhPTERFUl9CT0RZKSB7XG4gICAgICAgICAgICAgICAgZm9yIChzcGxpdDsgc3BsaXQgIT0gbGFzdFNwbGl0IC0gMTsgc3BsaXQtLSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW5zW3NwbGl0XSA9PSBQTEFDRUhPTERFUl9TVEFSVCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNwbGl0ID4gbGFzdFNwbGl0KSB7XG4gICAgICAgICAgICAgICAgICAgIGFkZFNwbGl0KHNwbGl0KTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHNwbGl0ID0gbGFzdFNwbGl0ICsgd3JhcExpbWl0O1xuICAgICAgICAgICAgICAgIGZvciAoc3BsaXQ7IHNwbGl0IDwgdG9rZW5zLmxlbmd0aDsgc3BsaXQrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW5zW3NwbGl0XSAhPSBQTEFDRUhPTERFUl9CT0RZKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoc3BsaXQgPT0gdG9rZW5zLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhazsgIC8vIEJyZWFrcyB0aGUgd2hpbGUtbG9vcC5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYWRkU3BsaXQoc3BsaXQpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIG1pblNwbGl0ID0gTWF0aC5tYXgoc3BsaXQgLSAod3JhcExpbWl0IC0od3JhcExpbWl0Pj4yKSksIGxhc3RTcGxpdCAtIDEpO1xuICAgICAgICAgICAgd2hpbGUgKHNwbGl0ID4gbWluU3BsaXQgJiYgdG9rZW5zW3NwbGl0XSA8IFBMQUNFSE9MREVSX1NUQVJUKSB7XG4gICAgICAgICAgICAgICAgc3BsaXQgLS07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoaXNDb2RlKSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHNwbGl0ID4gbWluU3BsaXQgJiYgdG9rZW5zW3NwbGl0XSA8IFBMQUNFSE9MREVSX1NUQVJUKSB7XG4gICAgICAgICAgICAgICAgICAgIHNwbGl0IC0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB3aGlsZSAoc3BsaXQgPiBtaW5TcGxpdCAmJiB0b2tlbnNbc3BsaXRdID09IFBVTkNUVUFUSU9OKSB7XG4gICAgICAgICAgICAgICAgICAgIHNwbGl0IC0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHNwbGl0ID4gbWluU3BsaXQgJiYgdG9rZW5zW3NwbGl0XSA8IFNQQUNFKSB7XG4gICAgICAgICAgICAgICAgICAgIHNwbGl0IC0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzcGxpdCA+IG1pblNwbGl0KSB7XG4gICAgICAgICAgICAgICAgYWRkU3BsaXQoKytzcGxpdCk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzcGxpdCA9IGxhc3RTcGxpdCArIHdyYXBMaW1pdDtcbiAgICAgICAgICAgIGlmICh0b2tlbnNbc3BsaXRdID09IENIQVJfRVhUKVxuICAgICAgICAgICAgICAgIHNwbGl0LS07XG4gICAgICAgICAgICBhZGRTcGxpdChzcGxpdCAtIGluZGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNwbGl0cztcbiAgICB9O1xuICAgIHRoaXMuJGdldERpc3BsYXlUb2tlbnMgPSBmdW5jdGlvbihzdHIsIG9mZnNldCkge1xuICAgICAgICB2YXIgYXJyID0gW107XG4gICAgICAgIHZhciB0YWJTaXplO1xuICAgICAgICBvZmZzZXQgPSBvZmZzZXQgfHwgMDtcblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0ci5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGMgPSBzdHIuY2hhckNvZGVBdChpKTtcbiAgICAgICAgICAgIGlmIChjID09IDkpIHtcbiAgICAgICAgICAgICAgICB0YWJTaXplID0gdGhpcy5nZXRTY3JlZW5UYWJTaXplKGFyci5sZW5ndGggKyBvZmZzZXQpO1xuICAgICAgICAgICAgICAgIGFyci5wdXNoKFRBQik7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgbiA9IDE7IG4gPCB0YWJTaXplOyBuKyspIHtcbiAgICAgICAgICAgICAgICAgICAgYXJyLnB1c2goVEFCX1NQQUNFKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID09IDMyKSB7XG4gICAgICAgICAgICAgICAgYXJyLnB1c2goU1BBQ0UpO1xuICAgICAgICAgICAgfSBlbHNlIGlmKChjID4gMzkgJiYgYyA8IDQ4KSB8fCAoYyA+IDU3ICYmIGMgPCA2NCkpIHtcbiAgICAgICAgICAgICAgICBhcnIucHVzaChQVU5DVFVBVElPTik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChjID49IDB4MTEwMCAmJiBpc0Z1bGxXaWR0aChjKSkge1xuICAgICAgICAgICAgICAgIGFyci5wdXNoKENIQVIsIENIQVJfRVhUKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgYXJyLnB1c2goQ0hBUik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGFycjtcbiAgICB9O1xuICAgIHRoaXMuJGdldFN0cmluZ1NjcmVlbldpZHRoID0gZnVuY3Rpb24oc3RyLCBtYXhTY3JlZW5Db2x1bW4sIHNjcmVlbkNvbHVtbikge1xuICAgICAgICBpZiAobWF4U2NyZWVuQ29sdW1uID09IDApXG4gICAgICAgICAgICByZXR1cm4gWzAsIDBdO1xuICAgICAgICBpZiAobWF4U2NyZWVuQ29sdW1uID09IG51bGwpXG4gICAgICAgICAgICBtYXhTY3JlZW5Db2x1bW4gPSBJbmZpbml0eTtcbiAgICAgICAgc2NyZWVuQ29sdW1uID0gc2NyZWVuQ29sdW1uIHx8IDA7XG5cbiAgICAgICAgdmFyIGMsIGNvbHVtbjtcbiAgICAgICAgZm9yIChjb2x1bW4gPSAwOyBjb2x1bW4gPCBzdHIubGVuZ3RoOyBjb2x1bW4rKykge1xuICAgICAgICAgICAgYyA9IHN0ci5jaGFyQ29kZUF0KGNvbHVtbik7XG4gICAgICAgICAgICBpZiAoYyA9PSA5KSB7XG4gICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uICs9IHRoaXMuZ2V0U2NyZWVuVGFiU2l6ZShzY3JlZW5Db2x1bW4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoYyA+PSAweDExMDAgJiYgaXNGdWxsV2lkdGgoYykpIHtcbiAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gKz0gMjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uICs9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoc2NyZWVuQ29sdW1uID4gbWF4U2NyZWVuQ29sdW1uKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gW3NjcmVlbkNvbHVtbiwgY29sdW1uXTtcbiAgICB9O1xuXG4gICAgdGhpcy5saW5lV2lkZ2V0cyA9IG51bGw7XG4gICAgdGhpcy5nZXRSb3dMZW5ndGggPSBmdW5jdGlvbihyb3cpIHtcbiAgICAgICAgaWYgKHRoaXMubGluZVdpZGdldHMpXG4gICAgICAgICAgICB2YXIgaCA9IHRoaXMubGluZVdpZGdldHNbcm93XSAmJiB0aGlzLmxpbmVXaWRnZXRzW3Jvd10ucm93Q291bnQgfHwgMDtcbiAgICAgICAgZWxzZSBcbiAgICAgICAgICAgIGggPSAwO1xuICAgICAgICBpZiAoIXRoaXMuJHVzZVdyYXBNb2RlIHx8ICF0aGlzLiR3cmFwRGF0YVtyb3ddKSB7XG4gICAgICAgICAgICByZXR1cm4gMSArIGg7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy4kd3JhcERhdGFbcm93XS5sZW5ndGggKyAxICsgaDtcbiAgICAgICAgfVxuICAgIH07XG4gICAgdGhpcy5nZXRSb3dMaW5lQ291bnQgPSBmdW5jdGlvbihyb3cpIHtcbiAgICAgICAgaWYgKCF0aGlzLiR1c2VXcmFwTW9kZSB8fCAhdGhpcy4kd3JhcERhdGFbcm93XSkge1xuICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy4kd3JhcERhdGFbcm93XS5sZW5ndGggKyAxO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Um93V3JhcEluZGVudCA9IGZ1bmN0aW9uKHNjcmVlblJvdykge1xuICAgICAgICBpZiAodGhpcy4kdXNlV3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Um93KTtcbiAgICAgICAgICAgIGlmIChyb3cgKyByb3dMZW5ndGggPiBzY3JlZW5Sb3cgfHwgZG9jUm93ID49IG1heFJvdykge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByb3cgKz0gcm93TGVuZ3RoO1xuICAgICAgICAgICAgICAgIGRvY1JvdysrO1xuICAgICAgICAgICAgICAgIGlmIChkb2NSb3cgPiBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgZG9jUm93ID0gZm9sZExpbmUuZW5kLnJvdysxO1xuICAgICAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuZ2V0TmV4dEZvbGRMaW5lKGRvY1JvdywgZm9sZExpbmUpO1xuICAgICAgICAgICAgICAgICAgICBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6IEluZmluaXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGRvQ2FjaGUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLiRkb2NSb3dDYWNoZS5wdXNoKGRvY1Jvdyk7XG4gICAgICAgICAgICAgICAgdGhpcy4kc2NyZWVuUm93Q2FjaGUucHVzaChyb3cpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvbGRMaW5lICYmIGZvbGRMaW5lLnN0YXJ0LnJvdyA8PSBkb2NSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSB0aGlzLmdldEZvbGREaXNwbGF5TGluZShmb2xkTGluZSk7XG4gICAgICAgICAgICBkb2NSb3cgPSBmb2xkTGluZS5zdGFydC5yb3c7XG4gICAgICAgIH0gZWxzZSBpZiAocm93ICsgcm93TGVuZ3RoIDw9IHNjcmVlblJvdyB8fCBkb2NSb3cgPiBtYXhSb3cpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgcm93OiBtYXhSb3csXG4gICAgICAgICAgICAgICAgY29sdW1uOiB0aGlzLmdldExpbmUobWF4Um93KS5sZW5ndGhcbiAgICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsaW5lID0gdGhpcy5nZXRMaW5lKGRvY1Jvdyk7XG4gICAgICAgICAgICBmb2xkTGluZSA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHdyYXBJbmRlbnQgPSAwLCBzcGxpdEluZGV4ID0gTWF0aC5mbG9vcihzY3JlZW5Sb3cgLSByb3cpO1xuICAgICAgICBpZiAodGhpcy4kdXNlV3JhcE1vZGUpIHtcbiAgICAgICAgICAgIHZhciBzcGxpdHMgPSB0aGlzLiR3cmFwRGF0YVtkb2NSb3ddO1xuICAgICAgICAgICAgaWYgKHNwbGl0cykge1xuICAgICAgICAgICAgICAgIGNvbHVtbiA9IHNwbGl0c1tzcGxpdEluZGV4XTtcbiAgICAgICAgICAgICAgICBpZihzcGxpdEluZGV4ID4gMCAmJiBzcGxpdHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHdyYXBJbmRlbnQgPSBzcGxpdHMuaW5kZW50O1xuICAgICAgICAgICAgICAgICAgICBkb2NDb2x1bW4gPSBzcGxpdHNbc3BsaXRJbmRleCAtIDFdIHx8IHNwbGl0c1tzcGxpdHMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICAgICAgICAgIGxpbmUgPSBsaW5lLnN1YnN0cmluZyhkb2NDb2x1bW4pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChvZmZzZXRYICE9PSB1bmRlZmluZWQgJiYgdGhpcy4kYmlkaUhhbmRsZXIuaXNCaWRpUm93KHJvdyArIHNwbGl0SW5kZXgsIGRvY1Jvdywgc3BsaXRJbmRleCkpXG4gICAgICAgICAgICBzY3JlZW5Db2x1bW4g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Q29sdW1uLCAxKTtcbiAgICAgICAgaWYgKGZvbGQpIHtcbiAgICAgICAgICAgIGRvY1JvdyA9IGZvbGQuc3RhcnQucm93O1xuICAgICAgICAgICAgZG9jQ29sdW1uID0gZm9sZC5zdGFydC5jb2x1bW47XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcm93RW5kLCByb3cgPSAwO1xuXG5cbiAgICAgICAgdmFyIHJvd0NhY2hlID0gdGhpcy4kZG9jUm93Q2FjaGU7XG4gICAgICAgIHZhciBpID0gdGhpcy4kZ2V0Um93Q2FjaGVJbmRleChyb3dDYWNoZSwgZG9jUm93KTtcbiAgICAgICAgdmFyIGwgPSByb3dDYWNoZS5sZW5ndGg7XG4gICAgICAgIGlmIChsICYmIGkgPj0gMCkge1xuICAgICAgICAgICAgdmFyIHJvdyA9IHJvd0NhY2hlW2ldO1xuICAgICAgICAgICAgdmFyIHNjcmVlblJvdyA9IHRoaXMuJHNjcmVlblJvd0NhY2hlW2ldO1xuICAgICAgICAgICAgdmFyIGRvQ2FjaGUgPSBkb2NSb3cgPiByb3dDYWNoZVtsIC0gMV07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICB2YXIgZG9DYWNoZSA9ICFsO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5nZXROZXh0Rm9sZExpbmUocm93KTtcbiAgICAgICAgdmFyIGZvbGRTdGFydCA9IGZvbGRMaW5lID9mb2xkTGluZS5zdGFydC5yb3cgOkluZmluaXR5O1xuXG4gICAgICAgIHdoaWxlIChyb3cgPCBkb2NSb3cpIHtcbiAgICAgICAgICAgIGlmIChyb3cgPj0gZm9sZFN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgcm93RW5kID0gZm9sZExpbmUuZW5kLnJvdyArIDE7XG4gICAgICAgICAgICAgICAgaWYgKHJvd0VuZCA+IGRvY1JvdylcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgZm9sZExpbmUgPSB0aGlzLmdldE5leHRGb2xkTGluZShyb3dFbmQsIGZvbGRMaW5lKTtcbiAgICAgICAgICAgICAgICBmb2xkU3RhcnQgPSBmb2xkTGluZSA/Zm9sZExpbmUuc3RhcnQucm93IDpJbmZpbml0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHJvd0VuZCA9IHJvdyArIDE7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHNjcmVlblJvdyArPSB0aGlzLmdldFJvd0xlbmd0aChyb3cpO1xuICAgICAgICAgICAgcm93ID0gcm93RW5kO1xuXG4gICAgICAgICAgICBpZiAoZG9DYWNoZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuJGRvY1Jvd0NhY2hlLnB1c2gocm93KTtcbiAgICAgICAgICAgICAgICB0aGlzLiRzY3JlZW5Sb3dDYWNoZS5wdXNoKHNjcmVlblJvdyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHRleHRMaW5lID0gXCJcIjtcbiAgICAgICAgaWYgKGZvbGRMaW5lICYmIHJvdyA+PSBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgIHRleHRMaW5lID0gdGhpcy5nZXRGb2xkRGlzcGxheUxpbmUoZm9sZExpbmUsIGRvY1JvdywgZG9jQ29sdW1uKTtcbiAgICAgICAgICAgIGZvbGRTdGFydFJvdyA9IGZvbGRMaW5lLnN0YXJ0LnJvdztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRleHRMaW5lID0gdGhpcy5nZXRMaW5lKGRvY1Jvdykuc3Vic3RyaW5nKDAsIGRvY0NvbHVtbik7XG4gICAgICAgICAgICBmb2xkU3RhcnRSb3cgPSBkb2NSb3c7XG4gICAgICAgIH1cbiAgICAgICAgdmFyIHdyYXBJbmRlbnQgPSAwO1xuICAgICAgICBpZiAodGhpcy4kdXNlV3JhcE1vZGUpIHtcbiAgICAgICAgICAgIHZhciB3cmFwUm93ID0gdGhpcy4kd3JhcERhdGFbZm9sZFN0YXJ0Um93XTtcbiAgICAgICAgICAgIGlmICh3cmFwUm93KSB7XG4gICAgICAgICAgICAgICAgdmFyIHNjcmVlblJvd09mZnNldCA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHRleHRMaW5lLmxlbmd0aCA+PSB3cmFwUm93W3NjcmVlblJvd09mZnNldF0pIHtcbiAgICAgICAgICAgICAgICAgICAgc2NyZWVuUm93ICsrO1xuICAgICAgICAgICAgICAgICAgICBzY3JlZW5Sb3dPZmZzZXQrKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGV4dExpbmUgPSB0ZXh0TGluZS5zdWJzdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgIHdyYXBSb3dbc2NyZWVuUm93T2Zmc2V0IC0gMV0gfHwgMCwgdGV4dExpbmUubGVuZ3RoXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB3cmFwSW5kZW50ID0gc2NyZWVuUm93T2Zmc2V0ID4gMCA/IHdyYXBSb3cuaW5kZW50IDogMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByb3c6IHNjcmVlblJvdyxcbiAgICAgICAgICAgIGNvbHVtbjogd3JhcEluZGVudCArIHRoaXMuJGdldFN0cmluZ1NjcmVlbldpZHRoKHRleHRMaW5lKVswXVxuICAgICAgICB9O1xuICAgIH07XG4gICAgdGhpcy5kb2N1bWVudFRvU2NyZWVuQ29sdW1uID0gZnVuY3Rpb24ocm93LCBkb2NDb2x1bW4pIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuZG9jdW1lbnRUb1NjcmVlblBvc2l0aW9uKHJvdywgZG9jQ29sdW1uKS5jb2x1bW47XG4gICAgfTtcbiAgICB0aGlzLmRvY3VtZW50VG9TY3JlZW5Sb3cgPSBmdW5jdGlvbihkb2NSb3csIGR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iAgICAgICAgICAgICAgICByb3cgKys7XG4gICAgICAgICAgICAgICAgaWYgKHJvdyA+IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBmb2xkLmVuZC5yb3crMTtcbiAgICAgICAgICAgICAgICAgICAgZm9sZCA9IHRoaXMuJGZvbGREYXRhW2krK107XG4gICAgICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGQgP2ZvbGQuc3RhcnQucm93IDpJbmZpbml0eTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMubGluZVdpZGdldHMpXG4gICAgICAgICAgICBzY3JlZW5Sb3dzICs9IHRoaXMuJGdldFdpZGdldFNjcmVlbkxlbmd0aCgpO1xuXG4gICAgICAgIHJldHVybiBzY3JlZW5Sb3dzO1xuICAgIH07XG4gICAgdGhpcy4kc2V0Rm9udE1ldHJpY3MgPSBmdW5jdGlvbihmbSkge1xuICAgICAgICBpZiAoIXRoaXMuJGVuYWJsZVZhckNoYXIpIHJldHVybjtcbiAgICAgICAgdGhpcy4kZ2V0U3RyaW5nU2NyZWVuV2lkdGggPSBmdW5jdGlvbihzdHIsIG1heFNjcmVlbkNvbHVtbiwgc2NyZWVuQ29sdW1uKSB7XG4gICAgICAgICAgICBpZiAobWF4U2NyZWVuQ29sdW1uID09PSAwKVxuICAgICAgICAgICAgICAgIHJldHVybiBbMCwgMF07XG4gICAgICAgICAgICBpZiAoIW1heFNjcmVlbkNvbHVtbilcbiAgICAgICAgICAgICAgICBtYXhTY3JlZW5Db2x1bW4gPSBJbmZpbml0eTtcbiAgICAgICAgICAgIHNjcmVlbkNvbHVtbiA9IHNjcmVlbkNvbHVtbiB8fCAwO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgYywgY29sdW1uO1xuICAgICAgICAgICAgZm9yIChjb2x1bW4gPSAwOyBjb2x1bW4gPCBzdHIubGVuZ3RoOyBjb2x1bW4rKykge1xuICAgICAgICAgICAgICAgIGMgPSBzdHIuY2hhckF0KGNvbHVtbik7XG4gICAgICAgICAgICAgICAgaWYgKGMgPT09IFwiXFx0XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uICs9IHRoaXMuZ2V0U2NyZWVuVGFiU2l6ZShzY3JlZW5Db2x1bW4pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiArPSBmbS5nZXRDaGFyYWN0ZXJXaWR0aChjKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNjcmVlbkNvbHVtbiA+IG1heFNjcmVlbkNvbHVtbikge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHJldHVybiBbc2NyZWVuQ29sdW1uLCBjb2x1bW5dO1xuICAgICAgICB9O1xuICAgIH07XG4gICAgXG4gICAgdGhpcy5kZXN0cm95ID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIGlmICh0aGlzLmJnVG9rZW5pemVyKSB7XG4gICAgICAgICAgICB0aGlzLmJnVG9rZW5pemVyLnNldERvY3VtZW50KG51bGwpO1xuICAgICAgICAgICAgdGhpcy5iZ1Rva2VuaXplciA9IG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy4kc3RvcFdvcmtlcigpO1xuICAgIH07XG5cbiAgICB0aGlzLmlzRnVsbFdpZHRoID0gaXNGdWxsV2lkdGg7XG4gICAgZnVuY3Rpb24gaXNGdWxsV2lkdGgoYykge1xuICAgICAgICBpZiAoYyA8IDB4MTEwMClcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgcmV0dXJuIGMgPj0gMHgxMTAwICYmIGMgPD0gMHgxMTVGIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MTFBMyAmJiBjIDw9IDB4MTFBNyB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDExRkEgJiYgYyA8PSAweDExRkYgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgyMzI5ICYmIGMgPD0gMHgyMzJBIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MkU4MCAmJiBjIDw9IDB4MkU5OSB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDJFOUIgJiYgYyA8PSAweDJFRjMgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgyRjAwICYmIGMgPD0gMHgyRkQ1IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MkZGMCAmJiBjIDw9IDB4MkZGQiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMwMDAgJiYgYyA8PSAweDMwM0UgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMDQxICYmIGMgPD0gMHgzMDk2IHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzA5OSAmJiBjIDw9IDB4MzBGRiB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMxMDUgJiYgYyA8PSAweDMxMkQgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMTMxICYmIGMgPD0gMHgzMThFIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzE5MCAmJiBjIDw9IDB4MzFCQSB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMxQzAgJiYgYyA8PSAweDMxRTMgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMUYwICYmIGMgPD0gMHgzMjFFIHx8XG4gICAgICAgICAgICAgICBjID49IDB4MzIyMCAmJiBjIDw9IDB4MzI0NyB8fFxuICAgICAgICAgICAgICAgYyA+PSAweDMyNTAgJiYgYyA8PSAweDMyRkUgfHxcbiAgICAgICAgICAgICAgIGMgPj0gMHgzMzAwICYmIGMgPD0gMHg0REJGIHx8XG4gICAgICAgICAgICAgICBjID49IDB4NEUwMCAmJiBjIDw9IDB4QTQ4QyB8fFxuICAgICAgICAgICAgICA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5jdGlvbih2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKCF2YWx1ZSB8fCB2YWx1ZSA9PSBcIm9mZlwiKVxuICAgICAgICAgICAgICAgIHZhbHVlID0gZmFsc2U7XG4gICAgICAgICAgICBlbHNlIGlmICh2YWx1ZSA9PSBcImZyZWVcIilcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHRydWU7XG4gICAgICAgICAgICBlbHNlIGlmICh2YWx1ZSA9PSBcInByaW50TWFyZ2luXCIpXG4gICAgICAgICAgICAgICAgdmFsdWUgPSAtMTtcbiAgICAgICAgICAgIGVsc2UgaWYgKHR5cGVvZiB2YWx1ZSA9PSBcInN0cmluZ1wiKVxuICAgICAgICAgICAgICAgIHZhbHVlID0gcGFyc2VJbnQodmFsdWUsIDEwKSB8fCBmYWxzZTtcblxuICAgICAgICAgICAgaWYgKHRoaXMuJHdyYXAgPT0gdmFsdWUpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgdGhpcy4kd3JhcCA9IHZhbHVlO1xuICAgICAgICAgICAgaWYgKCF2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0VXNlV3JhcE1vZGUoZmFsc2UpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB2YXIgY29sID0gdHlwZW9mIHZhbHVlID09IFwibnVtYmVyXCIgPyB2YWx1ZSA6IG51bGw7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRXcmFwTGltaXRSYW5nZShjb2wsIGNvbCk7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXRVc2VXcmFwTW9kZSh0cnVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmdldFVzZVdyYXBNb2RlKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy4kd3JhcCA9PSAtMSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicHJpbnRNYXJnaW5cIjtcbiAgICAgICAgICAgICAgICBpZiAoIXRoaXMuZ2V0V3JhcExpbWl0UmFuZ2UoKS5taW4pXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcImZyZWVcIjtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy4kd3JhcDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBcIm9mZlwiO1xuICAgICAgICB9LFxuICAgICAgICBoYW5kbGVzU2V0OiB0cnVlXG4gICAgfSwgICAgXG4gICAgd3JhcE1ldGhvZDoge1xuICAgICAgICBzZXQ6IGZ1bmN0aW9uKHZhbCkge1xuICAgICAgICAgICAgdmFsID0gdmFsID09IFwiYXV0b1wiXG4gICAgICAgICAgICAgICAgPyB0aGlzLiRtb2RlLnR5cGUgIT0gXCJ0ZXh0XCJcbiAgICAgICAgICAgICAgICA6IHZhbCAhPSBcInRleHRcIjtcbiAgICAgICAgICAgIGlmICh2YWwgIT0gdGhpcy4kd3JhcEFzQ29kZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuJHdyYXBBc0NvZGUgPSB2YWw7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuJHVzZVdyYXBNb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuJG1vZGlmaWVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kcmVzZXRSb3dDYWNoZSgwKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy4kdXBkYXRlV3JhcERhdGEoMCwgdGhpcy5nZXRMZW5ndGgoKSAtIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaW5pdGlhbFZhbHVlOiBcImF1dG9cIlxuICAgIH0sXG4gICAgaW5kZW50ZWRTb2Z0V3JhcDogeyBpbml0aWFsVmFsdWU6IHRydWUgfSxcbiAgICBmaXJzdExpbmVOdW1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gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4gZmlyc3RSYW5nZTtcbiAgICB9O1xuICAgIHRoaXMuZmluZEFsbCA9IGZ1bmN0aW9uKHNlc3Npb24pIHtcbiAgICAgICAgdmFyIG9wdGlvbnMgPSB0aGlzLiRvcHRpb25zO1xuICAgICAgICBpZiAoIW9wdGlvbnMubmVlZGxlKVxuICAgICAgICAgICAgcmV0dXJuIFtdO1xuICAgICAgICB0aGlzLiRhc3NlbWJsZVJlZ0V4cChvcHRpb25zKTtcblxuICAgICAgICB2YXIgcmFuZ2UgPSBvcHRpb25zLnJhbmdlO1xuICAgICAgICB2YXIgbGluZXMgPSByYW5nZVxuICAgICAgICAgICAgPyBzZXNzaW9uLmdldExpbmVzKHJhbmdlLnN0YXJ0LnJvdywgcmFuZ2UuZW5kLnJvdylcbiAgICAgICAgICAgIDogc2Vzc2lvbi5kb2MuZ2V0QWxsTGluZXMoKTtcblxuICAgICAgICB2YXIgcmFuZ2VzID0gW107XG4gICAgICAgIHZhciByZSA9IG9wdGlvbnMucmU7XG4gICAgICAgIGlmIChvcHRpb25zLiRpc011bHRpTGluZSkge1xuICAgICAgICAgICAgdmFyIGxlbiA9IHJlLmxlbmd0aDtcbiAgICAgICAgICAgIHZhciBtYXhSb3cgPSBsaW5lcy5sZW5ndGggLSBsZW47XG4gICAgICAgICAgICB2YXIgcHJldlJhbmdlO1xuICAgICAgICAgICAgb3V0ZXI6IGZvciAodmFyIHJvdyA9IHJlLm9mZnNldCB8fCAwOyByb3cgPD0gbWF4Um93OyByb3crKykge1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgbGVuOyBqKyspXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaW5lc1tyb3cgKyBqXS5zZWFyY2gocmVbal0pID09IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWUgb3V0ZXI7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgdmFyIHN0YXJ0TGluZSA9IGxpbmVzW3Jvd107XG4gICAgICAgICAgICAgICAgdmFyIGxpbmUgPSBsaW5lc1tyb3cgKyBsZW4gLSAxXTtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnRJbmRleCA9IHN0YXJ0TGluZS5sZW5ndGggLSBzdGFydExpbmUubWF0Y2gocmVbMF0pWzBdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB2YXIgZW5kSW5kZXggPSBsaW5lLm1hdGNoKHJlW2xlbiAtIDFdKVswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKHByZXZSYW5nZSAmJiBwcmV2UmFuZ2UuZW5kLnJvdyA9PT0gcm93ICYmXG4gICAgICAgICAgICAgICAgICAgIHByZXZSYW5nZS5lbmQuY29sdW1uID4gc3RhcnRJbmRleFxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmFuZ2VzLnB1c2gocHJldlJhbmdlID0gbmV3IFJhbmdlKFxuICAgICAgICAgICAgICAgICAgICByb3csIHN0YXJ0SW5kZXgsIHJvdyArIGxlbiAtIDEsIGVuZEluZGV4XG4gICAgICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICAgICAgaWYgKGxlbiA+IDIpXG4gICAgICAgICAgICAgICAgICAgIHJvdyA9IHJvdyArIGxlbiAtIDI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpbmVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdmFyIG1hdGNoZXMgPSBsYW5nLmdldE1hdGNoT2Zmc2V0cyhsaW5lc1tpXSwgcmUpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDw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ucm93ICs9IHJhbmdlLnN0YXJ0LnJvdztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByYW5nZXM7XG4gICAgfTtcbiAgICB0aGlzLnJlcGxhY2UgPSBmdW5jdGlvbihpbnB1dCwgcmVwbGFjZW1lbnQpIHtcbiAgICAgICAgdmFyIG9wdGlvbnMgPSB0aGlzLiRvcHRpb25zO1xuXG4gICAgICAgIHZhciByZSA9IHRoaXMuJGFzc2VtYmxlUmVnRXhwKG9wdGlvbnMpO1xuICAgICAgICBpZiAob3B0aW9ucy4kaXNNdWx0aUxpbmUpXG4gICAgICAgICAgICByZXR1cm4gcmVwbGFjZW1lbnQ7XG5cbiAgICAgICAgaWYgKCFyZSlcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgbWF0Y2ggPSByZS5leGVjKGlucHV0KTtcbiAgICAgICAgaWYgKCFtYXRjaCB8fCBtYXRjaFswXS5sZW5ndGggIT0gaW5wdXQubGVuZ3RoKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIFxuICAgICAgICByZXBsYWNlbWVudCA9IGlucHV0LnJlcGxhY2UocmUsIHJlcGxhY2VtZW50KTtcbiAgICAgICAgaWYgKG9wdGlvbnMucHJlc2VydmVDYXNlKSB7XG4gICAgICAgICAgICByZXBsYWNlbWVudCA9IHJlcGxhY2VtZW50LnNwbGl0KFwiXCIpO1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IE1hdGgubWluKGlucHV0Lmxlbmd0aCwgaW5wdXQubGVuZ3RoKTsgaS0tOyApIHtcbiAgICAgICAgICAgICAgICB2YXIgY2ggPSBpbnB1dFtpXTtcbiAgICAgICAgICAgICAgICBpZiAoY2ggJiYgY2gudG9Mb3dlckNhc2UoKSAhPSBjaClcbiAgICAgICAgICAgICAgICAgICAgcmVwbGFjZW1lbnRbaV0gPSByZXBsYWNlbWVudFtpXS50b1VwcGVyQ2FzZSgpO1xuICAgICAgICA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ID09IHRydWU7XG4gICAgICAgIHZhciBza2lwQ3VycmVudCA9IG9wdGlvbnMuc2tpcEN1cnJlbnQgIT0gZmFsc2U7XG5cbiAgICAgICAgdmFyIHJhbmdlID0gb3B0aW9ucy5yYW5nZTtcbiAgICAgICAgdmFyIHN0YXJ0ID0gb3B0aW9ucy5zdGFydDtcbiAgICAgICAgaWYgKCFzdGFydClcbiAgICAgICAgICAgIHN0YXJ0ID0gcmFuZ2UgPyByYW5nZVtiYWNrd2FyZHMgPyBcImVuZFwiIDogXCJzdGFydFwiXSA6IHNlc3Npb24uc2VsZWN0aW9uLmdldFJhbmdlKCk7XG4gICAgICAgICBcbiAgICAgICAgaWYgKHN0YXJ0LnN0YXJ0KVxuICAgICAgICAgICAgc3RhcnQgPSBzdGFydFtza2lwQ3VycmVudCAhPSBiYWNrd2FyZHMgPyBcImVuZFwiIDogXCJzdGFydFwiXTtcblxuICAgICAgICB2YXIgZmlyc3RSb3cgPSByYW5nZSA/IHJhbmdlLnN0YXJ0LnJvdyA6IDA7XG4gICAgICAgIHZhciBsYXN0Um93ID0gcmFuZ2UgPyByYW5nZS5lbmQucm93IDogc2Vzc2lvbi5nZXRMZW5ndGgoKSAtIDE7XG5cbiAgICAgICAgaWYgKGJhY2t3YXJkcykge1xuICAgICAgICAgICAgdmFyIGZvckVhY2ggPSBmdW5jdGlvbihjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHZhciByb3cgPSBzdGFydC5yb3c7XG4gICAgICAgICAgICAgICAgaWYgKGZvckVhY2hJbkxpbmUocm93LCBzdGFydC5jb2x1bW4sIGNhbGxiYWNrKSlcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGZvciAocm93LS07IHJvdyA+PSBmaXJzdFJvdzsgcm93LS0pXG4gICAgICAgICAgICAgICAgICAgIGlmIChmb3JFYWNoSW5MaW5lKHJvdywgTnVtYmVyLk1BWF9WQUxVRSwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLndyYXAgPT0gZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBmb3IgKHJvdyA9IGxhc3RSb3csIGZpcnN0Um93ID0gc3RhcnQucm93OyByb3cgPj0gZmlyc3RSb3c7IHJvdy0tKVxuICAgICAgICAgICAgICAgICAgICBpZiAoZm9yRWFjaEluTGluZShyb3csIE51bWJlci5NQVhfVkFMVUUsIGNhbGxiYWNrKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB2YXIgZm9yRWFjaCA9IGZ1bmN0aW9uKGNhbGxiYWNrKSB7XG4gICAgICAgICAgICAgICAgdmFyIHJvdyA9IHN0YXJ0LnJvdztcbiAgICAgICAgICAgICAgICBpZiAoZm9yRWFjaEluTGluZShyb3csIHN0YXJ0LmNvbHVtbiwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgZm9yIChyb3cgPSByb3cgKyAxOyByb3cgPD0gbGFzdFJvdzsgcm93KyspXG4gICAgICAgICAgICAgICAgICAgIGlmIChmb3JFYWNoSW5MaW5lKHJvdywgMCwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLndyYXAgPT0gZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICBmb3IgKHJvdyA9IGZpcnN0Um93LCBsYXN0Um93ID0gc3RhcnQucm93OyByb3cgPD0gbGFzdFJvdzsgcm93KyspXG4gICAgICAgICAgICAgICAgICAgIGlmIChmb3JFYWNoSW5MaW5lKHJvdywgMCwgY2FsbGJhY2spKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgaWYgKG9wdGlvbnMuJGlzTXVsdGlMaW5lKSB7XG4gICAgICAgICAgICB2YXIgbGVuID0gcmUubGVuZ3RoO1xuICAgICAgICAgICAgdmFyIGZvckVhY2hJbkxpbmUgPSBmdW5jdGlvbihyb3csIG9mZnNldCwgY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICB2YXIgc3RhcnRSb3cgPSBiYWNrd2FyZHMgPyByb3cgLSBsZW4gKyAxIDogcm93O1xuICAgICAgICAgICAgICAgIGlmIChzdGFydFJvdyA8IDApIHJldHVybjtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShzdGFydFJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIHN0YXJ0SW5kZXggPSBsaW5lLnNlYXJjaChyZVswXSk7XG4gICAgICAgICAgICAgICAgaWYgKCFiYWNrd2FyZHMgJiYgc3RhcnRJbmRleCA8IG9mZnNldCB8fCBzdGFydEluZGV4ID09PSAtMSkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgbGVuOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShzdGFydFJvdyArIGkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobGluZS5zZWFyY2gocmVbaV0pID09IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgZW5kSW5kZXggPSBsaW5lLm1hdGNoKHJlW2xlbiAtIDFdKVswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWYgKGJhY2t3YXJkcyAmJiBlbmRJbmRleCA+IG9mZnNldCkgcmV0dXJuO1xuICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjayhzdGFydFJvdywgc3RhcnRJbmRleCwgc3RhcnRSb3cgKyBsZW4gLSAxLCBlbmRJbmRleCkpXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChiYWNrd2FyZHMpIHtcbiAgICAgICAgICAgIHZhciBmb3JFYWNoSW5MaW5lID0gZnVuY3Rpb24ocm93LCBlbmRJbmRleCwgY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGVzID0gW107XG4gICAgICAgICAgICAgICAgdmFyIG0sIGxhc3QgPSAwO1xuICAgICAgICAgICAgICAgIHJlLmxhc3RJbmRleCA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUoKG0gPSByZS5leGVjKGxpbmUpKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gbVswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIGxhc3QgPSBtLmluZGV4O1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhc3QgPj0gbGluZS5sZW5ndGgpIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmUubGFzdEluZGV4ID0gbGFzdCArPSAxO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChtLmluZGV4ICsgbGVuZ3RoID4gZW5kSW5kZXgpXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlcy5wdXNoKG0uaW5kZXgsIGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSBtYXRjaGVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgaSAtPSAyKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb2x1bW4gPSBtYXRjaGVzW2kgLSAxXTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxlbmd0aCA9IG1hdGNoZXNbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjayhyb3csIGNvbHVtbiwgcm93LCBjb2x1bW4gKyBsZW5ndGgpKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHZhciBmb3JFYWNoSW5MaW5lID0gZnVuY3Rpb24ocm93LCBzdGFydEluZGV4LCBjYWxsYmFjaykge1xuICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIG07XG4gICAgICAgICAgICAgICAgdmFyIGxhc3QgPSBzdGFydEluZGV4O1xuICAgICAgICAgICAgICAgIHJlLmxhc3RJbmRleCA9IHN0YXJ0SW5kZXg7XG4gICAgICAgICAgICAgICAgd2hpbGUoKG0gPSByZS5leGVjKGxpbmUpKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGVuZ3RoID0gbVswXS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIGxhc3QgPSBtLmluZGV4O1xuICAgICAgICAgICAgICAgICAgICBpZiAoY2FsbGJhY2socm93LCBsYXN0LCByb3csbGFzdCArIGxlbmd0aCkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlLmxhc3RJbmRleCA9IGxhc3QgKz0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0ID49IGxpbmUubGVuZ3RoKSByZXR1cm4gZmFs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uY29tbWFuZHNbbmFtZV07XG4gICAgICAgIGlmICgha2VlcENvbW1hbmQpXG4gICAgICAgICAgICBkZWxldGUgdGhpcy5jb21tYW5kc1tuYW1lXTtcbiAgICAgICAgdmFyIGNrYiA9IHRoaXMuY29tbWFuZEtleUJpbmRpbmc7XG4gICAgICAgIGZvciAodmFyIGtleUlkIGluIGNrYikge1xuICAgICAgICAgICAgdmFyIGNtZEdyb3VwID0gY2tiW2tleUlkXTtcbiAgICAgICAgICAgIGlmIChjbWRHcm91cCA9PSBjb21tYW5kKSB7XG4gICAgICAgICAgICAgICAgZGVsZXRlIGNrYltrZXlJZF07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKEFycmF5LmlzQXJyYXkoY21kR3JvdXApKSB7XG4gICAgICAgICAgICAgICAgdmFyIGkgPSBjbWRHcm91cC5pbmRleE9mKGNvbW1hbmQpO1xuICAgICAgICAgICAgICAgIGlmIChpICE9IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgIGNtZEdyb3VwLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNtZEdyb3VwLmxlbmd0aCA9PSAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgY2tiW2tleUlkXSA9IGNtZEdyb3VwWzBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLmJpbmRLZXkgPSBmdW5jdGlvbihrZXksIGNvbW1hbmQsIHBvc2l0aW9uKSB7XG4gICAgICAgIGlmICh0eXBlb2Yga2V5ID09IFwib2JqZWN0XCIgJiYga2V5KSB7XG4gICAgICAgICAgICBpZiAocG9zaXRpb24gPT0gdW5kZWZpbmVkKVxuICAgICAgICAgICAgICAgIHBvc2l0aW9uID0ga2V5LnBvc2l0aW9uO1xuICAgICAgICAgICAga2V5ID0ga2V5W3RoaXMucGxhdGZvcm1dO1xuICAgICAgICB9XG4gICAgICAgIGlmICgha2V5KVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICBpZiAodHlwZW9mIGNvbW1hbmQgPT0gXCJmdW5jdGlvblwiKVxuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYWRkQ29tbWFuZCh7ZXhlYzogY29tbWFuZCwgYmluZEtleToga2V5LCBuYW1lOiBjb21tYW5kLm5hbWUgfHwga2V5fSk7XG4gICAgICAgIFxuICAgICAgICBrZXkuc3BsaXQoXCJ8XCIpLmZvckVhY2goZnVuY3Rpb24oa2V5UGFydCkge1xuICAgICAgICAgICAgdmFyIGNoYWluID0gXCJcIjtcbiAgICAgICAgICAgIGlmIChrZXlQYXJ0LmluZGV4T2YoXCIgXCIpICE9IC0xKSB7XG4gICAgICAgICAgICAgICAgdmFyIHBhcnRzID0ga2V5UGFydC5zcGxpdCgvXFxzKy8pO1xuICAgICAgICAgICAgICAgIGtleVBhcnQgPSBwYXJ0cy5wb3AoKTtcbiAgICAgICAgICAgICAgICBwYXJ0cy5mb3JFYWNoKGZ1bmN0aW9uKGtleVBhcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGJpbmRpbmcgPSB0aGlzLnBhcnNlS2V5cyhrZXlQYXJ0KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGlkID0gS0VZX01PRFNbYmluZGluZy5oYXNoSWRdICsgYmluZGluZy5rZXk7XG4gICAgICAgICAgICAgICAgICAgIGNoYWluICs9IChjaGFpbiA/IFwiIFwiIDogXCJcIikgKyBpZDtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fYWRkQ29tbWFuZFRvQmluZGluZyhjaGFpbiwgXCJjaGFpbktleXNcIik7XG4gICAgICAgICAgICAgICAgfSwgdGhpcyk7XG4gICAgICAgICAgICAgICAgY2hhaW4gKz0gXCIgXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgYmluZGluZyA9IHRoaXMucGFyc2VLZXlzKGtleVBhcnQpO1xuICAgICAgICAgICAgdmFyIGlkID0gS0VZX01PRFNbYmluZGluZy5oYXNoSWRdICsgYmluZGluZy5rZXk7XG4gICAgICAgICAgICB0aGlzLl9hZGRDb21tYW5kVG9CaW5kaW5nKGNoYWluICsgaWQsIGNvbW1hbmQsIHBvc2l0aW9uKTtcbiAgICAgICAgfSwgdGhpcyk7XG4gICAgfTtcbiAgICBcbiAgICBmdW5jdGlvbiBnZXRQb3NpdGlvbihjb21tYW5kKSB7XG4gICAgICAgIHJldHVybiB0eXBlb2YgY29tbWFuZCA9PSBcIm9iamVjdFwiICYmIGNvbW1hbmQuYmluZEtleVxuICAgICAgICAgICAgJiYgY29tbWFuZC5iaW5kS2V5LnBvc2l0aW9uXG4gICAgICAgICAgICB8fCAoY29tbWFuZC5pc0RlZmF1bHQgPyAtMTAwIDogMCk7XG4gICAgfVxuICAgIHRoaXMuX2FkZENvbW1hbmRUb0JpbmRpbmcgPSBmdW5jdGlvbihrZXlJZCwgY29tbWFuZCwgcG9zaXRpb24pIHtcbiAgICAgICAgdmFyIGNrYiA9IHRoaXMuY29tbWFuZEtleUJpbmRpbmcsIGk7XG4gICAgICAgIGlmICghY29tbWFuZCkge1xuICAgICAgICAgICAgZGVsZXRlIGNrYltrZXlJZF07XG4gICAgICAgIH0gZWxzZSBpZiAoIWNrYltrZXlJZF0gfHwgdGhpcy4kc2luZ2xlQ29tbWFuZCkge1xuICAgICAgICAgICAgY2tiW2tleUlkXSA9IGNvbW1hbmQ7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkoY2tiW2tleUlkXSkpIHtcbiAgICAgICAgICAgICAgICBja2Jba2V5SWRdID0gW2NrYltrZXlJZF1dO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoaSA9IGNrYltrZXlJZF0uaW5kZXhPZihjb21tYW5kKSkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICBja2Jba2V5SWRdLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBwb3NpdGlvbiAhPSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgcG9zaXRpb24gPSBnZXRQb3NpdGlvbihjb21tYW5kKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGNvbW1hbmRzID0gY2tiW2tleUlkXTtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjb21tYW5kcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIHZhciBvdGhlciA9IGNvbW1hbmRzW2ldO1xuICAgICAgICAgICAgICAgIHZhciBvdGhlclBvcyA9IGdldFBvc2l0aW9uKG90aGVyKTtcbiAgICAgICAgICAgICAgICBpZiAob3RoZXJQb3MgPiBwb3NpdGlvbilcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb21tYW5kcy5zcGxpY2UoaSwgMCwgY29tbWFuZCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgdGhpcy5hZGRDb21tYW5kcyA9IGZ1bmN0aW9uKGNvbW1hbmRzKSB7XG4gICAgICAgIGNvbW1hbmRzICYmIE9iamVjdC5rZXlzKGNvbW1hbmRzKS5mb3JFYWNoKGZ1bmN0aW9uKG5hbWUpIHtcbiAgICAgICAgICAgIHZhciBjb21tYW5kID0gY29tbWFuZHNbbmFtZV07XG4gICAgICAgICAgICBpZiAoIWNvbW1hbmQpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAodHlwZW9mIGNvbW1hbmQgPT09IFwic3RyaW5nXCIpXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuYmluZEtleShjb21tYW5kLCBuYW1lKTtcblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBjb21tYW5kID09PSBcImZ1bmN0aW9uXCIpXG4gICAgICAgICAgICAgICAgY29tbWFuZCA9IHsgZXhlYzogY29tbWFuZCB9O1xuXG4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TtcblxuICAgICAgICB2YXIga2V5Q29kZSA9IGtleVV0aWxba2V5XTtcbiAgICAgICAgaWYgKGtleVV0aWwuRlVOQ1RJT05fS0VZU1trZXlDb2RlXSlcbiAgICAgICAgICAgIGtleSA9IGtleVV0aWwuRlVOQ1RJT05fS0VZU1trZXlDb2RlXS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICBlbHNlIGlmICghcGFydHMubGVuZ3RoKVxuICAgICAgICAgICAgcmV0dXJuIHtrZXk6IGtleSwgaGFzaElkOiAtMX07XG4gICAgICAgIGVsc2UgaWYgKHBhcnRzLmxlbmd0aCA9PSAxICYmIHBhcnRzWzBdID09IFwic2hpZnRcIilcbiAgICAgICAgICAgIHJldHVybiB7a2V5OiBrZXkudG9VcHBlckNhc2UoKSwgaGFzaElkOiAtMX07XG5cbiAgICAgICAgdmFyIGhhc2hJZCA9IDA7XG4gICAgICAgIGZvciAodmFyIGkgPSBwYXJ0cy5sZW5ndGg7IGktLTspIHtcbiAgICAgICAgICAgIHZhciBtb2RpZmllciA9IGtleVV0aWwuS0VZX01PRFNbcGFydHNbaV1dO1xuICAgICAgICAgICAgaWYgKG1vZGlmaWVyID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNvbnNvbGUgIT0gXCJ1bmRlZmluZWRcIilcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5lcnJvcihcImludmFsaWQgbW9kaWZpZXIgXCIgKyBwYXJ0c1tpXSArIFwiIGluIFwiICsga2V5cyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaGFzaElkIHw9IG1vZGlmaWVyO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7a2V5OiBrZXksIGhhc2hJZDogaGFzaElkfTtcbiAgICB9O1xuXG4gICAgdGhpcy5maW5kS2V5Q29tbWFuZCA9IGZ1bmN0aW9uIGZpbmRLZXlDb21tYW5kKGhhc2hJZCwga2V5U3RyaW5nKSB7XG4gICAgICAgIHZhciBrZXkgPSBLRVlfTU9EU1toYXNoSWRdICsga2V5U3RyaW5nO1xuICAgICAgICByZXR1cm4gdGhpcy5jb21tYW5kS2V5QmluZGluZ1trZXldO1xuICAgIH07XG5cbiAgICB0aGlzLmhhbmRsZUtleWJvYXJkID0gZnVuY3Rpb24oZGF0YSwgaGFzaElkLCBrZXlTdHJpbmcsIGtleUNvZGUpIHtcbiAgICAgICAgaWYgKGtleUNvZGUgPCAwKSByZXR1cm47XG4gICAgICAgIHZhciBrZXkgPSBLRVlfTU9EU1toYXNoSWRdICsga2V5U3RyaW5nO1xuICAgICAgICB2YXIgY29tbWFuZCA9IHRoaXMuY29tbWFuZEtleUJpbmRpbmdba2V5XTtcbiAgICAgICAgaWYgKGRhdGEuJGtleUNoYWluKSB7XG4gICAgICAgICAgICBkYXRhLiRrZXlDaGFpbiArPSBcIiBcIiArIGtleTtcbiAgICAgICAgICAgIGNvbW1hbmQgPSB0aGlzLmNvbW1hbmRLZXlCaW5kaW5nW2RhdGEuJGtleUNoYWluXSB8fCBjb21tYW5kO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBpZiAoY29tbWFuZCkge1xuICAgICAgICAgICAgaWYgKGNvbW1hbmQgPT0gXCJjaGFpbktleXNcIiB8fCBjb21tYW5kW2NvbW1hbmQubGVuZ3RoIC0gMV0gPT0gXCJjaGFpbktleXNcIikge1xuICAgICAgICAgICAgICAgIGRhdGEuJGtleUNoYWluID0gZGF0YS4ka2V5Q2hhaW4gfHwga2V5O1xuICAgICAgICAgICAgICAgIHJldHVybiB7Y29tbWFuZDogXCJudWxsXCJ9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICBpZiAoZGF0YS4ka2V5Q2hhaW4pIHtcbiAgICAgICAgICAgIGlmICgoIWhhc2hJZCB8fCBoYXNoSWQgPT0gNCkgJiYga2V5U3RyaW5nLmxlbmd0aCA9PSAxKVxuIC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ZGluZyA9IGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmICghdGhpcy4kYWRkQ29tbWFuZFRvTWFjcm8pIHtcbiAgICAgICAgICAgIHRoaXMuJGFkZENvbW1hbmRUb01hY3JvID0gZnVuY3Rpb24oZSkge1xuICAgICAgICAgICAgICAgIHRoaXMubWFjcm8ucHVzaChbZS5jb21tYW5kLCBlLmFyZ3NdKTtcbiAgICAgICAgICAgIH0uYmluZCh0aGlzKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMub2xkTWFjcm8gPSB0aGlzLm1hY3JvO1xuICAgICAgICB0aGlzLm1hY3JvID0gW107XG4gICAgICAgIHRoaXMub24oXCJleGVjXCIsIHRoaXMuJGFkZENvbW1hbmRUb01hY3JvKTtcbiAgICAgICAgcmV0dXJuIHRoaXMucmVjb3JkaW5nID0gdHJ1ZTtcbiAgICB9O1xuXG4gICAgdGhpcy5yZXBsYXkgPSBmdW5jdGlvbihlZGl0b3IpIHtcbiAgICAgICAgaWYgKHRoaXMuJGluUmVwbGF5IHx8ICF0aGlzLm1hY3JvKVxuICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgIGlmICh0aGlzLnJlY29yZGluZylcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnRvZ2dsZVJlY29yZGluZyhlZGl0b3IpO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICB0aGlzLiRpblJlcGxheSA9IHRydWU7XG4gICAgICAgICAgICB0aGlzLm1hY3JvLmZvckVhY2goZnVuY3Rpb24oeCkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgeCA9PSBcInN0cmluZ1wiKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLmV4ZWMoeCwgZWRpdG9yKTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXhlYyh4WzBdLCBlZGl0b3IsIHhbMV0pO1xuICAgICAgICAgICAgfSwgdGhpcyk7XG4gICAgIC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ID0ge307XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLiRvcFJlc2V0VGltZXIuc2NoZWR1bGUoKTtcbiAgICAgICAgdGhpcy5jdXJPcCA9IHtcbiAgICAgICAgICAgIGNvbW1hbmQ6IGNvbW1hZEV2ZW50LmNvbW1hbmQgfHwge30sXG4gICAgICAgICAgICBhcmdzOiBjb21tYWRFdmVudC5hcmdzLFxuICAgICAgICAgICAgc2Nyb2xsVG9wOiB0aGlzLnJlbmRlcmVyLnNjcm9sbFRvcFxuICAgICAgICB9O1xuICAgICAgICBpZiAodGhpcy5jdXJPcC5jb21tYW5kLm5hbWUgJiYgdGhpcy5jdXJPcC5jb21tYW5kLnNjcm9sbEludG9WaWV3ICE9PSB1bmRlZmluZWQpXG4gICAgICAgICAgICB0aGlzLiRibG9ja1Njcm9sbGluZysrO1xuICAgIH07XG5cbiAgICB0aGlzLmVuZE9wZXJhdGlvbiA9IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgaWYgKHRoaXMuY3VyT3ApIHtcbiAgICAgICAgICAgIGlmIChlICYmIGUucmV0dXJuVmFsdWUgPT09IGZhbHNlKVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmN1ck9wID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMuX3NpZ25hbChcImJlZm9yZUVuZE9wZXJhdGlvblwiKTtcbiAgICAgICAgICAgIHZhciBjb21tYW5kID0gdGhpcy5jdXJPcC5jb21tYW5kO1xuICAgICAgICAgICAgaWYgKGNvbW1hbmQubmFtZSAmJiB0aGlzLiRibG9ja1Njcm9sbGluZyA+IDApXG4gICAgICAgICAgICAgICAgdGhpcy4kYmxvY2tTY3JvbGxpbmctLTtcbiAgICAgICAgICAgIHZhciBzY3JvbGxJbnRvVmlldyA9IGNvbW1hbmQgJiYgY29tbWFuZC5zY3JvbGxJbnRvVmlldztcbiAgICAgICAgICAgIGlmIChzY3JvbGxJbnRvVmlldykge1xuICAgICAgICAgICAgICAgIHN3aXRjaCAoc2Nyb2xsSW50b1ZpZXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcImNlbnRlci1hbmltYXRlXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICBzY3JvbGxJbnRvVmlldyA9IFwiYW5pbWF0ZVwiO1xuICAgICAgICAgICAgICAgICAgICBjYXNlIFwiY2VudGVyXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnNjcm9sbEN1cnNvckludG9WaWV3KG51bGwsIDAuNSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcImFuaW1hdGVcIjpcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcImN1cnNvclwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zY3JvbGxDdXJzb3JJbnRvVmlldygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXCJzZWxlY3Rpb25QYXJ0XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmFuZ2UgPSB0aGlzLnNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvbmZpZyA9IHRoaXMucmVuZGVyZXIubGF5ZXJDb25maWc7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmFuZ2Uuc3RhcnQucm93ID49IGNvbmZpZy5sYXN0Um93IHx8IHJhbmdlLmVuZC5yb3cgPD0gY29uZmlnLmZpcnN0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZW5kZXJlci5zY3JvbGxTZWxlY3Rpb25JbnRvVmlldyh0aGlzLnNlbGVjdGlvbi5hbmNob3IsIHRoaXMuc2VsZWN0aW9uLmxlYWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYW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R5cGUuaW5kZXhPZihcInRhZy1vcGVuXCIpICE9IC0xKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwRm9yd2FyZCgpO1xuICAgICAgICAgICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHRhZyA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgdmFyIGRlcHRoID0gMDtcbiAgICAgICAgICAgIHZhciBwcmV2VG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52YWx1ZSA9PSAnPCcpe1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgcHJldlRva2VuID0gdG9rZW47XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbiAmJiB0b2tlbi52YWx1ZSA9PT0gdGFnICYmIHRva2VuLnR5cGUuaW5kZXhPZigndGFnLW5hbWUnKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8Jyl7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVwdGgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHJldlRva2VuLnZhbHVlID09PSAnPC8nKXtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aC0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHRva2VuICYmIGRlcHRoID49IDApO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gcHJldlRva2VuO1xuICAgICAgICAgICAgICAgICAgICBwcmV2VG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgICAgIGlmICh0b2tlbiAmJiB0b2tlbi52YWx1ZSA9PT0gdGFnICYmIHRva2VuLnR5cGUuaW5kZXhPZigndGFnLW5hbWUnKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoKys7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwvJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoLS07XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IHdoaWxlIChwcmV2VG9rZW4gJiYgZGVwdGggPD0gMCk7XG4gICAgICAgICAgICAgICAgaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKCF0b2tlbikge1xuICAgICAgICAgICAgICAgIHNlc3Npb24ucmVtb3ZlTWFya2VyKHNlc3Npb24uJHRhZ0hpZ2hsaWdodCk7XG4gICAgICAgICAgICAgICAgc2Vzc2lvbi4kdGFnSGlnaGxpZ2h0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgIC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HJhbmdlLnN0YXJ0LnJvdyk7XG4gICAgICAgICAgICB2YXIgbmV3X3JhbmdlID0gc2Vzc2lvbi5nZXRNb2RlKCkudHJhbnNmb3JtQWN0aW9uKHN0YXRlLCAnZGVsZXRpb24nLCB0aGlzLCBzZXNzaW9uLCByYW5nZSk7XG5cbiAgICAgICAgICAgIGlmIChyYW5nZS5lbmQuY29sdW1uID09PSAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIHRleHQgPSBzZXNzaW9uLmdldFRleHRSYW5nZShyYW5nZSk7XG4gICAgICAgICAgICAgICAgaWYgKHRleHRbdGV4dC5sZW5ndGggLSAxXSA9PSBcIlxcblwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJhbmdlLmVuZC5yb3cpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoL15cXHMrJC8udGVzdChsaW5lKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbiA9IGxpbmUubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG5ld19yYW5nZSlcbiAgICAgICAgICAgICAgICByYW5nZSA9IG5ld19yYW5nZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuc2Vzc2lvbi5yZW1vdmUocmFuZ2UpO1xuICAgICAgICB0aGlzLmNsZWFyU2VsZWN0aW9uKCk7XG4gICAgfTtcbiAgICB0aGlzLnJlbW92ZVdvcmRSaWdodCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICBpZiAodGhpcy5zZWxlY3Rpb24uaXNFbXB0eSgpKVxuICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24uc2VsZWN0V29yZFJpZ2h0KCk7XG5cbiAgICAgICAgdGhpcy5zZXNzaW9uLnJlbW92ZSh0aGlzLmdldFNlbGVjdGlvblJhbmdlKCkpO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xzKyQvLnRlc3QodGV4dCkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcm93cyA9IHRoaXMuJGdldFNlbGVjdGVkUm93cygpO1xuICAgICAgICAgICAgICAgIHNlc3Npb24uaW5kZW50Um93cyhyb3dzLmZpcnN0LCByb3dzLmxhc3QsIFwiXFx0XCIpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocmFuZ2Uuc3RhcnQucm93KTtcbiAgICAgICAgdmFyIHBvc2l0aW9uID0gcmFuZ2Uuc3RhcnQ7XG4gICAgICAgIHZhciBzaXplID0gc2Vzc2lvbi5nZXRUYWJTaXplKCk7XG4gICAgICAgIHZhciBjb2x1bW4gPSBzZXNzaW9uLmRvY3VtZW50VG9TY3JlZW5Db2x1bW4ocG9zaXRpb24ucm93LCBwb3NpdGlvbi5jb2x1bW4pO1xuXG4gICAgICAgIGlmICh0aGlzLnNlc3Npb24uZ2V0VXNlU29mdFRhYnMoKSkge1xuICAgICAgICAgICAgdmFyIGNvdW50ID0gKHNpemUgLSBjb2x1bW4gJSBzaXplKTtcbiAgICAgICAgICAgIHZhciBpbmRlbnRTdHJpbmcgPSBsYW5nLnN0cmluZ1JlcGVhdChcIiBcIiwgY291bnQpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGNvdW50ID0gY29sdW1uICUgc2l6ZTtcbiAgICAgICAgICAgIHdoaWxlIChsaW5lW3JhbmdlLnN0YXJ0LmNvbHVtbiAtIDFdID09IFwiIFwiICYmIGNvdW50KSB7XG4gICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQuY29sdW1uLS07XG4gICAgICAgICAgICAgICAgY291bnQtLTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuc2VsZWN0aW9uLnNldFNlbGVjdGlvblJhbmdlKHJhbmdlKTtcbiA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dGhpcy5nZXRTZWxlY3Rpb25SYW5nZSgpO1xuICAgICAgICB0aGlzLnNlc3Npb24uZ2V0TW9kZSgpLnRvZ2dsZUJsb2NrQ29tbWVudChzdGF0ZSwgdGhpcy5zZXNzaW9uLCByYW5nZSwgY3Vyc29yKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0TnVtYmVyQXQgPSBmdW5jdGlvbihyb3csIGNvbHVtbikge1xuICAgICAgICB2YXIgX251bWJlclJ4ID0gL1tcXC1dP1swLTldKyg/OlxcLlswLTldKyk/L2c7XG4gICAgICAgIF9udW1iZXJSeC5sYXN0SW5kZXggPSAwO1xuXG4gICAgICAgIHZhciBzID0gdGhpcy5zZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgd2hpbGUgKF9udW1iZXJSeC5sYXN0SW5kZXggPCBjb2x1bW4pIHtcbiAgICAgICAgICAgIHZhciBtID0gX251bWJlclJ4LmV4ZWMocyk7XG4gICAgICAgICAgICBpZihtLmluZGV4IDw9IGNvbHVtbiAmJiBtLmluZGV4K21bMF0ubGVuZ3RoID49IGNvbHVtbil7XG4gICAgICAgICAgICAgICAgdmFyIG51bWJlciA9IHtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IG1bMF0sXG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0OiBtLmluZGV4LFxuICAgICAgICAgICAgICAgICAgICBlbmQ6IG0uaW5kZXgrbVswXS5sZW5ndGhcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHJldHVybiBudW1iZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcbiAgICB0aGlzLm1vZGlmeU51bWJlciA9IGZ1bmN0aW9uKGFtb3VudCkge1xuICAgICAgICB2YXIgcm93ID0gdGhpcy5zZWxlY3Rpb24uZ2V0Q3Vyc29yKCkucm93O1xuICAgICAgICB2YXIgY29sdW1uID0gdGhpcy5zZWxlY3Rpb24uZ2V0Q3Vyc29yKCkuY29sdW1uO1xuICAgICAgICB2YXIgY2hhclJhbmdlID0gbmV3IFJhbmdlKHJvdywgY29sdW1uLTEsIHJvdywgY29sdW1uKTtcblxuICAgICAgICB2YXIgYyA9IHRoaXMuc2Vzc2lvbi5nZXRUZXh0UmFuZ2UoY2hhclJhbmdlKTtcbiAgICAgICAgaWYgKCFpc05hTihwYXJzZUZsb2F0KGMpKSAmJiBpc0Zpbml0ZShjKSkge1xuICAgICAgICAgICAgdmFyIG5yID0gdGhpcy5nZXROdW1iZXJBdChyb3csIGNvbHVtbik7XG4gICAgICAgICAgICBpZiAobnIpIHtcbiAgICAgICAgICAgICAgICB2YXIgZnAgPSBuci52YWx1ZS5pbmRleE9mKFwiLlwiKSA+PSAwID8gbnIuc3RhcnQgKyBuci52YWx1ZS5pbmRleE9mKFwiLlwiKSArIDEgOiBuci5lbmQ7XG4gICAgICAgICAgICAgICAgdmFyIGRlY2ltYWxzID0gbnIuc3RhcnQgKyBuci52YWx1ZS5sZW5ndGggLSBmcDtcblxuICAgICAgICAgICAgICAgIHZhciB0ID0gcGFyc2VGbG9hdChuci52YWx1ZSk7XG4gICAgICAgICAgICAgICAgdCAqPSBNYXRoLnBvdygxMCwgZGVjaW1hbHMpO1xuXG5cbiAgICAgICAgICAgICAgICBpZihmcCAhPT0gbnIuZW5kICYmIGNvbHVtbiA8IGZwKXtcbiAgICAgICAgICAgICAgICAgICAgYW1vdW50ICo9IE1hdGgucG93KDEwLCBuci5lbmQgLSBjb2x1bW4gLSAxKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBhbW91bnQgKj0gTWF0aC5wb3coMTAsIG5yLmVuZCAtIGNvbHVtbik7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgdCArPSBhbW91bnQ7XG4gICAgICAgICAgICAgICAgdCAvPSBNYXRoLnBvdygxMCwgZGVjaW1hbHMpO1xuICAgICAgICAgICAgICA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RpZmYsIDApO1xuICAgICAgICAgICAgICAgIHJvd3MgPSB0aGlzLiRnZXRTZWxlY3RlZFJvd3MocmFuZ2VzW2ldKTtcbiAgICAgICAgICAgICAgICB2YXIgZmlyc3QgPSByb3dzLmZpcnN0O1xuICAgICAgICAgICAgICAgIHZhciBsYXN0ID0gcm93cy5sYXN0O1xuICAgICAgICAgICAgICAgIHdoaWxlICgrK2kgPCBsKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0b3RhbERpZmYpIHJhbmdlc1tpXS5tb3ZlQnkodG90YWxEaWZmLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHN1YlJvd3MgPSB0aGlzLiRnZXRTZWxlY3RlZFJvd3MocmFuZ2VzW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvcHkgJiYgc3ViUm93cy5maXJzdCAhPSBsYXN0KVxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCFjb3B5ICYmIHN1YlJvd3MuZmlyc3QgPiBsYXN0ICsgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICBsYXN0ID0gc3ViUm93cy5sYXN0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpLS07XG4gICAgICAgICAgICAgICAgZGlmZiA9IHRoaXMuc2Vzc2lvbi4kbW92ZUxpbmVzKGZpcnN0LCBsYXN0LCBjb3B5ID8gMCA6IGRpcik7XG4gICAgICAgICAgICAgICAgaWYgKGNvcHkgJiYgZGlyID09IC0xKSByYW5nZUluZGV4ID0gaSArIDE7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHJhbmdlSW5kZXggPD0gaSkge1xuICAgICAgICAgICAgICAgICAgICByYW5nZXNbcmFuZ2VJbmRleF0ubW92ZUJ5KGRpZmYsIDApO1xuICAgICAgICAgICAgICAgICAgICByYW5nZUluZGV4Kys7XG4gIC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gICBcbiAgICAgICAgZG8ge1xuICAgICAgICAgICAgaWYgKHRva2VuLnZhbHVlLm1hdGNoKC9be30oKVxcW1xcXV0vZykpIHtcbiAgICAgICAgICAgICAgICBmb3IgKDsgaSA8IHRva2VuLnZhbHVlLmxlbmd0aCAmJiAhZm91bmQ7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWJyYWNrZXRzW3Rva2VuLnZhbHVlW2ldXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBicmFja2V0VHlwZSA9IGJyYWNrZXRzW3Rva2VuLnZhbHVlW2ldXSArICcuJyArIHRva2VuLnR5cGUucmVwbGFjZShcInJwYXJlblwiLCBcImxwYXJlblwiKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAoaXNOYU4oZGVwdGhbYnJhY2tldFR5cGVdKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVwdGhbYnJhY2tldFR5cGVdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodG9rZW4udmFsdWVbaV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJygnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnWyc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd7JzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aFticmFja2V0VHlwZV0rKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJyknOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnXSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd9JzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aFticmFja2V0VHlwZV0tLTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXB0aFticmFja2V0VHlwZV0gPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoVHlwZSA9ICdicmFja2V0JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm91bmQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodG9rZW4gJiYgdG9rZW4udHlwZS5pbmRleE9mKCd0YWctbmFtZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIGlmIChpc05hTihkZXB0aFt0b2tlbi52YWx1ZV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlcHRoW3Rva2VuLnZhbHVlXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8Jykge1xuICAgICAgICAgICAgICAgICAgICBkZXB0aFt0b2tlbi52YWx1ZV0rKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAocHJldlRva2VuLnZhbHVlID09PSAnPC8nKSB7XG4gICAgICAgICAgICAgICAgICAgIGRlcHRoW3Rva2VuLnZhbHVlXS0tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZiAoZGVwdGhbdG9rZW4udmFsdWVdID09PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBtYXRjaFR5cGUgPSAndGFnJztcbiAgICAgICAgICAgICAgICAgICAgZm91bmQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFmb3VuZCkge1xuICAgICAgICAgICAgICAgIHByZXZUb2tlbiA9IHRva2VuO1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSB3aGlsZSAodG9rZW4gJiYgIWZvdW5kKTtcbiAgICAgICAgaWYgKCFtYXRjaFR5cGUpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIHJhbmdlLCBwb3M7XG4gICAgICAgIGlmIChtYXRjaFR5cGUgPT09ICdicmFja2V0Jykge1xuICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLnNlc3Npb24uZ2V0QnJhY2tldFJhbmdlKGN1cnNvcik7XG4gICAgICAgICAgICBpZiAoIXJhbmdlKSB7XG4gICAgICAgICAgICAgICAgcmFuZ2UgPSBuZXcgUmFuZ2UoXG4gICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpLFxuICAgICAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIGkgLSAxLFxuICAgICAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKSxcbiAgICAgICAgICAgICAgICAgICAgaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyBpIC0gMVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcG9zID0gcmFuZ2Uuc3RhcnQ7XG4gICAgICAgICAgICAgICAgaWYgKGV4cGFuZCB8fCBwb3Mucm93ID09PSBjdXJzb3Iucm93ICYmIE1hdGguYWJzKHBvcy5jb2x1bW4gLSBjdXJzb3IuY29sdW1uKSA8IDIpXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gdGhpcy5zZXNzaW9uLmdldEJyYWNrZXRSYW5nZShwb3MpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG1hdGNoVHlwZSA9PT0gJ3RhZycpIHtcbiAgICAgICAgICAgIGlmICh0b2tlbiAmJiB0b2tlbi50eXBlLmluZGV4T2YoJ3RhZy1uYW1lJykgIT09IC0xKSBcbiAgICAgICAgICAgICAgICB2YXIgdGFnID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuXG4gICAgICAgICAgICByYW5nZSA9IG5ldyBSYW5nZShcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKSxcbiAgICAgICAgICAgICAgICBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSAtIDIsXG4gICAgICAgICAgICAgICAgaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCksXG4gICAgICAgICAgICAgICAgaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgLSAyXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKHJhbmdlLmNvbXBhcmUoY3Vyc29yLnJvdywgY3Vyc29yLmNvbHVtbikgPT09IDApIHtcbiAgICAgICAgICAgICAgICBmb3VuZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBwcmV2VG9rZW47XG4gICAgICAgICAgICAgICAgICAgIHByZXZUb2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZXZUb2tlbi50eXBlLmluZGV4T2YoJ3RhZy1jbG9zZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlLnNldEVuZChpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKSwgaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuQ29sdW1uKCkgKyAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuLnZhbHVlID09PSB0YWcgJiYgdG9rZW4udHlwZS5pbmRleE9mKCd0YWctbmFtZScpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICc8Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aFt0YWddKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHByZXZUb2tlbi52YWx1ZSA9PT0gJzwvJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXB0aFt0YWddLS07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXB0aFt0YWddID09PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IHdoaWxlIChwcmV2VG9rZW4gJiYgIWZvdW5kKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh0b2tlbiAmJiB0b2tlbi50eXBlLmluZGV4T2YoJ3RhZy1uYW1lJykpIHtcbiAgICAgICAgICAgICAgICBwb3MgPSByYW5nZS5zdGFydDtcbiAgICAgICAgICAgICAgICBpZiAocG9zLnJvdyA9PSBjdXJzb3Iucm93ICYmIE1hdGguYWJzKHBvcy5jb2x1bW4gLSBjdXJzb3IuY29sdW1uKSA8IDIpXG4gICAgICAgICAgICAgICAgICAgIHBvcyA9IHJhbmdlL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gbnVsbCkge1xuICAgICAgICAgICAgcmFuZ2UuZW5kID0gdGhpcy5zZXNzaW9uLnJlcGxhY2UocmFuZ2UsIHJlcGxhY2VtZW50KTtcbiAgICAgICAgICAgIHJldHVybiByYW5nZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgfTtcbiAgICB0aGlzLmdldExhc3RTZWFyY2hPcHRpb25zID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHJldHVybiB0aGlzLiRzZWFyY2guZ2V0T3B0aW9ucygpO1xuICAgIH07XG4gICAgdGhpcy5maW5kID0gZnVuY3Rpb24obmVlZGxlLCBvcHRpb25zLCBhbmltYXRlKSB7XG4gICAgICAgIGlmICghb3B0aW9ucylcbiAgICAgICAgICAgIG9wdGlvbnMgPSB7fTtcblxuICAgICAgICBpZiAodHlwZW9mIG5lZWRsZSA9PSBcInN0cmluZ1wiIHx8IG5lZWRsZSBpbnN0YW5jZW9mIFJlZ0V4cClcbiAgICAgICAgICAgIG9wdGlvbnMubmVlZGxlID0gbmVlZGxlO1xuICAgICAgICBlbHNlIGlmICh0eXBlb2YgbmVlZGxlID09IFwib2JqZWN0XCIpXG4gICAgICAgICAgICBvb3AubWl4aW4ob3B0aW9ucywgbmVlZGxlKTtcblxuICAgICAgICB2YXIgcmFuZ2UgPSB0aGlzLnNlbGVjdGlvbi5nZXRSYW5nZSgpO1xuICAgICAgICBpZiAob3B0aW9ucy5uZWVkbGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgbmVlZGxlID0gdGhpcy5zZXNzaW9uLmdldFRleHRSYW5nZShyYW5nZSlcbiAgICAgICAgICAgICAgICB8fCB0aGlzLiRzZWFyY2guJG9wdGlvbnMubmVlZGxlO1xuICAgICAgICAgICAgaWYgKCFuZWVkbGUpIHtcbiAgICAgICAgICAgICAgICByYW5nZSA9IHRoaXMuc2Vzc2lvbi5nZXRXb3JkUmFuZ2UocmFuZ2Uuc3R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Y3JvbGwgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocG9zLnRvcCA8IGNvbmZpZy5oZWlnaHQgJiZcbiAgICAgICAgICAgICAgICAgICAgcG9zLnRvcCArIHJlY3QudG9wICsgY29uZmlnLmxpbmVIZWlnaHQgPiB3aW5kb3cuaW5uZXJIZWlnaHQpIHtcbiAgICAgICAgICAgICAgICAgICAgc2hvdWxkU2Nyb2xsID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc2hvdWxkU2Nyb2xsID0gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHNob3VsZFNjcm9sbCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIHNjcm9sbEFuY2hvci5zdHlsZS50b3AgPSB0b3AgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgICAgIHNjcm9sbEFuY2hvci5zdHlsZS5sZWZ0ID0gcG9zLmxlZnQgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgICAgIHNjcm9sbEFuY2hvci5zdHlsZS5oZWlnaHQgPSBjb25maWcubGluZUhlaWdodCArIFwicHhcIjtcbiAgICAgICAgICAgICAgICAgICAgc2Nyb2xsQW5jaG9yLnNjcm9sbEludG9WaWV3KHNob3VsZFNjcm9sbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHNob3VsZFNjcm9sbCA9IHJlY3QgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgdGhpcy5zZXRBdXRvU2Nyb2xsRWRpdG9ySW50b1ZpZXcgPSBmdW5jdGlvbihlbmFibGUpIHtcbiAgICAgICAgICAgIGlmIChlbmFibGUpXG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgZGVsZXRlIHRoaXMuc2V0QXV0b1Njcm9sbEVkaXRvckludG9WaWV3O1xuICAgICAg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ICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGFjdGlvbjogZGVsdGEuYWN0aW9uLFxuICAgICAgICAgICAgc3RhcnQ6IGRlbHRhLnN0YXJ0LFxuICAgICAgICAgICAgZW5kOiBkZWx0YS5lbmQsXG4gICAgICAgICAgICBsaW5lczogZGVsdGEubGluZXMgfHwgW2RlbHRhLnRleHRdXG4gICAgICAgIH07XG4gICAgfVxuICAgIFxuICAgIGZ1bmN0aW9uIGNsb25lRGVsdGFTZXRzT2JqKGRlbHRhU2V0c19vbGQsIGZuR2V0TW9kaWZpZWREZWx0YSkge1xuICAgICAgICB2YXIgZGVsdGFTZXRzX25ldyA9IG5ldyBBcnJheShkZWx0YVNldHNfb2xkLmxlbmd0aCk7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGVsdGFTZXRzX29sZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGRlbHRhU2V0X29sZCA9IGRlbHRhU2V0c19vbGRbaV07XG4gICAgICAgICAgICB2YXIgZGVsdGFTZXRfbmV3ID0geyBncm91cDogZGVsdGFTZXRfb2xkLmdyb3VwLCBkZWx0YXM6IG5ldyBBcnJheShkZWx0YVNldF9vbGQubGVuZ3RoKX07XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgZGVsdGFTZXRfb2xkLmRlbHRhcy5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICAgIHZhciBkZWx0YV9vbGQgPSBkZWx0YVNldF9vbGQuZGVsdGFzW2pdO1xuICAgICAgICAgICAgICAgIGRlbHRhU2V0X25ldy5kZWx0YXNbal0gPSBmbkdldE1vZGlmaWVkRGVsdGEoZGVsdGFfb2xkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgZGVsdGFTZXRzX25ld1tpXSA9IGRlbHRhU2V0X25ldztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZGVsdGFTZXRzX25ldzt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RGVjb3JhdGlvblwiKTtcbiAgICAgICAgdGhpcy5zZXNzaW9uLnJlbW92ZUd1dHRlckRlY29yYXRpb24ocm93LCBjbGFzc05hbWUpO1xuICAgIH07XG5cbiAgICB0aGlzLnNldEFubm90YXRpb25zID0gZnVuY3Rpb24oYW5ub3RhdGlvbnMpIHtcbiAgICAgICAgdGhpcy4kYW5ub3RhdGlvbnMgPSBbXTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhbm5vdGF0aW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGFubm90YXRpb24gPSBhbm5vdGF0aW9uc1tpXTtcbiAgICAgICAgICAgIHZhciByb3cgPSBhbm5vdGF0aW9uLnJvdztcbiAgICAgICAgICAgIHZhciByb3dJbmZvID0gdGhpcy4kYW5ub3RhdGlvbnNbcm93XTtcbiAgICAgICAgICAgIGlmICghcm93SW5mbylcbiAgICAgICAgICAgICAgICByb3dJbmZvID0gdGhpcy4kYW5ub3RhdGlvbnNbcm93XSA9IHt0ZXh0OiBbXX07XG4gICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIGFubm9UZXh0ID0gYW5ub3RhdGlvbi50ZXh0O1xuICAgICAgICAgICAgYW5ub1RleHQgPSBhbm5vVGV4dCA/IGxhbmcuZXNjYXBlSFRNTChhbm5vVGV4dCkgOiBhbm5vdGF0aW9uLmh0bWwgfHwgXCJcIjtcblxuICAgICAgICAgICAgaWYgKHJvd0luZm8udGV4dC5pbmRleE9mKGFubm9UZXh0KSA9PT0gLTEpXG4gICAgICAgICAgICAgICAgcm93SW5mby50ZXh0LnB1c2goYW5ub1RleHQpO1xuXG4gICAgICAgICAgICB2YXIgdHlwZSA9IGFubm90YXRpb24udHlwZTtcbiAgICAgICAgICAgIGlmICh0eXBlID09IFwiZXJyb3JcIilcbiAgICAgICAgICAgICAgICByb3dJbmZvLmNsYXNzTmFtZSA9IFwiIGFjZV9lcnJvclwiO1xuICAgICAgICAgICAgZWxzZSBpZiAodHlwZSA9PSBcIndhcm5pbmdcIiAmJiByb3dJbmZvLmNsYXNzTmFtZSAhPSBcIiBhY2VfZXJyb3JcIilcbiAgICAgICAgICAgICAgICByb3dJbmZvLmNsYXNzTmFtZSA9IFwiIGFjZV93YXJuaW5nXCI7XG4gICAgICAgICAgICBlbHNlIGlmICh0eXBlID09IFwiaW5mb1wiICYmICghcm93SW5mby5jbGFzc05hbWUpKVxuICAgICAgICAgICAgICAgIHJvd0luZm8uY2xhc3NOYW1lID0gXCIgYWNlX2luZm9cIjtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLiR1cGRhdGVBbm5vdGF0aW9ucyA9IGZ1bmN0aW9uIChkZWx0YSkge1xuICAgICAgICBpZiAoIXRoaXMuJGFubm90YXRpb25zLmxlbmd0aClcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdmFyIGZpcnN0Um93ID0gZGVsdGEuc3RhcnQucm93O1xuICAgICAgICB2YXIgbGVuID0gZGVsdGEuZW5kLnJvdyAtIGZpcnN0Um93O1xuICAgICAgICBpZiAobGVuID09PSAwKSB7XG4gICAgICAgIH0gZWxzZSBpZiAoZGVsdGEuYWN0aW9uID09ICdyZW1vdmUnKSB7XG4gICAgICAgICAgICB0aGlzLiRhbm5vdGF0aW9ucy5zcGxpY2UoZmlyc3RSb3csIGxlbiArIDEsIG51bGwpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdmFyIGFyZ3MgPSBuZXcgQXJyYXkobGVuICsgMSk7XG4gICAgICAgICAgICBhcmdzLnVuc2hpZnQoZmlyc3RSb3csIDEpO1xuICAgICAgICAgICAgdGhpcy4kYW5ub3RhdGlvbnMuc3BsaWNlLmFwcGx5KHRoaXMuJGFubm90YXRpb25zLCBhcmdzKTtcbiAgICAgICAgfVxuICAgIH07XG5cbiAgICB0aGlzLnVwZGF0ZSA9IGZ1bmN0aW9uKGNvbmZpZykge1xuICAgICAgICB2YXIgc2Vzc2lvbiA9IHRo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LnJvdyArIDE7XG4gICAgICAgICAgICAgICAgZm9sZCA9IHNlc3Npb24uZ2V0TmV4dEZvbGRMaW5lKHJvdywgZm9sZCk7XG4gICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZCA/IGZvbGQuc3RhcnQucm93IDogSW5maW5pdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocm93ID4gbGFzdFJvdykge1xuICAgICAgICAgICAgICAgIHdoaWxlICh0aGlzLiRjZWxscy5sZW5ndGggPiBpbmRleCArIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgY2VsbCA9IHRoaXMuJGNlbGxzLnBvcCgpO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVsZW1lbnQucmVtb3ZlQ2hpbGQoY2VsbC5lbGVtZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGNlbGwgPSB0aGlzLiRjZWxsc1srK2luZGV4XTtcbiAgICAgICAgICAgIGlmICghY2VsbCkge1xuICAgICAgICAgICAgICAgIGNlbGwgPSB7ZWxlbWVudDogbnVsbCwgdGV4dE5vZGU6IG51bGwsIGZvbGRXaWRnZXQ6IG51bGx9O1xuICAgICAgICAgICAgICAgIGNlbGwuZWxlbWVudCA9IGRvbS5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xuICAgICAgICAgICAgICAgIGNlbGwudGV4dE5vZGUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnJyk7XG4gICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50LmFwcGVuZENoaWxkKGNlbGwudGV4dE5vZGUpO1xuICAgICAgICAgICAgICAgIHRoaXMuZWxlbWVudC5hcHBlbmRDaGlsZChjZWxsLmVsZW1lbnQpO1xuICAgICAgICAgICAgICAgIHRoaXMuJGNlbGxzW2luZGV4XSA9IGNlbGw7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBjbGFzc05hbWUgPSBcImFjZV9ndXR0ZXItY2VsbCBcIjtcbiAgICAgICAgICAgIGlmIChicmVha3BvaW50c1tyb3ddKVxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZSArPSBicmVha3BvaW50c1tyb3ddO1xuICAgICAgICAgICAgaWYgKGRlY29yYXRpb25zW3Jvd10pXG4gICAgICAgICAgICAgICAgY2xhc3NOYW1lICs9IGRlY29yYXRpb25zW3Jvd107XG4gICAgICAgICAgICBpZiAodGhpcy4kYW5ub3RhdGlvbnNbcm93XSlcbiAgICAgICAgICAgICAgICBjbGFzc05hbWUgKz0gdGhpcy4kYW5ub3RhdGlvbnNbcm93XS5jbGFzc05hbWU7XG4gICAgICAgICAgICBpZiAoY2VsbC5lbGVtZW50LmNsYXNzTmFtZSAhPSBjbGFzc05hbWUpXG4gICAgICAgICAgICAgICAgY2VsbC5lbGVtZW50LmNsYXNzTmFtZSA9IGNsYXNzTmFtZTtcblxuICAgICAgICAgICAgdmFyIGhlaWdodCA9IHNlc3Npb24uZ2V0Um93TGVuZ3RoKHJvdykgKiBjb25maWcubGluZUhlaWdodCArIFwicHhcIjtcbiAgICAgICAgICAgIGlmIChoZWlnaHQgIT0gY2VsbC5lbGVtZW50LnN0eWxlLmhlaWdodClcbiAgICAgICAgICAgICAgICBjZWxsLmVsZW1lbnQuc3R5bGUuaGVpZ2h0ID0gaGVpZ2h0O1xuXG4gICAgICAgICAgICBpZiAoZm9sZFdpZGdldHMpIHtcbiAgICAgICAgICAgICAgICB2YXIgYyA9IGZvbGRXaWRnZXRzW3Jvd107XG4gICAgICAgICAgICAgICAgaWYgKGMgPT0gbnVsbClcbiAgICAgICAgICAgICAgICAgICAgYyA9IGZvbGRXaWRnZXRzW3Jvd10gPSBzZXNzaW9uLmdldEZvbGRXaWRnZXQocm93KTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGMpIHtcbiAgICAgICAgICAgICAgICBpZiAoIWNlbGwuZm9sZFdpZGdldCkge1xuICAgICAgICAgICAgICAgICAgICBjZWxsLmZvbGRXaWRnZXQgPSBkb20uY3JlYXRlRWxlbWVudChcInNwYW5cIik7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZWxlbWVudC5hcHBlbmRDaGlsZChjZWxsLmZvbGRXaWRnZXQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB2YXIgY2xhc3NOYW1lID0gXCJhY2VfZm9sZC13aWRnZXQgYWNlX1wiICsgYztcbiAgICAgICAgICAgICAgICBpZiAoYyA9PSBcInN0YXJ0XCIgJiYgcm93ID09IGZvbGRTdGFydCAmJiByb3cgPCBmb2xkLmVuZC5yb3cpXG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZSArPSBcIiBhY2VfY2xvc2VkXCI7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWUgKz0gXCIgYWNlX29wZW5cIjtcbiAgICAgICAgICAgICAgICBpZiAoY2VsbC5mb2xkV2lkZ2V0LmNsYXNzTmFtZSAhPSBjbGFzc05hbWUpXG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZm9sZFdpZGdldC5jbGFzc05hbWUgPSBjbGFzc05hbWU7XG5cbiAgICAgICAgICAgICAgICB2YXIgaGVpZ2h0ID0gY29uZmlnLmxpbmVIZWlnaHQgKyBcInB4XCI7XG4gICAgICAgICAgICAgICAgaWYgKGNlbGwuZm9sZFdpZGdldC5zdHlsZS5oZWlnaHQgIT0gaGVpZ2h0KVxuICAgICAgICAgICAgICAgICAgICBjZWxsLmZvbGRXaWRnZXQuc3R5bGUuaGVpZ2h0ID0gaGVpZ2h0O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoY2VsbC5mb2xkV2lkZ2V0KSB7XG4gICAgICAgICAgICAgICAgICAgIGNlbGwuZWxlbWVudC5yZW1vdmVDaGlsZChjZWxsLmZvbGRXaWRnZXQpO1xuICAgICAgICAgICAgICAgICAgICBjZWxsLmZvbGRXaWRnZXQgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgdmFyIHRleHQgPSBsYXN0TGluZU51bWJlciA9IGd1dHRlclJlbmRlcmVyXG4gICAgICAgICAgICAgICAgPyBndXR0ZXJSZW5kZXJlci5nZXRUZXh0KHNlc3Npb24sIHJvdylcbiAgICAgICAgICAgICAgICA6IHJvdyArIGZpcnN0TGluZU51bWJlcjtcbiAgICAgICAgICAgIGlmICh0ZXh0ICE9PSBjZWxsLnRleHROb2RlLmRhdGEpXG4gICAgICAgICAgICAgICAgY2VsbC50ZXh0Tm9kZS5kYXRhID0gdGV4dDtcblxuICAgICAgICAgICAgcm93Kys7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmVsZW1lbnQuc3R5bGUuaGVpZ2h0ID0gY29uZmlnLm1pbkhlaWdodCArIFwicHhcIjtcblxuICAgICAgICBpZiAodGhpcy4kZml4ZWRXaWR0aCB8fCBzZXNzaW9uLiR1c2VXcmFwTW9kZSlcbiAgICAgICAgICAgIGxhc3RMaW5lTnVtYmVyID0gc2Vzc2lvbi5nZXRMZW5ndGgoKSArIGZpcnN0TGluZU51bWJlcjtcblxuICAgICAgICB2YXIgZ3V0dGVyV2lkdGggPSBndXR0ZXJSZW5kZXJlciBcbiAgICAgICAgICAgID8gZ3V0dGVyUmVuZGVyZXIuZ2V0V2lkdGgoc2Vzc2lvbiwgbGFzdExpbmVOdW1iZXIsIGNvbmZpZylcbiAgICAgICAgICAgIDogbGFzdExpbmVOdW1iZXIudG9TdHJpbmcoKS5sZW5ndGggKiBjb25maWcuY2hhcmFjdGVyV2lkdGg7XG4gICAgICAgIFxuICAgICAgICB2YXIgcGFkZGluZyA9IHRoaXMuJHBhZGRpbmcgfHwgdGhpcy4kY29tcHV0ZVBhZGRpbmcoKTtcbiAgICAgICAgZ3V0dGVyV2lkdG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GFkZGluZykge1xuICAgICAgICB0aGlzLiRwYWRkaW5nID0gcGFkZGluZztcbiAgICB9O1xuICAgIHRoaXMuc2V0U2Vzc2lvbiA9IGZ1bmN0aW9uKHNlc3Npb24pIHtcbiAgICAgICAgdGhpcy5zZXNzaW9uID0gc2Vzc2lvbjtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMuc2V0TWFya2VycyA9IGZ1bmN0aW9uKG1hcmtlcnMpIHtcbiAgICAgICAgdGhpcy5tYXJrZXJzID0gbWFya2VycztcbiAgICB9O1xuXG4gICAgdGhpcy51cGRhdGUgPSBmdW5jdGlvbihjb25maWcpIHtcbiAgICAgICAgaWYgKCFjb25maWcpIHJldHVybjtcblxuICAgICAgICB0aGlzLmNvbmZpZyA9IGNvbmZpZztcblxuXG4gICAgICAgIHZhciBodG1sID0gW107XG4gICAgICAgIGZvciAodmFyIGtleSBpbiB0aGlzLm1hcmtlcnMpIHtcbiAgICAgICAgICAgIHZhciBtYXJrZXIgPSB0aGlzLm1hcmtlcnNba2V5XTtcblxuICAgICAgICAgICAgaWYgKCFtYXJrZXIucmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBtYXJrZXIudXBkYXRlKGh0bWwsIHRoaXMsIHRoaXMuc2Vzc2lvbiwgY29uZmlnKTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHJhbmdlID0gbWFya2VyLnJhbmdlLmNsaXBSb3dzKGNvbmZpZy5maXJzdFJvdywgY29uZmlnLmxhc3RSb3cpO1xuICAgICAgICAgICAgaWYgKHJhbmdlLmlzRW1wdHkoKSkgY29udGludWU7XG5cbiAgICAgICAgICAgIHJhbmdlID0gcmFuZ2UudG9TY3JlZW5SYW5nZSh0aGlzLnNlc3Npb24pO1xuICAgICAgICAgICAgaWYgKG1hcmtlci5yZW5kZXJlcikge1xuICAgICAgICAgICAgICAgIHZhciB0b3AgPSB0aGlzLiRnZXRUb3AocmFuZ2Uuc3RhcnQucm93LCBjb25maWcpO1xuICAgICAgICAgICAgICAgIHZhciBsZWZ0ID0gdGhpcy4kcGFkZGluZyArICh0aGlzLnNlc3Npb24uJGJpZGlIYW5kbGVyLmlzQmlkaVJvdyhyYW5nZS5zdGFydC5yb3cpXG4gICAgICAgICAgICAgICAgICAgID8gdGhpcy5zZXNzaW9uLiRiaWRpSGFuZGxlci5nZXRQb3NMZWZ0KHJhbmdlLnN0YXJ0LmNvbHVtbilcbiAgICAgICAgICAgICAgICAgICAgOiByYW5nZS5zdGFydC5jb2x1bW4gKiBjb25maWcuY2hhcmFjdGVyV2lkdGgpO1xuICAgICAgICAgICAgICAgIG1hcmtlci5yZW5kZXJlcihodG1sLCByYW5nZSwgbGVmdCwgdG9wLCBjb25maWcpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChtYXJrZXIudHlwZSA9PSBcImZ1bGxMaW5lXCIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmRyYXdGdWxsTGluZU1hcmtlcihodG1sLCByYW5nZSwgbWFya2VyLmNsYXp6LCBjb25maWcpO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChtYXJrZXIudHlwZSA9PSBcInNjcmVlbkxpbmVcIikge1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhd1NjcmVlbkxpbmVNYXJrZXIoaHRtbCwgcmFuZ2UsIG1hcmtlci5jbGF6eiwgY29uZmlnKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgIGlmIChtYXJrZXIudHlwZSA9PSBcInRleHRcIilcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kcmF3VGV4dE1hcmtlcihodG1sLCByYW5nZSwgbWFya2VyLmNsYXp6LCBjb25maWcpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kcmF3TXVsdGlMaW5lTWFya2VyKGh0bWwsIHJhbmdlLCB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XNwbGF5SW5kZW50R3VpZGVzID0gZnVuY3Rpb24oZGlzcGxheSkge1xuICAgICAgICBpZiAodGhpcy5kaXNwbGF5SW5kZW50R3VpZGVzID09IGRpc3BsYXkpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG5cbiAgICAgICAgdGhpcy5kaXNwbGF5SW5kZW50R3VpZGVzID0gZGlzcGxheTtcbiAgICAgICAgdGhpcy4kY29tcHV0ZVRhYlN0cmluZygpO1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9O1xuXG4gICAgdGhpcy4kdGFiU3RyaW5ncyA9IFtdO1xuICAgIHRoaXMub25DaGFuZ2VUYWJTaXplID1cbiAgICB0aGlzLiRjb21wdXRlVGFiU3RyaW5nID0gZnVuY3Rpb24oKSB7XG4gICAgICAgIHZhciB0YWJTaXplID0gdGhpcy5zZXNzaW9uLmdldFRhYlNpemUoKTtcbiAgICAgICAgdGhpcy50YWJTaXplID0gdGFiU2l6ZTtcbiAgICAgICAgdmFyIHRhYlN0ciA9IHRoaXMuJHRhYlN0cmluZ3MgPSBbMF07XG4gICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgdGFiU2l6ZSArIDE7IGkrKykge1xuICAgICAgICAgICAgaWYgKHRoaXMuc2hvd0ludmlzaWJsZXMpIHtcbiAgICAgICAgICAgICAgICB0YWJTdHIucHVzaChcIjxzcGFuIGNsYXNzPSdhY2VfaW52aXNpYmxlIGFjZV9pbnZpc2libGVfdGFiJz5cIlxuICAgICAgICAgICAgICAgICAgICArIGxhbmcuc3RyaW5nUmVwZWF0KHRoaXMuVEFCX0NIQVIsIGkpXG4gICAgICAgICAgICAgICAgICAgICsgXCI8L3NwYW4+XCIpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0YWJTdHIucHVzaChsYW5nLnN0cmluZ1JlcGVhdChcIiBcIiwgaSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzL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vbnRlbnQgKyBcIjwvc3Bhbj5cIjtcbiAgICAgICAgICAgIHRoaXMuJHRhYlN0cmluZ3NbXCJcXHRcIl0gPSBcIjxzcGFuIGNsYXNzPSdcIiArIGNsYXNzTmFtZSArIHRhYkNsYXNzICsgXCInPlwiICsgdGFiQ29udGVudCArIFwiPC9zcGFuPlwiO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMudXBkYXRlTGluZXMgPSBmdW5jdGlvbihjb25maWcsIGZpcnN0Um93LCBsYXN0Um93KSB7XG4gICAgICAgIGlmICh0aGlzLmNvbmZpZy5sYXN0Um93ICE9IGNvbmZpZy5sYXN0Um93IHx8XG4gICAgICAgICAgICB0aGlzLmNvbmZpZy5maXJzdFJvdyAhPSBjb25maWcuZmlyc3RSb3cpIHtcbiAgICAgICAgICAgIHRoaXMuc2Nyb2xsTGluZXMoY29uZmlnKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmNvbmZpZyA9IGNvbmZpZztcblxuICAgICAgICB2YXIgZmlyc3QgPSBNYXRoLm1heChmaXJzdFJvdywgY29uZmlnLmZpcnN0Um93KTtcbiAgICAgICAgdmFyIGxhc3QgPSBNYXRoLm1pbihsYXN0Um93LCBjb25maWcubGFzdFJvdyk7XG5cbiAgICAgICAgdmFyIGxpbmVFbGVtZW50cyA9IHRoaXMuZWxlbWVudC5jaGlsZE5vZGVzO1xuICAgICAgICB2YXIgbGluZUVsZW1lbnRzSWR4ID0gMDtcblxuICAgICAgICBmb3IgKHZhciByb3cgPSBjb25maWcuZmlyc3RSb3c7IHJvdyA8IGZpcnN0OyByb3crKykge1xuICAgICAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5zZXNzaW9uLmdldEZvbGRMaW5lKHJvdyk7XG4gICAgICAgICAgICBpZiAoZm9sZExpbmUpIHtcbiAgICAgICAgICAgICAgICBpZiAoZm9sZExpbmUuY29udGFpbnNSb3coZmlyc3QpKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpcnN0ID0gZm9sZExpbmUuc3RhcnQucm93O1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxpbmVFbGVtZW50c0lkeCArKztcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciByb3cgPSBmaXJzdDtcbiAgICAgICAgdmFyIGZvbGRMaW5lID0gdGhpcy5zZXNzaW9uLmdldE5leHRGb2xkTGluZShyb3cpO1xuICAgICAgICB2YXIgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOiBJbmZpbml0eTtcblxuICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgICAgaWYgKHJvdyA+IGZvbGRTdGFydCkge1xuICAgICAgICAgICAgICAgIHJvdyA9IGZvbGRMaW5lLmVuZC5yb3crMTtcbiAgICAgICAgICAgICAgICBmb2xkTGluZSA9IHRoaXMuc2Vzc2lvbi5nZXROZXh0Rm9sZExpbmUocm93LCBmb2xkTGluZSk7XG4gICAgICAgICAgICAgICAgZm9sZFN0YXJ0ID0gZm9sZExpbmUgPyBmb2xkTGluZS5zdGFydC5yb3cgOkluZmluaXR5O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHJvdyA+IGxhc3QpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIHZhciBsaW5lRWxlbWVudCA9IGxpbmVFbGVtZW50c1tsaW5lRWxlbWVudHNJZHgrK107XG4gICAgICAgICAgICBpZiAobGluZUVsZW1lbnQpIHtcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IFtdO1xuICAgICAgICAgICAgICAgIHRoaXMuJHJlbmRlckxpbmUoXG4gICAgICAgICAgICAgICAgICAgIGh0bWwsIHJvdywgIXRoaXMuJHVzZUxpbmVHcm91cHMoKSwgcm93ID09IGZvbGRTdGFydCA/IGZvbGRMaW5lIDogZmFsc2VcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGxpbmVFbGVtZW50LnN0eWxlLmhlaWdodCA9IGNvbmZpZy5saW5lSGVpZ2h0ICogdGhpcy5zZXNzaW9uLmdldFJvd0xlbmd0aChyb3cpICsgXCJweFwiO1xuICAgICAgICAgICAgICAgIGxpbmVFbGVtZW50LmlubmVySFRNTCA9IGh0bWwuam9pbihcIlwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJvdysrO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuc2Nyb2xsTGluZXMgPSBmdW5jdGlvbihjb25maWcpIHtcbiAgICAgICAgdmFyIG9sZENvbmZpZyA9IHRoaXMuY29uZmlnO1xuICAgICAgICB0aGlzLmNvbmZpZyA9IGNvbmZpZztcblxuICAgICAgICBpZiAoIW9sZENvbmZpZyB8fCBvbGRDb25maWcubGFzdFJvdyA8IGNvbmZpZy5maXJzdFJvdylcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnVwZGF0ZShjb25maWcpO1xuXG4gICAgICAgIGlmIChjb25maWcubGFzdFJvdyA8IG9sZENvbmZpZy5maXJzdFJvdylcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnVwZGF0ZShjb25maWcpO1xuXG4gICAgICAgIHZhciBlbCA9IHRoaXMuZWxlbWVudDtcbiAgICAgICAgaWYgKG9sZENvbmZpZy5maXJzdFJvdyA8IGNvbmZpZy5maXJzdFJvdylcbiAgICAgICAgICAgIGZvciAodmFyIHJvdz10aGlzLnNlc3Npb24uZ2V0Rm9sZGVkUm93Q291bnQob2xkQ29uZmlnLmZpcnN0Um93LCBjb25maWcuZmlyc3RSb3cgLSAxKTsgcm93PjA7IHJvdy0tKVxuICAgICAgICAgICAgICAgIGVsLnJlbW92ZUNoaWxkKGVsLmZpcnN0Q2hpbGQpO1xuXG4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lbGVtZW50Lm93bmVyRG9jdW1lbnQuY3JlYXRlRG9jdW1lbnRGcmFnbWVudCgpO1xuICAgICAgICB2YXIgcm93ID0gZmlyc3RSb3c7XG4gICAgICAgIHZhciBmb2xkTGluZSA9IHRoaXMuc2Vzc2lvbi5nZXROZXh0Rm9sZExpbmUocm93KTtcbiAgICAgICAgdmFyIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG5cbiAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICAgIGlmIChyb3cgPiBmb2xkU3RhcnQpIHtcbiAgICAgICAgICAgICAgICByb3cgPSBmb2xkTGluZS5lbmQucm93KzE7XG4gICAgICAgICAgICAgICAgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TmV4dEZvbGRMaW5lKHJvdywgZm9sZExpbmUpO1xuICAgICAgICAgICAgICAgIGZvbGRTdGFydCA9IGZvbGRMaW5lID8gZm9sZExpbmUuc3RhcnQucm93IDogSW5maW5pdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocm93ID4gbGFzdFJvdylcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgdmFyIGNvbnRhaW5lciA9IGRvbS5jcmVhdGVFbGVtZW50KFwiZGl2XCIpO1xuXG4gICAgICAgICAgICB2YXIgaHRtbCA9IFtdO1xuICAgICAgICAgICAgdGhpcy4kcmVuZGVyTGluZShodG1sLCByb3csIGZhbHNlLCByb3cgPT0gZm9sZFN0YXJ0ID8gZm9sZExpbmUgOiBmYWxzZSk7XG4gICAgICAgICAgICBjb250YWluZXIuaW5uZXJIVE1MID0gaHRtbC5qb2luKFwiXCIpO1xuICAgICAgICAgICAgaWYgKHRoaXMuJHVzZUxpbmVHcm91cHMoKSkge1xuICAgICAgICAgICAgICAgIGNvbnRhaW5lci5jbGFzc05hbWUgPSAnYWNlX2xpbmVfZ3JvdXAnO1xuICAgICAgICAgICAgICAgIGZyYWdtZW50LmFwcGVuZENoaWxkKGNvbnRhaW5lcik7XG4gICAgICAgICAgICAgICAgY29udGFpbmVyLnN0eWxlLmhlaWdodCA9IGNvbmZpZy5saW5lSGVpZ2h0ICogdGhpcy5zZXNzaW9uLmdldFJvd0xlbmd0aChyb3cpICsgXCJweFwiO1xuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHdoaWxlKGNvbnRhaW5lci5maXJzdENoaWxkKVxuICAgICAgICAgICAgICAgICAgICBmcmFnbWVudC5hcHBlbmRDaGlsZChjb250YWluZXIuZmlyc3RDaGlsZCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJvdysrO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmcmFnbWVudDtcbiAgICB9O1xuXG4gICAgdGhpcy51cGRhdGUgPSBmdW5jdGlvbihjb25maWcpIHtcbiAgICAgICAgdGhpcy5jb25maWcgPSBjb25maWc7XG5cbiAgICAgICAgdmFyIGh0bWwgPSBbXTtcbiAgICAgICAgdmFyIGZpcnN0Um93ID0gY29uZmlnLmZpcnN0Um93LCBsYXN0Um93ID0gY29uZmlnLmxhc3RSb3c7XG5cbiAgICAgICAgdmFyIHJvdyA9IGZpcnN0Um93O1xuICAgICAgICB2YXIgZm9sZExpbmUgPSB0aGlzLnNlc3Npb24uZ2V0TmV4dEZvbGRMaW5lKHJvdyk7XG4gICAgICAgIHZhciBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6IEluZmluaXR5O1xuXG4gICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICBpZiAocm93ID4gZm9sZFN0YXJ0KSB7XG4gICAgICAgICAgICAgICAgcm93ID0gZm9sZExpbmUuZW5kLnJvdysxO1xuICAgICAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy5zZXNzaW9uLmdldE5leHRGb2xkTGluZShyb3csIGZvbGRMaW5lKTtcbiAgICAgICAgICAgICAgICBmb2xkU3RhcnQgPSBmb2xkTGluZSA/IGZvbGRMaW5lLnN0YXJ0LnJvdyA6SW5maW5pdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocm93ID4gbGFzdFJvdylcbiAgICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgaWYgKHRoaXMuJHVzZUxpbmVHcm91cHMoKSlcbiAgICAgICAgICAgICAgICBodG1sLnB1c2goXCI8ZGl2IGNsYXNzPSdhY2VfbGluZV9ncm91cCcgc3R5bGU9J2hlaWdodDpcIiwgY29uZmlnLmxpbmVIZWlnaHQqdGhpcy5zZXNzaW9uLmdldFJvd0xlbmd0aChyb3cpLCBcInB4Jz5cIik7XG5cbiAgICAgICAgICAgIHRoaXMuJHJlbmRlckxpbmUoaHRtbCwgcm93LCBmYWxzZSwgcm93ID09IGZvbGRTdGFydCA/IGZvbGRMaW5lIDogZmFsc2UpO1xuXG4gICAgICAgICAgICBpZiAodGhpcy4kdXNlTGluZUdyb3VwcygpKVxuICAgICAgICAgICAgICAgIGh0bWwucHVzaChcIjwvZGl2PlwiKTsgLy8gZW5kIHRoZSBsaW5lIGdyb3VwXG5cbiAgICAgICAgICAgIHJvdysrO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuZWxlbWVudC5pbm5lckhUTUwgPSBodG1sLmpvaW4oXCJcIik7XG4gICAgfTtcblxuICAgIHRoaXMuJHRleHRUb2tlbiA9IHtcbiAgICAgICAgXCJ0ZXh0XCI6IHRydWUsXG4gICAgICAgIFwicnBhcmVuXCI6IHRydWUsXG4gICAgICAgIFwibHBhcmVuXCI6IHRydWVcbiAgICB9O1xuXG4gICAgdGhpcy4kcmVuZGVyVG9rZW4gPSBmdW5jdGlvbihzdHJpbmdCdWlsZGVyLCBzY3JlZW5Db2x1bW4sIHRva2VuLCB2YWx1ZSkge1xuICAgICAgICB2YXIgc2VsZiA9IHRoaXM7XG4gICAgICAgIHZhciByZXBsYWNl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xuICAgICAgICAgICAgICAgIHNjcmVlbkNvbHVtbiArPSAxO1xuICAgICAgICAgICAgICAgIHJldHVybiBcIjxzcGFuIGNsYXNzPSdcIiArIGNsYXNzVG9Vc2UgKyBcIicgc3R5bGU9J3dpZHRoOlwiICtcbiAgICAgICAgICAgICAgICAgICAgKHNlbGYuY29uZmlnLmNoYXJhY3RlcldpZHRoICogMikgK1xuICAgICAgICAgICAgICAgICAgICBcInB4Jz5cIiArIHNwYWNlICsgXCI8L3NwYW4+XCI7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCI8c3BhbiBjbGFzcz0nYWNlX2ludmlzaWJsZSBhY2VfaW52aXNpYmxlX3NwYWNlIGFjZV9pbnZhbGlkJz5cIiArIHNlbGYuU1BBQ0VfQ0hBUiArIFwiPC9zcGFuPlwiO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gKz0gMTtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCI8c3BhbiBjbGFzcz0nYWNlX2Nqaycgc3R5bGU9J3dpZHRoOlwiICtcbiAgICAgICAgICAgICAgICAgICAgKHNlbGYuY29uZmlnLmNoYXJhY3RlcldpZHRoICogMikgK1xuICAgICAgICAgICAgICAgICAgICBcInB4Jz5cIiArIGMgKyBcIjwvc3Bhbj5cIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgb3V0cHV0ID0gdmFsdWUucmVwbGFjZShyZXBsYWNlUmVnLCByZXBsYWNlRnVuYyk7XG5cbiAgICAgICAgaWYgKCF0aGlzLiR0ZXh0VG9rZW5bdG9rZW4udHlwZV0pIHtcbiAgICAgICAgICAgIHZhciBjbGFzc2VzID0gXCJhY2VfXCIgKyB0b2tlbi50eXBlLnJlcGxhY2UoL1xcLi9nLCBcIiBhY2VfXCIpO1xuICAgICAgICAgICAgdmFyIHN0eWxlID0gXCJc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ICAgICAgIHN0cmluZ0J1aWxkZXIucHVzaChsYW5nLnN0cmluZ1JlcGVhdCh0aGlzLiR0YWJTdHJpbmdzW1wiXFx0XCJdLCBjb2xzKSk7XG4gICAgICAgICAgICByZXR1cm4gdmFsdWUuc3Vic3RyKGNvbHMpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICB9O1xuXG4gICAgdGhpcy4kcmVuZGVyV3JhcHBlZExpbmUgPSBmdW5jdGlvbihzdHJpbmdCdWlsZGVyLCB0b2tlbnMsIHNwbGl0cywgb25seUNvbnRlbnRzKSB7XG4gICAgICAgIHZhciBjaGFycyA9IDA7XG4gICAgICAgIHZhciBzcGxpdCA9IDA7XG4gICAgICAgIHZhciBzcGxpdENoYXJzID0gc3BsaXRzWzBdO1xuICAgICAgICB2YXIgc2NyZWVuQ29sdW1uID0gMDtcblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIHRva2VuID0gdG9rZW5zW2ldO1xuICAgICAgICAgICAgdmFyIHZhbHVlID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICBpZiAoaSA9PSAwICYmIHRoaXMuZGlzcGxheUluZGVudEd1aWRlcykge1xuICAgICAgICAgICAgICAgIGNoYXJzID0gdmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHZhbHVlID0gdGhpcy5yZW5kZXJJbmRlbnRHdWlkZShzdHJpbmdCdWlsZGVyLCB2YWx1ZSwgc3BsaXRDaGFycyk7XG4gICAgICAgICAgICAgICAgaWYgKCF2YWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2hhcnMgLT0gdmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY2hhcnMgKyB2YWx1ZS5sZW5ndGggPCBzcGxpdENoYXJzKSB7XG4gICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uID0gdGhpcy4kcmVuZGVyVG9rZW4oc3RyaW5nQnVpbGRlciwgc2NyZWVuQ29sdW1uLCB0b2tlbiwgdmFsdWUpO1xuICAgICAgICAgICAgICAgIGNoYXJzICs9IHZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGNoYXJzICsgdmFsdWUubGVuZ3RoID49IHNwbGl0Q2hhcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgc2NyZWVuQ29sdW1uID0gdGhpcy4kcmVuZGVyVG9rZW4oXG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmdCdWlsZGVyLCBzY3JlZW5Db2x1bW4sXG4gICAgICAgICAgICAgICAgICAgICAgICB0b2tlbiwgdmFsdWUuc3Vic3RyaW5nKDAsIHNwbGl0Q2hhcnMgLSBjaGFycylcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgdmFsdWUgPSB2YWx1ZS5zdWJzdHJpbmcoc3BsaXRDaGFycyAtIGNoYXJzKTtcbiAgICAgICAgICAgICAgICAgICAgY2hhcnMgPSBzcGxpdENoYXJzO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICghb25seUNvbnRlbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmdCdWlsZGVyLnB1c2goXCI8L2Rpdj5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIjxkaXYgY2xhc3M9J2FjZV9saW5lJyBzdHlsZT0naGVpZ2h0OlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLmxpbmVIZWlnaHQsIFwicHgnPlwiXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgc3RyaW5nQnVpbGRlci5wdXNoKGxhbmcuc3RyaW5nUmVwZWF0KFwiXFx4YTBcIiwgc3BsaXRzLmluZGVudCkpO1xuXG4gICAgICAgICAgICAgICAgICAgIHNwbGl0ICsrO1xuICAgICAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gPSAwO1xuICAgICAgICAgICAgICAgICAgICBzcGxpdENoYXJzID0gc3BsaXRzW3NwbGl0XSB8fCBOdW1iZXIuTUFYX1ZBTFVFO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY2hhcnMgKz0gdmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICBzY3JlZW5Db2x1bW4gPSB0aGlzLiRyZW5kZXJUb2tlbihcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIsIHNjcmVlbkNvbHVtbiwgdG9rZW4sIHZhbHVlXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJHJlbmRlclNpbXBsZUxpbmUgPSBmdW5jdGlvbihzdHJpbmdCdWlsZGVyLCB0b2tlbnMpIHtcbiAgICAgICAgdmFyIHNjcmVlbkNvbHVtbiA9IDA7XG4gICAgICAgIHZhciB0b2tlbiA9IHRva2Vuc1swXTtcbiAgICAgICAgdmFyIHZhbHVlID0gdG9rZW4udmFsdWU7XG4gICAgICAgIGlmICh0aGlzLmRpc3BsYXlJbmRlbnRHdWlkZXMpXG4gICAgICAgICAgICB2YWx1ZSA9IHRoaXMucmVuZGVySW5kZW50R3VpZGUoc3RyaW5nQnVpbGRlciwgdmFsdWUpO1xuICAgICAgICBpZiAodmFsdWUpXG4gICAgICAgICAgICBzY3JlZW5Db2x1bW4gPSB0aGlzLiRyZW5kZXJUb2tlbihzdHJpbmdCdWlsZGVyLCBzY3JlZW5Db2x1bW4sIHRva2VuLCB2YWx1ZSk7XG4gICAgICAgIGZvciAodmFyIGkgPSAxOyBpIDwgdG9rZW5zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB0b2tlbiA9IHRva2Vuc1tpXTtcbiAgICAgICAgICAgIHZhbHVlID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICBzY3JlZW5Db2x1bW4gPSB0aGlzLiRyZW5kZXJUb2tlbihzdHJpbmdCdWlsZGVyLCBzY3JlZW5Db2x1bW4sIHRva2VuLCB2YWx1ZSk7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIHRoaXMuJHJlbmRlckxpbmUgPSBmdW5jdGlvbihzdHJpbmdCdWlsZGVyLCByb3csIG9ubHlDb250ZW50cywgZm9sZExpbmUpIHtcbiAgICAgICAgaWYgKCFmb2xkTGluZSAmJiBmb2xkTGluZSAhPSBmYWxzZSlcbiAgICAgICAgICAgIGZvbGRMaW5lID0gdGhpcy5zZXNzaW9uLmdldEZvbGRMaW5lKHJvdyk7XG5cbiAgICAgICAgaWYgKGZvbGRMaW5lKVxuICAgICAgICAgICAgdmFyIHRva2VucyA9IHRoaXMuJGdldEZvbGRMaW5lVG9rZW5zKHJvdywgZm9sZExpbmUpO1xuICAgICAgICBlbHNlXG4gICAgICAgICAgICB2YXIgdG9rZW5zID0gdGhpcy5zZXNzaW9uLmdldFRva2Vucyhyb3cpO1xuXG5cbiAgICAgICAgaWYgKCFvbmx5Q29udGVudHMpIHtcbiAgICAgICAgICAgIHN0cmluZ0J1aWxkZXIucHVzaChcbiAgICAgICAgICAgICAgICBcIjxkaXYgY2xhc3M9J2FjZV9saW5lJyBzdHlsZT0naGVpZ2h0OlwiLCBcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5jb25maWcubGluZUhlaWdodCAqIChcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuJHVzZUxpbmVHcm91cHMoKSA/IDEgOnRoaXMuc2Vzc2lvbi5nZXRSb3dMZW5ndGgocm93KVxuICAgICAgICAgICAgICAgICAgICApLCBcInB4Jz5cIlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0b2tlbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICB2YXIgc3BsaXRzID0gdGhpcy5zZXNzaW9uLmdldFJvd1NwbGl0RGF0YShyb3cpO1xuICAgICAgICAgICAgaWYgKHNwbGl0cyAmJiBzcGxpdHMubGVuZ3RoKVxuICAgICAgICAgICAgICAgIHRoaXMuJHJlbmRlcldyYXBwZWRMaW5lKHN0cmluZ0J1aWxkZXIsIHRva2Vucywgc3BsaXRzLCBvbmx5Q29udGVudHMpO1xuICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgIHRoaXMuJHJlbmRlclNpbXBsZUxpbmUoc3RyaW5nQnVpbGRlciwgdG9rZW5zKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICh0aGlzLnNob3dJbnZpc2libGVzKSB7XG4gICAgICAgICAgICBpZiAoZm9sZExpbmUpXG4gICAgICAgICAgICAgICAgcm93ID0gZm9sZExpbmUuZW5kLnJvdztcblxuICAgICAgICAgICAgc3RyaW5nQnVpbGRlci5wdXNoKFxuICAgICAgICAgICAgICAgIFwiPHNwYW4gY2xhc3M9J2FjZV9pbnZpc2libGUgYWNlX2ludmlzaWJsZV9lb2wnPlwiLFxuICAgICAgICAgICAgICAgIHJvdyA9PSB0aGlzLnNlc3Npb24uZ2V0TGVuZ3RoKCkgLSAxID8gdGhpcy5FT0ZfQ0hBUiA6IHRoaXMuRU9MX0NIQVIsXG4gICAgICAgICAgICAgICAgXCI8L3NwYW4+XCJcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFvbmx5Q29udGVudHMpXG4gICAgICAgICAgICBzdHJpbmdCdWlsZGVyLnB1c2goXCI8L2Rpdj5cIik7XG4gICAgfTtcblxuICAgIHRoaXMuJGdldEZvbGRMaW5lVG9rZW5zID0gZnVuY3Rpb24ocm93LCBmb2xkTGluZSkge1xuICAgICAgICB2YXIgc2Vzc2lvbiA9IHRoaXMuc2Vzc2lvbjtcbiAgICAgICAgdmFyIHJlbmRlclRva2VucyA9IFtdO1xuXG4gICAgICAgIGZ1bmN0aW9uIGFkZFRva2Vucyh0b2tlbnMsIGZyb20sIHRvKSB7XG4gICAgICAgICAgICB2YXIgaWR4ID0gMCwgY29sID0gMDtcbiAgICAgICAgICAgIHdoaWxlICgoY29sICsgdG9rZW5zW2lkeF0udmFsdWUubGVuZ3RoKSA8IGZyb20pIHtcbiAgICAgICAgICAgICAgICBjb2wgKz0gdG9rZW5zW2lkeF0udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGlkeCsrO1xuXG4gICAgICAgICAgICAgICAgaWYgKGlkeCA9PSB0b2tlbnMubGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoY29sICE9IGZyb20pIHtcbiAgICAgICAgICAgICAgICB2YXIgdmFsdWUgPSB0b2tlbnNbaWR4XS52YWx1ZS5zdWJzdHJpbmcoZnJvbSAtIGNvbCk7XG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCA+ICh0byAtIGZyb20pKVxuICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHZhbHVlLnN1YnN0cmluZygwLCB0byAtIGZyb20pO1xuXG4gICAgICAgICAgICAgICAgcmVuZGVyVG9rZW5zLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiB0b2tlbnNbaWR4XS50eXBlLFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsdWVcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGNvbCA9IGZyb20gKyB2YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWR4ICs9IDE7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHdoaWxlIChjb2wgPCB0byAmJiBpZHggPCB0b2tlbnMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgdmFyIHZhbHVlID0gdG9rZW5zW2lkeF0udmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlLmxlbmd0aCArIGNvbCA+IHRvKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlbmRlclRva2Vucy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHRva2Vuc1tpZHhdLnR5cGUsXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogdmFsdWUuc3Vic3RyaW5nKDAsIHRvIC0gY29sKVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVuZGVyVG9rZW5zLnB1c2godG9rZW5zW2lkeF0pO1xuICAgICAgICAgICAgICAgIGNvbCArPSB2YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgaWR4ICs9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdG9rZW5zID0gc2Vzc2lvbi5nZXRUb2tlbnMocm93KTtcbiAgICAgICAgZm9sZExpbmUud2FsayhmdW5jdGlvbihwbGFjZWhvbGRlciwgcm93LCBjb2x1bW4sIGxhc3RDb2x1bW4sIGlzTmV3Um93KSB7XG4gICAgICAgICAgICBpZiAocGxhY2Vob2xkZXIgIT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIHJlbmRlclRva2Vucy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogXCJmb2xkXCIsXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwbGFjZWhvbGRlclxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNOZXdSb3cpXG4gICAgICAgICAgICAgICAgICAgIHRva2VucyA9IHNlc3Npb24uZ2V0VG9rZW5zKHJvdyk7XG5cbiAgICAgICAgICAg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1bmN0aW9uKCl7XG4gICAgICAgICAgICAgICAgZG9tLmFkZENzc0NsYXNzKHRoaXMuZWxlbWVudCwgXCJhY2Vfc21vb3RoLWJsaW5raW5nXCIpO1xuICAgICAgICAgICAgfS5iaW5kKHRoaXMpKTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgdmFyIGJsaW5rID0gZnVuY3Rpb24oKXtcbiAgICAgICAgICAgIHRoaXMudGltZW91dElkID0gc2V0VGltZW91dChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICB1cGRhdGUoZmFsc2UpO1xuICAgICAgICAgICAgfSwgMC42ICogdGhpcy5ibGlua0ludGVydmFsKTtcbiAgICAgICAgfS5iaW5kKHRoaXMpO1xuXG4gICAgICAgIHRoaXMuaW50ZXJ2YWxJZCA9IHNldEludGVydmFsKGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdXBkYXRlKHRydWUpO1xuICAgICAgICAgICAgYmxpbmsoKTtcbiAgICAgICAgfSwgdGhpcy5ibGlua0ludGVydmFsKTtcblxuICAgICAgICBibGluaygpO1xuICAgIH07XG5cbiAgICB0aGlzLmdldFBpeGVsUG9zaXRpb24gPSBmdW5jdGlvbihwb3NpdGlvbiwgb25TY3JlZW4pIHtcbiAgICAgICAgaWYgKCF0aGlzLmNvbmZpZyB8fCAhdGhpcy5zZXNzaW9uKVxuICAgICAgICAgICAgcmV0dXJuIHtsZWZ0IDogMCwgdG9wIDogMH07XG5cbiAgICAgICAgaWYgKCFwb3NpdGlvbilcbiAgICAgICAgICAgIHBvc2l0aW9uID0gdGhpcy5zZXNzaW9uLnNlbGVjdGlvbi5nZXRDdXJzb3IoKTtcbiAgICAgICAgdmFyIHBvcyA9IHRoaXMuc2Vzc2lvbi5kb2N1bWVudFRvU2NyZWVuUG9zaXRpb24ocG9zaXRpb24pO1xuICAgICAgICB2YXIgY3Vyc29yTGVmdCA9IHRoaXMuJHBhZGRpbmcgKyAodGhpcy5zZXNzaW9uLiRiaWRpSG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HdheXNWaXNpYmxlIHx8ICF0aGlzLiR2U2Nyb2xsKVxuICAgICAgICAgICAgICAgIHRoaXMuJGxvb3Auc2NoZWR1bGUodGhpcy5DSEFOR0VfU0NST0xMKTtcbiAgICAgICAgfSxcbiAgICAgICAgaW5pdGlhbFZhbHVlOiBmYWxzZVxuICAgIH0sXG4gICAgZm9udFNpemU6ICB7XG4gICAgICAgIHNldDogZnVuY3Rpb24oc2l6ZSkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBzaXplID09IFwibnVtYmVyXCIpXG4gICAgICAgICAgICAgICAgc2l6ZSA9IHNpemUgKyBcInB4XCI7XG4gICAgICAgICAgICB0aGlzLmNvbnRhaW5lci5zdHlsZS5mb250U2l6ZSA9IHNpemU7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZUZvbnRTaXplKCk7XG4gICAgICAgIH0sXG4gICAgICAgIGluaXRpYWxWYWx1ZTogMTJcbiAgICB9LFxuICAgIGZvbnRGYW1pbHk6IHtcbiAgICAgICAgc2V0OiBmdW5jdGlvbihuYW1lKSB7XG4gICAgICAgICAgICB0aGlzLmNvbnRhaW5lci5zdHlsZS5mb250RmFtaWx5ID0gbmFtZTtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlRm9udFNpemUoKTtcbiAgICAgICAgfVxuICAgIH0sXG4gICAgbWF4TGluZXM6IHtcbiAgICAgICAgc2V0OiBmdW5jdGlvbih2YWwpIHtcbiAgICAgICAgICAgIHRoaXMudXBkYXRlRnVsbCgpO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBtaW5MaW5lczoge1xuICAgICAgICBzZXQ6IGZ1bmN0aW9uKHZhbCkge1xuICAgICAgICAgICAgdGhpcy51cGRhdGVGdWxsKCk7XG4gICAgICAgIH1cbiAgICB9LFxuICAgIG1heFBpeGVsSGVpZ2h0OiB7XG4gICAgICAgIHNldDogZnVuY3Rpb24odmFsKSB7XG4gICAgICAgICAgICB0aGlzLnVwZGF0ZUZ1bGwoKTtcbiAgIC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dmFyIG1zZyA9IGUuZGF0YTtcbiAgICAgICAgc3dpdGNoIChtc2cudHlwZSkge1xuICAgICAgICAgICAgY2FzZSBcImV2ZW50XCI6XG4gICAgICAgICAgICAgICAgdGhpcy5fc2lnbmFsKG1zZy5uYW1lLCB7ZGF0YTogbXNnLmRhdGF9KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJjYWxsXCI6XG4gICAgICAgICAgICAgICAgdmFyIGNhbGxiYWNrID0gdGhpcy5jYWxsYmFja3NbbXNnLmlkXTtcbiAgICAgICAgICAgICAgICBpZiAoY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sobXNnLmRhdGEpO1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpcy5jYWxsYmFja3NbbXNnLmlkXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiZXJyb3JcIjpcbiAgICAgICAgICAgICAgICB0aGlzLnJlcG9ydEVycm9yKG1zZy5kYXRhKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJsb2dcIjpcbiAgICAgICAgICAgICAgICB3aW5kb3cuY29uc29sZSAmJiBjb25zb2xlLmxvZyAmJiBjb25zb2xlLmxvZy5hcHBseShjb25zb2xlLCBtc2cuZGF0YSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHRoaXMucmVwb3J0RXJyb3IgPSBmdW5jdGlvbihlcnIpIHtcbiAgICAgICAgd2luZG93LmNvbnNvbGUgJiYgY29uc29sZS5lcnJvciAmJiBjb25zb2xlLmVycm9yKGVycik7XG4gICAgfTtcblxuICAgIHRoaXMuJG5vcm1hbGl6ZVBhdGggPSBmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgIHJldHVybiBuZXQucXVhbGlmeVVSTChwY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N0aW9uLnRvT3JpZW50ZWRSYW5nZSgpO1xuXG4gICAgICAgICAgICBpZiAob2xkUmFuZ2UgJiYgdG1wU2VsLmlzRW1wdHkoKSAmJiBpc1NhbWVQb2ludChvbGRSYW5nZS5jdXJzb3IsIHRtcFNlbC5jdXJzb3IpKVxuICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5zdWJzdHJhY3RQb2ludCh0bXBTZWwuY3Vyc29yKTtcbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChzaGlmdCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24uc3Vic3RyYWN0UG9pbnQocmFuZ2UuY3Vyc29yKTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJhbmdlKSB7XG4gICAgICAgICAgICAgICAgICAgIGVkaXRvci5yZW1vdmVTZWxlY3Rpb25NYXJrZXIocmFuZ2UpO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb24uYWRkUmFuZ2UocmFuZ2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzZWxlY3Rpb24uYWRkUmFuZ2UodG1wU2VsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVkaXRvci4kYmxvY2tTY3JvbGxpbmctLTtcbiAgICAgICAgICAgIGVkaXRvci5pblZpcnR1YWxTZWxlY3Rpb25Nb2RlID0gZmFsc2U7XG4gICAgICAgIH0pO1xuXG4gICAgfSBlbHNlIGlmIChzZWxlY3Rpb25Nb2RlID09IFwiYmxvY2tcIikge1xuICAgICAgICBlLnN0b3AoKTtcbiAgICAgICAgZWRpdG9yLmluVmlydHVhbFNlbGVjdGlvbk1vZGUgPSB0cnVlOyAgICAgICAgXG4gICAgICAgIHZhciBpbml0aWFsUmFuZ2U7XG4gICAgICAgIHZhciByZWN0U2VsID0gW107XG4gICAgICAgIHZhciBibG9ja1NlbGVjdCA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgdm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ycyhyZWN0U2VsKTtcbiAgICAgICAgICAgIGlmICghcmVjdFNlbC5sZW5ndGgpXG4gICAgICAgICAgICAgICAgcmVjdFNlbCA9IFtzZWxlY3Rpb24udG9PcmllbnRlZFJhbmdlKCldO1xuICAgICAgICAgICAgZWRpdG9yLiRibG9ja1Njcm9sbGluZysrO1xuICAgICAgICAgICAgaWYgKGluaXRpYWxSYW5nZSkge1xuICAgICAgICAgICAgICAgIGVkaXRvci5yZW1vdmVTZWxlY3Rpb25NYXJrZXIoaW5pdGlhbFJhbmdlKTtcbiAgICAgICAgICAgICAgICBzZWxlY3Rpb24udG9TaW5nbGVSYW5nZShpbml0aWFsUmFuZ2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCByZWN0U2VsLmxlbmd0aDsgaSsrKVxuICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGRSYW5nZShyZWN0U2VsW2ldKTtcbiAgICAgICAgICAgIGVkaXRvci5pblZpcnR1YWxTZWxlY3Rpb25Nb2RlID0gZmFsc2U7XG4gICAgICAgICAgICBlZGl0b3IuJG1vdXNlSGFuZGxlci4kY2xpY2tTZWxlY3Rpb24gPSBudWxsO1xuICAgICAgICAgICAgZWRpdG9yLiRibG9ja1Njcm9sbGluZy0tO1xuICAgICAgICB9O1xuXG4gICAgICAgIHZhciBvblNlbGVjdGlvbkludGVydmFsID0gYmxvY2tTZWxlY3Q7XG5cbiAgICAgICAgZXZlbnQuY2FwdHVyZShlZGl0b3IuY29udGFpbmVyLCBvbk1vdXNlU2VsZWN0aW9uLCBvbk1vdXNlU2VsZWN0aW9uRW5kKTtcbiAgICAgICAgdmFyIHRpbWVySWQgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpIHtvblNlbGVjdGlvbkludGVydmFsKCk7fSwgMjApO1xuXG4gICAgICAgIHJldHVybiBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgfVxufVxuXG5cbmV4cG9ydHMub25Nb3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XJzb3IgPT0gbGFzdFJhbmdlLnN0YXJ0KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZhciByYW5nZSA9IHRoaXMuZ2V0UmFuZ2UoKTtcbiAgICAgICAgICAgIHZhciBpc0JhY2t3YXJkcyA9IHRoaXMuaXNCYWNrd2FyZHMoKTtcbiAgICAgICAgICAgIHZhciBzdGFydFJvdyA9IHJhbmdlLnN0YXJ0LnJvdztcbiAgICAgICAgICAgIHZhciBlbmRSb3cgPSByYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgaWYgKHN0YXJ0Um93ID09IGVuZFJvdykge1xuICAgICAgICAgICAgICAgIGlmIChpc0JhY2t3YXJkcylcbiAgICAgICAgICAgICAgICAgICAgdmFyIHN0YXJ0ID0gcmFuZ2UuZW5kLCBlbmQgPSByYW5nZS5zdGFydDtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHZhciBzdGFydCA9IHJhbmdlLnN0YXJ0LCBlbmQgPSByYW5nZS5lbmQ7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgdGhpcy5hZGRSYW5nZShSYW5nZS5mcm9tUG9pbnRzKGVuZCwgZW5kKSk7XG4gICAgICAgICAgICAgICAgdGhpcy5hZGRSYW5nZShSYW5nZS5mcm9tUG9pbnRzKHN0YXJ0LCBzdGFydCkpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHJlY3RTZWwgPSBbXTtcbiAgICAgICAgICAgIHZhciByID0gdGhpcy5nZXRMaW5lUmFuZ2Uoc3RhcnRSb3csIHRydWUpO1xuICAgICAgICAgICAgci5zdGFydC5jb2x1bW4gPSByYW5nZS5zdGFydC5jb2x1bW47XG4gICAgICAgICAgICByZWN0U2VsLnB1c2gocik7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSBzdGFydFJvdyArIDE7IGkgPCBlbmRSb3c7IGkrKyl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W5nZS5lbmQsIGRvY0VuZCkpXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIHZhciBkb2NFbmQgPSByYW5nZS5lbmQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByYW5nZS5jdXJzb3IgPSB4QmFja3dhcmRzID8gcmFuZ2Uuc3RhcnQgOiByYW5nZS5lbmQ7XG4gICAgICAgICAgICByZWN0U2VsLnB1c2gocmFuZ2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHlCYWNrd2FyZHMpXG4gICAgICAgICAgICByZWN0U2VsLnJldmVyc2UoKTtcblxuICAgICAgICBpZiAoIWluY2x1ZGVFbXB0eUxpbmVzKSB7XG4gICAgICAgICAgICB2YXIgZW5kID0gcmVjdFNlbC5sZW5ndGggLSAxO1xuICAgICAgICAgICAgd2hpbGUgKHJlY3RTZWxbZW5kXS5pc0VtcHR5KCkgJiYgZW5kID4gMClcbiAgICAgICAgICAgICAgICBlbmQtLTtcbiAgICAgICAgICAgIGlmIChlbmQgPiAwKSB7XG4gICAgICAgICAgICAgICAgdmFyIHN0YXJ0ID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAocmVjdFNlbFtzdGFydF0uaXNFbXB0eSgpKVxuICAgICAgICAgICAgICAgICAgICBzdGFydCsrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yICh2YXIgaSA9IGVuZDsgaSA+PSBzdGFydDsgaS0tKSB7XG4gICAgICAgICAgICAgICAgaWYgKHJlY3RTZWxbaV0uaXNFbXB0eSgpKVxuICAgICAgICAgICAgICAgICAgICByZWN0U2VsLnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiByZWN0U2VsO1xuICAgIH07XG59KS5jYWxsKFNlbGVjdGlvbi5wcm90b3R5cGUpO1xudmFyIEVkaXRvciA9IGFjZXF1aXJlKFwiLi9lZGl0b3JcIikuRWRpdG9yO1xu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ByYW5nZSA9IGFsbFtpXTtcbiAgICAgICAgICAgIGlmIChyYW5nZS5pc0VtcHR5KCkpIHtcbiAgICAgICAgICAgICAgICB2YXIgdG1wID0gc2Vzc2lvbi5nZXRXb3JkUmFuZ2UocmFuZ2Uuc3RhcnQucm93LCByYW5nZS5zdGFydC5jb2x1bW4pO1xuICAgICAgICAgICAgICAgIHJhbmdlLnN0YXJ0LnJvdyA9IHRtcC5zdGFydC5yb3c7XG4gICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQuY29sdW1uID0gdG1wLnN0YXJ0LmNvbHVtbjtcbiAgICAgICAgICAgICAgICByYW5nZS5lbmQucm93ID0gdG1wLmVuZC5yb3c7XG4gICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbiA9IHRtcC5lbmQuY29sdW1uO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHNlbC5tZXJnZU92ZXJsYXBwaW5nUmFuZ2VzKCk7XG5cbiAgICAgICAgdmFyIHdvcmRzID0gW107XG4gICAgICAgIGZvciAodmFyIGkgPSBhbGwubGVuZ3RoOyBpLS07ICkge1xuICAgICAgICAgICAgdmFyIHJhbmdlID0gYWxsW2ldO1xuICAgICAgICAgICAgd29yZHMudW5zaGlmdChzZXNzaW9uLmdldFRleHRSYW5nZShyYW5nZSkpO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRpciA8IDApXG4gICAgICAgICAgICB3b3Jkcy51bnNoaWZ0KHdvcmRzLnBvcCgpKTtcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgd29yZHMucHVzaCh3b3Jkcy5zaGlmdCgpKTtcblxuICAgICAgICBmb3IgKHZhciBpID0gYWxsLmxlbmd0aDsgaS0tOyApIHtcbiAgICAgICAgICAgIHZhciByYW5nZSA9IGFsbFtpXTtcbiAgICAgICAgICAgIHZhciB0bXAgPSByYW5nZS5jbG9uZSgpO1xuICAgICAgICAgICAgc2Vzc2lvbi5yZXBsYWNlKHJhbmd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gcmFuZ2UuZW5kLnJvdztcbiAgICAgICAgICAgIHZhciBndWVzc1JhbmdlID0gZnIgPT0gbHI7XG4gICAgICAgICAgICBpZiAoZ3Vlc3NSYW5nZSkge1xuICAgICAgICAgICAgICAgIHZhciBtYXggPSB0aGlzLnNlc3Npb24uZ2V0TGVuZ3RoKCk7XG4gICAgICAgICAgICAgICAgdmFyIGxpbmU7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBsaW5lID0gdGhpcy5zZXNzaW9uLmdldExpbmUobHIpO1xuICAgICAgICAgICAgICAgIH0gd2hpbGUgKC9bPTpdLy50ZXN0KGxpbmUpICYmICsrbHIgPCBtYXgpO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgbGluZSA9IHRoaXMuc2Vzc2lvbi5nZXRMaW5lKGZyKTtcbiAgICAgICAgICAgICAgICB9IHdoaWxlICgvWz06XS8udGVzdChsaW5lKSAmJiAtLWZyID4gMCk7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKGZyIDwgMCkgZnIgPSAwO1xuICAgICAgICAgICAgICAgIGlmIChsciA+PSBtYXgpIGxyID0gbWF4IC0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBsaW5lcyA9IHRoaXMuc2Vzc2lvbi5yZW1vdmVGdWxsTGluZXMoZnIsIGxyKTtcbiAgICAgICAgICAgIGxpbmVzID0gdGhpcy4kcmVBbGlnblRleHQobGluZXMsIGd1ZXNzUmFuZ2UpO1xuICAgICAgICAgICAgdGhpcy5zZXNzaW9uLmluc2VydCh7cm93OiBmciwgY29sdW1uOiAwfSwgbGluZXMuam9pbihcIlxcblwiKSArIFwiXFxuXCIpO1xuICAgICAgICAgICAgaWYgKCFndWVzc1JhbmdlKSB7XG4gICAgICAgICAgICAgICAgcmFuZ2Uuc3RhcnQuY29sdW1uID0gMDtcbiAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uID0gbGluZXNbbGluZXMubGVuZ3RoIC0gMV0ubGVuZ3RoO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5zZWxlY3Rpb24uc2V0UmFuZ2UocmFuZ2UpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2FtZVJvd1Jhbmdlcy5mb3JFYWNoKGZ1bmN0aW9uKHIpIHtcbiAgICAgICAgICAgICAgICBzZWwuc3Vic3RyYWN0UG9pbnQoci5jdXJzb3IpO1xuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHZhciBtYXhDb2wgPSAwO1xuICAgICAgICAgICAgdmFyIG1pblNwYWNlID0gSW5maW5pdHk7XG4gICAgICAgICAgICB2YXIgc3BhY2VPZmZzZXRzID0gcmFuZ2VzLm1hcChmdW5jdGlvbihyKSB7XG4gICAgICAgICAgICAgICAgdmFyIHAgPSByLmN1cnNvcjtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShwLnJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIHNwYWNlT2Zmc2V0ID0gbGluZS5zdWJzdHIocC5jb2x1bW4pLnNlYXJjaCgvXFxTL2cpO1xuICAgICAgICAgICAgICAgIGlmIChzcGFjZU9mZnNldCA9PSAtMSlcbiAgICAgICAgICAgICAgICAgICAgc3BhY2VPZmZzZXQgPSAwO1xuXG4gICAgICAgICAgICAgICAgaWYgKHAuY29sdW1uID4gbWF4Q29sKVxuICAgICAgICAgICAgICAgICAgICBtYXhDb2wgPSBwLmNvbHVtbjtcbiAgICAgICAgICAgICAgICBpZiAoc3BhY2VPZmZzZXQgPCBtaW5TcGFjZSlcbiAgICAgICAgICAgICAgICAgICAgbWluU3BhY2UgPSBzcGFjZU9mZnNldDtcbiAgICAgICAgICAgICAgICByZXR1cm4gc3BhY2VPZmZzZXQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJhbmdlcy5mb3JFYWNoKGZ1bmN0aW9uKHIsIGkpIHtcbiAgICAgICAgICAgICAgICB2YXIgcCA9IHIuY3Vyc29yO1xuICAgICAgICAgICAgICAgIHZhciBsID0gbWF4Q29sIC0gcC5jb2x1bW47XG4gICAgICAgICAgICAgICAgdmFyIGQgPSBzcGFjZU9mZnNldHNbaV0gLSBtaW5TcGFjZTtcbiAgICAgICAgICAgICAgICBpZiAobCA+IGQpXG4gICAgICAgICAgICAgICAgICAgIHNlc3Npb24uaW5zZXJ0KHAsIGxhbmcuc3RyaW5nUmVwZWF0KFwiIFwiLCBsIC0gZCkpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgc2Vzc2lvbi5yZW1vdmUobmV3IFJhbmdlKHAucm93LCBwLmNvbHVtbiwgcC5yb3csIHAuY29sdW1uIC0gbCArIGQpKTtcblxuICAgICAgICAgICAgICAgIHIuc3RhcnQuY29sdW1uID0gci5lbmQuY29sdW1uID0gbWF4Q29sO1xuICAgICAgICAgICAgICAgIHIuc3RhcnQucm93ID0gci5lbmQucm93ID0gcC5yb3c7XG4gICAgICAgICAgICAgICAgci5jdXJzb3IgPSByLmVuZDtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgc2VsLmZyb21PcmllbnRlZFJhbmdlKHJhbmdlc1swXSk7XG4gICAgICAgICAgICB0aGlzLnJlbmRlcmVyLnVwZGF0ZUN1cnNvcigpO1xuICAgICAgICAgICAgdGhpcy5yZW5kZXJlci51cGRhdGVCYWNrTWFya2VycygpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMuJHJlQWxpZ25UZXh0ID0gZnVuY3Rpb24obGluZXMsIGZvcmNlTGVmdCkge1xuICAgICAgICB2YXIgaXNMZWZ0QWxpZ25lZCA9IHRydWUsIGlzUmlnaHRBbGlnbmVkID0gdHJ1ZTtcbiAgICAgICAgdmFyIHN0YXJ0VywgdGV4dFcsIGVuZFc7XG5cbiAgICAgICAgcmV0dXJuIGxpbmVzLm1hcChmdW5jdGlvbihsaW5lKSB7XG4gICAgICAgICAgICB2YXIgbSA9IGxpbmUubWF0Y2goLyhcXHMqKSguKj8pKFxccyopKFs9Ol0uKikvKTtcbiAgICAgICAgICAgIGlmICghbSlcbiAgICAgICAgICAgICAgICByZXR1cm4gW2xpbmVdO1xuXG4gICAgICAgICAgICBpZiAoc3RhcnRXID09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBzdGFydFcgPSBtWzFdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICB0ZXh0VyA9IG1bMl0ubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGVuZFcgPSBtWzNdLmxlbmd0aDtcbiAgICAgICAgICAgICAgICByZXR1cm4gbTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHN0YXJ0VyArIHRleHRXICsgZW5kVyAhPSBtWzFdLmxlbmd0aCArIG1bMl0ubGVuZ3RoICsgbVszXS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgaXNSaWdodEFsaWduZWQgPSBmYWxzZTtcbiAgICAgICAgICAgIGlmIChzdGFydFcgIT0gbVsxXS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgaXNMZWZ0QWxpZ25lZCA9IGZhbHNlO1xuXG4gICAgICAgICAgICBpZiAoc3RhcnRXID4gbVsxXS5sZW5ndGgpXG4gICAgICAgICAgICAgICAgc3RhcnRXID0gbVsxXS5sZW5ndGg7XG4gICAgICAgICAgICBpZiAodGV4dFcgPCBtWzJdLmxlbmd0aClcbiAgICAgICAgICAgICAgICB0ZXh0VyA9IG1bMl0ubGVuZ3RoO1xuICAgICAgICAgICAgaWYgKGVuZFcgPiBtWzNdLmxlbmd0aClcbiAgICAgICAgICAgICAgICBlbmRXID0gbVszXS5sZW5ndGg7XG5cbiAgICAgICAgICAgIHJldHVybiBtO1xuICAgICAgICB9KS5tYXAoZm9yY2VMZWZ0ID8gYWxpZ25MZWZ0IDpcbiAgICAgICAgICAgIGlzTGVmdEFsaWduZWQgPyBpc1JpZ2h0QWxpZ25lZCA/IGFsaWduUmlnaHQgOiBhbGlnbkxlZnQgOiB1bkFsaWduKTtcblxuICAgICAgICBmdW5jdGlvbiBzcGFjZXMobikge1xuICAgICAgICAgICAgcmV0dXJuIGxhbmcuc3RyaW5nUmVwZWF0KFwiIFwiLCBuKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGFsaWduTGVmdChtKSB7XG4gICAgICAgICAgICByZXR1cm4gIW1bMl0gPyBtWzBdIDogc3BhY2VzKHN0YXJ0VykgKyBtWzJdXG4gICAgICAgICAgICAgICAgKyBzcGFjZXModGV4dFcgLSBtWzJdLmxlbmd0aCArIGVuZFcpXG4gICAgICAgICAgICAgICAgKyBtWzRdLnJlcGxhY2UoL14oWz06XSlcXHMrLywgXCIkMSBcIik7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gYWxpZ25SaWdodChtKSB7XG4gICAgICAgICAgICByZXR1cm4gIW1bMl0gPyBtWzBdIDogc3BhY2VzKHN0YXJ0VyArIHRleHRXIC0gbVsyXS5sZW5ndGgpICsgbVsyXVxuICAgICAgICAgICAgICAgICsgc3BhY2VzKGVuZFcsIFwiIFwiKVxuICAgICAgICAgICAgICAgICsgbVs0XS5yZXBsYWNlKC9eKFs9Ol0pXFxzKy8sIFwiJDEgXCIpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIHVuQWxpZ24obSkge1xuICAgICAgICAgICAgcmV0dXJuICFtWzJdID8gbVswXSA6IHNwYWNlcyhzdGFydFcpICsgbVsyXVxuICAgICAgICAgICAgICAgICsgc3BhY2VzKGVuZFcpXG4gICAgICAgICAgICAgICAgKyBtWzRdLnJlcGxhY2UoL14oWz06XSlcXHMrLywgXCIkMSBcIik7XG4gICAgICAgIH1cbiAgICB9O1xufSkuY2FsbChFZGl0b3IucHJvdG90eXBlKTtcblxuXG5mdW5jdGlvbiBpc1NhbWVQb2ludChwMSwgcDIpIHtcbiAgICByZXR1cm4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bCA9PSAtMSlcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgc3RhcnRDb2x1bW4gPSBjb2x1bW4gfHwgbGluZS5sZW5ndGg7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB2YXIgc3RhcnRSb3cgPSByb3c7XG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG5cbiAgICAgICAgd2hpbGUgKCsrcm93IDwgbWF4Um93KSB7XG4gICAgICAgICAgICB2YXIgbGV2ZWwgPSBzZXNzaW9uLmdldExpbmUocm93KS5zZWFyY2gocmUpO1xuXG4gICAgICAgICAgICBpZiAobGV2ZWwgPT0gLTEpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG5cbiAgICAgICAgICAgIGlmIChsZXZlbCA8PSBzdGFydExldmVsKVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBlbmRSb3cgPSByb3c7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZW5kUm93ID4gc3RhcnRSb3cpIHtcbiAgICAgICAgICAgIHZhciBlbmRDb2x1bW4gPSBzZXNzaW9uLmdldExpbmUoZW5kUm93KS5sZW5ndGg7XG4gICAgICAgICAgICByZXR1cm4gbmV3IFJhbmdlKHN0YXJ0Um93LCBzdGFydENvbHVtbiwgZW5kUm93LCBlbmRDb2x1bW4pO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHRoaXMub3BlbmluZ0JyYWNrZXRCbG9jayA9IGZ1bmN0aW9uKHNlc3Npb24sIGJyYWNrZXQsIHJvdywgY29sdW1uLCB0eXBlUmUpIHtcbiAgICAgICAgdmFyIHN0YXJ0ID0ge3Jvdzogcm93LCBjb2x1bW46IGNvbHVtbiArIDF9O1xuICAgICAgICB2YXIgZW5kID0gc2Vzc2lvbi4kZmluZENsb3NpbmdCcmFja2V0KGJyYWNrZXQsIHN0YXJ0LCB0eXBlUmUpO1xuICAgICAgICBpZiAoI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SB7XG4gICAgICAgICAgICBpZiAoaGlkZSkge1xuICAgICAgICAgICAgICAgIGlmICghbGluZVdpZGdldHNbc3RhcnRdKVxuICAgICAgICAgICAgICAgICAgICBsaW5lV2lkZ2V0c1tzdGFydF0gPSBsaW5lV2lkZ2V0c1tlbmRdO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgbGluZVdpZGdldHNbZW5kXS5oaWRkZW4gPSBoaWRlO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAobGluZVdpZGdldHNbc3RhcnRdID09IGxpbmVXaWRnZXRzW2VuZF0pXG4gICAgICAgICAgICAgICAgICAgIGxpbmVXaWRnZXRzW3N0YXJ0XSA9IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICBsaW5lV2lkZ2V0c1tlbmRdLmhpZGRlbiA9IGhpZGU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHRoaXMudXBkYXRlT25DaGFuZ2UgPSBmdW5jdGlvbihkZWx0YSkge1xuICAgICAgICB2YXIgbGluZVdpZGdldHMgPSB0aGlzLnNlc3Npb24ubGluZVdpZGdldHM7XG4gICAgICAgIGlmICghbGluZVdpZGdldHMpIHJldHVybjtcbiAgICAgICAgXG4gICAgICAgIHZhciBzdGFydFJvdyA9IGRlbHRhLnN0YXJ0LnJvdztcbiAgICAgICAgdmFyIGxlbiA9IGRlbHRhLmVuZC5yb3cgLSBzdGFydFJvdztcblxuICAgICAgICBpZiAobGVuID09PSAwKSB7XG4gICAgICAgIH0gZWxzZSBpZiAoZGVsdGEuYWN0aW9uID09ICdyZW1vdmUnKSB7XG4gICAgICAgICAgICB2YXIgcmVtb3ZlZCA9IGxpbmVXaWRnZXRzLnNwbGljZShzdGFydFJvdyArIDEsIGxlbik7XG4gICAgICAgICAgICByZW1vdmVkLmZvckVhY2goZnVuY3Rpb24odykge1xuICAgICAgICAgICAgICAgIHcgJ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uYWRkTGluZVdpZGdldCA9IGZ1bmN0aW9uKHcpIHtcbiAgICAgICAgaWYgKCF0aGlzLnNlc3Npb24ubGluZVdpZGdldHMpXG4gICAgICAgICAgICB0aGlzLnNlc3Npb24ubGluZVdpZGdldHMgPSBuZXcgQXJyYXkodGhpcy5zZXNzaW9uLmdldExlbmd0aCgpKTtcbiAgICAgICAgXG4gICAgICAgIHZhciBvbGQgPSB0aGlzLnNlc3Npb24ubGluZVdpZGdldHNbdy5yb3ddO1xuICAgICAgICBpZiAob2xkKSB7XG4gICAgICAgICAgICB3LiRvbGRXaWRnZXQgPSBvbGQ7XG4gICAgICAgICAgICBpZiAob2xkLmVsICYmIG9sZC5lbC5wYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgb2xkLmVsLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQob2xkLmVsKTtcbiAgICAgICAgICAgICAgICBvbGQuX2luRG9jdW1lbnQgPSBmYWxzZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgIHRoaXMuc2Vzc2lvbi5saW5lV2lkZ2V0c1t3LnJvd10gPSB3O1xuICAgICAgICBcbiAgICAgICAgdy5zZXNzaW9uID0gdGhpcy5zZXNzaW9uO1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlbmRlcmVyID0gdGhpcy5lZGl0b3IucmVuZGVyZXI7XG4gICAgICAgIGlmICh3Lmh0bWwgJiYgIXcuZWwpIHtcbiAgICAgICAgICAgIHcuZWwgPSBkb20uY3JlYXRlRWxlbWVudChcImRpdlwiKTtcbiAgICAgICAgICAgIHcuZWwuaW5uZXJIVE1MID0gdy5odG1sO1xuICAgICAgICB9XG4gICAgICAgIGlmICh3LmVsKSB7XG4gICAgICAgICAgICBkb20uYWRkQ3NzQ2xhc3Mody5lbCwgXCJhY2VfbGluZVdpZGdldENvbnRhaW5lclwiKTtcbiAgICAgICAgICAgIHcuZWwuc3R5bGUucG9zaXRpb24gPSBcImFic29sdXRlXCI7XG4gICAgICAgICAgICB3LmVsLnN0eWxlLnpJbmRleCA9IDU7XG4gICAgICAgICAgICByZW5kZXJlci5jb250YWluZXIuYXBwZW5kQ2hpbGQody5lbCk7XG4gICAgICAgICAgICB3Ll9pbkRvY3VtZW50ID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgaWYgKCF3LmNvdmVyR3V0dGVyKSB7XG4gICAgICAgICAgICB3LmVsLnN0eWxlLnpJbmRleCA9IDM7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHcucGl4ZWxIZWlnaHQgPT0gbnVsbCkge1xuICAgICAgICAgICAgdy5waXhlbEhlaWdodCA9IHcuZWwub2Zmc2V0SGVpZ2h0O1xuICAgICAgICB9XG4gICAgICAgIGlmICh3LnJvd0NvdW50ID09IG51bGwpIHtcbiAgICAgICAgICAgIHcucm93Q291bnQgPSB3LnBpeGVsSGVpZ2h0IC8gcmVuZGVyZXIubGF5ZXJDb25maWcubGluZUhlaWdodDtcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgdmFyIGZvbGQgPSB0aGlzLnNlc3Npb24uZ2V0Rm9sZEF0KHcucm93LCAwKTtcbiAgICAgICAgdy4kZm9sZCA9IGZvbGQ7XG4gICAgICAgIGlmIChmb2xkKSB7XG4gICAgICAgICAgICB2YXIgbGluZVdpZGdldHMgPSB0aGlzLnNlc3Npb24ubGluZVdpZGdldHM7XG4gICAgICAgICAgICBpZiAody5yb3cgPT0gZm9sZC5lbmQucm93ICYmICFsaW5lV2lkZ2V0c1tmb2xkLnN0YXJ0LnJvd10pXG4gICAgICAgICAgICAgICAgbGluZVdpZGdldHNbZm9sZC5zdGFydC5yb3ddID0gdztcbiAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICB3LmhpZGRlbiA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICB0aGlzLnNlc3Npb24uX2VtaXQoXCJjaGFuZ2VGb2xkXCIsIHtkYXRhOntzdGFydDp7cm93OiB3LnJvd319fSk7XG4gICAgICAgIFxuICAgICAgICB0aGlzLiR1cGRhdGVSb3dzKCk7XG4gICAgICAgIHRoaXMucmVuZGVyV2lkZ2V0cyhudWxsLCByZW5kZXJlcik7XG4gICAgICAgIHRoaXMub25XaWRnZXRDaGFuZ2VkKHcpO1xuICAgICAgICByZXR1cm4gdztcbiAgICB9O1xuICAgIFxuICAgIHRoaXMucmVtb3ZlTGluZVdpZGdldCA9IGZ1bmN0aW9uKHcpIHtcbiAgICAgICAgdy5faW5Eb2N1bWVudCA9IGZhbHNlO1xuICAgICAgICB3LnNlc3Npb24gPSBudWxsO1xuICAgICAgICBpZiAody5lbCAmJiB3LmVsLnBhcmVudE5vZGUpXG4gICAgICAgICAgICB3LmVsLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQody5lbCk7XG4gICAgICAgIGlmICh3LmVkaXRvciAmJiB3LmVkaXRvci5kZXN0cm95KSB0cnkge1xuICAgICAgICAgICAgdy5lZGl0b3IuZGVzdHJveSgpO1xuICAgICAgICB9IGNhdGNoKGUpe31cbiAgICAgICAgaWYgKHRoaXMuc2Vzc2lvbi5saW5lV2lkZ2V0cykge1xuICAgICAgICAgICAgdmFyIHcxID0gdGhpcy5zZXNzaW9uLmxpbmVXaWRnZXRzW3cucm93XTtcbiAgICAgICAgICAgIGlmICh3MSA9PSB3KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zZXNzaW9uLmxpbmVXaWRnZXRzW3cucm93XSA9IHcuJG9sZFdpZGdldDtcbiAgICAgICAgICAgICAgICBpZiAody4kb2xkV2lkZ2V0KVxuICAgICAgICAgICAgICAgICAgICB0aGlzLm9uV2lkZ2V0Q2hhbmdlZCh3LiRvbGRXaWRnZXQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAodzEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHcxLiRvbGRXaWRnZXQgPT0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yIGNoYW5nZWRXaWRnZXRzID0gdGhpcy5zZXNzaW9uLl9jaGFuZ2VkV2lkZ2V0cztcbiAgICAgICAgdmFyIGNvbmZpZyA9IHJlbmRlcmVyLmxheWVyQ29uZmlnO1xuICAgICAgICBcbiAgICAgICAgaWYgKCFjaGFuZ2VkV2lkZ2V0cyB8fCAhY2hhbmdlZFdpZGdldHMubGVuZ3RoKSByZXR1cm47XG4gICAgICAgIHZhciBtaW4gPSBJbmZpbml0eTtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFuZ2VkV2lkZ2V0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIHcgPSBjaGFuZ2VkV2lkZ2V0c1tpXTtcbiAgICAgICAgICAgIGlmICghdyB8fCAhdy5lbCkgY29udGludWU7XG4gICAgICAgICAgICBpZiAody5zZXNzaW9uICE9IHRoaXMuc2Vzc2lvbikgY29udGludWU7XG4gICAgICAgICAgICBpZiAoIXcuX2luRG9jdW1lbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zZXNzaW9uLmxpbmVXaWRnZXRzW3cucm93XSAhPSB3KVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB3Ll9pbkRvY3VtZW50ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICByZW5kZXJlci5jb250YWluZXIuYXBwZW5kQ2hpbGQody5lbCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHcuaCA9IHcuZWwub2Zmc2V0SGVpZ2h0O1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoIXcuZml4ZWRXaWR0aCkge1xuICAgICAgICAgICAgICAgIHcudyA9IHcuZWwub2Zmc2V0V2lkdGg7XG4gICAgICAgICAgICAgICAgdy5zY3JlZW5XaWR0aCA9IE1hdGguY2VpbCh3LncgLyBjb25maWcuY2hhcmFjdGVyV2lkdGgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgcm93Q291bnQgPSB3LmggLyBjb25maWcubGluZUhlaWdodDtcbiAgICAgICAgICAgIGlmICh3LmNvdmVyTGluZSkge1xuICAgICAgICAgICAgICAgIHJvd0NvdW50IC09IHRoaXMuc2Vzc2lvbi5nZXRSb3dMaW5lQ291bnQody5yb3cpO1xuICAgICAgICAgICAgICAgIGlmIChyb3dDb3VudCA8IDApXG4gICAgICAgICAgICAgICAgICAgIHJvd0NvdW50ID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh3LnJvd0NvdW50ICE9IHJvd0NvdW50KSB7XG4gICAgICAgICAgICAgICAgdy5yb3dDb3VudCA9IHJvd0NvdW50O1xuICAgICAgICAgICAgICAgIGlmICh3LnJvdyA8IG1pbilcbiAgICAgICAgICAgICAgICAgICAgbWluID0gdy5yb3c7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1pbiAhPSBJbmZpbml0eSkge1xuICAgICAgICAgICAgdGhpcy5zZXNzaW9uLl9lbWl0KFwiY2hhbmdlRm9sZFwiLCB7ZGF0YTp7c3RhcnQ6e3JvdzogbWlufX19KTtcbiAgICAgICAgICAgIHRoaXMuc2Vzc2lvbi5saW5lV2lkZ2V0V2lkdGggPSBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuc2Vzc2lvbi5fY2hhbmdlZFdpZGdldHMgPSBbXTtcbiAgICB9O1xuICAgIFxuICAgIHRoaXMucmVuZGVyV2lkZ2V0cyA9IGZ1bmN0aW9uKGUsIHJlbmRlcmVyKSB7XG4gICAgICAgIHZhciBjb25maWcgPSByZW5kZXJlci5sYXllckNvbmZpZztcbiAgICAgICAgdmFyIGxpbmVXaWRnZXRzID0gdGhpcy5zZXNzaW9uLmxpbmVXaWRnZXRzO1xuICAgICAgICBpZiAoIWxpbmVXaWRnZXRzKVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB2YXIgZmlyc3QgPSBNYXRoLm1pbih0aGlzLmZpcnN0Um93LCBjb25maWcuZmlyc3RSb3cpO1xuICAgICAgICB2YXIgbGFzdCA9IE1hdGgubWF4KHRoaXMubGFzdFJvdywgY29uZmlnLmxhc3RSb3csIGxpbmVXaWRnZXRzLmxlbmd0aCk7XG4gICAgICAgIFxuICAgICAgICB3aGlsZSAoZmlyc3QgPiAwICYmICFsaW5lV2lkZ2V0c1tmaXJzdF0pXG4gICAgICAgICAgICBmaXJzdC0tO1xuICAgICAgICBcbiAgICAgICAgdGhpcy5maXJzdFJvdyA9IGNvbmZpZy5maXJzdFJvdztcbiAgICAgICAgdGhpcy5sYXN0Um93ID0gY29uZmlnLmxhc3RSb3c7XG5cbiAgICAgICAgcmVuZGVyZXIuJGN1cnNvckxheWVyLmNvbmZpZyA9IGNvbmZpZztcbiAgICAgICAgZm9yICh2YXIgaSA9IGZpcnN0OyBpIDw9IGxhc3Q7IGkrKykge1xuICAgICAgICAgICAgdmFyIHcgPSBsaW5lV2lkZ2V0c1tpXTtcbiAgICAgICAgICAgIGlmICghdyB8fCAhdy5lbCkgY29udGludWU7XG4gICAgICAgICAgICBpZiAody5oaWRkZW4pIHtcbiAgICAgICAgICAgICAgICB3LmVsLnN0eWxlLnRvcCA9IC0xMDAgLSAody5waXhlbEhlaWdodCB8fCAwKSArIFwicHhcIjtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICghdy5faW5Eb2N1bWVudCkge1xuICAgICAgICAgICAgICAgIHcuX2luRG9jdW1lbnQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHJlbmRlcmVyLmNvbnRhaW5lci5hcHBlbmRDaGlsZCh3LmVsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciB0b3AgPSByZW5kZXJlci4kY3Vyc29yTGF5ZXIuZ2V0UGl4ZWxQb3NpdGlvbih7cm93OiBpLCBjb2x1bW46MH0sIHRydWUpLnRvcDtcbiAgICAgICAgICAgIGlmICghdy5jb3ZlckxpbmUpXG4gICAgICAgICAgICAgICAgdG9wICs9IGNvbmZpZy5saW5lSGVpZ2h0ICogdGhpcy5zZXNzaW9uLmdldFJvd0xpbmVDb3VudCh3LnJvdyk7XG4gICAgICAgICAgICB3LmVsLnN0eWxlLnRvcCA9IHRvcCAtIGNvbmZpZy5vZmZzZXQgKyBcInB4XCI7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciBsZWZ0ID0gdy5jb3Zlckd1dHRlciA/IDAgOiByZW5kZXJlci5ndXR0ZXJXaWR0aDtcbiAgICAgICAgICAgIGlmICghdy5maXhlZFdpZHRoKVxuICAgICAgICAgICAgICAgIGxlZnQgLT0gcmVuZGVyZXIuc2Nyb2xsTGVmdDtcbiAgICAgICAgICAgIHcuZWwuc3R5bGUubGVmdCA9IGxlZnQgKyBcInB4XCI7XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIGlmICh3LmZ1bGxXaWR0aCAmJiB3LnNjcmVlbldpZHRoKSB7XG4gICAgICAgICAgICAgICAgdy5lbC5zdHlsZS5taW5XaWR0aCA9IGNvbmZpZy53aWR0aCArIDIgKiBjb25maWcucGFkZGluZyArIFwicHhcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHcuZml4ZWRXaWR0aCkge1xuICAgICAgICAgICAgICAgIHcuZWwuc3R5bGUucmlnaHQgPSByZW5kZXJlci5zY3JvbGxCYXIuZ2V0V2lkdGgoKSArIFwicHhcIjtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdy5lbC5zdHlsZS5yaWdodCA9IFwiXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxufSkuY2FsbChMaW5lV2lkZ2V0cy5wcm90b3R5cGUpO1xuXG5cbmV4cG9ydHMuTGluZVdpZGdldHMgPSBMaW5lV2lkZ2V0cztcblxufSk7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sgb24gb2xkIGllXG4gICAgfSk7XG4gICAgZWRpdG9yLmNvbnRhaW5lci5lbnYgPSBlZGl0b3IuZW52ID0gZW52O1xuICAgIHJldHVybiBlZGl0b3I7XG59O1xuZXhwb3J0cy5jcmVhdGVFZGl0U2Vzc2lvbiA9IGZ1bmN0aW9uKHRleHQsIG1vZGUpIHtcbiAgICB2YXIgZG9jID0gbmV3IEVkaXRTZXNzaW9uKHRleHQsIG1vZGUpO1xuICAgIGRvYy5zZXRVbmRvTWFuYWdlcihuZXcgVW5kb01hbmFnZXIoKSk7XG4gICAgcmV0dXJuIGRvYztcbn07XG5leHBvcnRzLkVkaXRTZXNzaW9uID0gRWRpdFNlc3Npb247XG5leHBvcnRzLlVuZG9NYW5hZ2VyID0gVW5kb01hbmFnZXI7XG5leHBvcnRzLnZlcnNpb24gPSBcIjEuMi45XCI7XG59KTtcbiAgICAgICAgICAgIChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBhY2UuYWNlcXVpcmUoW1wiYWNlL2FjZVwiXSwgZnVuY3Rpb24oYSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoYSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYS5jb25maWcuaW5pdCh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGEuZGVmaW5lID0gYWNlLmRlZmluZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIXdpbmRvdy5hY2UpXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuYWNlID0gYTtcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIga2V5IGluIGEpIGlmIChhLmhhc093blByb3BlcnR5KGtleSkpXG4gICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuYWNlW2tleV0gPSBhW2tleV07XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KSgpO1xuICAgICAgICBcbm1vZHVsZS5leHBvcnRzID0gd2luZG93LmFjZS5hY2VxdWlyZShcImFjZS9hY2VcIik7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/index.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/css.js": -/*!***************************************************************!*\ - !*** ../../../../brace@0.11.1/node_modules/brace/mode/css.js ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -eval("ace.define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar supportType = exports.supportType = \"align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index\";\nvar supportFunction = exports.supportFunction = \"rgb|rgba|url|attr|counter|counters\";\nvar supportConstant = exports.supportConstant = \"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\";\nvar supportConstantColor = exports.supportConstantColor = \"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen\";\nvar supportConstantFonts = exports.supportConstantFonts = \"arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\";\n\nvar numRe = exports.numRe = \"\\\\-?(?:(?:[0-9]+(?:\\\\.[0-9]+)?)|(?:\\\\.[0-9]+))\";\nvar pseudoElements = exports.pseudoElements = \"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\";\nvar pseudoClasses = exports.pseudoClasses = \"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\\\b\";\n\nvar CssHighlightRules = function() {\n\n var keywordMapper = this.createKeywordMapper({\n \"support.function\": supportFunction,\n \"support.constant\": supportConstant,\n \"support.type\": supportType,\n \"support.constant.color\": supportConstantColor,\n \"support.constant.fonts\": supportConstantFonts\n }, \"text\", true);\n\n this.$rules = {\n \"start\" : [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"ruleset\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\"\n }, {\n token: \"string\",\n regex: \"@\",\n next: \"media\"\n }, {\n token: \"keyword\",\n regex: \"#[a-z0-9-_]+\"\n }, {\n token: \"keyword\",\n regex: \"%\"\n }, {\n token: \"variable\",\n regex: \"\\\\.[a-z0-9-_]+\"\n }, {\n token: \"string\",\n regex: \":[a-z0-9-_]+\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token: \"constant\",\n regex: \"[a-z0-9-_]+\"\n }, {\n caseInsensitive: true\n }],\n\n \"media\": [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \";\",\n next: \"start\"\n }, {\n token: \"keyword\",\n regex: \"(?:media|supports|document|charset|import|namespace|media|supports|document\"\n + \"|page|font|keyframes|viewport|counter-style|font-feature-values\"\n + \"|swash|ornaments|annotation|stylistic|styleset|character-variant)\"\n }],\n\n \"comments\" : [{\n token: \"comment\", // multi line comment\n regex: \"\\\\/\\\\*\",\n push: [{\n token : \"comment\",\n regex : \"\\\\*\\\\/\",\n next : \"pop\"\n }, {\n defaultToken : \"comment\"\n }]\n }],\n\n \"ruleset\" : [{\n regex : \"-(webkit|ms|moz|o)-\",\n token : \"text\"\n }, {\n token : \"paren.rparen\",\n regex : \"\\\\}\",\n next : \"start\"\n }, {\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token : [\"constant.numeric\", \"keyword\"],\n regex : \"(\" + numRe + \")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token : \"constant.numeric\", // hex6 color\n regex : \"#[a-f0-9]{6}\"\n }, {\n token : \"constant.numeric\", // hex3 color\n regex : \"#[a-f0-9]{3}\"\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-element.css\"],\n regex : pseudoElements\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-class.css\"],\n regex : pseudoClasses\n }, {\n include: \"url\"\n }, {\n token : keywordMapper,\n regex : \"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"\n }, {\n caseInsensitive: true\n }],\n\n url: [{\n token : \"support.function\",\n regex : \"(?:url(:?-prefix)?|domain|regexp)\\\\(\",\n push: [{\n token : \"support.function\",\n regex : \"\\\\)\",\n next : \"pop\"\n }, {\n defaultToken: \"string\"\n }]\n }],\n\n strings: [{\n token : \"string.start\",\n regex : \"'\",\n push : [{\n token : \"string.end\",\n regex : \"'|$\",\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }, {\n token : \"string.start\",\n regex : '\"',\n push : [{\n token : \"string.end\",\n regex : '\"|$',\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }],\n escapes: [{\n token : \"constant.language.escape\",\n regex : /\\\\([a-fA-F\\d]{1,6}|[^a-fA-F\\d])/\n }]\n\n };\n\n this.normalizeRules();\n};\n\noop.inherits(CssHighlightRules, TextHighlightRules);\n\nexports.CssHighlightRules = CssHighlightRules;\n\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/css_completions\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar propertyMap = {\n \"background\": {\"#$0\": 1},\n \"background-color\": {\"#$0\": 1, \"transparent\": 1, \"fixed\": 1},\n \"background-image\": {\"url('/$0')\": 1},\n \"background-repeat\": {\"repeat\": 1, \"repeat-x\": 1, \"repeat-y\": 1, \"no-repeat\": 1, \"inherit\": 1},\n \"background-position\": {\"bottom\":2, \"center\":2, \"left\":2, \"right\":2, \"top\":2, \"inherit\":2},\n \"background-attachment\": {\"scroll\": 1, \"fixed\": 1},\n \"background-size\": {\"cover\": 1, \"contain\": 1},\n \"background-clip\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"background-origin\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"border\": {\"solid $0\": 1, \"dashed $0\": 1, \"dotted $0\": 1, \"#$0\": 1},\n \"border-color\": {\"#$0\": 1},\n \"border-style\": {\"solid\":2, \"dashed\":2, \"dotted\":2, \"double\":2, \"groove\":2, \"hidden\":2, \"inherit\":2, \"inset\":2, \"none\":2, \"outset\":2, \"ridged\":2},\n \"border-collapse\": {\"collapse\": 1, \"separate\": 1},\n \"bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"clear\": {\"left\": 1, \"right\": 1, \"both\": 1, \"none\": 1},\n \"color\": {\"#$0\": 1, \"rgb(#$00,0,0)\": 1},\n \"cursor\": {\"default\": 1, \"pointer\": 1, \"move\": 1, \"text\": 1, \"wait\": 1, \"help\": 1, \"progress\": 1, \"n-resize\": 1, \"ne-resize\": 1, \"e-resize\": 1, \"se-resize\": 1, \"s-resize\": 1, \"sw-resize\": 1, \"w-resize\": 1, \"nw-resize\": 1},\n \"display\": {\"none\": 1, \"block\": 1, \"inline\": 1, \"inline-block\": 1, \"table-cell\": 1},\n \"empty-cells\": {\"show\": 1, \"hide\": 1},\n \"float\": {\"left\": 1, \"right\": 1, \"none\": 1},\n \"font-family\": {\"Arial\":2,\"Comic Sans MS\":2,\"Consolas\":2,\"Courier New\":2,\"Courier\":2,\"Georgia\":2,\"Monospace\":2,\"Sans-Serif\":2, \"Segoe UI\":2,\"Tahoma\":2,\"Times New Roman\":2,\"Trebuchet MS\":2,\"Verdana\": 1},\n \"font-size\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"font-weight\": {\"bold\": 1, \"normal\": 1},\n \"font-style\": {\"italic\": 1, \"normal\": 1},\n \"font-variant\": {\"normal\": 1, \"small-caps\": 1},\n \"height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"letter-spacing\": {\"normal\": 1},\n \"line-height\": {\"normal\": 1},\n \"list-style-type\": {\"none\": 1, \"disc\": 1, \"circle\": 1, \"square\": 1, \"decimal\": 1, \"decimal-leading-zero\": 1, \"lower-roman\": 1, \"upper-roman\": 1, \"lower-greek\": 1, \"lower-latin\": 1, \"upper-latin\": 1, \"georgian\": 1, \"lower-alpha\": 1, \"upper-alpha\": 1},\n \"margin\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"overflow\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-x\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-y\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"padding\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"page-break-after\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"page-break-before\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"position\": {\"absolute\": 1, \"relative\": 1, \"fixed\": 1, \"static\": 1},\n \"right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"table-layout\": {\"fixed\": 1, \"auto\": 1},\n \"text-decoration\": {\"none\": 1, \"underline\": 1, \"line-through\": 1, \"blink\": 1},\n \"text-align\": {\"left\": 1, \"right\": 1, \"center\": 1, \"justify\": 1},\n \"text-transform\": {\"capitalize\": 1, \"uppercase\": 1, \"lowercase\": 1, \"none\": 1},\n \"top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"vertical-align\": {\"top\": 1, \"bottom\": 1},\n \"visibility\": {\"hidden\": 1, \"visible\": 1},\n \"white-space\": {\"nowrap\": 1, \"normal\": 1, \"pre\": 1, \"pre-line\": 1, \"pre-wrap\": 1},\n \"width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"word-spacing\": {\"normal\": 1},\n \"filter\": {\"alpha(opacity=$0100)\": 1},\n\n \"text-shadow\": {\"$02px 2px 2px #777\": 1},\n \"text-overflow\": {\"ellipsis-word\": 1, \"clip\": 1, \"ellipsis\": 1},\n \"-moz-border-radius\": 1,\n \"-moz-border-radius-topright\": 1,\n \"-moz-border-radius-bottomright\": 1,\n \"-moz-border-radius-topleft\": 1,\n \"-moz-border-radius-bottomleft\": 1,\n \"-webkit-border-radius\": 1,\n \"-webkit-border-top-right-radius\": 1,\n \"-webkit-border-top-left-radius\": 1,\n \"-webkit-border-bottom-right-radius\": 1,\n \"-webkit-border-bottom-left-radius\": 1,\n \"-moz-box-shadow\": 1,\n \"-webkit-box-shadow\": 1,\n \"transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-moz-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-webkit-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1 }\n};\n\nvar CssCompletions = function() {\n\n};\n\n(function() {\n\n this.completionsDefined = false;\n\n this.defineCompletions = function() {\n if (document) {\n var style = document.createElement('c').style;\n\n for (var i in style) {\n if (typeof style[i] !== 'string')\n continue;\n\n var name = i.replace(/[A-Z]/g, function(x) {\n return '-' + x.toLowerCase();\n });\n\n if (!propertyMap.hasOwnProperty(name))\n propertyMap[name] = 1;\n }\n }\n\n this.completionsDefined = true;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n if (!this.completionsDefined) {\n this.defineCompletions();\n }\n\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (state==='ruleset'){\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/:[^;]+$/.test(line)) {\n /([\\w\\-]+):[^:]*$/.test(line);\n\n return this.getPropertyValueCompletions(state, session, pos, prefix);\n } else {\n return this.getPropertyCompletions(state, session, pos, prefix);\n }\n }\n\n return [];\n };\n\n this.getPropertyCompletions = function(state, session, pos, prefix) {\n var properties = Object.keys(propertyMap);\n return properties.map(function(property){\n return {\n caption: property,\n snippet: property + ': $0;',\n meta: \"property\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getPropertyValueCompletions = function(state, session, pos, prefix) {\n var line = session.getLine(pos.row).substr(0, pos.column);\n var property = (/([\\w\\-]+):[^:]*$/.exec(line) || {})[1];\n\n if (!property)\n return [];\n var values = [];\n if (property in propertyMap && typeof propertyMap[property] === \"object\") {\n values = Object.keys(propertyMap[property]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"property value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(CssCompletions.prototype);\n\nexports.CssCompletions = CssCompletions;\n});\n\nace.define(\"ace/mode/behaviour/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar CstyleBehaviour = acequire(\"./cstyle\").CstyleBehaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\n\nvar CssBehaviour = function () {\n\n this.inherit(CstyleBehaviour);\n\n this.add(\"colon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ':') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n if (!line.substring(cursor.column).match(/^\\s*;/)) {\n return {\n text: ':;',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"colon\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar === ';') {\n range.end.column ++;\n return range;\n }\n }\n }\n });\n\n this.add(\"semicolon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ';') {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ';') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n });\n\n};\noop.inherits(CssBehaviour, CstyleBehaviour);\n\nexports.CssBehaviour = CssBehaviour;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/css_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/css_completions\",\"ace/mode/behaviour/css\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CssCompletions = acequire(\"./css_completions\").CssCompletions;\nvar CssBehaviour = acequire(\"./behaviour/css\").CssBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = CssHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CssBehaviour();\n this.$completer = new CssCompletions();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.foldingRules = \"cStyle\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n var tokens = this.getTokenizer().getLineTokens(line, state).tokens;\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n var match = line.match(/^.*\\{\\s*$/);\n if (match) {\n indent += tab;\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/css */ \"../../../../brace@0.11.1/node_modules/brace/worker/css.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/css\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYnJhY2VAMC4xMS4xL25vZGVfbW9kdWxlcy9icmFjZS9tb2RlL2Nzcy5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7O0FBRUw7QUFDQTtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0EsdUJBQXVCO0FBQ3ZCO0FBQ0EsU0FBUztBQUNUO0FBQ0EsdUJBQXVCO0FBQ3ZCLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0EsU0FBUztBQUNUO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQSxTQUFTOztBQUVUO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQSx1QkFBdUI7QUFDdkI7QUFDQSxTQUFTO0FBQ1Q7QUFDQSx1QkFBdUI7QUFDdkI7QUFDQSxTQUFTO0FBQ1Q7QUFDQSxxQkFBcUI7QUFDckI7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQSxT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8YWNlcXVpcmVkfHJvb3R8dGFyZ2V0fHZhbGlkfHZpc2l0ZWQpXFxcXGJcIjtcblxudmFyIENzc0hpZ2hsaWdodFJ1bGVzID0gZnVuY3Rpb24oKSB7XG5cbiAgICB2YXIga2V5d29yZE1hcHBlciA9IHRoaXMuY3JlYXRlS2V5d29yZE1hcHBlcih7XG4gICAgICAgIFwic3VwcG9ydC5mdW5jdGlvblwiOiBzdXBwb3J0RnVuY3Rpb24sXG4gICAgICAgIFwic3VwcG9ydC5jb25zdGFudFwiOiBzdXBwb3J0Q29uc3RhbnQsXG4gICAgICAgIFwic3VwcG9ydC50eXBlXCI6IHN1cHBvcnRUeXBlLFxuICAgICAgICBcInN1cHBvcnQuY29uc3RhbnQuY29sb3JcIjogc3VwcG9ydENvbnN0YW50Q29sb3IsXG4gICAgICAgIFwic3VwcG9ydC5jb25zdGFudC5mb250c1wiOiBzdXBwb3J0Q29uc3RhbnRGb250c1xuICAgIH0sIFwidGV4dFwiLCB0cnVlKTtcblxuICAgIHRoaXMuJHJ1bGVzID0ge1xuICAgICAgICBcInN0YXJ0XCIgOiBbe1xuICAgICAgICAgICAgaW5jbHVkZSA6IFtcInN0cmluZ3NcIiwgXCJ1cmxcIiwgXCJjb21tZW50c1wiXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJwYXJlbi5scGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFx7XCIsXG4gICAgICAgICAgICBuZXh0OiAgXCJydWxlc2V0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicGFyZW4ucnBhcmVuXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxcfVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgcmVnZXg6IFwiQFwiLFxuICAgICAgICAgICAgbmV4dDogIFwibWVkaWFcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICByZWdleDogXCIjW2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICByZWdleDogXCIlXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwidmFyaWFibGVcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwuW2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmdcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIjpbYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsXG4gICAgICAgICAgICByZWdleCA6IG51bVJlXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50XCIsXG4gICAgICAgICAgICByZWdleDogXCJbYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGNhc2VJbnNlbnNpdGl2ZTogdHJ1ZVxuICAgICAgICB9XSxcblxuICAgICAgICBcIm1lZGlhXCI6IFt7XG4gICAgICAgICAgICBpbmNsdWRlIDogW1wic3RyaW5nc1wiLCBcInVybFwiLCBcImNvbW1lbnRzXCJdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXHtcIixcbiAgICAgICAgICAgIG5leHQ6ICBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicGFyZW4ucnBhcmVuXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxcfVwiLFxuICAgICAgICAgICAgbmV4dDogIFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmdcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIjtcIixcbiAgICAgICAgICAgIG5leHQ6ICBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwia2V5d29yZFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiKD86bWVkaWF8c3VwcG9ydHN8ZG9jdW1lbnR8Y2hhcnNldHxpbXBvcnR8bmFtZXNwYWNlfG1lZGlhfHN1cHBvcnRzfGRvY3VtZW50XCJcbiAgICAgICAgICAgICAgICArIFwifHBhZ2V8Zm9udHxrZXlmcmFtZXN8dmlld3BvcnR8Y291bnRlci1zdHlsZXxmb250LWZlYXR1cmUtdmFsdWVzXCJcbiAgICAgICAgICAgICAgICArIFwifHN3YXNofG9ybmFtZW50c3xhbm5vdGF0aW9ufHN0eWxpc3RpY3xzdHlsZXNldHxjaGFyYWN0ZXItdmFyaWFudClcIlxuICAgICAgICB9XSxcblxuICAgICAgICBcImNvbW1lbnRzXCIgOiBbe1xuICAgICAgICAgICAgdG9rZW46IFwiY29tbWVudFwiLCAvLyBtdWx0aSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwvXFxcXCpcIixcbiAgICAgICAgICAgIHB1c2g6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbW1lbnRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXCpcXFxcL1wiLFxuICAgICAgICAgICAgICAgIG5leHQgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuIDogXCJjb21tZW50XCJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH1dLFxuXG4gICAgICAgIFwicnVsZXNldFwiIDogW3tcbiAgICAgICAgICAgIHJlZ2V4IDogXCItKHdlYmtpdHxtc3xtb3p8byktXCIsXG4gICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcfVwiLFxuICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBpbmNsdWRlIDogW1wic3RyaW5nc1wiLCBcInVybFwiLCBcImNvbW1lbnRzXCJdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogW1wiY29uc3RhbnQubnVtZXJpY1wiLCBcImtleXdvcmRcIl0sXG4gICAgICAgICAgICByZWdleCA6IFwiKFwiICsgbnVtUmUgKyBcIikoY2h8Y218ZGVnfGVtfGV4fGZyfGdkfGdyYWR8SHp8aW58a0h6fG1tfG1zfHBjfHB0fHB4fHJhZHxyZW18c3x0dXJufHZofHZtfHZ3fCUpXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIixcbiAgICAgICAgICAgIHJlZ2V4IDogbnVtUmVcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIiwgIC8vIGhleDYgY29sb3JcbiAgICAgICAgICAgIHJlZ2V4IDogXCIjW2EtZjAtOV17Nn1cIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAvLyBoZXgzIGNvbG9yXG4gICAgICAgICAgICByZWdleCA6IFwiI1thLWYwLTldezN9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJwdW5jdHVhdGlvblwiLCBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS5wc2V1ZG8tZWxlbWVudC5jc3NcIl0sXG4gICAgICAgICAgICByZWdleCA6IHBzZXVkb0VsZW1lbnRzXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogW1wicHVuY3R1YXRpb25cIiwgXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUucHNldWRvLWNsYXNzLmNzc1wiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogcHNldWRvQ2xhc3Nlc1xuICAgICAgICB9LCB7XG4gICAgICAgICAgICBpbmNsdWRlOiBcInVybFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDoga2V5d29yZE1hcHBlcixcbiAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcLT9bYS16QS1aX11bYS16QS1aMC05X1xcXFwtXSpcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBjYXNlSW5zZW5zaXRpdmU6IHRydWVcbiAgICAgICAgfV0sXG5cbiAgICAgICAgdXJsOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInN1cHBvcnQuZnVuY3Rpb25cIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPzp1cmwoOj8tcHJlZml4KT98ZG9tYWlufHJlZ2V4cClcXFxcKFwiLFxuICAgICAgICAgICAgcHVzaDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3VwcG9ydC5mdW5jdGlvblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcKVwiLFxuICAgICAgICAgICAgICAgIG5leHQgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9XSxcblxuICAgICAgICBzdHJpbmdzOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5zdGFydFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIidcIixcbiAgICAgICAgICAgIHB1c2ggOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIid8JFwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBpbmNsdWRlIDogXCJlc2NhcGVzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvXFxcXCQvLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kOiB0cnVlXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6ICdcIicsXG4gICAgICAgICAgICBwdXNoIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLmVuZFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogJ1wifCQnLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBpbmNsdWRlIDogXCJlc2NhcGVzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvXFxcXCQvLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kOiB0cnVlXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9XSxcbiAgICAgICAgZXNjYXBlczogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAg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bWUgPSBpLnJlcGxhY2UoL1tBLVpdL2csIGZ1bmN0aW9uKHgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICctJyArIHgudG9Mb3dlckNhc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIGlmICghcHJvcGVydHlNYXAuaGFzT3duUHJvcGVydHkobmFtZSkpXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5TWFwW25hbWVdID0gMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuY29tcGxldGlvbnNEZWZpbmVkID0gdHJ1ZTtcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRDb21wbGV0aW9ucyA9IGZ1bmN0aW9uKHN0YXRlLCBzZXNzaW9uLCBwb3MsIHByZWZpeCkge1xuICAgICAgICBpZiAoIXRoaXMuY29tcGxldGlvbnNEZWZpbmVkKSB7XG4gICAgICAgICAgICB0aGlzLmRlZmluZUNvbXBsZXRpb25zKCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgdG9rZW4gPSBzZXNzaW9uLmdldFRva2VuQXQocG9zLnJvdywgcG9zLmNvbHVtbik7XG5cbiAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgIHJldHVybiBbXTtcbiAgICAgICAgaWYgKHN0YXRlPT09J3J1bGVzZXQnKXtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHBvcy5yb3cpLnN1YnN0cigwLCBwb3MuY29sdW1uKTtcbiAgICAgICAgICAgIGlmICgvOlteO10rJC8udGVzdChsaW5lKSkge1xuICAgICAgICAgICAgICAgIC8oW1xcd1xcLV0rKTpbXjpdKiQvLnRlc3QobGluZSk7XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRQcm9wZXJ0eVZhbHVlQ29tcGxldGlvbnMoc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KTtcbiAgICAgIC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x1bW4gKyAxKTtcbiAgICAgICAgICAgICAgICBpZiAocmlnaHRDaGFyID09PSAnOicpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogJycsXG4gICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbikubWF0Y2goL15cXHMqOy8pKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgIHRleHQ6ICc6OycsXG4gICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcImNvbG9uXCIsIFwiZGVsZXRpb25cIiwgZnVuY3Rpb24gKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgcmFuZ2UpIHtcbiAgICAgICAgdmFyIHNlbGVjdGVkID0gc2Vzc2lvbi5kb2MuZ2V0VGV4dFJhbmdlKHJhbmdlKTtcbiAgICAgICAgaWYgKCFyYW5nZS5pc011bHRpTGluZSgpICYmIHNlbGVjdGVkID09PSAnOicpIHtcbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHNlc3Npb24sIGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgICAgICBpZiAodG9rZW4gJiYgdG9rZW4udmFsdWUubWF0Y2goL1xccysvKSkge1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAodG9rZW4gJiYgdG9rZW4udHlwZSA9PT0gJ3N1cHBvcnQudHlwZScpIHtcbiAgICAgICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZG9jLmdldExpbmUocmFuZ2Uuc3RhcnQucm93KTtcbiAgICAgICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcocmFuZ2UuZW5kLmNvbHVtbiwgcmFuZ2UuZW5kLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgICAgIGlmIChyaWdodENoYXIgPT09ICc7Jykge1xuICAgICAgICAgICAgICAgICAgICByYW5nZS5lbmQuY29sdW1uICsrO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmFuZ2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcInNlbWljb2xvblwiLCBcImluc2VydGlvblwiLCBmdW5jdGlvbiAoc3RhdGUsIGFjdGlvbiwgZWRpdG9yLCBzZXNzaW9uLCB0ZXh0KSB7XG4gICAgICAgIGlmICh0ZXh0ID09PSAnOycpIHtcbiAgICAgICAgICAgIHZhciBjdXJzb3IgPSBlZGl0b3IuZ2V0Q3Vyc29yUG9zaXRpb24oKTtcbiAgICAgICAgICAgIHZhciBsaW5lID0gc2Vzc2lvbi5kb2MuZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciByaWdodENoYXIgPSBsaW5lLnN1YnN0cmluZyhjdXJzb3IuY29sdW1uLCBjdXJzb3IuY29sdW1uICsgMSk7XG4gICAgICAgICAgICBpZiAocmlnaHRDaGFyID09PSAnOycpIHtcbiAgICAgICAgICAgICAg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VnaW9uUmUudGVzdChsaW5lKSAmJiAhdGhpcy50cmlwbGVTdGFyQmxvY2tDb21tZW50UmUudGVzdChsaW5lKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgfVxuICAgIFxuICAgICAgICB2YXIgZncgPSB0aGlzLl9nZXRGb2xkV2lkZ2V0QmFzZShzZXNzaW9uLCBmb2xkU3R5bGUsIHJvdyk7XG4gICAgXG4gICAgICAgIGlmICghZncgJiYgdGhpcy5zdGFydFJlZ2lvblJlLnRlc3QobGluZSkpXG4gICAgICAgICAgICByZXR1cm4gXCJzdGFydFwiOyAvLyBsaW5lQ29tbWVudFJlZ2lvblN0YXJ0XG4gICAgXG4gICAgICAgIHJldHVybiBmdztcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uLCBmb2xkU3R5bGUsIHJvdywgZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgXG4gICAgICAgIGlmICh0aGlzLnN0YXJ0UmVnaW9uUmUudGVzdChsaW5lKSlcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldENvbW1lbnRSZWdpb25CbG9jayhzZXNzaW9uLCBsaW5lLCByb3cpO1xuICAgICAgICBcbiAgICAgICAgdmFyIG1hdGNoID0gbGluZS5tYXRjaCh0aGlzLmZvbGRpbmdTdGFydE1hcmtlcik7XG4gICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgdmFyIGkgPSBtYXRjaC5pbmRleDtcblxuICAgICAgICAgICAgaWYgKG1hdGNoWzFdKVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLm9wZW5pbmdCcmFja2V0QmxvY2soc2Vzc2lvbiwgbWF0Y2hbMV0sIHJvdywgaSk7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBzZXNzaW9uLmdldENvbW1lbnRGb2xkUmFuZ2Uocm93LCBpICsgbWF0Y2hbMF0ubGVuZ3RoLCAxKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHJhbmdlICYmICFyYW5nZS5pc011bHRpTGluZSgpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGZvcmNlTXVsdGlsaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gdGhpcy5nZXRTZWN0aW9uUmFuZ2Uoc2Vzc2lvbiwgcm93KTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZvbGRTdHlsZSAhPSBcImFsbFwiKVxuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHJldHVybiByYW5nZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmb2xkU3R5bGUgPT09IFwibWFya2JlZ2luXCIpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIG1hdGNoID0gbGluZS5tYXRjaCh0aGlzLmZvbGRpbmdTdG9wTWFya2VyKTtcbiAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICB2YXIgaSA9IG1hdGNoLmluZGV4ICsgbWF0Y2hbMF0ubGVuZ3RoO1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2xvc2luZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcblxuICAgICAgICAgICAgcmV0dXJuIHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGksIC0xKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy5nZXRTZWN0aW9uUmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uLCByb3cpIHtcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgdmFyIHN0YXJ0SW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICB2YXIgc3RhcnRSb3cgPSByb3c7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUubGVuZ3RoO1xuICAgICAgICByb3cgPSByb3cgKyAxO1xuICAgICAgICB2YXIgZW5kUm93ID0gcm93O1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgd2hpbGUgKCsrcm93IDwgbWF4Um93KSB7XG4gICAgICAgICAgICBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICB2YXIgaW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICAgICAgaWYgKGluZGVudCA9PT0gLTEpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICBpZiAgKHN0YXJ0SW5kZW50ID4gaW5kZW50KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgdmFyIHN1YlJhbmdlID0gdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2Uoc2Vzc2lvbiwgXCJhbGxcIiwgcm93KTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHN1YlJhbmdlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHN1YlJhbmdlLnN0YXJ0LnJvdyA8PSBzdGFydFJvdykge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHN1YlJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcm93ID0gc3ViUmFuZ2UuZW5kLnJvdztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXJ0SW5kZW50ID09IGluZGVudCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbmRSb3cgPSByb3c7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHJldHVybiBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sdW1uLCBlbmRSb3csIHNlc3Npb24uZ2V0TGluZShlbmRSb3cpLmxlbmd0aCk7XG4gICAgfTtcbiAgICB0aGlzLmdldENvbW1lbnRSZWdpb25CbG9jayA9IGZ1bmN0aW9uKHNlc3Npb24sIGxpbmUsIHJvdykge1xuICAgICAgICB2YXIgc3RhcnRDb2x1bW4gPSBsaW5lLnNlYXJjaCgvXFxzKiQvKTtcbiAgICAgICAgdmFyIG1heFJvdyA9IHNlc3Npb24uZ2V0TGVuZ3RoKCk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgXG4gICAgICAgIHZhciByZSA9IC9eXFxzKig/OlxcL1xcKnxcXC9cXC98LS0pIz8oZW5kKT9yZWdpb25cXGIvO1xuICAgICAgICB2YXIgZGVwdGggPSAxO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBtID0gcmUuZXhlYyhsaW5lKTtcbiAgICAgICAgICAgIGlmICghbSkgY29udGludWU7XG4gICAgICAgICAgICBpZiAobVsxXSkgZGVwdGgtLTtcbiAgICAgICAgICAgIGVsc2UgZGVwdGgrKztcblxuICAgICAgICAgICAgaWYgKCFkZXB0aCkgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZW5kUm93ID0gcm93O1xuICAgICAgICBpZiAoZW5kUm93ID4gc3RhcnRSb3cpIHtcbiAgICAgICAgICAgIHJldHVybiBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sdW1uLCBlbmRSb3csIGxpbmUubGVuZ3RoKTtcbiAgIC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7XG5cbiAgICAgICAgd29ya2VyLm9uKFwidGVybWluYXRlXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgc2Vzc2lvbi5jbGVhckFubm90YXRpb25zKCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB3b3JrZXI7XG4gICAgfTtcblxuICAgIHRoaXMuJGlkID0gXCJhY2UvbW9kZS9jc3NcIjtcbn0pLmNhbGwoTW9kZS5wcm90b3R5cGUpO1xuXG5leHBvcnRzLk1vZGUgPSBNb2RlO1xuXG59KTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/css.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/html.js": -/*!****************************************************************!*\ - !*** ../../../../brace@0.11.1/node_modules/brace/mode/html.js ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\n\nvar JavaScriptHighlightRules = function(options) {\n var keywordMapper = this.createKeywordMapper({\n \"variable.language\":\n \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\" , // Pseudo\n \"keyword\":\n \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|function|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\n \"storage.type\":\n \"const|let|var|function\",\n \"constant.language\":\n \"null|Infinity|NaN|undefined\",\n \"support.function\":\n \"alert\",\n \"constant.language.boolean\": \"true|false\"\n }, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n\n this.$rules = {\n \"no_regex\" : [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n {\n token : \"string\",\n regex : \"'(?=.)\",\n next : \"qstring\"\n }, {\n token : \"string\",\n regex : '\"(?=.)',\n next : \"qqstring\"\n }, {\n token : \"constant.numeric\", // hexadecimal, octal and binary\n regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token : \"constant.numeric\", // decimal integers and floats\n regex : /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"support.function\",\n \"punctuation.operator\", \"entity.name.function\", \"text\",\"keyword.operator\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(prototype)(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"text\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"keyword\",\n regex : \"from(?=\\\\s*('|\\\"))\"\n }, {\n token : \"keyword\",\n regex : \"(?:\" + kwBeforeRe + \")\\\\b\",\n next : \"start\"\n }, {\n token : [\"support.constant\"],\n regex : /that\\b/\n }, {\n token : [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex : /(console)(\\.)(warn|info|log|error|time|trace|timeEnd|assert)\\b/\n }, {\n token : keywordMapper,\n regex : identifierRe\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/,\n next : \"property\"\n }, {\n token : \"storage.type\",\n regex : /=>/\n }, {\n token : \"keyword.operator\",\n regex : /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next : \"start\"\n }, {\n token : \"punctuation.operator\",\n regex : /[?:,;.]/,\n next : \"start\"\n }, {\n token : \"paren.lparen\",\n regex : /[\\[({]/,\n next : \"start\"\n }, {\n token : \"paren.rparen\",\n regex : /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token : \"text\",\n regex : \"\\\\s+\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(?:(\\\\s+)(\\\\w+))?(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/\n }, {\n token : \"support.function\",\n regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|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(?=\\()/\n }, {\n token : \"support.function.dom\",\n 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|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token : \"support.constant\",\n 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/\n }, {\n token : \"identifier\",\n regex : identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token : \"text\",\n regex : \"\\\\s+|^$\",\n next : \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token : \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token : \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token : \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"function_arguments\": [\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \"[, ]+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : '\"|$',\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : \"'|$\",\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n\n\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function(val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token : \"string.quasi.start\",\n regex : /`/,\n push : [{\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"paren.quasi.start\",\n regex : /\\${/,\n push : \"start\"\n }, {\n token : \"string.quasi.end\",\n regex : /`/,\n next : \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n });\n\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n\n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"no_regex\") ]);\n\n this.normalizeRules();\n};\n\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\n\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch : function(val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n } else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex : \"\",\n onMatch : function(value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{type: this.token, value: value}];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n token : \"text.tag-whitespace.xml\",\n regex : \"\\\\s+\"\n }, {\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n stateName : \"jsx_attr_q\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n stateName : \"jsx_attr_qq\",\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\n\nfunction comments(next) {\n return [\n {\n token : \"comment\", // multi line comment\n regex : /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"\\\\*\\\\/\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }, {\n token : \"comment\",\n regex : \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"$|^\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = JavaScriptHighlightRules;\n \n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n this.$quotes = {'\"': '\"', \"'\": \"'\", \"`\": \"`\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n } else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/javascript */ \"../../../../brace@0.11.1/node_modules/brace/worker/javascript.js\"), \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(results) {\n session.setAnnotations(results.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/javascript\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n\nace.define(\"ace/mode/css_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar supportType = exports.supportType = \"align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index\";\nvar supportFunction = exports.supportFunction = \"rgb|rgba|url|attr|counter|counters\";\nvar supportConstant = exports.supportConstant = \"absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero\";\nvar supportConstantColor = exports.supportConstantColor = \"aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen\";\nvar supportConstantFonts = exports.supportConstantFonts = \"arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace\";\n\nvar numRe = exports.numRe = \"\\\\-?(?:(?:[0-9]+(?:\\\\.[0-9]+)?)|(?:\\\\.[0-9]+))\";\nvar pseudoElements = exports.pseudoElements = \"(\\\\:+)\\\\b(after|before|first-letter|first-line|moz-selection|selection)\\\\b\";\nvar pseudoClasses = exports.pseudoClasses = \"(:)\\\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\\\b\";\n\nvar CssHighlightRules = function() {\n\n var keywordMapper = this.createKeywordMapper({\n \"support.function\": supportFunction,\n \"support.constant\": supportConstant,\n \"support.type\": supportType,\n \"support.constant.color\": supportConstantColor,\n \"support.constant.fonts\": supportConstantFonts\n }, \"text\", true);\n\n this.$rules = {\n \"start\" : [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"ruleset\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\"\n }, {\n token: \"string\",\n regex: \"@\",\n next: \"media\"\n }, {\n token: \"keyword\",\n regex: \"#[a-z0-9-_]+\"\n }, {\n token: \"keyword\",\n regex: \"%\"\n }, {\n token: \"variable\",\n regex: \"\\\\.[a-z0-9-_]+\"\n }, {\n token: \"string\",\n regex: \":[a-z0-9-_]+\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token: \"constant\",\n regex: \"[a-z0-9-_]+\"\n }, {\n caseInsensitive: true\n }],\n\n \"media\": [{\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token: \"paren.lparen\",\n regex: \"\\\\{\",\n next: \"start\"\n }, {\n token: \"paren.rparen\",\n regex: \"\\\\}\",\n next: \"start\"\n }, {\n token: \"string\",\n regex: \";\",\n next: \"start\"\n }, {\n token: \"keyword\",\n regex: \"(?:media|supports|document|charset|import|namespace|media|supports|document\"\n + \"|page|font|keyframes|viewport|counter-style|font-feature-values\"\n + \"|swash|ornaments|annotation|stylistic|styleset|character-variant)\"\n }],\n\n \"comments\" : [{\n token: \"comment\", // multi line comment\n regex: \"\\\\/\\\\*\",\n push: [{\n token : \"comment\",\n regex : \"\\\\*\\\\/\",\n next : \"pop\"\n }, {\n defaultToken : \"comment\"\n }]\n }],\n\n \"ruleset\" : [{\n regex : \"-(webkit|ms|moz|o)-\",\n token : \"text\"\n }, {\n token : \"paren.rparen\",\n regex : \"\\\\}\",\n next : \"start\"\n }, {\n include : [\"strings\", \"url\", \"comments\"]\n }, {\n token : [\"constant.numeric\", \"keyword\"],\n regex : \"(\" + numRe + \")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\"\n }, {\n token : \"constant.numeric\",\n regex : numRe\n }, {\n token : \"constant.numeric\", // hex6 color\n regex : \"#[a-f0-9]{6}\"\n }, {\n token : \"constant.numeric\", // hex3 color\n regex : \"#[a-f0-9]{3}\"\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-element.css\"],\n regex : pseudoElements\n }, {\n token : [\"punctuation\", \"entity.other.attribute-name.pseudo-class.css\"],\n regex : pseudoClasses\n }, {\n include: \"url\"\n }, {\n token : keywordMapper,\n regex : \"\\\\-?[a-zA-Z_][a-zA-Z0-9_\\\\-]*\"\n }, {\n caseInsensitive: true\n }],\n\n url: [{\n token : \"support.function\",\n regex : \"(?:url(:?-prefix)?|domain|regexp)\\\\(\",\n push: [{\n token : \"support.function\",\n regex : \"\\\\)\",\n next : \"pop\"\n }, {\n defaultToken: \"string\"\n }]\n }],\n\n strings: [{\n token : \"string.start\",\n regex : \"'\",\n push : [{\n token : \"string.end\",\n regex : \"'|$\",\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }, {\n token : \"string.start\",\n regex : '\"',\n push : [{\n token : \"string.end\",\n regex : '\"|$',\n next: \"pop\"\n }, {\n include : \"escapes\"\n }, {\n token : \"constant.language.escape\",\n regex : /\\\\$/,\n consumeLineEnd: true\n }, {\n defaultToken: \"string\"\n }]\n }],\n escapes: [{\n token : \"constant.language.escape\",\n regex : /\\\\([a-fA-F\\d]{1,6}|[^a-fA-F\\d])/\n }]\n\n };\n\n this.normalizeRules();\n};\n\noop.inherits(CssHighlightRules, TextHighlightRules);\n\nexports.CssHighlightRules = CssHighlightRules;\n\n});\n\nace.define(\"ace/mode/css_completions\",[\"require\",\"exports\",\"module\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar propertyMap = {\n \"background\": {\"#$0\": 1},\n \"background-color\": {\"#$0\": 1, \"transparent\": 1, \"fixed\": 1},\n \"background-image\": {\"url('/$0')\": 1},\n \"background-repeat\": {\"repeat\": 1, \"repeat-x\": 1, \"repeat-y\": 1, \"no-repeat\": 1, \"inherit\": 1},\n \"background-position\": {\"bottom\":2, \"center\":2, \"left\":2, \"right\":2, \"top\":2, \"inherit\":2},\n \"background-attachment\": {\"scroll\": 1, \"fixed\": 1},\n \"background-size\": {\"cover\": 1, \"contain\": 1},\n \"background-clip\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"background-origin\": {\"border-box\": 1, \"padding-box\": 1, \"content-box\": 1},\n \"border\": {\"solid $0\": 1, \"dashed $0\": 1, \"dotted $0\": 1, \"#$0\": 1},\n \"border-color\": {\"#$0\": 1},\n \"border-style\": {\"solid\":2, \"dashed\":2, \"dotted\":2, \"double\":2, \"groove\":2, \"hidden\":2, \"inherit\":2, \"inset\":2, \"none\":2, \"outset\":2, \"ridged\":2},\n \"border-collapse\": {\"collapse\": 1, \"separate\": 1},\n \"bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"clear\": {\"left\": 1, \"right\": 1, \"both\": 1, \"none\": 1},\n \"color\": {\"#$0\": 1, \"rgb(#$00,0,0)\": 1},\n \"cursor\": {\"default\": 1, \"pointer\": 1, \"move\": 1, \"text\": 1, \"wait\": 1, \"help\": 1, \"progress\": 1, \"n-resize\": 1, \"ne-resize\": 1, \"e-resize\": 1, \"se-resize\": 1, \"s-resize\": 1, \"sw-resize\": 1, \"w-resize\": 1, \"nw-resize\": 1},\n \"display\": {\"none\": 1, \"block\": 1, \"inline\": 1, \"inline-block\": 1, \"table-cell\": 1},\n \"empty-cells\": {\"show\": 1, \"hide\": 1},\n \"float\": {\"left\": 1, \"right\": 1, \"none\": 1},\n \"font-family\": {\"Arial\":2,\"Comic Sans MS\":2,\"Consolas\":2,\"Courier New\":2,\"Courier\":2,\"Georgia\":2,\"Monospace\":2,\"Sans-Serif\":2, \"Segoe UI\":2,\"Tahoma\":2,\"Times New Roman\":2,\"Trebuchet MS\":2,\"Verdana\": 1},\n \"font-size\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"font-weight\": {\"bold\": 1, \"normal\": 1},\n \"font-style\": {\"italic\": 1, \"normal\": 1},\n \"font-variant\": {\"normal\": 1, \"small-caps\": 1},\n \"height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"letter-spacing\": {\"normal\": 1},\n \"line-height\": {\"normal\": 1},\n \"list-style-type\": {\"none\": 1, \"disc\": 1, \"circle\": 1, \"square\": 1, \"decimal\": 1, \"decimal-leading-zero\": 1, \"lower-roman\": 1, \"upper-roman\": 1, \"lower-greek\": 1, \"lower-latin\": 1, \"upper-latin\": 1, \"georgian\": 1, \"lower-alpha\": 1, \"upper-alpha\": 1},\n \"margin\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"margin-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"max-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-height\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"min-width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"overflow\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-x\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"overflow-y\": {\"hidden\": 1, \"visible\": 1, \"auto\": 1, \"scroll\": 1},\n \"padding\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-bottom\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"padding-left\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"page-break-after\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"page-break-before\": {\"auto\": 1, \"always\": 1, \"avoid\": 1, \"left\": 1, \"right\": 1},\n \"position\": {\"absolute\": 1, \"relative\": 1, \"fixed\": 1, \"static\": 1},\n \"right\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"table-layout\": {\"fixed\": 1, \"auto\": 1},\n \"text-decoration\": {\"none\": 1, \"underline\": 1, \"line-through\": 1, \"blink\": 1},\n \"text-align\": {\"left\": 1, \"right\": 1, \"center\": 1, \"justify\": 1},\n \"text-transform\": {\"capitalize\": 1, \"uppercase\": 1, \"lowercase\": 1, \"none\": 1},\n \"top\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"vertical-align\": {\"top\": 1, \"bottom\": 1},\n \"visibility\": {\"hidden\": 1, \"visible\": 1},\n \"white-space\": {\"nowrap\": 1, \"normal\": 1, \"pre\": 1, \"pre-line\": 1, \"pre-wrap\": 1},\n \"width\": {\"px\": 1, \"em\": 1, \"%\": 1},\n \"word-spacing\": {\"normal\": 1},\n \"filter\": {\"alpha(opacity=$0100)\": 1},\n\n \"text-shadow\": {\"$02px 2px 2px #777\": 1},\n \"text-overflow\": {\"ellipsis-word\": 1, \"clip\": 1, \"ellipsis\": 1},\n \"-moz-border-radius\": 1,\n \"-moz-border-radius-topright\": 1,\n \"-moz-border-radius-bottomright\": 1,\n \"-moz-border-radius-topleft\": 1,\n \"-moz-border-radius-bottomleft\": 1,\n \"-webkit-border-radius\": 1,\n \"-webkit-border-top-right-radius\": 1,\n \"-webkit-border-top-left-radius\": 1,\n \"-webkit-border-bottom-right-radius\": 1,\n \"-webkit-border-bottom-left-radius\": 1,\n \"-moz-box-shadow\": 1,\n \"-webkit-box-shadow\": 1,\n \"transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-moz-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1},\n \"-webkit-transform\": {\"rotate($00deg)\": 1, \"skew($00deg)\": 1 }\n};\n\nvar CssCompletions = function() {\n\n};\n\n(function() {\n\n this.completionsDefined = false;\n\n this.defineCompletions = function() {\n if (document) {\n var style = document.createElement('c').style;\n\n for (var i in style) {\n if (typeof style[i] !== 'string')\n continue;\n\n var name = i.replace(/[A-Z]/g, function(x) {\n return '-' + x.toLowerCase();\n });\n\n if (!propertyMap.hasOwnProperty(name))\n propertyMap[name] = 1;\n }\n }\n\n this.completionsDefined = true;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n if (!this.completionsDefined) {\n this.defineCompletions();\n }\n\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (state==='ruleset'){\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/:[^;]+$/.test(line)) {\n /([\\w\\-]+):[^:]*$/.test(line);\n\n return this.getPropertyValueCompletions(state, session, pos, prefix);\n } else {\n return this.getPropertyCompletions(state, session, pos, prefix);\n }\n }\n\n return [];\n };\n\n this.getPropertyCompletions = function(state, session, pos, prefix) {\n var properties = Object.keys(propertyMap);\n return properties.map(function(property){\n return {\n caption: property,\n snippet: property + ': $0;',\n meta: \"property\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getPropertyValueCompletions = function(state, session, pos, prefix) {\n var line = session.getLine(pos.row).substr(0, pos.column);\n var property = (/([\\w\\-]+):[^:]*$/.exec(line) || {})[1];\n\n if (!property)\n return [];\n var values = [];\n if (property in propertyMap && typeof propertyMap[property] === \"object\") {\n values = Object.keys(propertyMap[property]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"property value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(CssCompletions.prototype);\n\nexports.CssCompletions = CssCompletions;\n});\n\nace.define(\"ace/mode/behaviour/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/mode/behaviour/cstyle\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar CstyleBehaviour = acequire(\"./cstyle\").CstyleBehaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\n\nvar CssBehaviour = function () {\n\n this.inherit(CstyleBehaviour);\n\n this.add(\"colon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ':') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n if (!line.substring(cursor.column).match(/^\\s*;/)) {\n return {\n text: ':;',\n selection: [1, 1]\n };\n }\n }\n }\n });\n\n this.add(\"colon\", \"deletion\", function (state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && selected === ':') {\n var cursor = editor.getCursorPosition();\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n if (token && token.value.match(/\\s+/)) {\n token = iterator.stepBackward();\n }\n if (token && token.type === 'support.type') {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.end.column, range.end.column + 1);\n if (rightChar === ';') {\n range.end.column ++;\n return range;\n }\n }\n }\n });\n\n this.add(\"semicolon\", \"insertion\", function (state, action, editor, session, text) {\n if (text === ';') {\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n if (rightChar === ';') {\n return {\n text: '',\n selection: [1, 1]\n };\n }\n }\n });\n\n};\noop.inherits(CssBehaviour, CstyleBehaviour);\n\nexports.CssBehaviour = CssBehaviour;\n});\n\nace.define(\"ace/mode/css\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/css_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/css_completions\",\"ace/mode/behaviour/css\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CssCompletions = acequire(\"./css_completions\").CssCompletions;\nvar CssBehaviour = acequire(\"./behaviour/css\").CssBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = CssHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CssBehaviour();\n this.$completer = new CssCompletions();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.foldingRules = \"cStyle\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n var tokens = this.getTokenizer().getLineTokens(line, state).tokens;\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n var match = line.match(/^.*\\{\\s*$/);\n if (match) {\n indent += tab;\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/css */ \"../../../../brace@0.11.1/node_modules/brace/worker/css.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/css\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n\n});\n\nace.define(\"ace/mode/xml_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar XmlHighlightRules = function(normalize) {\n var tagRegex = \"[_:a-zA-Z\\xc0-\\uffff][-_:.a-zA-Z0-9\\xc0-\\uffff]*\";\n\n this.$rules = {\n start : [\n {token : \"string.cdata.xml\", regex : \"<\\\\!\\\\[CDATA\\\\[\", next : \"cdata\"},\n {\n token : [\"punctuation.instruction.xml\", \"keyword.instruction.xml\"],\n regex : \"(<\\\\?)(\" + tagRegex + \")\", next : \"processing_instruction\"\n },\n {token : \"comment.start.xml\", regex : \"<\\\\!--\", next : \"comment\"},\n {\n token : [\"xml-pe.doctype.xml\", \"xml-pe.doctype.xml\"],\n regex : \"(<\\\\!)(DOCTYPE)(?=[\\\\s])\", next : \"doctype\", caseInsensitive: true\n },\n {include : \"tag\"},\n {token : \"text.end-tag-open.xml\", regex: \"\",\n next : \"start\"\n }],\n\n doctype : [\n {include : \"whitespace\"},\n {include : \"string\"},\n {token : \"xml-pe.doctype.xml\", regex : \">\", next : \"start\"},\n {token : \"xml-pe.xml\", regex : \"[-_a-zA-Z0-9:]+\"},\n {token : \"punctuation.int-subset\", regex : \"\\\\[\", push : \"int_subset\"}\n ],\n\n int_subset : [{\n token : \"text.xml\",\n regex : \"\\\\s+\"\n }, {\n token: \"punctuation.int-subset.xml\",\n regex: \"]\",\n next: \"pop\"\n }, {\n token : [\"punctuation.markup-decl.xml\", \"keyword.markup-decl.xml\"],\n regex : \"(<\\\\!)(\" + tagRegex + \")\",\n push : [{\n token : \"text\",\n regex : \"\\\\s+\"\n },\n {\n token : \"punctuation.markup-decl.xml\",\n regex : \">\",\n next : \"pop\"\n },\n {include : \"string\"}]\n }],\n\n cdata : [\n {token : \"string.cdata.xml\", regex : \"\\\\]\\\\]>\", next : \"start\"},\n {token : \"text.xml\", regex : \"\\\\s+\"},\n {token : \"text.xml\", regex : \"(?:[^\\\\]]|\\\\](?!\\\\]>))+\"}\n ],\n\n comment : [\n {token : \"comment.end.xml\", regex : \"-->\", next : \"start\"},\n {defaultToken : \"comment.xml\"}\n ],\n\n reference : [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }],\n\n attr_reference : [{\n token : \"constant.language.escape.reference.attribute-value.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }],\n\n tag : [{\n token : [\"meta.tag.punctuation.tag-open.xml\", \"meta.tag.punctuation.end-tag-open.xml\", \"meta.tag.tag-name.xml\"],\n regex : \"(?:(<)|(\", next : \"start\"}\n ]\n }],\n\n tag_whitespace : [\n {token : \"text.tag-whitespace.xml\", regex : \"\\\\s+\"}\n ],\n whitespace : [\n {token : \"text.whitespace.xml\", regex : \"\\\\s+\"}\n ],\n string: [{\n token : \"string.xml\",\n regex : \"'\",\n push : [\n {token : \"string.xml\", regex: \"'\", next: \"pop\"},\n {defaultToken : \"string.xml\"}\n ]\n }, {\n token : \"string.xml\",\n regex : '\"',\n push : [\n {token : \"string.xml\", regex: '\"', next: \"pop\"},\n {defaultToken : \"string.xml\"}\n ]\n }],\n\n attributes: [{\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n include: \"tag_whitespace\"\n }, {\n include: \"attribute_value\"\n }],\n\n attribute_value: [{\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"attr_reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"attr_reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }]\n };\n\n if (this.constructor === XmlHighlightRules)\n this.normalizeRules();\n};\n\n\n(function() {\n\n this.embedTagRules = function(HighlightRules, prefix, tag){\n this.$rules.tag.unshift({\n token : [\"meta.tag.punctuation.tag-open.xml\", \"meta.tag.\" + tag + \".tag-name.xml\"],\n regex : \"(<)(\" + tag + \"(?=\\\\s|>|$))\",\n next: [\n {include : \"attributes\"},\n {token : \"meta.tag.punctuation.tag-close.xml\", regex : \"/?>\", next : prefix + \"start\"}\n ]\n });\n\n this.$rules[tag + \"-end\"] = [\n {include : \"attributes\"},\n {token : \"meta.tag.punctuation.tag-close.xml\", regex : \"/?>\", next: \"start\",\n onMatch : function(value, currentState, stack) {\n stack.splice(0);\n return this.token;\n }}\n ];\n\n this.embedRules(HighlightRules, prefix, [{\n token: [\"meta.tag.punctuation.end-tag-open.xml\", \"meta.tag.\" + tag + \".tag-name.xml\"],\n regex : \"(|$))\",\n next: tag + \"-end\"\n }, {\n token: \"string.cdata.xml\",\n regex : \"<\\\\!\\\\[CDATA\\\\[\"\n }, {\n token: \"string.cdata.xml\",\n regex : \"\\\\]\\\\]>\"\n }]);\n };\n\n}).call(TextHighlightRules.prototype);\n\noop.inherits(XmlHighlightRules, TextHighlightRules);\n\nexports.XmlHighlightRules = XmlHighlightRules;\n});\n\nace.define(\"ace/mode/html_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/css_highlight_rules\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/xml_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar CssHighlightRules = acequire(\"./css_highlight_rules\").CssHighlightRules;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar XmlHighlightRules = acequire(\"./xml_highlight_rules\").XmlHighlightRules;\n\nvar tagMap = lang.createMap({\n a : 'anchor',\n button \t : 'form',\n form : 'form',\n img : 'image',\n input : 'form',\n label : 'form',\n option : 'form',\n script : 'script',\n select : 'form',\n textarea : 'form',\n style : 'style',\n table : 'table',\n tbody : 'table',\n td : 'table',\n tfoot : 'table',\n th : 'table',\n tr : 'table'\n});\n\nvar HtmlHighlightRules = function() {\n XmlHighlightRules.call(this);\n\n this.addRules({\n attributes: [{\n include : \"tag_whitespace\"\n }, {\n token : \"entity.other.attribute-name.xml\",\n regex : \"[-_a-zA-Z0-9:.]+\"\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\",\n push : [{\n include: \"tag_whitespace\"\n }, {\n token : \"string.unquoted.attribute-value.html\",\n regex : \"[^<>='\\\"`\\\\s]+\",\n next : \"pop\"\n }, {\n token : \"empty\",\n regex : \"\",\n next : \"pop\"\n }]\n }, {\n include : \"attribute_value\"\n }],\n tag: [{\n token : function(start, tag) {\n var group = tagMap[tag];\n return [\"meta.tag.punctuation.\" + (start == \"<\" ? \"\" : \"end-\") + \"tag-open.xml\",\n \"meta.tag\" + (group ? \".\" + group : \"\") + \".tag-name.xml\"];\n },\n regex : \"(\", next : \"start\"}\n ]\n });\n\n this.embedTagRules(CssHighlightRules, \"css-\", \"style\");\n this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), \"js-\", \"script\");\n\n if (this.constructor === HtmlHighlightRules)\n this.normalizeRules();\n};\n\noop.inherits(HtmlHighlightRules, XmlHighlightRules);\n\nexports.HtmlHighlightRules = HtmlHighlightRules;\n});\n\nace.define(\"ace/mode/behaviour/xml\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/behaviour\",\"ace/token_iterator\",\"ace/lib/lang\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Behaviour = acequire(\"../behaviour\").Behaviour;\nvar TokenIterator = acequire(\"../../token_iterator\").TokenIterator;\nvar lang = acequire(\"../../lib/lang\");\n\nfunction is(token, type) {\n return token.type.lastIndexOf(type + \".xml\") > -1;\n}\n\nvar XmlBehaviour = function () {\n\n this.add(\"string_dquotes\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '\"' || text == \"'\") {\n var quote = text;\n var selected = session.doc.getTextRange(editor.getSelectionRange());\n if (selected !== \"\" && selected !== \"'\" && selected != '\"' && editor.getWrapBehavioursEnabled()) {\n return {\n text: quote + selected + quote,\n selection: false\n };\n }\n\n var cursor = editor.getCursorPosition();\n var line = session.doc.getLine(cursor.row);\n var rightChar = line.substring(cursor.column, cursor.column + 1);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n if (rightChar == quote && (is(token, \"attribute-value\") || is(token, \"string\"))) {\n return {\n text: \"\",\n selection: [1, 1]\n };\n }\n\n if (!token)\n token = iterator.stepBackward();\n\n if (!token)\n return;\n\n while (is(token, \"tag-whitespace\") || is(token, \"whitespace\")) {\n token = iterator.stepBackward();\n }\n var rightSpace = !rightChar || rightChar.match(/\\s/);\n if (is(token, \"attribute-equals\") && (rightSpace || rightChar == '>') || (is(token, \"decl-attribute-equals\") && (rightSpace || rightChar == '?'))) {\n return {\n text: quote + quote,\n selection: [1, 1]\n };\n }\n }\n });\n\n this.add(\"string_dquotes\", \"deletion\", function(state, action, editor, session, range) {\n var selected = session.doc.getTextRange(range);\n if (!range.isMultiLine() && (selected == '\"' || selected == \"'\")) {\n var line = session.doc.getLine(range.start.row);\n var rightChar = line.substring(range.start.column + 1, range.start.column + 2);\n if (rightChar == selected) {\n range.end.column++;\n return range;\n }\n }\n });\n\n this.add(\"autoclosing\", \"insertion\", function (state, action, editor, session, text) {\n if (text == '>') {\n var position = editor.getSelectionRange().start;\n var iterator = new TokenIterator(session, position.row, position.column);\n var token = iterator.getCurrentToken() || iterator.stepBackward();\n if (!token || !(is(token, \"tag-name\") || is(token, \"tag-whitespace\") || is(token, \"attribute-name\") || is(token, \"attribute-equals\") || is(token, \"attribute-value\")))\n return;\n if (is(token, \"reference.attribute-value\"))\n return;\n if (is(token, \"attribute-value\")) {\n var firstChar = token.value.charAt(0);\n if (firstChar == '\"' || firstChar == \"'\") {\n var lastChar = token.value.charAt(token.value.length - 1);\n var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;\n if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)\n return;\n }\n }\n while (!is(token, \"tag-name\")) {\n token = iterator.stepBackward();\n if (token.value == \"<\") {\n token = iterator.stepForward();\n break;\n }\n }\n\n var tokenRow = iterator.getCurrentTokenRow();\n var tokenColumn = iterator.getCurrentTokenColumn();\n if (is(iterator.stepBackward(), \"end-tag-open\"))\n return;\n\n var element = token.value;\n if (tokenRow == position.row)\n element = element.substring(0, position.column - tokenColumn);\n\n if (this.voidElements.hasOwnProperty(element.toLowerCase()))\n return;\n\n return {\n text: \">\" + \"\",\n selection: [1, 1]\n };\n }\n });\n\n this.add(\"autoindent\", \"insertion\", function (state, action, editor, session, text) {\n if (text == \"\\n\") {\n var cursor = editor.getCursorPosition();\n var line = session.getLine(cursor.row);\n var iterator = new TokenIterator(session, cursor.row, cursor.column);\n var token = iterator.getCurrentToken();\n\n if (token && token.type.indexOf(\"tag-close\") !== -1) {\n if (token.value == \"/>\")\n return;\n while (token && token.type.indexOf(\"tag-name\") === -1) {\n token = iterator.stepBackward();\n }\n\n if (!token) {\n return;\n }\n\n var tag = token.value;\n var row = iterator.getCurrentTokenRow();\n token = iterator.stepBackward();\n if (!token || token.type.indexOf(\"end-tag\") !== -1) {\n return;\n }\n\n if (this.voidElements && !this.voidElements[tag]) {\n var nextToken = session.getTokenAt(cursor.row, cursor.column+1);\n var line = session.getLine(row);\n var nextIndent = this.$getIndent(line);\n var indent = nextIndent + session.getTabString();\n\n if (nextToken && nextToken.value === \" -1;\n}\n\n(function() {\n\n this.getFoldWidget = function(session, foldStyle, row) {\n var tag = this._getFirstTagInLine(session, row);\n\n if (!tag)\n return this.getCommentFoldWidget(session, row);\n\n if (tag.closing || (!tag.tagName && tag.selfClosing))\n return foldStyle == \"markbeginend\" ? \"end\" : \"\";\n\n if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))\n return \"\";\n\n if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))\n return \"\";\n\n return \"start\";\n };\n\n this.getCommentFoldWidget = function(session, row) {\n if (/comment/.test(session.getState(row)) && /';\n break;\n }\n }\n return tag;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == '/>';\n return tag;\n }\n tag.start.column += token.value.length;\n }\n\n return null;\n };\n\n this._findEndTagInLine = function(session, row, tagName, startColumn) {\n var tokens = session.getTokens(row);\n var column = 0;\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i];\n column += token.value.length;\n if (column < startColumn)\n continue;\n if (is(token, \"end-tag-open\")) {\n token = tokens[i + 1];\n if (token && token.value == tagName)\n return true;\n }\n }\n return false;\n };\n this._readTagForward = function(iterator) {\n var token = iterator.getCurrentToken();\n if (!token)\n return null;\n\n var tag = new Tag();\n do {\n if (is(token, \"tag-open\")) {\n tag.closing = is(token, \"end-tag-open\");\n tag.start.row = iterator.getCurrentTokenRow();\n tag.start.column = iterator.getCurrentTokenColumn();\n } else if (is(token, \"tag-name\")) {\n tag.tagName = token.value;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == \"/>\";\n tag.end.row = iterator.getCurrentTokenRow();\n tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;\n iterator.stepForward();\n return tag;\n }\n } while(token = iterator.stepForward());\n\n return null;\n };\n \n this._readTagBackward = function(iterator) {\n var token = iterator.getCurrentToken();\n if (!token)\n return null;\n\n var tag = new Tag();\n do {\n if (is(token, \"tag-open\")) {\n tag.closing = is(token, \"end-tag-open\");\n tag.start.row = iterator.getCurrentTokenRow();\n tag.start.column = iterator.getCurrentTokenColumn();\n iterator.stepBackward();\n return tag;\n } else if (is(token, \"tag-name\")) {\n tag.tagName = token.value;\n } else if (is(token, \"tag-close\")) {\n tag.selfClosing = token.value == \"/>\";\n tag.end.row = iterator.getCurrentTokenRow();\n tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;\n }\n } while(token = iterator.stepBackward());\n\n return null;\n };\n \n this._pop = function(stack, tag) {\n while (stack.length) {\n \n var top = stack[stack.length-1];\n if (!tag || top.tagName == tag.tagName) {\n return stack.pop();\n }\n else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {\n stack.pop();\n continue;\n } else {\n return null;\n }\n }\n };\n \n this.getFoldWidgetRange = function(session, foldStyle, row) {\n var firstTag = this._getFirstTagInLine(session, row);\n \n if (!firstTag) {\n return this.getCommentFoldWidget(session, row)\n && session.getCommentFoldRange(row, session.getLine(row).length);\n }\n \n var isBackward = firstTag.closing || firstTag.selfClosing;\n var stack = [];\n var tag;\n \n if (!isBackward) {\n var iterator = new TokenIterator(session, row, firstTag.start.column);\n var start = {\n row: row,\n column: firstTag.start.column + firstTag.tagName.length + 2\n };\n if (firstTag.start.row == firstTag.end.row)\n start.column = firstTag.end.column;\n while (tag = this._readTagForward(iterator)) {\n if (tag.selfClosing) {\n if (!stack.length) {\n tag.start.column += tag.tagName.length + 2;\n tag.end.column -= 2;\n return Range.fromPoints(tag.start, tag.end);\n } else\n continue;\n }\n \n if (tag.closing) {\n this._pop(stack, tag);\n if (stack.length == 0)\n return Range.fromPoints(start, tag.start);\n }\n else {\n stack.push(tag);\n }\n }\n }\n else {\n var iterator = new TokenIterator(session, row, firstTag.end.column);\n var end = {\n row: row,\n column: firstTag.start.column\n };\n \n while (tag = this._readTagBackward(iterator)) {\n if (tag.selfClosing) {\n if (!stack.length) {\n tag.start.column += tag.tagName.length + 2;\n tag.end.column -= 2;\n return Range.fromPoints(tag.start, tag.end);\n } else\n continue;\n }\n \n if (!tag.closing) {\n this._pop(stack, tag);\n if (stack.length == 0) {\n tag.start.column += tag.tagName.length + 2;\n if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)\n tag.start.column = tag.end.column;\n return Range.fromPoints(tag.start, end);\n }\n }\n else {\n stack.push(tag);\n }\n }\n }\n \n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/folding/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/folding/mixed\",\"ace/mode/folding/xml\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar MixedFoldMode = acequire(\"./mixed\").FoldMode;\nvar XmlFoldMode = acequire(\"./xml\").FoldMode;\nvar CStyleFoldMode = acequire(\"./cstyle\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(voidElements, optionalTags) {\n MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {\n \"js-\": new CStyleFoldMode(),\n \"css-\": new CStyleFoldMode()\n });\n};\n\noop.inherits(FoldMode, MixedFoldMode);\n\n});\n\nace.define(\"ace/mode/html_completions\",[\"require\",\"exports\",\"module\",\"ace/token_iterator\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar TokenIterator = acequire(\"../token_iterator\").TokenIterator;\n\nvar commonAttributes = [\n \"accesskey\",\n \"class\",\n \"contenteditable\",\n \"contextmenu\",\n \"dir\",\n \"draggable\",\n \"dropzone\",\n \"hidden\",\n \"id\",\n \"inert\",\n \"itemid\",\n \"itemprop\",\n \"itemref\",\n \"itemscope\",\n \"itemtype\",\n \"lang\",\n \"spellcheck\",\n \"style\",\n \"tabindex\",\n \"title\",\n \"translate\"\n];\n\nvar eventAttributes = [\n \"onabort\",\n \"onblur\",\n \"oncancel\",\n \"oncanplay\",\n \"oncanplaythrough\",\n \"onchange\",\n \"onclick\",\n \"onclose\",\n \"oncontextmenu\",\n \"oncuechange\",\n \"ondblclick\",\n \"ondrag\",\n \"ondragend\",\n \"ondragenter\",\n \"ondragleave\",\n \"ondragover\",\n \"ondragstart\",\n \"ondrop\",\n \"ondurationchange\",\n \"onemptied\",\n \"onended\",\n \"onerror\",\n \"onfocus\",\n \"oninput\",\n \"oninvalid\",\n \"onkeydown\",\n \"onkeypress\",\n \"onkeyup\",\n \"onload\",\n \"onloadeddata\",\n \"onloadedmetadata\",\n \"onloadstart\",\n \"onmousedown\",\n \"onmousemove\",\n \"onmouseout\",\n \"onmouseover\",\n \"onmouseup\",\n \"onmousewheel\",\n \"onpause\",\n \"onplay\",\n \"onplaying\",\n \"onprogress\",\n \"onratechange\",\n \"onreset\",\n \"onscroll\",\n \"onseeked\",\n \"onseeking\",\n \"onselect\",\n \"onshow\",\n \"onstalled\",\n \"onsubmit\",\n \"onsuspend\",\n \"ontimeupdate\",\n \"onvolumechange\",\n \"onwaiting\"\n];\n\nvar globalAttributes = commonAttributes.concat(eventAttributes);\n\nvar attributeMap = {\n \"html\": {\"manifest\": 1},\n \"head\": {},\n \"title\": {},\n \"base\": {\"href\": 1, \"target\": 1},\n \"link\": {\"href\": 1, \"hreflang\": 1, \"rel\": {\"stylesheet\": 1, \"icon\": 1}, \"media\": {\"all\": 1, \"screen\": 1, \"print\": 1}, \"type\": {\"text/css\": 1, \"image/png\": 1, \"image/jpeg\": 1, \"image/gif\": 1}, \"sizes\": 1},\n \"meta\": {\"http-equiv\": {\"content-type\": 1}, \"name\": {\"description\": 1, \"keywords\": 1}, \"content\": {\"text/html; charset=UTF-8\": 1}, \"charset\": 1},\n \"style\": {\"type\": 1, \"media\": {\"all\": 1, \"screen\": 1, \"print\": 1}, \"scoped\": 1},\n \"script\": {\"charset\": 1, \"type\": {\"text/javascript\": 1}, \"src\": 1, \"defer\": 1, \"async\": 1},\n \"noscript\": {\"href\": 1},\n \"body\": {\"onafterprint\": 1, \"onbeforeprint\": 1, \"onbeforeunload\": 1, \"onhashchange\": 1, \"onmessage\": 1, \"onoffline\": 1, \"onpopstate\": 1, \"onredo\": 1, \"onresize\": 1, \"onstorage\": 1, \"onundo\": 1, \"onunload\": 1},\n \"section\": {},\n \"nav\": {},\n \"article\": {\"pubdate\": 1},\n \"aside\": {},\n \"h1\": {},\n \"h2\": {},\n \"h3\": {},\n \"h4\": {},\n \"h5\": {},\n \"h6\": {},\n \"header\": {},\n \"footer\": {},\n \"address\": {},\n \"main\": {},\n \"p\": {},\n \"hr\": {},\n \"pre\": {},\n \"blockquote\": {\"cite\": 1},\n \"ol\": {\"start\": 1, \"reversed\": 1},\n \"ul\": {},\n \"li\": {\"value\": 1},\n \"dl\": {},\n \"dt\": {},\n \"dd\": {},\n \"figure\": {},\n \"figcaption\": {},\n \"div\": {},\n \"a\": {\"href\": 1, \"target\": {\"_blank\": 1, \"top\": 1}, \"ping\": 1, \"rel\": {\"nofollow\": 1, \"alternate\": 1, \"author\": 1, \"bookmark\": 1, \"help\": 1, \"license\": 1, \"next\": 1, \"noreferrer\": 1, \"prefetch\": 1, \"prev\": 1, \"search\": 1, \"tag\": 1}, \"media\": 1, \"hreflang\": 1, \"type\": 1},\n \"em\": {},\n \"strong\": {},\n \"small\": {},\n \"s\": {},\n \"cite\": {},\n \"q\": {\"cite\": 1},\n \"dfn\": {},\n \"abbr\": {},\n \"data\": {},\n \"time\": {\"datetime\": 1},\n \"code\": {},\n \"var\": {},\n \"samp\": {},\n \"kbd\": {},\n \"sub\": {},\n \"sup\": {},\n \"i\": {},\n \"b\": {},\n \"u\": {},\n \"mark\": {},\n \"ruby\": {},\n \"rt\": {},\n \"rp\": {},\n \"bdi\": {},\n \"bdo\": {},\n \"span\": {},\n \"br\": {},\n \"wbr\": {},\n \"ins\": {\"cite\": 1, \"datetime\": 1},\n \"del\": {\"cite\": 1, \"datetime\": 1},\n \"img\": {\"alt\": 1, \"src\": 1, \"height\": 1, \"width\": 1, \"usemap\": 1, \"ismap\": 1},\n \"iframe\": {\"name\": 1, \"src\": 1, \"height\": 1, \"width\": 1, \"sandbox\": {\"allow-same-origin\": 1, \"allow-top-navigation\": 1, \"allow-forms\": 1, \"allow-scripts\": 1}, \"seamless\": {\"seamless\": 1}},\n \"embed\": {\"src\": 1, \"height\": 1, \"width\": 1, \"type\": 1},\n \"object\": {\"param\": 1, \"data\": 1, \"type\": 1, \"height\" : 1, \"width\": 1, \"usemap\": 1, \"name\": 1, \"form\": 1, \"classid\": 1},\n \"param\": {\"name\": 1, \"value\": 1},\n \"video\": {\"src\": 1, \"autobuffer\": 1, \"autoplay\": {\"autoplay\": 1}, \"loop\": {\"loop\": 1}, \"controls\": {\"controls\": 1}, \"width\": 1, \"height\": 1, \"poster\": 1, \"muted\": {\"muted\": 1}, \"preload\": {\"auto\": 1, \"metadata\": 1, \"none\": 1}},\n \"audio\": {\"src\": 1, \"autobuffer\": 1, \"autoplay\": {\"autoplay\": 1}, \"loop\": {\"loop\": 1}, \"controls\": {\"controls\": 1}, \"muted\": {\"muted\": 1}, \"preload\": {\"auto\": 1, \"metadata\": 1, \"none\": 1 }},\n \"source\": {\"src\": 1, \"type\": 1, \"media\": 1},\n \"track\": {\"kind\": 1, \"src\": 1, \"srclang\": 1, \"label\": 1, \"default\": 1},\n \"canvas\": {\"width\": 1, \"height\": 1},\n \"map\": {\"name\": 1},\n \"area\": {\"shape\": 1, \"coords\": 1, \"href\": 1, \"hreflang\": 1, \"alt\": 1, \"target\": 1, \"media\": 1, \"rel\": 1, \"ping\": 1, \"type\": 1},\n \"svg\": {},\n \"math\": {},\n \"table\": {\"summary\": 1},\n \"caption\": {},\n \"colgroup\": {\"span\": 1},\n \"col\": {\"span\": 1},\n \"tbody\": {},\n \"thead\": {},\n \"tfoot\": {},\n \"tr\": {},\n \"td\": {\"headers\": 1, \"rowspan\": 1, \"colspan\": 1},\n \"th\": {\"headers\": 1, \"rowspan\": 1, \"colspan\": 1, \"scope\": 1},\n \"form\": {\"accept-charset\": 1, \"action\": 1, \"autocomplete\": 1, \"enctype\": {\"multipart/form-data\": 1, \"application/x-www-form-urlencoded\": 1}, \"method\": {\"get\": 1, \"post\": 1}, \"name\": 1, \"novalidate\": 1, \"target\": {\"_blank\": 1, \"top\": 1}},\n \"fieldset\": {\"disabled\": 1, \"form\": 1, \"name\": 1},\n \"legend\": {},\n \"label\": {\"form\": 1, \"for\": 1},\n \"input\": {\n \"type\": {\"text\": 1, \"password\": 1, \"hidden\": 1, \"checkbox\": 1, \"submit\": 1, \"radio\": 1, \"file\": 1, \"button\": 1, \"reset\": 1, \"image\": 31, \"color\": 1, \"date\": 1, \"datetime\": 1, \"datetime-local\": 1, \"email\": 1, \"month\": 1, \"number\": 1, \"range\": 1, \"search\": 1, \"tel\": 1, \"time\": 1, \"url\": 1, \"week\": 1},\n \"accept\": 1, \"alt\": 1, \"autocomplete\": {\"on\": 1, \"off\": 1}, \"autofocus\": {\"autofocus\": 1}, \"checked\": {\"checked\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"formaction\": 1, \"formenctype\": {\"application/x-www-form-urlencoded\": 1, \"multipart/form-data\": 1, \"text/plain\": 1}, \"formmethod\": {\"get\": 1, \"post\": 1}, \"formnovalidate\": {\"formnovalidate\": 1}, \"formtarget\": {\"_blank\": 1, \"_self\": 1, \"_parent\": 1, \"_top\": 1}, \"height\": 1, \"list\": 1, \"max\": 1, \"maxlength\": 1, \"min\": 1, \"multiple\": {\"multiple\": 1}, \"name\": 1, \"pattern\": 1, \"placeholder\": 1, \"readonly\": {\"readonly\": 1}, \"acequired\": {\"acequired\": 1}, \"size\": 1, \"src\": 1, \"step\": 1, \"width\": 1, \"files\": 1, \"value\": 1},\n \"button\": {\"autofocus\": 1, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"formaction\": 1, \"formenctype\": 1, \"formmethod\": 1, \"formnovalidate\": 1, \"formtarget\": 1, \"name\": 1, \"value\": 1, \"type\": {\"button\": 1, \"submit\": 1}},\n \"select\": {\"autofocus\": 1, \"disabled\": 1, \"form\": 1, \"multiple\": {\"multiple\": 1}, \"name\": 1, \"size\": 1, \"readonly\":{\"readonly\": 1}},\n \"datalist\": {},\n \"optgroup\": {\"disabled\": 1, \"label\": 1},\n \"option\": {\"disabled\": 1, \"selected\": 1, \"label\": 1, \"value\": 1},\n \"textarea\": {\"autofocus\": {\"autofocus\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"maxlength\": 1, \"name\": 1, \"placeholder\": 1, \"readonly\": {\"readonly\": 1}, \"acequired\": {\"acequired\": 1}, \"rows\": 1, \"cols\": 1, \"wrap\": {\"on\": 1, \"off\": 1, \"hard\": 1, \"soft\": 1}},\n \"keygen\": {\"autofocus\": 1, \"challenge\": {\"challenge\": 1}, \"disabled\": {\"disabled\": 1}, \"form\": 1, \"keytype\": {\"rsa\": 1, \"dsa\": 1, \"ec\": 1}, \"name\": 1},\n \"output\": {\"for\": 1, \"form\": 1, \"name\": 1},\n \"progress\": {\"value\": 1, \"max\": 1},\n \"meter\": {\"value\": 1, \"min\": 1, \"max\": 1, \"low\": 1, \"high\": 1, \"optimum\": 1},\n \"details\": {\"open\": 1},\n \"summary\": {},\n \"command\": {\"type\": 1, \"label\": 1, \"icon\": 1, \"disabled\": 1, \"checked\": 1, \"radiogroup\": 1, \"command\": 1},\n \"menu\": {\"type\": 1, \"label\": 1},\n \"dialog\": {\"open\": 1}\n};\n\nvar elements = Object.keys(attributeMap);\n\nfunction is(token, type) {\n return token.type.lastIndexOf(type + \".xml\") > -1;\n}\n\nfunction findTagName(session, pos) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n while (token && !is(token, \"tag-name\")){\n token = iterator.stepBackward();\n }\n if (token)\n return token.value;\n}\n\nfunction findAttributeName(session, pos) {\n var iterator = new TokenIterator(session, pos.row, pos.column);\n var token = iterator.getCurrentToken();\n while (token && !is(token, \"attribute-name\")){\n token = iterator.stepBackward();\n }\n if (token)\n return token.value;\n}\n\nvar HtmlCompletions = function() {\n\n};\n\n(function() {\n\n this.getCompletions = function(state, session, pos, prefix) {\n var token = session.getTokenAt(pos.row, pos.column);\n\n if (!token)\n return [];\n if (is(token, \"tag-name\") || is(token, \"tag-open\") || is(token, \"end-tag-open\"))\n return this.getTagCompletions(state, session, pos, prefix);\n if (is(token, \"tag-whitespace\") || is(token, \"attribute-name\"))\n return this.getAttributeCompletions(state, session, pos, prefix);\n if (is(token, \"attribute-value\"))\n return this.getAttributeValueCompletions(state, session, pos, prefix);\n var line = session.getLine(pos.row).substr(0, pos.column);\n if (/&[a-z]*$/i.test(line))\n return this.getHTMLEntityCompletions(state, session, pos, prefix);\n\n return [];\n };\n\n this.getTagCompletions = function(state, session, pos, prefix) {\n return elements.map(function(element){\n return {\n value: element,\n meta: \"tag\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getAttributeCompletions = function(state, session, pos, prefix) {\n var tagName = findTagName(session, pos);\n if (!tagName)\n return [];\n var attributes = globalAttributes;\n if (tagName in attributeMap) {\n attributes = attributes.concat(Object.keys(attributeMap[tagName]));\n }\n return attributes.map(function(attribute){\n return {\n caption: attribute,\n snippet: attribute + '=\"$0\"',\n meta: \"attribute\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getAttributeValueCompletions = function(state, session, pos, prefix) {\n var tagName = findTagName(session, pos);\n var attributeName = findAttributeName(session, pos);\n \n if (!tagName)\n return [];\n var values = [];\n if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === \"object\") {\n values = Object.keys(attributeMap[tagName][attributeName]);\n }\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"attribute value\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n this.getHTMLEntityCompletions = function(state, session, pos, prefix) {\n var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];\n\n return values.map(function(value){\n return {\n caption: value,\n snippet: value,\n meta: \"html entity\",\n score: Number.MAX_VALUE\n };\n });\n };\n\n}).call(HtmlCompletions.prototype);\n\nexports.HtmlCompletions = HtmlCompletions;\n});\n\nace.define(\"ace/mode/html\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/text\",\"ace/mode/javascript\",\"ace/mode/css\",\"ace/mode/html_highlight_rules\",\"ace/mode/behaviour/xml\",\"ace/mode/folding/html\",\"ace/mode/html_completions\",\"ace/worker/worker_client\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptMode = acequire(\"./javascript\").Mode;\nvar CssMode = acequire(\"./css\").Mode;\nvar HtmlHighlightRules = acequire(\"./html_highlight_rules\").HtmlHighlightRules;\nvar XmlBehaviour = acequire(\"./behaviour/xml\").XmlBehaviour;\nvar HtmlFoldMode = acequire(\"./folding/html\").FoldMode;\nvar HtmlCompletions = acequire(\"./html_completions\").HtmlCompletions;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar voidElements = [\"area\", \"base\", \"br\", \"col\", \"embed\", \"hr\", \"img\", \"input\", \"keygen\", \"link\", \"meta\", \"menuitem\", \"param\", \"source\", \"track\", \"wbr\"];\nvar optionalEndTags = [\"li\", \"dt\", \"dd\", \"p\", \"rt\", \"rp\", \"optgroup\", \"option\", \"colgroup\", \"td\", \"th\"];\n\nvar Mode = function(options) {\n this.fragmentContext = options && options.fragmentContext;\n this.HighlightRules = HtmlHighlightRules;\n this.$behaviour = new XmlBehaviour();\n this.$completer = new HtmlCompletions();\n \n this.createModeDelegates({\n \"js-\": JavaScriptMode,\n \"css-\": CssMode\n });\n \n this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.blockComment = {start: \"\"};\n\n this.voidElements = lang.arrayToMap(voidElements);\n\n this.getNextLineIndent = function(state, line, tab) {\n return this.$getIndent(line);\n };\n\n this.checkOutdent = function(state, line, input) {\n return false;\n };\n\n this.getCompletions = function(state, session, pos, prefix) {\n return this.$completer.getCompletions(state, session, pos, prefix);\n };\n\n this.createWorker = function(session) {\n if (this.constructor != Mode)\n return;\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/html */ \"../../../../brace@0.11.1/node_modules/brace/worker/html.js\"), \"Worker\");\n worker.attachToDocument(session.getDocument());\n\n if (this.fragmentContext)\n worker.call(\"setOptions\", [{context: this.fragmentContext}]);\n\n worker.on(\"error\", function(e) {\n session.setAnnotations(e.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/html\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYnJhY2VAMC4xMS4xL25vZGVfbW9kdWxlcy9icmFjZS9tb2RlL2h0bWwuanMuanMiLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7Q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TdHJpbmd8UHJveHl8XCIgICsgLy8gQ29uc3RydWN0b3JzXG4gICAgICAgICAgICBcIk5hbWVzcGFjZXxRTmFtZXxYTUx8WE1MTGlzdHxcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gRTRYXG4gICAgICAgICAgICBcIkFycmF5QnVmZmVyfEZsb2F0MzJBcnJheXxGbG9hdDY0QXJyYXl8SW50MTZBcnJheXxJbnQzMkFycmF5fEludDhBcnJheXxcIiAgICtcbiAgICAgICAgICAgIFwiVWludDE2QXJyYXl8VWludDMyQXJyYXl8VWludDhBcnJheXxVaW50OENsYW1wZWRBcnJheXxcIiAgICAgICAgICAgICAgICAgICAgK1xuICAgICAgICAgICAgXCJFcnJvcnxFdmFsRXJyb3J8SW50ZXJuYWxFcnJvcnxSYW5nZUVycm9yfFJlZmVyZW5jZUVycm9yfFN0b3BJdGVyYXRpb258XCIgICArIC8vIEVycm9yc1xuICAgICAgICAgICAgXCJTeW50YXhFcnJvcnxUeXBlRXJyb3J8VVJJRXJyb3J8XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArXG4gICAgICAgICAgICBcImRlY29kZVVSSXxkZWNvZGVVUklDb21wb25lbnR8ZW5jb2RlVVJJfGVuY29kZVVSSUNvbXBvbmVudHxldmFsfGlzRmluaXRlfFwiICsgLy8gTm9uLWNvbnN0cnVjdG9yIGZ1bmN0aW9uc1xuICAgICAgICAgICAgXCJpc05hTnxwYXJzZUZsb2F0fHBhcnNlSW50fFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArXG4gICAgICAgICAgICBcIkpTT058TWF0aHxcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgLy8gT3RoZXJcbiAgICAgICAgICAgIFwidGhpc3xhcmd1bWVudHN8cHJvdG90eXBlfHdpbmRvd3xkb2N1bWVudFwiIC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aW58aW5zdGFuY2VvZnxyZXR1cm58dGhyb3d8dHJ5fHR5cGVvZnx5aWVsZHx2b2lkXCI7XG5cbiAgICB2YXIgZXNjYXBlZFJlID0gXCJcXFxcXFxcXCg/OnhbMC05YS1mQS1GXXsyfXxcIiArIC8vIGhleFxuICAgICAgICBcInVbMC05YS1mQS1GXXs0fXxcIiArIC8vIHVuaWNvZGVcbiAgICAgICAgXCJ1e1swLTlhLWZBLUZdezEsNn19fFwiICsgLy8gZXM2IHVuaWNvZGVcbiAgICAgICAgXCJbMC0yXVswLTddezAsMn18XCIgKyAvLyBvY3RcbiAgICAgICAgXCIzWzAtN11bMC03XT98XCIgKyAvLyBvY3RcbiAgICAgICAgXCJbNC03XVswLTddP3xcIiArIC8vb2N0XG4gICAgICAgIFwiLilcIjtcblxuICAgIHRoaXMuJHJ1bGVzID0ge1xuICAgICAgICBcIm5vX3JlZ2V4XCIgOiBbXG4gICAgICAgICAgICBEb2NDb21tZW50SGlnaGxpZ2h0UnVsZXMuZ2V0U3RhcnRSdWxlKFwiZG9jLXN0YXJ0XCIpLFxuICAgICAgICAgICAgY29tbWVudHMoXCJub19yZWdleFwiKSxcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIicoPz0uKVwiLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJxc3RyaW5nXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAnXCIoPz0uKScsXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInFxc3RyaW5nXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAvLyBoZXhhZGVjaW1hbCwgb2N0YWwgYW5kIGJpbmFyeVxuICAgICAgICAgICAgICAgIHJlZ2V4IDogLzAoPzpbeFhdWzAtOWEtZkEtRl0rfFtvT11bMC03XSt8W2JCXVswMV0rKVxcYi9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAvLyBkZWNpbWFsIGludGVnZXJzIGFuZCBmbG9hdHNcbiAgICAgICAgICAgICAgICByZWdleCA6IC8oPzpcXGRcXGQqKD86XFwuXFxkKik/fFxcLlxcZCspKD86W2VFXVsrLV0/XFxkK1xcYik/L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwic3VwcG9ydC5mdW5jdGlvblwiLFxuICAgICAgICAgICAgICAgICAgICBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXCJrZXl3b3JkLm9wZXJhdG9yXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKHByb3RvdHlwZSkoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLCBcImVudGl0eS5uYW1lLmZ1bmN0aW9uXCIsIFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICBcImtleXdvcmQub3BlcmF0b3JcIiwgXCJ0ZXh0XCIsIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFwuKShcIiArIGlkZW50aWZpZXJSZSArXCIpKFxcXFxzKikoPSkoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKikoXFxcXCgpXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKShcXFxccyspKFxcXFx3KykoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcImVudGl0eS5uYW1lLmZ1bmN0aW9uXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKGZ1bmN0aW9uKShcXFxccyspKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFxzKikoXFxcXCgpXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcImVudGl0eS5uYW1lLmZ1bmN0aW9uXCIsIFwidGV4dFwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgICAgIFwidGV4dFwiLCBcInN0b3JhZ2UudHlwZVwiLCBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxccyopKDopKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKikoXFxcXCgpXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInRleHRcIiwgXCJ0ZXh0XCIsIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKDopKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKikoXFxcXCgpXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcImZyb20oPz1cXFxccyooJ3xcXFwiKSlcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIig/OlwiICsga3dCZWZvcmVSZSArIFwiKVxcXFxiXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1wic3VwcG9ydC5jb25zdGFudFwiXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IC90aGF0XFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1wic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJzdXBwb3J0LmZ1bmN0aW9uLmZpcmVidWdcIl0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvKGNvbnNvbGUpKFxcLikod2FybnxpbmZvfGxvZ3xlcnJvcnx0aW1lfHRyYWNlfHRpbWVFbmR8YXNzZXJ0KVxcYi9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IGtleXdvcmRNYXBwZXIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBpZGVudGlmaWVyUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9bLl0oPyFbLl0pLyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwicHJvcGVydHlcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdG9yYWdlLnR5cGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC89Pi9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwia2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogLy0tfFxcK1xcK3xcXC57M318PT09fD09fD18IT18IT09fDwrPT98Pis9P3whfCYmfFxcfFxcfHxcXD86fFshJCUmKitcXC1+XFwvXl09Py8sXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInN0YXJ0XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9bPzosOy5dLyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwYXJlbi5scGFyZW5cIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9bXFxbKHtdLyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9bXFxdKX1dL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbW1lbnRcIixcbiAgICAgICAgICAgICAgICByZWdleDogL14jIS4qJC9cbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgcHJvcGVydHk6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLCBcImVudGl0eS5uYW1lLmZ1bmN0aW9uXCIsIFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICBcImtleXdvcmQub3BlcmF0b3JcIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcImVudGl0eS5uYW1lLmZ1bmN0aW9uXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFwuKShcIiArIGlkZW50aWZpZXJSZSArXCIpKFxcXFxzKikoPSkoXFxcXHMqKShmdW5jdGlvbikoPzooXFxcXHMrKShcXFxcdyspKT8oXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvWy5dKD8hWy5dK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gICAgICBcInN0YXJ0XCI6IFtcbiAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRTdGFydFJ1bGUoXCJkb2Mtc3RhcnRcIiksXG4gICAgICAgICAgICBjb21tZW50cyhcInN0YXJ0XCIpLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInN0cmluZy5yZWdleHBcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJcXFxcL1wiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwicmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxzK3xeJFwiLFxuICAgICAgICAgICAgICAgIG5leHQgOiBcInN0YXJ0XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcInJlZ2V4XCI6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJyZWdleHAua2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFxcXFxcKD86dVtcXFxcZGEtZkEtRl17NH18eFtcXFxcZGEtZkEtRl17Mn18LilcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInN0cmluZy5yZWdleHBcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCIvW3N4bmdpbXldKlwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJpbnZhbGlkXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IC9cXHtcXGQrXFxiLD9cXGQqXFx9WysqXXxbKyokXj9dWysqXXxbJF5dWz9dfFxcP3szLH0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFwoXFw/Wzo9IV18XFwpfFxce1xcZCtcXGIsP1xcZCpcXH18WysqXVxcP3xbKCkkXisqPy5dL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5kZWxpbWl0ZXJcIixcbiAgICAgICAgICAgICAgICByZWdleDogL1xcfC9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleDogL1xcW1xcXj8vLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwicmVnZXhfY2hhcmFjdGVyX2NsYXNzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIiRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwicmVnZXhfY2hhcmFjdGVyX2NsYXNzXCI6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJyZWdleHAuY2hhcmNsYXNzLmtleXdvcmQub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJcXFxcXFxcXCg/OnVbXFxcXGRhLWZBLUZdezR9fHhbXFxcXGRhLWZBLUZdezJ9fC4pXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJdXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiLVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiZW1wdHlcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCIkXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZy5yZWdleHAuY2hhcmFjaHRlcmNsYXNzXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJmdW5jdGlvbl9hcmd1bWVudHNcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInZhcmlhYmxlLnBhcmFtZXRlclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBpZGVudGlmaWVyUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlssIF0rXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIiRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwicXFzdHJpbmdcIiA6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxcXFxcJFwiLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kICA6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAnXCJ8JCcsXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJxc3RyaW5nXCIgOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogZXNjYXBlZFJlXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcXFxcXCRcIixcbiAgICAgICAgICAgICAgICBjb25zdW1lTGluZUVuZCAgOiB0cnVlXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCInfCRcIixcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdXG4gICAgfTtcblxuXG4gICAgaWYgKCFvcHRpb25zIHx8ICFvcHRpb25zLm5vRVM2KSB7XG4gICAgICAgIHRoaXMuJHJ1bGVzLm5vX3JlZ2V4LnVuc2hpZnQoe1xuICAgICAgICAgICAgcmVnZXg6IFwiW3t9XVwiLCBvbk1hdGNoOiBmdW5jdGlvbih2YWwsIHN0YXRlLCBzdGFjaykge1xuICAgICAgICAgICAgICAgIHRoaXMubmV4dCA9IHZhbCA9PSBcIntcIiA/IHRoaXMubmV4dFN0YXRlIDogXCJcIjtcbiAgICAgICAgICAgICAgICBpZiAodmFsID09IFwie1wiICYmIHN0YWNrLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay51bnNoaWZ0KFwic3RhcnRcIiwgc3RhdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh2YWwgPT0gXCJ9XCIgJiYgc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMubmV4dCA9IHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLm5leHQuaW5kZXhPZihcInN0cmluZ1wiKSAhPSAtMSB8fCB0aGlzLm5leHQuaW5kZXhPZihcImpzeFwiKSAhPSAtMSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcInBhcmVuLnF1YXNpLmVuZFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsID09IFwie1wiID8gXCJwYXJlbi5scGFyZW5cIiA6IFwicGFyZW4ucnBhcmVuXCI7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmV4dFN0YXRlOiBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5xdWFzaS5zdGFydFwiLFxuICAgICAgICAgICAgcmVnZXggOiAvYC8sXG4gICAgICAgICAgICBwdXNoICA6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogZXNjYXBlZFJlXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnF1YXNpLnN0YXJ0XCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvXFwkey8sXG4gICAgICAgICAgICAgICAgcHVzaCAgOiBcInN0YXJ0XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnF1YXNpLmVuZFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL2AvLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJwb3BcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmcucXVhc2lcIlxuICAgICAgICAgICAgfV1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgaWYgKCFvcHRpb25zIHx8IG9wdGlvbnMuanN4ICE9IGZhbHNlKVxuICAgICAgICAgICAgSlNYLmNhbGwodGhpcyk7XG4gICAgfVxuXG4gICAgdGhpcy5lbWJlZFJ1bGVzKERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcywgXCJkb2MtXCIsXG4gICAgICAgIFsgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldEVuZFJ1bGUoXCJub19yZWdleFwiKSBdKTtcblxuICAgIHRoaXMubm9ybWFsaXplUnVsZXMoKTtcbn07XG5cbm9vcC5pbmhlcml0cyhKYXZhU2NyaXB0SGlnaGxpZ2h0UnVsZXMsIFRleHRIaWdobGlnaHRSdWxlcyk7XG5cbmZ1bmN0aW9uIEpTWCgpIHtcbiAgICB2YXIgdGFnUmVnZXggPSBpZGVudGlmaWVyUmUucmVwbGFjZShcIlxcXFxkXCIsIFwiXFxcXGRcXFxcLVwiKTtcbiAgICB2YXIganN4VGFnID0ge1xuICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsLCBzdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgIHZhciBvZmZzZXQgPSB2YWwuY2hhckF0KDEpID09IFwiL1wiID8gMiA6IDE7XG4gICAgICAgICAgICBpZiAob2Zmc2V0ID09IDEpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUgIT0gdGhpcy5uZXh0U3RhdGUpXG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQodGhpcy5uZXh0LCB0aGlzLm5leHRTdGF0ZSwgMCk7XG4gICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICBzdGFjay51bnNoaWZ0KHRoaXMubmV4dCk7XG4gICAgICAgICAgICAgICAgc3RhY2tbMl0rKztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAob2Zmc2V0ID09IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhdGUgPT0gdGhpcy5uZXh0U3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbMV0tLTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzdGFja1sxXSB8fCBzdGFja1sxXSA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdGFjay5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIFt7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJtZXRhLnRhZy5wdW5jdHVhdGlvbi5cIiArIChvZmZzZXQgPT0gMSA/IFwiXCIgOiBcImVuZC1cIikgKyBcInRhZy1vcGVuLnhtbFwiLFxuICAgICAgICAgICAgICAgIHZhbHVlOiB2YWwuc2xpY2UoMCwgb2Zmc2V0KVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHR5cGU6IFwibWV0YS50YWcudGFnLW5hbWUueG1sXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbC5zdWJzdHIob2Zmc2V0KVxuICAgICAgICAgICAgfV07XG4gICAgICAgIH0sXG4gICAgICAgIHJlZ2V4IDogXCI8Lz9cIiArIHRhZ1JlZ2V4ICsgXCJcIixcbiAgICAgICAgbmV4dDogXCJqc3hBdHRyaWJ1dGVzXCIsXG4gICAgICAgIG5leHRTdGF0ZTogXCJqc3hcIlxuICAgIH07XG4gICAgdGhpcy4kcnVsZXMuc3RhcnQudW5zaGlmdChqc3hUYWcpO1xuICAgIHZhciBqc3hKc1J1bGUgPSB7XG4gICAgICAgIHJlZ2V4OiBcIntcIixcbiAgICAgICAgdG9rZW46IFwicGFyZW4ucXVhc2kuc3RhcnRcIixcbiAgICAgICAgcHVzaDogXCJzdGFydFwiXG4gICAgfTtcbiAgICB0aGlzLiRydWxlcy5qc3ggPSBbXG4gICAgICAgIGpzeEpzUnVsZSxcbiAgICAgICAganN4VGFnLFxuICAgICAgICB7aW5jbHVkZSA6IFwicmVmZXJlbmNlXCJ9LFxuICAgICAgICB7ZGVmYXVsdFRva2VuOiBcInN0cmluZ1wifVxuICAgIF07XG4gICAgdGhpcy4kcnVsZXMuanN4QXR0cmlidXRlcyA9IFt7XG4gICAgICAgIHRva2VuIDogXCJtZXRhLnRhZy5wdW5jdHVhdGlvbi50YWctY2xvc2UueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogXCIvPz5cIixcbiAgICAgICAgb25NYXRjaCA6IGZ1bmN0aW9uKHZhbHVlLCBjdXJyZW50U3RhdGUsIHN0YWNrKSB7XG4gICAgICAgICAgICBpZiAoY3VycmVudFN0YXRlID09IHN0YWNrWzBdKVxuICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICBpZiAodmFsdWUubGVuZ3RoID09IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RhY2tbMF0gPT0gdGhpcy5uZXh0U3RhdGUpXG4gICAgICAgICAgICAgICAgICAgIHN0YWNrWzFdLS07XG4gICAgICAgICAgICAgICAgaWYgKCFzdGFja1sxXSB8fCBzdGFja1sxXSA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc3BsaWNlKDAsIDIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMubmV4dCA9IHN0YWNrWzBdIHx8IFwic3RhcnRcIjtcbiAgICAgICAgICAgIHJldHVybiBbe3R5cGU6IHRoaXMudG9rZW4sIHZhbHVlOiB2YWx1ZX1dO1xuICAgICAgICB9LFxuICAgICAgICBuZXh0U3RhdGU6IFwianN4XCJcbiAgICB9LFxuICAgIGpzeEpzUnVsZSxcbiAgICBjb21tZW50cyhcImpzeEF0dHJpYnV0ZXNcIiksXG4gICAge1xuICAgICAgICB0b2tlbiA6IFwiZW50aXR5Lm90aGVyLmF0dHJpYnV0ZS1uYW1lLnhtbFwiLFxuICAgICAgICByZWdleCA6IHRhZ1JlZ2V4XG4gICAgfSwge1xuICAgICAgICB0b2tlbiA6IFwia2V5d29yZC5vcGVyYXRvci5hdHRyaWJ1dGUtZXF1YWxzLnhtbFwiLFxuICAgICAgICByZWdleCA6IFwiPVwiXG4gICAgfSwge1xuICAgICAgICB0b2tlbiA6IFwidGV4dC50YWctd2hpdGVzcGFjZS54bWxcIixcbiAgICAgICAgcmVnZXggOiBcI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N4WzAtOWEtZkEtRl0rOyl8KD86JlthLXpBLVowLTlfOlxcXFwuLV0rOylcIlxuICAgIH1dO1xufVxuXG5mdW5jdGlvbiBjb21tZW50cyhuZXh0KSB7XG4gICAgcmV0dXJuIFtcbiAgICAgICAge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbW1lbnRcIiwgLy8gbXVsdGkgbGluZSBjb21tZW50XG4gICAgICAgICAgICByZWdleCA6IC9cXC9cXCovLFxuICAgICAgICAgICAgbmV4dDogW1xuICAgICAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRUYWdSdWxlKCksXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJjb21tZW50XCIsIHJlZ2V4IDogXCJcXFxcKlxcXFwvXCIsIG5leHQgOiBuZXh0IHx8IFwicG9wXCJ9LFxuICAgICAgICAgICAgICAgIHtkZWZhdWx0VG9rZW4gOiBcImNvbW1lbnRcIiwgY2FzZUluc2Vuc2l0aXZlOiB0cnVlfVxuICAgICAgICAgICAgXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFwvXFxcXC9cIixcbiAgICAgICAgICAgIG5leHQ6IFtcbiAgICAgICAgICAgICAgICBEb2NDb21tZW50SGlnaGxpZ2h0UnVsZXMuZ2V0VGFnUnVsZSgpLFxuICAgICAgICAgICAgICAgIHt0b2tlbiA6IFwiY29tbWVudFwiLCByZWdleCA6IFwiJHxeXCIsIG5leHQgOiBuZXh0IHx8IFwicG9wXCJ9LFxuICAgICAgICAgICAgICAgIHtkZWZhdWx0VG9rZW4gOiBcImNvbW1lbnRcIiwgY2FzZUluc2Vuc2l0aXZlOiB0cnVlfVxuICAgICAgICAgICAgXVxuICAgICAgICB9XG4gICAgXTtcbn1cbmV4cG9ydHMuSmF2YVNjcmlwdEhpZ2hsaWdodFJ1bGVzID0gSmF2YVNjcmlwdEhpZ2hs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ZShyb3cpO1xuICAgIFxuICAgICAgICBpZiAodGhpcy5zaW5nbGVMaW5lQmxvY2tDb21tZW50UmUudGVzdChsaW5lKSkge1xuICAgICAgICAgICAgaWYgKCF0aGlzLnN0YXJ0UmVnaW9uUmUudGVzdChsaW5lKSAmJiAhdGhpcy50cmlwbGVTdGFyQmxvY2tDb21tZW50UmUudGVzdChsaW5lKSlcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgfVxuICAgIFxuICAgICAgICB2YXIgZncgPSB0aGlzLl9nZXRGb2xkV2lkZ2V0QmFzZShzZXNzaW9uLCBmb2xkU3R5bGUsIHJvdyk7XG4gICAgXG4gICAgICAgIGlmICghZncgJiYgdGhpcy5zdGFydFJlZ2lvblJlLnRlc3QobGluZSkpXG4gICAgICAgICAgICByZXR1cm4gXCJzdGFydFwiOyAvLyBsaW5lQ29tbWVudFJlZ2lvblN0YXJ0XG4gICAgXG4gICAgICAgIHJldHVybiBmdztcbiAgICB9O1xuXG4gICAgdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uLCBmb2xkU3R5bGUsIHJvdywgZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgXG4gICAgICAgIGlmICh0aGlzLnN0YXJ0UmVnaW9uUmUudGVzdChsaW5lKSlcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldENvbW1lbnRSZWdpb25CbG9jayhzZXNzaW9uLCBsaW5lLCByb3cpO1xuICAgICAgICBcbiAgICAgICAgdmFyIG1hdGNoID0gbGluZS5tYXRjaCh0aGlzLmZvbGRpbmdTdGFydE1hcmtlcik7XG4gICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgdmFyIGkgPSBtYXRjaC5pbmRleDtcblxuICAgICAgICAgICAgaWYgKG1hdGNoWzFdKVxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLm9wZW5pbmdCcmFja2V0QmxvY2soc2Vzc2lvbiwgbWF0Y2hbMV0sIHJvdywgaSk7XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICB2YXIgcmFuZ2UgPSBzZXNzaW9uLmdldENvbW1lbnRGb2xkUmFuZ2Uocm93LCBpICsgbWF0Y2hbMF0ubGVuZ3RoLCAxKTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHJhbmdlICYmICFyYW5nZS5pc011bHRpTGluZSgpKSB7XG4gICAgICAgICAgICAgICAgaWYgKGZvcmNlTXVsdGlsaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gdGhpcy5nZXRTZWN0aW9uUmFuZ2Uoc2Vzc2lvbiwgcm93KTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZvbGRTdHlsZSAhPSBcImFsbFwiKVxuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHJldHVybiByYW5nZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmb2xkU3R5bGUgPT09IFwibWFya2JlZ2luXCIpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIG1hdGNoID0gbGluZS5tYXRjaCh0aGlzLmZvbGRpbmdTdG9wTWFya2VyKTtcbiAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICB2YXIgaSA9IG1hdGNoLmluZGV4ICsgbWF0Y2hbMF0ubGVuZ3RoO1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2xvc2luZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcblxuICAgICAgICAgICAgcmV0dXJuIHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGksIC0xKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy5nZXRTZWN0aW9uUmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uLCByb3cpIHtcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgdmFyIHN0YXJ0SW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICB2YXIgc3RhcnRSb3cgPSByb3c7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUubGVuZ3RoO1xuICAgICAgICByb3cgPSByb3cgKyAxO1xuICAgICAgICB2YXIgZW5kUm93ID0gcm93O1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgd2hpbGUgKCsrcm93IDwgbWF4Um93KSB7XG4gICAgICAgICAgICBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICB2YXIgaW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICAgICAgaWYgKGluZGVudCA9PT0gLTEpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICBpZiAgKHN0YXJ0SW5kZW50ID4gaW5kZW50KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgdmFyIHN1YlJhbmdlID0gdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2Uoc2Vzc2lvbiwgXCJhbGxcIiwgcm93KTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHN1YlJhbmdlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHN1YlJhbmdlLnN0YXJ0LnJvdyA8PSBzdGFydFJvdykge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHN1YlJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcm93ID0gc3ViUmFuZ2UuZW5kLnJvdztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXJ0SW5kZW50ID09IGluZGVudCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbmRSb3cgPSByb3c7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHJldHVybiBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sdW1uLCBlbmRSb3csIHNlc3Npb24uZ2V0TGluZShlbmRSb3cpLmxlbmd0aCk7XG4gICAgfTtcbiAgICB0aGlzLmdldENvbW1lbnRSZWdpb25CbG9jayA9IGZ1bmN0aW9uKHNlc3Npb24sIGxpbmUsIHJvdykge1xuICAgICAgICB2YXIgc3RhcnRDb2x1bW4gPSBsaW5lLnNlYXJjaCgvXFxzKiQvKTtcbiAgICAgICAgdmFyIG1heFJvdyA9IHNlc3Npb24uZ2V0TGVuZ3RoKCk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgXG4gICAgICAgIHZhciByZSA9IC9eXFxzKig/OlxcL1xcKnxcXC9cXC98LS0pIz8oZW5kKT9yZWdpb25cXGIvO1xuICAgICAgICB2YXIgZGVwdGggPSAxO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBtID0gcmUuZXhlYyhsaW5lKTtcbiAgICAgICAgICAgIGlmICghbSkgY29udGludWU7XG4gICAgICAgICAgICBpZiAobVsxXSkgZGVwdGgtLTtcbiAgICAgICAgICAgIGVsc2UgZGVwdGgrKztcblxuICAgICAgICAgICAgaWYgKCFkZXB0aCkgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgZW5kUm93ID0gcm93O1xuICAgICAgICBpZiAoZW5kUm93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ICAgICAgIHZhciBlbmRTdGF0ZSA9IHRva2VuaXplZExpbmUuc3RhdGU7XG5cbiAgICAgICAgaWYgKHRva2Vucy5sZW5ndGggJiYgdG9rZW5zW3Rva2Vucy5sZW5ndGgtMV0udHlwZSA9PSBcImNvbW1lbnRcIikge1xuICAgICAgICAgICAgcmV0dXJuIGluZGVudDtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChzdGF0ZSA9PSBcInN0YXJ0XCIgfHwgc3RhdGUgPT0gXCJub19yZWdleFwiKSB7XG4gICAgICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKC9eLiooPzpcXGJjYXNlXFxiLio6fFtcXHtcXChcXFtdKVxccyokLyk7XG4gICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICBpbmRlbnQgKz0gdGFiO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHN0YXRlID09IFwiZG9jLXN0YXJ0XCIpIHtcbiAgICAgICAgICAgIGlmIChlbmRTdGF0ZSA9PSBcInN0YXJ0XCIgfHwgZW5kU3RhdGUgPT0gXCJub19yZWdleFwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKC9eXFxzKihcXC8/KVxcKi8pO1xuICAgICAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICAgICAgaWYgKG1hdGNoWzFdKSB7XG4gICAgICAgICAgICAgICAgICAgIGluZGVudCArPSBcIiBcIjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaW5kZW50ICs9IFwiKiBcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBpbmRlbnQ7XG4gICAgfTtcblxuICAgIHRoaXMuY2hlY2tPdXRkZW50ID0gZnVuY3Rpb24oc3RhdGUsIGxpbmUsIGl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JcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicGFyZW4ucnBhcmVuXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxcfVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInN0cmluZ1wiLFxuICAgICAgICAgICAgcmVnZXg6IFwiQFwiLFxuICAgICAgICAgICAgbmV4dDogIFwibWVkaWFcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICByZWdleDogXCIjW2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJrZXl3b3JkXCIsXG4gICAgICAgICAgICByZWdleDogXCIlXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwidmFyaWFibGVcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwuW2EtejAtOS1fXStcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmdcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIjpbYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsXG4gICAgICAgICAgICByZWdleCA6IG51bVJlXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50XCIsXG4gICAgICAgICAgICByZWdleDogXCJbYS16MC05LV9dK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGNhc2VJbnNlbnNpdGl2ZTogdHJ1ZVxuICAgICAgICB9XSxcblxuICAgICAgICBcIm1lZGlhXCI6IFt7XG4gICAgICAgICAgICBpbmNsdWRlIDogW1wic3RyaW5nc1wiLCBcInVybFwiLCBcImNvbW1lbnRzXCJdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiXFxcXHtcIixcbiAgICAgICAgICAgIG5leHQ6ICBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwicGFyZW4ucnBhcmVuXCIsXG4gICAgICAgICAgICByZWdleDogXCJcXFxcfVwiLFxuICAgICAgICAgICAgbmV4dDogIFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbjogXCJzdHJpbmdcIixcbiAgICAgICAgICAgIHJlZ2V4OiBcIjtcIixcbiAgICAgICAgICAgIG5leHQ6ICBcInN0YXJ0XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwia2V5d29yZFwiLFxuICAgICAgICAgICAgcmVnZXg6IFwiKD86bWVkaWF8c3VwcG9ydHN8ZG9jdW1lbnR8Y2hhcnNldHxpbXBvcnR8bmFtZXNwYWNlfG1lZGlhfHN1cHBvcnRzfGRvY3VtZW50XCJcbiAgICAgICAgICAgICAgICArIFwifHBhZ2V8Zm9udHxrZXlmcmFtZXN8dmlld3BvcnR8Y291bnRlci1zdHlsZXxmb250LWZlYXR1cmUtdmFsdWVzXCJcbiAgICAgICAgICAgICAgICArIFwifHN3YXNofG9ybmFtZW50c3xhbm5vdGF0aW9ufHN0eWxpc3RpY3xzdHlsZXNldHxjaGFyYWN0ZXItdmFyaWFudClcIlxuICAgICAgICB9XSxcblxuICAgICAgICBcImNvbW1lbnRzXCIgOiBbe1xuICAgICAgICAgICAgdG9rZW46IFwiY29tbWVudFwiLCAvLyBtdWx0aSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwvXFxcXCpcIixcbiAgICAgICAgICAgIHB1c2g6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbW1lbnRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXCpcXFxcL1wiLFxuICAgICAgICAgICAgICAgIG5leHQgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuIDogXCJjb21tZW50XCJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH1dLFxuXG4gICAgICAgIFwicnVsZXNldFwiIDogW3tcbiAgICAgICAgICAgIHJlZ2V4IDogXCItKHdlYmtpdHxtc3xtb3p8byktXCIsXG4gICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcfVwiLFxuICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBpbmNsdWRlIDogW1wic3RyaW5nc1wiLCBcInVybFwiLCBcImNvbW1lbnRzXCJdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogW1wiY29uc3RhbnQubnVtZXJpY1wiLCBcImtleXdvcmRcIl0sXG4gICAgICAgICAgICByZWdleCA6IFwiKFwiICsgbnVtUmUgKyBcIikoY2h8Y218ZGVnfGVtfGV4fGZyfGdkfGdyYWR8SHp8aW58a0h6fG1tfG1zfHBjfHB0fHB4fHJhZHxyZW18c3x0dXJufHZofHZtfHZ3fCUpXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIixcbiAgICAgICAgICAgIHJlZ2V4IDogbnVtUmVcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIiwgIC8vIGhleDYgY29sb3JcbiAgICAgICAgICAgIHJlZ2V4IDogXCIjW2EtZjAtOV17Nn1cIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAvLyBoZXgzIGNvbG9yXG4gICAgICAgICAgICByZWdleCA6IFwiI1thLWYwLTldezN9XCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBbXCJwdW5jdHVhdGlvblwiLCBcImVudGl0eS5vdGhlci5hdHRyaWJ1dGUtbmFtZS5wc2V1ZG8tZWxlbWVudC5jc3NcIl0sXG4gICAgICAgICAgICByZWdleCA6IHBzZXVkb0VsZW1lbnRzXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogW1wicHVuY3R1YXRpb25cIiwgXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUucHNldWRvLWNsYXNzLmNzc1wiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogcHNldWRvQ2xhc3Nlc1xuICAgICAgICB9LCB7XG4gICAgICAgICAgICBpbmNsdWRlOiBcInVybFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDoga2V5d29yZE1hcHBlcixcbiAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcLT9bYS16QS1aX11bYS16QS1aMC05X1xcXFwtXSpcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBjYXNlSW5zZW5zaXRpdmU6IHRydWVcbiAgICAgICAgfV0sXG5cbiAgICAgICAgdXJsOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInN1cHBvcnQuZnVuY3Rpb25cIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPzp1cmwoOj8tcHJlZml4KT98ZG9tYWlufHJlZ2V4cClcXFxcKFwiLFxuICAgICAgICAgICAgcHVzaDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3VwcG9ydC5mdW5jdGlvblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcKVwiLFxuICAgICAgICAgICAgICAgIG5leHQgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9XSxcblxuICAgICAgICBzdHJpbmdzOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5zdGFydFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIidcIixcbiAgICAgICAgICAgIHB1c2ggOiBbe1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIid8JFwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBpbmNsdWRlIDogXCJlc2NhcGVzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvXFxcXCQvLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kOiB0cnVlXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6ICdcIicsXG4gICAgICAgICAgICBwdXNoIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLmVuZFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogJ1wifCQnLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBpbmNsdWRlIDogXCJlc2NhcGVzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvXFxcXCQ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AgfSk7XG5cbiAgICAgICAgICAgICAgICBpZiAoIXByb3BlcnR5TWFwLmhhc093blByb3BlcnR5KG5hbWUpKVxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eU1hcFtuYW1lXSA9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmNvbXBsZXRpb25zRGVmaW5lZCA9IHRydWU7XG4gICAgfTtcblxuICAgIHRoaXMuZ2V0Q29tcGxldGlvbnMgPSBmdW5jdGlvbihzdGF0ZSwgc2Vzc2lvbiwgcG9zLCBwcmVmaXgpIHtcbiAgICAgICAgaWYgKCF0aGlzLmNvbXBsZXRpb25zRGVmaW5lZCkge1xuICAgICAgICAgICAgdGhpcy5kZWZpbmVDb21wbGV0aW9ucygpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHRva2VuID0gc2Vzc2lvbi5nZXRUb2tlbkF0KHBvcy5yb3csIHBvcy5jb2x1bW4pO1xuXG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIGlmIChzdGF0ZT09PSdydWxlc2V0Jyl7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShwb3Mucm93KS5zdWJzdHIoMCwgcG9zLmNvbHVtbik7XG4gICAgICAgICAgICBpZiAoLzpbXjtdKyQvLnRlc3QobGluZSkpIHtcbiAgICAgICAgICAgICAgICAvKFtcXHdcXC1dKyk6W146XSokLy50ZXN0KGxpbmUpO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0UHJvcGVydHlWYWx1ZUNvbXBsZXRpb25zKHN0YXRlLCBzZXNzaW9uLCBwb3MsIHByZWZpeCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmdldFByb3BlcnR5Q29tcGxldGlvbnMoc3RhdGUsIHNlc3Npb24sIHBvcywgcHJlZml4KTtcbiAgIC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ICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIWxpbmUuc3Vic3RyaW5nKGN1cnNvci5jb2x1bW4pLm1hdGNoKC9eXFxzKjsvKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAnOjsnLFxuICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJjb2xvblwiLCBcImRlbGV0aW9uXCIsIGZ1bmN0aW9uIChzdGF0ZSwgYWN0aW9uLCBlZGl0b3IsIHNlc3Npb24sIHJhbmdlKSB7XG4gICAgICAgIHZhciBzZWxlY3RlZCA9IHNlc3Npb24uZG9jLmdldFRleHRSYW5nZShyYW5nZSk7XG4gICAgICAgIGlmICghcmFuZ2UuaXNNdWx0aUxpbmUoKSAmJiBzZWxlY3RlZCA9PT0gJzonKSB7XG4gICAgICAgICAgICB2YXIgY3Vyc29yID0gZWRpdG9yLmdldEN1cnNvclBvc2l0aW9uKCk7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCBjdXJzb3Iucm93LCBjdXJzb3IuY29sdW1uKTtcbiAgICAgICAgICAgIHZhciB0b2tlbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbigpO1xuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnZhbHVlLm1hdGNoKC9cXHMrLykpIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHRva2VuICYmIHRva2VuLnR5cGUgPT09ICdzdXBwb3J0LnR5cGUnKSB7XG4gICAgICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmRvYy5nZXRMaW5lKHJhbmdlLnN0YXJ0LnJvdyk7XG4gICAgICAgICAgICAgICAgdmFyIHJpZ2h0Q2hhciA9IGxpbmUuc3Vic3RyaW5nKHJhbmdlLmVuZC5jb2x1bW4sIHJhbmdlLmVuZC5jb2x1bW4gKyAxKTtcbiAgICAgICAgICAgICAgICBpZiAocmlnaHRDaGFyID09PSAnOycpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UuZW5kLmNvbHVtbiArKztcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG4gICAgdGhpcy5hZGQoXCJzZW1pY29sb25cIiwgXCJpbnNlcnRpb25cIiwgZnVuY3Rpb24gKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgdGV4dCkge1xuICAgICAgICBpZiAodGV4dCA9PT0gJzsnKSB7XG4gICAgICAgICAgICB2YXIgY3Vyc29yID0gZWRpdG9yLmdldEN1cnNvclBvc2l0aW9uKCk7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZG9jLmdldExpbmUoY3Vyc29yLnJvdyk7XG4gICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbiwgY3Vyc29yLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PT0gJzsnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICB0ZXh0OiAnJyxcbiAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgIC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AgICAgICAgXSxcblxuICAgICAgICBwcm9jZXNzaW5nX2luc3RydWN0aW9uIDogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUuZGVjbC1hdHRyaWJ1dGUtbmFtZS54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogdGFnUmVnZXhcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmQub3BlcmF0b3IuZGVjbC1hdHRyaWJ1dGUtZXF1YWxzLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIj1cIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBpbmNsdWRlOiBcIndoaXRlc3BhY2VcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBpbmNsdWRlOiBcInN0cmluZ1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi54bWwtZGVjbC54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcPz5cIixcbiAgICAgICAgICAgIG5leHQgOiBcInN0YXJ0XCJcbiAgICAgICAgfV0sXG5cbiAgICAgICAgZG9jdHlwZSA6IFtcbiAgICAgICAgICAgIHtpbmNsdWRlIDogXCJ3aGl0ZXNwYWNlXCJ9LFxuICAgICAgICAgICAge2luY2x1ZGUgOiBcInN0cmluZ1wifSxcbiAgICAgICAgICAgIHt0b2tlbiA6IFwieG1sLXBlLmRvY3R5cGUueG1sXCIsIHJlZ2V4IDogXCI+XCIsIG5leHQgOiBcInN0YXJ0XCJ9LFxuICAgICAgICAgICAge3Rva2VuIDogXCJ4bWwtcGUueG1sXCIsIHJlZ2V4IDogXCJbLV9hLXpBLVowLTk6XStcIn0sXG4gICAgICAgICAgICB7dG9rZW4gOiBcInB1bmN0dWF0aW9uLmludC1zdWJzZXRcIiwgcmVnZXggOiBcIlxcXFxbXCIsIHB1c2ggOiBcImludF9zdWJzZXRcIn1cbiAgICAgICAgXSxcblxuICAgICAgICBpbnRfc3Vic2V0IDogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJ0ZXh0LnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxzK1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLmludC1zdWJzZXQueG1sXCIsXG4gICAgICAgICAgICByZWdleDogXCJdXCIsXG4gICAgICAgICAgICBuZXh0OiBcInBvcFwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogW1wicHVuY3R1YXRpb24ubWFya3VwLWRlY2wueG1sXCIsIFwia2V5d29yZC5tYXJrdXAtZGVjbC54bWxcIl0sXG4gICAgICAgICAgICByZWdleCA6IFwiKDxcXFxcISkoXCIgKyB0YWdSZWdleCArIFwiKVwiLFxuICAgICAgICAgICAgcHVzaCA6IFt7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrXCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInB1bmN0dWF0aW9uLm1hcmt1cC1kZWNsLnhtbFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCI+XCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwicG9wXCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB7aW5jbHVkZSA6IFwic3RyaW5nXCJ9XVxuICAgICAgICB9XSxcblxuICAgICAgICBjZGF0YSA6IFtcbiAgICAgICAgICAgIHt0b2tlbiA6IFwic3RyaW5nLmNkYXRhLnhtbFwiLCByZWdleCA6IFwiXFxcXF1cXFxcXT5cIiwgbmV4dCA6IFwic3RhcnRcIn0sXG4gICAgICAgICAgICB7dG9rZW4gOiBcInRleHQueG1sXCIsIHJlZ2V4IDogXCJcXFxccytcIn0sXG4gICAgICAgICAgICB7dG9rZW4gOiBcInRleHQueG1sXCIsIHJlZ2V4IDogXCIoPzpbXlxcXFxdXXxcXFxcXSg/IVxcXFxdPikpK1wifVxuICAgICAgICBdLFxuXG4gICAgICAgIGNvbW1lbnQgOiBbXG4gICAgICAgICAgICB7dG9rZW4gOiBcImNvbW1lbnQuZW5kLnhtbFwiLCByZWdleCA6IFwiLS0+XCIsIG5leHQgOiBcInN0YXJ0XCJ9LFxuICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudC54bWxcIn1cbiAgICAgICAgXSxcblxuICAgICAgICByZWZlcmVuY2UgOiBbe1xuICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZS5yZWZlcmVuY2UueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiKD86JiNbMC05XSs7KXwoPzomI3hbMC05YS1mQS1GXSs7KXwoPzomW2EtekEtWjAtOV86XFxcXC4tXSs7KVwiXG4gICAgICAgIH1dLFxuXG4gICAgICAgIGF0dHJfcmVmZXJlbmNlIDogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGUucmVmZXJlbmNlLmF0dHJpYnV0ZS12YWx1ZS54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPzomI1swLTldKzspfCg/OiYjeFswLTlhLWZBLUZdKzspfCg/OiZbYS16QS1aMC05XzpcXFxcLi1dKzspXCJcbiAgICAgICAgfV0sXG5cbiAgICAgICAgdGFnIDogW3tcbiAgICAgICAgICAgIHRva2VuIDogW1wibWV0YS50YWcucHVuY3R1YXRpb24udGFnLW9wZW4ueG1sXCIsIFwibWV0YS50YWcucHVuY3R1YXRpb24uZW5kLXRhZy1vcGVuLnhtbFwiLCBcIm1ldGEudGFnLnRhZy1uYW1lLnhtbFwiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPzooPCl8KDwvKSkoKD86XCIgKyB0YWdSZWdleCArIFwiOik/XCIgKyB0YWdSZWdleCArIFwiKVwiLFxuICAgICAgICAgICAgbmV4dDogW1xuICAgICAgICAgICAgICAgIHtpbmNsdWRlIDogXCJhdHRyaWJ1dGVzXCJ9LFxuICAgICAgICAgICAgICAgIHt0b2tlbiA6IFwibWV0YS50YWcucHVuY3R1YXRpb24udGFnLWNsb3NlLnhtbFwiLCByZWdleCA6IFwiLz8+XCIsIG5leHQgOiBcInN0YXJ0XCJ9XG4gICAgICAgICAgICBdXG4gICAgICAgIH1dLFxuXG4gICAgICAgIHRhZ193aGl0ZXNwYWNlIDogW1xuICAgICAgICAgICAge3Rva2VuIDogXCJ0ZXh0LnRhZy13aGl0ZXNwYWNlLnhtbFwiLCByZWdleCA6IFwiXFxcXHMrXCJ9XG4gICAgICAgIF0sXG4gICAgICAgIHdoaXRlc3BhY2UgOiBbXG4gICAgICAgICAgICB7dG9rZW4gOiBcInRleHQud2hpdGVzcGFjZS54bWxcIiwgcmVnZXggOiBcIlxcXFxzK1wifVxuICAgICAgICBdLFxuICAgICAgICBzdHJpbmc6IFt7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIidcIixcbiAgICAgICAgICAgIHB1c2ggOiBbXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJzdHJpbmcueG1sXCIsIHJlZ2V4OiBcIidcIiwgbmV4dDogXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwic3RyaW5nLnhtbFwifVxuICAgICAgICAgICAgXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiAnXCInLFxuICAgICAgICAgICAgcHVzaCA6IFtcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcInN0cmluZy54bWxcIiwgcmVnZXg6ICdcIicsIG5leHQ6IFwicG9wXCJ9LFxuICAgICAgICAgICAgICAgIHtkZWZhdWx0VG9rZW4gOiBcInN0cmluZy54bWxcIn1cbiAgICAgICAgICAgIF1cbiAgICAgICAgfV0sXG5cbiAgICAgICAgYXR0cmlidXRlczogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IHRhZ1JlZ2V4XG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yLmF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgICAgICByZWdleCA6IFwiPVwiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGU6IFwidGFnX3doaXRlc3BhY2VcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICBpbmNsdWRlOiBcImF0dHJpYnV0ZV92YWx1ZVwiXG4gICAgICAgIH1dLFxuXG4gICAgICAgIGF0dHJpYnV0ZV92YWx1ZTogW3tcbiAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcuYXR0cmlidXRlLXZhbHVlLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIidcIixcbiAgICAgICAgICAgIHB1c2ggOiBbXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJzdHJpbmcuYXR0cmlidXRlLXZhbHVlLnhtbFwiLCByZWdleDogXCInXCIsIG5leHQ6IFwicG9wXCJ9LFxuICAgICAgICAgICAgICAgIHtpbmNsdWRlIDogXCJhdHRyX3JlZmVyZW5jZVwifSxcbiAgICAgICAgICAgICAgICB7ZGVmYXVsdFRva2VuIDogXCJzdHJpbmcuYXR0cmlidXRlLXZhbHVlLnhtbFwifVxuICAgICAgICAgICAgXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLmF0dHJpYnV0ZS12YWx1ZS54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogJ1wiJyxcbiAgICAgICAgICAgIHB1c2ggOiBbXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJzdHJpbmcuYXR0cmlidXRlLXZhbHVlLnhtbFwiLCByZWdleDogJ1wiJywgbmV4dDogXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2luY2x1ZGUgOiBcImF0dHJfcmVmZXJlbmNlXCJ9LFxuICAgICAgICAgICAgICAgIHtkZWZhdWx0VG9rZW4gOiBcInN0cmluZy5hdHRyaWJ1dGUtdmFsdWUueG1sXCJ9XG4gICAgICAgICAgICBdXG4gICAgICAgIH1dXG4gICAgfTtcblxuICAgIGlmICh0aGlzLmNvbnN0cnVjdG9yID09PSBYbWxIaWdobGlnaHRSdWxlcylcbiAgICAgICAgdGhpcy5ub3JtYWxpemVSdWxlcygpO1xufTtcblxuXG4oZnVuY3Rpb24oKSB7XG5cbiAgICB0aGlzLmVtYmVkVGFnUnVsZXMgPSBmdW5jdGlvbihIaWdobGlnaHRSdWxlcywgcHJlZml4LCB0YWcpe1xuICAgICAgICB0aGlzLiRydWxlcy50YWcudW5zaGlmdCh7XG4gICAgICAgICAgICB0b2tlbiA6IFtcIm1ldGEudGFnLnB1bmN0dWF0aW9uLnRhZy1vcGVuLnhtbFwiLCBcIm1ldGEudGFnLlwiICsgdGFnICsgXCIudGFnLW5hbWUueG1sXCJdLFxuICAgICAgICAgICAgcmVnZXggOiBcIig8KShcIiArIHRhZyArIFwiKD89XFxcXHN8PnwkKSlcIixcbiAgICAgICAgICAgIG5leHQ6IFtcbiAgICAgICAgICAgICAgICB7aW5jbHVkZSA6IFwiYXR0cmlidXRlc1wifSxcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLnRhZy1jbG9zZS54bWxcIiwgcmVnZXggOiBcIi8/PlwiLCBuZXh0IDogcHJlZml4ICsgXCJzdGFydFwifVxuICAgICAgICAgICAgXVxuICAgICAgICB9KTtcblxuICAgICAgICB0aGlzLiRydWxlc1t0YWcgKyBcIi1lbmRcIl0gPSBbXG4gICAgICAgICAgICB7aW5jbHVkZSA6IFwiYXR0cmlidXRlc1wifSxcbiAgICAgICAgICAgIHt0b2tlbiA6IFwibWV0YS50YWcucHVuY3R1YXRpb24udGFnLWNsb3NlLnhtbFwiLCByZWdleCA6IFwiLz8+XCIsICBuZXh0OiBcInN0YXJ0XCIsXG4gICAgICAgICAgICAgICAgb25NYXRjaCA6IGZ1bmN0aW9uKHZhbHVlLCBjdXJyZW50U3RhdGUsIHN0YWNrKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnNwbGljZSgwKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMudG9rZW47XG4gICAgICAgICAgICB9fVxuICAgICAgICBdO1xuXG4gICAgICAgIHRoaXMuZW1iZWRSdWxlcyhIaWdobGlnaHRSdWxlcywgcHJlZml4LCBbe1xuICAgICAgICAgICAgdG9rZW46IFtcIm1ldGEudGFnLnB1bmN0dWF0aW9uLmVuZC10YWctb3Blbi54bWxcIiwgXCJtZXRhLnRhZy5cIiArIHRhZyArIFwiLnRhZy1uYW1lLnhtbFwiXSxcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPC8pKFwiICsgdGFnICsgXCIoPz1cXFxcc3w+fCQpKVwiLFxuICAgICAgICAgICAgbmV4dDogdGFnICsgXCItZW5kXCJcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLmNkYXRhLnhtbFwiLFxuICAgICAgICAgICAgcmVnZXggOiBcIjxcXFxcIVxcXFxbQ0RBVEFcXFxcW1wiXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuOiBcInN0cmluZy5jZGF0YS54bWxcIixcbiAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcXVxcXFxdPlwiXG4gICAgICAgIH1dKTtcbiAgICB9O1xuXG59KS5jYWxsKFRleHRIaWdobGlnaHRSdWxlcy5wcm90b3R5cG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2ggOiBbe1xuICAgICAgICAgICAgICAgIGluY2x1ZGU6IFwidGFnX3doaXRlc3BhY2VcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcudW5xdW90ZWQuYXR0cmlidXRlLXZhbHVlLmh0bWxcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiW148Pj0nXFxcImBcXFxcc10rXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwicG9wXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiZW1wdHlcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwicG9wXCJcbiAgICAgICAgICAgIH1dXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIGluY2x1ZGUgOiBcImF0dHJpYnV0ZV92YWx1ZVwiXG4gICAgICAgIH1dLFxuICAgICAgICB0YWc6IFt7XG4gICAgICAgICAgICB0b2tlbiA6IGZ1bmN0aW9uKHN0YXJ0LCB0YWcpIHtcbiAgICAgICAgICAgICAgICB2YXIgZ3JvdXAgPSB0YWdNYXBbdGFnXTtcbiAgICAgICAgICAgICAgICByZXR1cm4gW1wibWV0YS50YWcucHVuY3R1YXRpb24uXCIgKyAoc3RhcnQgPT0gXCI8XCIgPyBcIlwiIDogXCJlbmQtXCIpICsgXCJ0YWctb3Blbi54bWxcIixcbiAgICAgICAgICAgICAgICAgICAgXCJtZXRhLnRhZ1wiICsgKGdyb3VwID8gXCIuXCIgKyBncm91cCA6IFwiXCIpICsgXCIudGFnLW5hbWUueG1sXCJdO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHJlZ2V4IDogXCIoPC8/KShbLV9hLXpBLVowLTk6Ll0rKVwiLFxuICAgICAgICAgICAgbmV4dDogXCJ0YWdfc3R1ZmZcIlxuICAgICAgICB9XSxcbiAgICAgICAgdGFnX3N0dWZmOiBbXG4gICA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9yLmdldEN1cnNvclBvc2l0aW9uKCk7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZG9jLmdldExpbmUoY3Vyc29yLnJvdyk7XG4gICAgICAgICAgICB2YXIgcmlnaHRDaGFyID0gbGluZS5zdWJzdHJpbmcoY3Vyc29yLmNvbHVtbiwgY3Vyc29yLmNvbHVtbiArIDEpO1xuICAgICAgICAgICAgdmFyIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3Ioc2Vzc2lvbiwgY3Vyc29yLnJvdywgY3Vyc29yLmNvbHVtbik7XG4gICAgICAgICAgICB2YXIgdG9rZW4gPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW4oKTtcblxuICAgICAgICAgICAgaWYgKHJpZ2h0Q2hhciA9PSBxdW90ZSAmJiAoaXModG9rZW4sIFwiYXR0cmlidXRlLXZhbHVlXCIpIHx8IGlzKHRva2VuLCBcInN0cmluZ1wiKSkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICB0ZXh0OiBcIlwiLFxuICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCAxXVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcblxuICAgICAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgIHdoaWxlIChpcyh0b2tlbiwgXCJ0YWctd2hpdGVzcGFjZVwiKSB8fCBpcyh0b2tlbiwgXCJ3aGl0ZXNwYWNlXCIpKSB7XG4gICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciByaWdodFNwYWNlID0gIXJpZ2h0Q2hhciB8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ChmaXJzdENoYXIgPT0gJ1wiJyB8fCBmaXJzdENoYXIgPT0gXCInXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxhc3RDaGFyID0gdG9rZW4udmFsdWUuY2hhckF0KHRva2VuLnZhbHVlLmxlbmd0aCAtIDEpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdG9rZW5FbmQgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Db2x1bW4oKSArIHRva2VuLnZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRva2VuRW5kID4gcG9zaXRpb24uY29sdW1uIHx8IHRva2VuRW5kID09IHBvc2l0aW9uLmNvbHVtbiAmJiBmaXJzdENoYXIgIT0gbGFzdENoYXIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKCFpcyh0b2tlbiwgXCJ0YWctbmFtZVwiKSkge1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuLnZhbHVlID09IFwiPFwiKSB7XG4gICAgICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEZvcndhcmQoKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgdG9rZW5Sb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgIHZhciB0b2tlbkNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpO1xuICAgICAgICAgICAgaWYgKGlzKGl0ZXJhdG9yLnN0ZXBCYWNrd2FyZCgpLCBcImVuZC10YWctb3BlblwiKSlcbiAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgIHZhciBlbGVtZW50ID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICBpZiAodG9rZW5Sb3cgPT0gcG9zaXRpb24ucm93KVxuICAgICAgICAgICAgICAgIGVsZW1lbnQgPSBlbGVtZW50LnN1YnN0cmluZygwLCBwb3NpdGlvbi5jb2x1bW4gLSB0b2tlbkNvbHVtbik7XG5cbiAgICAgICAgICAgIGlmICh0aGlzLnZvaWRFbGVtZW50cy5oYXNPd25Qcm9wZXJ0eShlbGVtZW50LnRvTG93ZXJDYXNlKCkpKVxuICAgICAgICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICB0ZXh0OiBcIj5cIiArIFwiPC9cIiArIGVsZW1lbnQgKyBcIj5cIixcbiAgICAgICAgICAgICAgIHNlbGVjdGlvbjogWzEsIDFdXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICB0aGlzLmFkZChcImF1dG9pbmRlbnRcIiwgXCJpbnNlcnRpb25cIiwgZnVuY3Rpb24gKHN0YXRlLCBhY3Rpb24sIGVkaXRvciwgc2Vzc2lvbiwgdGV4dCkge1xuICAgICAgICBpZiAodGV4dCA9PSBcIlxcblwiKSB7XG4gICAgICAgICAgICB2YXIgY3Vyc29yID0gZWRpdG9yLmdldEN1cnNvclBvc2l0aW9uKCk7XG4gICAgICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShjdXJzb3Iucm93KTtcbiAgICAgICAgICAgIHZhciBpdGVyYXRvciA9IG5ldyBUb2tlbkl0ZXJhdG9yKHNlc3Npb24sIGN1cnNvci5yb3csIGN1cnNvci5jb2x1bW4pO1xuICAgICAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG5cbiAgICAgICAgICAgIGlmICh0b2tlbiAmJiB0b2tlbi50eXBlLmluZGV4T2YoXCJ0YWctY2xvc2VcIikgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRva2VuLnZhbHVlID09IFwiLz5cIilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIHdoaWxlICh0b2tlbiAmJiB0b2tlbi50eXBlLmluZGV4T2YoXCJ0YWctbmFtZVwiKSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSBpdGVyYXRvci5zdGVwQmFja3dhcmQoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIXRva2VuKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB2YXIgdGFnID0gdG9rZW4udmFsdWU7XG4gICAgICAgICAgICAgICAgdmFyIHJvdyA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlblJvdygpO1xuICAgICAgICAgICAgICAgIHRva2VuID0gaXRlcmF0b3Iuc3RlcEJhY2t3YXJkKCk7XG4gICAgICAgICAgICAgICAgaWYgKCF0b2tlbiB8fCB0b2tlbi50eXBlLmluZGV4T2YoXCJlbmQtdGFnXCIpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMudm9pZEVsZW1lbnRzICYmICF0aGlzLnZvaWRFbGVtZW50c1t0YWddKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBuZXh0VG9rZW4gPSBzZXNzaW9uLmdldFRva2VuQXQoY3Vyc29yLnJvdywgY3Vyc29yLmNvbHVtbisxKTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5leHRJbmRlbnQgPSB0aGlzLiRnZXRJbmRlbnQobGluZSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBpbmRlbnQgPSBuZXh0SW5kZW50ICsgc2Vzc2lvbi5nZXRUYWJTdHJpbmcoKTtcblxuICAgICAgICAgICAgICAgICAgICBpZiAobmV4dFRva2VuICYmIG5leHRUb2tlbi52YWx1ZSA9PT0gXCI8L1wiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQ6IFwiXFxuXCIgKyBpbmRlbnQgKyBcIlxcblwiICsgbmV4dEluZGVudCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3Rpb246IFsxLCBpbmRlbnQubGVuZ3RoLCAxLCBpbmRlbnQubGVuZ3RoXVxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dDogXCJcXG5cIiArIGluZGVudFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0pO1xuXG59O1xuXG5vb3AuaW5oZXJpdHMoWG1sQmVoYXZpb3VyLCBCZWhhdmlvdXIpO1xuXG5leHBvcnRzLlhtbEJlaGF2aW91ciA9IFhtbEJlaGF2aW91cjtcbn0pO1xuXG5hY2UuZGVmaW5lKFwiYWNlL21vZGUvZm9sZGluZy9taXhlZFwiLFtcInJlcXVpcmVcIixcImV4cG9ydHNcIixcIm1vZHVsZVwiLFwiYWNlL2xpYi9vb3BcIixcImFjZS9tb2RlL2ZvbGRpbmcvZm9sZF9tb2RlXCJdLCBmdW5jdGlvbihhY2VxdWlyZSwgZXhwb3J0cywgbW9kdWxlKSB7XG5cInVzZSBzdHJpY3RcIjtcblxudmFyIG9vcCA9IGFjZXF1aXJlKFw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LCB0YWcuZW5kLmNvbHVtbikpXG4gICAgICAgICAgICByZXR1cm4gXCJcIjtcblxuICAgICAgICByZXR1cm4gXCJzdGFydFwiO1xuICAgIH07XG5cbiAgICB0aGlzLmdldENvbW1lbnRGb2xkV2lkZ2V0ID0gZnVuY3Rpb24oc2Vzc2lvbiwgcm93KSB7XG4gICAgICAgIGlmICgvY29tbWVudC8udGVzdChzZXNzaW9uLmdldFN0YXRlKHJvdykpICYmIC88IS0vLnRlc3Qoc2Vzc2lvbi5nZXRMaW5lKHJvdykpKVxuICAgICAgICAgICAgcmV0dXJuIFwic3RhcnRcIjtcbiAgICAgICAgcmV0dXJuIFwiXCI7XG4gICAgfTtcbiAgICB0aGlzLl9nZXRGaXJzdFRhZ0luTGluZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdykge1xuICAgICAgICB2YXIgdG9rZW5zID0gc2Vzc2lvbi5nZXRUb2tlbnMocm93KTtcbiAgICAgICAgdmFyIHRhZyA9IG5ldyBUYWcoKTtcblxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRva2Vucy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIHRva2VuID0gdG9rZW5zW2ldO1xuICAgICAgICAgICAgaWYgKGlzKHRva2VuLCBcInRhZy1vcGVuXCIpKSB7XG4gICAgICAgICAgICAgICAgdGFnLmVuZC5jb2x1bW4gPSB0YWcuc3RhcnQuY29sdW1uICsgdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgIHRhZy5jbG9zaW5nID0gaXModG9rZW4sIFwiZW5kLXRhZy1vcGVuXCIpO1xuICAgICAgICAgICAgICAgIHRva2VuID0gdG9rZW5zWysraV07XG4gICAgICAgICAgICAgICAgaWYgKCF0b2tlbilcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgdGFnLnRhZ05hbWUgPSB0b2tlbi52YWx1ZTtcbiAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiArPSB0b2tlbi52YWx1ZS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgZm9yIChpKys7IGkgPCB0b2tlbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgdG9rZW4gPSB0b2tlbnNbaV07XG4gICAgICAgICAgICAgICAgICAgIHRhZy5lbmQuY29sdW1uICs9IHRva2VuLnZhbHVlLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzKHRva2VuLCBcInRhZy1jbG9zZVwiKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFnLnNlbGZDbG9zaW5nID0gdG9rZW4udmFsdWUgPT0gJy8+JztcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB0YWc7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzKHRva2VuLCBcInRhZy1jbG9zZVwiKSkge1xuICAgICAgICAgICAgICAgIHRhZy5zZWxmQ2xvc2luZyA9IHRva2VuLnZhbHVlID09ICcvPic7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRhZy5zdGFydC5jb2x1bW4gKz0gdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfTtcblxuICAgIHRoaXMuX2ZpbmRFbmRUYWdJbkxpbmUgPSBmdW5jdGlvbihzZXNzaW9uLCByb3csIHRhZ05hbWUsIHN0YXJ0Q29sdW1uKSB7XG4gICAgICAgIHZhciB0b2tlbnMgPSBzZXNzaW9uLmdldFRva2Vucyhyb3cpO1xuICAgICAgICB2YXIgY29sdW1uID0gMDtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0b2tlbnMubGVuZ3RoOyBpKyspIHtcbiAgICAgIC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IikpIHtcbiAgICAgICAgICAgICAgICB0YWcudGFnTmFtZSA9IHRva2VuLnZhbHVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChpcyh0b2tlbiwgXCJ0YWctY2xvc2VcIikpIHtcbiAgICAgICAgICAgICAgICB0YWcuc2VsZkNsb3NpbmcgPSB0b2tlbi52YWx1ZSA9PSBcIi8+XCI7XG4gICAgICAgICAgICAgICAgdGFnLmVuZC5yb3cgPSBpdGVyYXRvci5nZXRDdXJyZW50VG9rZW5Sb3coKTtcbiAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiA9IGl0ZXJhdG9yLmdldEN1cnJlbnRUb2tlbkNvbHVtbigpICsgdG9rZW4udmFsdWUubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGl0ZXJhdG9yLnN0ZXBGb3J3YXJkKCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRhZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSB3aGlsZSh0b2tlbiA9IGl0ZXJhdG9yLnN0ZXBGb3J3YXJkKCkpO1xuXG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH07XG4gICAgXG4gICAgdGhpcy5fcmVhZFRhZ0JhY2t3YXJkID0gZnVuY3Rpb24oaXRlcmF0b3IpIHtcbiAgICAgICAgdmFyIHRva2VuID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuKCk7XG4gICAgICAgIGlmICghdG9rZW4pXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcblxuICAgICAgICB2YXIgdGFnID0gbmV3IFRhZygpO1xuICAgICAgICBkbyB7XG4gICAgICAgICAgICBpZiAoaXModG9rZW4sIFwidGFnLW9wZW5cIikpIHtcbiAgICAgICAgICAgICAgICB0YWcuY2xvc2luZyA9IGlzKHRva2VuLCBcImVuZC10YWctb3BlblwiKTtcbiAgICAgICAgICAgICAgICB0YWcuc3RhcnQucm93ID0gaXRlcmF0b3IuZ2V0Q3VycmVudFRva2VuUm93KCk7XG4gICA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AgICAgICAgICBlbHNlIGlmICh0aGlzLm9wdGlvbmFsRW5kVGFncy5oYXNPd25Qcm9wZXJ0eSh0b3AudGFnTmFtZSkpIHtcbiAgICAgICAgICAgICAgICBzdGFjay5wb3AoKTtcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9O1xuICAgIFxuICAgIHRoaXMuZ2V0Rm9sZFdpZGdldFJhbmdlID0gZnVuY3Rpb24oc2Vzc2lvbiwgZm9sZFN0eWxlLCByb3cpIHtcbiAgICAgICAgdmFyIGZpcnN0VGFnID0gdGhpcy5fZ2V0Rmlyc3RUYWdJbkxpbmUoc2Vzc2lvbiwgcm93KTtcbiAgICAgICAgXG4gICAgICAgIGlmICghZmlyc3RUYWcpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmdldENvbW1lbnRGb2xkV2lkZ2V0KHNlc3Npb24sIHJvdylcbiAgICAgICAgICAgICAgICAmJiBzZXNzaW9uLmdldENvbW1lbnRGb2xkUmFuZ2Uocm93LCBzZXNzaW9uLmdldExpbmUocm93KS5sZW5ndGgpO1xuICAgICAgICB9XG4gICAgICAgIFxuICAgICAgICB2YXIgaXNCYWNrd2FyZCA9IGZpcnN0VGFnLmNsb3NpbmcgfHwgZmlyc3RUYWcuc2VsZkNsb3Npbmc7XG4gICAgICAgIHZhciBzdGFjayA9IFtdO1xuICAgICAgICB2YXIgdGFnO1xuICAgICAgICBcbiAgICAgICAgaWYgKCFpc0JhY2t3YXJkKSB7XG4gICAgICAgICAgICB2YXIgaXRlcmF0b3IgPSBuZXcgVG9rZW5JdGVyYXRvcihzZXNzaW9uLCByb3csIGZpcnN0VGFnLnN0YXJ0LmNvbHVtbik7XG4gICAgICAgICAgICB2YXIgc3RhcnQgPSB7XG4gICAgICAgICAgICAgICAgcm93OiByb3csXG4gICAgICAgICAgICAgICAgY29sdW1uOiBmaXJzdFRhZy5zdGFydC5jb2x1bW4gKyBmaXJzdFRhZy50YWdOYW1lLmxlbmd0aCArIDJcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAoZmlyc3RUYWcuc3RhcnQucm93ID09IGZpcnN0VGFnLmVuZC5yb3cpXG4gICAgICAgICAgICAgICAgc3RhcnQuY29sdW1uID0gZmlyc3RUYWcuZW5kLmNvbHVtbjtcbiAgICAgICAgICAgIHdoaWxlICh0YWcgPSB0aGlzLl9yZWFkVGFnRm9yd2FyZChpdGVyYXRvcikpIHtcbiAgICAgICAgICAgICAgICBpZiAodGFnLnNlbGZDbG9zaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuc3RhcnQuY29sdW1uICs9IHRhZy50YWdOYW1lLmxlbmd0aCArIDI7XG4gICAgICAgICAgICAgICAgICAgICAgICB0YWcuZW5kLmNvbHVtbiAtPSAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHModGFnLnN0YXJ0LCB0YWcuZW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgXG4gICAgICAgICAgICAgICAgaWYgKHRhZy5jbG9zaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3BvcChzdGFjaywgdGFnKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHN0YWNrLmxlbmd0aCA9PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJhbmdlLmZyb21Qb2ludHMoc3RhcnQsIHRhZy5zdGFydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5wdXNoKHRhZyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgdmFyIGl0ZXJhdG9yID0gbmV3IFRva2VuSXRlcmF0b3Ioc2Vzc2lvbiwgcm93LCBmaXJzdFRhZy5lbmQuY29sdW1uKTtcbiAgICAgICAgICAgIHZhciBlbmQgPSB7XG4gICAgICAgICAgICAgICAgcm93OiByb3csXG4gICAgICAgICAgICAgICAgY29sdW1uOiBmaXJzdFRhZy5zdGFydC5jb2x1bW5cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHdoaWxlICh0YWcgPSB0aGlzLl9yZWFkVGFnQmFja3dhcmQoaXRlcmF0b3IpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRhZy5zZWxmQ2xvc2luZykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YWNrLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFnLnN0YXJ0LmNvbHVtbiArPSB0YWcudGFnTmFtZS5sZW5ndGggKyAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFnLmVuZC5jb2x1bW4gLT0gMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBSYW5nZS5mcm9tUG9pbnRzKHRhZy5zdGFydCwgdGFnLmVuZCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIGlmICghdGFnLmNsb3NpbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5fcG9wKHN0YWNrLCB0YWcpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoc3RhY2subGVuZ3RoID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhZy5zdGFydC5jb2x1bW4g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ICAgIH07XG5cbiAgICB0aGlzLmNyZWF0ZVdvcmtlciA9IGZ1bmN0aW9uKHNlc3Npb24pIHtcbiAgICAgICAgaWYgKHRoaXMuY29uc3RydWN0b3IgIT0gTW9kZSlcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgdmFyIHdvcmtlciA9IG5ldyBXb3JrZXJDbGllbnQoW1wiYWNlXCJdLCByZXF1aXJlKFwiLi4vd29ya2VyL2h0bWxcIiksIFwiV29ya2VyXCIpO1xuICAgICAgICB3b3JrZXIuYXR0YWNoVG9Eb2N1bWVudChzZXNzaW9uLmdldERvY3VtZW50KCkpO1xuXG4gICAgICAgIGlmICh0aGlzLmZyYWdtZW50Q29udGV4dClcbiAgICAgICAgICAgIHdvcmtlci5jYWxsKFwic2V0T3B0aW9uc1wiLCBbe2NvbnRleHQ6IHRoaXMuZnJhZ21lbnRDb250ZXh0fV0pO1xuXG4gICAgICAgIHdvcmtlci5vbihcImVycm9yXCIsIGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgIHNlc3Npb24uc2V0QW5ub3RhdGlvbnMoZS5kYXRhKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgd29ya2VyLm9uKFwidGVybWluYXRlXCIsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgc2Vzc2lvbi5jbGVhckFubm90YXRpb25zKCk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB3b3JrZXI7XG4gICAgfTtcblxuICAgIHRoaXMuJGlkID0gXCJhY2UvbW9kZS9odG1sXCI7XG59KS5jYWxsKE1vZGUucHJvdG90eXBlKTtcblxuZXhwb3J0cy5Nb2RlID0gTW9kZTtcbn0pO1xuIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/html.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/javascript.js": -/*!**********************************************************************!*\ - !*** ../../../../brace@0.11.1/node_modules/brace/mode/javascript.js ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { - -eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.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, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\nvar identifierRe = \"[a-zA-Z\\\\$_\\u00a1-\\uffff][a-zA-Z\\\\d\\\\$_\\u00a1-\\uffff]*\";\n\nvar JavaScriptHighlightRules = function(options) {\n var keywordMapper = this.createKeywordMapper({\n \"variable.language\":\n \"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|\" + // Constructors\n \"Namespace|QName|XML|XMLList|\" + // E4X\n \"ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|\" +\n \"Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|\" +\n \"Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|\" + // Errors\n \"SyntaxError|TypeError|URIError|\" +\n \"decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|\" + // Non-constructor functions\n \"isNaN|parseFloat|parseInt|\" +\n \"JSON|Math|\" + // Other\n \"this|arguments|prototype|window|document\" , // Pseudo\n \"keyword\":\n \"const|yield|import|get|set|async|await|\" +\n \"break|case|catch|continue|default|delete|do|else|finally|for|function|\" +\n \"if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|\" +\n \"__parent__|__count__|escape|unescape|with|__proto__|\" +\n \"class|enum|extends|super|export|implements|private|public|interface|package|protected|static\",\n \"storage.type\":\n \"const|let|var|function\",\n \"constant.language\":\n \"null|Infinity|NaN|undefined\",\n \"support.function\":\n \"alert\",\n \"constant.language.boolean\": \"true|false\"\n }, \"identifier\");\n var kwBeforeRe = \"case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void\";\n\n var escapedRe = \"\\\\\\\\(?:x[0-9a-fA-F]{2}|\" + // hex\n \"u[0-9a-fA-F]{4}|\" + // unicode\n \"u{[0-9a-fA-F]{1,6}}|\" + // es6 unicode\n \"[0-2][0-7]{0,2}|\" + // oct\n \"3[0-7][0-7]?|\" + // oct\n \"[4-7][0-7]?|\" + //oct\n \".)\";\n\n this.$rules = {\n \"no_regex\" : [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"no_regex\"),\n {\n token : \"string\",\n regex : \"'(?=.)\",\n next : \"qstring\"\n }, {\n token : \"string\",\n regex : '\"(?=.)',\n next : \"qqstring\"\n }, {\n token : \"constant.numeric\", // hexadecimal, octal and binary\n regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\\b/\n }, {\n token : \"constant.numeric\", // decimal integers and floats\n regex : /(?:\\d\\d*(?:\\.\\d*)?|\\.\\d+)(?:[eE][+-]?\\d+\\b)?/\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"support.function\",\n \"punctuation.operator\", \"entity.name.function\", \"text\",\"keyword.operator\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(prototype)(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"keyword.operator\", \"text\", \"storage.type\",\n \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(\\\\s+)(\\\\w+)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"entity.name.function\", \"text\", \"punctuation.operator\",\n \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\s*)(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : [\n \"text\", \"text\", \"storage.type\", \"text\", \"paren.lparen\"\n ],\n regex : \"(:)(\\\\s*)(function)(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"keyword\",\n regex : \"from(?=\\\\s*('|\\\"))\"\n }, {\n token : \"keyword\",\n regex : \"(?:\" + kwBeforeRe + \")\\\\b\",\n next : \"start\"\n }, {\n token : [\"support.constant\"],\n regex : /that\\b/\n }, {\n token : [\"storage.type\", \"punctuation.operator\", \"support.function.firebug\"],\n regex : /(console)(\\.)(warn|info|log|error|time|trace|timeEnd|assert)\\b/\n }, {\n token : keywordMapper,\n regex : identifierRe\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/,\n next : \"property\"\n }, {\n token : \"storage.type\",\n regex : /=>/\n }, {\n token : \"keyword.operator\",\n regex : /--|\\+\\+|\\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\\|\\||\\?:|[!$%&*+\\-~\\/^]=?/,\n next : \"start\"\n }, {\n token : \"punctuation.operator\",\n regex : /[?:,;.]/,\n next : \"start\"\n }, {\n token : \"paren.lparen\",\n regex : /[\\[({]/,\n next : \"start\"\n }, {\n token : \"paren.rparen\",\n regex : /[\\])}]/\n }, {\n token: \"comment\",\n regex: /^#!.*$/\n }\n ],\n property: [{\n token : \"text\",\n regex : \"\\\\s+\"\n }, {\n token : [\n \"storage.type\", \"punctuation.operator\", \"entity.name.function\", \"text\",\n \"keyword.operator\", \"text\",\n \"storage.type\", \"text\", \"entity.name.function\", \"text\", \"paren.lparen\"\n ],\n regex : \"(\" + identifierRe + \")(\\\\.)(\" + identifierRe +\")(\\\\s*)(=)(\\\\s*)(function)(?:(\\\\s+)(\\\\w+))?(\\\\s*)(\\\\()\",\n next: \"function_arguments\"\n }, {\n token : \"punctuation.operator\",\n regex : /[.](?![.])/\n }, {\n token : \"support.function\",\n regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|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(?=\\()/\n }, {\n token : \"support.function.dom\",\n 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|ClassName)|ById)|Attribute(?:Node)?)|blur)\\b(?=\\()/\n }, {\n token : \"support.constant\",\n 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/\n }, {\n token : \"identifier\",\n regex : identifierRe\n }, {\n regex: \"\",\n token: \"empty\",\n next: \"no_regex\"\n }\n ],\n \"start\": [\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n comments(\"start\"),\n {\n token: \"string.regexp\",\n regex: \"\\\\/\",\n next: \"regex\"\n }, {\n token : \"text\",\n regex : \"\\\\s+|^$\",\n next : \"start\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"regex\": [\n {\n token: \"regexp.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"string.regexp\",\n regex: \"/[sxngimy]*\",\n next: \"no_regex\"\n }, {\n token : \"invalid\",\n regex: /\\{\\d+\\b,?\\d*\\}[+*]|[+*$^?][+*]|[$^][?]|\\?{3,}/\n }, {\n token : \"constant.language.escape\",\n regex: /\\(\\?[:=!]|\\)|\\{\\d+\\b,?\\d*\\}|[+*]\\?|[()$^+*?.]/\n }, {\n token : \"constant.language.delimiter\",\n regex: /\\|/\n }, {\n token: \"constant.language.escape\",\n regex: /\\[\\^?/,\n next: \"regex_character_class\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp\"\n }\n ],\n \"regex_character_class\": [\n {\n token: \"regexp.charclass.keyword.operator\",\n regex: \"\\\\\\\\(?:u[\\\\da-fA-F]{4}|x[\\\\da-fA-F]{2}|.)\"\n }, {\n token: \"constant.language.escape\",\n regex: \"]\",\n next: \"regex\"\n }, {\n token: \"constant.language.escape\",\n regex: \"-\"\n }, {\n token: \"empty\",\n regex: \"$\",\n next: \"no_regex\"\n }, {\n defaultToken: \"string.regexp.charachterclass\"\n }\n ],\n \"function_arguments\": [\n {\n token: \"variable.parameter\",\n regex: identifierRe\n }, {\n token: \"punctuation.operator\",\n regex: \"[, ]+\"\n }, {\n token: \"punctuation.operator\",\n regex: \"$\"\n }, {\n token: \"empty\",\n regex: \"\",\n next: \"no_regex\"\n }\n ],\n \"qqstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : '\"|$',\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ],\n \"qstring\" : [\n {\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"string\",\n regex : \"\\\\\\\\$\",\n consumeLineEnd : true\n }, {\n token : \"string\",\n regex : \"'|$\",\n next : \"no_regex\"\n }, {\n defaultToken: \"string\"\n }\n ]\n };\n\n\n if (!options || !options.noES6) {\n this.$rules.no_regex.unshift({\n regex: \"[{}]\", onMatch: function(val, state, stack) {\n this.next = val == \"{\" ? this.nextState : \"\";\n if (val == \"{\" && stack.length) {\n stack.unshift(\"start\", state);\n }\n else if (val == \"}\" && stack.length) {\n stack.shift();\n this.next = stack.shift();\n if (this.next.indexOf(\"string\") != -1 || this.next.indexOf(\"jsx\") != -1)\n return \"paren.quasi.end\";\n }\n return val == \"{\" ? \"paren.lparen\" : \"paren.rparen\";\n },\n nextState: \"start\"\n }, {\n token : \"string.quasi.start\",\n regex : /`/,\n push : [{\n token : \"constant.language.escape\",\n regex : escapedRe\n }, {\n token : \"paren.quasi.start\",\n regex : /\\${/,\n push : \"start\"\n }, {\n token : \"string.quasi.end\",\n regex : /`/,\n next : \"pop\"\n }, {\n defaultToken: \"string.quasi\"\n }]\n });\n\n if (!options || options.jsx != false)\n JSX.call(this);\n }\n\n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"no_regex\") ]);\n\n this.normalizeRules();\n};\n\noop.inherits(JavaScriptHighlightRules, TextHighlightRules);\n\nfunction JSX() {\n var tagRegex = identifierRe.replace(\"\\\\d\", \"\\\\d\\\\-\");\n var jsxTag = {\n onMatch : function(val, state, stack) {\n var offset = val.charAt(1) == \"/\" ? 2 : 1;\n if (offset == 1) {\n if (state != this.nextState)\n stack.unshift(this.next, this.nextState, 0);\n else\n stack.unshift(this.next);\n stack[2]++;\n } else if (offset == 2) {\n if (state == this.nextState) {\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.shift();\n stack.shift();\n }\n }\n }\n return [{\n type: \"meta.tag.punctuation.\" + (offset == 1 ? \"\" : \"end-\") + \"tag-open.xml\",\n value: val.slice(0, offset)\n }, {\n type: \"meta.tag.tag-name.xml\",\n value: val.substr(offset)\n }];\n },\n regex : \"\",\n onMatch : function(value, currentState, stack) {\n if (currentState == stack[0])\n stack.shift();\n if (value.length == 2) {\n if (stack[0] == this.nextState)\n stack[1]--;\n if (!stack[1] || stack[1] < 0) {\n stack.splice(0, 2);\n }\n }\n this.next = stack[0] || \"start\";\n return [{type: this.token, value: value}];\n },\n nextState: \"jsx\"\n },\n jsxJsRule,\n comments(\"jsxAttributes\"),\n {\n token : \"entity.other.attribute-name.xml\",\n regex : tagRegex\n }, {\n token : \"keyword.operator.attribute-equals.xml\",\n regex : \"=\"\n }, {\n token : \"text.tag-whitespace.xml\",\n regex : \"\\\\s+\"\n }, {\n token : \"string.attribute-value.xml\",\n regex : \"'\",\n stateName : \"jsx_attr_q\",\n push : [\n {token : \"string.attribute-value.xml\", regex: \"'\", next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n }, {\n token : \"string.attribute-value.xml\",\n regex : '\"',\n stateName : \"jsx_attr_qq\",\n push : [\n {token : \"string.attribute-value.xml\", regex: '\"', next: \"pop\"},\n {include : \"reference\"},\n {defaultToken : \"string.attribute-value.xml\"}\n ]\n },\n jsxTag\n ];\n this.$rules.reference = [{\n token : \"constant.language.escape.reference.xml\",\n regex : \"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\\\.-]+;)\"\n }];\n}\n\nfunction comments(next) {\n return [\n {\n token : \"comment\", // multi line comment\n regex : /\\/\\*/,\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"\\\\*\\\\/\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }, {\n token : \"comment\",\n regex : \"\\\\/\\\\/\",\n next: [\n DocCommentHighlightRules.getTagRule(),\n {token : \"comment\", regex : \"$|^\", next : next || \"pop\"},\n {defaultToken : \"comment\", caseInsensitive: true}\n ]\n }\n ];\n}\nexports.JavaScriptHighlightRules = JavaScriptHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/javascript\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/javascript_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/worker/worker_client\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JavaScriptHighlightRules = acequire(\"./javascript_highlight_rules\").JavaScriptHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar WorkerClient = acequire(\"../worker/worker_client\").WorkerClient;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nvar Mode = function() {\n this.HighlightRules = JavaScriptHighlightRules;\n \n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n};\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n this.$quotes = {'\"': '\"', \"'\": \"'\", \"`\": \"`\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n var endState = tokenizedLine.state;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\" || state == \"no_regex\") {\n var match = line.match(/^.*(?:\\bcase\\b.*:|[\\{\\(\\[])\\s*$/);\n if (match) {\n indent += tab;\n }\n } else if (state == \"doc-start\") {\n if (endState == \"start\" || endState == \"no_regex\") {\n return \"\";\n }\n var match = line.match(/^\\s*(\\/?)\\*/);\n if (match) {\n if (match[1]) {\n indent += \" \";\n }\n indent += \"* \";\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.createWorker = function(session) {\n var worker = new WorkerClient([\"ace\"], __webpack_require__(/*! ../worker/javascript */ \"../../../../brace@0.11.1/node_modules/brace/worker/javascript.js\"), \"JavaScriptWorker\");\n worker.attachToDocument(session.getDocument());\n\n worker.on(\"annotate\", function(results) {\n session.setAnnotations(results.data);\n });\n\n worker.on(\"terminate\", function() {\n session.clearAnnotations();\n });\n\n return worker;\n };\n\n this.$id = \"ace/mode/javascript\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYnJhY2VAMC4xMS4xL25vZGVfbW9kdWxlcy9icmFjZS9tb2RlL2phdmFzY3JpcHQuanMuanMiLCJt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YXl8Qm9vbGVhbnxEYXRlfEZ1bmN0aW9ufEl0ZXJhdG9yfE51bWJlcnxPYmplY3R8UmVnRXhwfFN0cmluZ3xQcm94eXxcIiAgKyAvLyBDb25zdHJ1Y3RvcnNcbiAgICAgICAgICAgIFwiTmFtZXNwYWNlfFFOYW1lfFhNTHxYTUxMaXN0fFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyAvLyBFNFhcbiAgICAgICAgICAgIFwiQXJyYXlCdWZmZXJ8RmxvYXQzMkFycmF5fEZsb2F0NjRBcnJheXxJbnQxNkFycmF5fEludDMyQXJyYXl8SW50OEFycmF5fFwiICAgK1xuICAgICAgICAgICAgXCJVaW50MTZBcnJheXxVaW50MzJBcnJheXxVaW50OEFycmF5fFVpbnQ4Q2xhbXBlZEFycmF5fFwiICAgICAgICAgICAgICAgICAgICArXG4gICAgICAgICAgICBcIkVycm9yfEV2YWxFcnJvcnxJbnRlcm5hbEVycm9yfFJhbmdlRXJyb3J8UmVmZXJlbmNlRXJyb3J8U3RvcEl0ZXJhdGlvbnxcIiAgICsgLy8gRXJyb3JzXG4gICAgICAgICAgICBcIlN5bnRheEVycm9yfFR5cGVFcnJvcnxVUklFcnJvcnxcIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiZGVjb2RlVVJJfGRlY29kZVVSSUNvbXBvbmVudHxlbmNvZGVVUkl8ZW5jb2RlVVJJQ29tcG9uZW50fGV2YWx8aXNGaW5pdGV8XCIgKyAvLyBOb24tY29uc3RydWN0b3IgZnVuY3Rpb25zXG4gICAgICAgICAgICBcImlzTmFOfHBhcnNlRmxvYXR8cGFyc2VJbnR8XCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtcbiAgICAgICAgICAgIFwiSlNPTnxNYXRofFwiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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SwgXCJpZGVudGlmaWVyXCIpO1xuICAgIHZhciBrd0JlZm9yZVJlID0gXCJjYXNlfGRvfGVsc2V8ZmluYWxseXxpbnxpbnN0YW5jZW9mfHJldHVybnx0aHJvd3x0cnl8dHlwZW9mfHlpZWxkfHZvaWRcIjtcblxuICAgIHZhciBlc2NhcGVkUmUgPSBcIlxcXFxcXFxcKD86eFswLTlhLWZBLUZdezJ9fFwiICsgLy8gaGV4XG4gICAgICAgIFwidVswLTlhLWZBLUZdezR9fFwiICsgLy8gdW5pY29kZVxuICAgICAgICBcInV7WzAtOWEtZkEtRl17MSw2fX18XCIgKyAvLyBlczYgdW5pY29kZVxuICAgICAgICBcIlswLTJdWzAtN117MCwyfXxcIiArIC8vIG9jdFxuICAgICAgICBcIjNbMC03XVswLTddP3xcIiArIC8vIG9jdFxuICAgICAgICBcIls0LTddWzAtN10/fFwiICsgLy9vY3RcbiAgICAgICAgXCIuKVwiO1xuXG4gICAgdGhpcy4kcnVsZXMgPSB7XG4gICAgICAgIFwibm9fcmVnZXhcIiA6IFtcbiAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRTdGFydFJ1bGUoXCJkb2Mtc3RhcnRcIiksXG4gICAgICAgICAgICBjb21tZW50cyhcIm5vX3JlZ2V4XCIpLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiJyg/PS4pXCIsXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcIig/PS4pJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwicXFzdHJpbmdcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGhleGFkZWNpbWFsLCBvY3RhbCBhbmQgYmluYXJ5XG4gICAgICAgICAgICAgICAgcmVnZXggOiAvMCg/Olt4WF1bMC05YS1mQS1GXSt8W29PXVswLTddK3xbYkJdWzAxXSspXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5udW1lcmljXCIsIC8vIGRlY2ltYWwgaW50ZWdlcnMgYW5kIGZsb2F0c1xuICAgICAgICAgICAgICAgIHJlZ2V4IDogLyg/OlxcZFxcZCooPzpcXC5cXGQqKT98XFwuXFxkKykoPzpbZUVdWystXT9cXGQrXFxiKT8vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJzdXBwb3J0LmZ1bmN0aW9uXCIsXG4gICAgICAgICAgICAgICAgICAgIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcImtleXdvcmQub3BlcmF0b3JcIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikocHJvdG90eXBlKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJmdW5jdGlvbl9hcmd1bWVudHNcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLCBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgICAgICBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArXCIpKFxcXFxzKikoPSkoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwic3RvcmFnZS50eXBlXCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJrZXl3b3JkLm9wZXJhdG9yXCIsIFwidGV4dFwiLFxuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInRleHRcIiwgXCJlbnRpdHkubmFtZS5mdW5jdGlvblwiLCBcInRleHRcIiwgXCJwYXJlbi5scGFyZW5cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihcIiArIGlkZW50aWZpZXJSZSArIFwiKShcXFxcLikoXCIgKyBpZGVudGlmaWVyUmUgK1wiKShcXFxccyopKD0pKFxcXFxzKikoZnVuY3Rpb24pKFxcXFxzKykoXFxcXHcrKShcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoZnVuY3Rpb24pKFxcXFxzKykoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicHVuY3R1YXRpb24ub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0XCIsIFwic3RvcmFnZS50eXBlXCIsIFwidGV4dFwiLCBcInBhcmVuLmxwYXJlblwiXG4gICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKFwiICsgaWRlbnRpZmllclJlICsgXCIpKFxcXFxzKikoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXG4gICAgICAgICAgICAgICAgICAgIFwidGV4dFwiLCBcInRleHRcIiwgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoOikoXFxcXHMqKShmdW5jdGlvbikoXFxcXHMqKShcXFxcKClcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiZnJvbSg/PVxcXFxzKignfFxcXCIpKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiKD86XCIgKyBrd0JlZm9yZVJlICsgXCIpXFxcXGJcIixcbiAgICAgICAgICAgICAgICBuZXh0IDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdXBwb3J0LmNvbnN0YW50XCJdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL3RoYXRcXGIvXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBbXCJzdG9yYWdlLnR5cGVcIiwgXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLCBcInN1cHBvcnQuZnVuY3Rpb24uZmlyZWJ1Z1wiXSxcbiAgICAgICAgICAgICAgICByZWdleCA6IC8oY29uc29sZSkoXFwuKSh3YXJufGluZm98bG9nfGVycm9yfHRpbWV8dHJhY2V8dGltZUVuZHxhc3NlcnQpXFxiL1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDoga2V5d29yZE1hcHBlcixcbiAgICAgICAgICAgICAgICByZWdleCA6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1suXSg/IVsuXSkvLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJwcm9wZXJ0eVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0b3JhZ2UudHlwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogLz0+L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvLS18XFwrXFwrfFxcLnszfXw9PT18PT18PXwhPXwhPT18PCs9P3w+Kz0/fCF8JiZ8XFx8XFx8fFxcPzp8WyEkJSYqK1xcLX5cXC9eXT0/LyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1s/Oiw7Ll0vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXFsoe10vLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJzdGFydFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLnJwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogL1tcXF0pfV0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXiMhLiokL1xuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBwcm9wZXJ0eTogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwidGV4dFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxccytcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogW1xuICAgICAgICAgICAgICAgICAgICBcInN0b3JhZ2UudHlwZVwiLCBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwia2V5d29yZC5vcGVyYXRvclwiLCBcInRleHRcIixcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIiwgXCJ0ZXh0XCIsIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIiwgXCJ0ZXh0XCIsIFwicGFyZW4ubHBhcmVuXCJcbiAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoXCIgKyBpZGVudGlmaWVyUmUgKyBcIikoXFxcXC4pKFwiICsgaWRlbnRpZmllclJlICtcIikoXFxcXHMqKSg9KShcXFxccyopKGZ1bmN0aW9uKSg/OihcXFxccyspKFxcXFx3KykpPyhcXFxccyopKFxcXFwoKVwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwiZnVuY3Rpb25fYXJndW1lbnRzXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICA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ICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwic3RhcnRcIjogW1xuICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFN0YXJ0UnVsZShcImRvYy1zdGFydFwiKSxcbiAgICAgICAgICAgIGNvbW1lbnRzKFwic3RhcnRcIiksXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFwvXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInRleHRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXHMrfF4kXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9XG4gICAgICAgIF0sXG4gICAgICAgIFwicmVnZXhcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5rZXl3b3JkLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiXFxcXFxcXFwoPzp1W1xcXFxkYS1mQS1GXXs0fXx4W1xcXFxkYS1mQS1GXXsyfXwuKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwic3RyaW5nLnJlZ2V4cFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIi9bc3huZ2lteV0qXCIsXG4gICAgICAgICAgICAgICAgbmV4dDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImludmFsaWRcIixcbiAgICAgICAgICAgICAgICByZWdleDogL1xce1xcZCtcXGIsP1xcZCpcXH1bKypdfFsrKiReP11bKypdfFskXl1bP118XFw/ezMsfS9cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IC9cXChcXD9bOj0hXXxcXCl8XFx7XFxkK1xcYiw/XFxkKlxcfXxbKypdXFw/fFsoKSReKyo/Ll0vXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lmxhbmd1YWdlLmRlbGltaXRlclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFx8L1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiAvXFxbXFxePy8sXG4gICAgICAgICAgICAgICAgbmV4dDogXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImVtcHR5XCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiLFxuICAgICAgICAgICAgICAgIG5leHQ6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmcucmVnZXhwXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJyZWdleF9jaGFyYWN0ZXJfY2xhc3NcIjogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInJlZ2V4cC5jaGFyY2xhc3Mua2V5d29yZC5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIlxcXFxcXFxcKD86dVtcXFxcZGEtZkEtRl17NH18eFtcXFxcZGEtZkEtRl17Mn18LilcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcImNvbnN0YW50Lmxhbmd1YWdlLmVzY2FwZVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIl1cIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcInJlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCItXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbjogXCJlbXB0eVwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4OiBcIiRcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBkZWZhdWx0VG9rZW46IFwic3RyaW5nLnJlZ2V4cC5jaGFyYWNodGVyY2xhc3NcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcImZ1bmN0aW9uX2FyZ3VtZW50c1wiOiBbXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwidmFyaWFibGUucGFyYW1ldGVyXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IGlkZW50aWZpZXJSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiWywgXStcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuOiBcInB1bmN0dWF0aW9uLm9wZXJhdG9yXCIsXG4gICAgICAgICAgICAgICAgcmVnZXg6IFwiJFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW46IFwiZW1wdHlcIixcbiAgICAgICAgICAgICAgICByZWdleDogXCJcIixcbiAgICAgICAgICAgICAgICBuZXh0OiBcIm5vX3JlZ2V4XCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgXSxcbiAgICAgICAgXCJxcXN0cmluZ1wiIDogW1xuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb25zdGFudC5sYW5ndWFnZS5lc2NhcGVcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IGVzY2FwZWRSZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiXFxcXFxcXFwkXCIsXG4gICAgICAgICAgICAgICAgY29uc3VtZUxpbmVFbmQgIDogdHJ1ZVxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIixcbiAgICAgICAgICAgICAgICByZWdleCA6ICdcInwkJyxcbiAgICAgICAgICAgICAgICBuZXh0ICA6IFwibm9fcmVnZXhcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIGRlZmF1bHRUb2tlbjogXCJzdHJpbmdcIlxuICAgICAgICAgICAgfVxuICAgICAgICBdLFxuICAgICAgICBcInFzdHJpbmdcIiA6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIlxcXFxcXFxcJFwiLFxuICAgICAgICAgICAgICAgIGNvbnN1bWVMaW5lRW5kICA6IHRydWVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIid8JFwiLFxuICAgICAgICAgICAgICAgIG5leHQgIDogXCJub19yZWdleFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZ1wiXG4gICAgICAgICAgICB9XG4gICAgICAgIF1cbiAgICB9O1xuXG5cbiAgICBpZiAoIW9wdGlvbnMgfHwgIW9wdGlvbnMubm9FUzYpIHtcbiAgICAgICAgdGhpcy4kcnVsZXMubm9fcmVnZXgudW5zaGlmdCh7XG4gICAgICAgICAgICByZWdleDogXCJbe31dXCIsIG9uTWF0Y2g6IGZ1bmN0aW9uKHZhbCwgc3RhdGUsIHN0YWNrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gdmFsID09IFwie1wiID8gdGhpcy5uZXh0U3RhdGUgOiBcIlwiO1xuICAgICAgICAgICAgICAgIGlmICh2YWwgPT0gXCJ7XCIgJiYgc3RhY2subGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQoXCJzdGFydFwiLCBzdGF0ZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHZhbCA9PSBcIn1cIiAmJiBzdGFjay5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubmV4dC5pbmRleE9mKFwic3RyaW5nXCIpICE9IC0xIHx8IHRoaXMubmV4dC5pbmRleE9mKFwianN4XCIpICE9IC0xKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwicGFyZW4ucXVhc2kuZW5kXCI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB2YWwgPT0gXCJ7XCIgPyBcInBhcmVuLmxwYXJlblwiIDogXCJwYXJlbi5ycGFyZW5cIjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBuZXh0U3RhdGU6IFwic3RhcnRcIlxuICAgICAgICB9LCB7XG4gICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nLnF1YXNpLnN0YXJ0XCIsXG4gICAgICAgICAgICByZWdleCA6IC9gLyxcbiAgICAgICAgICAgIHB1c2ggIDogW3tcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuZXNjYXBlXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiBlc2NhcGVkUmVcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwicGFyZW4ucXVhc2kuc3RhcnRcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IC9cXCR7LyxcbiAgICAgICAgICAgICAgICBwdXNoICA6IFwic3RhcnRcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmcucXVhc2kuZW5kXCIsXG4gICAgICAgICAgICAgICAgcmVnZXggOiAvYC8sXG4gICAgICAgICAgICAgICAgbmV4dCAgOiBcInBvcFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgZGVmYXVsdFRva2VuOiBcInN0cmluZy5xdWFzaVwiXG4gICAgICAgICAgICB9XVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoIW9wdGlvbnMgfHwgb3B0aW9ucy5qc3ggIT0gZmFsc2UpXG4gICAgICAgICAgICBKU1guY2FsbCh0aGlzKTtcbiAgICB9XG5cbiAgICB0aGlzLmVtYmVkUnVsZXMoRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLCBcImRvYy1cIixcbiAgICAgICAgWyBEb2NDb21tZW50SGlnaGxpZ2h0UnVsZXMuZ2V0RW5kUnVsZShcIm5vX3JlZ2V4XCIpIF0pO1xuXG4gICAgdGhpcy5ub3JtYWxpemVSdWxlcygpO1xufTtcblxub29wLmluaGVyaXRzKEphdmFTY3JpcHRIaWdobGlnaHRSdWxlcywgVGV4dEhpZ2hsaWdodFJ1bGVzKTtcblxuZnVuY3Rpb24gSlNYKCkge1xuICAgIHZhciB0YWdSZWdleCA9IGlkZW50aWZpZXJSZS5yZXBsYWNlKFwiXFxcXGRcIiwgXCJcXFxcZFxcXFwtXCIpO1xuICAgIHZhciBqc3hUYWcgPSB7XG4gICAgICAgIG9uTWF0Y2ggOiBmdW5jdGlvbih2YWwsIHN0YXRlLCBzdGFjaykge1xuICAgICAgICAgICAgdmFyIG9mZnNldCA9IHZhbC5jaGFyQXQoMSkgPT0gXCIvXCIgPyAyIDogMTtcbiAgICAgICAgICAgIGlmIChvZmZzZXQgPT0gMSkge1xuICAgICAgICAgICAgICAgIGlmIChzdGF0ZSAhPSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2sudW5zaGlmdCh0aGlzLm5leHQsIHRoaXMubmV4dFN0YXRlLCAwKTtcbiAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgIHN0YWNrLnVuc2hpZnQodGhpcy5uZXh0KTtcbiAgICAgICAgICAgICAgICBzdGFja1syXSsrO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChvZmZzZXQgPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGF0ZSA9PSB0aGlzLm5leHRTdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICBzdGFja1sxXS0tO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YWNrLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW3tcbiAgICAgICAgICAgICAgICB0eXBlOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLlwiICsgKG9mZnNldCA9PSAxID8gXCJcIiA6IFwiZW5kLVwiKSArIFwidGFnLW9wZW4ueG1sXCIsXG4gICAgICAgICAgICAgICAgdmFsdWU6IHZhbC5zbGljZSgwLCBvZmZzZXQpXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdHlwZTogXCJtZXRhLnRhZy50YWctbmFtZS54bWxcIixcbiAgICAgICAgICAgICAgICB2YWx1ZTogdmFsLnN1YnN0cihvZmZzZXQpXG4gICAgICAgICAgICB9XTtcbiAgICAgICAgfSxcbiAgICAgICAgcmVnZXggOiBcIjwvP1wiICsgdGFnUmVnZXggKyBcIlwiLFxuICAgICAgICBuZXh0OiBcImpzeEF0dHJpYnV0ZXNcIixcbiAgICAgICAgbmV4dFN0YXRlOiBcImpzeFwiXG4gICAgfTtcbiAgICB0aGlzLiRydWxlcy5zdGFydC51bnNoaWZ0KGpzeFRhZyk7XG4gICAgdmFyIGpzeEpzUnVsZSA9IHtcbiAgICAgICAgcmVnZXg6IFwie1wiLFxuICAgICAgICB0b2tlbjogXCJwYXJlbi5xdWFzaS5zdGFydFwiLFxuICAgICAgICBwdXNoOiBcInN0YXJ0XCJcbiAgICB9O1xuICAgIHRoaXMuJHJ1bGVzLmpzeCA9IFtcbiAgICAgICAganN4SnNSdWxlLFxuICAgICAgICBqc3hUYWcsXG4gICAgICAgIHtpbmNsdWRlIDogXCJyZWZlcmVuY2VcIn0sXG4gICAgICAgIHtkZWZhdWx0VG9rZW46IFwic3RyaW5nXCJ9XG4gICAgXTtcbiAgICB0aGlzLiRydWxlcy5qc3hBdHRyaWJ1dGVzID0gW3tcbiAgICAgICAgdG9rZW4gOiBcIm1ldGEudGFnLnB1bmN0dWF0aW9uLnRhZy1jbG9zZS54bWxcIixcbiAgICAgICAgcmVnZXggOiBcIi8/PlwiLFxuICAgICAgICBvbk1hdGNoIDogZnVuY3Rpb24odmFsdWUsIGN1cnJlbnRTdGF0ZSwgc3RhY2spIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50U3RhdGUgPT0gc3RhY2tbMF0pXG4gICAgICAgICAgICAgICAgc3RhY2suc2hpZnQoKTtcbiAgICAgICAgICAgIGlmICh2YWx1ZS5sZW5ndGggPT0gMikge1xuICAgICAgICAgICAgICAgIGlmIChzdGFja1swXSA9PSB0aGlzLm5leHRTdGF0ZSlcbiAgICAgICAgICAgICAgICAgICAgc3RhY2tbMV0tLTtcbiAgICAgICAgICAgICAgICBpZiAoIXN0YWNrWzFdIHx8IHN0YWNrWzFdIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICBzdGFjay5zcGxpY2UoMCwgMik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5uZXh0ID0gc3RhY2tbMF0gfHwgXCJzdGFydFwiO1xuICAgICAgICAgICAgcmV0dXJuIFt7dHlwZTogdGhpcy50b2tlbiwgdmFsdWU6IHZhbHVlfV07XG4gICAgICAgIH0sXG4gICAgICAgIG5leHRTdGF0ZTogXCJqc3hcIlxuICAgIH0sXG4gICAganN4SnNSdWxlLFxuICAgIGNvbW1lbnRzKFwianN4QXR0cmlidXRlc1wiKSxcbiAgICB7XG4gICAgICAgIHRva2VuIDogXCJlbnRpdHkub3RoZXIuYXR0cmlidXRlLW5hbWUueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogdGFnUmVnZXhcbiAgICB9LCB7XG4gICAgICAgIHRva2VuIDogXCJrZXl3b3JkLm9wZXJhdG9yLmF0dHJpYnV0ZS1lcXVhbHMueG1sXCIsXG4gICAgICAgIHJlZ2V4IDogXCI9XCJc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GFudC5sYW5ndWFnZS5lc2NhcGUucmVmZXJlbmNlLnhtbFwiLFxuICAgICAgICByZWdleCA6IFwiKD86JiNbMC05XSs7KXwoPzomI3hbMC05YS1mQS1GXSs7KXwoPzomW2EtekEtWjAtOV86XFxcXC4tXSs7KVwiXG4gICAgfV07XG59XG5cbmZ1bmN0aW9uIGNvbW1lbnRzKG5leHQpIHtcbiAgICByZXR1cm4gW1xuICAgICAgICB7XG4gICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLCAvLyBtdWx0aSBsaW5lIGNvbW1lbnRcbiAgICAgICAgICAgIHJlZ2V4IDogL1xcL1xcKi8sXG4gICAgICAgICAgICBuZXh0OiBbXG4gICAgICAgICAgICAgICAgRG9jQ29tbWVudEhpZ2hsaWdodFJ1bGVzLmdldFRhZ1J1bGUoKSxcbiAgICAgICAgICAgICAgICB7dG9rZW4gOiBcImNvbW1lbnRcIiwgcmVnZXggOiBcIlxcXFwqXFxcXC9cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsXG4gICAgICAgICAgICByZWdleCA6IFwiXFxcXC9cXFxcL1wiLFxuICAgICAgICAgICAgbmV4dDogW1xuICAgICAgICAgICAgICAgIERvY0NvbW1lbnRIaWdobGlnaHRSdWxlcy5nZXRUYWdSdWxlKCksXG4gICAgICAgICAgICAgICAge3Rva2VuIDogXCJjb21tZW50XCIsIHJlZ2V4IDogXCIkfF5cIiwgbmV4dCA6IG5leHQgfHwgXCJwb3BcIn0sXG4gICAgICAgICAgICAgICAge2RlZmF1bHRUb2tlbiA6IFwiY29tbWVudFwiLCBjYXNlSW5zZW5zaXRpdmU6IHRydWV9XG4gICAgICAgICAgICBdXG4gIC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gICAgICAgICAgICB2YXIgaSA9IG1hdGNoLmluZGV4O1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMub3BlbmluZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcbiAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgIHZhciByYW5nZSA9IHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGkgKyBtYXRjaFswXS5sZW5ndGgsIDEpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAocmFuZ2UgJiYgIXJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoZm9yY2VNdWx0aWxpbmUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmFuZ2UgPSB0aGlzLmdldFNlY3Rpb25SYW5nZShzZXNzaW9uLCByb3cpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZm9sZFN0eWxlICE9IFwiYWxsXCIpXG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgcmV0dXJuIHJhbmdlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZvbGRTdHlsZSA9PT0gXCJtYXJrYmVnaW5cIilcbiAgICAgICAgICAgIHJldHVybjtcblxuICAgICAgICB2YXIgbWF0Y2ggPSBsaW5lLm1hdGNoKHRoaXMuZm9sZGluZ1N0b3BNYXJrZXIpO1xuICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgIHZhciBpID0gbWF0Y2guaW5kZXggKyBtYXRjaFswXS5sZW5ndGg7XG5cbiAgICAgICAgICAgIGlmIChtYXRjaFsxXSlcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5jbG9zaW5nQnJhY2tldEJsb2NrKHNlc3Npb24sIG1hdGNoWzFdLCByb3csIGkpO1xuXG4gICAgICAgICAgICByZXR1cm4gc2Vzc2lvbi5nZXRDb21tZW50Rm9sZFJhbmdlKHJvdywgaSwgLTEpO1xuICAgICAgICB9XG4gICAgfTtcbiAgICBcbiAgICB0aGlzLmdldFNlY3Rpb25SYW5nZSA9IGZ1bmN0aW9uKHNlc3Npb24sIHJvdykge1xuICAgICAgICB2YXIgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICB2YXIgc3RhcnRJbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgIHZhciBzdGFydFJvdyA9IHJvdztcbiAgICAgICAgdmFyIHN0YXJ0Q29sdW1uID0gbGluZS5sZW5ndGg7XG4gICAgICAgIHJvdyA9IHJvdyArIDE7XG4gICAgICAgIHZhciBlbmRSb3cgPSByb3c7XG4gICAgICAgIHZhciBtYXhSb3cgPSBzZXNzaW9uLmdldExlbmd0aCgpO1xuICAgICAgICB3aGlsZSAoKytyb3cgPCBtYXhSb3cpIHtcbiAgICAgICAgICAgIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgICAgIHZhciBpbmRlbnQgPSBsaW5lLnNlYXJjaCgvXFxTLyk7XG4gICAgICAgICAgICBpZiAoaW5kZW50ID09PSAtMSlcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmICAoc3RhcnRJbmRlbnQgPiBpbmRlbnQpXG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB2YXIgc3ViUmFuZ2UgPSB0aGlzLmdldEZvbGRXaWRnZXRSYW5nZShzZXNzaW9uLCBcImFsbFwiLCByb3cpO1xuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAoc3ViUmFuZ2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3ViUmFuZ2Uuc3RhcnQucm93IDw9IHN0YXJ0Um93KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3ViUmFuZ2UuaXNNdWx0aUxpbmUoKSkge1xuICAgICAgICAgICAgICAgICAgICByb3cgPSBzdWJSYW5nZS5lbmQucm93O1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RhcnRJbmRlbnQgPT0gaW5kZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVuZFJvdyA9IHJvdztcbiAgICAgICAgfVxuICAgICAgICBcbiAgICAgICAgcmV0dXJuIG5ldyBSYW5nZShzdGFydFJvdywgc3RhcnRDb2x1bW4sIGVuZFJvdywgc2Vzc2lvbi5nZXRMaW5lKGVuZFJvdykubGVuZ3RoKTtcbiAgICB9O1xuICAgIHRoaXMuZ2V0Q29tbWVudFJlZ2lvbkJsb2NrID0gZnVuY3Rpb24oc2Vzc2lvbiwgbGluZSwgcm93KSB7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUuc2VhcmNoKC9cXHMqJC8pO1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgdmFyIHN0YXJ0Um93ID0gcm93O1xuICAgICAgICBcbiAgICAgICAgdmFyIHJlID0gL15cXHMqKD86XFwvXFwqfFxcL1xcL3wtLSkjPyhlbmQpP3JlZ2lvblxcYi87XG4gICAgICAgIHZhciBkZXB0aCA9IDE7XG4gICAgICAgIHdoaWxlICgrK3JvdyA8IG1heFJvdykge1xuICAgICAgICAgICAgbGluZSA9IHNlc3Npb24uZ2V0TGluZShyb3cpO1xuICAgICAgICAgICAgdmFyIG0gPSByZS5leGVjKGxpbmUpO1xuICAgICAgICAgICAgaWYgKCFtKSBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChtWzFdKSBkZXB0aC0tO1xuICAgICAgICAgICAgZWxzZSBkZXB0aCsrO1x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MuZ2V0VG9rZW5pemVyKCkuZ2V0TGluZVRva2VucyhsaW5lLCBzdGF0ZSk7XG4gICAgICAgIHZhciB0b2tlbnMgPSB0b2tlbml6ZWRMaW5lLnRva2VucztcbiAgICAgICAgdmFyIGVuZFN0YXRlID0gdG9rZW5pemVkTGluZS5zdGF0ZTtcblxuICAgICAgICBpZiAodG9rZW5zLmxlbmd0aCAmJiB0b2tlbnNbdG9rZW5zLmxlbmd0aC0xXS50eXBlID09IFwiY29tbWVudFwiKSB7XG4gICAgICAgICAgICByZXR1cm4gaW5kZW50O1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHN0YXRlID09IFwic3RhcnRcIiB8fCBzdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL14uKig/OlxcYmNhc2VcXGIuKjp8W1xce1xcKFxcW10pXFxzKiQvKTtcbiAgICAgICAgICAgIGlmIChtYXRjaCkge1xuICAgICAgICAgICAgICAgIGluZGVudCArPSB0YWI7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoc3RhdGUgPT0gXCJkb2Mtc3RhcnRcIikge1xuICAgICAgICAgICAgaWYgKGVuZFN0YXRlID09IFwic3RhcnRcIiB8fCBlbmRTdGF0ZSA9PSBcIm5vX3JlZ2V4XCIpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJcIjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBtYXRjaCA9IGxpbmUubWF0Y2goL15cXHMqKFxcLz8pXFwqLyk7XG4gICAgICAgICAgICBpZiAobWF0Y2gpIHtcbiAgICAgICAgICAgICAgICBpZiAobWF0Y2hbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgaW5kZW50ICs9IFwiIFwiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpbmRlbnQgKz0gXCIqIFwiO1xuICAgICAgICAgICAgfVxuICAgICAg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gPSBNb2RlO1xufSk7XG4iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/javascript.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/mode/jsx.js": -/*!***************************************************************!*\ - !*** ../../../../brace@0.11.1/node_modules/brace/mode/jsx.js ***! - \***************************************************************/ -/***/ (() => { - -eval("ace.define(\"ace/mode/doc_comment_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar DocCommentHighlightRules = function() {\n this.$rules = {\n \"start\" : [ {\n token : \"comment.doc.tag\",\n regex : \"@[\\\\w\\\\d_]+\" // TODO: fix email addresses\n }, \n DocCommentHighlightRules.getTagRule(),\n {\n defaultToken : \"comment.doc\",\n caseInsensitive: true\n }]\n };\n};\n\noop.inherits(DocCommentHighlightRules, TextHighlightRules);\n\nDocCommentHighlightRules.getTagRule = function(start) {\n return {\n token : \"comment.doc.tag.storage.type\",\n regex : \"\\\\b(?:TODO|FIXME|XXX|HACK)\\\\b\"\n };\n};\n\nDocCommentHighlightRules.getStartRule = function(start) {\n return {\n token : \"comment.doc\", // doc comment\n regex : \"\\\\/\\\\*(?=\\\\*)\",\n next : start\n };\n};\n\nDocCommentHighlightRules.getEndRule = function (start) {\n return {\n token : \"comment.doc\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : start\n };\n};\n\n\nexports.DocCommentHighlightRules = DocCommentHighlightRules;\n\n});\n\nace.define(\"ace/mode/jsx_highlight_rules\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/lib/lang\",\"ace/mode/doc_comment_highlight_rules\",\"ace/mode/text_highlight_rules\"], function(acequire, exports, module) {\nvar oop = acequire(\"../lib/oop\");\nvar lang = acequire(\"../lib/lang\");\nvar DocCommentHighlightRules = acequire(\"./doc_comment_highlight_rules\").DocCommentHighlightRules;\nvar TextHighlightRules = acequire(\"./text_highlight_rules\").TextHighlightRules;\n\nvar JsxHighlightRules = function() {\n var keywords = lang.arrayToMap(\n (\"break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|\" +\n \"if|throw|\" +\n \"delete|in|try|\" +\n \"class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|\" +\n \"number|int|string|boolean|variant|\" +\n \"log|assert\").split(\"|\")\n );\n \n var buildinConstants = lang.arrayToMap(\n (\"null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined\").split(\"|\")\n );\n \n var reserved = lang.arrayToMap(\n (\"debugger|with|\" +\n \"const|export|\" +\n \"let|private|public|yield|protected|\" +\n \"extern|native|as|operator|__fake__|__readonly__\").split(\"|\")\n );\n \n var identifierRe = \"[a-zA-Z_][a-zA-Z0-9_]*\\\\b\";\n \n this.$rules = {\n \"start\" : [\n {\n token : \"comment\",\n regex : \"\\\\/\\\\/.*$\"\n },\n DocCommentHighlightRules.getStartRule(\"doc-start\"),\n {\n token : \"comment\", // multi line comment\n regex : \"\\\\/\\\\*\",\n next : \"comment\"\n }, {\n token : \"string.regexp\",\n regex : \"[/](?:(?:\\\\[(?:\\\\\\\\]|[^\\\\]])+\\\\])|(?:\\\\\\\\/|[^\\\\]/]))*[/]\\\\w*\\\\s*(?=[).,;]|$)\"\n }, {\n token : \"string\", // single line\n regex : '[\"](?:(?:\\\\\\\\.)|(?:[^\"\\\\\\\\]))*?[\"]'\n }, {\n token : \"string\", // single line\n regex : \"['](?:(?:\\\\\\\\.)|(?:[^'\\\\\\\\]))*?[']\"\n }, {\n token : \"constant.numeric\", // hex\n regex : \"0[xX][0-9a-fA-F]+\\\\b\"\n }, {\n token : \"constant.numeric\", // float\n regex : \"[+-]?\\\\d+(?:(?:\\\\.\\\\d*)?(?:[eE][+-]?\\\\d+)?)?\\\\b\"\n }, {\n token : \"constant.language.boolean\",\n regex : \"(?:true|false)\\\\b\"\n }, {\n token : [\n \"storage.type\",\n \"text\",\n \"entity.name.function\"\n ],\n regex : \"(function)(\\\\s+)(\" + identifierRe + \")\"\n }, {\n token : function(value) {\n if (value == \"this\")\n return \"variable.language\";\n else if (value == \"function\")\n return \"storage.type\";\n else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value))\n return \"keyword\";\n else if (buildinConstants.hasOwnProperty(value))\n return \"constant.language\";\n else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value))\n return \"language.support.class\";\n else\n return \"identifier\";\n },\n regex : identifierRe\n }, {\n token : \"keyword.operator\",\n regex : \"!|%|&|\\\\*|\\\\-\\\\-|\\\\-|\\\\+\\\\+|\\\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\\\|\\\\||\\\\?\\\\:|\\\\*=|%=|\\\\+=|\\\\-=|&=|\\\\^=|\\\\b(?:in|instanceof|new|delete|typeof|void)\"\n }, {\n token : \"punctuation.operator\",\n regex : \"\\\\?|\\\\:|\\\\,|\\\\;|\\\\.\"\n }, {\n token : \"paren.lparen\",\n regex : \"[[({<]\"\n }, {\n token : \"paren.rparen\",\n regex : \"[\\\\])}>]\"\n }, {\n token : \"text\",\n regex : \"\\\\s+\"\n }\n ],\n \"comment\" : [\n {\n token : \"comment\", // closing comment\n regex : \"\\\\*\\\\/\",\n next : \"start\"\n }, {\n defaultToken : \"comment\"\n }\n ]\n };\n \n this.embedRules(DocCommentHighlightRules, \"doc-\",\n [ DocCommentHighlightRules.getEndRule(\"start\") ]);\n};\n\noop.inherits(JsxHighlightRules, TextHighlightRules);\n\nexports.JsxHighlightRules = JsxHighlightRules;\n});\n\nace.define(\"ace/mode/matching_brace_outdent\",[\"require\",\"exports\",\"module\",\"ace/range\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar Range = acequire(\"../range\").Range;\n\nvar MatchingBraceOutdent = function() {};\n\n(function() {\n\n this.checkOutdent = function(line, input) {\n if (! /^\\s+$/.test(line))\n return false;\n\n return /^\\s*\\}/.test(input);\n };\n\n this.autoOutdent = function(doc, row) {\n var line = doc.getLine(row);\n var match = line.match(/^(\\s*\\})/);\n\n if (!match) return 0;\n\n var column = match[1].length;\n var openBracePos = doc.findMatchingBracket({row: row, column: column});\n\n if (!openBracePos || openBracePos.row == row) return 0;\n\n var indent = this.$getIndent(doc.getLine(openBracePos.row));\n doc.replace(new Range(row, 0, row, column-1), indent);\n };\n\n this.$getIndent = function(line) {\n return line.match(/^\\s*/)[0];\n };\n\n}).call(MatchingBraceOutdent.prototype);\n\nexports.MatchingBraceOutdent = MatchingBraceOutdent;\n});\n\nace.define(\"ace/mode/folding/cstyle\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/range\",\"ace/mode/folding/fold_mode\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../../lib/oop\");\nvar Range = acequire(\"../../range\").Range;\nvar BaseFoldMode = acequire(\"./fold_mode\").FoldMode;\n\nvar FoldMode = exports.FoldMode = function(commentRegex) {\n if (commentRegex) {\n this.foldingStartMarker = new RegExp(\n this.foldingStartMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.start)\n );\n this.foldingStopMarker = new RegExp(\n this.foldingStopMarker.source.replace(/\\|[^|]*?$/, \"|\" + commentRegex.end)\n );\n }\n};\noop.inherits(FoldMode, BaseFoldMode);\n\n(function() {\n \n this.foldingStartMarker = /([\\{\\[\\(])[^\\}\\]\\)]*$|^\\s*(\\/\\*)/;\n this.foldingStopMarker = /^[^\\[\\{\\(]*([\\}\\]\\)])|^[\\s\\*]*(\\*\\/)/;\n this.singleLineBlockCommentRe= /^\\s*(\\/\\*).*\\*\\/\\s*$/;\n this.tripleStarBlockCommentRe = /^\\s*(\\/\\*\\*\\*).*\\*\\/\\s*$/;\n this.startRegionRe = /^\\s*(\\/\\*|\\/\\/)#?region\\b/;\n this._getFoldWidgetBase = this.getFoldWidget;\n this.getFoldWidget = function(session, foldStyle, row) {\n var line = session.getLine(row);\n \n if (this.singleLineBlockCommentRe.test(line)) {\n if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))\n return \"\";\n }\n \n var fw = this._getFoldWidgetBase(session, foldStyle, row);\n \n if (!fw && this.startRegionRe.test(line))\n return \"start\"; // lineCommentRegionStart\n \n return fw;\n };\n\n this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {\n var line = session.getLine(row);\n \n if (this.startRegionRe.test(line))\n return this.getCommentRegionBlock(session, line, row);\n \n var match = line.match(this.foldingStartMarker);\n if (match) {\n var i = match.index;\n\n if (match[1])\n return this.openingBracketBlock(session, match[1], row, i);\n \n var range = session.getCommentFoldRange(row, i + match[0].length, 1);\n \n if (range && !range.isMultiLine()) {\n if (forceMultiline) {\n range = this.getSectionRange(session, row);\n } else if (foldStyle != \"all\")\n range = null;\n }\n \n return range;\n }\n\n if (foldStyle === \"markbegin\")\n return;\n\n var match = line.match(this.foldingStopMarker);\n if (match) {\n var i = match.index + match[0].length;\n\n if (match[1])\n return this.closingBracketBlock(session, match[1], row, i);\n\n return session.getCommentFoldRange(row, i, -1);\n }\n };\n \n this.getSectionRange = function(session, row) {\n var line = session.getLine(row);\n var startIndent = line.search(/\\S/);\n var startRow = row;\n var startColumn = line.length;\n row = row + 1;\n var endRow = row;\n var maxRow = session.getLength();\n while (++row < maxRow) {\n line = session.getLine(row);\n var indent = line.search(/\\S/);\n if (indent === -1)\n continue;\n if (startIndent > indent)\n break;\n var subRange = this.getFoldWidgetRange(session, \"all\", row);\n \n if (subRange) {\n if (subRange.start.row <= startRow) {\n break;\n } else if (subRange.isMultiLine()) {\n row = subRange.end.row;\n } else if (startIndent == indent) {\n break;\n }\n }\n endRow = row;\n }\n \n return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);\n };\n this.getCommentRegionBlock = function(session, line, row) {\n var startColumn = line.search(/\\s*$/);\n var maxRow = session.getLength();\n var startRow = row;\n \n var re = /^\\s*(?:\\/\\*|\\/\\/|--)#?(end)?region\\b/;\n var depth = 1;\n while (++row < maxRow) {\n line = session.getLine(row);\n var m = re.exec(line);\n if (!m) continue;\n if (m[1]) depth--;\n else depth++;\n\n if (!depth) break;\n }\n\n var endRow = row;\n if (endRow > startRow) {\n return new Range(startRow, startColumn, endRow, line.length);\n }\n };\n\n}).call(FoldMode.prototype);\n\n});\n\nace.define(\"ace/mode/jsx\",[\"require\",\"exports\",\"module\",\"ace/lib/oop\",\"ace/mode/text\",\"ace/mode/jsx_highlight_rules\",\"ace/mode/matching_brace_outdent\",\"ace/mode/behaviour/cstyle\",\"ace/mode/folding/cstyle\"], function(acequire, exports, module) {\n\"use strict\";\n\nvar oop = acequire(\"../lib/oop\");\nvar TextMode = acequire(\"./text\").Mode;\nvar JsxHighlightRules = acequire(\"./jsx_highlight_rules\").JsxHighlightRules;\nvar MatchingBraceOutdent = acequire(\"./matching_brace_outdent\").MatchingBraceOutdent;\nvar CstyleBehaviour = acequire(\"./behaviour/cstyle\").CstyleBehaviour;\nvar CStyleFoldMode = acequire(\"./folding/cstyle\").FoldMode;\n\nfunction Mode() {\n this.HighlightRules = JsxHighlightRules;\n this.$outdent = new MatchingBraceOutdent();\n this.$behaviour = new CstyleBehaviour();\n this.foldingRules = new CStyleFoldMode();\n}\noop.inherits(Mode, TextMode);\n\n(function() {\n\n this.lineCommentStart = \"//\";\n this.blockComment = {start: \"/*\", end: \"*/\"};\n\n this.getNextLineIndent = function(state, line, tab) {\n var indent = this.$getIndent(line);\n\n var tokenizedLine = this.getTokenizer().getLineTokens(line, state);\n var tokens = tokenizedLine.tokens;\n\n if (tokens.length && tokens[tokens.length-1].type == \"comment\") {\n return indent;\n }\n\n if (state == \"start\") {\n var match = line.match(/^.*[\\{\\(\\[]\\s*$/);\n if (match) {\n indent += tab;\n }\n }\n\n return indent;\n };\n\n this.checkOutdent = function(state, line, input) {\n return this.$outdent.checkOutdent(line, input);\n };\n\n this.autoOutdent = function(state, doc, row) {\n this.$outdent.autoOutdent(doc, row);\n };\n\n this.$id = \"ace/mode/jsx\";\n}).call(Mode.prototype);\n\nexports.Mode = Mode;\n});\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vYnJhY2VAMC4xMS4xL25vZGVfbW9kdWxlcy9icmFjZS9tb2RlL2pzeC5qcy5qcyIsIm1hcHBpbmdzIjoiQUFBQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVDtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7O0FBR0E7O0FBRUEsQ0FBQzs7QUFFRDtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQSxpR0FBaUc7QUFDakcsYUFBYTtBQUNiO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QUFDQTtBQUNBLGFBQWE7QUFDYjtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQSxhQUFhO0FBQ2I7QU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K1xuICAgICAgICAgXCJudW1iZXJ8aW50fHN0cmluZ3xib29sZWFufHZhcmlhbnR8XCIgK1xuICAgICAgICAgXCJsb2d8YXNzZXJ0XCIpLnNwbGl0KFwifFwiKVxuICAgICk7XG4gICAgXG4gICAgdmFyIGJ1aWxkaW5Db25zdGFudHMgPSBsYW5nLmFycmF5VG9NYXAoXG4gICAgICAgIChcIm51bGx8dHJ1ZXxmYWxzZXxOYU58SW5maW5pdHl8X19GSUxFX198X19MSU5FX198dW5kZWZpbmVkXCIpLnNwbGl0KFwifFwiKVxuICAgICk7XG4gICAgXG4gICAgdmFyIHJlc2VydmVkID0gbGFuZy5hcnJheVRvTWFwKFxuICAgICAgICAoXCJkZWJ1Z2dlcnx3aXRofFwiICtcbiAgICAgICAgIFwiY29uc3R8ZXhwb3J0fFwiICtcbiAgICAgICAgIFwibGV0fHByaXZhdGV8cHVibGljfHlpZWxkfHByb3RlY3RlZHxcIiArXG4gICAgICAgICBcImV4dGVybnxuYXRpdmV8YXN8b3BlcmF0b3J8X19mYWtlX198X19yZWFkb25seV9fXCIpLnNwbGl0KFwifFwiKVxuICAgICk7XG4gICAgXG4gICAgdmFyIGlkZW50aWZpZXJSZSA9IFwiW2EtekEtWl9dW2EtekEtWjAtOV9dKlxcXFxiXCI7XG4gICAgXG4gICAgdGhpcy4kcnVsZXMgPSB7XG4gICAgICAgIFwic3RhcnRcIiA6IFtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29tbWVudFwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcL1xcXFwvLiokXCJcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBEb2NDb21tZW50SGlnaGxpZ2h0UnVsZXMuZ2V0U3RhcnRSdWxlKFwiZG9jLXN0YXJ0XCIpLFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJjb21tZW50XCIsIC8vIG11bHRpIGxpbmUgY29tbWVudFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcL1xcXFwqXCIsXG4gICAgICAgICAgICAgICAgbmV4dCA6IFwiY29tbWVudFwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInN0cmluZy5yZWdleHBcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiWy9dKD86KD86XFxcXFsoPzpcXFxcXFxcXF18W15cXFxcXV0pK1xcXFxdKXwoPzpcXFxcXFxcXC98W15cXFxcXS9dKSkqWy9dXFxcXHcqXFxcXHMqKD89WykuLDtdfCQpXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwic3RyaW5nXCIsIC8vIHNpbmdsZSBsaW5lXG4gICAgICAgICAgICAgICAgcmVnZXggOiAnW1wiXSg/Oig/OlxcXFxcXFxcLil8KD86W15cIlxcXFxcXFxcXSkpKj9bXCJdJ1xuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJzdHJpbmdcIiwgLy8gc2luZ2xlIGxpbmVcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiWyddKD86KD86XFxcXFxcXFwuKXwoPzpbXidcXFxcXFxcXF0pKSo/WyddXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubnVtZXJpY1wiLCAvLyBoZXhcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiMFt4WF1bMC05YS1mQS1GXStcXFxcYlwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImNvbnN0YW50Lm51bWVyaWNcIiwgLy8gZmxvYXRcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiWystXT9cXFxcZCsoPzooPzpcXFxcLlxcXFxkKik/KD86W2VFXVsrLV0/XFxcXGQrKT8pP1xcXFxiXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFwiY29uc3RhbnQubGFuZ3VhZ2UuYm9vbGVhblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCIoPzp0cnVlfGZhbHNlKVxcXFxiXCJcbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICB0b2tlbiA6IFtcbiAgICAgICAgICAgICAgICAgICAgXCJzdG9yYWdlLnR5cGVcIixcbiAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0XCIsXG4gICAgICAgICAgICAgICAgICAgIFwiZW50aXR5Lm5hbWUuZnVuY3Rpb25cIlxuICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgcmVnZXggOiBcIihmdW5jdGlvbikoXFxcXHMrKShcIiArIGlkZW50aWZpZXJSZSArIFwiKVwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBmdW5jdGlvbih2YWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT0gXCJ0aGlzXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ2YXJpYWJsZS5sYW5ndWFnZVwiO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh2YWx1ZSA9PSBcImZ1bmN0aW9uXCIpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJzdG9yYWdlLnR5cGVcIjtcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoa2V5d29yZHMuaGFzT3duUHJvcGVydHkodmFsdWUpIHx8IHJlc2VydmVkLmhhc093blByb3BlcnR5KHZhbHVlKSlcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImtleXdvcmRcIjtcbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoYnVpbGRpbkNvbnN0YW50cy5oYXNPd25Qcm9wZXJ0eSh2YWx1ZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJjb25zdGFudC5sYW5ndWFnZVwiO1xuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICgvXl8/W0EtWl1bYS16QS1aMC05X10qJC8udGVzdCh2YWx1ZSkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJsYW5ndWFnZS5zdXBwb3J0LmNsYXNzXCI7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcImlkZW50aWZpZXJcIjtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogaWRlbnRpZmllclJlXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcImtleXdvcmQub3BlcmF0b3JcIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiIXwlfCZ8XFxcXCp8XFxcXC1cXFxcLXxcXFxcLXxcXFxcK1xcXFwrfFxcXFwrfH58PT18PXwhPXw8PXw+PXw8PD18Pj49fD4+Pj18PD58PHw+fCF8JiZ8XFxcXHxcXFxcfHxcXFxcP1xcXFw6fFxcXFwqPXwlPXxcXFxcKz18XFxcXC09fCY9fFxcXFxePXxcXFxcYig/OmlufGluc3RhbmNlb2Z8bmV3fGRlbGV0ZXx0eXBlb2Z8dm9pZClcIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwdW5jdHVhdGlvbi5vcGVyYXRvclwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJcXFxcP3xcXFxcOnxcXFxcLHxcXFxcO3xcXFxcLlwiXG4gICAgICAgICAgICB9LCB7XG4gICAgICAgICAgICAgICAgdG9rZW4gOiBcInBhcmVuLmxwYXJlblwiLFxuICAgICAgICAgICAgICAgIHJlZ2V4IDogXCJbWyh7PF1cIlxuICAgICAgICAgICAgfSwge1xuICAgICAgICAgICAgICAgIHRva2VuIDogXCJwYXJlbi5ycGFyZW5cIixcbiAgICAgICAgICAgICAgICByZWdleCA6IFwiW1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ICAgICAgICAgaWYgKGZvcmNlTXVsdGlsaW5lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJhbmdlID0gdGhpcy5nZXRTZWN0aW9uUmFuZ2Uoc2Vzc2lvbiwgcm93KTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZvbGRTdHlsZSAhPSBcImFsbFwiKVxuICAgICAgICAgICAgICAgICAgICByYW5nZSA9IG51bGw7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBcbiAgICAgICAgICAgIHJldHVybiByYW5nZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmb2xkU3R5bGUgPT09IFwibWFya2JlZ2luXCIpXG4gICAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgdmFyIG1hdGNoID0gbGluZS5tYXRjaCh0aGlzLmZvbGRpbmdTdG9wTWFya2VyKTtcbiAgICAgICAgaWYgKG1hdGNoKSB7XG4gICAgICAgICAgICB2YXIgaSA9IG1hdGNoLmluZGV4ICsgbWF0Y2hbMF0ubGVuZ3RoO1xuXG4gICAgICAgICAgICBpZiAobWF0Y2hbMV0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2xvc2luZ0JyYWNrZXRCbG9jayhzZXNzaW9uLCBtYXRjaFsxXSwgcm93LCBpKTtcblxuICAgICAgICAgICAgcmV0dXJuIHNlc3Npb24uZ2V0Q29tbWVudEZvbGRSYW5nZShyb3csIGksIC0xKTtcbiAgICAgICAgfVxuICAgIH07XG4gICAgXG4gICAgdGhpcy5nZXRTZWN0aW9uUmFuZ2UgPSBmdW5jdGlvbihzZXNzaW9uLCByb3cpIHtcbiAgICAgICAgdmFyIGxpbmUgPSBzZXNzaW9uLmdldExpbmUocm93KTtcbiAgICAgICAgdmFyIHN0YXJ0SW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICB2YXIgc3RhcnRSb3cgPSByb3c7XG4gICAgICAgIHZhciBzdGFydENvbHVtbiA9IGxpbmUubGVuZ3RoO1xuICAgICAgICByb3cgPSByb3cgKyAxO1xuICAgICAgICB2YXIgZW5kUm93ID0gcm93O1xuICAgICAgICB2YXIgbWF4Um93ID0gc2Vzc2lvbi5nZXRMZW5ndGgoKTtcbiAgICAgICAgd2hpbGUgKCsrcm93IDwgbWF4Um93KSB7XG4gICAgICAgICAgICBsaW5lID0gc2Vzc2lvbi5nZXRMaW5lKHJvdyk7XG4gICAgICAgICAgICB2YXIgaW5kZW50ID0gbGluZS5zZWFyY2goL1xcUy8pO1xuICAgICAgICAgICAgaWYgKGluZGVudCA9PT0gLTEpXG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICBpZiAgKHN0YXJ0SW5kZW50ID4gaW5kZW50KVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgdmFyIHN1YlJhbmdlID0gdGhpcy5nZXRGb2xkV2lkZ2V0UmFuZ2Uoc2Vzc2lvbiwgXCJhbGxcIiwgcm93KTtcbiAgICAgICAgICAgIFxuICAgICAgICAgICAgaWYgKHN1YlJhbmdlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHN1YlJhbmdlLnN0YXJ0LnJvdyA8PSBzdGFydFJvdykge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHN1YlJhbmdlLmlzTXVsdGlMaW5lKCkpIHtcbiAgICAgICAgICAgICAgICAgICAgcm93ID0gc3ViUmFuZ2UuZW5kLnJvdztcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHN0YXJ0SW5kZW50ID09IGluZGVudCkge1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbmRSb3cgPSByb3c7XG4gICAgICAgIH1cbiAgICAgICAgXG4gICAgICAgIHJldHVybiBuZXcgUmFuZ2Uoc3RhcnRSb3csIHN0YXJ0Q29sdW1uLCBlbmRSb3csIHNl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xpbmUsIGlucHV0KTtcbiAgICB9O1xuXG4gICAgdGhpcy5hdXRvT3V0ZGVudCA9IGZ1bmN0aW9uKHN0YXRlLCBkb2MsIHJvdykge1xuICAgICAgICB0aGlzLiRvdXRkZW50LmF1dG9PdXRkZW50KGRvYywgcm93KTtcbiAgICB9O1xuXG4gICAgdGhpcy4kaWQgPSBcImFjZS9tb2RlL2pzeFwiO1xufSkuY2FsbChNb2RlLnByb3RvdHlwZSk7XG5cbmV4cG9ydHMuTW9kZSA9IE1vZGU7XG59KTtcbiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../../../../brace@0.11.1/node_modules/brace/mode/jsx.js\n"); - -/***/ }), - -/***/ "../../../../brace@0.11.1/node_modules/brace/worker/css.js": -/*!*****************************************************************!*\ - !*** ../../../../brace@0.11.1/node_modules/brace/worker/css.js ***! - \*****************************************************************/ -/***/ ((module) => { - -eval("module.exports.id = 'ace/mode/css_worker';\nmodule.exports.src = \"\\\"no use strict\\\";!function(window){function resolveModuleId(id,paths){for(var testPath=id,tail=\\\"\\\";testPath;){var alias=paths[testPath];if(\\\"string\\\"==typeof alias)return alias+tail;if(alias)return alias.location.replace(/\\\\/*$/,\\\"/\\\")+(tail||alias.main||alias.name);if(alias===!1)return\\\"\\\";var i=testPath.lastIndexOf(\\\"/\\\");if(-1===i)break;tail=testPath.substr(i)+tail,testPath=testPath.slice(0,i)}return id}if(!(void 0!==window.window&&window.document||window.acequire&&window.define)){window.console||(window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:\\\"log\\\",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console),window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:\\\"error\\\",data:{message:message,data:err.data,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf(\\\"!\\\")){var chunks=moduleName.split(\\\"!\\\");return window.normalizeModule(parentId,chunks[0])+\\\"!\\\"+window.normalizeModule(parentId,chunks[1])}if(\\\".\\\"==moduleName.charAt(0)){var base=parentId.split(\\\"/\\\").slice(0,-1).join(\\\"/\\\");for(moduleName=(base?base+\\\"/\\\":\\\"\\\")+moduleName;-1!==moduleName.indexOf(\\\".\\\")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\\\.\\\\//,\\\"\\\").replace(/\\\\/\\\\.\\\\//,\\\"/\\\").replace(/[^\\\\/]+\\\\/\\\\.\\\\.\\\\//,\\\"\\\")}}return moduleName},window.acequire=function acequire(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error(\\\"worker.js acequire() accepts only (parentId, id) as arguments\\\");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;if(!window.acequire.tlns)return console.log(\\\"unable to load \\\"+id);var path=resolveModuleId(id,window.acequire.tlns);return\\\".js\\\"!=path.slice(-3)&&(path+=\\\".js\\\"),window.acequire.id=id,window.acequire.modules[id]={},importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,\\\"string\\\"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),\\\"function\\\"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=[\\\"require\\\",\\\"exports\\\",\\\"module\\\"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case\\\"require\\\":return req;case\\\"exports\\\":return module.exports;case\\\"module\\\":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},acequire.tlns={},window.initBaseUrls=function(topLevelNamespaces){for(var i in topLevelNamespaces)acequire.tlns[i]=topLevelNamespaces[i]},window.initSender=function(){var EventEmitter=window.acequire(\\\"ace/lib/event_emitter\\\").EventEmitter,oop=window.acequire(\\\"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};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.event&&sender)sender._signal(msg.event,msg.data);else if(msg.command)if(main[msg.command])main[msg.command].apply(main,msg.args);else{if(!window[msg.command])throw Error(\\\"Unknown command:\\\"+msg.command);window[msg.command].apply(window,msg.args)}else if(msg.init){window.initBaseUrls(msg.tlns),acequire(\\\"ace/lib/es5-shim\\\"),sender=window.sender=window.initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}}}}(this),ace.define(\\\"ace/lib/oop\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},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/lang\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.last=function(a){return a[a.length-1]},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 deepCopy(obj){if(\\\"object\\\"!=typeof obj||!obj)return obj;var copy;if(Array.isArray(obj)){copy=[];for(var key=0;obj.length>key;key++)copy[key]=deepCopy(obj[key]);return copy}if(\\\"[object Object]\\\"!==Object.prototype.toString.call(obj))return obj;copy={};for(var key in obj)copy[key]=deepCopy(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(/ [\\\"+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/apply_delta\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";exports.applyDelta=function(docLines,delta){var row=delta.start.row,startColumn=delta.start.column,line=docLines[row]||\\\"\\\";switch(delta.action){case\\\"insert\\\":var lines=delta.lines;if(1===lines.length)docLines[row]=line.substring(0,startColumn)+delta.lines[0]+line.substring(startColumn);else{var args=[row,1].concat(delta.lines);docLines.splice.apply(docLines,args),docLines[row]=line.substring(0,startColumn)+docLines[row],docLines[row+delta.lines.length-1]+=line.substring(startColumn)}break;case\\\"remove\\\":var endColumn=delta.end.column,endRow=delta.end.row;row===endRow?docLines[row]=line.substring(0,startColumn)+line.substring(endColumn):docLines.splice(row,endRow-row+1,line.substring(0,startColumn)+docLines[endRow].substring(endColumn))}}}),ace.define(\\\"ace/lib/event_emitter\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports){\\\"use strict\\\";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),listeners=listeners.slice();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){listeners=listeners.slice();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){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},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/anchor\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/lib/event_emitter\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){function $pointsInOrder(point1,point2,equalPointsInOrder){var bColIsAfter=equalPointsInOrder?point1.column<=point2.column:point1.columnthis.row)){var point=$getTransformedPoint(delta,{row:this.row,column:this.column},this.$insertRight);this.setPosition(point.row,point.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._signal(\\\"change\\\",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener(\\\"change\\\",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on(\\\"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/document\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/lib/oop\\\",\\\"ace/apply_delta\\\",\\\"ace/lib/event_emitter\\\",\\\"ace/range\\\",\\\"ace/anchor\\\"],function(acequire,exports){\\\"use strict\\\";var oop=acequire(\\\"./lib/oop\\\"),applyDelta=acequire(\\\"./apply_delta\\\").applyDelta,EventEmitter=acequire(\\\"./lib/event_emitter\\\").EventEmitter,Range=acequire(\\\"./range\\\").Range,Anchor=acequire(\\\"./anchor\\\").Anchor,Document=function(textOrLines){this.$lines=[\\\"\\\"],0===textOrLines.length?this.$lines=[\\\"\\\"]:Array.isArray(textOrLines)?this.insertMergedLines({row:0,column:0},textOrLines):this.insert({row:0,column:0},textOrLines)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength()-1;this.remove(new Range(0,0,len,this.getLine(len).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._signal(\\\"changeNewLineMode\\\")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case\\\"windows\\\":return\\\"\\\\r\\\\n\\\";case\\\"unix\\\":return\\\"\\\\n\\\";default:return this.$autoNewLine||\\\"\\\\n\\\"}},this.$autoNewLine=\\\"\\\",this.$newLineMode=\\\"auto\\\",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal(\\\"changeNewLineMode\\\"))},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){return this.getLinesForRange(range).join(this.getNewLineCharacter())},this.getLinesForRange=function(range){var lines;if(range.start.row===range.end.row)lines=[this.getLine(range.start.row).substring(range.start.column,range.end.column)];else{lines=this.getLines(range.start.row,range.end.row),lines[0]=(lines[0]||\\\"\\\").substring(range.start.column);var l=lines.length-1;range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column))}return lines},this.insertLines=function(row,lines){return console.warn(\\\"Use of document.insertLines is deprecated. Use the insertFullLines method instead.\\\"),this.insertFullLines(row,lines)},this.removeLines=function(firstRow,lastRow){return console.warn(\\\"Use of document.removeLines is deprecated. Use the removeFullLines method instead.\\\"),this.removeFullLines(firstRow,lastRow)},this.insertNewLine=function(position){return console.warn(\\\"Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.\\\"),this.insertMergedLines(position,[\\\"\\\",\\\"\\\"])},this.insert=function(position,text){return 1>=this.getLength()&&this.$detectNewLine(text),this.insertMergedLines(position,this.$split(text))},this.insertInLine=function(position,text){var start=this.clippedPos(position.row,position.column),end=this.pos(position.row,position.column+text.length);return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:[text]},!0),this.clonePos(end)},this.clippedPos=function(row,column){var length=this.getLength();void 0===row?row=length:0>row?row=0:row>=length&&(row=length-1,column=void 0);var line=this.getLine(row);return void 0==column&&(column=line.length),column=Math.min(Math.max(column,0),line.length),{row:row,column:column}},this.clonePos=function(pos){return{row:pos.row,column:pos.column}},this.pos=function(row,column){return{row:row,column:column}},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):(position.row=Math.max(0,position.row),position.column=Math.min(Math.max(position.column,0),this.getLine(position.row).length)),position},this.insertFullLines=function(row,lines){row=Math.min(Math.max(row,0),this.getLength());var column=0;this.getLength()>row?(lines=lines.concat([\\\"\\\"]),column=0):(lines=[\\\"\\\"].concat(lines),row--,column=this.$lines[row].length),this.insertMergedLines({row:row,column:column},lines)},this.insertMergedLines=function(position,lines){var start=this.clippedPos(position.row,position.column),end={row:start.row+lines.length-1,column:(1==lines.length?start.column:0)+lines[lines.length-1].length};return this.applyDelta({start:start,end:end,action:\\\"insert\\\",lines:lines}),this.clonePos(end)},this.remove=function(range){var start=this.clippedPos(range.start.row,range.start.column),end=this.clippedPos(range.end.row,range.end.column);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})}),this.clonePos(start)},this.removeInLine=function(row,startColumn,endColumn){var start=this.clippedPos(row,startColumn),end=this.clippedPos(row,endColumn);return this.applyDelta({start:start,end:end,action:\\\"remove\\\",lines:this.getLinesForRange({start:start,end:end})},!0),this.clonePos(start)},this.removeFullLines=function(firstRow,lastRow){firstRow=Math.min(Math.max(0,firstRow),this.getLength()-1),lastRow=Math.min(Math.max(0,lastRow),this.getLength()-1);var deleteFirstNewLine=lastRow==this.getLength()-1&&firstRow>0,deleteLastNewLine=this.getLength()-1>lastRow,startRow=deleteFirstNewLine?firstRow-1:firstRow,startCol=deleteFirstNewLine?this.getLine(startRow).length:0,endRow=deleteLastNewLine?lastRow+1:lastRow,endCol=deleteLastNewLine?0:this.getLine(endRow).length,range=new Range(startRow,startCol,endRow,endCol),deletedLines=this.$lines.slice(firstRow,lastRow+1);return this.applyDelta({start:range.start,end:range.end,action:\\\"remove\\\",lines:this.getLinesForRange(range)}),deletedLines},this.removeNewLine=function(row){this.getLength()-1>row&&row>=0&&this.applyDelta({start:this.pos(row,this.getLine(row).length),end:this.pos(row+1,0),action:\\\"remove\\\",lines:[\\\"\\\",\\\"\\\"]})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0===text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;this.remove(range);var end;return end=text?this.insert(range.start,text):range.start},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++)this.applyDelta(deltas[i])},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--)this.revertDelta(deltas[i])},this.applyDelta=function(delta,doNotValidate){var isInsert=\\\"insert\\\"==delta.action;(isInsert?1>=delta.lines.length&&!delta.lines[0]:!Range.comparePoints(delta.start,delta.end))||(isInsert&&delta.lines.length>2e4&&this.$splitAndapplyLargeDelta(delta,2e4),applyDelta(this.$lines,delta,doNotValidate),this._signal(\\\"change\\\",delta))},this.$splitAndapplyLargeDelta=function(delta,MAX){for(var lines=delta.lines,l=lines.length,row=delta.start.row,column=delta.start.column,from=0,to=0;;){from=to,to+=MAX-1;var chunk=lines.slice(from,to);if(to>l){delta.lines=chunk,delta.start.row=row+from,delta.start.column=column;break}chunk.push(\\\"\\\"),this.applyDelta({start:this.pos(row+from,column),end:this.pos(row+to,column=0),action:delta.action,lines:chunk},!0)}},this.revertDelta=function(delta){this.applyDelta({start:this.clonePos(delta.start),end:this.clonePos(delta.end),action:\\\"insert\\\"==delta.action?\\\"remove\\\":\\\"insert\\\",lines:delta.lines.slice()})},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+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define(\\\"ace/worker/mirror\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\",\\\"ace/range\\\",\\\"ace/document\\\",\\\"ace/lib/lang\\\"],function(acequire,exports){\\\"use strict\\\";acequire(\\\"../range\\\").Range;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){var data=e.data;if(data[0].start)doc.applyDeltas(data);else for(var i=0;data.length>i;i+=2){if(Array.isArray(data[i+1]))var d={action:\\\"insert\\\",start:data[i],lines:data[i+1]};else var d={action:\\\"remove\\\",start:data[i],end:data[i+1]};doc.applyDelta(d,!0)}return _self.$timeout?deferredUpdate.schedule(_self.$timeout):(_self.onUpdate(),void 0)})};(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(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(Mirror.prototype)}),ace.define(\\\"ace/mode/css/csslint\\\",[\\\"require\\\",\\\"exports\\\",\\\"module\\\"],function(acequire,exports,module){function objectToString(o){return Object.prototype.toString.call(o)}function clone(parent,circular,depth,prototype){function _clone(parent,depth){if(null===parent)return null;if(0==depth)return parent;var child;if(\\\"object\\\"!=typeof parent)return parent;if(util.isArray(parent))child=[];else if(util.isRegExp(parent))child=RegExp(parent.source,util.getRegExpFlags(parent)),parent.lastIndex&&(child.lastIndex=parent.lastIndex);else if(util.isDate(parent))child=new Date(parent.getTime());else{if(useBuffer&&Buffer.isBuffer(parent))return child=new Buffer(parent.length),parent.copy(child),child;child=prototype===void 0?Object.create(Object.getPrototypeOf(parent)):Object.create(prototype)}if(circular){var index=allParents.indexOf(parent);if(-1!=index)return allChildren[index];allParents.push(parent),allChildren.push(child)}for(var i in parent)child[i]=_clone(parent[i],depth-1);return child}var allParents=[],allChildren=[],useBuffer=\\\"undefined\\\"!=typeof Buffer;return circular===void 0&&(circular=!0),depth===void 0&&(depth=1/0),_clone(parent,depth)}function Reporter(lines,ruleset){this.messages=[],this.stats=[],this.lines=lines,this.ruleset=ruleset}var parserlib={};(function(){function EventTarget(){this._listeners={}}function StringReader(text){this._input=text.replace(/\\\\n\\\\r?/g,\\\"\\\\n\\\"),this._line=1,this._col=1,this._cursor=0}function SyntaxError(message,line,col){this.col=col,this.line=line,this.message=message}function SyntaxUnit(text,line,col,type){this.col=col,this.line=line,this.text=text,this.type=type}function TokenStreamBase(input,tokenData){this._reader=input?new StringReader(\\\"\\\"+input):null,this._token=null,this._tokenData=tokenData,this._lt=[],this._ltIndex=0,this._ltIndexCache=[]}EventTarget.prototype={constructor:EventTarget,addListener:function(type,listener){this._listeners[type]||(this._listeners[type]=[]),this._listeners[type].push(listener)},fire:function(event){if(\\\"string\\\"==typeof event&&(event={type:event}),event.target!==void 0&&(event.target=this),event.type===void 0)throw Error(\\\"Event object missing 'type' property.\\\");if(this._listeners[event.type])for(var listeners=this._listeners[event.type].concat(),i=0,len=listeners.length;len>i;i++)listeners[i].call(this,event)},removeListener:function(type,listener){if(this._listeners[type])for(var listeners=this._listeners[type],i=0,len=listeners.length;len>i;i++)if(listeners[i]===listener){listeners.splice(i,1);break}}},StringReader.prototype={constructor:StringReader,getCol:function(){return this._col},getLine:function(){return this._line},eof:function(){return this._cursor==this._input.length},peek:function(count){var c=null;return count=count===void 0?1:count,this._cursori;i++)nameMap.push(tokenData[i].name),tokenData[tokenData[i].name]=i,tokenData[i].text&&(typeMap[tokenData[i].text]=i);return tokenData.name=function(tt){return nameMap[tt]},tokenData.type=function(c){return typeMap[c]},tokenData},TokenStreamBase.prototype={constructor:TokenStreamBase,match:function(tokenTypes,channel){tokenTypes instanceof Array||(tokenTypes=[tokenTypes]);\\nfor(var tt=this.get(channel),i=0,len=tokenTypes.length;len>i;)if(tt==tokenTypes[i++])return!0;return this.unget(),!1},mustMatch:function(tokenTypes){var token;if(tokenTypes instanceof Array||(tokenTypes=[tokenTypes]),!this.match.apply(this,arguments))throw token=this.LT(1),new SyntaxError(\\\"Expected \\\"+this._tokenData[tokenTypes[0]].name+\\\" at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol)},advance:function(tokenTypes,channel){for(;0!==this.LA(0)&&!this.match(tokenTypes,channel);)this.get();return this.LA(0)},get:function(channel){var token,info,tokenInfo=this._tokenData,i=(this._reader,0);if(tokenInfo.length,this._lt.length&&this._ltIndex>=0&&this._ltIndex-1&&!tokenInfo[token.type].hide&&(token.channel=tokenInfo[token.type].channel,this._token=token,this._lt.push(token),this._ltIndexCache.push(this._lt.length-this._ltIndex+i),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),info=tokenInfo[token.type],info&&(info.hide||void 0!==info.channel&&channel!==info.channel)?this.get(channel):token.type},LA:function(index){var tt,total=index;if(index>0){if(index>5)throw Error(\\\"Too much lookahead.\\\");for(;total;)tt=this.get(),total--;for(;index>total;)this.unget(),total++}else if(0>index){if(!this._lt[this._ltIndex+index])throw Error(\\\"Too much lookbehind.\\\");tt=this._lt[this._ltIndex+index].type}else tt=this._token.type;return tt},LT:function(index){return this.LA(index),this._lt[this._ltIndex+index-1]},peek:function(){return this.LA(1)},token:function(){return this._token},tokenName:function(tokenType){return 0>tokenType||tokenType>this._tokenData.length?\\\"UNKNOWN_TOKEN\\\":this._tokenData[tokenType].name},tokenType:function(tokenName){return this._tokenData[tokenName]||-1},unget:function(){if(!this._ltIndexCache.length)throw Error(\\\"Too much lookahead.\\\");this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1]}},parserlib.util={StringReader:StringReader,SyntaxError:SyntaxError,SyntaxUnit:SyntaxUnit,EventTarget:EventTarget,TokenStreamBase:TokenStreamBase}})(),function(){function Combinator(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.COMBINATOR_TYPE),this.type=\\\"unknown\\\",/^\\\\s+$/.test(text)?this.type=\\\"descendant\\\":\\\">\\\"==text?this.type=\\\"child\\\":\\\"+\\\"==text?this.type=\\\"adjacent-sibling\\\":\\\"~\\\"==text&&(this.type=\\\"sibling\\\")}function MediaFeature(name,value){SyntaxUnit.call(this,\\\"(\\\"+name+(null!==value?\\\":\\\"+value:\\\"\\\")+\\\")\\\",name.startLine,name.startCol,Parser.MEDIA_FEATURE_TYPE),this.name=name,this.value=value}function MediaQuery(modifier,mediaType,features,line,col){SyntaxUnit.call(this,(modifier?modifier+\\\" \\\":\\\"\\\")+(mediaType?mediaType:\\\"\\\")+(mediaType&&features.length>0?\\\" and \\\":\\\"\\\")+features.join(\\\" and \\\"),line,col,Parser.MEDIA_QUERY_TYPE),this.modifier=modifier,this.mediaType=mediaType,this.features=features}function Parser(options){EventTarget.call(this),this.options=options||{},this._tokenStream=null}function PropertyName(text,hack,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_NAME_TYPE),this.hack=hack}function PropertyValue(parts,line,col){SyntaxUnit.call(this,parts.join(\\\" \\\"),line,col,Parser.PROPERTY_VALUE_TYPE),this.parts=parts}function PropertyValueIterator(value){this._i=0,this._parts=value.parts,this._marks=[],this.value=value}function PropertyValuePart(text,line,col){SyntaxUnit.call(this,text,line,col,Parser.PROPERTY_VALUE_PART_TYPE),this.type=\\\"unknown\\\";var temp;if(/^([+\\\\-]?[\\\\d\\\\.]+)([a-z]+)$/i.test(text))switch(this.type=\\\"dimension\\\",this.value=+RegExp.$1,this.units=RegExp.$2,this.units.toLowerCase()){case\\\"em\\\":case\\\"rem\\\":case\\\"ex\\\":case\\\"px\\\":case\\\"cm\\\":case\\\"mm\\\":case\\\"in\\\":case\\\"pt\\\":case\\\"pc\\\":case\\\"ch\\\":case\\\"vh\\\":case\\\"vw\\\":case\\\"vmax\\\":case\\\"vmin\\\":this.type=\\\"length\\\";break;case\\\"deg\\\":case\\\"rad\\\":case\\\"grad\\\":this.type=\\\"angle\\\";break;case\\\"ms\\\":case\\\"s\\\":this.type=\\\"time\\\";break;case\\\"hz\\\":case\\\"khz\\\":this.type=\\\"frequency\\\";break;case\\\"dpi\\\":case\\\"dpcm\\\":this.type=\\\"resolution\\\"}else/^([+\\\\-]?[\\\\d\\\\.]+)%$/i.test(text)?(this.type=\\\"percentage\\\",this.value=+RegExp.$1):/^([+\\\\-]?\\\\d+)$/i.test(text)?(this.type=\\\"integer\\\",this.value=+RegExp.$1):/^([+\\\\-]?[\\\\d\\\\.]+)$/i.test(text)?(this.type=\\\"number\\\",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type=\\\"color\\\",temp=RegExp.$1,3==temp.length?(this.red=parseInt(temp.charAt(0)+temp.charAt(0),16),this.green=parseInt(temp.charAt(1)+temp.charAt(1),16),this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^rgb\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\\\\(\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100):/^rgba\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3,this.alpha=+RegExp.$4):/^rgba\\\\(\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.red=255*+RegExp.$1/100,this.green=255*+RegExp.$2/100,this.blue=255*+RegExp.$3/100,this.alpha=+RegExp.$4):/^hsl\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100):/^hsla\\\\(\\\\s*(\\\\d+)\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*(\\\\d+)%\\\\s*,\\\\s*([\\\\d\\\\.]+)\\\\s*\\\\)/i.test(text)?(this.type=\\\"color\\\",this.hue=+RegExp.$1,this.saturation=+RegExp.$2/100,this.lightness=+RegExp.$3/100,this.alpha=+RegExp.$4):/^url\\\\([\\\"']?([^\\\\)\\\"']+)[\\\"']?\\\\)/i.test(text)?(this.type=\\\"uri\\\",this.uri=RegExp.$1):/^([^\\\\(]+)\\\\(/i.test(text)?(this.type=\\\"function\\\",this.name=RegExp.$1,this.value=text):/^[\\\"'][^\\\"']*[\\\"']/.test(text)?(this.type=\\\"string\\\",this.value=eval(text)):Colors[text.toLowerCase()]?(this.type=\\\"color\\\",temp=Colors[text.toLowerCase()].substring(1),this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16)):/^[\\\\,\\\\/]$/.test(text)?(this.type=\\\"operator\\\",this.value=text):/^[a-z\\\\-_\\\\u0080-\\\\uFFFF][a-z0-9\\\\-_\\\\u0080-\\\\uFFFF]*$/i.test(text)&&(this.type=\\\"identifier\\\",this.value=text)}function Selector(parts,line,col){SyntaxUnit.call(this,parts.join(\\\" \\\"),line,col,Parser.SELECTOR_TYPE),this.parts=parts,this.specificity=Specificity.calculate(this)}function SelectorPart(elementName,modifiers,text,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_PART_TYPE),this.elementName=elementName,this.modifiers=modifiers}function SelectorSubPart(text,type,line,col){SyntaxUnit.call(this,text,line,col,Parser.SELECTOR_SUB_PART_TYPE),this.type=type,this.args=[]}function Specificity(a,b,c,d){this.a=a,this.b=b,this.c=c,this.d=d}function isHexDigit(c){return null!==c&&h.test(c)}function isDigit(c){return null!==c&&/\\\\d/.test(c)}function isWhitespace(c){return null!==c&&/\\\\s/.test(c)}function isNewLine(c){return null!==c&&nl.test(c)}function isNameStart(c){return null!==c&&/[a-z_\\\\u0080-\\\\uFFFF\\\\\\\\]/i.test(c)}function isNameChar(c){return null!==c&&(isNameStart(c)||/[0-9\\\\-\\\\\\\\]/.test(c))}function isIdentStart(c){return null!==c&&(isNameStart(c)||/\\\\-\\\\\\\\/.test(c))}function mix(receiver,supplier){for(var prop in supplier)supplier.hasOwnProperty(prop)&&(receiver[prop]=supplier[prop]);return receiver}function TokenStream(input){TokenStreamBase.call(this,input,Tokens)}function ValidationError(message,line,col){this.col=col,this.line=line,this.message=message}var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit,Colors={aliceblue:\\\"#f0f8ff\\\",antiquewhite:\\\"#faebd7\\\",aqua:\\\"#00ffff\\\",aquamarine:\\\"#7fffd4\\\",azure:\\\"#f0ffff\\\",beige:\\\"#f5f5dc\\\",bisque:\\\"#ffe4c4\\\",black:\\\"#000000\\\",blanchedalmond:\\\"#ffebcd\\\",blue:\\\"#0000ff\\\",blueviolet:\\\"#8a2be2\\\",brown:\\\"#a52a2a\\\",burlywood:\\\"#deb887\\\",cadetblue:\\\"#5f9ea0\\\",chartreuse:\\\"#7fff00\\\",chocolate:\\\"#d2691e\\\",coral:\\\"#ff7f50\\\",cornflowerblue:\\\"#6495ed\\\",cornsilk:\\\"#fff8dc\\\",crimson:\\\"#dc143c\\\",cyan:\\\"#00ffff\\\",darkblue:\\\"#00008b\\\",darkcyan:\\\"#008b8b\\\",darkgoldenrod:\\\"#b8860b\\\",darkgray:\\\"#a9a9a9\\\",darkgrey:\\\"#a9a9a9\\\",darkgreen:\\\"#006400\\\",darkkhaki:\\\"#bdb76b\\\",darkmagenta:\\\"#8b008b\\\",darkolivegreen:\\\"#556b2f\\\",darkorange:\\\"#ff8c00\\\",darkorchid:\\\"#9932cc\\\",darkred:\\\"#8b0000\\\",darksalmon:\\\"#e9967a\\\",darkseagreen:\\\"#8fbc8f\\\",darkslateblue:\\\"#483d8b\\\",darkslategray:\\\"#2f4f4f\\\",darkslategrey:\\\"#2f4f4f\\\",darkturquoise:\\\"#00ced1\\\",darkviolet:\\\"#9400d3\\\",deeppink:\\\"#ff1493\\\",deepskyblue:\\\"#00bfff\\\",dimgray:\\\"#696969\\\",dimgrey:\\\"#696969\\\",dodgerblue:\\\"#1e90ff\\\",firebrick:\\\"#b22222\\\",floralwhite:\\\"#fffaf0\\\",forestgreen:\\\"#228b22\\\",fuchsia:\\\"#ff00ff\\\",gainsboro:\\\"#dcdcdc\\\",ghostwhite:\\\"#f8f8ff\\\",gold:\\\"#ffd700\\\",goldenrod:\\\"#daa520\\\",gray:\\\"#808080\\\",grey:\\\"#808080\\\",green:\\\"#008000\\\",greenyellow:\\\"#adff2f\\\",honeydew:\\\"#f0fff0\\\",hotpink:\\\"#ff69b4\\\",indianred:\\\"#cd5c5c\\\",indigo:\\\"#4b0082\\\",ivory:\\\"#fffff0\\\",khaki:\\\"#f0e68c\\\",lavender:\\\"#e6e6fa\\\",lavenderblush:\\\"#fff0f5\\\",lawngreen:\\\"#7cfc00\\\",lemonchiffon:\\\"#fffacd\\\",lightblue:\\\"#add8e6\\\",lightcoral:\\\"#f08080\\\",lightcyan:\\\"#e0ffff\\\",lightgoldenrodyellow:\\\"#fafad2\\\",lightgray:\\\"#d3d3d3\\\",lightgrey:\\\"#d3d3d3\\\",lightgreen:\\\"#90ee90\\\",lightpink:\\\"#ffb6c1\\\",lightsalmon:\\\"#ffa07a\\\",lightseagreen:\\\"#20b2aa\\\",lightskyblue:\\\"#87cefa\\\",lightslategray:\\\"#778899\\\",lightslategrey:\\\"#778899\\\",lightsteelblue:\\\"#b0c4de\\\",lightyellow:\\\"#ffffe0\\\",lime:\\\"#00ff00\\\",limegreen:\\\"#32cd32\\\",linen:\\\"#faf0e6\\\",magenta:\\\"#ff00ff\\\",maroon:\\\"#800000\\\",mediumaquamarine:\\\"#66cdaa\\\",mediumblue:\\\"#0000cd\\\",mediumorchid:\\\"#ba55d3\\\",mediumpurple:\\\"#9370d8\\\",mediumseagreen:\\\"#3cb371\\\",mediumslateblue:\\\"#7b68ee\\\",mediumspringgreen:\\\"#00fa9a\\\",mediumturquoise:\\\"#48d1cc\\\",mediumvioletred:\\\"#c71585\\\",midnightblue:\\\"#191970\\\",mintcream:\\\"#f5fffa\\\",mistyrose:\\\"#ffe4e1\\\",moccasin:\\\"#ffe4b5\\\",navajowhite:\\\"#ffdead\\\",navy:\\\"#000080\\\",oldlace:\\\"#fdf5e6\\\",olive:\\\"#808000\\\",olivedrab:\\\"#6b8e23\\\",orange:\\\"#ffa500\\\",orangered:\\\"#ff4500\\\",orchid:\\\"#da70d6\\\",palegoldenrod:\\\"#eee8aa\\\",palegreen:\\\"#98fb98\\\",paleturquoise:\\\"#afeeee\\\",palevioletred:\\\"#d87093\\\",papayawhip:\\\"#ffefd5\\\",peachpuff:\\\"#ffdab9\\\",peru:\\\"#cd853f\\\",pink:\\\"#ffc0cb\\\",plum:\\\"#dda0dd\\\",powderblue:\\\"#b0e0e6\\\",purple:\\\"#800080\\\",red:\\\"#ff0000\\\",rosybrown:\\\"#bc8f8f\\\",royalblue:\\\"#4169e1\\\",saddlebrown:\\\"#8b4513\\\",salmon:\\\"#fa8072\\\",sandybrown:\\\"#f4a460\\\",seagreen:\\\"#2e8b57\\\",seashell:\\\"#fff5ee\\\",sienna:\\\"#a0522d\\\",silver:\\\"#c0c0c0\\\",skyblue:\\\"#87ceeb\\\",slateblue:\\\"#6a5acd\\\",slategray:\\\"#708090\\\",slategrey:\\\"#708090\\\",snow:\\\"#fffafa\\\",springgreen:\\\"#00ff7f\\\",steelblue:\\\"#4682b4\\\",tan:\\\"#d2b48c\\\",teal:\\\"#008080\\\",thistle:\\\"#d8bfd8\\\",tomato:\\\"#ff6347\\\",turquoise:\\\"#40e0d0\\\",violet:\\\"#ee82ee\\\",wheat:\\\"#f5deb3\\\",white:\\\"#ffffff\\\",whitesmoke:\\\"#f5f5f5\\\",yellow:\\\"#ffff00\\\",yellowgreen:\\\"#9acd32\\\",activeBorder:\\\"Active window border.\\\",activecaption:\\\"Active window caption.\\\",appworkspace:\\\"Background color of multiple document interface.\\\",background:\\\"Desktop background.\\\",buttonface:\\\"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttonhighlight:\\\"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttonshadow:\\\"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.\\\",buttontext:\\\"Text on push buttons.\\\",captiontext:\\\"Text in caption, size box, and scrollbar arrow box.\\\",graytext:\\\"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.\\\",greytext:\\\"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.\\\",highlight:\\\"Item(s) selected in a control.\\\",highlighttext:\\\"Text of item(s) selected in a control.\\\",inactiveborder:\\\"Inactive window border.\\\",inactivecaption:\\\"Inactive window caption.\\\",inactivecaptiontext:\\\"Color of text in an inactive caption.\\\",infobackground:\\\"Background color for tooltip controls.\\\",infotext:\\\"Text color for tooltip controls.\\\",menu:\\\"Menu background.\\\",menutext:\\\"Text in menus.\\\",scrollbar:\\\"Scroll bar gray area.\\\",threeddarkshadow:\\\"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedface:\\\"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedhighlight:\\\"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedlightshadow:\\\"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",threedshadow:\\\"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.\\\",window:\\\"Window background.\\\",windowframe:\\\"Window frame.\\\",windowtext:\\\"Text in windows.\\\"};Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator,MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,Parser.DEFAULT_TYPE=0,Parser.COMBINATOR_TYPE=1,Parser.MEDIA_FEATURE_TYPE=2,Parser.MEDIA_QUERY_TYPE=3,Parser.PROPERTY_NAME_TYPE=4,Parser.PROPERTY_VALUE_TYPE=5,Parser.PROPERTY_VALUE_PART_TYPE=6,Parser.SELECTOR_TYPE=7,Parser.SELECTOR_PART_TYPE=8,Parser.SELECTOR_SUB_PART_TYPE=9,Parser.prototype=function(){var prop,proto=new EventTarget,additions={constructor:Parser,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var count,token,tt,tokenStream=this._tokenStream;for(this.fire(\\\"startstylesheet\\\"),this._charset(),this._skipCruft();tokenStream.peek()==Tokens.IMPORT_SYM;)this._import(),this._skipCruft();for(;tokenStream.peek()==Tokens.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(tt=tokenStream.peek();tt>Tokens.EOF;){try{switch(tt){case Tokens.MEDIA_SYM:this._media(),this._skipCruft();break;case Tokens.PAGE_SYM:this._page(),this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case Tokens.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case Tokens.UNKNOWN_SYM:if(tokenStream.get(),this.options.strict)throw new SyntaxError(\\\"Unknown @ rule.\\\",tokenStream.LT(0).startLine,tokenStream.LT(0).startCol);for(this.fire({type:\\\"error\\\",error:null,message:\\\"Unknown @ rule: \\\"+tokenStream.LT(0).value+\\\".\\\",line:tokenStream.LT(0).startLine,col:tokenStream.LT(0).startCol}),count=0;tokenStream.advance([Tokens.LBRACE,Tokens.RBRACE])==Tokens.LBRACE;)count++;for(;count;)tokenStream.advance([Tokens.RBRACE]),count--;break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(tt){case Tokens.CHARSET_SYM:throw token=tokenStream.LT(1),this._charset(!1),new SyntaxError(\\\"@charset not allowed here.\\\",token.startLine,token.startCol);case Tokens.IMPORT_SYM:throw token=tokenStream.LT(1),this._import(!1),new SyntaxError(\\\"@import not allowed here.\\\",token.startLine,token.startCol);case Tokens.NAMESPACE_SYM:throw token=tokenStream.LT(1),this._namespace(!1),new SyntaxError(\\\"@namespace not allowed here.\\\",token.startLine,token.startCol);default:tokenStream.get(),this._unexpectedToken(tokenStream.token())}}}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col})}tt=tokenStream.peek()}tt!=Tokens.EOF&&this._unexpectedToken(tokenStream.token()),this.fire(\\\"endstylesheet\\\")},_charset:function(emit){var charset,token,line,col,tokenStream=this._tokenStream;tokenStream.match(Tokens.CHARSET_SYM)&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.mustMatch(Tokens.STRING),token=tokenStream.token(),charset=token.value,this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),emit!==!1&&this.fire({type:\\\"charset\\\",charset:charset,line:line,col:col}))},_import:function(emit){var uri,importToken,tokenStream=this._tokenStream,mediaList=[];tokenStream.mustMatch(Tokens.IMPORT_SYM),importToken=tokenStream.token(),this._readWhitespace(),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/^(?:url\\\\()?[\\\"']?([^\\\"']+?)[\\\"']?\\\\)?$/,\\\"$1\\\"),this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:\\\"import\\\",uri:uri,media:mediaList,line:importToken.startLine,col:importToken.startCol})},_namespace:function(emit){var line,col,prefix,uri,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.NAMESPACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(prefix=tokenStream.token().value,this._readWhitespace()),tokenStream.mustMatch([Tokens.STRING,Tokens.URI]),uri=tokenStream.token().value.replace(/(?:url\\\\()?[\\\"']([^\\\"']+)[\\\"']\\\\)?/,\\\"$1\\\"),this._readWhitespace(),tokenStream.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),emit!==!1&&this.fire({type:\\\"namespace\\\",prefix:prefix,uri:uri,line:line,col:col})},_media:function(){var line,col,mediaList,tokenStream=this._tokenStream;for(tokenStream.mustMatch(Tokens.MEDIA_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),mediaList=this._media_query_list(),tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:\\\"startmedia\\\",media:mediaList,line:line,col:col});;)if(tokenStream.peek()==Tokens.PAGE_SYM)this._page();else if(tokenStream.peek()==Tokens.FONT_FACE_SYM)this._font_face();else if(tokenStream.peek()==Tokens.VIEWPORT_SYM)this._viewport();else if(!this._ruleset())break;tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:\\\"endmedia\\\",media:mediaList,line:line,col:col})},_media_query_list:function(){var tokenStream=this._tokenStream,mediaList=[];for(this._readWhitespace(),(tokenStream.peek()==Tokens.IDENT||tokenStream.peek()==Tokens.LPAREN)&&mediaList.push(this._media_query());tokenStream.match(Tokens.COMMA);)this._readWhitespace(),mediaList.push(this._media_query());return mediaList},_media_query:function(){var tokenStream=this._tokenStream,type=null,ident=null,token=null,expressions=[];if(tokenStream.match(Tokens.IDENT)&&(ident=tokenStream.token().value.toLowerCase(),\\\"only\\\"!=ident&&\\\"not\\\"!=ident?(tokenStream.unget(),ident=null):token=tokenStream.token()),this._readWhitespace(),tokenStream.peek()==Tokens.IDENT?(type=this._media_type(),null===token&&(token=tokenStream.token())):tokenStream.peek()==Tokens.LPAREN&&(null===token&&(token=tokenStream.LT(1)),expressions.push(this._media_expression())),null===type&&0===expressions.length)return null;for(this._readWhitespace();tokenStream.match(Tokens.IDENT);)\\\"and\\\"!=tokenStream.token().value.toLowerCase()&&this._unexpectedToken(tokenStream.token()),this._readWhitespace(),expressions.push(this._media_expression());return new MediaQuery(ident,type,expressions,token.startLine,token.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var token,tokenStream=this._tokenStream,feature=null,expression=null;return tokenStream.mustMatch(Tokens.LPAREN),this._readWhitespace(),feature=this._media_feature(),this._readWhitespace(),tokenStream.match(Tokens.COLON)&&(this._readWhitespace(),token=tokenStream.LT(1),expression=this._expression()),tokenStream.mustMatch(Tokens.RPAREN),this._readWhitespace(),new MediaFeature(feature,expression?new SyntaxUnit(expression,token.startLine,token.startCol):null)},_media_feature:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.IDENT),SyntaxUnit.fromToken(tokenStream.token())},_page:function(){var line,col,tokenStream=this._tokenStream,identifier=null,pseudoPage=null;tokenStream.mustMatch(Tokens.PAGE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),tokenStream.match(Tokens.IDENT)&&(identifier=tokenStream.token().value,\\\"auto\\\"===identifier.toLowerCase()&&this._unexpectedToken(tokenStream.token())),tokenStream.peek()==Tokens.COLON&&(pseudoPage=this._pseudo_page()),this._readWhitespace(),this.fire({type:\\\"startpage\\\",id:identifier,pseudo:pseudoPage,line:line,col:col}),this._readDeclarations(!0,!0),this.fire({type:\\\"endpage\\\",id:identifier,pseudo:pseudoPage,line:line,col:col})},_margin:function(){var line,col,tokenStream=this._tokenStream,marginSym=this._margin_sym();return marginSym?(line=tokenStream.token().startLine,col=tokenStream.token().startCol,this.fire({type:\\\"startpagemargin\\\",margin:marginSym,line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endpagemargin\\\",margin:marginSym,line:line,col:col}),!0):!1},_margin_sym:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])?SyntaxUnit.fromToken(tokenStream.token()):null},_pseudo_page:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch(Tokens.COLON),tokenStream.mustMatch(Tokens.IDENT),tokenStream.token().value},_font_face:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.FONT_FACE_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:\\\"startfontface\\\",line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endfontface\\\",line:line,col:col})},_viewport:function(){var line,col,tokenStream=this._tokenStream;tokenStream.mustMatch(Tokens.VIEWPORT_SYM),line=tokenStream.token().startLine,col=tokenStream.token().startCol,this._readWhitespace(),this.fire({type:\\\"startviewport\\\",line:line,col:col}),this._readDeclarations(!0),this.fire({type:\\\"endviewport\\\",line:line,col:col})},_operator:function(inFunction){var tokenStream=this._tokenStream,token=null;return(tokenStream.match([Tokens.SLASH,Tokens.COMMA])||inFunction&&tokenStream.match([Tokens.PLUS,Tokens.STAR,Tokens.MINUS]))&&(token=tokenStream.token(),this._readWhitespace()),token?PropertyValuePart.fromToken(token):null},_combinator:function(){var token,tokenStream=this._tokenStream,value=null;return tokenStream.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(token=tokenStream.token(),value=new Combinator(token.value,token.startLine,token.startCol),this._readWhitespace()),value},_unary_operator:function(){var tokenStream=this._tokenStream;return tokenStream.match([Tokens.MINUS,Tokens.PLUS])?tokenStream.token().value:null},_property:function(){var tokenValue,token,line,col,tokenStream=this._tokenStream,value=null,hack=null;return tokenStream.peek()==Tokens.STAR&&this.options.starHack&&(tokenStream.get(),token=tokenStream.token(),hack=token.value,line=token.startLine,col=token.startCol),tokenStream.match(Tokens.IDENT)&&(token=tokenStream.token(),tokenValue=token.value,\\\"_\\\"==tokenValue.charAt(0)&&this.options.underscoreHack&&(hack=\\\"_\\\",tokenValue=tokenValue.substring(1)),value=new PropertyName(tokenValue,hack,line||token.startLine,col||token.startCol),this._readWhitespace()),value},_ruleset:function(){var tt,selectors,tokenStream=this._tokenStream;try{selectors=this._selectors_group()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.RBRACE]),tt!=Tokens.RBRACE)throw ex;return!0}return selectors&&(this.fire({type:\\\"startrule\\\",selectors:selectors,line:selectors[0].line,col:selectors[0].col}),this._readDeclarations(!0),this.fire({type:\\\"endrule\\\",selectors:selectors,line:selectors[0].line,col:selectors[0].col})),selectors},_selectors_group:function(){var selector,tokenStream=this._tokenStream,selectors=[];if(selector=this._selector(),null!==selector)for(selectors.push(selector);tokenStream.match(Tokens.COMMA);)this._readWhitespace(),selector=this._selector(),null!==selector?selectors.push(selector):this._unexpectedToken(tokenStream.LT(1));return selectors.length?selectors:null},_selector:function(){var tokenStream=this._tokenStream,selector=[],nextSelector=null,combinator=null,ws=null;if(nextSelector=this._simple_selector_sequence(),null===nextSelector)return null;for(selector.push(nextSelector);;)if(combinator=this._combinator(),null!==combinator)selector.push(combinator),nextSelector=this._simple_selector_sequence(),null===nextSelector?this._unexpectedToken(tokenStream.LT(1)):selector.push(nextSelector);else{if(!this._readWhitespace())break;ws=new Combinator(tokenStream.token().value,tokenStream.token().startLine,tokenStream.token().startCol),combinator=this._combinator(),nextSelector=this._simple_selector_sequence(),null===nextSelector?null!==combinator&&this._unexpectedToken(tokenStream.LT(1)):(null!==combinator?selector.push(combinator):selector.push(ws),selector.push(nextSelector))}return new Selector(selector,selector[0].line,selector[0].col)},_simple_selector_sequence:function(){var line,col,tokenStream=this._tokenStream,elementName=null,modifiers=[],selectorText=\\\"\\\",components=[function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,\\\"id\\\",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],i=0,len=components.length,component=null;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol,elementName=this._type_selector(),elementName||(elementName=this._universal()),null!==elementName&&(selectorText+=elementName);;){if(tokenStream.peek()===Tokens.S)break;for(;len>i&&null===component;)component=components[i++].call(this);if(null===component){if(\\\"\\\"===selectorText)return null;break}i=0,modifiers.push(component),selectorText+=\\\"\\\"+component,component=null}return\\\"\\\"!==selectorText?new SelectorPart(elementName,modifiers,selectorText,line,col):null},_type_selector:function(){var tokenStream=this._tokenStream,ns=this._namespace_prefix(),elementName=this._element_name();return elementName?(ns&&(elementName.text=ns+elementName.text,elementName.col-=ns.length),elementName):(ns&&(tokenStream.unget(),ns.length>1&&tokenStream.unget()),null)},_class:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.DOT)?(tokenStream.mustMatch(Tokens.IDENT),token=tokenStream.token(),new SelectorSubPart(\\\".\\\"+token.value,\\\"class\\\",token.startLine,token.startCol-1)):null},_element_name:function(){var token,tokenStream=this._tokenStream;return tokenStream.match(Tokens.IDENT)?(token=tokenStream.token(),new SelectorSubPart(token.value,\\\"elementName\\\",token.startLine,token.startCol)):null},_namespace_prefix:function(){var tokenStream=this._tokenStream,value=\\\"\\\";return(tokenStream.LA(1)===Tokens.PIPE||tokenStream.LA(2)===Tokens.PIPE)&&(tokenStream.match([Tokens.IDENT,Tokens.STAR])&&(value+=tokenStream.token().value),tokenStream.mustMatch(Tokens.PIPE),value+=\\\"|\\\"),value.length?value:null},_universal:function(){var ns,tokenStream=this._tokenStream,value=\\\"\\\";return ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.match(Tokens.STAR)&&(value+=\\\"*\\\"),value.length?value:null},_attrib:function(){var ns,token,tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.LBRACKET)?(token=tokenStream.token(),value=token.value,value+=this._readWhitespace(),ns=this._namespace_prefix(),ns&&(value+=ns),tokenStream.mustMatch(Tokens.IDENT),value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(value+=tokenStream.token().value,value+=this._readWhitespace(),tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),value+=tokenStream.token().value,value+=this._readWhitespace()),tokenStream.mustMatch(Tokens.RBRACKET),new SelectorSubPart(value+\\\"]\\\",\\\"attribute\\\",token.startLine,token.startCol)):null},_pseudo:function(){var line,col,tokenStream=this._tokenStream,pseudo=null,colons=\\\":\\\";return tokenStream.match(Tokens.COLON)&&(tokenStream.match(Tokens.COLON)&&(colons+=\\\":\\\"),tokenStream.match(Tokens.IDENT)?(pseudo=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol-colons.length):tokenStream.peek()==Tokens.FUNCTION&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol-colons.length,pseudo=this._functional_pseudo()),pseudo&&(pseudo=new SelectorSubPart(colons+pseudo,\\\"pseudo\\\",line,col))),pseudo},_functional_pseudo:function(){var tokenStream=this._tokenStream,value=null;return tokenStream.match(Tokens.FUNCTION)&&(value=tokenStream.token().value,value+=this._readWhitespace(),value+=this._expression(),tokenStream.mustMatch(Tokens.RPAREN),value+=\\\")\\\"),value},_expression:function(){for(var tokenStream=this._tokenStream,value=\\\"\\\";tokenStream.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION,Tokens.SLASH]);)value+=tokenStream.token().value,value+=this._readWhitespace();return value.length?value:null},_negation:function(){var line,col,arg,tokenStream=this._tokenStream,value=\\\"\\\",subpart=null;return tokenStream.match(Tokens.NOT)&&(value=tokenStream.token().value,line=tokenStream.token().startLine,col=tokenStream.token().startCol,value+=this._readWhitespace(),arg=this._negation_arg(),value+=arg,value+=this._readWhitespace(),tokenStream.match(Tokens.RPAREN),value+=tokenStream.token().value,subpart=new SelectorSubPart(value,\\\"not\\\",line,col),subpart.args.push(arg)),subpart},_negation_arg:function(){var line,col,part,tokenStream=this._tokenStream,args=[this._type_selector,this._universal,function(){return tokenStream.match(Tokens.HASH)?new SelectorSubPart(tokenStream.token().value,\\\"id\\\",tokenStream.token().startLine,tokenStream.token().startCol):null},this._class,this._attrib,this._pseudo],arg=null,i=0,len=args.length;for(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol;len>i&&null===arg;)arg=args[i].call(this),i++;return null===arg&&this._unexpectedToken(tokenStream.LT(1)),part=\\\"elementName\\\"==arg.type?new SelectorPart(arg,[],\\\"\\\"+arg,line,col):new SelectorPart(null,[arg],\\\"\\\"+arg,line,col)},_declaration:function(){var tokenStream=this._tokenStream,property=null,expr=null,prio=null,invalid=null,propertyName=\\\"\\\";if(property=this._property(),null!==property){tokenStream.mustMatch(Tokens.COLON),this._readWhitespace(),expr=this._expr(),expr&&0!==expr.length||this._unexpectedToken(tokenStream.LT(1)),prio=this._prio(),propertyName=\\\"\\\"+property,(this.options.starHack&&\\\"*\\\"==property.hack||this.options.underscoreHack&&\\\"_\\\"==property.hack)&&(propertyName=property.text);try{this._validateProperty(propertyName,expr)}catch(ex){invalid=ex}return this.fire({type:\\\"property\\\",property:property,value:expr,important:prio,line:property.line,col:property.col,invalid:invalid}),!0}return!1},_prio:function(){var tokenStream=this._tokenStream,result=tokenStream.match(Tokens.IMPORTANT_SYM);return this._readWhitespace(),result},_expr:function(inFunction){var values=(this._tokenStream,[]),value=null,operator=null;if(value=this._term(inFunction),null!==value)for(values.push(value);;){if(operator=this._operator(inFunction),operator&&values.push(operator),value=this._term(inFunction),null===value)break;\\nvalues.push(value)}return values.length>0?new PropertyValue(values,values[0].line,values[0].col):null},_term:function(inFunction){var token,line,col,tokenStream=this._tokenStream,unary=null,value=null,endChar=null;return unary=this._unary_operator(),null!==unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(value=this._ie_function(),null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol)):inFunction&&tokenStream.match([Tokens.LPAREN,Tokens.LBRACE,Tokens.LBRACKET])?(token=tokenStream.token(),endChar=token.endChar,value=token.value+this._expr(inFunction).text,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),tokenStream.mustMatch(Tokens.type(endChar)),value+=endChar,this._readWhitespace()):tokenStream.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(value=tokenStream.token().value,null===unary&&(line=tokenStream.token().startLine,col=tokenStream.token().startCol),this._readWhitespace()):(token=this._hexcolor(),null===token?(null===unary&&(line=tokenStream.LT(1).startLine,col=tokenStream.LT(1).startCol),null===value&&(value=tokenStream.LA(3)==Tokens.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(value=token.value,null===unary&&(line=token.startLine,col=token.startCol))),null!==value?new PropertyValuePart(null!==unary?unary+value:value,line,col):null},_function:function(){var lt,tokenStream=this._tokenStream,functionText=null,expr=null;if(tokenStream.match(Tokens.FUNCTION)){if(functionText=tokenStream.token().value,this._readWhitespace(),expr=this._expr(!0),functionText+=expr,this.options.ieFilters&&tokenStream.peek()==Tokens.EQUALS)do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&<!=Tokens.S&<!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=\\\")\\\",this._readWhitespace()}return functionText},_ie_function:function(){var lt,tokenStream=this._tokenStream,functionText=null;if(tokenStream.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){functionText=tokenStream.token().value;do for(this._readWhitespace()&&(functionText+=tokenStream.token().value),tokenStream.LA(0)==Tokens.COMMA&&(functionText+=tokenStream.token().value),tokenStream.match(Tokens.IDENT),functionText+=tokenStream.token().value,tokenStream.match(Tokens.EQUALS),functionText+=tokenStream.token().value,lt=tokenStream.peek();lt!=Tokens.COMMA&<!=Tokens.S&<!=Tokens.RPAREN;)tokenStream.get(),functionText+=tokenStream.token().value,lt=tokenStream.peek();while(tokenStream.match([Tokens.COMMA,Tokens.S]));tokenStream.match(Tokens.RPAREN),functionText+=\\\")\\\",this._readWhitespace()}return functionText},_hexcolor:function(){var color,tokenStream=this._tokenStream,token=null;if(tokenStream.match(Tokens.HASH)){if(token=tokenStream.token(),color=token.value,!/#[a-f0-9]{3,6}/i.test(color))throw new SyntaxError(\\\"Expected a hex color but found '\\\"+color+\\\"' at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol);this._readWhitespace()}return token},_keyframes:function(){var token,tt,name,tokenStream=this._tokenStream,prefix=\\\"\\\";for(tokenStream.mustMatch(Tokens.KEYFRAMES_SYM),token=tokenStream.token(),/^@\\\\-([^\\\\-]+)\\\\-/.test(token.value)&&(prefix=RegExp.$1),this._readWhitespace(),name=this._keyframe_name(),this._readWhitespace(),tokenStream.mustMatch(Tokens.LBRACE),this.fire({type:\\\"startkeyframes\\\",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tt=tokenStream.peek();tt==Tokens.IDENT||tt==Tokens.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),tt=tokenStream.peek();this.fire({type:\\\"endkeyframes\\\",name:name,prefix:prefix,line:token.startLine,col:token.startCol}),this._readWhitespace(),tokenStream.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var tokenStream=this._tokenStream;return tokenStream.mustMatch([Tokens.IDENT,Tokens.STRING]),SyntaxUnit.fromToken(tokenStream.token())},_keyframe_rule:function(){var keyList=(this._tokenStream,this._key_list());this.fire({type:\\\"startkeyframerule\\\",keys:keyList,line:keyList[0].line,col:keyList[0].col}),this._readDeclarations(!0),this.fire({type:\\\"endkeyframerule\\\",keys:keyList,line:keyList[0].line,col:keyList[0].col})},_key_list:function(){var tokenStream=this._tokenStream,keyList=[];for(keyList.push(this._key()),this._readWhitespace();tokenStream.match(Tokens.COMMA);)this._readWhitespace(),keyList.push(this._key()),this._readWhitespace();return keyList},_key:function(){var token,tokenStream=this._tokenStream;if(tokenStream.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(tokenStream.token());if(tokenStream.match(Tokens.IDENT)){if(token=tokenStream.token(),/from|to/i.test(token.value))return SyntaxUnit.fromToken(token);tokenStream.unget()}this._unexpectedToken(tokenStream.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]););},_readDeclarations:function(checkStart,readMargins){var tt,tokenStream=this._tokenStream;this._readWhitespace(),checkStart&&tokenStream.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(tokenStream.match(Tokens.SEMICOLON)||readMargins&&this._margin());else{if(!this._declaration())break;if(!tokenStream.match(Tokens.SEMICOLON))break}this._readWhitespace()}tokenStream.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(ex){if(!(ex instanceof SyntaxError)||this.options.strict)throw ex;if(this.fire({type:\\\"error\\\",error:ex,message:ex.message,line:ex.line,col:ex.col}),tt=tokenStream.advance([Tokens.SEMICOLON,Tokens.RBRACE]),tt==Tokens.SEMICOLON)this._readDeclarations(!1,readMargins);else if(tt!=Tokens.RBRACE)throw ex}},_readWhitespace:function(){for(var tokenStream=this._tokenStream,ws=\\\"\\\";tokenStream.match(Tokens.S);)ws+=tokenStream.token().value;return ws},_unexpectedToken:function(token){throw new SyntaxError(\\\"Unexpected token '\\\"+token.value+\\\"' at line \\\"+token.startLine+\\\", col \\\"+token.startCol+\\\".\\\",token.startLine,token.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(property,value){Validation.validate(property,value)},parse:function(input){this._tokenStream=new TokenStream(input,Tokens),this._stylesheet()},parseStyleSheet:function(input){return this.parse(input)},parseMediaQuery:function(input){this._tokenStream=new TokenStream(input,Tokens);var result=this._media_query();return this._verifyEnd(),result},parsePropertyValue:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._expr();return this._readWhitespace(),this._verifyEnd(),result},parseRule:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._ruleset();return this._readWhitespace(),this._verifyEnd(),result},parseSelector:function(input){this._tokenStream=new TokenStream(input,Tokens),this._readWhitespace();var result=this._selector();return this._readWhitespace(),this._verifyEnd(),result},parseStyleAttribute:function(input){input+=\\\"}\\\",this._tokenStream=new TokenStream(input,Tokens),this._readDeclarations()}};for(prop in additions)additions.hasOwnProperty(prop)&&(proto[prop]=additions[prop]);return proto}();var Properties={\\\"align-items\\\":\\\"flex-start | flex-end | center | baseline | stretch\\\",\\\"align-content\\\":\\\"flex-start | flex-end | center | space-between | space-around | stretch\\\",\\\"align-self\\\":\\\"auto | flex-start | flex-end | center | baseline | stretch\\\",\\\"-webkit-align-items\\\":\\\"flex-start | flex-end | center | baseline | stretch\\\",\\\"-webkit-align-content\\\":\\\"flex-start | flex-end | center | space-between | space-around | stretch\\\",\\\"-webkit-align-self\\\":\\\"auto | flex-start | flex-end | center | baseline | stretch\\\",\\\"alignment-adjust\\\":\\\"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | \\\",\\\"alignment-baseline\\\":\\\"baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical\\\",animation:1,\\\"animation-delay\\\":{multi:\\\"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9jb21wb25lbnRzLW1lbnUtaXRlbS9jb21wb25lbnRzLW1lbnUtaXRlbS5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBLGdFQUFnRSwwRUFBMEUsa0xBQWtMLG1EQUFtRDtBQUMvVztBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvY29tcG9uZW50cy1tZW51LWl0ZW0vY29tcG9uZW50cy1tZW51LWl0ZW0uaHRtbD8xYzc1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXZcXG4gIGNsYXNzPVxcXCJwLWNvbXBvbmVudHMtbWVudS1pdGVtLWNvbnRhaW5lciB7eyBbJGN0cmwuaGFzQ2hpbGRyZW5Dc3NDbGFzcywgJGN0cmwuY2hpbGRyZW5WaXNpYmlsaXR5Q3NzQ2xhc3NdLmpvaW4oJyAnKSB9fVxcXCJcXG4gIG5nLXNob3c9XFxcIiRjdHJsLml0ZW0uaXNWaXNpYmxlXFxcIj5cXG4gIDxkaXZcXG4gICAgbmctYmluZD1cXFwiJGN0cmwuaXRlbS5uYW1lXFxcIlxcbiAgICBjbGFzcz1cXFwicC1jb21wb25lbnRzLW1lbnUtaXRlbVxcXCJcXG4gICAgbmctY2xpY2s9XFxcIiRjdHJsLmhhbmRsZUl0ZW1DbGljaygpXFxcIlxcbiAgICBuZy1jbGFzcz1cXFwieydwLWNvbXBvbmVudHMtbWVudS1pdGVtLWFjdGl2ZSc6ICRjdHJsLml0ZW0uYWN0aXZlfVxcXCJcXG4gICAgZGF0YS1tZW51LWl0ZW0tbmFtZT5cXG4gIDwvZGl2PlxcbiAgPG5nLXRyYW5zY2x1ZGU+PC9uZy10cmFuc2NsdWRlPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/components-menu-item/components-menu-item.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/components-menu/components-menu.html": -/*!****************************************************************************!*\ - !*** ./src/webapp/scripts/components/components-menu/components-menu.html ***! - \****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n No results\\n
    \\n \\n \\n \\n \\n \\n

    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW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1xcXCJcXG4gICAgICBkYXRhLW9uLWl0ZW0tY2xpY2s9XFxcIiRjdHJsLm9uSXRlbUNsaWNrXFxcIj5cXG4gICAgICA8cC1jb21wb25lbnRzLW1lbnUtaXRlbVxcbiAgICAgICAgbmctaWY9XFxcIml0ZW0uY2hpbGRyZW5cXFwiXFxuICAgICAgICBkYXRhLWl0ZW09XFxcInN1Yml0ZW1cXFwiXFxuICAgICAgICBuZy1yZXBlYXQ9XFxcInN1Yml0ZW0gaW4gaXRlbS5jaGlsZHJlblxcXCJcXG4gICAgICAgIGRhdGEtb24taXRlbS1jbGljaz1cXFwiJGN0cmwub25JdGVtQ2xpY2tcXFwiPlxcbiAgICAgIDwvcC1jb21wb25lbnRzLW1lbnUtaXRlbT5cXG4gICAgPC9wLWNvbXBvbmVudHMtbWVudS1pdGVtPlxcbiAgPC9wLXJlcXVlc3Rlcj5cXG48L2Rpdj5cXG5cIjtcbi8vIEV4cG9ydHNcbmV4cG9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/components-menu/components-menu.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/credits/credits.html": -/*!************************************************************!*\ - !*** ./src/webapp/scripts/components/credits/credits.html ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n

    \\n Powered by\\n \\n Pitsby\\n \\n

    \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9jcmVkaXRzL2NyZWRpdHMuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9jcmVkaXRzL2NyZWRpdHMuaHRtbD85MTUwIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxmb290ZXIgY2xhc3M9XFxcInAtY3JlZGl0c1xcXCI+XFxuICA8cD5cXG4gICAgUG93ZXJlZCBieVxcbiAgICA8cC1saW5rIGRhdGEtaHJlZj1cXFwiaHR0cHM6Ly9waXRzYnkuY29tXFxcIiBkYXRhLXRhcmdldD1cXFwiX2JsYW5rXFxcIj5cXG4gICAgICBQaXRzYnlcXG4gICAgPC9wLWxpbms+XFxuICA8L3A+XFxuPC9mb290ZXI+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/credits/credits.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/engine-menu/engine-menu.html": -/*!********************************************************************!*\ - !*** ./src/webapp/scripts/components/engine-menu/engine-menu.html ***! - \********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;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Gk+XFxuICA8L3VsPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/engine-menu/engine-menu.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.html": -/*!******************************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.html ***! - \******************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n Deprecated\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtYXR0cmlidXRlcy1saXN0L2V4dGVybmFsLWNvbXBvbmVudC1hdHRyaWJ1dGVzLWxpc3QuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQSwwSEFBMEgsY0FBYztBQUN4STtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvZXh0ZXJuYWwtY29tcG9uZW50LWF0dHJpYnV0ZXMtbGlzdC9leHRlcm5hbC1jb21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gICAgICAgICAgRGVwcmVjYXRlZFxcbiAgICAgICAgICA8L3AtdGFnPlxcbiAgICAgICAgPC9wLXJvdy1pdGVtPlxcbiAgICAgICAgPHAtcm93LWl0ZW1cXG4gICAgICAgICAgZGF0YS1zaXplPVxcXCIyXFxcIlxcbiAgICAgICAgICBkYXRhLWxhYmVsPVxcXCJUeXBlXFxcIj5cXG4gICAgICAgICAgPHNwYW5cXG4gICAgICAgICAgICBuZy1iaW5kPVxcXCJhdHRyaWJ1dGUudHlwZVxcXCJcXG4gICAgICAgICAgICBkYXRhLWF0dHJpYnV0ZS12YWx1ZT5cXG4gICAgICAgICAgPC9zcGFuPlxcbiAgICAgICAgPC9wLXJvdy1pdGVtPlxcbiAgICAgICAgPHAtcm93LWl0ZW1cXG4gICAgICAgICAgZGF0YS1zaXplPVxcXCI3XFxcIlxcbiAgICAgICAgICBkYXRhLWxhYmVsPVxcXCJWYWxpZCBWYWx1ZXNcXFwiPlxcbiAgICAgICAgICA8c3BhblxcbiAgICAgICAgICAgIG5nLWJpbmQ9XFxcImF0dHJpYnV0ZS52YWx1ZXNcXFwiXFxuICAgICAgICAgICAgZGF0YS1hdHRyaWJ1dGUtdmFsdWU+XFxuICAgICAgICAgIDwvc3Bhbj5cXG4gICAgICAgIDwvcC1yb3ctaXRlbT5cXG4gICAgICA8L3Atcm93PlxcbiAgICA8L3AtZXh0ZXJuYWwtY29tcG9uZW50LXByb3BzLWxpc3QtaXRlbT5cXG4gIDwvcC1leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdD5cXG48L2Rpdj5cXG5cIjtcbi8vIEV4cG9ydHNcbmV4cG9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-attributes-list/external-component-attributes-list.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-code/external-component-code.html": -/*!********************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-code/external-component-code.html ***! - \********************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtY29kZS9leHRlcm5hbC1jb21wb25lbnQtY29kZS5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2V4dGVybmFsLWNvbXBvbmVudC1jb2RlL2V4dGVybmFsLWNvbXBvbmVudC1jb2RlLmh0bWw/MzdmYSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2IGNsYXNzPVxcXCJwLWV4dGVybmFsLWNvbXBvbmVudC1jb2RlXFxcIj5cXG4gIDxwLXByZT48L3AtcHJlPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-code/external-component-code.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.html": -/*!**********************************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.html ***! - \**********************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"\\n \\n\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS1lZGl0LWxpbmsvZXh0ZXJuYWwtY29tcG9uZW50LWV4YW1wbGUtZWRpdC1saW5rLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvZXh0ZXJuYWwtY29tcG9uZW50LWV4YW1wbGUtZWRpdC1saW5rL2V4dGVybmFsLWNvbXBvbmVudC1leGFtcGxlLWVkaXQtbGluay5odG1sP2E0M2QiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHNwYW4gY2xhc3M9XFxcInAtZXh0ZXJuYWwtY29tcG9uZW50LWV4YW1wbGUtZWRpdC1saW5rXFxcIj5cXG4gIDxidXR0b24gbmctY2xpY2s9XFxcIiRjdHJsLmdvVG9QbGF5Z3JvdW5kKClcXFwiPlxcbiAgICBFZGl0IG9uIFBsYXlncm91bmRcXG4gIDwvYnV0dG9uPlxcbjwvc3Bhbj5cXG5cIjtcbi8vIEV4cG9ydHNcbmV4cG9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-example-edit-link/external-component-example-edit-link.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-example/external-component-example.html": -/*!**************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-example/external-component-example.html ***! - \**************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n {{ $ctrl.example.description }}\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBLDhIQUE4SCxzQkFBc0IsNEpBQTRKLDRCQUE0QixtRUFBbUUsOEJBQThCLGtDQUFrQyx5QkFBeUIsOHpCQUE4ekIsZUFBZTtBQUNyekM7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2V4dGVybmFsLWNvbXBvbmVudC1leGFtcGxlL2V4dGVybmFsLWNv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G9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-example/external-component-example.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.html": -/*!**************************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.html ***! - \**************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2V4dGVybmFsLWNvbXBvbmVudC1leGFtcGxlcy1saXN0L2V4dGVybmFsLWNvbXBvbmVudC1leGFtcGxlcy1saXN0Lmh0bWw/NmM3NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2IGNsYXNzPVxcXCJwLWV4dGVybmFsLWNvbXBvbmVudC1leGFtcGxlcy1saXN0XFxcIj5cXG4gIDxwLWhlYWRpbmdcXG4gICAgZGF0YS10ZXh0PVxcXCJFeGFtcGxlc1xcXCJcXG4gICAgZGF0YS1zaXplPVxcXCIzXFxcIj5cXG4gIDwvcC1oZWFkaW5nPlxcbiAgPHAtbGlzdD5cXG4gICAgPHAtbGlzdC1pdGVtIG5nLXJlcGVhdD1cXFwiZXhhbXBsZSBpbiAkY3RybC5leGFtcGxlc1xcXCI+XFxuICAgICAgPHAtZXh0ZXJuYWwtY29tcG9uZW50LWV4YW1wbGVcXG4gICAgICAgIGRhdGEtZXhhbXBsZT1cXFwiZXhhbXBsZVxcXCJcXG4gICAgICAgIGRhdGEtZW5naW5lPVxcXCIkY3RybC5lbmdpbmVcXFwiXFxuICAgICAgICBkYXRhLWV4YW1wbGUtaW5kZXg9XFxcIiRpbmRleFxcXCI+XFxuICAgICAgPC9wLWV4dGVybmFsLWNvbXBvbmVudC1leGFtcGxlPlxcbiAgICA8L3AtbGlzdC1pdGVtPlxcbiAgPC9wLWxpc3Q+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-examples-list/external-component-examples-list.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.html": -/*!************************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.html ***! - \************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n \\n \\n \\n Deprecated\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n Deprecated\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtbWV0aG9kcy1saXN0L2V4dGVybmFsLWNvbXBvbmVudC1tZXRob2RzLWxpc3QuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQSx1WUFBdVksY0FBYztBQUNyWjtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvZXh0ZXJuYWwtY29tcG9uZW50LW1ldGhvZHMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtbWV0aG9kcy1saXN0Lmh0bWw/NWU0ZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2IGNsYXNzPVxcXCJwLWV4dGVybmFsLWNvbXBvbmVudC1tZXRob2RzLWxpc3RcXFwiPlxcbiAgPHAtZXh0ZXJuYWwtY29tcG9uZW50LXByb3BzLWxpc3RcXG4gICAgZGF0YS10aXRsZT1cXFwiTWV0aG9kc1xcXCI+XFxuICAgIDxwLWV4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0LWl0ZW1cXG4gICAgICBuZy1yZXBlYXQ9XFxcIm1ldGhvZCBpbiAkY3RybC5tZXRob2RzXFxcIj5cXG4gICAgICA8cC1yb3cgY2xhc3M9XFxcInAtZXh0ZXJuYWwtY29tcG9uZW50LW1ldGhvZHMtbGlzdC1tZXRob2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dGEtZXh0ZXJuYWwtY29tcG9uZW50LW1ldGhvZHMtbGlzdC1wYXJhbS12YWx1ZXM+XFxuICAgICAgICAgIDwvc3Bhbj5cXG4gICAgICAgIDwvcC1yb3ctaXRlbT5cXG4gICAgICAgIDxwLXJvdy1pdGVtIGRhdGEtc2l6ZT1cXFwiNFxcXCIgZGF0YS1sYWJlbD1cXFwiRGVzY3JpcHRpb25cXFwiPlxcbiAgICAgICAgICA8c3BhblxcbiAgICAgICAgICAgIG5nLWJpbmQ9XFxcInBhcmFtLmRlc2NyaXB0aW9uXFxcIlxcbiAgICAgICAgICAgIGRhdGEtZXh0ZXJuYWwtY29tcG9uZW50LW1ldGhvZHMtbGlzdC1wYXJhbS1kZXNjcmlwdGlvbj5cXG4gICAgICAgICAgPC9zcGFuPlxcbiAgICAgICAgPC9wLXJvdy1pdGVtPlxcbiAgICAgIDwvcC1yb3c+XFxuICAgIDwvcC1leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC1pdGVtPlxcbiAgPC9wLWV4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0PlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-methods-list/external-component-methods-list.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-preview/external-component-preview.html": -/*!**************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-preview/external-component-preview.html ***! - \**************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJldmlldy9leHRlcm5hbC1jb21wb25lbnQtcHJldmlldy5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2V4dGVybmFsLWNvbXBvbmVudC1wcmV2aWV3L2V4dGVybmFsLWNvbXBvbmVudC1wcmV2aWV3Lmh0bWw/MmNiMiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2IGNsYXNzPVxcXCJwLWV4dGVybmFsLWNvbXBvbmVudC1wcmV2aWV3XFxcIj48L2Rpdj5cXG5cIjtcbi8vIEV4cG9ydHNcbmV4cG9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-preview/external-component-preview.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.html": -/*!******************************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.html ***! - \******************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC1pdGVtL2V4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0LWl0ZW0uaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC1pdGVtL2V4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0LWl0ZW0uaHRtbD80ZDkxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtZXh0ZXJuYWwtY29tcG9uZW50LXByb3BzLWxpc3QtaXRlbVxcXCI+XFxuICA8bmctdHJhbnNjbHVkZT48L25nLXRyYW5zY2x1ZGU+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-props-list-item/external-component-props-list-item.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component-props-list/external-component-props-list.html": -/*!********************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component-props-list/external-component-props-list.html ***! - \********************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBLDhGQUE4RixjQUFjO0FBQzVHO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC5odG1sPzcyZDciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC1leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdFxcXCI+XFxuICA8cC1oZWFkaW5nXFxuICAgIGRhdGEtdGV4dD1cXFwie3sgJGN0cmwudGl0bGUgfX1cXFwiXFxuICAgIGRhdGEtc2l6ZT1cXFwiM1xcXCI+XFxuICA8L3AtaGVhZGluZz5cXG4gIDxuZy10cmFuc2NsdWRlPjwvbmctdHJhbnNjbHVkZT5cXG4gIDxwLXJlcXVpcmVkLWNhcHRpb24+PC9wLXJlcXVpcmVkLWNhcHRpb24+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component-props-list/external-component-props-list.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-component/external-component.html": -/*!**********************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-component/external-component.html ***! - \**********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n \\n \\n \\n Deprecated\\n \\n
    \\n \\n {{ $ctrl.component.description }}\\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQvZXh0ZXJuYWwtY29tcG9uZW50Lmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0EsaVZBQWlWLHVCQUF1QiwwTkFBME4sOEJBQThCLHFLQUFxSyw0QkFBNEI7QUFDanlCO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnQvZXh0ZXJuYWwtY29tcG9uZW50Lmh0bWw/MDQ3OSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2IGNsYXNzPVxcXCJwLWV4dGVybmFsLWNvbXBvbmVudFxcXCI+XFxuICA8cC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lIH19XFxcIj5cXG4gICAgPC9wLWV4dGVybmFsLWNvbXBvbmVudC1hdHRyaWJ1dGVzLWxpc3Q+XFxuICAgIDxwLWV4dGVybmFsLWNvbXBvbmVudC1tZXRob2RzLWxpc3RcXG4gICAgICBuZy1pZj1cXFwiJGN0cmwuY29tcG9uZW50Lm1ldGhvZHNcXFwiXFxuICAgICAgZGF0YS1tZXRob2RzPVxcXCIkY3RybC5jb21wb25lbnQubWV0aG9kc1xcXCI+XFxuICAgIDwvcC1leHRlcm5hbC1jb21wb25lbnQtbWV0aG9kcy1saXN0PlxcbiAgICA8cC1leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdFxcbiAgICAgIG5nLWlmPVxcXCIkY3RybC5jb21wb25lbnQuZXhhbXBsZXNcXFwiXFxuICAgICAgZGF0YS1leGFtcGxlcz1cXFwiJGN0cmwuY29tcG9uZW50LmV4YW1wbGVzXFxcIlxcbiAgICAgIGRhdGEtZW5naW5lPVxcXCIkY3RybC5lbmdpbmVcXFwiPlxcbiAgICA8L3AtZXh0ZXJuYWwtY29tcG9uZW50LWV4YW1wbGVzLWxpc3Q+XFxuICA8L3AtcmVxdWVzdGVyPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-component/external-component.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/external-components-playground/external-components-playground.html": -/*!**********************************************************************************************************!*\ - !*** ./src/webapp/scripts/components/external-components-playground/external-components-playground.html ***! - \**********************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9leHRlcm5hbC1jb21wb25lbnRzLXBsYXlncm91bmQvZXh0ZXJuYWwtY29tcG9uZW50cy1wbGF5Z3JvdW5kLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0EscThCQUFxOEIsK0JBQStCO0FBQ3ArQjtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvZXh0ZXJuYWwtY29tcG9uZW50cy1wbGF5Z3JvdW5kL2V4dGVybmFsLWNvbXBvbmVudHMtcGxheWdyb3VuZC5odG1sP2E3YzciXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBuZy1jbGFzcz1cXFwiJGN0cmwuY3NzQ2xhc3Nlc1xcXCI+XFxuICA8cC10YWJzIGRhdGEtcXVlcnktcGFyYW0ta2V5PVxcXCJ0YWJcXFwiIGRhdGEtYmFyLWl0ZW1zLXBvc2l0aW9uPVxcXCJjZW50ZXJcXFwiPlxcbiAgICA8cC10YWIgZGF0YS1uYW1lPVxcXCJQcmV2aWV3XFxcIiBkYXRhLW9uLXNlbGVjdD1cXFwiJGN0cmwub25QcmV2aWV3UmVuZGVyXFxcIj5cXG4gICAgICA8cC1leHRlcm5hbC1jb21wb25lbnQtcHJldmlld1xcbiAgICAgICAgbmctaWY9XFxcIiRjdHJsLnNob3VsZFNob3dQcmV2aWV3XFxcIlxcbiAgICAgICAg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VyXFxcIlxcbiAgICAgICAgZGF0YS1vbi1jaGFuZ2U9XFxcIiRjdHJsLnNldENvbnRyb2xsZXJcXFwiIC8+XFxuICAgIDwvcC10YWI+XFxuICAgIDxwLXRhYlxcbiAgICAgIGRhdGEtbmFtZT1cXFwiU3R5bGVzXFxcIlxcbiAgICAgIGRhdGEtb24tc2VsZWN0PVxcXCIkY3RybC5vblByZXZpZXdEZXN0cm95XFxcIj5cXG4gICAgICA8cC1jb2RlLWVkaXRvclxcbiAgICAgICAgbmctaWY9XFxcIiRjdHJsLnN0eWxlc1xcXCJcXG4gICAgICAgIGRhdGEtbW9kZT1cXFwiY3NzXFxcIlxcbiAgICAgICAgZGF0YS1jb2RlPVxcXCIkY3RybC5zdHlsZXNcXFwiXFxuICAgICAgICBkYXRhLW9uLWNoYW5nZT1cXFwiJGN0cmwuc2V0U3R5bGVzXFxcIiAvPlxcbiAgICA8L3AtdGFiPlxcbiAgPC9wLXRhYnM+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/external-components-playground/external-components-playground.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/heading/heading.html": -/*!************************************************************!*\ - !*** ./src/webapp/scripts/components/heading/heading.html ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9oZWFkaW5nL2hlYWRpbmcuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9oZWFkaW5nL2hlYWRpbmcuaHRtbD81OTNmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtaGVhZGluZ1xcXCI+PC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/heading/heading.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/input/input.html": -/*!********************************************************!*\ - !*** ./src/webapp/scripts/components/input/input.html ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"\\n \\n\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9pbnB1dC9pbnB1dC5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBLHFIQUFxSCxvQkFBb0I7QUFDekk7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2lucHV0L2lucHV0Lmh0bWw/NWU4NiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8c3BhbiBjbGFzcz1cXFwicC1pbnB1dC13cmFwcGVyXFxcIj5cXG4gIDxpbnB1dFxcbiAgICB0eXBlPSd0ZXh0J1xcbiAgICBjbGFzcz1cXFwicC1pbnB1dFxcXCJcXG4gICAgcGxhY2Vob2xkZXI9XFxcInt7ICRjdHJsLnBsYWNlaG9sZGVyIH19XFxcIlxcbiAgICBuZy1tb2RlbD1cXFwiJGN0cmwudmFsdWVcXFwiXFxuICAgIG5nLWNoYW5nZT1cXFwiJGN0cmwub25JbnB1dENoYW5nZSgpXFxcIlxcbiAgICBuZy1ibHVyPVxcXCIkY3RybC5vbklucHV0Qmx1cigpXFxcIiAvPlxcbjwvc3Bhbj5cXG5cIjtcbi8vIEV4cG9ydHNcbmV4cG9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/input/input.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/link/link.html": -/*!******************************************************!*\ - !*** ./src/webapp/scripts/components/link/link.html ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"\\n \\n\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saW5rL2xpbmsuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQSw2Q0FBNkMsYUFBYSxlQUFlLGVBQWU7QUFDeEY7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL2xpbmsvbGluay5odG1sPzAzMjIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGEgY2xhc3M9XFxcInAtbGlua1xcXCIgbmctaHJlZj1cXFwie3sgJGN0cmwuaHJlZiB9fVxcXCIgdGFyZ2V0PVxcXCJ7eyAkY3RybC50YXJnZXQgfX1cXFwiPlxcbiAgPG5nLXRyYW5zY2x1ZGU+PC9uZy10cmFuc2NsdWRlPlxcbjwvYT5cXG5cIjtcbi8vIEV4cG9ydHNcbmV4cG9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/link/link.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/list-item/list-item.html": -/*!****************************************************************!*\ - !*** ./src/webapp/scripts/components/list-item/list-item.html ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saXN0LWl0ZW0vbGlzdC1pdGVtLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvbGlzdC1pdGVtL2xpc3QtaXRlbS5odG1sPzU4NmQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC1saXN0LWl0ZW1cXFwiPlxcbiAgPG5nLXRyYW5zY2x1ZGU+PC9uZy10cmFuc2NsdWRlPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/list-item/list-item.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/list/list.html": -/*!******************************************************!*\ - !*** ./src/webapp/scripts/components/list/list.html ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saXN0L2xpc3QuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQSxtUEFBbVAsMEJBQTBCO0FBQzdRO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9saXN0L2xpc3QuaHRtbD9hMTNiIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtbGlzdFxcXCI+XFxuICA8cC1yZXF1ZXN0ZXJcXG4gICAgZGF0YS1mZXRjaD1cXFwiJGN0cmwuZmV0Y2hcXFwiXFxuICAgIGRhdGEtZmV0Y2gtc3VjY2Vzcz1cXFwiJGN0cmwuZmV0Y2hTdWNjZXNzXFxcIlxcbiAgICBkYXRhLXNob3VsZC1oaWRlLWNvbnRlbnQtb24tcmVxdWVzdD1cXFwiJGN0cmwuc2hvdWxkSGlkZUNvbnRlbnRPblJlcXVlc3RcXFwiXFxuICAgIGRhdGEtYWxlcnQtZXJyb3ItbWVzc2FnZT1cXFwie3sgJGN0cmwuYWxlcnRFcnJvck1lc3NhZ2UgfX1cXFwiPlxcbiAgICA8bmctdHJhbnNjbHVkZT48L25nLXRyYW5zY2x1ZGU+XFxuICA8L3AtcmVxdWVzdGVyPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/list/list.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/loader/loader.html": -/*!**********************************************************!*\ - !*** ./src/webapp/scripts/components/loader/loader.html ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9sb2FkZXIvbG9hZGVyLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvbG9hZGVyL2xvYWRlci5odG1sPzQwZTMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC1sb2FkZXJcXFwiPjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/loader/loader.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/logo/logo.html": -/*!******************************************************!*\ - !*** ./src/webapp/scripts/components/logo/logo.html ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9sb2dvL2xvZ28uaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9sb2dvL2xvZ28uaHRtbD82Y2Q3Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtbG9nb1xcXCIgPjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/logo/logo.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/main/main.html": -/*!******************************************************!*\ - !*** ./src/webapp/scripts/components/main/main.html ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n
    \\n \\n
    \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9tYWluL21haW4uaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9tYWluL21haW4uaHRtbD8zMzFiIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxtYWluIGNsYXNzPVxcXCJwLW1haW5cXFwiPlxcbiAgPGRpdiBjbGFzcz1cXFwicC1tYWluLWNvbnRlbnRcXFwiPlxcbiAgICA8bmctdHJhbnNjbHVkZT48L25nLXRyYW5zY2x1ZGU+XFxuICA8L2Rpdj5cXG48L21haW4+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/main/main.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/menu-trigger/menu-trigger.html": -/*!**********************************************************************!*\ - !*** ./src/webapp/scripts/components/menu-trigger/menu-trigger.html ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9tZW51LXRyaWdnZXIvbWVudS10cmlnZ2VyLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvbWVudS10cmlnZ2VyL21lbnUtdHJpZ2dlci5odG1sP2VlNWYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC1tZW51LXRyaWdnZXJcXFwiPlxcbiAgPHAtdHJpZ2dlciBvbi1jbGljaz1cXFwiJGN0cmwub25DbGlja1xcXCI+PC9wLXRyaWdnZXI+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/menu-trigger/menu-trigger.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/paragraph/paragraph.html": -/*!****************************************************************!*\ - !*** ./src/webapp/scripts/components/paragraph/paragraph.html ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"

    \\n \\n

    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9wYXJhZ3JhcGgvcGFyYWdyYXBoLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvcGFyYWdyYXBoL3BhcmFncmFwaC5odG1sPzEyYmMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHAgY2xhc3M9XFxcInAtcGFyYWdyYXBoXFxcIj5cXG4gIDxuZy10cmFuc2NsdWRlPjwvbmctdHJhbnNjbHVkZT5cXG48L3A+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/paragraph/paragraph.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/pre/pre.html": -/*!****************************************************!*\ - !*** ./src/webapp/scripts/components/pre/pre.html ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n  \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9wcmUvcHJlLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvcHJlL3ByZS5odG1sPzEzZDUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHByZSBjbGFzcz1cXFwicC1wcmVcXFwiPlxcbiAgPG5nLXRyYW5zY2x1ZGU+PC9uZy10cmFuc2NsdWRlPlxcbjwvcHJlPlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/pre/pre.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/requester/requester.html": -/*!****************************************************************!*\ - !*** ./src/webapp/scripts/components/requester/requester.html ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n
    \\n \\n
    \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9yZXF1ZXN0ZXIvcmVxdWVzdGVyLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvcmVxdWVzdGVyL3JlcXVlc3Rlci5odG1sP2NmMzgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC1yZXF1ZXN0ZXJcXFwiPlxcbiAgPHAtYWxlcnRcXG4gICAgZGF0YS1hbGVydD1cXFwiJGN0cmwuYWxlcnRcXFwiPlxcbiAgPC9wLWFsZXJ0PlxcbiAgPHAtbG9hZGVyXFxuICAgIG5nLWlmPVxcXCIkY3RybC5zaG91bGRTaG93TG9hZGVyXFxcIj5cXG4gIDwvcC1sb2FkZXI+XFxuICA8ZGl2IG5nLXNob3c9XFxcIiRjdHJsLnNob3VsZFNob3dDb250ZW50XFxcIj5cXG4gICAgPG5nLXRyYW5zY2x1ZGU+PC9uZy10cmFuc2NsdWRlPlxcbiAgPC9kaXY+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/requester/requester.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/required-caption/required-caption.html": -/*!******************************************************************************!*\ - !*** ./src/webapp/scripts/components/required-caption/required-caption.html ***! - \******************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n Required\\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9yZXF1aXJlZC1jYXB0aW9uL3JlcXVpcmVkLWNhcHRpb24uaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9yZXF1aXJlZC1jYXB0aW9uL3JlcXVpcmVkLWNhcHRpb24uaHRtbD9kNmZiIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtcmVxdWlyZWQtY2FwdGlvblxcXCI+XFxuICA8cC1yZXF1aXJlZC1zeW1ib2w+PC9wLXJlcXVpcmVkLXN5bWJvbD5cXG4gIDxzcGFuXFxuICAgIGNsYXNzPVxcXCJwLXJlcXVpcmVkLWNhcHRpb24tdGV4dFxcXCJcXG4gICAgZGF0YS1yZXF1aXJlZC1jYXB0aW9uLXRleHQ+XFxuICAgIFJlcXVpcmVkXFxuICA8L3NwYW4+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/required-caption/required-caption.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/required-symbol/required-symbol.html": -/*!****************************************************************************!*\ - !*** ./src/webapp/scripts/components/required-symbol/required-symbol.html ***! - \****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"*\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9yZXF1aXJlZC1zeW1ib2wvcmVxdWlyZWQtc3ltYm9sLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvcmVxdWlyZWQtc3ltYm9sL3JlcXVpcmVkLXN5bWJvbC5odG1sPzU4NzIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHNwYW4gY2xhc3M9XFxcInAtcmVxdWlyZWQtc3ltYm9sXFxcIj4qPC9zcGFuPlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/required-symbol/required-symbol.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/row-item/row-item.html": -/*!**************************************************************!*\ - !*** ./src/webapp/scripts/components/row-item/row-item.html ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n \\n \\n \\n\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9yb3ctaXRlbS9yb3ctaXRlbS5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBLHVDQUF1QyxxQkFBcUI7QUFDNUQ7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL3Jvdy1pdGVtL3Jvdy1pdGVtLmh0bWw/MjUxNyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2IGNsYXNzPVxcXCJwLXJvdy1pdGVtIHt7ICRjdHJsLnNpemVDc3NDbGFzcyB9fVxcXCI+XFxuICA8ZGl2XFxuICAgIGNsYXNzPVxcXCJwLXJvdy1pdGVtLWxhYmVsXFxcIlxcbiAgICBuZy1pZj1cXFwiJGN0cmwubGFiZWxcXFwiXFxuICAgIG5nLWJpbmQ9XFxcIiRjdHJsLmxhYmVsXFxcIlxcbiAgICBkYXRhLXJvdy1pdGVtLWxhYmVsPlxcbiAgPC9kaXY+XFxuICA8ZGl2XFxuICAgIGNsYXNzPVxcXCJwLXJvdy1pdGVtLXZhbHVlXFxcIlxcbiAgICBuZy1pZj1cXFwiJGN0cmwudmFsdWVcXFwiXFxuICAgIG5nLWJpbmQ9XFxcIiRjdHJsLnZhbHVlXFxcIlxcbiAgICBkYXRhLXJvdy1pdGVtLXZhbHVlPlxcbiAgPC9kaXY+XFxuICA8bmctdHJhbnNjbHVkZT48L25nLXRyYW5zY2x1ZGU+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/row-item/row-item.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/row/row.html": -/*!****************************************************!*\ - !*** ./src/webapp/scripts/components/row/row.html ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9yb3cvcm93Lmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0Esa0NBQWtDLCtCQUErQjtBQUNqRTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvcm93L3Jvdy5odG1sPzdhZmQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC1yb3cge3sgJGN0cmwudmVydGljYWxPZmZzZXRDc3NDbGFzcyB9fVxcXCI+XFxuICA8bmctdHJhbnNjbHVkZT48L25nLXRyYW5zY2x1ZGU+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/row/row.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/search-input/search-input.html": -/*!**********************************************************************!*\ - !*** ./src/webapp/scripts/components/search-input/search-input.html ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9zZWFyY2gtaW5wdXQvc2VhcmNoLWlucHV0Lmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvc2VhcmNoLWlucHV0L3NlYXJjaC1pbnB1dC5odG1sPzI5N2QiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC1zZWFyY2gtaW5wdXRcXFwiPlxcbiAgPGRpdiBjbGFzcz1cXFwicC1zZWFyY2gtaW5wdXQtaWNvblxcXCI+PC9kaXY+XFxuICA8cC1pbnB1dFxcbiAgICBkYXRhLXBsYWNlaG9sZGVyPVxcXCJTZWFyY2hcXFwiXFxuICAgIGRhdGEtdmFsdWU9XFxcIiRjdHJsLnRlcm1cXFwiXFxuICAgIG9uLWNoYW5nZT1cXFwiJGN0cmwuZGlzcGF0Y2hcXFwiIC8+XFxuPC9kaXY+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/search-input/search-input.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/sidebar/sidebar.html": -/*!************************************************************!*\ - !*** ./src/webapp/scripts/components/sidebar/sidebar.html ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n
    \\n \\n \\n \\n \\n \\n \\n
    \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9zaWRlYmFyL3NpZGViYXIuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQSxzQ0FBc0Msa0NBQWtDO0FBQ3hFO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy9zaWRlYmFyL3NpZGViYXIuaHRtbD9lMmExIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtc2lkZWJhciB7eyAkY3RybC5zaWRlYmFyVmlzaWJpbGl0eUNzc0NsYXNzIH19XFxcIj5cXG4gIDxkaXYgY2xhc3M9XFxcInAtc2lkZWJhci1jb250ZW50XFxcIj5cXG4gICAgPHAtYmFjay10cmlnZ2VyIGRhdGEtb24tY2xpY2s9XFxcIiRjdHJsLmhpZGVTaWRlYmFyXFxcIj48L3AtYmFjay10cmlnZ2VyPlxcbiAgICA8cC1sb2dvPjwvcC1sb2dvPlxcbiAgICA8cC1lbmdpbmUtbWVudT48L3AtZW5naW5lLW1lbnU+XFxuICAgIDxwLWNvbXBvbmVudHMtbWVudVxcbiAgICAgIGRhdGEtb24taXRlbS1jbGljaz1cXFwiJGN0cmwub25Db21wb25lbnRzTWVudUl0ZW1DbGlja1xcXCI+XFxuICAgIDwvcC1jb21wb25lbnRzLW1lbnU+XFxuICAgIDxwLWNyZWRpdHMgLz5cXG4gIDwvZGl2PlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/sidebar/sidebar.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/tab/tab.html": -/*!****************************************************!*\ - !*** ./src/webapp/scripts/components/tab/tab.html ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy90YWIvdGFiLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvdGFiL3RhYi5odG1sPzlhN2QiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC10YWJcXFwiPlxcbiAgPG5nLXRyYW5zY2x1ZGU+PC9uZy10cmFuc2NsdWRlPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/tab/tab.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/tabs/tabs.html": -/*!******************************************************!*\ - !*** ./src/webapp/scripts/components/tabs/tabs.html ***! - \******************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n
    \\n \\n \\n
    \\n
    \\n \\n
    \\n \\n
    \\n\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy90YWJzL3RhYnMuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQSx3SEFBd0gsaUNBQWlDLG1IQUFtSCx1Q0FBdUM7QUFDblQ7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL3RhYnMvdGFicy5odG1sP2Y4ZTgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC10YWJzXFxcIj5cXG4gIDxkaXYgY2xhc3M9XFxcInAtdGFicy1iYXJcXFwiPlxcbiAgICA8ZGl2XFxuICAgICAgY2xhc3M9XFxcInAtdGFicy1iYXItaXRlbXMtY29udGFpbmVyIHt7ICRjdHJsLmJhckl0ZW1zUG9zaXRpb25Dc3NDbGFzcyB9fVxcXCJcXG4gICAgICBkYXRhLXRhYnMtYmFyLWl0ZW1zLWNvbnRhaW5lcj5cXG4gICAgICA8ZGl2XFxuICAgICAgICBuZy1yZXBlYXQ9XFxcInRhYiBpbiAkY3RybC50YWJzXFxcIlxcbiAgICAgICAgbmctY2xhc3M9XFxcInsncC10YWJzLWJhci1pdGVtLWFjdGl2ZSc6IHRhYi5pc0FjdGl2ZX1cXFwiXFxuICAgICAgICBuZy1jbGljaz1cXFwiJGN0cmwuc2VsZWN0VGFiKHRhYiwgJGluZGV4KVxcXCJcXG4gICAgICAgIG5nLWJpbmQ9XFxcInRhYi5uYW1lXFxcIlxcbiAgICAgICAgY2xhc3M9XFxcInAtdGFicy1iYXItaXRlbVxcXCI+XFxuICAgICAgPC9kaXY+XFxuICAgIDwvZGl2PlxcbiAgPC9kaXY+XFxuICA8ZGl2IGNsYXNzPVxcXCJwLXRhYnMtY29udGVudFxcXCI+XFxuICAgIDxuZy10cmFuc2NsdWRlPjwvbmctdHJhbnNjbHVkZT5cXG4gIDwvZGl2PlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/tabs/tabs.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/tag/tag.html": -/*!****************************************************!*\ - !*** ./src/webapp/scripts/components/tag/tag.html ***! - \****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"\\n \\n\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy90YWcvdGFnLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvdGFnL3RhZy5odG1sPzZjNWQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHNwYW4gY2xhc3M9XFxcInAtdGFnXFxcIiBuZy1jbGFzcz1cXFwiJGN0cmwudGhlbWVDc3NDbGFzc1xcXCI+XFxuICA8bmctdHJhbnNjbHVkZT48L25nLXRyYW5zY2x1ZGU+XFxuPC9zcGFuPlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/tag/tag.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/topbar/topbar.html": -/*!**********************************************************!*\ - !*** ./src/webapp/scripts/components/topbar/topbar.html ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy90b3BiYXIvdG9wYmFyLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL2NvbXBvbmVudHMvdG9wYmFyL3RvcGJhci5odG1sP2M1NzgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPGRpdiBjbGFzcz1cXFwicC10b3BiYXJcXFwiPlxcbiAgPHAtbWVudS10cmlnZ2VyPjwvcC1tZW51LXRyaWdnZXI+XFxuICA8cC1sb2dvPjwvcC1sb2dvPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/topbar/topbar.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/trigger/trigger.html": -/*!************************************************************!*\ - !*** ./src/webapp/scripts/components/trigger/trigger.html ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy90cmlnZ2VyL3RyaWdnZXIuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy90cmlnZ2VyL3RyaWdnZXIuaHRtbD8wYTdmIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtdHJpZ2dlclxcXCIgbmctY2xpY2s9XFxcIiRjdHJsLmNsaWNrKClcXFwiPjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/trigger/trigger.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/viewport/viewport.html": -/*!**************************************************************!*\ - !*** ./src/webapp/scripts/components/viewport/viewport.html ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy92aWV3cG9ydC92aWV3cG9ydC5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy9jb21wb25lbnRzL3ZpZXdwb3J0L3ZpZXdwb3J0Lmh0bWw/YmYwOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2IGNsYXNzPVxcXCJwLXZpZXdwb3J0XFxcIj5cXG4gIDxwLXRvcGJhcj48L3AtdG9wYmFyPlxcbiAgPG5nLXRyYW5zY2x1ZGU+PC9uZy10cmFuc2NsdWRlPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/viewport/viewport.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/components/welcome/welcome.html": -/*!************************************************************!*\ - !*** ./src/webapp/scripts/components/welcome/welcome.html ***! - \************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n Say hello to your\\n components.
    \\n Click over any item on the menu to see its details.\\n
    \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy93ZWxjb21lL3dlbGNvbWUuaHRtbC5qcyIsIm1hcHBpbmdzIjoiOzs7O0FBQUE7QUFDQTtBQUNBO0FBQ0EsaUVBQWUsSUFBSSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3NjcmlwdHMvY29tcG9uZW50cy93ZWxjb21lL3dlbGNvbWUuaHRtbD9mOWQ1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIE1vZHVsZVxudmFyIGNvZGUgPSBcIjxkaXYgY2xhc3M9XFxcInAtd2VsY29tZVxcXCI+XFxuICA8cC1oZWFkaW5nXFxuICAgIGRhdGEtdGV4dD1cXFwiV2VsY29tZVxcXCJcXG4gICAgZGF0YS1zaXplPVxcXCIyXFxcIj5cXG4gIDwvcC1oZWFkaW5nPlxcbiAgPHAtcGFyYWdyYXBoPlxcbiAgICBTYXkgaGVsbG8gdG8geW91clxcbiAgICA8c3BhbiBuZy1iaW5kPVxcXCIkY3RybC5lbmdpbmVcXFwiIGNsYXNzPVxcXCJwLXdlbGNvbWUtZW5naW5lXFxcIj48L3NwYW4+IGNvbXBvbmVudHMuPGJyIC8+XFxuICAgIENsaWNrIG92ZXIgYW55IGl0ZW0gb24gdGhlIG1lbnUgdG8gc2VlIGl0cyBkZXRhaWxzLlxcbiAgPC9wLXBhcmFncmFwaD5cXG48L2Rpdj5cXG5cIjtcbi8vIEV4cG9ydHNcbmV4cG9ydCBkZWZhdWx0IGNvZGU7Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/scripts/components/welcome/welcome.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/views/app.html": -/*!*******************************************!*\ - !*** ./src/webapp/scripts/views/app.html ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"\\n \\n\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvdmlld3MvYXBwLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL3ZpZXdzL2FwcC5odG1sP2E0MmYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHAtdmlld3BvcnQ+XFxuICA8dWktdmlldz48L3VpLXZpZXc+XFxuPC9wLXZpZXdwb3J0PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/views/app.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/views/external-component.html": -/*!**********************************************************!*\ - !*** ./src/webapp/scripts/views/external-component.html ***! - \**********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvdmlld3MvZXh0ZXJuYWwtY29tcG9uZW50Lmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL3ZpZXdzL2V4dGVybmFsLWNvbXBvbmVudC5odG1sP2E2ZWQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHAtZXh0ZXJuYWwtY29tcG9uZW50PjwvcC1leHRlcm5hbC1jb21wb25lbnQ+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/views/external-component.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/views/external-components-playground.html": -/*!**********************************************************************!*\ - !*** ./src/webapp/scripts/views/external-components-playground.html ***! - \**********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"\\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvdmlld3MvZXh0ZXJuYWwtY29tcG9uZW50cy1wbGF5Z3JvdW5kLmh0bWwuanMiLCJtYXBwaW5ncyI6Ijs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBLGlFQUFlLElBQUkiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zY3JpcHRzL3ZpZXdzL2V4dGVybmFsLWNvbXBvbmVudHMtcGxheWdyb3VuZC5odG1sP2Y5ZTAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTW9kdWxlXG52YXIgY29kZSA9IFwiPHAtZXh0ZXJuYWwtY29tcG9uZW50cy1wbGF5Z3JvdW5kIC8+XFxuXCI7XG4vLyBFeHBvcnRzXG5leHBvcnQgZGVmYXVsdCBjb2RlOyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/scripts/views/external-components-playground.html\n"); - -/***/ }), - -/***/ "./src/webapp/scripts/views/external-components.html": -/*!***********************************************************!*\ - !*** ./src/webapp/scripts/views/external-components.html ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n// Module\nvar code = \"
    \\n \\n \\n \\n \\n \\n \\n
    \\n\";\n// Exports\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (code);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3NjcmlwdHMvdmlld3MvZXh0ZXJuYWwtY29tcG9uZW50cy5odG1sLmpzIiwibWFwcGluZ3MiOiI7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQSxpRUFBZSxJQUFJIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc2NyaXB0cy92aWV3cy9leHRlcm5hbC1jb21wb25lbnRzLmh0bWw/NzM0MCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBNb2R1bGVcbnZhciBjb2RlID0gXCI8ZGl2PlxcbiAgPHAtc2lkZWJhcj48L3Atc2lkZWJhcj5cXG4gIDxwLW1haW4+XFxuICAgIDx1aS12aWV3PlxcbiAgICAgIDxwLXdlbGNvbWU+PC9wLXdlbGNvbWU+XFxuICAgIDwvdWktdmlldz5cXG4gIDwvcC1tYWluPlxcbjwvZGl2PlxcblwiO1xuLy8gRXhwb3J0c1xuZXhwb3J0IGRlZmF1bHQgY29kZTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/scripts/views/external-components.html\n"); - -/***/ }), - -/***/ "./src/webapp/styles/_native.styl": -/*!****************************************!*\ - !*** ./src/webapp/styles/_native.styl ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9fbmF0aXZlLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL19uYXRpdmUuc3R5bD84Nzg1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/_native.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/alert.styl": -/*!**************************************!*\ - !*** ./src/webapp/styles/alert.styl ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9hbGVydC5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9hbGVydC5zdHlsPzdkMzAiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/alert.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/back-trigger.styl": -/*!*********************************************!*\ - !*** ./src/webapp/styles/back-trigger.styl ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9iYWNrLXRyaWdnZXIuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvYmFjay10cmlnZ2VyLnN0eWw/ZGYwYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/back-trigger.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/btn.styl": -/*!************************************!*\ - !*** ./src/webapp/styles/btn.styl ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9idG4uc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvYnRuLnN0eWw/ZjIzOCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/btn.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/code-editor.styl": -/*!********************************************!*\ - !*** ./src/webapp/styles/code-editor.styl ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9jb2RlLWVkaXRvci5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9jb2RlLWVkaXRvci5zdHlsPzhlNTYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/code-editor.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/components-menu-item.styl": -/*!*****************************************************!*\ - !*** ./src/webapp/styles/components-menu-item.styl ***! - \*****************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9jb21wb25lbnRzLW1lbnUtaXRlbS5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9jb21wb25lbnRzLW1lbnUtaXRlbS5zdHlsPzI2OTEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/components-menu-item.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/components-menu.styl": -/*!************************************************!*\ - !*** ./src/webapp/styles/components-menu.styl ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9jb21wb25lbnRzLW1lbnUuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvY29tcG9uZW50cy1tZW51LnN0eWw/ZmFhMyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/components-menu.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/credits.styl": -/*!****************************************!*\ - !*** ./src/webapp/styles/credits.styl ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9jcmVkaXRzLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL2NyZWRpdHMuc3R5bD82Y2QxIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/credits.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/engine-menu.styl": -/*!********************************************!*\ - !*** ./src/webapp/styles/engine-menu.styl ***! - \********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9lbmdpbmUtbWVudS5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9lbmdpbmUtbWVudS5zdHlsPzdkMGUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/engine-menu.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component-code.styl": -/*!********************************************************!*\ - !*** ./src/webapp/styles/external-component-code.styl ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtY29kZS5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtY29kZS5zdHlsPzc2NGQiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component-code.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component-example-edit-link.styl": -/*!*********************************************************************!*\ - !*** ./src/webapp/styles/external-component-example-edit-link.styl ***! - \*********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS1lZGl0LWxpbmsuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvZXh0ZXJuYWwtY29tcG9uZW50LWV4YW1wbGUtZWRpdC1saW5rLnN0eWw/NmRkYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component-example-edit-link.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component-example.styl": -/*!***********************************************************!*\ - !*** ./src/webapp/styles/external-component-example.styl ***! - \***********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZS5zdHlsPzNlNmEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component-example.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component-examples-list.styl": -/*!*****************************************************************!*\ - !*** ./src/webapp/styles/external-component-examples-list.styl ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtZXhhbXBsZXMtbGlzdC5zdHlsPzAwNjUiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component-examples-list.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component-methods-list.styl": -/*!****************************************************************!*\ - !*** ./src/webapp/styles/external-component-methods-list.styl ***! - \****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtbWV0aG9kcy1saXN0LnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL2V4dGVybmFsLWNvbXBvbmVudC1tZXRob2RzLWxpc3Quc3R5bD8xYjk4Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component-methods-list.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component-props-list-item.styl": -/*!*******************************************************************!*\ - !*** ./src/webapp/styles/external-component-props-list-item.styl ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC1pdGVtLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL2V4dGVybmFsLWNvbXBvbmVudC1wcm9wcy1saXN0LWl0ZW0uc3R5bD9kMzMzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component-props-list-item.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component-props-list.styl": -/*!**************************************************************!*\ - !*** ./src/webapp/styles/external-component-props-list.styl ***! - \**************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQtcHJvcHMtbGlzdC5zdHlsPzFiYzIiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component-props-list.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-component.styl": -/*!***************************************************!*\ - !*** ./src/webapp/styles/external-component.styl ***! - \***************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnQuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvZXh0ZXJuYWwtY29tcG9uZW50LnN0eWw/ZjM1ZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-component.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/external-components-playground.styl": -/*!***************************************************************!*\ - !*** ./src/webapp/styles/external-components-playground.styl ***! - \***************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9leHRlcm5hbC1jb21wb25lbnRzLXBsYXlncm91bmQuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvZXh0ZXJuYWwtY29tcG9uZW50cy1wbGF5Z3JvdW5kLnN0eWw/MzU5NSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/external-components-playground.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/heading.styl": -/*!****************************************!*\ - !*** ./src/webapp/styles/heading.styl ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9oZWFkaW5nLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL2hlYWRpbmcuc3R5bD85ZTI0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/heading.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/input.styl": -/*!**************************************!*\ - !*** ./src/webapp/styles/input.styl ***! - \**************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9pbnB1dC5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9pbnB1dC5zdHlsP2UwODgiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/input.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/link.styl": -/*!*************************************!*\ - !*** ./src/webapp/styles/link.styl ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9saW5rLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL2xpbmsuc3R5bD9iN2JjIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/link.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/list-item.styl": -/*!******************************************!*\ - !*** ./src/webapp/styles/list-item.styl ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9saXN0LWl0ZW0uc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvbGlzdC1pdGVtLnN0eWw/ZGQ3MCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/list-item.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/loader.styl": -/*!***************************************!*\ - !*** ./src/webapp/styles/loader.styl ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9sb2FkZXIuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvbG9hZGVyLnN0eWw/Y2FkZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/loader.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/logo.styl": -/*!*************************************!*\ - !*** ./src/webapp/styles/logo.styl ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9sb2dvLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL2xvZ28uc3R5bD8zMzBhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/logo.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/main.styl": -/*!*************************************!*\ - !*** ./src/webapp/styles/main.styl ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9tYWluLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL21haW4uc3R5bD8zODRhIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/main.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/menu-trigger.styl": -/*!*********************************************!*\ - !*** ./src/webapp/styles/menu-trigger.styl ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9tZW51LXRyaWdnZXIuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvbWVudS10cmlnZ2VyLnN0eWw/MDlhNiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/menu-trigger.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/paragraph.styl": -/*!******************************************!*\ - !*** ./src/webapp/styles/paragraph.styl ***! - \******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9wYXJhZ3JhcGguc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvcGFyYWdyYXBoLnN0eWw/NDcxYiJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/paragraph.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/pre.styl": -/*!************************************!*\ - !*** ./src/webapp/styles/pre.styl ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9wcmUuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvcHJlLnN0eWw/ZjhlMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/pre.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/required-caption.styl": -/*!*************************************************!*\ - !*** ./src/webapp/styles/required-caption.styl ***! - \*************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9yZXF1aXJlZC1jYXB0aW9uLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL3JlcXVpcmVkLWNhcHRpb24uc3R5bD9iMTk1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/required-caption.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/required-symbol.styl": -/*!************************************************!*\ - !*** ./src/webapp/styles/required-symbol.styl ***! - \************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9yZXF1aXJlZC1zeW1ib2wuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvcmVxdWlyZWQtc3ltYm9sLnN0eWw/NTBhNSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/required-symbol.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/row-item.styl": -/*!*****************************************!*\ - !*** ./src/webapp/styles/row-item.styl ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9yb3ctaXRlbS5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy9yb3ctaXRlbS5zdHlsPzIyZGYiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/row-item.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/row.styl": -/*!************************************!*\ - !*** ./src/webapp/styles/row.styl ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9yb3cuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvcm93LnN0eWw/NDIzZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/row.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/search-input.styl": -/*!*********************************************!*\ - !*** ./src/webapp/styles/search-input.styl ***! - \*********************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9zZWFyY2gtaW5wdXQuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvc2VhcmNoLWlucHV0LnN0eWw/ZDUzOSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/search-input.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/sidebar.styl": -/*!****************************************!*\ - !*** ./src/webapp/styles/sidebar.styl ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy9zaWRlYmFyLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL3NpZGViYXIuc3R5bD83ZmY5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/sidebar.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/tab.styl": -/*!************************************!*\ - !*** ./src/webapp/styles/tab.styl ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy90YWIuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvdGFiLnN0eWw/Yzc0NCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/tab.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/tabs.styl": -/*!*************************************!*\ - !*** ./src/webapp/styles/tabs.styl ***! - \*************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy90YWJzLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL3RhYnMuc3R5bD8yZDM5Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/tabs.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/tag.styl": -/*!************************************!*\ - !*** ./src/webapp/styles/tag.styl ***! - \************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy90YWcuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvdGFnLnN0eWw/ZWEzYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/tag.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/topbar.styl": -/*!***************************************!*\ - !*** ./src/webapp/styles/topbar.styl ***! - \***************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy90b3BiYXIuc3R5bC5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4vc3JjL3dlYmFwcC9zdHlsZXMvdG9wYmFyLnN0eWw/YzE3YSJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./src/webapp/styles/topbar.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/trigger.styl": -/*!****************************************!*\ - !*** ./src/webapp/styles/trigger.styl ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy90cmlnZ2VyLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL3RyaWdnZXIuc3R5bD8yZDg1Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/trigger.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/viewport.styl": -/*!*****************************************!*\ - !*** ./src/webapp/styles/viewport.styl ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy92aWV3cG9ydC5zdHlsLmpzIiwibWFwcGluZ3MiOiI7QUFBQSIsInNvdXJjZXMiOlsid2VicGFjazovL0BnbG9yaW91cy9waXRzYnkvLi9zcmMvd2ViYXBwL3N0eWxlcy92aWV3cG9ydC5zdHlsP2RiZGEiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gZXh0cmFjdGVkIGJ5IG1pbmktY3NzLWV4dHJhY3QtcGx1Z2luXG5leHBvcnQge307Il0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./src/webapp/styles/viewport.styl\n"); - -/***/ }), - -/***/ "./src/webapp/styles/welcome.styl": -/*!****************************************!*\ - !*** ./src/webapp/styles/welcome.styl ***! - \****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViYXBwL3N0eWxlcy93ZWxjb21lLnN0eWwuanMiLCJtYXBwaW5ncyI6IjtBQUFBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vQGdsb3Jpb3VzL3BpdHNieS8uL3NyYy93ZWJhcHAvc3R5bGVzL3dlbGNvbWUuc3R5bD85ZTUzIl0sInNvdXJjZXNDb250ZW50IjpbIi8vIGV4dHJhY3RlZCBieSBtaW5pLWNzcy1leHRyYWN0LXBsdWdpblxuZXhwb3J0IHt9OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./src/webapp/styles/welcome.styl\n"); - -/***/ }), - -/***/ "../../../../prismjs@1.28.0/node_modules/prismjs/themes/prism.css": -/*!************************************************************************!*\ - !*** ../../../../prismjs@1.28.0/node_modules/prismjs/themes/prism.css ***! - \************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vLi4vLi4vLi4vcHJpc21qc0AxLjI4LjAvbm9kZV9tb2R1bGVzL3ByaXNtanMvdGhlbWVzL3ByaXNtLmNzcy5qcyIsIm1hcHBpbmdzIjoiO0FBQUEiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly9AZ2xvcmlvdXMvcGl0c2J5Ly4uLy4uLy4uLy4uL3ByaXNtanNAMS4yOC4wL25vZGVfbW9kdWxlcy9wcmlzbWpzL3RoZW1lcy9wcmlzbS5jc3M/N2VlNCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBleHRyYWN0ZWQgYnkgbWluaS1jc3MtZXh0cmFjdC1wbHVnaW5cbmV4cG9ydCB7fTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///../../../../prismjs@1.28.0/node_modules/prismjs/themes/prism.css\n"); - -/***/ }), - -/***/ "../../../../prismjs@1.28.0/node_modules/prismjs/prism.js": -/*!****************************************************************!*\ - !*** ../../../../prismjs@1.28.0/node_modules/prismjs/prism.js ***! - \****************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -eval("\n/* **********************************************\n Begin prism-core.js\n********************************************** */\n\n/// \n\nvar _self = (typeof window !== 'undefined')\n\t? window // if in browser\n\t: (\n\t\t(typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope)\n\t\t\t? self // if in worker\n\t\t\t: {} // if in node js\n\t);\n\n/**\n * Prism: Lightweight, robust, elegant syntax highlighting\n *\n * @license MIT \n * @author Lea Verou \n * @namespace\n * @public\n */\nvar Prism = (function (_self) {\n\n\t// Private helper vars\n\tvar lang = /(?:^|\\s)lang(?:uage)?-([\\w-]+)(?=\\s|$)/i;\n\tvar uniqueId = 0;\n\n\t// The grammar object for plaintext\n\tvar plainTextGrammar = {};\n\n\n\tvar _ = {\n\t\t/**\n\t\t * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the\n\t\t * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load\n\t\t * additional languages or plugins yourself.\n\t\t *\n\t\t * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.\n\t\t *\n\t\t * You obviously have to change this value before the automatic highlighting started. To do this, you can add an\n\t\t * empty Prism object into the global scope before loading the Prism script like this:\n\t\t *\n\t\t * ```js\n\t\t * window.Prism = window.Prism || {};\n\t\t * Prism.manual = true;\n\t\t * // add a new